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 CCACHE
 633 USE_PRECOMPILED_HEADER
 634 SJAVAC_SERVER_DIR
 635 ENABLE_SJAVAC
 636 SJAVAC_SERVER_JAVA_FLAGS
 637 SJAVAC_SERVER_JAVA
 638 JAVA_TOOL_FLAGS_SMALL
 639 JAVA_FLAGS_SMALL
 640 JAVA_FLAGS_BIG
 641 JAVA_FLAGS
 642 JOBS
 643 MEMORY_SIZE
 644 NUM_CORES
 645 ENABLE_INTREE_EC
 646 SALIB_NAME
 647 HOTSPOT_MAKE_ARGS
 648 MSVCR_DLL
 649 LIBCXX
 650 LLVM_LIBS
 651 LLVM_LDFLAGS
 652 LLVM_CFLAGS
 653 LLVM_CONFIG
 654 LIBFFI_LIBS
 655 LIBFFI_CFLAGS
 656 STATIC_CXX_SETTING
 657 LIBDL
 658 LIBM
 659 LIBZIP_CAN_USE_MMAP
 660 USE_EXTERNAL_LIBZ
 661 USE_EXTERNAL_LIBPNG
 662 PNG_LIBS
 663 PNG_CFLAGS
 664 USE_EXTERNAL_LCMS
 665 LCMS_LIBS
 666 LCMS_CFLAGS
 667 USE_EXTERNAL_LIBGIF
 668 USE_EXTERNAL_LIBJPEG
 669 ALSA_LIBS
 670 ALSA_CFLAGS
 671 FREETYPE_BUNDLE_LIB_PATH
 672 FREETYPE_LIBS
 673 FREETYPE_CFLAGS
 674 CUPS_CFLAGS
 675 X_EXTRA_LIBS
 676 X_LIBS
 677 X_PRE_LIBS
 678 X_CFLAGS
 679 XMKMF
 680 FIXPATH
 681 ZIP_DEBUGINFO_FILES
 682 ENABLE_DEBUG_SYMBOLS
 683 CFLAGS_WARNINGS_ARE_ERRORS
 684 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 685 ZERO_ARCHFLAG
 686 LDFLAGS_CXX_JDK
 687 LDFLAGS_JDKEXE_SUFFIX
 688 LDFLAGS_JDKLIB_SUFFIX
 689 LDFLAGS_JDKEXE
 690 LDFLAGS_JDKLIB
 691 CXXFLAGS_JDKEXE
 692 CXXFLAGS_JDKLIB
 693 CFLAGS_JDKEXE
 694 CFLAGS_JDKLIB
 695 MACOSX_VERSION_MIN
 696 LEGACY_EXTRA_LDFLAGS
 697 LEGACY_EXTRA_CXXFLAGS
 698 LEGACY_EXTRA_CFLAGS
 699 CXX_O_FLAG_NONE
 700 CXX_O_FLAG_DEBUG
 701 CXX_O_FLAG_NORM
 702 CXX_O_FLAG_HI
 703 CXX_O_FLAG_HIGHEST
 704 C_O_FLAG_NONE
 705 C_O_FLAG_DEBUG
 706 C_O_FLAG_NORM
 707 C_O_FLAG_HI
 708 C_O_FLAG_HIGHEST
 709 CXXFLAGS_DEBUG_OPTIONS
 710 CFLAGS_DEBUG_OPTIONS
 711 CXXFLAGS_DEBUG_SYMBOLS
 712 CFLAGS_DEBUG_SYMBOLS
 713 CXX_FLAG_DEPS
 714 C_FLAG_DEPS
 715 SET_SHARED_LIBRARY_MAPFILE
 716 SET_SHARED_LIBRARY_NAME
 717 SET_SHARED_LIBRARY_ORIGIN
 718 SET_EXECUTABLE_ORIGIN
 719 SHARED_LIBRARY_FLAGS
 720 CXX_FLAG_REORDER
 721 C_FLAG_REORDER
 722 SYSROOT_LDFLAGS
 723 SYSROOT_CFLAGS
 724 RC_FLAGS
 725 AR_OUT_OPTION
 726 LD_OUT_OPTION
 727 EXE_OUT_OPTION
 728 CC_OUT_OPTION
 729 POST_MCS_CMD
 730 POST_STRIP_CMD
 731 ARFLAGS
 732 COMPILER_TARGET_BITS_FLAG
 733 JT_HOME
 734 JTREGEXE
 735 USING_BROKEN_SUSE_LD
 736 PACKAGE_PATH
 737 LDEXECXX
 738 LDEXE
 739 USE_CLANG
 740 HOTSPOT_LD
 741 HOTSPOT_CXX
 742 HOTSPOT_RC
 743 HOTSPOT_MT
 744 BUILD_LD
 745 BUILD_CXX
 746 BUILD_CC
 747 ac_ct_OBJDUMP
 748 OBJDUMP
 749 ac_ct_OBJCOPY
 750 OBJCOPY
 751 ac_ct_NM
 752 ac_ct_STRIP
 753 MCS
 754 GNM
 755 NM
 756 STRIP
 757 MSBUILD
 758 DUMPBIN
 759 RC
 760 MT
 761 LIPO
 762 ac_ct_OBJC
 763 OBJCFLAGS
 764 OBJC
 765 ac_ct_AR
 766 AR
 767 AS
 768 LDCXX
 769 LD
 770 CXXCPP
 771 CPP
 772 ac_ct_CXX
 773 CXXFLAGS
 774 CXX
 775 ac_ct_PROPER_COMPILER_CXX
 776 PROPER_COMPILER_CXX
 777 TOOLCHAIN_PATH_CXX
 778 POTENTIAL_CXX
 779 OBJEXT
 780 EXEEXT
 781 ac_ct_CC
 782 CPPFLAGS
 783 LDFLAGS
 784 CFLAGS
 785 CC
 786 ac_ct_PROPER_COMPILER_CC
 787 PROPER_COMPILER_CC
 788 TOOLCHAIN_PATH_CC
 789 POTENTIAL_CC
 790 VS_LIB
 791 VS_INCLUDE
 792 VS_PATH
 793 CYGWIN_LINK
 794 EXE_SUFFIX
 795 OBJ_SUFFIX
 796 STATIC_LIBRARY
 797 SHARED_LIBRARY
 798 STATIC_LIBRARY_SUFFIX
 799 SHARED_LIBRARY_SUFFIX
 800 LIBRARY_PREFIX
 801 TOOLCHAIN_TYPE
 802 BUILD_HOTSPOT
 803 HOTSPOT_DIST
 804 BUILD_OUTPUT
 805 OVERRIDE_SRC_ROOT
 806 ADD_SRC_ROOT
 807 JDK_TOPDIR
 808 NASHORN_TOPDIR
 809 HOTSPOT_TOPDIR
 810 JAXWS_TOPDIR
 811 JAXP_TOPDIR
 812 CORBA_TOPDIR
 813 LANGTOOLS_TOPDIR
 814 JAVAC_FLAGS
 815 BOOT_JDK_SOURCETARGET
 816 JARSIGNER
 817 NATIVE2ASCII
 818 JAR
 819 JAVAH
 820 JAVAC
 821 JAVA
 822 BOOT_JDK
 823 JAVA_CHECK
 824 JAVAC_CHECK
 825 COOKED_BUILD_NUMBER
 826 JDK_VERSION
 827 COPYRIGHT_YEAR
 828 MACOSX_BUNDLE_ID_BASE
 829 MACOSX_BUNDLE_NAME_BASE
 830 COMPANY_NAME
 831 JDK_RC_PLATFORM_NAME
 832 PRODUCT_SUFFIX
 833 PRODUCT_NAME
 834 LAUNCHER_NAME
 835 MILESTONE
 836 JDK_BUILD_NUMBER
 837 JDK_UPDATE_VERSION
 838 JDK_MICRO_VERSION
 839 JDK_MINOR_VERSION
 840 JDK_MAJOR_VERSION
 841 USER_RELEASE_SUFFIX
 842 COMPRESS_JARS
 843 RMICONNECTOR_IIOP
 844 UNLIMITED_CRYPTO
 845 CACERTS_FILE
 846 TEST_IN_BUILD
 847 BUILD_HEADLESS
 848 SUPPORT_HEADFUL
 849 SUPPORT_HEADLESS
 850 BDEPS_FTP
 851 BDEPS_UNZIP
 852 OS_VERSION_MICRO
 853 OS_VERSION_MINOR
 854 OS_VERSION_MAJOR
 855 PKG_CONFIG
 856 CODESIGN
 857 XATTR
 858 DSYMUTIL
 859 IS_GNU_TIME
 860 TIME
 861 STAT
 862 HG
 863 READELF
 864 OTOOL
 865 LDD
 866 ZIP
 867 UNZIP
 868 FIND_DELETE
 869 OUTPUT_SYNC
 870 OUTPUT_SYNC_SUPPORTED
 871 MAKE
 872 CHECK_TOOLSDIR_MAKE
 873 CHECK_TOOLSDIR_GMAKE
 874 CHECK_MAKE
 875 CHECK_GMAKE
 876 PKGHANDLER
 877 OUTPUT_ROOT
 878 CONF_NAME
 879 SPEC
 880 SDKROOT
 881 XCODEBUILD
 882 BUILD_VARIANT_RELEASE
 883 DEBUG_CLASSFILES
 884 FASTDEBUG
 885 VARIANT
 886 DEBUG_LEVEL
 887 MACOSX_UNIVERSAL
 888 INCLUDE_SA
 889 JVM_VARIANT_CORE
 890 JVM_VARIANT_ZEROSHARK
 891 JVM_VARIANT_ZERO
 892 JVM_VARIANT_KERNEL
 893 JVM_VARIANT_MINIMAL1
 894 JVM_VARIANT_CLIENT
 895 JVM_VARIANT_SERVER
 896 JVM_VARIANTS
 897 JVM_INTERPRETER
 898 JDK_VARIANT
 899 SET_OPENJDK
 900 BUILD_LOG_WRAPPER
 901 BUILD_LOG_PREVIOUS
 902 BUILD_LOG
 903 TOPDIR
 904 PATH_SEP
 905 ZERO_ARCHDEF
 906 DEFINE_CROSS_COMPILE_ARCH
 907 LP64
 908 OPENJDK_TARGET_OS_EXPORT_DIR
 909 OPENJDK_TARGET_CPU_JLI_CFLAGS
 910 OPENJDK_TARGET_CPU_OSARCH
 911 OPENJDK_TARGET_CPU_ISADIR
 912 OPENJDK_TARGET_CPU_LIBDIR
 913 OPENJDK_TARGET_CPU_LEGACY_LIB
 914 OPENJDK_TARGET_CPU_LEGACY
 915 REQUIRED_OS_VERSION
 916 REQUIRED_OS_NAME
 917 COMPILE_TYPE
 918 OPENJDK_TARGET_CPU_ENDIAN
 919 OPENJDK_TARGET_CPU_BITS
 920 OPENJDK_TARGET_CPU_ARCH
 921 OPENJDK_TARGET_CPU
 922 OPENJDK_TARGET_OS_ENV
 923 OPENJDK_TARGET_OS_TYPE
 924 OPENJDK_TARGET_OS
 925 OPENJDK_BUILD_CPU_ENDIAN
 926 OPENJDK_BUILD_CPU_BITS
 927 OPENJDK_BUILD_CPU_ARCH
 928 OPENJDK_BUILD_CPU
 929 OPENJDK_BUILD_OS_ENV
 930 OPENJDK_BUILD_OS_TYPE
 931 OPENJDK_BUILD_OS
 932 OPENJDK_BUILD_AUTOCONF_NAME
 933 OPENJDK_TARGET_AUTOCONF_NAME
 934 target_os
 935 target_vendor
 936 target_cpu
 937 target
 938 host_os
 939 host_vendor
 940 host_cpu
 941 host
 942 build_os
 943 build_vendor
 944 build_cpu
 945 build
 946 CPIO
 947 SETFILE
 948 DF
 949 READLINK
 950 CYGPATH
 951 SED
 952 FGREP
 953 EGREP
 954 GREP
 955 AWK
 956 XARGS
 957 WHICH
 958 WC
 959 UNIQ
 960 UNAME
 961 TR
 962 TOUCH
 963 TEE
 964 TAR
 965 TAIL
 966 SORT
 967 SH
 968 RM
 969 PRINTF
 970 NAWK
 971 MV
 972 MKTEMP
 973 MKDIR
 974 LS
 975 LN
 976 HEAD
 977 FIND
 978 FILE
 979 EXPR
 980 ECHO
 981 DIRNAME
 982 DIFF
 983 DATE
 984 CUT
 985 CP
 986 COMM
 987 CMP
 988 CHMOD
 989 CAT
 990 BASH
 991 BASENAME
 992 DATE_WHEN_CONFIGURED
 993 CONFIGURE_COMMAND_LINE
 994 target_alias
 995 host_alias
 996 build_alias
 997 LIBS
 998 ECHO_T
 999 ECHO_N
1000 ECHO_C
1001 DEFS
1002 mandir
1003 localedir
1004 libdir
1005 psdir
1006 pdfdir
1007 dvidir
1008 htmldir
1009 infodir
1010 docdir
1011 oldincludedir
1012 includedir
1013 localstatedir
1014 sharedstatedir
1015 sysconfdir
1016 datadir
1017 datarootdir
1018 libexecdir
1019 sbindir
1020 bindir
1021 program_transform_name
1022 prefix
1023 exec_prefix
1024 PACKAGE_URL
1025 PACKAGE_BUGREPORT
1026 PACKAGE_STRING
1027 PACKAGE_VERSION
1028 PACKAGE_TARNAME
1029 PACKAGE_NAME
1030 PATH_SEPARATOR
1031 SHELL'
1032 ac_subst_files=''
1033 ac_user_opts='
1034 enable_option_checking
1035 with_target_bits
1036 enable_openjdk_only
1037 with_custom_make_dir
1038 with_jdk_variant
1039 with_jvm_interpreter
1040 with_jvm_variants
1041 enable_debug
1042 with_debug_level
1043 with_devkit
1044 with_sys_root
1045 with_sysroot
1046 with_tools_dir
1047 with_toolchain_path
1048 with_extra_path
1049 with_sdk_name
1050 with_conf_name
1051 with_output_sync
1052 with_builddeps_conf
1053 with_builddeps_server
1054 with_builddeps_dir
1055 with_builddeps_group
1056 enable_headful
1057 enable_hotspot_test_in_build
1058 with_cacerts_file
1059 enable_unlimited_crypto
1060 enable_rmiconnector_iiop
1061 with_milestone
1062 with_update_version
1063 with_user_release_suffix
1064 with_build_number
1065 with_copyright_year
1066 with_boot_jdk
1067 with_add_source_root
1068 with_override_source_root
1069 with_adds_and_overrides
1070 with_override_langtools
1071 with_override_corba
1072 with_override_jaxp
1073 with_override_jaxws
1074 with_override_hotspot
1075 with_override_nashorn
1076 with_override_jdk
1077 with_import_hotspot
1078 with_toolchain_type
1079 with_jtreg
1080 with_extra_cflags
1081 with_extra_cxxflags
1082 with_extra_ldflags
1083 enable_debug_symbols
1084 enable_zip_debug_info
1085 with_x
1086 with_cups
1087 with_cups_include
1088 with_freetype
1089 with_freetype_include
1090 with_freetype_lib
1091 with_freetype_src
1092 enable_freetype_bundling
1093 with_alsa
1094 with_alsa_include
1095 with_alsa_lib
1096 with_libjpeg
1097 with_giflib
1098 with_lcms
1099 with_libpng
1100 with_zlib
1101 with_stdc__lib
1102 with_msvcr_dll
1103 with_dxsdk
1104 with_dxsdk_lib
1105 with_dxsdk_include
1106 with_num_cores
1107 with_memory_size
1108 with_jobs
1109 with_boot_jdk_jvmargs
1110 with_sjavac_server_java
1111 enable_sjavac
1112 enable_precompiled_headers
1113 enable_ccache
1114 with_ccache_dir
1115 '
1116       ac_precious_vars='build_alias
1117 host_alias
1118 target_alias
1119 BASENAME
1120 BASH
1121 CAT
1122 CHMOD
1123 CMP
1124 COMM
1125 CP
1126 CUT
1127 DATE
1128 DIFF
1129 DIRNAME
1130 ECHO
1131 EXPR
1132 FILE
1133 FIND
1134 HEAD
1135 LN
1136 LS
1137 MKDIR
1138 MKTEMP
1139 MV
1140 NAWK
1141 PRINTF
1142 RM
1143 SH
1144 SORT
1145 TAIL
1146 TAR
1147 TEE
1148 TOUCH
1149 TR
1150 UNAME
1151 UNIQ
1152 WC
1153 WHICH
1154 XARGS
1155 AWK
1156 GREP
1157 EGREP
1158 FGREP
1159 SED
1160 CYGPATH
1161 READLINK
1162 DF
1163 SETFILE
1164 CPIO
1165 UNZIP
1166 ZIP
1167 LDD
1168 OTOOL
1169 READELF
1170 HG
1171 STAT
1172 TIME
1173 DSYMUTIL
1174 XATTR
1175 CODESIGN
1176 PKG_CONFIG
1177 JAVA
1178 JAVAC
1179 JAVAH
1180 JAR
1181 NATIVE2ASCII
1182 JARSIGNER
1183 CC
1184 CFLAGS
1185 LDFLAGS
1186 LIBS
1187 CPPFLAGS
1188 CXX
1189 CXXFLAGS
1190 CCC
1191 CPP
1192 CXXCPP
1193 AS
1194 AR
1195 OBJC
1196 OBJCFLAGS
1197 LIPO
1198 STRIP
1199 NM
1200 GNM
1201 MCS
1202 OBJCOPY
1203 OBJDUMP
1204 BUILD_CC
1205 BUILD_CXX
1206 BUILD_LD
1207 JTREGEXE
1208 XMKMF
1209 FREETYPE_CFLAGS
1210 FREETYPE_LIBS
1211 ALSA_CFLAGS
1212 ALSA_LIBS
1213 LCMS_CFLAGS
1214 LCMS_LIBS
1215 PNG_CFLAGS
1216 PNG_LIBS
1217 LIBFFI_CFLAGS
1218 LIBFFI_LIBS
1219 CCACHE'
1220 
1221 
1222 # Initialize some variables set by options.
1223 ac_init_help=
1224 ac_init_version=false
1225 ac_unrecognized_opts=
1226 ac_unrecognized_sep=
1227 # The variables have the same names as the options, with
1228 # dashes changed to underlines.
1229 cache_file=/dev/null
1230 exec_prefix=NONE
1231 no_create=
1232 no_recursion=
1233 prefix=NONE
1234 program_prefix=NONE
1235 program_suffix=NONE
1236 program_transform_name=s,x,x,
1237 silent=
1238 site=
1239 srcdir=
1240 verbose=
1241 x_includes=NONE
1242 x_libraries=NONE
1243 
1244 # Installation directory options.
1245 # These are left unexpanded so users can "make install exec_prefix=/foo"
1246 # and all the variables that are supposed to be based on exec_prefix
1247 # by default will actually change.
1248 # Use braces instead of parens because sh, perl, etc. also accept them.
1249 # (The list follows the same order as the GNU Coding Standards.)
1250 bindir='${exec_prefix}/bin'
1251 sbindir='${exec_prefix}/sbin'
1252 libexecdir='${exec_prefix}/libexec'
1253 datarootdir='${prefix}/share'
1254 datadir='${datarootdir}'
1255 sysconfdir='${prefix}/etc'
1256 sharedstatedir='${prefix}/com'
1257 localstatedir='${prefix}/var'
1258 includedir='${prefix}/include'
1259 oldincludedir='/usr/include'
1260 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1261 infodir='${datarootdir}/info'
1262 htmldir='${docdir}'
1263 dvidir='${docdir}'
1264 pdfdir='${docdir}'
1265 psdir='${docdir}'
1266 libdir='${exec_prefix}/lib'
1267 localedir='${datarootdir}/locale'
1268 mandir='${datarootdir}/man'
1269 
1270 ac_prev=
1271 ac_dashdash=
1272 for ac_option
1273 do
1274   # If the previous option needs an argument, assign it.
1275   if test -n "$ac_prev"; then
1276     eval $ac_prev=\$ac_option
1277     ac_prev=
1278     continue
1279   fi
1280 
1281   case $ac_option in
1282   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1283   *=)   ac_optarg= ;;
1284   *)    ac_optarg=yes ;;
1285   esac
1286 
1287   # Accept the important Cygnus configure options, so we can diagnose typos.
1288 
1289   case $ac_dashdash$ac_option in
1290   --)
1291     ac_dashdash=yes ;;
1292 
1293   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1294     ac_prev=bindir ;;
1295   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1296     bindir=$ac_optarg ;;
1297 
1298   -build | --build | --buil | --bui | --bu)
1299     ac_prev=build_alias ;;
1300   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1301     build_alias=$ac_optarg ;;
1302 
1303   -cache-file | --cache-file | --cache-fil | --cache-fi \
1304   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1305     ac_prev=cache_file ;;
1306   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1307   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1308     cache_file=$ac_optarg ;;
1309 
1310   --config-cache | -C)
1311     cache_file=config.cache ;;
1312 
1313   -datadir | --datadir | --datadi | --datad)
1314     ac_prev=datadir ;;
1315   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1316     datadir=$ac_optarg ;;
1317 
1318   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1319   | --dataroo | --dataro | --datar)
1320     ac_prev=datarootdir ;;
1321   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1322   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1323     datarootdir=$ac_optarg ;;
1324 
1325   -disable-* | --disable-*)
1326     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1327     # Reject names that are not valid shell variable names.
1328     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1329       as_fn_error $? "invalid feature name: $ac_useropt"
1330     ac_useropt_orig=$ac_useropt
1331     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1332     case $ac_user_opts in
1333       *"
1334 "enable_$ac_useropt"
1335 "*) ;;
1336       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1337          ac_unrecognized_sep=', ';;
1338     esac
1339     eval enable_$ac_useropt=no ;;
1340 
1341   -docdir | --docdir | --docdi | --doc | --do)
1342     ac_prev=docdir ;;
1343   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1344     docdir=$ac_optarg ;;
1345 
1346   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1347     ac_prev=dvidir ;;
1348   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1349     dvidir=$ac_optarg ;;
1350 
1351   -enable-* | --enable-*)
1352     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1353     # Reject names that are not valid shell variable names.
1354     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1355       as_fn_error $? "invalid feature name: $ac_useropt"
1356     ac_useropt_orig=$ac_useropt
1357     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1358     case $ac_user_opts in
1359       *"
1360 "enable_$ac_useropt"
1361 "*) ;;
1362       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1363          ac_unrecognized_sep=', ';;
1364     esac
1365     eval enable_$ac_useropt=\$ac_optarg ;;
1366 
1367   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1368   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1369   | --exec | --exe | --ex)
1370     ac_prev=exec_prefix ;;
1371   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1372   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1373   | --exec=* | --exe=* | --ex=*)
1374     exec_prefix=$ac_optarg ;;
1375 
1376   -gas | --gas | --ga | --g)
1377     # Obsolete; use --with-gas.
1378     with_gas=yes ;;
1379 
1380   -help | --help | --hel | --he | -h)
1381     ac_init_help=long ;;
1382   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1383     ac_init_help=recursive ;;
1384   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1385     ac_init_help=short ;;
1386 
1387   -host | --host | --hos | --ho)
1388     ac_prev=host_alias ;;
1389   -host=* | --host=* | --hos=* | --ho=*)
1390     host_alias=$ac_optarg ;;
1391 
1392   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1393     ac_prev=htmldir ;;
1394   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1395   | --ht=*)
1396     htmldir=$ac_optarg ;;
1397 
1398   -includedir | --includedir | --includedi | --included | --include \
1399   | --includ | --inclu | --incl | --inc)
1400     ac_prev=includedir ;;
1401   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1402   | --includ=* | --inclu=* | --incl=* | --inc=*)
1403     includedir=$ac_optarg ;;
1404 
1405   -infodir | --infodir | --infodi | --infod | --info | --inf)
1406     ac_prev=infodir ;;
1407   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1408     infodir=$ac_optarg ;;
1409 
1410   -libdir | --libdir | --libdi | --libd)
1411     ac_prev=libdir ;;
1412   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1413     libdir=$ac_optarg ;;
1414 
1415   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1416   | --libexe | --libex | --libe)
1417     ac_prev=libexecdir ;;
1418   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1419   | --libexe=* | --libex=* | --libe=*)
1420     libexecdir=$ac_optarg ;;
1421 
1422   -localedir | --localedir | --localedi | --localed | --locale)
1423     ac_prev=localedir ;;
1424   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1425     localedir=$ac_optarg ;;
1426 
1427   -localstatedir | --localstatedir | --localstatedi | --localstated \
1428   | --localstate | --localstat | --localsta | --localst | --locals)
1429     ac_prev=localstatedir ;;
1430   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1431   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1432     localstatedir=$ac_optarg ;;
1433 
1434   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1435     ac_prev=mandir ;;
1436   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1437     mandir=$ac_optarg ;;
1438 
1439   -nfp | --nfp | --nf)
1440     # Obsolete; use --without-fp.
1441     with_fp=no ;;
1442 
1443   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1444   | --no-cr | --no-c | -n)
1445     no_create=yes ;;
1446 
1447   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1448   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1449     no_recursion=yes ;;
1450 
1451   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1452   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1453   | --oldin | --oldi | --old | --ol | --o)
1454     ac_prev=oldincludedir ;;
1455   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1456   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1457   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1458     oldincludedir=$ac_optarg ;;
1459 
1460   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1461     ac_prev=prefix ;;
1462   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1463     prefix=$ac_optarg ;;
1464 
1465   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1466   | --program-pre | --program-pr | --program-p)
1467     ac_prev=program_prefix ;;
1468   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1469   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1470     program_prefix=$ac_optarg ;;
1471 
1472   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1473   | --program-suf | --program-su | --program-s)
1474     ac_prev=program_suffix ;;
1475   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1476   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1477     program_suffix=$ac_optarg ;;
1478 
1479   -program-transform-name | --program-transform-name \
1480   | --program-transform-nam | --program-transform-na \
1481   | --program-transform-n | --program-transform- \
1482   | --program-transform | --program-transfor \
1483   | --program-transfo | --program-transf \
1484   | --program-trans | --program-tran \
1485   | --progr-tra | --program-tr | --program-t)
1486     ac_prev=program_transform_name ;;
1487   -program-transform-name=* | --program-transform-name=* \
1488   | --program-transform-nam=* | --program-transform-na=* \
1489   | --program-transform-n=* | --program-transform-=* \
1490   | --program-transform=* | --program-transfor=* \
1491   | --program-transfo=* | --program-transf=* \
1492   | --program-trans=* | --program-tran=* \
1493   | --progr-tra=* | --program-tr=* | --program-t=*)
1494     program_transform_name=$ac_optarg ;;
1495 
1496   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1497     ac_prev=pdfdir ;;
1498   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1499     pdfdir=$ac_optarg ;;
1500 
1501   -psdir | --psdir | --psdi | --psd | --ps)
1502     ac_prev=psdir ;;
1503   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1504     psdir=$ac_optarg ;;
1505 
1506   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1507   | -silent | --silent | --silen | --sile | --sil)
1508     silent=yes ;;
1509 
1510   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1511     ac_prev=sbindir ;;
1512   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1513   | --sbi=* | --sb=*)
1514     sbindir=$ac_optarg ;;
1515 
1516   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1517   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1518   | --sharedst | --shareds | --shared | --share | --shar \
1519   | --sha | --sh)
1520     ac_prev=sharedstatedir ;;
1521   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1522   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1523   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1524   | --sha=* | --sh=*)
1525     sharedstatedir=$ac_optarg ;;
1526 
1527   -site | --site | --sit)
1528     ac_prev=site ;;
1529   -site=* | --site=* | --sit=*)
1530     site=$ac_optarg ;;
1531 
1532   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1533     ac_prev=srcdir ;;
1534   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1535     srcdir=$ac_optarg ;;
1536 
1537   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1538   | --syscon | --sysco | --sysc | --sys | --sy)
1539     ac_prev=sysconfdir ;;
1540   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1541   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1542     sysconfdir=$ac_optarg ;;
1543 
1544   -target | --target | --targe | --targ | --tar | --ta | --t)
1545     ac_prev=target_alias ;;
1546   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1547     target_alias=$ac_optarg ;;
1548 
1549   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1550     verbose=yes ;;
1551 
1552   -version | --version | --versio | --versi | --vers | -V)
1553     ac_init_version=: ;;
1554 
1555   -with-* | --with-*)
1556     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1557     # Reject names that are not valid shell variable names.
1558     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1559       as_fn_error $? "invalid package name: $ac_useropt"
1560     ac_useropt_orig=$ac_useropt
1561     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1562     case $ac_user_opts in
1563       *"
1564 "with_$ac_useropt"
1565 "*) ;;
1566       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1567          ac_unrecognized_sep=', ';;
1568     esac
1569     eval with_$ac_useropt=\$ac_optarg ;;
1570 
1571   -without-* | --without-*)
1572     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1573     # Reject names that are not valid shell variable names.
1574     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1575       as_fn_error $? "invalid package name: $ac_useropt"
1576     ac_useropt_orig=$ac_useropt
1577     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1578     case $ac_user_opts in
1579       *"
1580 "with_$ac_useropt"
1581 "*) ;;
1582       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1583          ac_unrecognized_sep=', ';;
1584     esac
1585     eval with_$ac_useropt=no ;;
1586 
1587   --x)
1588     # Obsolete; use --with-x.
1589     with_x=yes ;;
1590 
1591   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1592   | --x-incl | --x-inc | --x-in | --x-i)
1593     ac_prev=x_includes ;;
1594   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1595   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1596     x_includes=$ac_optarg ;;
1597 
1598   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1599   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1600     ac_prev=x_libraries ;;
1601   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1602   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1603     x_libraries=$ac_optarg ;;
1604 
1605   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1606 Try \`$0 --help' for more information"
1607     ;;
1608 
1609   *=*)
1610     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1611     # Reject names that are not valid shell variable names.
1612     case $ac_envvar in #(
1613       '' | [0-9]* | *[!_$as_cr_alnum]* )
1614       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1615     esac
1616     eval $ac_envvar=\$ac_optarg
1617     export $ac_envvar ;;
1618 
1619   *)
1620     # FIXME: should be removed in autoconf 3.0.
1621     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1622     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1623       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1624     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1625     ;;
1626 
1627   esac
1628 done
1629 
1630 if test -n "$ac_prev"; then
1631   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1632   as_fn_error $? "missing argument to $ac_option"
1633 fi
1634 
1635 if test -n "$ac_unrecognized_opts"; then
1636   case $enable_option_checking in
1637     no) ;;
1638     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1639     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1640   esac
1641 fi
1642 
1643 # Check all directory arguments for consistency.
1644 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1645                 datadir sysconfdir sharedstatedir localstatedir includedir \
1646                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1647                 libdir localedir mandir
1648 do
1649   eval ac_val=\$$ac_var
1650   # Remove trailing slashes.
1651   case $ac_val in
1652     */ )
1653       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1654       eval $ac_var=\$ac_val;;
1655   esac
1656   # Be sure to have absolute directory names.
1657   case $ac_val in
1658     [\\/$]* | ?:[\\/]* )  continue;;
1659     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1660   esac
1661   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1662 done
1663 
1664 # There might be people who depend on the old broken behavior: `$host'
1665 # used to hold the argument of --host etc.
1666 # FIXME: To remove some day.
1667 build=$build_alias
1668 host=$host_alias
1669 target=$target_alias
1670 
1671 # FIXME: To remove some day.
1672 if test "x$host_alias" != x; then
1673   if test "x$build_alias" = x; then
1674     cross_compiling=maybe
1675   elif test "x$build_alias" != "x$host_alias"; then
1676     cross_compiling=yes
1677   fi
1678 fi
1679 
1680 ac_tool_prefix=
1681 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1682 
1683 test "$silent" = yes && exec 6>/dev/null
1684 
1685 
1686 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1687 ac_ls_di=`ls -di .` &&
1688 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1689   as_fn_error $? "working directory cannot be determined"
1690 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1691   as_fn_error $? "pwd does not report name of working directory"
1692 
1693 
1694 # Find the source files, if location was not specified.
1695 if test -z "$srcdir"; then
1696   ac_srcdir_defaulted=yes
1697   # Try the directory containing this script, then the parent directory.
1698   ac_confdir=`$as_dirname -- "$as_myself" ||
1699 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1700          X"$as_myself" : 'X\(//\)[^/]' \| \
1701          X"$as_myself" : 'X\(//\)$' \| \
1702          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1703 $as_echo X"$as_myself" |
1704     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1705             s//\1/
1706             q
1707           }
1708           /^X\(\/\/\)[^/].*/{
1709             s//\1/
1710             q
1711           }
1712           /^X\(\/\/\)$/{
1713             s//\1/
1714             q
1715           }
1716           /^X\(\/\).*/{
1717             s//\1/
1718             q
1719           }
1720           s/.*/./; q'`
1721   srcdir=$ac_confdir
1722   if test ! -r "$srcdir/$ac_unique_file"; then
1723     srcdir=..
1724   fi
1725 else
1726   ac_srcdir_defaulted=no
1727 fi
1728 if test ! -r "$srcdir/$ac_unique_file"; then
1729   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1730   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1731 fi
1732 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1733 ac_abs_confdir=`(
1734         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1735         pwd)`
1736 # When building in place, set srcdir=.
1737 if test "$ac_abs_confdir" = "$ac_pwd"; then
1738   srcdir=.
1739 fi
1740 # Remove unnecessary trailing slashes from srcdir.
1741 # Double slashes in file names in object file debugging info
1742 # mess up M-x gdb in Emacs.
1743 case $srcdir in
1744 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1745 esac
1746 for ac_var in $ac_precious_vars; do
1747   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1748   eval ac_env_${ac_var}_value=\$${ac_var}
1749   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1750   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1751 done
1752 
1753 #
1754 # Report the --help message.
1755 #
1756 if test "$ac_init_help" = "long"; then
1757   # Omit some internal or obsolete options to make the list less imposing.
1758   # This message is too long to be a string in the A/UX 3.1 sh.
1759   cat <<_ACEOF
1760 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1761 
1762 Usage: $0 [OPTION]... [VAR=VALUE]...
1763 
1764 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1765 VAR=VALUE.  See below for descriptions of some of the useful variables.
1766 
1767 Defaults for the options are specified in brackets.
1768 
1769 Configuration:
1770   -h, --help              display this help and exit
1771       --help=short        display options specific to this package
1772       --help=recursive    display the short help of all the included packages
1773   -V, --version           display version information and exit
1774   -q, --quiet, --silent   do not print \`checking ...' messages
1775       --cache-file=FILE   cache test results in FILE [disabled]
1776   -C, --config-cache      alias for \`--cache-file=config.cache'
1777   -n, --no-create         do not create output files
1778       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1779 
1780 Installation directories:
1781   --prefix=PREFIX         install architecture-independent files in PREFIX
1782                           [$ac_default_prefix]
1783   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1784                           [PREFIX]
1785 
1786 By default, \`make install' will install all the files in
1787 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1788 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1789 for instance \`--prefix=\$HOME'.
1790 
1791 For better control, use the options below.
1792 
1793 Fine tuning of the installation directories:
1794   --bindir=DIR            user executables [EPREFIX/bin]
1795   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1796   --libexecdir=DIR        program executables [EPREFIX/libexec]
1797   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1798   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1799   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1800   --libdir=DIR            object code libraries [EPREFIX/lib]
1801   --includedir=DIR        C header files [PREFIX/include]
1802   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1803   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1804   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1805   --infodir=DIR           info documentation [DATAROOTDIR/info]
1806   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1807   --mandir=DIR            man documentation [DATAROOTDIR/man]
1808   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1809   --htmldir=DIR           html documentation [DOCDIR]
1810   --dvidir=DIR            dvi documentation [DOCDIR]
1811   --pdfdir=DIR            pdf documentation [DOCDIR]
1812   --psdir=DIR             ps documentation [DOCDIR]
1813 _ACEOF
1814 
1815   cat <<\_ACEOF
1816 
1817 X features:
1818   --x-includes=DIR    X include files are in DIR
1819   --x-libraries=DIR   X library files are in DIR
1820 
1821 System types:
1822   --build=BUILD     configure for building on BUILD [guessed]
1823   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1824   --target=TARGET   configure for building compilers for TARGET [HOST]
1825 _ACEOF
1826 fi
1827 
1828 if test -n "$ac_init_help"; then
1829   case $ac_init_help in
1830      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1831    esac
1832   cat <<\_ACEOF
1833 
1834 Optional Features:
1835   --disable-option-checking  ignore unrecognized --enable/--with options
1836   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1837   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1838   --enable-openjdk-only   suppress building custom source even if present
1839                           [disabled]
1840   --enable-debug          set the debug level to fastdebug (shorthand for
1841                           --with-debug-level=fastdebug) [disabled]
1842   --disable-headful       disable building headful support (graphical UI
1843                           support) [enabled]
1844   --enable-hotspot-test-in-build
1845                           run the Queens test after Hotspot build [disabled]
1846   --enable-unlimited-crypto
1847                           Enable unlimited crypto policy [disabled]
1848   --enable-rmiconnector-iiop
1849                           enable the JMX RMIConnector iiop transport
1850                           [disabled]
1851   --disable-debug-symbols disable generation of debug symbols [enabled]
1852   --disable-zip-debug-info
1853                           disable zipping of debug-info files [enabled]
1854   --disable-freetype-bundling
1855                           disable bundling of the freetype library with the
1856                           build result [enabled on Windows or when using
1857                           --with-freetype, disabled otherwise]
1858   --enable-sjavac         use sjavac to do fast incremental compiles
1859                           [disabled]
1860   --disable-precompiled-headers
1861                           disable using precompiled headers when compiling C++
1862                           [enabled]
1863   --enable-ccache         enable using ccache to speed up recompilations
1864                           [disabled]
1865 
1866 Optional Packages:
1867   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1868   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1869   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1870                           support it), e.g. --with-target-bits=32 [guessed]
1871   --with-custom-make-dir  Deprecated. Option is kept for backwards
1872                           compatibility and is ignored
1873   --with-jdk-variant      JDK variant to build (normal) [normal]
1874   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1875   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1876                           client, minimal1, kernel, zero, zeroshark, core)
1877                           [server]
1878   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1879                           optimized (HotSpot build only)) [release]
1880   --with-devkit           use this devkit for compilers, tools and resources
1881   --with-sys-root         alias for --with-sysroot for backwards compatability
1882   --with-sysroot          use this directory as sysroot
1883   --with-tools-dir        alias for --with-toolchain-path for backwards
1884                           compatibility
1885   --with-toolchain-path   prepend these directories when searching for
1886                           toolchain binaries (compilers etc)
1887   --with-extra-path       prepend these directories to the default path
1888   --with-sdk-name         use the platform SDK of the given name. [macosx]
1889   --with-conf-name        use this as the name of the configuration [generated
1890                           from important configuration options]
1891   --with-output-sync      set make output sync type if supported by make.
1892                           [recurse]
1893   --with-builddeps-conf   use this configuration file for the builddeps
1894   --with-builddeps-server download and use build dependencies from this server
1895                           url
1896   --with-builddeps-dir    store downloaded build dependencies here
1897                           [/localhome/builddeps]
1898   --with-builddeps-group  chgrp the downloaded build dependencies to this
1899                           group
1900   --with-cacerts-file     specify alternative cacerts file
1901   --with-milestone        Set milestone value for build [internal]
1902   --with-update-version   Set update version value for build [b00]
1903   --with-user-release-suffix
1904                           Add a custom string to the version string if build
1905                           number is not set.[username_builddateb00]
1906   --with-build-number     Set build number value for build [b00]
1907   --with-copyright-year   Set copyright year value for build [current year]
1908   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1909   --with-add-source-root  for each and every source directory, look in this
1910                           additional source root for the same directory; if it
1911                           exists and have files in it, include it in the build
1912   --with-override-source-root
1913                           for each and every source directory, look in this
1914                           override source root for the same directory; if it
1915                           exists, use that directory instead and ignore the
1916                           directory in the original source root
1917   --with-adds-and-overrides
1918                           use the subdirs 'adds' and 'overrides' in the
1919                           specified directory as add-source-root and
1920                           override-source-root
1921   --with-override-langtools
1922                           use this langtools dir for the build
1923   --with-override-corba   use this corba dir for the build
1924   --with-override-jaxp    use this jaxp dir for the build
1925   --with-override-jaxws   use this jaxws dir for the build
1926   --with-override-hotspot use this hotspot dir for the build
1927   --with-override-nashorn use this nashorn dir for the build
1928   --with-override-jdk     use this jdk dir for the build
1929   --with-import-hotspot   import hotspot binaries from this jdk image or
1930                           hotspot build dist dir instead of building from
1931                           source
1932   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1933                           to show possible values [platform dependent]
1934   --with-jtreg            Regression Test Harness [probed]
1935   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1936   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1937   --with-extra-ldflags    extra flags to be used when linking jdk
1938   --with-x                use the X Window System
1939   --with-cups             specify prefix directory for the cups package
1940                           (expecting the headers under PATH/include)
1941   --with-cups-include     specify directory for the cups include files
1942   --with-freetype         specify prefix directory for the freetype package
1943                           (expecting the libraries under PATH/lib and the
1944                           headers under PATH/include)
1945   --with-freetype-include specify directory for the freetype include files
1946   --with-freetype-lib     specify directory for the freetype library
1947   --with-freetype-src     specify directory with freetype sources to
1948                           automatically build the library (experimental,
1949                           Windows-only)
1950   --with-alsa             specify prefix directory for the alsa package
1951                           (expecting the libraries under PATH/lib and the
1952                           headers under PATH/include)
1953   --with-alsa-include     specify directory for the alsa include files
1954   --with-alsa-lib         specify directory for the alsa library
1955   --with-libjpeg          use libjpeg from build system or OpenJDK source
1956                           (system, bundled) [bundled]
1957   --with-giflib           use giflib from build system or OpenJDK source
1958                           (system, bundled) [bundled]
1959   --with-lcms             use lcms2 from build system or OpenJDK source
1960                           (system, bundled) [bundled]
1961   --with-libpng           use libpng from build system or OpenJDK source
1962                           (system, bundled) [bundled]
1963   --with-zlib             use zlib from build system or OpenJDK source
1964                           (system, bundled) [bundled]
1965   --with-stdc++lib=<static>,<dynamic>,<default>
1966                           force linking of the C++ runtime on Linux to either
1967                           static or dynamic, default is static with dynamic as
1968                           fallback
1969   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1970                           only) [probed]
1971   --with-dxsdk            Deprecated. Option is kept for backwards
1972                           compatibility and is ignored
1973   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1974                           compatibility and is ignored
1975   --with-dxsdk-include    Deprecated. Option is kept for backwards
1976                           compatibility and is ignored
1977   --with-num-cores        number of cores in the build system, e.g.
1978                           --with-num-cores=8 [probed]
1979   --with-memory-size      memory (in MB) available in the build system, e.g.
1980                           --with-memory-size=1024 [probed]
1981   --with-jobs             number of parallel jobs to let make run [calculated
1982                           based on cores and memory]
1983   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1984                           invocations of boot JDK, overriding the default
1985                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1986                           -enableassertions"
1987   --with-sjavac-server-java
1988                           use this java binary for running the sjavac
1989                           background server [Boot JDK java]
1990   --with-ccache-dir       where to store ccache files [~/.ccache]
1991 
1992 Some influential environment variables:
1993   BASENAME    Override default value for BASENAME
1994   BASH        Override default value for BASH
1995   CAT         Override default value for CAT
1996   CHMOD       Override default value for CHMOD
1997   CMP         Override default value for CMP
1998   COMM        Override default value for COMM
1999   CP          Override default value for CP
2000   CUT         Override default value for CUT
2001   DATE        Override default value for DATE
2002   DIFF        Override default value for DIFF
2003   DIRNAME     Override default value for DIRNAME
2004   ECHO        Override default value for ECHO
2005   EXPR        Override default value for EXPR
2006   FILE        Override default value for FILE
2007   FIND        Override default value for FIND
2008   HEAD        Override default value for HEAD
2009   LN          Override default value for LN
2010   LS          Override default value for LS
2011   MKDIR       Override default value for MKDIR
2012   MKTEMP      Override default value for MKTEMP
2013   MV          Override default value for MV
2014   NAWK        Override default value for NAWK
2015   PRINTF      Override default value for PRINTF
2016   RM          Override default value for RM
2017   SH          Override default value for SH
2018   SORT        Override default value for SORT
2019   TAIL        Override default value for TAIL
2020   TAR         Override default value for TAR
2021   TEE         Override default value for TEE
2022   TOUCH       Override default value for TOUCH
2023   TR          Override default value for TR
2024   UNAME       Override default value for UNAME
2025   UNIQ        Override default value for UNIQ
2026   WC          Override default value for WC
2027   WHICH       Override default value for WHICH
2028   XARGS       Override default value for XARGS
2029   AWK         Override default value for AWK
2030   GREP        Override default value for GREP
2031   EGREP       Override default value for EGREP
2032   FGREP       Override default value for FGREP
2033   SED         Override default value for SED
2034   CYGPATH     Override default value for CYGPATH
2035   READLINK    Override default value for READLINK
2036   DF          Override default value for DF
2037   SETFILE     Override default value for SETFILE
2038   CPIO        Override default value for CPIO
2039   UNZIP       Override default value for UNZIP
2040   ZIP         Override default value for ZIP
2041   LDD         Override default value for LDD
2042   OTOOL       Override default value for OTOOL
2043   READELF     Override default value for READELF
2044   HG          Override default value for HG
2045   STAT        Override default value for STAT
2046   TIME        Override default value for TIME
2047   DSYMUTIL    Override default value for DSYMUTIL
2048   XATTR       Override default value for XATTR
2049   CODESIGN    Override default value for CODESIGN
2050   PKG_CONFIG  path to pkg-config utility
2051   JAVA        Override default value for JAVA
2052   JAVAC       Override default value for JAVAC
2053   JAVAH       Override default value for JAVAH
2054   JAR         Override default value for JAR
2055   NATIVE2ASCII
2056               Override default value for NATIVE2ASCII
2057   JARSIGNER   Override default value for JARSIGNER
2058   CC          C compiler command
2059   CFLAGS      C compiler flags
2060   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2061               nonstandard directory <lib dir>
2062   LIBS        libraries to pass to the linker, e.g. -l<library>
2063   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2064               you have headers in a nonstandard directory <include dir>
2065   CXX         C++ compiler command
2066   CXXFLAGS    C++ compiler flags
2067   CPP         C preprocessor
2068   CXXCPP      C++ preprocessor
2069   AS          Override default value for AS
2070   AR          Override default value for AR
2071   OBJC        Objective C compiler command
2072   OBJCFLAGS   Objective C compiler flags
2073   LIPO        Override default value for LIPO
2074   STRIP       Override default value for STRIP
2075   NM          Override default value for NM
2076   GNM         Override default value for GNM
2077   MCS         Override default value for MCS
2078   OBJCOPY     Override default value for OBJCOPY
2079   OBJDUMP     Override default value for OBJDUMP
2080   BUILD_CC    Override default value for BUILD_CC
2081   BUILD_CXX   Override default value for BUILD_CXX
2082   BUILD_LD    Override default value for BUILD_LD
2083   JTREGEXE    Override default value for JTREGEXE
2084   XMKMF       Path to xmkmf, Makefile generator for X Window System
2085   FREETYPE_CFLAGS
2086               C compiler flags for FREETYPE, overriding pkg-config
2087   FREETYPE_LIBS
2088               linker flags for FREETYPE, overriding pkg-config
2089   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2090   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2091   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2092   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2093   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2094   PNG_LIBS    linker flags for PNG, overriding pkg-config
2095   LIBFFI_CFLAGS
2096               C compiler flags for LIBFFI, overriding pkg-config
2097   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2098   CCACHE      Override default value for CCACHE
2099 
2100 Use these variables to override the choices made by `configure' or to help
2101 it to find libraries and programs with nonstandard names/locations.
2102 
2103 Report bugs to <build-dev@openjdk.java.net>.
2104 OpenJDK home page: <http://openjdk.java.net>.
2105 _ACEOF
2106 ac_status=$?
2107 fi
2108 
2109 if test "$ac_init_help" = "recursive"; then
2110   # If there are subdirs, report their specific --help.
2111   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2112     test -d "$ac_dir" ||
2113       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2114       continue
2115     ac_builddir=.
2116 
2117 case "$ac_dir" in
2118 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2119 *)
2120   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2121   # A ".." for each directory in $ac_dir_suffix.
2122   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2123   case $ac_top_builddir_sub in
2124   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2125   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2126   esac ;;
2127 esac
2128 ac_abs_top_builddir=$ac_pwd
2129 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2130 # for backward compatibility:
2131 ac_top_builddir=$ac_top_build_prefix
2132 
2133 case $srcdir in
2134   .)  # We are building in place.
2135     ac_srcdir=.
2136     ac_top_srcdir=$ac_top_builddir_sub
2137     ac_abs_top_srcdir=$ac_pwd ;;
2138   [\\/]* | ?:[\\/]* )  # Absolute name.
2139     ac_srcdir=$srcdir$ac_dir_suffix;
2140     ac_top_srcdir=$srcdir
2141     ac_abs_top_srcdir=$srcdir ;;
2142   *) # Relative name.
2143     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2144     ac_top_srcdir=$ac_top_build_prefix$srcdir
2145     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2146 esac
2147 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2148 
2149     cd "$ac_dir" || { ac_status=$?; continue; }
2150     # Check for guested configure.
2151     if test -f "$ac_srcdir/configure.gnu"; then
2152       echo &&
2153       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2154     elif test -f "$ac_srcdir/configure"; then
2155       echo &&
2156       $SHELL "$ac_srcdir/configure" --help=recursive
2157     else
2158       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2159     fi || ac_status=$?
2160     cd "$ac_pwd" || { ac_status=$?; break; }
2161   done
2162 fi
2163 
2164 test -n "$ac_init_help" && exit $ac_status
2165 if $ac_init_version; then
2166   cat <<\_ACEOF
2167 OpenJDK configure jdk9
2168 generated by GNU Autoconf 2.69
2169 
2170 Copyright (C) 2012 Free Software Foundation, Inc.
2171 This configure script is free software; the Free Software Foundation
2172 gives unlimited permission to copy, distribute and modify it.
2173 _ACEOF
2174   exit
2175 fi
2176 
2177 ## ------------------------ ##
2178 ## Autoconf initialization. ##
2179 ## ------------------------ ##
2180 
2181 # ac_fn_c_try_compile LINENO
2182 # --------------------------
2183 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2184 ac_fn_c_try_compile ()
2185 {
2186   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187   rm -f conftest.$ac_objext
2188   if { { ac_try="$ac_compile"
2189 case "(($ac_try" in
2190   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2191   *) ac_try_echo=$ac_try;;
2192 esac
2193 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2194 $as_echo "$ac_try_echo"; } >&5
2195   (eval "$ac_compile") 2>conftest.err
2196   ac_status=$?
2197   if test -s conftest.err; then
2198     grep -v '^ *+' conftest.err >conftest.er1
2199     cat conftest.er1 >&5
2200     mv -f conftest.er1 conftest.err
2201   fi
2202   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203   test $ac_status = 0; } && {
2204          test -z "$ac_c_werror_flag" ||
2205          test ! -s conftest.err
2206        } && test -s conftest.$ac_objext; then :
2207   ac_retval=0
2208 else
2209   $as_echo "$as_me: failed program was:" >&5
2210 sed 's/^/| /' conftest.$ac_ext >&5
2211 
2212         ac_retval=1
2213 fi
2214   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215   as_fn_set_status $ac_retval
2216 
2217 } # ac_fn_c_try_compile
2218 
2219 # ac_fn_cxx_try_compile LINENO
2220 # ----------------------------
2221 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2222 ac_fn_cxx_try_compile ()
2223 {
2224   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225   rm -f conftest.$ac_objext
2226   if { { ac_try="$ac_compile"
2227 case "(($ac_try" in
2228   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229   *) ac_try_echo=$ac_try;;
2230 esac
2231 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232 $as_echo "$ac_try_echo"; } >&5
2233   (eval "$ac_compile") 2>conftest.err
2234   ac_status=$?
2235   if test -s conftest.err; then
2236     grep -v '^ *+' conftest.err >conftest.er1
2237     cat conftest.er1 >&5
2238     mv -f conftest.er1 conftest.err
2239   fi
2240   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2241   test $ac_status = 0; } && {
2242          test -z "$ac_cxx_werror_flag" ||
2243          test ! -s conftest.err
2244        } && test -s conftest.$ac_objext; then :
2245   ac_retval=0
2246 else
2247   $as_echo "$as_me: failed program was:" >&5
2248 sed 's/^/| /' conftest.$ac_ext >&5
2249 
2250         ac_retval=1
2251 fi
2252   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2253   as_fn_set_status $ac_retval
2254 
2255 } # ac_fn_cxx_try_compile
2256 
2257 # ac_fn_c_try_cpp LINENO
2258 # ----------------------
2259 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2260 ac_fn_c_try_cpp ()
2261 {
2262   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2263   if { { ac_try="$ac_cpp conftest.$ac_ext"
2264 case "(($ac_try" in
2265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2266   *) ac_try_echo=$ac_try;;
2267 esac
2268 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2269 $as_echo "$ac_try_echo"; } >&5
2270   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2271   ac_status=$?
2272   if test -s conftest.err; then
2273     grep -v '^ *+' conftest.err >conftest.er1
2274     cat conftest.er1 >&5
2275     mv -f conftest.er1 conftest.err
2276   fi
2277   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2278   test $ac_status = 0; } > conftest.i && {
2279          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2280          test ! -s conftest.err
2281        }; then :
2282   ac_retval=0
2283 else
2284   $as_echo "$as_me: failed program was:" >&5
2285 sed 's/^/| /' conftest.$ac_ext >&5
2286 
2287     ac_retval=1
2288 fi
2289   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290   as_fn_set_status $ac_retval
2291 
2292 } # ac_fn_c_try_cpp
2293 
2294 # ac_fn_cxx_try_cpp LINENO
2295 # ------------------------
2296 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2297 ac_fn_cxx_try_cpp ()
2298 {
2299   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300   if { { ac_try="$ac_cpp conftest.$ac_ext"
2301 case "(($ac_try" in
2302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303   *) ac_try_echo=$ac_try;;
2304 esac
2305 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306 $as_echo "$ac_try_echo"; } >&5
2307   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2308   ac_status=$?
2309   if test -s conftest.err; then
2310     grep -v '^ *+' conftest.err >conftest.er1
2311     cat conftest.er1 >&5
2312     mv -f conftest.er1 conftest.err
2313   fi
2314   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315   test $ac_status = 0; } > conftest.i && {
2316          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2317          test ! -s conftest.err
2318        }; then :
2319   ac_retval=0
2320 else
2321   $as_echo "$as_me: failed program was:" >&5
2322 sed 's/^/| /' conftest.$ac_ext >&5
2323 
2324     ac_retval=1
2325 fi
2326   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327   as_fn_set_status $ac_retval
2328 
2329 } # ac_fn_cxx_try_cpp
2330 
2331 # ac_fn_objc_try_compile LINENO
2332 # -----------------------------
2333 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2334 ac_fn_objc_try_compile ()
2335 {
2336   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337   rm -f conftest.$ac_objext
2338   if { { ac_try="$ac_compile"
2339 case "(($ac_try" in
2340   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341   *) ac_try_echo=$ac_try;;
2342 esac
2343 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344 $as_echo "$ac_try_echo"; } >&5
2345   (eval "$ac_compile") 2>conftest.err
2346   ac_status=$?
2347   if test -s conftest.err; then
2348     grep -v '^ *+' conftest.err >conftest.er1
2349     cat conftest.er1 >&5
2350     mv -f conftest.er1 conftest.err
2351   fi
2352   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2353   test $ac_status = 0; } && {
2354          test -z "$ac_objc_werror_flag" ||
2355          test ! -s conftest.err
2356        } && test -s conftest.$ac_objext; then :
2357   ac_retval=0
2358 else
2359   $as_echo "$as_me: failed program was:" >&5
2360 sed 's/^/| /' conftest.$ac_ext >&5
2361 
2362         ac_retval=1
2363 fi
2364   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365   as_fn_set_status $ac_retval
2366 
2367 } # ac_fn_objc_try_compile
2368 
2369 # ac_fn_c_try_link LINENO
2370 # -----------------------
2371 # Try to link conftest.$ac_ext, and return whether this succeeded.
2372 ac_fn_c_try_link ()
2373 {
2374   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375   rm -f conftest.$ac_objext conftest$ac_exeext
2376   if { { ac_try="$ac_link"
2377 case "(($ac_try" in
2378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2379   *) ac_try_echo=$ac_try;;
2380 esac
2381 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2382 $as_echo "$ac_try_echo"; } >&5
2383   (eval "$ac_link") 2>conftest.err
2384   ac_status=$?
2385   if test -s conftest.err; then
2386     grep -v '^ *+' conftest.err >conftest.er1
2387     cat conftest.er1 >&5
2388     mv -f conftest.er1 conftest.err
2389   fi
2390   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2391   test $ac_status = 0; } && {
2392          test -z "$ac_c_werror_flag" ||
2393          test ! -s conftest.err
2394        } && test -s conftest$ac_exeext && {
2395          test "$cross_compiling" = yes ||
2396          test -x conftest$ac_exeext
2397        }; then :
2398   ac_retval=0
2399 else
2400   $as_echo "$as_me: failed program was:" >&5
2401 sed 's/^/| /' conftest.$ac_ext >&5
2402 
2403         ac_retval=1
2404 fi
2405   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2406   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2407   # interfere with the next link command; also delete a directory that is
2408   # left behind by Apple's compiler.  We do this before executing the actions.
2409   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2410   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2411   as_fn_set_status $ac_retval
2412 
2413 } # ac_fn_c_try_link
2414 
2415 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2416 # ---------------------------------------------------------
2417 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2418 # the include files in INCLUDES and setting the cache variable VAR
2419 # accordingly.
2420 ac_fn_cxx_check_header_mongrel ()
2421 {
2422   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423   if eval \${$3+:} false; then :
2424   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2425 $as_echo_n "checking for $2... " >&6; }
2426 if eval \${$3+:} false; then :
2427   $as_echo_n "(cached) " >&6
2428 fi
2429 eval ac_res=\$$3
2430                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431 $as_echo "$ac_res" >&6; }
2432 else
2433   # Is the header compilable?
2434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2435 $as_echo_n "checking $2 usability... " >&6; }
2436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437 /* end confdefs.h.  */
2438 $4
2439 #include <$2>
2440 _ACEOF
2441 if ac_fn_cxx_try_compile "$LINENO"; then :
2442   ac_header_compiler=yes
2443 else
2444   ac_header_compiler=no
2445 fi
2446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2448 $as_echo "$ac_header_compiler" >&6; }
2449 
2450 # Is the header present?
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2452 $as_echo_n "checking $2 presence... " >&6; }
2453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454 /* end confdefs.h.  */
2455 #include <$2>
2456 _ACEOF
2457 if ac_fn_cxx_try_cpp "$LINENO"; then :
2458   ac_header_preproc=yes
2459 else
2460   ac_header_preproc=no
2461 fi
2462 rm -f conftest.err conftest.i conftest.$ac_ext
2463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2464 $as_echo "$ac_header_preproc" >&6; }
2465 
2466 # So?  What about this header?
2467 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2468   yes:no: )
2469     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2470 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2471     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2472 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2473     ;;
2474   no:yes:* )
2475     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2476 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2477     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2478 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2479     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2480 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2481     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2482 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2483     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2484 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2485 ( $as_echo "## ----------------------------------------- ##
2486 ## Report this to build-dev@openjdk.java.net ##
2487 ## ----------------------------------------- ##"
2488      ) | sed "s/^/$as_me: WARNING:     /" >&2
2489     ;;
2490 esac
2491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2492 $as_echo_n "checking for $2... " >&6; }
2493 if eval \${$3+:} false; then :
2494   $as_echo_n "(cached) " >&6
2495 else
2496   eval "$3=\$ac_header_compiler"
2497 fi
2498 eval ac_res=\$$3
2499                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2500 $as_echo "$ac_res" >&6; }
2501 fi
2502   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503 
2504 } # ac_fn_cxx_check_header_mongrel
2505 
2506 # ac_fn_cxx_try_run LINENO
2507 # ------------------------
2508 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2509 # that executables *can* be run.
2510 ac_fn_cxx_try_run ()
2511 {
2512   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513   if { { ac_try="$ac_link"
2514 case "(($ac_try" in
2515   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2516   *) ac_try_echo=$ac_try;;
2517 esac
2518 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2519 $as_echo "$ac_try_echo"; } >&5
2520   (eval "$ac_link") 2>&5
2521   ac_status=$?
2522   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2524   { { case "(($ac_try" in
2525   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2526   *) ac_try_echo=$ac_try;;
2527 esac
2528 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2529 $as_echo "$ac_try_echo"; } >&5
2530   (eval "$ac_try") 2>&5
2531   ac_status=$?
2532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533   test $ac_status = 0; }; }; then :
2534   ac_retval=0
2535 else
2536   $as_echo "$as_me: program exited with status $ac_status" >&5
2537        $as_echo "$as_me: failed program was:" >&5
2538 sed 's/^/| /' conftest.$ac_ext >&5
2539 
2540        ac_retval=$ac_status
2541 fi
2542   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2543   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2544   as_fn_set_status $ac_retval
2545 
2546 } # ac_fn_cxx_try_run
2547 
2548 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2549 # ---------------------------------------------------------
2550 # Tests whether HEADER exists and can be compiled using the include files in
2551 # INCLUDES, setting the cache variable VAR accordingly.
2552 ac_fn_cxx_check_header_compile ()
2553 {
2554   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2556 $as_echo_n "checking for $2... " >&6; }
2557 if eval \${$3+:} false; then :
2558   $as_echo_n "(cached) " >&6
2559 else
2560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561 /* end confdefs.h.  */
2562 $4
2563 #include <$2>
2564 _ACEOF
2565 if ac_fn_cxx_try_compile "$LINENO"; then :
2566   eval "$3=yes"
2567 else
2568   eval "$3=no"
2569 fi
2570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2571 fi
2572 eval ac_res=\$$3
2573                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2574 $as_echo "$ac_res" >&6; }
2575   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576 
2577 } # ac_fn_cxx_check_header_compile
2578 
2579 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2580 # ----------------------------------------------
2581 # Tries to find the compile-time value of EXPR in a program that includes
2582 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2583 # computed
2584 ac_fn_cxx_compute_int ()
2585 {
2586   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587   if test "$cross_compiling" = yes; then
2588     # Depending upon the size, compute the lo and hi bounds.
2589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590 /* end confdefs.h.  */
2591 $4
2592 int
2593 main ()
2594 {
2595 static int test_array [1 - 2 * !(($2) >= 0)];
2596 test_array [0] = 0;
2597 return test_array [0];
2598 
2599   ;
2600   return 0;
2601 }
2602 _ACEOF
2603 if ac_fn_cxx_try_compile "$LINENO"; then :
2604   ac_lo=0 ac_mid=0
2605   while :; do
2606     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607 /* end confdefs.h.  */
2608 $4
2609 int
2610 main ()
2611 {
2612 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2613 test_array [0] = 0;
2614 return test_array [0];
2615 
2616   ;
2617   return 0;
2618 }
2619 _ACEOF
2620 if ac_fn_cxx_try_compile "$LINENO"; then :
2621   ac_hi=$ac_mid; break
2622 else
2623   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2624                         if test $ac_lo -le $ac_mid; then
2625                           ac_lo= ac_hi=
2626                           break
2627                         fi
2628                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2629 fi
2630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2631   done
2632 else
2633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634 /* end confdefs.h.  */
2635 $4
2636 int
2637 main ()
2638 {
2639 static int test_array [1 - 2 * !(($2) < 0)];
2640 test_array [0] = 0;
2641 return test_array [0];
2642 
2643   ;
2644   return 0;
2645 }
2646 _ACEOF
2647 if ac_fn_cxx_try_compile "$LINENO"; then :
2648   ac_hi=-1 ac_mid=-1
2649   while :; do
2650     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651 /* end confdefs.h.  */
2652 $4
2653 int
2654 main ()
2655 {
2656 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2657 test_array [0] = 0;
2658 return test_array [0];
2659 
2660   ;
2661   return 0;
2662 }
2663 _ACEOF
2664 if ac_fn_cxx_try_compile "$LINENO"; then :
2665   ac_lo=$ac_mid; break
2666 else
2667   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2668                         if test $ac_mid -le $ac_hi; then
2669                           ac_lo= ac_hi=
2670                           break
2671                         fi
2672                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2673 fi
2674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675   done
2676 else
2677   ac_lo= ac_hi=
2678 fi
2679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680 fi
2681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682 # Binary search between lo and hi bounds.
2683 while test "x$ac_lo" != "x$ac_hi"; do
2684   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686 /* end confdefs.h.  */
2687 $4
2688 int
2689 main ()
2690 {
2691 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2692 test_array [0] = 0;
2693 return test_array [0];
2694 
2695   ;
2696   return 0;
2697 }
2698 _ACEOF
2699 if ac_fn_cxx_try_compile "$LINENO"; then :
2700   ac_hi=$ac_mid
2701 else
2702   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2703 fi
2704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2705 done
2706 case $ac_lo in #((
2707 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2708 '') ac_retval=1 ;;
2709 esac
2710   else
2711     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712 /* end confdefs.h.  */
2713 $4
2714 static long int longval () { return $2; }
2715 static unsigned long int ulongval () { return $2; }
2716 #include <stdio.h>
2717 #include <stdlib.h>
2718 int
2719 main ()
2720 {
2721 
2722   FILE *f = fopen ("conftest.val", "w");
2723   if (! f)
2724     return 1;
2725   if (($2) < 0)
2726     {
2727       long int i = longval ();
2728       if (i != ($2))
2729         return 1;
2730       fprintf (f, "%ld", i);
2731     }
2732   else
2733     {
2734       unsigned long int i = ulongval ();
2735       if (i != ($2))
2736         return 1;
2737       fprintf (f, "%lu", i);
2738     }
2739   /* Do not output a trailing newline, as this causes \r\n confusion
2740      on some platforms.  */
2741   return ferror (f) || fclose (f) != 0;
2742 
2743   ;
2744   return 0;
2745 }
2746 _ACEOF
2747 if ac_fn_cxx_try_run "$LINENO"; then :
2748   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2749 else
2750   ac_retval=1
2751 fi
2752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2753   conftest.$ac_objext conftest.beam conftest.$ac_ext
2754 rm -f conftest.val
2755 
2756   fi
2757   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2758   as_fn_set_status $ac_retval
2759 
2760 } # ac_fn_cxx_compute_int
2761 
2762 # ac_fn_cxx_try_link LINENO
2763 # -------------------------
2764 # Try to link conftest.$ac_ext, and return whether this succeeded.
2765 ac_fn_cxx_try_link ()
2766 {
2767   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2768   rm -f conftest.$ac_objext conftest$ac_exeext
2769   if { { ac_try="$ac_link"
2770 case "(($ac_try" in
2771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772   *) ac_try_echo=$ac_try;;
2773 esac
2774 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2775 $as_echo "$ac_try_echo"; } >&5
2776   (eval "$ac_link") 2>conftest.err
2777   ac_status=$?
2778   if test -s conftest.err; then
2779     grep -v '^ *+' conftest.err >conftest.er1
2780     cat conftest.er1 >&5
2781     mv -f conftest.er1 conftest.err
2782   fi
2783   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2784   test $ac_status = 0; } && {
2785          test -z "$ac_cxx_werror_flag" ||
2786          test ! -s conftest.err
2787        } && test -s conftest$ac_exeext && {
2788          test "$cross_compiling" = yes ||
2789          test -x conftest$ac_exeext
2790        }; then :
2791   ac_retval=0
2792 else
2793   $as_echo "$as_me: failed program was:" >&5
2794 sed 's/^/| /' conftest.$ac_ext >&5
2795 
2796         ac_retval=1
2797 fi
2798   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2799   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2800   # interfere with the next link command; also delete a directory that is
2801   # left behind by Apple's compiler.  We do this before executing the actions.
2802   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2803   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2804   as_fn_set_status $ac_retval
2805 
2806 } # ac_fn_cxx_try_link
2807 
2808 # ac_fn_cxx_check_func LINENO FUNC VAR
2809 # ------------------------------------
2810 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2811 ac_fn_cxx_check_func ()
2812 {
2813   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2815 $as_echo_n "checking for $2... " >&6; }
2816 if eval \${$3+:} false; then :
2817   $as_echo_n "(cached) " >&6
2818 else
2819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820 /* end confdefs.h.  */
2821 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2822    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2823 #define $2 innocuous_$2
2824 
2825 /* System header to define __stub macros and hopefully few prototypes,
2826     which can conflict with char $2 (); below.
2827     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2828     <limits.h> exists even on freestanding compilers.  */
2829 
2830 #ifdef __STDC__
2831 # include <limits.h>
2832 #else
2833 # include <assert.h>
2834 #endif
2835 
2836 #undef $2
2837 
2838 /* Override any GCC internal prototype to avoid an error.
2839    Use char because int might match the return type of a GCC
2840    builtin and then its argument prototype would still apply.  */
2841 #ifdef __cplusplus
2842 extern "C"
2843 #endif
2844 char $2 ();
2845 /* The GNU C library defines this for functions which it implements
2846     to always fail with ENOSYS.  Some functions are actually named
2847     something starting with __ and the normal name is an alias.  */
2848 #if defined __stub_$2 || defined __stub___$2
2849 choke me
2850 #endif
2851 
2852 int
2853 main ()
2854 {
2855 return $2 ();
2856   ;
2857   return 0;
2858 }
2859 _ACEOF
2860 if ac_fn_cxx_try_link "$LINENO"; then :
2861   eval "$3=yes"
2862 else
2863   eval "$3=no"
2864 fi
2865 rm -f core conftest.err conftest.$ac_objext \
2866     conftest$ac_exeext conftest.$ac_ext
2867 fi
2868 eval ac_res=\$$3
2869                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2870 $as_echo "$ac_res" >&6; }
2871   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2872 
2873 } # ac_fn_cxx_check_func
2874 
2875 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2876 # -------------------------------------------------------
2877 # Tests whether HEADER exists and can be compiled using the include files in
2878 # INCLUDES, setting the cache variable VAR accordingly.
2879 ac_fn_c_check_header_compile ()
2880 {
2881   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2883 $as_echo_n "checking for $2... " >&6; }
2884 if eval \${$3+:} false; then :
2885   $as_echo_n "(cached) " >&6
2886 else
2887   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2888 /* end confdefs.h.  */
2889 $4
2890 #include <$2>
2891 _ACEOF
2892 if ac_fn_c_try_compile "$LINENO"; then :
2893   eval "$3=yes"
2894 else
2895   eval "$3=no"
2896 fi
2897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898 fi
2899 eval ac_res=\$$3
2900                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2901 $as_echo "$ac_res" >&6; }
2902   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2903 
2904 } # ac_fn_c_check_header_compile
2905 cat >config.log <<_ACEOF
2906 This file contains any messages produced by compilers while
2907 running configure, to aid debugging if configure makes a mistake.
2908 
2909 It was created by OpenJDK $as_me jdk9, which was
2910 generated by GNU Autoconf 2.69.  Invocation command line was
2911 
2912   $ $0 $@
2913 
2914 _ACEOF
2915 exec 5>>config.log
2916 {
2917 cat <<_ASUNAME
2918 ## --------- ##
2919 ## Platform. ##
2920 ## --------- ##
2921 
2922 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2923 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2924 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2925 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2926 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2927 
2928 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2929 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2930 
2931 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2932 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2933 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2934 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2935 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2936 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2937 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2938 
2939 _ASUNAME
2940 
2941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942 for as_dir in $PATH
2943 do
2944   IFS=$as_save_IFS
2945   test -z "$as_dir" && as_dir=.
2946     $as_echo "PATH: $as_dir"
2947   done
2948 IFS=$as_save_IFS
2949 
2950 } >&5
2951 
2952 cat >&5 <<_ACEOF
2953 
2954 
2955 ## ----------- ##
2956 ## Core tests. ##
2957 ## ----------- ##
2958 
2959 _ACEOF
2960 
2961 
2962 # Keep a trace of the command line.
2963 # Strip out --no-create and --no-recursion so they do not pile up.
2964 # Strip out --silent because we don't want to record it for future runs.
2965 # Also quote any args containing shell meta-characters.
2966 # Make two passes to allow for proper duplicate-argument suppression.
2967 ac_configure_args=
2968 ac_configure_args0=
2969 ac_configure_args1=
2970 ac_must_keep_next=false
2971 for ac_pass in 1 2
2972 do
2973   for ac_arg
2974   do
2975     case $ac_arg in
2976     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2977     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2978     | -silent | --silent | --silen | --sile | --sil)
2979       continue ;;
2980     *\'*)
2981       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2982     esac
2983     case $ac_pass in
2984     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2985     2)
2986       as_fn_append ac_configure_args1 " '$ac_arg'"
2987       if test $ac_must_keep_next = true; then
2988         ac_must_keep_next=false # Got value, back to normal.
2989       else
2990         case $ac_arg in
2991           *=* | --config-cache | -C | -disable-* | --disable-* \
2992           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2993           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2994           | -with-* | --with-* | -without-* | --without-* | --x)
2995             case "$ac_configure_args0 " in
2996               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2997             esac
2998             ;;
2999           -* ) ac_must_keep_next=true ;;
3000         esac
3001       fi
3002       as_fn_append ac_configure_args " '$ac_arg'"
3003       ;;
3004     esac
3005   done
3006 done
3007 { ac_configure_args0=; unset ac_configure_args0;}
3008 { ac_configure_args1=; unset ac_configure_args1;}
3009 
3010 # When interrupted or exit'd, cleanup temporary files, and complete
3011 # config.log.  We remove comments because anyway the quotes in there
3012 # would cause problems or look ugly.
3013 # WARNING: Use '\'' to represent an apostrophe within the trap.
3014 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3015 trap 'exit_status=$?
3016   # Save into config.log some information that might help in debugging.
3017   {
3018     echo
3019 
3020     $as_echo "## ---------------- ##
3021 ## Cache variables. ##
3022 ## ---------------- ##"
3023     echo
3024     # The following way of writing the cache mishandles newlines in values,
3025 (
3026   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3027     eval ac_val=\$$ac_var
3028     case $ac_val in #(
3029     *${as_nl}*)
3030       case $ac_var in #(
3031       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3032 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3033       esac
3034       case $ac_var in #(
3035       _ | IFS | as_nl) ;; #(
3036       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3037       *) { eval $ac_var=; unset $ac_var;} ;;
3038       esac ;;
3039     esac
3040   done
3041   (set) 2>&1 |
3042     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3043     *${as_nl}ac_space=\ *)
3044       sed -n \
3045         "s/'\''/'\''\\\\'\'''\''/g;
3046           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3047       ;; #(
3048     *)
3049       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3050       ;;
3051     esac |
3052     sort
3053 )
3054     echo
3055 
3056     $as_echo "## ----------------- ##
3057 ## Output variables. ##
3058 ## ----------------- ##"
3059     echo
3060     for ac_var in $ac_subst_vars
3061     do
3062       eval ac_val=\$$ac_var
3063       case $ac_val in
3064       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3065       esac
3066       $as_echo "$ac_var='\''$ac_val'\''"
3067     done | sort
3068     echo
3069 
3070     if test -n "$ac_subst_files"; then
3071       $as_echo "## ------------------- ##
3072 ## File substitutions. ##
3073 ## ------------------- ##"
3074       echo
3075       for ac_var in $ac_subst_files
3076       do
3077         eval ac_val=\$$ac_var
3078         case $ac_val in
3079         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3080         esac
3081         $as_echo "$ac_var='\''$ac_val'\''"
3082       done | sort
3083       echo
3084     fi
3085 
3086     if test -s confdefs.h; then
3087       $as_echo "## ----------- ##
3088 ## confdefs.h. ##
3089 ## ----------- ##"
3090       echo
3091       cat confdefs.h
3092       echo
3093     fi
3094     test "$ac_signal" != 0 &&
3095       $as_echo "$as_me: caught signal $ac_signal"
3096     $as_echo "$as_me: exit $exit_status"
3097   } >&5
3098   rm -f core *.core core.conftest.* &&
3099     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3100     exit $exit_status
3101 ' 0
3102 for ac_signal in 1 2 13 15; do
3103   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3104 done
3105 ac_signal=0
3106 
3107 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3108 rm -f -r conftest* confdefs.h
3109 
3110 $as_echo "/* confdefs.h */" > confdefs.h
3111 
3112 # Predefined preprocessor variables.
3113 
3114 cat >>confdefs.h <<_ACEOF
3115 #define PACKAGE_NAME "$PACKAGE_NAME"
3116 _ACEOF
3117 
3118 cat >>confdefs.h <<_ACEOF
3119 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3120 _ACEOF
3121 
3122 cat >>confdefs.h <<_ACEOF
3123 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3124 _ACEOF
3125 
3126 cat >>confdefs.h <<_ACEOF
3127 #define PACKAGE_STRING "$PACKAGE_STRING"
3128 _ACEOF
3129 
3130 cat >>confdefs.h <<_ACEOF
3131 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3132 _ACEOF
3133 
3134 cat >>confdefs.h <<_ACEOF
3135 #define PACKAGE_URL "$PACKAGE_URL"
3136 _ACEOF
3137 
3138 
3139 # Let the site file select an alternate cache file if it wants to.
3140 # Prefer an explicitly selected file to automatically selected ones.
3141 ac_site_file1=NONE
3142 ac_site_file2=NONE
3143 if test -n "$CONFIG_SITE"; then
3144   # We do not want a PATH search for config.site.
3145   case $CONFIG_SITE in #((
3146     -*)  ac_site_file1=./$CONFIG_SITE;;
3147     */*) ac_site_file1=$CONFIG_SITE;;
3148     *)   ac_site_file1=./$CONFIG_SITE;;
3149   esac
3150 elif test "x$prefix" != xNONE; then
3151   ac_site_file1=$prefix/share/config.site
3152   ac_site_file2=$prefix/etc/config.site
3153 else
3154   ac_site_file1=$ac_default_prefix/share/config.site
3155   ac_site_file2=$ac_default_prefix/etc/config.site
3156 fi
3157 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3158 do
3159   test "x$ac_site_file" = xNONE && continue
3160   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3161     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3162 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3163     sed 's/^/| /' "$ac_site_file" >&5
3164     . "$ac_site_file" \
3165       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3167 as_fn_error $? "failed to load site script $ac_site_file
3168 See \`config.log' for more details" "$LINENO" 5; }
3169   fi
3170 done
3171 
3172 if test -r "$cache_file"; then
3173   # Some versions of bash will fail to source /dev/null (special files
3174   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3175   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3176     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3177 $as_echo "$as_me: loading cache $cache_file" >&6;}
3178     case $cache_file in
3179       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3180       *)                      . "./$cache_file";;
3181     esac
3182   fi
3183 else
3184   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3185 $as_echo "$as_me: creating cache $cache_file" >&6;}
3186   >$cache_file
3187 fi
3188 
3189 # Check that the precious variables saved in the cache have kept the same
3190 # value.
3191 ac_cache_corrupted=false
3192 for ac_var in $ac_precious_vars; do
3193   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3194   eval ac_new_set=\$ac_env_${ac_var}_set
3195   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3196   eval ac_new_val=\$ac_env_${ac_var}_value
3197   case $ac_old_set,$ac_new_set in
3198     set,)
3199       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3200 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3201       ac_cache_corrupted=: ;;
3202     ,set)
3203       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3204 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3205       ac_cache_corrupted=: ;;
3206     ,);;
3207     *)
3208       if test "x$ac_old_val" != "x$ac_new_val"; then
3209         # differences in whitespace do not lead to failure.
3210         ac_old_val_w=`echo x $ac_old_val`
3211         ac_new_val_w=`echo x $ac_new_val`
3212         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3213           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3214 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3215           ac_cache_corrupted=:
3216         else
3217           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3218 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3219           eval $ac_var=\$ac_old_val
3220         fi
3221         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3222 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3223         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3224 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3225       fi;;
3226   esac
3227   # Pass precious variables to config.status.
3228   if test "$ac_new_set" = set; then
3229     case $ac_new_val in
3230     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3231     *) ac_arg=$ac_var=$ac_new_val ;;
3232     esac
3233     case " $ac_configure_args " in
3234       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3235       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3236     esac
3237   fi
3238 done
3239 if $ac_cache_corrupted; then
3240   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3241 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3242   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3243 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3244   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3245 fi
3246 ## -------------------- ##
3247 ## Main body of script. ##
3248 ## -------------------- ##
3249 
3250 ac_ext=c
3251 ac_cpp='$CPP $CPPFLAGS'
3252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255 
3256 
3257 
3258 ac_aux_dir=
3259 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3260   if test -f "$ac_dir/install-sh"; then
3261     ac_aux_dir=$ac_dir
3262     ac_install_sh="$ac_aux_dir/install-sh -c"
3263     break
3264   elif test -f "$ac_dir/install.sh"; then
3265     ac_aux_dir=$ac_dir
3266     ac_install_sh="$ac_aux_dir/install.sh -c"
3267     break
3268   elif test -f "$ac_dir/shtool"; then
3269     ac_aux_dir=$ac_dir
3270     ac_install_sh="$ac_aux_dir/shtool install -c"
3271     break
3272   fi
3273 done
3274 if test -z "$ac_aux_dir"; then
3275   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
3276 fi
3277 
3278 # These three variables are undocumented and unsupported,
3279 # and are intended to be withdrawn in a future Autoconf release.
3280 # They can cause serious problems if a builder's source tree is in a directory
3281 # whose full name contains unusual characters.
3282 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3283 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3284 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3285 
3286 
3287 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3288 
3289 #
3290 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3291 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3292 #
3293 # This code is free software; you can redistribute it and/or modify it
3294 # under the terms of the GNU General Public License version 2 only, as
3295 # published by the Free Software Foundation.  Oracle designates this
3296 # particular file as subject to the "Classpath" exception as provided
3297 # by Oracle in the LICENSE file that accompanied this code.
3298 #
3299 # This code is distributed in the hope that it will be useful, but WITHOUT
3300 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3301 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3302 # version 2 for more details (a copy is included in the LICENSE file that
3303 # accompanied this code).
3304 #
3305 # You should have received a copy of the GNU General Public License version
3306 # 2 along with this work; if not, write to the Free Software Foundation,
3307 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3308 #
3309 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3310 # or visit www.oracle.com if you need additional information or have any
3311 # questions.
3312 #
3313 
3314 #
3315 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3316 #
3317 # This program is free software; you can redistribute it and/or modify
3318 # it under the terms of the GNU General Public License as published by
3319 # the Free Software Foundation; either version 2 of the License, or
3320 # (at your option) any later version.
3321 #
3322 # This program is distributed in the hope that it will be useful, but
3323 # WITHOUT ANY WARRANTY; without even the implied warranty of
3324 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3325 # General Public License for more details.
3326 #
3327 # You should have received a copy of the GNU General Public License
3328 # along with this program; if not, write to the Free Software
3329 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3330 #
3331 # As a special exception to the GNU General Public License, if you
3332 # distribute this file as part of a program that contains a
3333 # configuration script generated by Autoconf, you may include it under
3334 # the same distribution terms that you use for the rest of that program.
3335 
3336 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3337 # ----------------------------------
3338 # PKG_PROG_PKG_CONFIG
3339 
3340 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3341 #
3342 # Check to see whether a particular set of modules exists.  Similar
3343 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3344 #
3345 #
3346 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3347 # this or PKG_CHECK_MODULES is called, or make sure to call
3348 # PKG_CHECK_EXISTS manually
3349 # --------------------------------------------------------------
3350 
3351 
3352 
3353 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3354 # ---------------------------------------------
3355 # _PKG_CONFIG
3356 
3357 # _PKG_SHORT_ERRORS_SUPPORTED
3358 # -----------------------------
3359 # _PKG_SHORT_ERRORS_SUPPORTED
3360 
3361 
3362 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3363 # [ACTION-IF-NOT-FOUND])
3364 #
3365 #
3366 # Note that if there is a possibility the first call to
3367 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3368 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3369 #
3370 #
3371 # --------------------------------------------------------------
3372 # PKG_CHECK_MODULES
3373 
3374 
3375 # Include these first...
3376 #
3377 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3378 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3379 #
3380 # This code is free software; you can redistribute it and/or modify it
3381 # under the terms of the GNU General Public License version 2 only, as
3382 # published by the Free Software Foundation.  Oracle designates this
3383 # particular file as subject to the "Classpath" exception as provided
3384 # by Oracle in the LICENSE file that accompanied this code.
3385 #
3386 # This code is distributed in the hope that it will be useful, but WITHOUT
3387 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3388 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3389 # version 2 for more details (a copy is included in the LICENSE file that
3390 # accompanied this code).
3391 #
3392 # You should have received a copy of the GNU General Public License version
3393 # 2 along with this work; if not, write to the Free Software Foundation,
3394 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3395 #
3396 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3397 # or visit www.oracle.com if you need additional information or have any
3398 # questions.
3399 #
3400 
3401 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3402 # If so, then append $1 to $2 \
3403 # Also set JVM_ARG_OK to true/false depending on outcome.
3404 
3405 
3406 # Appends a string to a path variable, only adding the : when needed.
3407 
3408 
3409 # Prepends a string to a path variable, only adding the : when needed.
3410 
3411 
3412 # This will make sure the given variable points to a full and proper
3413 # path. This means:
3414 # 1) There will be no spaces in the path. On unix platforms,
3415 #    spaces in the path will result in an error. On Windows,
3416 #    the path will be rewritten using short-style to be space-free.
3417 # 2) The path will be absolute, and it will be in unix-style (on
3418 #     cygwin).
3419 # $1: The name of the variable to fix
3420 
3421 
3422 # This will make sure the given variable points to a executable
3423 # with a full and proper path. This means:
3424 # 1) There will be no spaces in the path. On unix platforms,
3425 #    spaces in the path will result in an error. On Windows,
3426 #    the path will be rewritten using short-style to be space-free.
3427 # 2) The path will be absolute, and it will be in unix-style (on
3428 #     cygwin).
3429 # Any arguments given to the executable is preserved.
3430 # If the input variable does not have a directory specification, then
3431 # it need to be in the PATH.
3432 # $1: The name of the variable to fix
3433 
3434 
3435 
3436 
3437 # Register a --with argument but mark it as deprecated
3438 # $1: The name of the with argument to deprecate, not including --with-
3439 
3440 
3441 # Register a --enable argument but mark it as deprecated
3442 # $1: The name of the with argument to deprecate, not including --enable-
3443 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3444 
3445 
3446 
3447 
3448 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3449 # $1: variable to check
3450 
3451 
3452 # Check that there are no unprocessed overridden variables left.
3453 # If so, they are an incorrect argument and we will exit with an error.
3454 
3455 
3456 # Setup a tool for the given variable. If correctly specified by the user,
3457 # use that value, otherwise search for the tool using the supplied code snippet.
3458 # $1: variable to set
3459 # $2: code snippet to call to look for the tool
3460 
3461 
3462 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3463 # $1: variable to set
3464 # $2: executable name (or list of names) to look for
3465 
3466 
3467 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3468 # $1: variable to set
3469 # $2: executable name (or list of names) to look for
3470 
3471 
3472 # Like BASIC_PATH_PROGS but fails if no tool was found.
3473 # $1: variable to set
3474 # $2: executable name (or list of names) to look for
3475 
3476 
3477 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3478 # $1: variable to set
3479 # $2: autoconf macro to call to look for the special tool
3480 
3481 
3482 # Setup the most fundamental tools that relies on not much else to set up,
3483 # but is used by much of the early bootstrap code.
3484 
3485 
3486 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3487 
3488 
3489 
3490 
3491 
3492 
3493 
3494 
3495 
3496 #%%% Simple tools %%%
3497 
3498 # Check if we have found a usable version of make
3499 # $1: the path to a potential make binary (or empty)
3500 # $2: the description on how we found this
3501 
3502 
3503 
3504 
3505 # Goes looking for a usable version of GNU make.
3506 
3507 
3508 
3509 
3510 
3511 
3512 # Check if build directory is on local disk. If not possible to determine,
3513 # we prefer to claim it's local.
3514 # Argument 1: directory to test
3515 # Argument 2: what to do if it is on local disk
3516 # Argument 3: what to do otherwise (remote disk or failure)
3517 
3518 
3519 # Check that source files have basic read permissions set. This might
3520 # not be the case in cygwin in certain conditions.
3521 
3522 
3523 
3524 
3525 #
3526 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3527 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3528 #
3529 # This code is free software; you can redistribute it and/or modify it
3530 # under the terms of the GNU General Public License version 2 only, as
3531 # published by the Free Software Foundation.  Oracle designates this
3532 # particular file as subject to the "Classpath" exception as provided
3533 # by Oracle in the LICENSE file that accompanied this code.
3534 #
3535 # This code is distributed in the hope that it will be useful, but WITHOUT
3536 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3537 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3538 # version 2 for more details (a copy is included in the LICENSE file that
3539 # accompanied this code).
3540 #
3541 # You should have received a copy of the GNU General Public License version
3542 # 2 along with this work; if not, write to the Free Software Foundation,
3543 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3544 #
3545 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3546 # or visit www.oracle.com if you need additional information or have any
3547 # questions.
3548 #
3549 
3550 
3551 
3552 
3553 
3554 # Helper function which possibly converts a path using DOS-style short mode.
3555 # If so, the updated path is stored in $new_path.
3556 # $1: The path to check
3557 
3558 
3559 # Helper function which possibly converts a path using DOS-style short mode.
3560 # If so, the updated path is stored in $new_path.
3561 # $1: The path to check
3562 
3563 
3564 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3565 # and could probably be heavily simplified. However, all changes in this
3566 # area tend to need lot of testing in different scenarios, and in lack of
3567 # proper unit testing, cleaning this up has not been deemed worth the effort
3568 # at the moment.
3569 
3570 
3571 
3572 
3573 
3574 
3575 
3576 
3577 
3578 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3579 
3580 
3581 
3582 
3583 #
3584 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3585 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3586 #
3587 # This code is free software; you can redistribute it and/or modify it
3588 # under the terms of the GNU General Public License version 2 only, as
3589 # published by the Free Software Foundation.  Oracle designates this
3590 # particular file as subject to the "Classpath" exception as provided
3591 # by Oracle in the LICENSE file that accompanied this code.
3592 #
3593 # This code is distributed in the hope that it will be useful, but WITHOUT
3594 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3595 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3596 # version 2 for more details (a copy is included in the LICENSE file that
3597 # accompanied this code).
3598 #
3599 # You should have received a copy of the GNU General Public License version
3600 # 2 along with this work; if not, write to the Free Software Foundation,
3601 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3602 #
3603 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3604 # or visit www.oracle.com if you need additional information or have any
3605 # questions.
3606 #
3607 
3608 
3609 
3610 
3611 
3612 
3613 
3614 
3615 
3616 
3617 
3618 # ... then the rest
3619 #
3620 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3621 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622 #
3623 # This code is free software; you can redistribute it and/or modify it
3624 # under the terms of the GNU General Public License version 2 only, as
3625 # published by the Free Software Foundation.  Oracle designates this
3626 # particular file as subject to the "Classpath" exception as provided
3627 # by Oracle in the LICENSE file that accompanied this code.
3628 #
3629 # This code is distributed in the hope that it will be useful, but WITHOUT
3630 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632 # version 2 for more details (a copy is included in the LICENSE file that
3633 # accompanied this code).
3634 #
3635 # You should have received a copy of the GNU General Public License version
3636 # 2 along with this work; if not, write to the Free Software Foundation,
3637 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638 #
3639 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640 # or visit www.oracle.com if you need additional information or have any
3641 # questions.
3642 #
3643 
3644 ########################################################################
3645 # This file handles detection of the Boot JDK. The Boot JDK detection
3646 # process has been developed as a response to solve a complex real-world
3647 # problem. Initially, it was simple, but it has grown as platform after
3648 # platform, idiosyncracy after idiosyncracy has been supported.
3649 #
3650 # The basic idea is this:
3651 # 1) You need an acceptable *) JDK to use as a Boot JDK
3652 # 2) There are several ways to locate a JDK, that are mostly platform
3653 #    dependent **)
3654 # 3) You can have multiple JDKs installed
3655 # 4) If possible, configure should try to dig out an acceptable JDK
3656 #    automatically, without having to resort to command-line options
3657 #
3658 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3659 #     javac) and not a JRE, etc.
3660 #
3661 # **) On Windows we typically use a well-known path.
3662 #     On MacOSX we typically use the tool java_home.
3663 #     On Linux we typically find javac in the $PATH, and then follow a
3664 #     chain of symlinks that often ends up in a real JDK.
3665 #
3666 # This leads to the code where we check in different ways to locate a
3667 # JDK, and if one is found, check if it is acceptable. If not, we print
3668 # our reasons for rejecting it (useful when debugging non-working
3669 # configure situations) and continue checking the next one.
3670 ########################################################################
3671 
3672 # Execute the check given as argument, and verify the result
3673 # If the Boot JDK was previously found, do nothing
3674 # $1 A command line (typically autoconf macro) to execute
3675 
3676 
3677 # Test: Is bootjdk explicitely set by command line arguments?
3678 
3679 
3680 # Test: Is bootjdk available from builddeps?
3681 
3682 
3683 # Test: Is $JAVA_HOME set?
3684 
3685 
3686 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3687 
3688 
3689 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3690 # $1: Argument to the java_home binary (optional)
3691 
3692 
3693 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3694 
3695 
3696 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3697 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3698 # $1 = Path to directory containing jdk installations.
3699 # $2 = String to append to the found JDK directory to get the proper JDK home
3700 
3701 
3702 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3703 # environmental variable as base for where to look.
3704 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3705 
3706 
3707 # Test: Is there a JDK installed in default, well-known locations?
3708 
3709 
3710 # Check that a command-line tool in the Boot JDK is correct
3711 # $1 = name of variable to assign
3712 # $2 = name of binary
3713 
3714 
3715 ###############################################################################
3716 #
3717 # We need a Boot JDK to bootstrap the build.
3718 #
3719 
3720 
3721 
3722 
3723 
3724 #
3725 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727 #
3728 # This code is free software; you can redistribute it and/or modify it
3729 # under the terms of the GNU General Public License version 2 only, as
3730 # published by the Free Software Foundation.  Oracle designates this
3731 # particular file as subject to the "Classpath" exception as provided
3732 # by Oracle in the LICENSE file that accompanied this code.
3733 #
3734 # This code is distributed in the hope that it will be useful, but WITHOUT
3735 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737 # version 2 for more details (a copy is included in the LICENSE file that
3738 # accompanied this code).
3739 #
3740 # You should have received a copy of the GNU General Public License version
3741 # 2 along with this work; if not, write to the Free Software Foundation,
3742 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743 #
3744 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745 # or visit www.oracle.com if you need additional information or have any
3746 # questions.
3747 #
3748 
3749 
3750 
3751 
3752 
3753 
3754 
3755 
3756 
3757 
3758 
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 
3767 
3768 #
3769 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3770 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3771 #
3772 # This code is free software; you can redistribute it and/or modify it
3773 # under the terms of the GNU General Public License version 2 only, as
3774 # published by the Free Software Foundation.  Oracle designates this
3775 # particular file as subject to the "Classpath" exception as provided
3776 # by Oracle in the LICENSE file that accompanied this code.
3777 #
3778 # This code is distributed in the hope that it will be useful, but WITHOUT
3779 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3780 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3781 # version 2 for more details (a copy is included in the LICENSE file that
3782 # accompanied this code).
3783 #
3784 # You should have received a copy of the GNU General Public License version
3785 # 2 along with this work; if not, write to the Free Software Foundation,
3786 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3787 #
3788 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3789 # or visit www.oracle.com if you need additional information or have any
3790 # questions.
3791 #
3792 
3793 
3794 
3795 
3796 
3797 # Documentation on common flags used for solstudio in HIGHEST.
3798 #
3799 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3800 #          done with care, there are some assumptions below that need to
3801 #          be understood about the use of pointers, and IEEE behavior.
3802 #
3803 # -fns: Use non-standard floating point mode (not IEEE 754)
3804 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3805 # -fsingle: Use single precision floating point with 'float'
3806 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3807 #   (Source with excessing pointer casting and data access with mixed
3808 #    pointer types are not recommended)
3809 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3810 #   (If you expect perfect errno behavior, do not use this)
3811 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3812 # -xrestrict: Pointer parameters to functions do not overlap
3813 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3814 #    If you pass in multiple pointers to the same data, do not use this)
3815 # -xlibmil: Inline some library routines
3816 #   (If you expect perfect errno behavior, do not use this)
3817 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3818 #   (If you expect perfect errno behavior, do not use this)
3819 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3820 
3821     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3822     # Bug?
3823     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3824     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3825     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3826     #fi
3827 
3828 
3829 
3830 
3831 
3832 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3833 #                                   [RUN-IF-FALSE])
3834 # ------------------------------------------------------------
3835 # Check that the c and c++ compilers support an argument
3836 
3837 
3838 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3839 #                                    [RUN-IF-FALSE])
3840 # ------------------------------------------------------------
3841 # Check that the linker support an argument
3842 
3843 
3844 
3845 
3846 #
3847 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3848 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3849 #
3850 # This code is free software; you can redistribute it and/or modify it
3851 # under the terms of the GNU General Public License version 2 only, as
3852 # published by the Free Software Foundation.  Oracle designates this
3853 # particular file as subject to the "Classpath" exception as provided
3854 # by Oracle in the LICENSE file that accompanied this code.
3855 #
3856 # This code is distributed in the hope that it will be useful, but WITHOUT
3857 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3858 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3859 # version 2 for more details (a copy is included in the LICENSE file that
3860 # accompanied this code).
3861 #
3862 # You should have received a copy of the GNU General Public License version
3863 # 2 along with this work; if not, write to the Free Software Foundation,
3864 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3865 #
3866 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3867 # or visit www.oracle.com if you need additional information or have any
3868 # questions.
3869 #
3870 
3871 
3872 
3873 
3874 
3875 cygwin_help() {
3876   case $1 in
3877     unzip)
3878       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3879       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3880       ;;
3881     zip)
3882       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3883       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3884       ;;
3885     make)
3886       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3887       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3888       ;;
3889     freetype)
3890       HELP_MSG="
3891 The freetype library can now be build during the configure process.
3892 Download the freetype sources and unpack them into an arbitrary directory:
3893 
3894 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3895 tar -xzf freetype-2.5.3.tar.gz
3896 
3897 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3898 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3899 builds or into '<freetype_src>/lib32' for 32-bit builds.
3900 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3901 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3902       ;;
3903   esac
3904 }
3905 
3906 msys_help() {
3907   PKGHANDLER_COMMAND=""
3908 }
3909 
3910 apt_help() {
3911   case $1 in
3912     devkit)
3913       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3914     openjdk)
3915       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3916     alsa)
3917       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3918     cups)
3919       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3920     freetype)
3921       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3922     pulse)
3923       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3924     x11)
3925       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3926     ccache)
3927       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3928   esac
3929 }
3930 
3931 yum_help() {
3932   case $1 in
3933     devkit)
3934       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3935     openjdk)
3936       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3937     alsa)
3938       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3939     cups)
3940       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3941     freetype)
3942       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3943     pulse)
3944       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3945     x11)
3946       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3947     ccache)
3948       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3949   esac
3950 }
3951 
3952 port_help() {
3953   PKGHANDLER_COMMAND=""
3954 }
3955 
3956 pkgutil_help() {
3957   PKGHANDLER_COMMAND=""
3958 }
3959 
3960 pkgadd_help() {
3961   PKGHANDLER_COMMAND=""
3962 }
3963 
3964 # This function will check if we're called from the "configure" wrapper while
3965 # printing --help. If so, we will print out additional information that can
3966 # only be extracted within the autoconf script, and then exit. This must be
3967 # called at the very beginning in configure.ac.
3968 
3969 
3970 
3971 
3972 
3973 
3974 #
3975 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3976 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977 #
3978 # This code is free software; you can redistribute it and/or modify it
3979 # under the terms of the GNU General Public License version 2 only, as
3980 # published by the Free Software Foundation.  Oracle designates this
3981 # particular file as subject to the "Classpath" exception as provided
3982 # by Oracle in the LICENSE file that accompanied this code.
3983 #
3984 # This code is distributed in the hope that it will be useful, but WITHOUT
3985 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987 # version 2 for more details (a copy is included in the LICENSE file that
3988 # accompanied this code).
3989 #
3990 # You should have received a copy of the GNU General Public License version
3991 # 2 along with this work; if not, write to the Free Software Foundation,
3992 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993 #
3994 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995 # or visit www.oracle.com if you need additional information or have any
3996 # questions.
3997 #
3998 
3999 
4000 
4001 
4002 
4003 
4004 
4005 
4006 
4007 
4008 ###############################################################################
4009 #
4010 # Should we build only OpenJDK even if closed sources are present?
4011 #
4012 
4013 
4014 
4015 
4016 ###############################################################################
4017 #
4018 # Setup version numbers
4019 #
4020 
4021 
4022 
4023 
4024 
4025 
4026 #
4027 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4028 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4029 #
4030 # This code is free software; you can redistribute it and/or modify it
4031 # under the terms of the GNU General Public License version 2 only, as
4032 # published by the Free Software Foundation.  Oracle designates this
4033 # particular file as subject to the "Classpath" exception as provided
4034 # by Oracle in the LICENSE file that accompanied this code.
4035 #
4036 # This code is distributed in the hope that it will be useful, but WITHOUT
4037 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4038 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4039 # version 2 for more details (a copy is included in the LICENSE file that
4040 # accompanied this code).
4041 #
4042 # You should have received a copy of the GNU General Public License version
4043 # 2 along with this work; if not, write to the Free Software Foundation,
4044 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4045 #
4046 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4047 # or visit www.oracle.com if you need additional information or have any
4048 # questions.
4049 #
4050 
4051 
4052 
4053 
4054 
4055 
4056 
4057 
4058 
4059 
4060 
4061 
4062 
4063 
4064 
4065 
4066 
4067 
4068 
4069 
4070 
4071 #
4072 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4073 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4074 #
4075 # This code is free software; you can redistribute it and/or modify it
4076 # under the terms of the GNU General Public License version 2 only, as
4077 # published by the Free Software Foundation.  Oracle designates this
4078 # particular file as subject to the "Classpath" exception as provided
4079 # by Oracle in the LICENSE file that accompanied this code.
4080 #
4081 # This code is distributed in the hope that it will be useful, but WITHOUT
4082 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4083 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4084 # version 2 for more details (a copy is included in the LICENSE file that
4085 # accompanied this code).
4086 #
4087 # You should have received a copy of the GNU General Public License version
4088 # 2 along with this work; if not, write to the Free Software Foundation,
4089 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4090 #
4091 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4092 # or visit www.oracle.com if you need additional information or have any
4093 # questions.
4094 #
4095 
4096 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4097 # Converts autoconf style CPU name to OpenJDK style, into
4098 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4099 
4100 
4101 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4102 # Converts autoconf style OS name to OpenJDK style, into
4103 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4104 
4105 
4106 # Expects $host_os $host_cpu $build_os and $build_cpu
4107 # and $with_target_bits to have been setup!
4108 #
4109 # Translate the standard triplet(quadruplet) definition
4110 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4111 # OPENJDK_BUILD_OS, etc.
4112 
4113 
4114 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4115 # accordingly. Must be done after setting up build and target system, but before
4116 # doing anything else with these values.
4117 
4118 
4119 # Setup the legacy variables, for controlling the old makefiles.
4120 #
4121 
4122 
4123 
4124 
4125 #%%% Build and target systems %%%
4126 
4127 
4128 
4129 
4130 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4131 # Add -mX to various FLAGS variables.
4132 
4133 
4134 
4135 
4136 
4137 
4138 #
4139 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4140 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4141 #
4142 # This code is free software; you can redistribute it and/or modify it
4143 # under the terms of the GNU General Public License version 2 only, as
4144 # published by the Free Software Foundation.  Oracle designates this
4145 # particular file as subject to the "Classpath" exception as provided
4146 # by Oracle in the LICENSE file that accompanied this code.
4147 #
4148 # This code is distributed in the hope that it will be useful, but WITHOUT
4149 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4150 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4151 # version 2 for more details (a copy is included in the LICENSE file that
4152 # accompanied this code).
4153 #
4154 # You should have received a copy of the GNU General Public License version
4155 # 2 along with this work; if not, write to the Free Software Foundation,
4156 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4157 #
4158 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4159 # or visit www.oracle.com if you need additional information or have any
4160 # questions.
4161 #
4162 
4163 
4164 
4165 
4166 
4167 
4168 
4169 
4170 #
4171 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4172 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4173 #
4174 # This code is free software; you can redistribute it and/or modify it
4175 # under the terms of the GNU General Public License version 2 only, as
4176 # published by the Free Software Foundation.  Oracle designates this
4177 # particular file as subject to the "Classpath" exception as provided
4178 # by Oracle in the LICENSE file that accompanied this code.
4179 #
4180 # This code is distributed in the hope that it will be useful, but WITHOUT
4181 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4182 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4183 # version 2 for more details (a copy is included in the LICENSE file that
4184 # accompanied this code).
4185 #
4186 # You should have received a copy of the GNU General Public License version
4187 # 2 along with this work; if not, write to the Free Software Foundation,
4188 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4189 #
4190 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4191 # or visit www.oracle.com if you need additional information or have any
4192 # questions.
4193 #
4194 
4195 ########################################################################
4196 # This file is responsible for detecting, verifying and setting up the
4197 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4198 # proper paths to the binaries, but it will not setup any flags.
4199 #
4200 # The binaries used is determined by the toolchain type, which is the family of
4201 # compilers and related tools that are used.
4202 ########################################################################
4203 
4204 
4205 # All valid toolchains, regardless of platform (used by help.m4)
4206 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4207 
4208 # These toolchains are valid on different platforms
4209 VALID_TOOLCHAINS_linux="gcc clang"
4210 VALID_TOOLCHAINS_solaris="solstudio"
4211 VALID_TOOLCHAINS_macosx="gcc clang"
4212 VALID_TOOLCHAINS_aix="xlc"
4213 VALID_TOOLCHAINS_windows="microsoft"
4214 
4215 # Toolchain descriptions
4216 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4217 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4218 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4219 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4220 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4221 
4222 # Setup a number of variables describing how native output files are
4223 # named on this platform/toolchain.
4224 
4225 
4226 # Determine which toolchain type to use, and make sure it is valid for this
4227 # platform. Setup various information about the selected toolchain.
4228 
4229 
4230 # Before we start detecting the toolchain executables, we might need some
4231 # special setup, e.g. additional paths etc.
4232 
4233 
4234 # Restore path, etc
4235 
4236 
4237 # Check if a compiler is of the toolchain type we expect, and save the version
4238 # information from it. If the compiler does not match the expected type,
4239 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4240 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4241 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4242 #
4243 # $1 = compiler to test (CC or CXX)
4244 # $2 = human readable name of compiler (C or C++)
4245 
4246 
4247 # Try to locate the given C or C++ compiler in the path, or otherwise.
4248 #
4249 # $1 = compiler to test (CC or CXX)
4250 # $2 = human readable name of compiler (C or C++)
4251 # $3 = list of compiler names to search for
4252 
4253 
4254 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4255 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4256 # archiver (AR). Verify that the compilers are correct according to the
4257 # toolchain type.
4258 
4259 
4260 # Setup additional tools that is considered a part of the toolchain, but not the
4261 # core part. Many of these are highly platform-specific and do not exist,
4262 # and/or are not needed on all platforms.
4263 
4264 
4265 # Setup the build tools (i.e, the compiler and linker used to build programs
4266 # that should be run on the build platform, not the target platform, as a build
4267 # helper). Since the non-cross-compile case uses the normal, target compilers
4268 # for this, we can only do this after these have been setup.
4269 
4270 
4271 # Setup legacy variables that are still needed as alternative ways to refer to
4272 # parts of the toolchain.
4273 
4274 
4275 # Do some additional checks on the detected tools.
4276 
4277 
4278 # Setup the JTReg Regression Test Harness.
4279 
4280 
4281 #
4282 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4283 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4284 #
4285 # This code is free software; you can redistribute it and/or modify it
4286 # under the terms of the GNU General Public License version 2 only, as
4287 # published by the Free Software Foundation.  Oracle designates this
4288 # particular file as subject to the "Classpath" exception as provided
4289 # by Oracle in the LICENSE file that accompanied this code.
4290 #
4291 # This code is distributed in the hope that it will be useful, but WITHOUT
4292 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4293 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4294 # version 2 for more details (a copy is included in the LICENSE file that
4295 # accompanied this code).
4296 #
4297 # You should have received a copy of the GNU General Public License version
4298 # 2 along with this work; if not, write to the Free Software Foundation,
4299 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4300 #
4301 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4302 # or visit www.oracle.com if you need additional information or have any
4303 # questions.
4304 #
4305 
4306 
4307 
4308 
4309 
4310 
4311 
4312 # Check if the VS env variables were setup prior to running configure.
4313 # If not, then find vcvarsall.bat and run it automatically, and integrate
4314 # the set env variables into the spec file.
4315 
4316 
4317 
4318 
4319 
4320 
4321 
4322 
4323 
4324 
4325 
4326 # This line needs to be here, verbatim, after all includes and the dummy hook
4327 # definitions. It is replaced with custom functionality when building
4328 # custom sources.
4329 #CUSTOM_AUTOCONF_INCLUDE
4330 
4331 # Do not change or remove the following line, it is needed for consistency checks:
4332 DATE_WHEN_GENERATED=1418395009
4333 
4334 ###############################################################################
4335 #
4336 # Initialization / Boot-strapping
4337 #
4338 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4339 # thus it jumps back and forth, each time gaining something needed later on.
4340 #
4341 ###############################################################################
4342 
4343 # If we are requested to print additional help, do that and then exit.
4344 # This must be the very first call.
4345 
4346   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4347     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4348     $PRINTF "Which are valid to use depends on the build platform.\n"
4349     for toolchain in $VALID_TOOLCHAINS_all; do
4350       # Use indirect variable referencing
4351       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4352       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4353       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4354     done
4355 
4356     # And now exit directly
4357     exit 0
4358   fi
4359 
4360 
4361 # Basic initialization that must happen first of all in the normal process.
4362 
4363   # Save the original command line. This is passed to us by the wrapper configure script.
4364 
4365   DATE_WHEN_CONFIGURED=`LANG=C date`
4366 
4367   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4368 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4369   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4370 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4371 
4372 
4373   # Start with tools that do not need have cross compilation support
4374   # and can be expected to be found in the default PATH. These tools are
4375   # used by configure. Nor are these tools expected to be found in the
4376   # devkit from the builddeps server either, since they are
4377   # needed to download the devkit.
4378 
4379   # First are all the simple required tools.
4380 
4381 
4382 
4383   # Publish this variable in the help.
4384 
4385 
4386   if test "x$BASENAME" = x; then
4387     # The variable is not set by user, try to locate tool using the code snippet
4388     for ac_prog in basename
4389 do
4390   # Extract the first word of "$ac_prog", so it can be a program name with args.
4391 set dummy $ac_prog; ac_word=$2
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4393 $as_echo_n "checking for $ac_word... " >&6; }
4394 if ${ac_cv_path_BASENAME+:} false; then :
4395   $as_echo_n "(cached) " >&6
4396 else
4397   case $BASENAME in
4398   [\\/]* | ?:[\\/]*)
4399   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4400   ;;
4401   *)
4402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403 for as_dir in $PATH
4404 do
4405   IFS=$as_save_IFS
4406   test -z "$as_dir" && as_dir=.
4407     for ac_exec_ext in '' $ac_executable_extensions; do
4408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411     break 2
4412   fi
4413 done
4414   done
4415 IFS=$as_save_IFS
4416 
4417   ;;
4418 esac
4419 fi
4420 BASENAME=$ac_cv_path_BASENAME
4421 if test -n "$BASENAME"; then
4422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4423 $as_echo "$BASENAME" >&6; }
4424 else
4425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426 $as_echo "no" >&6; }
4427 fi
4428 
4429 
4430   test -n "$BASENAME" && break
4431 done
4432 
4433   else
4434     # The variable is set, but is it from the command line or the environment?
4435 
4436     # Try to remove the string !BASENAME! from our list.
4437     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4438     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4439       # If it failed, the variable was not from the command line. Ignore it,
4440       # but warn the user (except for BASH, which is always set by the calling BASH).
4441       if test "xBASENAME" != xBASH; then
4442         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4443 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4444       fi
4445       # Try to locate tool using the code snippet
4446       for ac_prog in basename
4447 do
4448   # Extract the first word of "$ac_prog", so it can be a program name with args.
4449 set dummy $ac_prog; ac_word=$2
4450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451 $as_echo_n "checking for $ac_word... " >&6; }
4452 if ${ac_cv_path_BASENAME+:} false; then :
4453   $as_echo_n "(cached) " >&6
4454 else
4455   case $BASENAME in
4456   [\\/]* | ?:[\\/]*)
4457   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4458   ;;
4459   *)
4460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461 for as_dir in $PATH
4462 do
4463   IFS=$as_save_IFS
4464   test -z "$as_dir" && as_dir=.
4465     for ac_exec_ext in '' $ac_executable_extensions; do
4466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4467     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469     break 2
4470   fi
4471 done
4472   done
4473 IFS=$as_save_IFS
4474 
4475   ;;
4476 esac
4477 fi
4478 BASENAME=$ac_cv_path_BASENAME
4479 if test -n "$BASENAME"; then
4480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4481 $as_echo "$BASENAME" >&6; }
4482 else
4483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484 $as_echo "no" >&6; }
4485 fi
4486 
4487 
4488   test -n "$BASENAME" && break
4489 done
4490 
4491     else
4492       # If it succeeded, then it was overridden by the user. We will use it
4493       # for the tool.
4494 
4495       # First remove it from the list of overridden variables, so we can test
4496       # for unknown variables in the end.
4497       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4498 
4499       # Check if the provided tool contains a complete path.
4500       tool_specified="$BASENAME"
4501       tool_basename="${tool_specified##*/}"
4502       if test "x$tool_basename" = "x$tool_specified"; then
4503         # A command without a complete path is provided, search $PATH.
4504         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4505 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4506         # Extract the first word of "$tool_basename", so it can be a program name with args.
4507 set dummy $tool_basename; ac_word=$2
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509 $as_echo_n "checking for $ac_word... " >&6; }
4510 if ${ac_cv_path_BASENAME+:} false; then :
4511   $as_echo_n "(cached) " >&6
4512 else
4513   case $BASENAME in
4514   [\\/]* | ?:[\\/]*)
4515   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4516   ;;
4517   *)
4518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519 for as_dir in $PATH
4520 do
4521   IFS=$as_save_IFS
4522   test -z "$as_dir" && as_dir=.
4523     for ac_exec_ext in '' $ac_executable_extensions; do
4524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4527     break 2
4528   fi
4529 done
4530   done
4531 IFS=$as_save_IFS
4532 
4533   ;;
4534 esac
4535 fi
4536 BASENAME=$ac_cv_path_BASENAME
4537 if test -n "$BASENAME"; then
4538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4539 $as_echo "$BASENAME" >&6; }
4540 else
4541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542 $as_echo "no" >&6; }
4543 fi
4544 
4545 
4546         if test "x$BASENAME" = x; then
4547           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4548         fi
4549       else
4550         # Otherwise we believe it is a complete path. Use it as it is.
4551         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4552 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4553         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4554 $as_echo_n "checking for BASENAME... " >&6; }
4555         if test ! -x "$tool_specified"; then
4556           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4557 $as_echo "not found" >&6; }
4558           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4559         fi
4560         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4561 $as_echo "$tool_specified" >&6; }
4562       fi
4563     fi
4564   fi
4565 
4566 
4567 
4568   if test "x$BASENAME" = x; then
4569     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4570   fi
4571 
4572 
4573 
4574 
4575 
4576   # Publish this variable in the help.
4577 
4578 
4579   if test "x$BASH" = x; then
4580     # The variable is not set by user, try to locate tool using the code snippet
4581     for ac_prog in bash
4582 do
4583   # Extract the first word of "$ac_prog", so it can be a program name with args.
4584 set dummy $ac_prog; ac_word=$2
4585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586 $as_echo_n "checking for $ac_word... " >&6; }
4587 if ${ac_cv_path_BASH+:} false; then :
4588   $as_echo_n "(cached) " >&6
4589 else
4590   case $BASH in
4591   [\\/]* | ?:[\\/]*)
4592   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4593   ;;
4594   *)
4595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596 for as_dir in $PATH
4597 do
4598   IFS=$as_save_IFS
4599   test -z "$as_dir" && as_dir=.
4600     for ac_exec_ext in '' $ac_executable_extensions; do
4601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4602     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4604     break 2
4605   fi
4606 done
4607   done
4608 IFS=$as_save_IFS
4609 
4610   ;;
4611 esac
4612 fi
4613 BASH=$ac_cv_path_BASH
4614 if test -n "$BASH"; then
4615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4616 $as_echo "$BASH" >&6; }
4617 else
4618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619 $as_echo "no" >&6; }
4620 fi
4621 
4622 
4623   test -n "$BASH" && break
4624 done
4625 
4626   else
4627     # The variable is set, but is it from the command line or the environment?
4628 
4629     # Try to remove the string !BASH! from our list.
4630     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4631     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4632       # If it failed, the variable was not from the command line. Ignore it,
4633       # but warn the user (except for BASH, which is always set by the calling BASH).
4634       if test "xBASH" != xBASH; then
4635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4636 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4637       fi
4638       # Try to locate tool using the code snippet
4639       for ac_prog in bash
4640 do
4641   # Extract the first word of "$ac_prog", so it can be a program name with args.
4642 set dummy $ac_prog; ac_word=$2
4643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644 $as_echo_n "checking for $ac_word... " >&6; }
4645 if ${ac_cv_path_BASH+:} false; then :
4646   $as_echo_n "(cached) " >&6
4647 else
4648   case $BASH in
4649   [\\/]* | ?:[\\/]*)
4650   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4651   ;;
4652   *)
4653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654 for as_dir in $PATH
4655 do
4656   IFS=$as_save_IFS
4657   test -z "$as_dir" && as_dir=.
4658     for ac_exec_ext in '' $ac_executable_extensions; do
4659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4660     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662     break 2
4663   fi
4664 done
4665   done
4666 IFS=$as_save_IFS
4667 
4668   ;;
4669 esac
4670 fi
4671 BASH=$ac_cv_path_BASH
4672 if test -n "$BASH"; then
4673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4674 $as_echo "$BASH" >&6; }
4675 else
4676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677 $as_echo "no" >&6; }
4678 fi
4679 
4680 
4681   test -n "$BASH" && break
4682 done
4683 
4684     else
4685       # If it succeeded, then it was overridden by the user. We will use it
4686       # for the tool.
4687 
4688       # First remove it from the list of overridden variables, so we can test
4689       # for unknown variables in the end.
4690       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4691 
4692       # Check if the provided tool contains a complete path.
4693       tool_specified="$BASH"
4694       tool_basename="${tool_specified##*/}"
4695       if test "x$tool_basename" = "x$tool_specified"; then
4696         # A command without a complete path is provided, search $PATH.
4697         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4698 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4699         # Extract the first word of "$tool_basename", so it can be a program name with args.
4700 set dummy $tool_basename; ac_word=$2
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702 $as_echo_n "checking for $ac_word... " >&6; }
4703 if ${ac_cv_path_BASH+:} false; then :
4704   $as_echo_n "(cached) " >&6
4705 else
4706   case $BASH in
4707   [\\/]* | ?:[\\/]*)
4708   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4709   ;;
4710   *)
4711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712 for as_dir in $PATH
4713 do
4714   IFS=$as_save_IFS
4715   test -z "$as_dir" && as_dir=.
4716     for ac_exec_ext in '' $ac_executable_extensions; do
4717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4718     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720     break 2
4721   fi
4722 done
4723   done
4724 IFS=$as_save_IFS
4725 
4726   ;;
4727 esac
4728 fi
4729 BASH=$ac_cv_path_BASH
4730 if test -n "$BASH"; then
4731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4732 $as_echo "$BASH" >&6; }
4733 else
4734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735 $as_echo "no" >&6; }
4736 fi
4737 
4738 
4739         if test "x$BASH" = x; then
4740           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4741         fi
4742       else
4743         # Otherwise we believe it is a complete path. Use it as it is.
4744         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4745 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4746         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4747 $as_echo_n "checking for BASH... " >&6; }
4748         if test ! -x "$tool_specified"; then
4749           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4750 $as_echo "not found" >&6; }
4751           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4752         fi
4753         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4754 $as_echo "$tool_specified" >&6; }
4755       fi
4756     fi
4757   fi
4758 
4759 
4760 
4761   if test "x$BASH" = x; then
4762     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4763   fi
4764 
4765 
4766 
4767 
4768 
4769   # Publish this variable in the help.
4770 
4771 
4772   if test "x$CAT" = x; then
4773     # The variable is not set by user, try to locate tool using the code snippet
4774     for ac_prog in cat
4775 do
4776   # Extract the first word of "$ac_prog", so it can be a program name with args.
4777 set dummy $ac_prog; ac_word=$2
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779 $as_echo_n "checking for $ac_word... " >&6; }
4780 if ${ac_cv_path_CAT+:} false; then :
4781   $as_echo_n "(cached) " >&6
4782 else
4783   case $CAT in
4784   [\\/]* | ?:[\\/]*)
4785   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4786   ;;
4787   *)
4788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789 for as_dir in $PATH
4790 do
4791   IFS=$as_save_IFS
4792   test -z "$as_dir" && as_dir=.
4793     for ac_exec_ext in '' $ac_executable_extensions; do
4794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4795     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797     break 2
4798   fi
4799 done
4800   done
4801 IFS=$as_save_IFS
4802 
4803   ;;
4804 esac
4805 fi
4806 CAT=$ac_cv_path_CAT
4807 if test -n "$CAT"; then
4808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4809 $as_echo "$CAT" >&6; }
4810 else
4811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812 $as_echo "no" >&6; }
4813 fi
4814 
4815 
4816   test -n "$CAT" && break
4817 done
4818 
4819   else
4820     # The variable is set, but is it from the command line or the environment?
4821 
4822     # Try to remove the string !CAT! from our list.
4823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4825       # If it failed, the variable was not from the command line. Ignore it,
4826       # but warn the user (except for BASH, which is always set by the calling BASH).
4827       if test "xCAT" != xBASH; then
4828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4829 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4830       fi
4831       # Try to locate tool using the code snippet
4832       for ac_prog in cat
4833 do
4834   # Extract the first word of "$ac_prog", so it can be a program name with args.
4835 set dummy $ac_prog; ac_word=$2
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837 $as_echo_n "checking for $ac_word... " >&6; }
4838 if ${ac_cv_path_CAT+:} false; then :
4839   $as_echo_n "(cached) " >&6
4840 else
4841   case $CAT in
4842   [\\/]* | ?:[\\/]*)
4843   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4844   ;;
4845   *)
4846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847 for as_dir in $PATH
4848 do
4849   IFS=$as_save_IFS
4850   test -z "$as_dir" && as_dir=.
4851     for ac_exec_ext in '' $ac_executable_extensions; do
4852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4853     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855     break 2
4856   fi
4857 done
4858   done
4859 IFS=$as_save_IFS
4860 
4861   ;;
4862 esac
4863 fi
4864 CAT=$ac_cv_path_CAT
4865 if test -n "$CAT"; then
4866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4867 $as_echo "$CAT" >&6; }
4868 else
4869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870 $as_echo "no" >&6; }
4871 fi
4872 
4873 
4874   test -n "$CAT" && break
4875 done
4876 
4877     else
4878       # If it succeeded, then it was overridden by the user. We will use it
4879       # for the tool.
4880 
4881       # First remove it from the list of overridden variables, so we can test
4882       # for unknown variables in the end.
4883       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4884 
4885       # Check if the provided tool contains a complete path.
4886       tool_specified="$CAT"
4887       tool_basename="${tool_specified##*/}"
4888       if test "x$tool_basename" = "x$tool_specified"; then
4889         # A command without a complete path is provided, search $PATH.
4890         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4891 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4892         # Extract the first word of "$tool_basename", so it can be a program name with args.
4893 set dummy $tool_basename; ac_word=$2
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4895 $as_echo_n "checking for $ac_word... " >&6; }
4896 if ${ac_cv_path_CAT+:} false; then :
4897   $as_echo_n "(cached) " >&6
4898 else
4899   case $CAT in
4900   [\\/]* | ?:[\\/]*)
4901   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4902   ;;
4903   *)
4904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905 for as_dir in $PATH
4906 do
4907   IFS=$as_save_IFS
4908   test -z "$as_dir" && as_dir=.
4909     for ac_exec_ext in '' $ac_executable_extensions; do
4910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4911     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913     break 2
4914   fi
4915 done
4916   done
4917 IFS=$as_save_IFS
4918 
4919   ;;
4920 esac
4921 fi
4922 CAT=$ac_cv_path_CAT
4923 if test -n "$CAT"; then
4924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4925 $as_echo "$CAT" >&6; }
4926 else
4927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928 $as_echo "no" >&6; }
4929 fi
4930 
4931 
4932         if test "x$CAT" = x; then
4933           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4934         fi
4935       else
4936         # Otherwise we believe it is a complete path. Use it as it is.
4937         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4938 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4939         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4940 $as_echo_n "checking for CAT... " >&6; }
4941         if test ! -x "$tool_specified"; then
4942           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4943 $as_echo "not found" >&6; }
4944           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4945         fi
4946         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4947 $as_echo "$tool_specified" >&6; }
4948       fi
4949     fi
4950   fi
4951 
4952 
4953 
4954   if test "x$CAT" = x; then
4955     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4956   fi
4957 
4958 
4959 
4960 
4961 
4962   # Publish this variable in the help.
4963 
4964 
4965   if test "x$CHMOD" = x; then
4966     # The variable is not set by user, try to locate tool using the code snippet
4967     for ac_prog in chmod
4968 do
4969   # Extract the first word of "$ac_prog", so it can be a program name with args.
4970 set dummy $ac_prog; ac_word=$2
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972 $as_echo_n "checking for $ac_word... " >&6; }
4973 if ${ac_cv_path_CHMOD+:} false; then :
4974   $as_echo_n "(cached) " >&6
4975 else
4976   case $CHMOD in
4977   [\\/]* | ?:[\\/]*)
4978   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4979   ;;
4980   *)
4981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982 for as_dir in $PATH
4983 do
4984   IFS=$as_save_IFS
4985   test -z "$as_dir" && as_dir=.
4986     for ac_exec_ext in '' $ac_executable_extensions; do
4987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990     break 2
4991   fi
4992 done
4993   done
4994 IFS=$as_save_IFS
4995 
4996   ;;
4997 esac
4998 fi
4999 CHMOD=$ac_cv_path_CHMOD
5000 if test -n "$CHMOD"; then
5001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5002 $as_echo "$CHMOD" >&6; }
5003 else
5004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005 $as_echo "no" >&6; }
5006 fi
5007 
5008 
5009   test -n "$CHMOD" && break
5010 done
5011 
5012   else
5013     # The variable is set, but is it from the command line or the environment?
5014 
5015     # Try to remove the string !CHMOD! from our list.
5016     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5017     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5018       # If it failed, the variable was not from the command line. Ignore it,
5019       # but warn the user (except for BASH, which is always set by the calling BASH).
5020       if test "xCHMOD" != xBASH; then
5021         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5022 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5023       fi
5024       # Try to locate tool using the code snippet
5025       for ac_prog in chmod
5026 do
5027   # Extract the first word of "$ac_prog", so it can be a program name with args.
5028 set dummy $ac_prog; ac_word=$2
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030 $as_echo_n "checking for $ac_word... " >&6; }
5031 if ${ac_cv_path_CHMOD+:} false; then :
5032   $as_echo_n "(cached) " >&6
5033 else
5034   case $CHMOD in
5035   [\\/]* | ?:[\\/]*)
5036   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5037   ;;
5038   *)
5039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040 for as_dir in $PATH
5041 do
5042   IFS=$as_save_IFS
5043   test -z "$as_dir" && as_dir=.
5044     for ac_exec_ext in '' $ac_executable_extensions; do
5045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048     break 2
5049   fi
5050 done
5051   done
5052 IFS=$as_save_IFS
5053 
5054   ;;
5055 esac
5056 fi
5057 CHMOD=$ac_cv_path_CHMOD
5058 if test -n "$CHMOD"; then
5059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5060 $as_echo "$CHMOD" >&6; }
5061 else
5062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063 $as_echo "no" >&6; }
5064 fi
5065 
5066 
5067   test -n "$CHMOD" && break
5068 done
5069 
5070     else
5071       # If it succeeded, then it was overridden by the user. We will use it
5072       # for the tool.
5073 
5074       # First remove it from the list of overridden variables, so we can test
5075       # for unknown variables in the end.
5076       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5077 
5078       # Check if the provided tool contains a complete path.
5079       tool_specified="$CHMOD"
5080       tool_basename="${tool_specified##*/}"
5081       if test "x$tool_basename" = "x$tool_specified"; then
5082         # A command without a complete path is provided, search $PATH.
5083         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5084 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5085         # Extract the first word of "$tool_basename", so it can be a program name with args.
5086 set dummy $tool_basename; ac_word=$2
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088 $as_echo_n "checking for $ac_word... " >&6; }
5089 if ${ac_cv_path_CHMOD+:} false; then :
5090   $as_echo_n "(cached) " >&6
5091 else
5092   case $CHMOD in
5093   [\\/]* | ?:[\\/]*)
5094   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5095   ;;
5096   *)
5097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098 for as_dir in $PATH
5099 do
5100   IFS=$as_save_IFS
5101   test -z "$as_dir" && as_dir=.
5102     for ac_exec_ext in '' $ac_executable_extensions; do
5103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106     break 2
5107   fi
5108 done
5109   done
5110 IFS=$as_save_IFS
5111 
5112   ;;
5113 esac
5114 fi
5115 CHMOD=$ac_cv_path_CHMOD
5116 if test -n "$CHMOD"; then
5117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5118 $as_echo "$CHMOD" >&6; }
5119 else
5120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121 $as_echo "no" >&6; }
5122 fi
5123 
5124 
5125         if test "x$CHMOD" = x; then
5126           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5127         fi
5128       else
5129         # Otherwise we believe it is a complete path. Use it as it is.
5130         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5131 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5132         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5133 $as_echo_n "checking for CHMOD... " >&6; }
5134         if test ! -x "$tool_specified"; then
5135           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5136 $as_echo "not found" >&6; }
5137           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5138         fi
5139         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5140 $as_echo "$tool_specified" >&6; }
5141       fi
5142     fi
5143   fi
5144 
5145 
5146 
5147   if test "x$CHMOD" = x; then
5148     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5149   fi
5150 
5151 
5152 
5153 
5154 
5155   # Publish this variable in the help.
5156 
5157 
5158   if test "x$CMP" = x; then
5159     # The variable is not set by user, try to locate tool using the code snippet
5160     for ac_prog in cmp
5161 do
5162   # Extract the first word of "$ac_prog", so it can be a program name with args.
5163 set dummy $ac_prog; ac_word=$2
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165 $as_echo_n "checking for $ac_word... " >&6; }
5166 if ${ac_cv_path_CMP+:} false; then :
5167   $as_echo_n "(cached) " >&6
5168 else
5169   case $CMP in
5170   [\\/]* | ?:[\\/]*)
5171   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5172   ;;
5173   *)
5174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5175 for as_dir in $PATH
5176 do
5177   IFS=$as_save_IFS
5178   test -z "$as_dir" && as_dir=.
5179     for ac_exec_ext in '' $ac_executable_extensions; do
5180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5181     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5183     break 2
5184   fi
5185 done
5186   done
5187 IFS=$as_save_IFS
5188 
5189   ;;
5190 esac
5191 fi
5192 CMP=$ac_cv_path_CMP
5193 if test -n "$CMP"; then
5194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5195 $as_echo "$CMP" >&6; }
5196 else
5197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198 $as_echo "no" >&6; }
5199 fi
5200 
5201 
5202   test -n "$CMP" && break
5203 done
5204 
5205   else
5206     # The variable is set, but is it from the command line or the environment?
5207 
5208     # Try to remove the string !CMP! from our list.
5209     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5210     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5211       # If it failed, the variable was not from the command line. Ignore it,
5212       # but warn the user (except for BASH, which is always set by the calling BASH).
5213       if test "xCMP" != xBASH; then
5214         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5215 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5216       fi
5217       # Try to locate tool using the code snippet
5218       for ac_prog in cmp
5219 do
5220   # Extract the first word of "$ac_prog", so it can be a program name with args.
5221 set dummy $ac_prog; ac_word=$2
5222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223 $as_echo_n "checking for $ac_word... " >&6; }
5224 if ${ac_cv_path_CMP+:} false; then :
5225   $as_echo_n "(cached) " >&6
5226 else
5227   case $CMP in
5228   [\\/]* | ?:[\\/]*)
5229   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5230   ;;
5231   *)
5232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233 for as_dir in $PATH
5234 do
5235   IFS=$as_save_IFS
5236   test -z "$as_dir" && as_dir=.
5237     for ac_exec_ext in '' $ac_executable_extensions; do
5238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241     break 2
5242   fi
5243 done
5244   done
5245 IFS=$as_save_IFS
5246 
5247   ;;
5248 esac
5249 fi
5250 CMP=$ac_cv_path_CMP
5251 if test -n "$CMP"; then
5252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5253 $as_echo "$CMP" >&6; }
5254 else
5255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256 $as_echo "no" >&6; }
5257 fi
5258 
5259 
5260   test -n "$CMP" && break
5261 done
5262 
5263     else
5264       # If it succeeded, then it was overridden by the user. We will use it
5265       # for the tool.
5266 
5267       # First remove it from the list of overridden variables, so we can test
5268       # for unknown variables in the end.
5269       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5270 
5271       # Check if the provided tool contains a complete path.
5272       tool_specified="$CMP"
5273       tool_basename="${tool_specified##*/}"
5274       if test "x$tool_basename" = "x$tool_specified"; then
5275         # A command without a complete path is provided, search $PATH.
5276         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5277 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5278         # Extract the first word of "$tool_basename", so it can be a program name with args.
5279 set dummy $tool_basename; ac_word=$2
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281 $as_echo_n "checking for $ac_word... " >&6; }
5282 if ${ac_cv_path_CMP+:} false; then :
5283   $as_echo_n "(cached) " >&6
5284 else
5285   case $CMP in
5286   [\\/]* | ?:[\\/]*)
5287   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5288   ;;
5289   *)
5290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291 for as_dir in $PATH
5292 do
5293   IFS=$as_save_IFS
5294   test -z "$as_dir" && as_dir=.
5295     for ac_exec_ext in '' $ac_executable_extensions; do
5296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299     break 2
5300   fi
5301 done
5302   done
5303 IFS=$as_save_IFS
5304 
5305   ;;
5306 esac
5307 fi
5308 CMP=$ac_cv_path_CMP
5309 if test -n "$CMP"; then
5310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5311 $as_echo "$CMP" >&6; }
5312 else
5313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314 $as_echo "no" >&6; }
5315 fi
5316 
5317 
5318         if test "x$CMP" = x; then
5319           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5320         fi
5321       else
5322         # Otherwise we believe it is a complete path. Use it as it is.
5323         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5324 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5325         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5326 $as_echo_n "checking for CMP... " >&6; }
5327         if test ! -x "$tool_specified"; then
5328           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5329 $as_echo "not found" >&6; }
5330           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5331         fi
5332         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5333 $as_echo "$tool_specified" >&6; }
5334       fi
5335     fi
5336   fi
5337 
5338 
5339 
5340   if test "x$CMP" = x; then
5341     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5342   fi
5343 
5344 
5345 
5346 
5347 
5348   # Publish this variable in the help.
5349 
5350 
5351   if test "x$COMM" = x; then
5352     # The variable is not set by user, try to locate tool using the code snippet
5353     for ac_prog in comm
5354 do
5355   # Extract the first word of "$ac_prog", so it can be a program name with args.
5356 set dummy $ac_prog; ac_word=$2
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5358 $as_echo_n "checking for $ac_word... " >&6; }
5359 if ${ac_cv_path_COMM+:} false; then :
5360   $as_echo_n "(cached) " >&6
5361 else
5362   case $COMM in
5363   [\\/]* | ?:[\\/]*)
5364   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5365   ;;
5366   *)
5367   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5368 for as_dir in $PATH
5369 do
5370   IFS=$as_save_IFS
5371   test -z "$as_dir" && as_dir=.
5372     for ac_exec_ext in '' $ac_executable_extensions; do
5373   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5374     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5376     break 2
5377   fi
5378 done
5379   done
5380 IFS=$as_save_IFS
5381 
5382   ;;
5383 esac
5384 fi
5385 COMM=$ac_cv_path_COMM
5386 if test -n "$COMM"; then
5387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5388 $as_echo "$COMM" >&6; }
5389 else
5390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391 $as_echo "no" >&6; }
5392 fi
5393 
5394 
5395   test -n "$COMM" && break
5396 done
5397 
5398   else
5399     # The variable is set, but is it from the command line or the environment?
5400 
5401     # Try to remove the string !COMM! from our list.
5402     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5403     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5404       # If it failed, the variable was not from the command line. Ignore it,
5405       # but warn the user (except for BASH, which is always set by the calling BASH).
5406       if test "xCOMM" != xBASH; then
5407         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5408 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5409       fi
5410       # Try to locate tool using the code snippet
5411       for ac_prog in comm
5412 do
5413   # Extract the first word of "$ac_prog", so it can be a program name with args.
5414 set dummy $ac_prog; ac_word=$2
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416 $as_echo_n "checking for $ac_word... " >&6; }
5417 if ${ac_cv_path_COMM+:} false; then :
5418   $as_echo_n "(cached) " >&6
5419 else
5420   case $COMM in
5421   [\\/]* | ?:[\\/]*)
5422   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5423   ;;
5424   *)
5425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426 for as_dir in $PATH
5427 do
5428   IFS=$as_save_IFS
5429   test -z "$as_dir" && as_dir=.
5430     for ac_exec_ext in '' $ac_executable_extensions; do
5431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5432     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434     break 2
5435   fi
5436 done
5437   done
5438 IFS=$as_save_IFS
5439 
5440   ;;
5441 esac
5442 fi
5443 COMM=$ac_cv_path_COMM
5444 if test -n "$COMM"; then
5445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5446 $as_echo "$COMM" >&6; }
5447 else
5448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449 $as_echo "no" >&6; }
5450 fi
5451 
5452 
5453   test -n "$COMM" && break
5454 done
5455 
5456     else
5457       # If it succeeded, then it was overridden by the user. We will use it
5458       # for the tool.
5459 
5460       # First remove it from the list of overridden variables, so we can test
5461       # for unknown variables in the end.
5462       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5463 
5464       # Check if the provided tool contains a complete path.
5465       tool_specified="$COMM"
5466       tool_basename="${tool_specified##*/}"
5467       if test "x$tool_basename" = "x$tool_specified"; then
5468         # A command without a complete path is provided, search $PATH.
5469         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5470 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5471         # Extract the first word of "$tool_basename", so it can be a program name with args.
5472 set dummy $tool_basename; ac_word=$2
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474 $as_echo_n "checking for $ac_word... " >&6; }
5475 if ${ac_cv_path_COMM+:} false; then :
5476   $as_echo_n "(cached) " >&6
5477 else
5478   case $COMM in
5479   [\\/]* | ?:[\\/]*)
5480   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5481   ;;
5482   *)
5483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484 for as_dir in $PATH
5485 do
5486   IFS=$as_save_IFS
5487   test -z "$as_dir" && as_dir=.
5488     for ac_exec_ext in '' $ac_executable_extensions; do
5489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5490     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492     break 2
5493   fi
5494 done
5495   done
5496 IFS=$as_save_IFS
5497 
5498   ;;
5499 esac
5500 fi
5501 COMM=$ac_cv_path_COMM
5502 if test -n "$COMM"; then
5503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5504 $as_echo "$COMM" >&6; }
5505 else
5506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507 $as_echo "no" >&6; }
5508 fi
5509 
5510 
5511         if test "x$COMM" = x; then
5512           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5513         fi
5514       else
5515         # Otherwise we believe it is a complete path. Use it as it is.
5516         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5517 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5518         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5519 $as_echo_n "checking for COMM... " >&6; }
5520         if test ! -x "$tool_specified"; then
5521           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5522 $as_echo "not found" >&6; }
5523           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5524         fi
5525         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5526 $as_echo "$tool_specified" >&6; }
5527       fi
5528     fi
5529   fi
5530 
5531 
5532 
5533   if test "x$COMM" = x; then
5534     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5535   fi
5536 
5537 
5538 
5539 
5540 
5541   # Publish this variable in the help.
5542 
5543 
5544   if test "x$CP" = x; then
5545     # The variable is not set by user, try to locate tool using the code snippet
5546     for ac_prog in cp
5547 do
5548   # Extract the first word of "$ac_prog", so it can be a program name with args.
5549 set dummy $ac_prog; ac_word=$2
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551 $as_echo_n "checking for $ac_word... " >&6; }
5552 if ${ac_cv_path_CP+:} false; then :
5553   $as_echo_n "(cached) " >&6
5554 else
5555   case $CP in
5556   [\\/]* | ?:[\\/]*)
5557   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5558   ;;
5559   *)
5560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561 for as_dir in $PATH
5562 do
5563   IFS=$as_save_IFS
5564   test -z "$as_dir" && as_dir=.
5565     for ac_exec_ext in '' $ac_executable_extensions; do
5566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569     break 2
5570   fi
5571 done
5572   done
5573 IFS=$as_save_IFS
5574 
5575   ;;
5576 esac
5577 fi
5578 CP=$ac_cv_path_CP
5579 if test -n "$CP"; then
5580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5581 $as_echo "$CP" >&6; }
5582 else
5583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5585 fi
5586 
5587 
5588   test -n "$CP" && break
5589 done
5590 
5591   else
5592     # The variable is set, but is it from the command line or the environment?
5593 
5594     # Try to remove the string !CP! from our list.
5595     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5596     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5597       # If it failed, the variable was not from the command line. Ignore it,
5598       # but warn the user (except for BASH, which is always set by the calling BASH).
5599       if test "xCP" != xBASH; then
5600         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5601 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5602       fi
5603       # Try to locate tool using the code snippet
5604       for ac_prog in cp
5605 do
5606   # Extract the first word of "$ac_prog", so it can be a program name with args.
5607 set dummy $ac_prog; ac_word=$2
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609 $as_echo_n "checking for $ac_word... " >&6; }
5610 if ${ac_cv_path_CP+:} false; then :
5611   $as_echo_n "(cached) " >&6
5612 else
5613   case $CP in
5614   [\\/]* | ?:[\\/]*)
5615   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5616   ;;
5617   *)
5618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619 for as_dir in $PATH
5620 do
5621   IFS=$as_save_IFS
5622   test -z "$as_dir" && as_dir=.
5623     for ac_exec_ext in '' $ac_executable_extensions; do
5624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5625     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5627     break 2
5628   fi
5629 done
5630   done
5631 IFS=$as_save_IFS
5632 
5633   ;;
5634 esac
5635 fi
5636 CP=$ac_cv_path_CP
5637 if test -n "$CP"; then
5638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5639 $as_echo "$CP" >&6; }
5640 else
5641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642 $as_echo "no" >&6; }
5643 fi
5644 
5645 
5646   test -n "$CP" && break
5647 done
5648 
5649     else
5650       # If it succeeded, then it was overridden by the user. We will use it
5651       # for the tool.
5652 
5653       # First remove it from the list of overridden variables, so we can test
5654       # for unknown variables in the end.
5655       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5656 
5657       # Check if the provided tool contains a complete path.
5658       tool_specified="$CP"
5659       tool_basename="${tool_specified##*/}"
5660       if test "x$tool_basename" = "x$tool_specified"; then
5661         # A command without a complete path is provided, search $PATH.
5662         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5663 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5664         # Extract the first word of "$tool_basename", so it can be a program name with args.
5665 set dummy $tool_basename; ac_word=$2
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667 $as_echo_n "checking for $ac_word... " >&6; }
5668 if ${ac_cv_path_CP+:} false; then :
5669   $as_echo_n "(cached) " >&6
5670 else
5671   case $CP in
5672   [\\/]* | ?:[\\/]*)
5673   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5674   ;;
5675   *)
5676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677 for as_dir in $PATH
5678 do
5679   IFS=$as_save_IFS
5680   test -z "$as_dir" && as_dir=.
5681     for ac_exec_ext in '' $ac_executable_extensions; do
5682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5683     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5685     break 2
5686   fi
5687 done
5688   done
5689 IFS=$as_save_IFS
5690 
5691   ;;
5692 esac
5693 fi
5694 CP=$ac_cv_path_CP
5695 if test -n "$CP"; then
5696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5697 $as_echo "$CP" >&6; }
5698 else
5699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700 $as_echo "no" >&6; }
5701 fi
5702 
5703 
5704         if test "x$CP" = x; then
5705           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5706         fi
5707       else
5708         # Otherwise we believe it is a complete path. Use it as it is.
5709         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5710 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5711         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5712 $as_echo_n "checking for CP... " >&6; }
5713         if test ! -x "$tool_specified"; then
5714           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5715 $as_echo "not found" >&6; }
5716           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5717         fi
5718         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5719 $as_echo "$tool_specified" >&6; }
5720       fi
5721     fi
5722   fi
5723 
5724 
5725 
5726   if test "x$CP" = x; then
5727     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5728   fi
5729 
5730 
5731 
5732 
5733 
5734   # Publish this variable in the help.
5735 
5736 
5737   if test "x$CUT" = x; then
5738     # The variable is not set by user, try to locate tool using the code snippet
5739     for ac_prog in cut
5740 do
5741   # Extract the first word of "$ac_prog", so it can be a program name with args.
5742 set dummy $ac_prog; ac_word=$2
5743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5744 $as_echo_n "checking for $ac_word... " >&6; }
5745 if ${ac_cv_path_CUT+:} false; then :
5746   $as_echo_n "(cached) " >&6
5747 else
5748   case $CUT in
5749   [\\/]* | ?:[\\/]*)
5750   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5751   ;;
5752   *)
5753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5754 for as_dir in $PATH
5755 do
5756   IFS=$as_save_IFS
5757   test -z "$as_dir" && as_dir=.
5758     for ac_exec_ext in '' $ac_executable_extensions; do
5759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5760     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5762     break 2
5763   fi
5764 done
5765   done
5766 IFS=$as_save_IFS
5767 
5768   ;;
5769 esac
5770 fi
5771 CUT=$ac_cv_path_CUT
5772 if test -n "$CUT"; then
5773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5774 $as_echo "$CUT" >&6; }
5775 else
5776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777 $as_echo "no" >&6; }
5778 fi
5779 
5780 
5781   test -n "$CUT" && break
5782 done
5783 
5784   else
5785     # The variable is set, but is it from the command line or the environment?
5786 
5787     # Try to remove the string !CUT! from our list.
5788     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5789     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5790       # If it failed, the variable was not from the command line. Ignore it,
5791       # but warn the user (except for BASH, which is always set by the calling BASH).
5792       if test "xCUT" != xBASH; then
5793         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5794 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5795       fi
5796       # Try to locate tool using the code snippet
5797       for ac_prog in cut
5798 do
5799   # Extract the first word of "$ac_prog", so it can be a program name with args.
5800 set dummy $ac_prog; ac_word=$2
5801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802 $as_echo_n "checking for $ac_word... " >&6; }
5803 if ${ac_cv_path_CUT+:} false; then :
5804   $as_echo_n "(cached) " >&6
5805 else
5806   case $CUT in
5807   [\\/]* | ?:[\\/]*)
5808   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5809   ;;
5810   *)
5811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812 for as_dir in $PATH
5813 do
5814   IFS=$as_save_IFS
5815   test -z "$as_dir" && as_dir=.
5816     for ac_exec_ext in '' $ac_executable_extensions; do
5817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5818     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820     break 2
5821   fi
5822 done
5823   done
5824 IFS=$as_save_IFS
5825 
5826   ;;
5827 esac
5828 fi
5829 CUT=$ac_cv_path_CUT
5830 if test -n "$CUT"; then
5831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5832 $as_echo "$CUT" >&6; }
5833 else
5834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835 $as_echo "no" >&6; }
5836 fi
5837 
5838 
5839   test -n "$CUT" && break
5840 done
5841 
5842     else
5843       # If it succeeded, then it was overridden by the user. We will use it
5844       # for the tool.
5845 
5846       # First remove it from the list of overridden variables, so we can test
5847       # for unknown variables in the end.
5848       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5849 
5850       # Check if the provided tool contains a complete path.
5851       tool_specified="$CUT"
5852       tool_basename="${tool_specified##*/}"
5853       if test "x$tool_basename" = "x$tool_specified"; then
5854         # A command without a complete path is provided, search $PATH.
5855         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5856 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5857         # Extract the first word of "$tool_basename", so it can be a program name with args.
5858 set dummy $tool_basename; ac_word=$2
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5860 $as_echo_n "checking for $ac_word... " >&6; }
5861 if ${ac_cv_path_CUT+:} false; then :
5862   $as_echo_n "(cached) " >&6
5863 else
5864   case $CUT in
5865   [\\/]* | ?:[\\/]*)
5866   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5867   ;;
5868   *)
5869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870 for as_dir in $PATH
5871 do
5872   IFS=$as_save_IFS
5873   test -z "$as_dir" && as_dir=.
5874     for ac_exec_ext in '' $ac_executable_extensions; do
5875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5876     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878     break 2
5879   fi
5880 done
5881   done
5882 IFS=$as_save_IFS
5883 
5884   ;;
5885 esac
5886 fi
5887 CUT=$ac_cv_path_CUT
5888 if test -n "$CUT"; then
5889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5890 $as_echo "$CUT" >&6; }
5891 else
5892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893 $as_echo "no" >&6; }
5894 fi
5895 
5896 
5897         if test "x$CUT" = x; then
5898           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5899         fi
5900       else
5901         # Otherwise we believe it is a complete path. Use it as it is.
5902         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5903 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5904         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5905 $as_echo_n "checking for CUT... " >&6; }
5906         if test ! -x "$tool_specified"; then
5907           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5908 $as_echo "not found" >&6; }
5909           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5910         fi
5911         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5912 $as_echo "$tool_specified" >&6; }
5913       fi
5914     fi
5915   fi
5916 
5917 
5918 
5919   if test "x$CUT" = x; then
5920     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5921   fi
5922 
5923 
5924 
5925 
5926 
5927   # Publish this variable in the help.
5928 
5929 
5930   if test "x$DATE" = x; then
5931     # The variable is not set by user, try to locate tool using the code snippet
5932     for ac_prog in date
5933 do
5934   # Extract the first word of "$ac_prog", so it can be a program name with args.
5935 set dummy $ac_prog; ac_word=$2
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937 $as_echo_n "checking for $ac_word... " >&6; }
5938 if ${ac_cv_path_DATE+:} false; then :
5939   $as_echo_n "(cached) " >&6
5940 else
5941   case $DATE in
5942   [\\/]* | ?:[\\/]*)
5943   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5944   ;;
5945   *)
5946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947 for as_dir in $PATH
5948 do
5949   IFS=$as_save_IFS
5950   test -z "$as_dir" && as_dir=.
5951     for ac_exec_ext in '' $ac_executable_extensions; do
5952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5953     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955     break 2
5956   fi
5957 done
5958   done
5959 IFS=$as_save_IFS
5960 
5961   ;;
5962 esac
5963 fi
5964 DATE=$ac_cv_path_DATE
5965 if test -n "$DATE"; then
5966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5967 $as_echo "$DATE" >&6; }
5968 else
5969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970 $as_echo "no" >&6; }
5971 fi
5972 
5973 
5974   test -n "$DATE" && break
5975 done
5976 
5977   else
5978     # The variable is set, but is it from the command line or the environment?
5979 
5980     # Try to remove the string !DATE! from our list.
5981     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5982     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5983       # If it failed, the variable was not from the command line. Ignore it,
5984       # but warn the user (except for BASH, which is always set by the calling BASH).
5985       if test "xDATE" != xBASH; then
5986         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5987 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5988       fi
5989       # Try to locate tool using the code snippet
5990       for ac_prog in date
5991 do
5992   # Extract the first word of "$ac_prog", so it can be a program name with args.
5993 set dummy $ac_prog; ac_word=$2
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995 $as_echo_n "checking for $ac_word... " >&6; }
5996 if ${ac_cv_path_DATE+:} false; then :
5997   $as_echo_n "(cached) " >&6
5998 else
5999   case $DATE in
6000   [\\/]* | ?:[\\/]*)
6001   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6002   ;;
6003   *)
6004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005 for as_dir in $PATH
6006 do
6007   IFS=$as_save_IFS
6008   test -z "$as_dir" && as_dir=.
6009     for ac_exec_ext in '' $ac_executable_extensions; do
6010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6011     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013     break 2
6014   fi
6015 done
6016   done
6017 IFS=$as_save_IFS
6018 
6019   ;;
6020 esac
6021 fi
6022 DATE=$ac_cv_path_DATE
6023 if test -n "$DATE"; then
6024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6025 $as_echo "$DATE" >&6; }
6026 else
6027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028 $as_echo "no" >&6; }
6029 fi
6030 
6031 
6032   test -n "$DATE" && break
6033 done
6034 
6035     else
6036       # If it succeeded, then it was overridden by the user. We will use it
6037       # for the tool.
6038 
6039       # First remove it from the list of overridden variables, so we can test
6040       # for unknown variables in the end.
6041       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6042 
6043       # Check if the provided tool contains a complete path.
6044       tool_specified="$DATE"
6045       tool_basename="${tool_specified##*/}"
6046       if test "x$tool_basename" = "x$tool_specified"; then
6047         # A command without a complete path is provided, search $PATH.
6048         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6049 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6050         # Extract the first word of "$tool_basename", so it can be a program name with args.
6051 set dummy $tool_basename; ac_word=$2
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053 $as_echo_n "checking for $ac_word... " >&6; }
6054 if ${ac_cv_path_DATE+:} false; then :
6055   $as_echo_n "(cached) " >&6
6056 else
6057   case $DATE in
6058   [\\/]* | ?:[\\/]*)
6059   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6060   ;;
6061   *)
6062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063 for as_dir in $PATH
6064 do
6065   IFS=$as_save_IFS
6066   test -z "$as_dir" && as_dir=.
6067     for ac_exec_ext in '' $ac_executable_extensions; do
6068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6069     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6071     break 2
6072   fi
6073 done
6074   done
6075 IFS=$as_save_IFS
6076 
6077   ;;
6078 esac
6079 fi
6080 DATE=$ac_cv_path_DATE
6081 if test -n "$DATE"; then
6082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6083 $as_echo "$DATE" >&6; }
6084 else
6085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086 $as_echo "no" >&6; }
6087 fi
6088 
6089 
6090         if test "x$DATE" = x; then
6091           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6092         fi
6093       else
6094         # Otherwise we believe it is a complete path. Use it as it is.
6095         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6096 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6098 $as_echo_n "checking for DATE... " >&6; }
6099         if test ! -x "$tool_specified"; then
6100           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6101 $as_echo "not found" >&6; }
6102           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6103         fi
6104         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6105 $as_echo "$tool_specified" >&6; }
6106       fi
6107     fi
6108   fi
6109 
6110 
6111 
6112   if test "x$DATE" = x; then
6113     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6114   fi
6115 
6116 
6117 
6118 
6119 
6120   # Publish this variable in the help.
6121 
6122 
6123   if test "x$DIFF" = x; then
6124     # The variable is not set by user, try to locate tool using the code snippet
6125     for ac_prog in gdiff diff
6126 do
6127   # Extract the first word of "$ac_prog", so it can be a program name with args.
6128 set dummy $ac_prog; ac_word=$2
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130 $as_echo_n "checking for $ac_word... " >&6; }
6131 if ${ac_cv_path_DIFF+:} false; then :
6132   $as_echo_n "(cached) " >&6
6133 else
6134   case $DIFF in
6135   [\\/]* | ?:[\\/]*)
6136   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6137   ;;
6138   *)
6139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140 for as_dir in $PATH
6141 do
6142   IFS=$as_save_IFS
6143   test -z "$as_dir" && as_dir=.
6144     for ac_exec_ext in '' $ac_executable_extensions; do
6145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6146     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6148     break 2
6149   fi
6150 done
6151   done
6152 IFS=$as_save_IFS
6153 
6154   ;;
6155 esac
6156 fi
6157 DIFF=$ac_cv_path_DIFF
6158 if test -n "$DIFF"; then
6159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6160 $as_echo "$DIFF" >&6; }
6161 else
6162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163 $as_echo "no" >&6; }
6164 fi
6165 
6166 
6167   test -n "$DIFF" && break
6168 done
6169 
6170   else
6171     # The variable is set, but is it from the command line or the environment?
6172 
6173     # Try to remove the string !DIFF! from our list.
6174     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6175     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6176       # If it failed, the variable was not from the command line. Ignore it,
6177       # but warn the user (except for BASH, which is always set by the calling BASH).
6178       if test "xDIFF" != xBASH; then
6179         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6180 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6181       fi
6182       # Try to locate tool using the code snippet
6183       for ac_prog in gdiff diff
6184 do
6185   # Extract the first word of "$ac_prog", so it can be a program name with args.
6186 set dummy $ac_prog; ac_word=$2
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188 $as_echo_n "checking for $ac_word... " >&6; }
6189 if ${ac_cv_path_DIFF+:} false; then :
6190   $as_echo_n "(cached) " >&6
6191 else
6192   case $DIFF in
6193   [\\/]* | ?:[\\/]*)
6194   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6195   ;;
6196   *)
6197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198 for as_dir in $PATH
6199 do
6200   IFS=$as_save_IFS
6201   test -z "$as_dir" && as_dir=.
6202     for ac_exec_ext in '' $ac_executable_extensions; do
6203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206     break 2
6207   fi
6208 done
6209   done
6210 IFS=$as_save_IFS
6211 
6212   ;;
6213 esac
6214 fi
6215 DIFF=$ac_cv_path_DIFF
6216 if test -n "$DIFF"; then
6217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6218 $as_echo "$DIFF" >&6; }
6219 else
6220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221 $as_echo "no" >&6; }
6222 fi
6223 
6224 
6225   test -n "$DIFF" && break
6226 done
6227 
6228     else
6229       # If it succeeded, then it was overridden by the user. We will use it
6230       # for the tool.
6231 
6232       # First remove it from the list of overridden variables, so we can test
6233       # for unknown variables in the end.
6234       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6235 
6236       # Check if the provided tool contains a complete path.
6237       tool_specified="$DIFF"
6238       tool_basename="${tool_specified##*/}"
6239       if test "x$tool_basename" = "x$tool_specified"; then
6240         # A command without a complete path is provided, search $PATH.
6241         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6242 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6243         # Extract the first word of "$tool_basename", so it can be a program name with args.
6244 set dummy $tool_basename; ac_word=$2
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246 $as_echo_n "checking for $ac_word... " >&6; }
6247 if ${ac_cv_path_DIFF+:} false; then :
6248   $as_echo_n "(cached) " >&6
6249 else
6250   case $DIFF in
6251   [\\/]* | ?:[\\/]*)
6252   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6253   ;;
6254   *)
6255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256 for as_dir in $PATH
6257 do
6258   IFS=$as_save_IFS
6259   test -z "$as_dir" && as_dir=.
6260     for ac_exec_ext in '' $ac_executable_extensions; do
6261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264     break 2
6265   fi
6266 done
6267   done
6268 IFS=$as_save_IFS
6269 
6270   ;;
6271 esac
6272 fi
6273 DIFF=$ac_cv_path_DIFF
6274 if test -n "$DIFF"; then
6275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6276 $as_echo "$DIFF" >&6; }
6277 else
6278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279 $as_echo "no" >&6; }
6280 fi
6281 
6282 
6283         if test "x$DIFF" = x; then
6284           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6285         fi
6286       else
6287         # Otherwise we believe it is a complete path. Use it as it is.
6288         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6289 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6290         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6291 $as_echo_n "checking for DIFF... " >&6; }
6292         if test ! -x "$tool_specified"; then
6293           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6294 $as_echo "not found" >&6; }
6295           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6296         fi
6297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6298 $as_echo "$tool_specified" >&6; }
6299       fi
6300     fi
6301   fi
6302 
6303 
6304 
6305   if test "x$DIFF" = x; then
6306     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6307   fi
6308 
6309 
6310 
6311 
6312 
6313   # Publish this variable in the help.
6314 
6315 
6316   if test "x$DIRNAME" = x; then
6317     # The variable is not set by user, try to locate tool using the code snippet
6318     for ac_prog in dirname
6319 do
6320   # Extract the first word of "$ac_prog", so it can be a program name with args.
6321 set dummy $ac_prog; ac_word=$2
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323 $as_echo_n "checking for $ac_word... " >&6; }
6324 if ${ac_cv_path_DIRNAME+:} false; then :
6325   $as_echo_n "(cached) " >&6
6326 else
6327   case $DIRNAME in
6328   [\\/]* | ?:[\\/]*)
6329   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6330   ;;
6331   *)
6332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333 for as_dir in $PATH
6334 do
6335   IFS=$as_save_IFS
6336   test -z "$as_dir" && as_dir=.
6337     for ac_exec_ext in '' $ac_executable_extensions; do
6338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6339     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6341     break 2
6342   fi
6343 done
6344   done
6345 IFS=$as_save_IFS
6346 
6347   ;;
6348 esac
6349 fi
6350 DIRNAME=$ac_cv_path_DIRNAME
6351 if test -n "$DIRNAME"; then
6352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6353 $as_echo "$DIRNAME" >&6; }
6354 else
6355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356 $as_echo "no" >&6; }
6357 fi
6358 
6359 
6360   test -n "$DIRNAME" && break
6361 done
6362 
6363   else
6364     # The variable is set, but is it from the command line or the environment?
6365 
6366     # Try to remove the string !DIRNAME! from our list.
6367     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6368     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6369       # If it failed, the variable was not from the command line. Ignore it,
6370       # but warn the user (except for BASH, which is always set by the calling BASH).
6371       if test "xDIRNAME" != xBASH; then
6372         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6373 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6374       fi
6375       # Try to locate tool using the code snippet
6376       for ac_prog in dirname
6377 do
6378   # Extract the first word of "$ac_prog", so it can be a program name with args.
6379 set dummy $ac_prog; ac_word=$2
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6381 $as_echo_n "checking for $ac_word... " >&6; }
6382 if ${ac_cv_path_DIRNAME+:} false; then :
6383   $as_echo_n "(cached) " >&6
6384 else
6385   case $DIRNAME in
6386   [\\/]* | ?:[\\/]*)
6387   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6388   ;;
6389   *)
6390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6391 for as_dir in $PATH
6392 do
6393   IFS=$as_save_IFS
6394   test -z "$as_dir" && as_dir=.
6395     for ac_exec_ext in '' $ac_executable_extensions; do
6396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6397     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6399     break 2
6400   fi
6401 done
6402   done
6403 IFS=$as_save_IFS
6404 
6405   ;;
6406 esac
6407 fi
6408 DIRNAME=$ac_cv_path_DIRNAME
6409 if test -n "$DIRNAME"; then
6410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6411 $as_echo "$DIRNAME" >&6; }
6412 else
6413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414 $as_echo "no" >&6; }
6415 fi
6416 
6417 
6418   test -n "$DIRNAME" && break
6419 done
6420 
6421     else
6422       # If it succeeded, then it was overridden by the user. We will use it
6423       # for the tool.
6424 
6425       # First remove it from the list of overridden variables, so we can test
6426       # for unknown variables in the end.
6427       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6428 
6429       # Check if the provided tool contains a complete path.
6430       tool_specified="$DIRNAME"
6431       tool_basename="${tool_specified##*/}"
6432       if test "x$tool_basename" = "x$tool_specified"; then
6433         # A command without a complete path is provided, search $PATH.
6434         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6435 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6436         # Extract the first word of "$tool_basename", so it can be a program name with args.
6437 set dummy $tool_basename; ac_word=$2
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439 $as_echo_n "checking for $ac_word... " >&6; }
6440 if ${ac_cv_path_DIRNAME+:} false; then :
6441   $as_echo_n "(cached) " >&6
6442 else
6443   case $DIRNAME in
6444   [\\/]* | ?:[\\/]*)
6445   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6446   ;;
6447   *)
6448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449 for as_dir in $PATH
6450 do
6451   IFS=$as_save_IFS
6452   test -z "$as_dir" && as_dir=.
6453     for ac_exec_ext in '' $ac_executable_extensions; do
6454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6455     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6457     break 2
6458   fi
6459 done
6460   done
6461 IFS=$as_save_IFS
6462 
6463   ;;
6464 esac
6465 fi
6466 DIRNAME=$ac_cv_path_DIRNAME
6467 if test -n "$DIRNAME"; then
6468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6469 $as_echo "$DIRNAME" >&6; }
6470 else
6471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472 $as_echo "no" >&6; }
6473 fi
6474 
6475 
6476         if test "x$DIRNAME" = x; then
6477           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6478         fi
6479       else
6480         # Otherwise we believe it is a complete path. Use it as it is.
6481         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6482 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6483         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6484 $as_echo_n "checking for DIRNAME... " >&6; }
6485         if test ! -x "$tool_specified"; then
6486           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6487 $as_echo "not found" >&6; }
6488           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6489         fi
6490         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6491 $as_echo "$tool_specified" >&6; }
6492       fi
6493     fi
6494   fi
6495 
6496 
6497 
6498   if test "x$DIRNAME" = x; then
6499     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6500   fi
6501 
6502 
6503 
6504 
6505 
6506   # Publish this variable in the help.
6507 
6508 
6509   if test "x$ECHO" = x; then
6510     # The variable is not set by user, try to locate tool using the code snippet
6511     for ac_prog in echo
6512 do
6513   # Extract the first word of "$ac_prog", so it can be a program name with args.
6514 set dummy $ac_prog; ac_word=$2
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516 $as_echo_n "checking for $ac_word... " >&6; }
6517 if ${ac_cv_path_ECHO+:} false; then :
6518   $as_echo_n "(cached) " >&6
6519 else
6520   case $ECHO in
6521   [\\/]* | ?:[\\/]*)
6522   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6523   ;;
6524   *)
6525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526 for as_dir in $PATH
6527 do
6528   IFS=$as_save_IFS
6529   test -z "$as_dir" && as_dir=.
6530     for ac_exec_ext in '' $ac_executable_extensions; do
6531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534     break 2
6535   fi
6536 done
6537   done
6538 IFS=$as_save_IFS
6539 
6540   ;;
6541 esac
6542 fi
6543 ECHO=$ac_cv_path_ECHO
6544 if test -n "$ECHO"; then
6545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6546 $as_echo "$ECHO" >&6; }
6547 else
6548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549 $as_echo "no" >&6; }
6550 fi
6551 
6552 
6553   test -n "$ECHO" && break
6554 done
6555 
6556   else
6557     # The variable is set, but is it from the command line or the environment?
6558 
6559     # Try to remove the string !ECHO! from our list.
6560     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6561     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6562       # If it failed, the variable was not from the command line. Ignore it,
6563       # but warn the user (except for BASH, which is always set by the calling BASH).
6564       if test "xECHO" != xBASH; then
6565         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6566 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6567       fi
6568       # Try to locate tool using the code snippet
6569       for ac_prog in echo
6570 do
6571   # Extract the first word of "$ac_prog", so it can be a program name with args.
6572 set dummy $ac_prog; ac_word=$2
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574 $as_echo_n "checking for $ac_word... " >&6; }
6575 if ${ac_cv_path_ECHO+:} false; then :
6576   $as_echo_n "(cached) " >&6
6577 else
6578   case $ECHO in
6579   [\\/]* | ?:[\\/]*)
6580   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6581   ;;
6582   *)
6583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584 for as_dir in $PATH
6585 do
6586   IFS=$as_save_IFS
6587   test -z "$as_dir" && as_dir=.
6588     for ac_exec_ext in '' $ac_executable_extensions; do
6589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592     break 2
6593   fi
6594 done
6595   done
6596 IFS=$as_save_IFS
6597 
6598   ;;
6599 esac
6600 fi
6601 ECHO=$ac_cv_path_ECHO
6602 if test -n "$ECHO"; then
6603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6604 $as_echo "$ECHO" >&6; }
6605 else
6606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607 $as_echo "no" >&6; }
6608 fi
6609 
6610 
6611   test -n "$ECHO" && break
6612 done
6613 
6614     else
6615       # If it succeeded, then it was overridden by the user. We will use it
6616       # for the tool.
6617 
6618       # First remove it from the list of overridden variables, so we can test
6619       # for unknown variables in the end.
6620       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6621 
6622       # Check if the provided tool contains a complete path.
6623       tool_specified="$ECHO"
6624       tool_basename="${tool_specified##*/}"
6625       if test "x$tool_basename" = "x$tool_specified"; then
6626         # A command without a complete path is provided, search $PATH.
6627         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6628 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6629         # Extract the first word of "$tool_basename", so it can be a program name with args.
6630 set dummy $tool_basename; ac_word=$2
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632 $as_echo_n "checking for $ac_word... " >&6; }
6633 if ${ac_cv_path_ECHO+:} false; then :
6634   $as_echo_n "(cached) " >&6
6635 else
6636   case $ECHO in
6637   [\\/]* | ?:[\\/]*)
6638   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6639   ;;
6640   *)
6641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642 for as_dir in $PATH
6643 do
6644   IFS=$as_save_IFS
6645   test -z "$as_dir" && as_dir=.
6646     for ac_exec_ext in '' $ac_executable_extensions; do
6647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6648     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6650     break 2
6651   fi
6652 done
6653   done
6654 IFS=$as_save_IFS
6655 
6656   ;;
6657 esac
6658 fi
6659 ECHO=$ac_cv_path_ECHO
6660 if test -n "$ECHO"; then
6661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6662 $as_echo "$ECHO" >&6; }
6663 else
6664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665 $as_echo "no" >&6; }
6666 fi
6667 
6668 
6669         if test "x$ECHO" = x; then
6670           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6671         fi
6672       else
6673         # Otherwise we believe it is a complete path. Use it as it is.
6674         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6675 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6676         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6677 $as_echo_n "checking for ECHO... " >&6; }
6678         if test ! -x "$tool_specified"; then
6679           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6680 $as_echo "not found" >&6; }
6681           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6682         fi
6683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6684 $as_echo "$tool_specified" >&6; }
6685       fi
6686     fi
6687   fi
6688 
6689 
6690 
6691   if test "x$ECHO" = x; then
6692     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6693   fi
6694 
6695 
6696 
6697 
6698 
6699   # Publish this variable in the help.
6700 
6701 
6702   if test "x$EXPR" = x; then
6703     # The variable is not set by user, try to locate tool using the code snippet
6704     for ac_prog in expr
6705 do
6706   # Extract the first word of "$ac_prog", so it can be a program name with args.
6707 set dummy $ac_prog; ac_word=$2
6708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709 $as_echo_n "checking for $ac_word... " >&6; }
6710 if ${ac_cv_path_EXPR+:} false; then :
6711   $as_echo_n "(cached) " >&6
6712 else
6713   case $EXPR in
6714   [\\/]* | ?:[\\/]*)
6715   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6716   ;;
6717   *)
6718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719 for as_dir in $PATH
6720 do
6721   IFS=$as_save_IFS
6722   test -z "$as_dir" && as_dir=.
6723     for ac_exec_ext in '' $ac_executable_extensions; do
6724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6725     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6727     break 2
6728   fi
6729 done
6730   done
6731 IFS=$as_save_IFS
6732 
6733   ;;
6734 esac
6735 fi
6736 EXPR=$ac_cv_path_EXPR
6737 if test -n "$EXPR"; then
6738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6739 $as_echo "$EXPR" >&6; }
6740 else
6741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742 $as_echo "no" >&6; }
6743 fi
6744 
6745 
6746   test -n "$EXPR" && break
6747 done
6748 
6749   else
6750     # The variable is set, but is it from the command line or the environment?
6751 
6752     # Try to remove the string !EXPR! from our list.
6753     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6754     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6755       # If it failed, the variable was not from the command line. Ignore it,
6756       # but warn the user (except for BASH, which is always set by the calling BASH).
6757       if test "xEXPR" != xBASH; then
6758         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6759 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6760       fi
6761       # Try to locate tool using the code snippet
6762       for ac_prog in expr
6763 do
6764   # Extract the first word of "$ac_prog", so it can be a program name with args.
6765 set dummy $ac_prog; ac_word=$2
6766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6767 $as_echo_n "checking for $ac_word... " >&6; }
6768 if ${ac_cv_path_EXPR+:} false; then :
6769   $as_echo_n "(cached) " >&6
6770 else
6771   case $EXPR in
6772   [\\/]* | ?:[\\/]*)
6773   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6774   ;;
6775   *)
6776   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6777 for as_dir in $PATH
6778 do
6779   IFS=$as_save_IFS
6780   test -z "$as_dir" && as_dir=.
6781     for ac_exec_ext in '' $ac_executable_extensions; do
6782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6783     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6785     break 2
6786   fi
6787 done
6788   done
6789 IFS=$as_save_IFS
6790 
6791   ;;
6792 esac
6793 fi
6794 EXPR=$ac_cv_path_EXPR
6795 if test -n "$EXPR"; then
6796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6797 $as_echo "$EXPR" >&6; }
6798 else
6799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6800 $as_echo "no" >&6; }
6801 fi
6802 
6803 
6804   test -n "$EXPR" && break
6805 done
6806 
6807     else
6808       # If it succeeded, then it was overridden by the user. We will use it
6809       # for the tool.
6810 
6811       # First remove it from the list of overridden variables, so we can test
6812       # for unknown variables in the end.
6813       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6814 
6815       # Check if the provided tool contains a complete path.
6816       tool_specified="$EXPR"
6817       tool_basename="${tool_specified##*/}"
6818       if test "x$tool_basename" = "x$tool_specified"; then
6819         # A command without a complete path is provided, search $PATH.
6820         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6821 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6822         # Extract the first word of "$tool_basename", so it can be a program name with args.
6823 set dummy $tool_basename; ac_word=$2
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6825 $as_echo_n "checking for $ac_word... " >&6; }
6826 if ${ac_cv_path_EXPR+:} false; then :
6827   $as_echo_n "(cached) " >&6
6828 else
6829   case $EXPR in
6830   [\\/]* | ?:[\\/]*)
6831   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6832   ;;
6833   *)
6834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6835 for as_dir in $PATH
6836 do
6837   IFS=$as_save_IFS
6838   test -z "$as_dir" && as_dir=.
6839     for ac_exec_ext in '' $ac_executable_extensions; do
6840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6841     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6843     break 2
6844   fi
6845 done
6846   done
6847 IFS=$as_save_IFS
6848 
6849   ;;
6850 esac
6851 fi
6852 EXPR=$ac_cv_path_EXPR
6853 if test -n "$EXPR"; then
6854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6855 $as_echo "$EXPR" >&6; }
6856 else
6857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6858 $as_echo "no" >&6; }
6859 fi
6860 
6861 
6862         if test "x$EXPR" = x; then
6863           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6864         fi
6865       else
6866         # Otherwise we believe it is a complete path. Use it as it is.
6867         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6868 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6869         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6870 $as_echo_n "checking for EXPR... " >&6; }
6871         if test ! -x "$tool_specified"; then
6872           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6873 $as_echo "not found" >&6; }
6874           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6875         fi
6876         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6877 $as_echo "$tool_specified" >&6; }
6878       fi
6879     fi
6880   fi
6881 
6882 
6883 
6884   if test "x$EXPR" = x; then
6885     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6886   fi
6887 
6888 
6889 
6890 
6891 
6892   # Publish this variable in the help.
6893 
6894 
6895   if test "x$FILE" = x; then
6896     # The variable is not set by user, try to locate tool using the code snippet
6897     for ac_prog in file
6898 do
6899   # Extract the first word of "$ac_prog", so it can be a program name with args.
6900 set dummy $ac_prog; ac_word=$2
6901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6902 $as_echo_n "checking for $ac_word... " >&6; }
6903 if ${ac_cv_path_FILE+:} false; then :
6904   $as_echo_n "(cached) " >&6
6905 else
6906   case $FILE in
6907   [\\/]* | ?:[\\/]*)
6908   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6909   ;;
6910   *)
6911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6912 for as_dir in $PATH
6913 do
6914   IFS=$as_save_IFS
6915   test -z "$as_dir" && as_dir=.
6916     for ac_exec_ext in '' $ac_executable_extensions; do
6917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6918     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6920     break 2
6921   fi
6922 done
6923   done
6924 IFS=$as_save_IFS
6925 
6926   ;;
6927 esac
6928 fi
6929 FILE=$ac_cv_path_FILE
6930 if test -n "$FILE"; then
6931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6932 $as_echo "$FILE" >&6; }
6933 else
6934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6935 $as_echo "no" >&6; }
6936 fi
6937 
6938 
6939   test -n "$FILE" && break
6940 done
6941 
6942   else
6943     # The variable is set, but is it from the command line or the environment?
6944 
6945     # Try to remove the string !FILE! from our list.
6946     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6947     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6948       # If it failed, the variable was not from the command line. Ignore it,
6949       # but warn the user (except for BASH, which is always set by the calling BASH).
6950       if test "xFILE" != xBASH; then
6951         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6952 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6953       fi
6954       # Try to locate tool using the code snippet
6955       for ac_prog in file
6956 do
6957   # Extract the first word of "$ac_prog", so it can be a program name with args.
6958 set dummy $ac_prog; ac_word=$2
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6960 $as_echo_n "checking for $ac_word... " >&6; }
6961 if ${ac_cv_path_FILE+:} false; then :
6962   $as_echo_n "(cached) " >&6
6963 else
6964   case $FILE in
6965   [\\/]* | ?:[\\/]*)
6966   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6967   ;;
6968   *)
6969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6970 for as_dir in $PATH
6971 do
6972   IFS=$as_save_IFS
6973   test -z "$as_dir" && as_dir=.
6974     for ac_exec_ext in '' $ac_executable_extensions; do
6975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6976     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6978     break 2
6979   fi
6980 done
6981   done
6982 IFS=$as_save_IFS
6983 
6984   ;;
6985 esac
6986 fi
6987 FILE=$ac_cv_path_FILE
6988 if test -n "$FILE"; then
6989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6990 $as_echo "$FILE" >&6; }
6991 else
6992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6993 $as_echo "no" >&6; }
6994 fi
6995 
6996 
6997   test -n "$FILE" && break
6998 done
6999 
7000     else
7001       # If it succeeded, then it was overridden by the user. We will use it
7002       # for the tool.
7003 
7004       # First remove it from the list of overridden variables, so we can test
7005       # for unknown variables in the end.
7006       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7007 
7008       # Check if the provided tool contains a complete path.
7009       tool_specified="$FILE"
7010       tool_basename="${tool_specified##*/}"
7011       if test "x$tool_basename" = "x$tool_specified"; then
7012         # A command without a complete path is provided, search $PATH.
7013         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7014 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7015         # Extract the first word of "$tool_basename", so it can be a program name with args.
7016 set dummy $tool_basename; ac_word=$2
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018 $as_echo_n "checking for $ac_word... " >&6; }
7019 if ${ac_cv_path_FILE+:} false; then :
7020   $as_echo_n "(cached) " >&6
7021 else
7022   case $FILE in
7023   [\\/]* | ?:[\\/]*)
7024   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7025   ;;
7026   *)
7027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028 for as_dir in $PATH
7029 do
7030   IFS=$as_save_IFS
7031   test -z "$as_dir" && as_dir=.
7032     for ac_exec_ext in '' $ac_executable_extensions; do
7033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036     break 2
7037   fi
7038 done
7039   done
7040 IFS=$as_save_IFS
7041 
7042   ;;
7043 esac
7044 fi
7045 FILE=$ac_cv_path_FILE
7046 if test -n "$FILE"; then
7047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7048 $as_echo "$FILE" >&6; }
7049 else
7050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051 $as_echo "no" >&6; }
7052 fi
7053 
7054 
7055         if test "x$FILE" = x; then
7056           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7057         fi
7058       else
7059         # Otherwise we believe it is a complete path. Use it as it is.
7060         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7061 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7062         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7063 $as_echo_n "checking for FILE... " >&6; }
7064         if test ! -x "$tool_specified"; then
7065           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7066 $as_echo "not found" >&6; }
7067           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7068         fi
7069         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7070 $as_echo "$tool_specified" >&6; }
7071       fi
7072     fi
7073   fi
7074 
7075 
7076 
7077   if test "x$FILE" = x; then
7078     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7079   fi
7080 
7081 
7082 
7083 
7084 
7085   # Publish this variable in the help.
7086 
7087 
7088   if test "x$FIND" = x; then
7089     # The variable is not set by user, try to locate tool using the code snippet
7090     for ac_prog in find
7091 do
7092   # Extract the first word of "$ac_prog", so it can be a program name with args.
7093 set dummy $ac_prog; ac_word=$2
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7095 $as_echo_n "checking for $ac_word... " >&6; }
7096 if ${ac_cv_path_FIND+:} false; then :
7097   $as_echo_n "(cached) " >&6
7098 else
7099   case $FIND in
7100   [\\/]* | ?:[\\/]*)
7101   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7102   ;;
7103   *)
7104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7105 for as_dir in $PATH
7106 do
7107   IFS=$as_save_IFS
7108   test -z "$as_dir" && as_dir=.
7109     for ac_exec_ext in '' $ac_executable_extensions; do
7110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7111     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7113     break 2
7114   fi
7115 done
7116   done
7117 IFS=$as_save_IFS
7118 
7119   ;;
7120 esac
7121 fi
7122 FIND=$ac_cv_path_FIND
7123 if test -n "$FIND"; then
7124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7125 $as_echo "$FIND" >&6; }
7126 else
7127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128 $as_echo "no" >&6; }
7129 fi
7130 
7131 
7132   test -n "$FIND" && break
7133 done
7134 
7135   else
7136     # The variable is set, but is it from the command line or the environment?
7137 
7138     # Try to remove the string !FIND! from our list.
7139     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7140     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7141       # If it failed, the variable was not from the command line. Ignore it,
7142       # but warn the user (except for BASH, which is always set by the calling BASH).
7143       if test "xFIND" != xBASH; then
7144         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7145 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7146       fi
7147       # Try to locate tool using the code snippet
7148       for ac_prog in find
7149 do
7150   # Extract the first word of "$ac_prog", so it can be a program name with args.
7151 set dummy $ac_prog; ac_word=$2
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153 $as_echo_n "checking for $ac_word... " >&6; }
7154 if ${ac_cv_path_FIND+:} false; then :
7155   $as_echo_n "(cached) " >&6
7156 else
7157   case $FIND in
7158   [\\/]* | ?:[\\/]*)
7159   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7160   ;;
7161   *)
7162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163 for as_dir in $PATH
7164 do
7165   IFS=$as_save_IFS
7166   test -z "$as_dir" && as_dir=.
7167     for ac_exec_ext in '' $ac_executable_extensions; do
7168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171     break 2
7172   fi
7173 done
7174   done
7175 IFS=$as_save_IFS
7176 
7177   ;;
7178 esac
7179 fi
7180 FIND=$ac_cv_path_FIND
7181 if test -n "$FIND"; then
7182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7183 $as_echo "$FIND" >&6; }
7184 else
7185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186 $as_echo "no" >&6; }
7187 fi
7188 
7189 
7190   test -n "$FIND" && break
7191 done
7192 
7193     else
7194       # If it succeeded, then it was overridden by the user. We will use it
7195       # for the tool.
7196 
7197       # First remove it from the list of overridden variables, so we can test
7198       # for unknown variables in the end.
7199       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7200 
7201       # Check if the provided tool contains a complete path.
7202       tool_specified="$FIND"
7203       tool_basename="${tool_specified##*/}"
7204       if test "x$tool_basename" = "x$tool_specified"; then
7205         # A command without a complete path is provided, search $PATH.
7206         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7207 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7208         # Extract the first word of "$tool_basename", so it can be a program name with args.
7209 set dummy $tool_basename; ac_word=$2
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211 $as_echo_n "checking for $ac_word... " >&6; }
7212 if ${ac_cv_path_FIND+:} false; then :
7213   $as_echo_n "(cached) " >&6
7214 else
7215   case $FIND in
7216   [\\/]* | ?:[\\/]*)
7217   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7218   ;;
7219   *)
7220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 for as_dir in $PATH
7222 do
7223   IFS=$as_save_IFS
7224   test -z "$as_dir" && as_dir=.
7225     for ac_exec_ext in '' $ac_executable_extensions; do
7226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229     break 2
7230   fi
7231 done
7232   done
7233 IFS=$as_save_IFS
7234 
7235   ;;
7236 esac
7237 fi
7238 FIND=$ac_cv_path_FIND
7239 if test -n "$FIND"; then
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7241 $as_echo "$FIND" >&6; }
7242 else
7243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244 $as_echo "no" >&6; }
7245 fi
7246 
7247 
7248         if test "x$FIND" = x; then
7249           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7250         fi
7251       else
7252         # Otherwise we believe it is a complete path. Use it as it is.
7253         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7254 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7256 $as_echo_n "checking for FIND... " >&6; }
7257         if test ! -x "$tool_specified"; then
7258           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7259 $as_echo "not found" >&6; }
7260           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7261         fi
7262         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7263 $as_echo "$tool_specified" >&6; }
7264       fi
7265     fi
7266   fi
7267 
7268 
7269 
7270   if test "x$FIND" = x; then
7271     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7272   fi
7273 
7274 
7275 
7276 
7277 
7278   # Publish this variable in the help.
7279 
7280 
7281   if test "x$HEAD" = x; then
7282     # The variable is not set by user, try to locate tool using the code snippet
7283     for ac_prog in head
7284 do
7285   # Extract the first word of "$ac_prog", so it can be a program name with args.
7286 set dummy $ac_prog; ac_word=$2
7287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7288 $as_echo_n "checking for $ac_word... " >&6; }
7289 if ${ac_cv_path_HEAD+:} false; then :
7290   $as_echo_n "(cached) " >&6
7291 else
7292   case $HEAD in
7293   [\\/]* | ?:[\\/]*)
7294   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7295   ;;
7296   *)
7297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7298 for as_dir in $PATH
7299 do
7300   IFS=$as_save_IFS
7301   test -z "$as_dir" && as_dir=.
7302     for ac_exec_ext in '' $ac_executable_extensions; do
7303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7304     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7306     break 2
7307   fi
7308 done
7309   done
7310 IFS=$as_save_IFS
7311 
7312   ;;
7313 esac
7314 fi
7315 HEAD=$ac_cv_path_HEAD
7316 if test -n "$HEAD"; then
7317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7318 $as_echo "$HEAD" >&6; }
7319 else
7320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321 $as_echo "no" >&6; }
7322 fi
7323 
7324 
7325   test -n "$HEAD" && break
7326 done
7327 
7328   else
7329     # The variable is set, but is it from the command line or the environment?
7330 
7331     # Try to remove the string !HEAD! from our list.
7332     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7333     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7334       # If it failed, the variable was not from the command line. Ignore it,
7335       # but warn the user (except for BASH, which is always set by the calling BASH).
7336       if test "xHEAD" != xBASH; then
7337         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7338 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7339       fi
7340       # Try to locate tool using the code snippet
7341       for ac_prog in head
7342 do
7343   # Extract the first word of "$ac_prog", so it can be a program name with args.
7344 set dummy $ac_prog; ac_word=$2
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7346 $as_echo_n "checking for $ac_word... " >&6; }
7347 if ${ac_cv_path_HEAD+:} false; then :
7348   $as_echo_n "(cached) " >&6
7349 else
7350   case $HEAD in
7351   [\\/]* | ?:[\\/]*)
7352   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7353   ;;
7354   *)
7355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356 for as_dir in $PATH
7357 do
7358   IFS=$as_save_IFS
7359   test -z "$as_dir" && as_dir=.
7360     for ac_exec_ext in '' $ac_executable_extensions; do
7361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7362     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7364     break 2
7365   fi
7366 done
7367   done
7368 IFS=$as_save_IFS
7369 
7370   ;;
7371 esac
7372 fi
7373 HEAD=$ac_cv_path_HEAD
7374 if test -n "$HEAD"; then
7375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7376 $as_echo "$HEAD" >&6; }
7377 else
7378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379 $as_echo "no" >&6; }
7380 fi
7381 
7382 
7383   test -n "$HEAD" && break
7384 done
7385 
7386     else
7387       # If it succeeded, then it was overridden by the user. We will use it
7388       # for the tool.
7389 
7390       # First remove it from the list of overridden variables, so we can test
7391       # for unknown variables in the end.
7392       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7393 
7394       # Check if the provided tool contains a complete path.
7395       tool_specified="$HEAD"
7396       tool_basename="${tool_specified##*/}"
7397       if test "x$tool_basename" = "x$tool_specified"; then
7398         # A command without a complete path is provided, search $PATH.
7399         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7400 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7401         # Extract the first word of "$tool_basename", so it can be a program name with args.
7402 set dummy $tool_basename; ac_word=$2
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404 $as_echo_n "checking for $ac_word... " >&6; }
7405 if ${ac_cv_path_HEAD+:} false; then :
7406   $as_echo_n "(cached) " >&6
7407 else
7408   case $HEAD in
7409   [\\/]* | ?:[\\/]*)
7410   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7411   ;;
7412   *)
7413   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7414 for as_dir in $PATH
7415 do
7416   IFS=$as_save_IFS
7417   test -z "$as_dir" && as_dir=.
7418     for ac_exec_ext in '' $ac_executable_extensions; do
7419   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7420     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7422     break 2
7423   fi
7424 done
7425   done
7426 IFS=$as_save_IFS
7427 
7428   ;;
7429 esac
7430 fi
7431 HEAD=$ac_cv_path_HEAD
7432 if test -n "$HEAD"; then
7433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7434 $as_echo "$HEAD" >&6; }
7435 else
7436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437 $as_echo "no" >&6; }
7438 fi
7439 
7440 
7441         if test "x$HEAD" = x; then
7442           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7443         fi
7444       else
7445         # Otherwise we believe it is a complete path. Use it as it is.
7446         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7447 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7448         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7449 $as_echo_n "checking for HEAD... " >&6; }
7450         if test ! -x "$tool_specified"; then
7451           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7452 $as_echo "not found" >&6; }
7453           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7454         fi
7455         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7456 $as_echo "$tool_specified" >&6; }
7457       fi
7458     fi
7459   fi
7460 
7461 
7462 
7463   if test "x$HEAD" = x; then
7464     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7465   fi
7466 
7467 
7468 
7469 
7470 
7471   # Publish this variable in the help.
7472 
7473 
7474   if test "x$LN" = x; then
7475     # The variable is not set by user, try to locate tool using the code snippet
7476     for ac_prog in ln
7477 do
7478   # Extract the first word of "$ac_prog", so it can be a program name with args.
7479 set dummy $ac_prog; ac_word=$2
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7481 $as_echo_n "checking for $ac_word... " >&6; }
7482 if ${ac_cv_path_LN+:} false; then :
7483   $as_echo_n "(cached) " >&6
7484 else
7485   case $LN in
7486   [\\/]* | ?:[\\/]*)
7487   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7488   ;;
7489   *)
7490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7491 for as_dir in $PATH
7492 do
7493   IFS=$as_save_IFS
7494   test -z "$as_dir" && as_dir=.
7495     for ac_exec_ext in '' $ac_executable_extensions; do
7496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7497     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7499     break 2
7500   fi
7501 done
7502   done
7503 IFS=$as_save_IFS
7504 
7505   ;;
7506 esac
7507 fi
7508 LN=$ac_cv_path_LN
7509 if test -n "$LN"; then
7510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7511 $as_echo "$LN" >&6; }
7512 else
7513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514 $as_echo "no" >&6; }
7515 fi
7516 
7517 
7518   test -n "$LN" && break
7519 done
7520 
7521   else
7522     # The variable is set, but is it from the command line or the environment?
7523 
7524     # Try to remove the string !LN! from our list.
7525     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7526     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7527       # If it failed, the variable was not from the command line. Ignore it,
7528       # but warn the user (except for BASH, which is always set by the calling BASH).
7529       if test "xLN" != xBASH; then
7530         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7531 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7532       fi
7533       # Try to locate tool using the code snippet
7534       for ac_prog in ln
7535 do
7536   # Extract the first word of "$ac_prog", so it can be a program name with args.
7537 set dummy $ac_prog; ac_word=$2
7538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539 $as_echo_n "checking for $ac_word... " >&6; }
7540 if ${ac_cv_path_LN+:} false; then :
7541   $as_echo_n "(cached) " >&6
7542 else
7543   case $LN in
7544   [\\/]* | ?:[\\/]*)
7545   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7546   ;;
7547   *)
7548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7549 for as_dir in $PATH
7550 do
7551   IFS=$as_save_IFS
7552   test -z "$as_dir" && as_dir=.
7553     for ac_exec_ext in '' $ac_executable_extensions; do
7554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7555     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7557     break 2
7558   fi
7559 done
7560   done
7561 IFS=$as_save_IFS
7562 
7563   ;;
7564 esac
7565 fi
7566 LN=$ac_cv_path_LN
7567 if test -n "$LN"; then
7568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7569 $as_echo "$LN" >&6; }
7570 else
7571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572 $as_echo "no" >&6; }
7573 fi
7574 
7575 
7576   test -n "$LN" && break
7577 done
7578 
7579     else
7580       # If it succeeded, then it was overridden by the user. We will use it
7581       # for the tool.
7582 
7583       # First remove it from the list of overridden variables, so we can test
7584       # for unknown variables in the end.
7585       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7586 
7587       # Check if the provided tool contains a complete path.
7588       tool_specified="$LN"
7589       tool_basename="${tool_specified##*/}"
7590       if test "x$tool_basename" = "x$tool_specified"; then
7591         # A command without a complete path is provided, search $PATH.
7592         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7593 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7594         # Extract the first word of "$tool_basename", so it can be a program name with args.
7595 set dummy $tool_basename; ac_word=$2
7596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7597 $as_echo_n "checking for $ac_word... " >&6; }
7598 if ${ac_cv_path_LN+:} false; then :
7599   $as_echo_n "(cached) " >&6
7600 else
7601   case $LN in
7602   [\\/]* | ?:[\\/]*)
7603   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7604   ;;
7605   *)
7606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7607 for as_dir in $PATH
7608 do
7609   IFS=$as_save_IFS
7610   test -z "$as_dir" && as_dir=.
7611     for ac_exec_ext in '' $ac_executable_extensions; do
7612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7613     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7615     break 2
7616   fi
7617 done
7618   done
7619 IFS=$as_save_IFS
7620 
7621   ;;
7622 esac
7623 fi
7624 LN=$ac_cv_path_LN
7625 if test -n "$LN"; then
7626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7627 $as_echo "$LN" >&6; }
7628 else
7629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630 $as_echo "no" >&6; }
7631 fi
7632 
7633 
7634         if test "x$LN" = x; then
7635           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7636         fi
7637       else
7638         # Otherwise we believe it is a complete path. Use it as it is.
7639         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7640 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7641         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7642 $as_echo_n "checking for LN... " >&6; }
7643         if test ! -x "$tool_specified"; then
7644           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7645 $as_echo "not found" >&6; }
7646           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7647         fi
7648         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7649 $as_echo "$tool_specified" >&6; }
7650       fi
7651     fi
7652   fi
7653 
7654 
7655 
7656   if test "x$LN" = x; then
7657     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7658   fi
7659 
7660 
7661 
7662 
7663 
7664   # Publish this variable in the help.
7665 
7666 
7667   if test "x$LS" = x; then
7668     # The variable is not set by user, try to locate tool using the code snippet
7669     for ac_prog in ls
7670 do
7671   # Extract the first word of "$ac_prog", so it can be a program name with args.
7672 set dummy $ac_prog; ac_word=$2
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674 $as_echo_n "checking for $ac_word... " >&6; }
7675 if ${ac_cv_path_LS+:} false; then :
7676   $as_echo_n "(cached) " >&6
7677 else
7678   case $LS in
7679   [\\/]* | ?:[\\/]*)
7680   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7681   ;;
7682   *)
7683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684 for as_dir in $PATH
7685 do
7686   IFS=$as_save_IFS
7687   test -z "$as_dir" && as_dir=.
7688     for ac_exec_ext in '' $ac_executable_extensions; do
7689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692     break 2
7693   fi
7694 done
7695   done
7696 IFS=$as_save_IFS
7697 
7698   ;;
7699 esac
7700 fi
7701 LS=$ac_cv_path_LS
7702 if test -n "$LS"; then
7703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7704 $as_echo "$LS" >&6; }
7705 else
7706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707 $as_echo "no" >&6; }
7708 fi
7709 
7710 
7711   test -n "$LS" && break
7712 done
7713 
7714   else
7715     # The variable is set, but is it from the command line or the environment?
7716 
7717     # Try to remove the string !LS! from our list.
7718     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7719     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7720       # If it failed, the variable was not from the command line. Ignore it,
7721       # but warn the user (except for BASH, which is always set by the calling BASH).
7722       if test "xLS" != xBASH; then
7723         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7724 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7725       fi
7726       # Try to locate tool using the code snippet
7727       for ac_prog in ls
7728 do
7729   # Extract the first word of "$ac_prog", so it can be a program name with args.
7730 set dummy $ac_prog; ac_word=$2
7731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7732 $as_echo_n "checking for $ac_word... " >&6; }
7733 if ${ac_cv_path_LS+:} false; then :
7734   $as_echo_n "(cached) " >&6
7735 else
7736   case $LS in
7737   [\\/]* | ?:[\\/]*)
7738   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7739   ;;
7740   *)
7741   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7742 for as_dir in $PATH
7743 do
7744   IFS=$as_save_IFS
7745   test -z "$as_dir" && as_dir=.
7746     for ac_exec_ext in '' $ac_executable_extensions; do
7747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7748     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7750     break 2
7751   fi
7752 done
7753   done
7754 IFS=$as_save_IFS
7755 
7756   ;;
7757 esac
7758 fi
7759 LS=$ac_cv_path_LS
7760 if test -n "$LS"; then
7761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7762 $as_echo "$LS" >&6; }
7763 else
7764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7765 $as_echo "no" >&6; }
7766 fi
7767 
7768 
7769   test -n "$LS" && break
7770 done
7771 
7772     else
7773       # If it succeeded, then it was overridden by the user. We will use it
7774       # for the tool.
7775 
7776       # First remove it from the list of overridden variables, so we can test
7777       # for unknown variables in the end.
7778       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7779 
7780       # Check if the provided tool contains a complete path.
7781       tool_specified="$LS"
7782       tool_basename="${tool_specified##*/}"
7783       if test "x$tool_basename" = "x$tool_specified"; then
7784         # A command without a complete path is provided, search $PATH.
7785         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7786 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7787         # Extract the first word of "$tool_basename", so it can be a program name with args.
7788 set dummy $tool_basename; ac_word=$2
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7790 $as_echo_n "checking for $ac_word... " >&6; }
7791 if ${ac_cv_path_LS+:} false; then :
7792   $as_echo_n "(cached) " >&6
7793 else
7794   case $LS in
7795   [\\/]* | ?:[\\/]*)
7796   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7797   ;;
7798   *)
7799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800 for as_dir in $PATH
7801 do
7802   IFS=$as_save_IFS
7803   test -z "$as_dir" && as_dir=.
7804     for ac_exec_ext in '' $ac_executable_extensions; do
7805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7806     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7808     break 2
7809   fi
7810 done
7811   done
7812 IFS=$as_save_IFS
7813 
7814   ;;
7815 esac
7816 fi
7817 LS=$ac_cv_path_LS
7818 if test -n "$LS"; then
7819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7820 $as_echo "$LS" >&6; }
7821 else
7822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823 $as_echo "no" >&6; }
7824 fi
7825 
7826 
7827         if test "x$LS" = x; then
7828           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7829         fi
7830       else
7831         # Otherwise we believe it is a complete path. Use it as it is.
7832         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7833 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7834         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7835 $as_echo_n "checking for LS... " >&6; }
7836         if test ! -x "$tool_specified"; then
7837           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7838 $as_echo "not found" >&6; }
7839           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7840         fi
7841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7842 $as_echo "$tool_specified" >&6; }
7843       fi
7844     fi
7845   fi
7846 
7847 
7848 
7849   if test "x$LS" = x; then
7850     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7851   fi
7852 
7853 
7854 
7855 
7856 
7857   # Publish this variable in the help.
7858 
7859 
7860   if test "x$MKDIR" = x; then
7861     # The variable is not set by user, try to locate tool using the code snippet
7862     for ac_prog in mkdir
7863 do
7864   # Extract the first word of "$ac_prog", so it can be a program name with args.
7865 set dummy $ac_prog; ac_word=$2
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7867 $as_echo_n "checking for $ac_word... " >&6; }
7868 if ${ac_cv_path_MKDIR+:} false; then :
7869   $as_echo_n "(cached) " >&6
7870 else
7871   case $MKDIR in
7872   [\\/]* | ?:[\\/]*)
7873   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7874   ;;
7875   *)
7876   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7877 for as_dir in $PATH
7878 do
7879   IFS=$as_save_IFS
7880   test -z "$as_dir" && as_dir=.
7881     for ac_exec_ext in '' $ac_executable_extensions; do
7882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7883     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7885     break 2
7886   fi
7887 done
7888   done
7889 IFS=$as_save_IFS
7890 
7891   ;;
7892 esac
7893 fi
7894 MKDIR=$ac_cv_path_MKDIR
7895 if test -n "$MKDIR"; then
7896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7897 $as_echo "$MKDIR" >&6; }
7898 else
7899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7900 $as_echo "no" >&6; }
7901 fi
7902 
7903 
7904   test -n "$MKDIR" && break
7905 done
7906 
7907   else
7908     # The variable is set, but is it from the command line or the environment?
7909 
7910     # Try to remove the string !MKDIR! from our list.
7911     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7912     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7913       # If it failed, the variable was not from the command line. Ignore it,
7914       # but warn the user (except for BASH, which is always set by the calling BASH).
7915       if test "xMKDIR" != xBASH; then
7916         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7917 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7918       fi
7919       # Try to locate tool using the code snippet
7920       for ac_prog in mkdir
7921 do
7922   # Extract the first word of "$ac_prog", so it can be a program name with args.
7923 set dummy $ac_prog; ac_word=$2
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7925 $as_echo_n "checking for $ac_word... " >&6; }
7926 if ${ac_cv_path_MKDIR+:} false; then :
7927   $as_echo_n "(cached) " >&6
7928 else
7929   case $MKDIR in
7930   [\\/]* | ?:[\\/]*)
7931   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7932   ;;
7933   *)
7934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7935 for as_dir in $PATH
7936 do
7937   IFS=$as_save_IFS
7938   test -z "$as_dir" && as_dir=.
7939     for ac_exec_ext in '' $ac_executable_extensions; do
7940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7941     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7943     break 2
7944   fi
7945 done
7946   done
7947 IFS=$as_save_IFS
7948 
7949   ;;
7950 esac
7951 fi
7952 MKDIR=$ac_cv_path_MKDIR
7953 if test -n "$MKDIR"; then
7954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7955 $as_echo "$MKDIR" >&6; }
7956 else
7957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7958 $as_echo "no" >&6; }
7959 fi
7960 
7961 
7962   test -n "$MKDIR" && break
7963 done
7964 
7965     else
7966       # If it succeeded, then it was overridden by the user. We will use it
7967       # for the tool.
7968 
7969       # First remove it from the list of overridden variables, so we can test
7970       # for unknown variables in the end.
7971       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7972 
7973       # Check if the provided tool contains a complete path.
7974       tool_specified="$MKDIR"
7975       tool_basename="${tool_specified##*/}"
7976       if test "x$tool_basename" = "x$tool_specified"; then
7977         # A command without a complete path is provided, search $PATH.
7978         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7979 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7980         # Extract the first word of "$tool_basename", so it can be a program name with args.
7981 set dummy $tool_basename; ac_word=$2
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7983 $as_echo_n "checking for $ac_word... " >&6; }
7984 if ${ac_cv_path_MKDIR+:} false; then :
7985   $as_echo_n "(cached) " >&6
7986 else
7987   case $MKDIR in
7988   [\\/]* | ?:[\\/]*)
7989   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7990   ;;
7991   *)
7992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7993 for as_dir in $PATH
7994 do
7995   IFS=$as_save_IFS
7996   test -z "$as_dir" && as_dir=.
7997     for ac_exec_ext in '' $ac_executable_extensions; do
7998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7999     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8001     break 2
8002   fi
8003 done
8004   done
8005 IFS=$as_save_IFS
8006 
8007   ;;
8008 esac
8009 fi
8010 MKDIR=$ac_cv_path_MKDIR
8011 if test -n "$MKDIR"; then
8012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8013 $as_echo "$MKDIR" >&6; }
8014 else
8015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016 $as_echo "no" >&6; }
8017 fi
8018 
8019 
8020         if test "x$MKDIR" = x; then
8021           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8022         fi
8023       else
8024         # Otherwise we believe it is a complete path. Use it as it is.
8025         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8026 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8027         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8028 $as_echo_n "checking for MKDIR... " >&6; }
8029         if test ! -x "$tool_specified"; then
8030           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8031 $as_echo "not found" >&6; }
8032           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8033         fi
8034         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8035 $as_echo "$tool_specified" >&6; }
8036       fi
8037     fi
8038   fi
8039 
8040 
8041 
8042   if test "x$MKDIR" = x; then
8043     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8044   fi
8045 
8046 
8047 
8048 
8049 
8050   # Publish this variable in the help.
8051 
8052 
8053   if test "x$MKTEMP" = x; then
8054     # The variable is not set by user, try to locate tool using the code snippet
8055     for ac_prog in mktemp
8056 do
8057   # Extract the first word of "$ac_prog", so it can be a program name with args.
8058 set dummy $ac_prog; ac_word=$2
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060 $as_echo_n "checking for $ac_word... " >&6; }
8061 if ${ac_cv_path_MKTEMP+:} false; then :
8062   $as_echo_n "(cached) " >&6
8063 else
8064   case $MKTEMP in
8065   [\\/]* | ?:[\\/]*)
8066   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8067   ;;
8068   *)
8069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8070 for as_dir in $PATH
8071 do
8072   IFS=$as_save_IFS
8073   test -z "$as_dir" && as_dir=.
8074     for ac_exec_ext in '' $ac_executable_extensions; do
8075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8076     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8078     break 2
8079   fi
8080 done
8081   done
8082 IFS=$as_save_IFS
8083 
8084   ;;
8085 esac
8086 fi
8087 MKTEMP=$ac_cv_path_MKTEMP
8088 if test -n "$MKTEMP"; then
8089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8090 $as_echo "$MKTEMP" >&6; }
8091 else
8092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8093 $as_echo "no" >&6; }
8094 fi
8095 
8096 
8097   test -n "$MKTEMP" && break
8098 done
8099 
8100   else
8101     # The variable is set, but is it from the command line or the environment?
8102 
8103     # Try to remove the string !MKTEMP! from our list.
8104     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8105     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8106       # If it failed, the variable was not from the command line. Ignore it,
8107       # but warn the user (except for BASH, which is always set by the calling BASH).
8108       if test "xMKTEMP" != xBASH; then
8109         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8110 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8111       fi
8112       # Try to locate tool using the code snippet
8113       for ac_prog in mktemp
8114 do
8115   # Extract the first word of "$ac_prog", so it can be a program name with args.
8116 set dummy $ac_prog; ac_word=$2
8117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8118 $as_echo_n "checking for $ac_word... " >&6; }
8119 if ${ac_cv_path_MKTEMP+:} false; then :
8120   $as_echo_n "(cached) " >&6
8121 else
8122   case $MKTEMP in
8123   [\\/]* | ?:[\\/]*)
8124   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8125   ;;
8126   *)
8127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128 for as_dir in $PATH
8129 do
8130   IFS=$as_save_IFS
8131   test -z "$as_dir" && as_dir=.
8132     for ac_exec_ext in '' $ac_executable_extensions; do
8133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136     break 2
8137   fi
8138 done
8139   done
8140 IFS=$as_save_IFS
8141 
8142   ;;
8143 esac
8144 fi
8145 MKTEMP=$ac_cv_path_MKTEMP
8146 if test -n "$MKTEMP"; then
8147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8148 $as_echo "$MKTEMP" >&6; }
8149 else
8150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8151 $as_echo "no" >&6; }
8152 fi
8153 
8154 
8155   test -n "$MKTEMP" && break
8156 done
8157 
8158     else
8159       # If it succeeded, then it was overridden by the user. We will use it
8160       # for the tool.
8161 
8162       # First remove it from the list of overridden variables, so we can test
8163       # for unknown variables in the end.
8164       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8165 
8166       # Check if the provided tool contains a complete path.
8167       tool_specified="$MKTEMP"
8168       tool_basename="${tool_specified##*/}"
8169       if test "x$tool_basename" = "x$tool_specified"; then
8170         # A command without a complete path is provided, search $PATH.
8171         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8172 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8173         # Extract the first word of "$tool_basename", so it can be a program name with args.
8174 set dummy $tool_basename; ac_word=$2
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8176 $as_echo_n "checking for $ac_word... " >&6; }
8177 if ${ac_cv_path_MKTEMP+:} false; then :
8178   $as_echo_n "(cached) " >&6
8179 else
8180   case $MKTEMP in
8181   [\\/]* | ?:[\\/]*)
8182   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8183   ;;
8184   *)
8185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8186 for as_dir in $PATH
8187 do
8188   IFS=$as_save_IFS
8189   test -z "$as_dir" && as_dir=.
8190     for ac_exec_ext in '' $ac_executable_extensions; do
8191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8192     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8194     break 2
8195   fi
8196 done
8197   done
8198 IFS=$as_save_IFS
8199 
8200   ;;
8201 esac
8202 fi
8203 MKTEMP=$ac_cv_path_MKTEMP
8204 if test -n "$MKTEMP"; then
8205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8206 $as_echo "$MKTEMP" >&6; }
8207 else
8208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209 $as_echo "no" >&6; }
8210 fi
8211 
8212 
8213         if test "x$MKTEMP" = x; then
8214           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8215         fi
8216       else
8217         # Otherwise we believe it is a complete path. Use it as it is.
8218         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8219 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8220         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8221 $as_echo_n "checking for MKTEMP... " >&6; }
8222         if test ! -x "$tool_specified"; then
8223           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8224 $as_echo "not found" >&6; }
8225           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8226         fi
8227         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8228 $as_echo "$tool_specified" >&6; }
8229       fi
8230     fi
8231   fi
8232 
8233 
8234 
8235   if test "x$MKTEMP" = x; then
8236     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8237   fi
8238 
8239 
8240 
8241 
8242 
8243   # Publish this variable in the help.
8244 
8245 
8246   if test "x$MV" = x; then
8247     # The variable is not set by user, try to locate tool using the code snippet
8248     for ac_prog in mv
8249 do
8250   # Extract the first word of "$ac_prog", so it can be a program name with args.
8251 set dummy $ac_prog; ac_word=$2
8252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8253 $as_echo_n "checking for $ac_word... " >&6; }
8254 if ${ac_cv_path_MV+:} false; then :
8255   $as_echo_n "(cached) " >&6
8256 else
8257   case $MV in
8258   [\\/]* | ?:[\\/]*)
8259   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8260   ;;
8261   *)
8262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8263 for as_dir in $PATH
8264 do
8265   IFS=$as_save_IFS
8266   test -z "$as_dir" && as_dir=.
8267     for ac_exec_ext in '' $ac_executable_extensions; do
8268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8269     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8271     break 2
8272   fi
8273 done
8274   done
8275 IFS=$as_save_IFS
8276 
8277   ;;
8278 esac
8279 fi
8280 MV=$ac_cv_path_MV
8281 if test -n "$MV"; then
8282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8283 $as_echo "$MV" >&6; }
8284 else
8285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8286 $as_echo "no" >&6; }
8287 fi
8288 
8289 
8290   test -n "$MV" && break
8291 done
8292 
8293   else
8294     # The variable is set, but is it from the command line or the environment?
8295 
8296     # Try to remove the string !MV! from our list.
8297     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8298     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8299       # If it failed, the variable was not from the command line. Ignore it,
8300       # but warn the user (except for BASH, which is always set by the calling BASH).
8301       if test "xMV" != xBASH; then
8302         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8303 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8304       fi
8305       # Try to locate tool using the code snippet
8306       for ac_prog in mv
8307 do
8308   # Extract the first word of "$ac_prog", so it can be a program name with args.
8309 set dummy $ac_prog; ac_word=$2
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311 $as_echo_n "checking for $ac_word... " >&6; }
8312 if ${ac_cv_path_MV+:} false; then :
8313   $as_echo_n "(cached) " >&6
8314 else
8315   case $MV in
8316   [\\/]* | ?:[\\/]*)
8317   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8318   ;;
8319   *)
8320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321 for as_dir in $PATH
8322 do
8323   IFS=$as_save_IFS
8324   test -z "$as_dir" && as_dir=.
8325     for ac_exec_ext in '' $ac_executable_extensions; do
8326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8327     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8329     break 2
8330   fi
8331 done
8332   done
8333 IFS=$as_save_IFS
8334 
8335   ;;
8336 esac
8337 fi
8338 MV=$ac_cv_path_MV
8339 if test -n "$MV"; then
8340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8341 $as_echo "$MV" >&6; }
8342 else
8343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8344 $as_echo "no" >&6; }
8345 fi
8346 
8347 
8348   test -n "$MV" && break
8349 done
8350 
8351     else
8352       # If it succeeded, then it was overridden by the user. We will use it
8353       # for the tool.
8354 
8355       # First remove it from the list of overridden variables, so we can test
8356       # for unknown variables in the end.
8357       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8358 
8359       # Check if the provided tool contains a complete path.
8360       tool_specified="$MV"
8361       tool_basename="${tool_specified##*/}"
8362       if test "x$tool_basename" = "x$tool_specified"; then
8363         # A command without a complete path is provided, search $PATH.
8364         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8365 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8366         # Extract the first word of "$tool_basename", so it can be a program name with args.
8367 set dummy $tool_basename; ac_word=$2
8368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369 $as_echo_n "checking for $ac_word... " >&6; }
8370 if ${ac_cv_path_MV+:} false; then :
8371   $as_echo_n "(cached) " >&6
8372 else
8373   case $MV in
8374   [\\/]* | ?:[\\/]*)
8375   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8376   ;;
8377   *)
8378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379 for as_dir in $PATH
8380 do
8381   IFS=$as_save_IFS
8382   test -z "$as_dir" && as_dir=.
8383     for ac_exec_ext in '' $ac_executable_extensions; do
8384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387     break 2
8388   fi
8389 done
8390   done
8391 IFS=$as_save_IFS
8392 
8393   ;;
8394 esac
8395 fi
8396 MV=$ac_cv_path_MV
8397 if test -n "$MV"; then
8398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8399 $as_echo "$MV" >&6; }
8400 else
8401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402 $as_echo "no" >&6; }
8403 fi
8404 
8405 
8406         if test "x$MV" = x; then
8407           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8408         fi
8409       else
8410         # Otherwise we believe it is a complete path. Use it as it is.
8411         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8412 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8414 $as_echo_n "checking for MV... " >&6; }
8415         if test ! -x "$tool_specified"; then
8416           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8417 $as_echo "not found" >&6; }
8418           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8419         fi
8420         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8421 $as_echo "$tool_specified" >&6; }
8422       fi
8423     fi
8424   fi
8425 
8426 
8427 
8428   if test "x$MV" = x; then
8429     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8430   fi
8431 
8432 
8433 
8434 
8435 
8436   # Publish this variable in the help.
8437 
8438 
8439   if test "x$NAWK" = x; then
8440     # The variable is not set by user, try to locate tool using the code snippet
8441     for ac_prog in nawk gawk awk
8442 do
8443   # Extract the first word of "$ac_prog", so it can be a program name with args.
8444 set dummy $ac_prog; ac_word=$2
8445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446 $as_echo_n "checking for $ac_word... " >&6; }
8447 if ${ac_cv_path_NAWK+:} false; then :
8448   $as_echo_n "(cached) " >&6
8449 else
8450   case $NAWK in
8451   [\\/]* | ?:[\\/]*)
8452   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8453   ;;
8454   *)
8455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456 for as_dir in $PATH
8457 do
8458   IFS=$as_save_IFS
8459   test -z "$as_dir" && as_dir=.
8460     for ac_exec_ext in '' $ac_executable_extensions; do
8461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8462     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464     break 2
8465   fi
8466 done
8467   done
8468 IFS=$as_save_IFS
8469 
8470   ;;
8471 esac
8472 fi
8473 NAWK=$ac_cv_path_NAWK
8474 if test -n "$NAWK"; then
8475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8476 $as_echo "$NAWK" >&6; }
8477 else
8478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479 $as_echo "no" >&6; }
8480 fi
8481 
8482 
8483   test -n "$NAWK" && break
8484 done
8485 
8486   else
8487     # The variable is set, but is it from the command line or the environment?
8488 
8489     # Try to remove the string !NAWK! from our list.
8490     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8491     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8492       # If it failed, the variable was not from the command line. Ignore it,
8493       # but warn the user (except for BASH, which is always set by the calling BASH).
8494       if test "xNAWK" != xBASH; then
8495         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8496 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8497       fi
8498       # Try to locate tool using the code snippet
8499       for ac_prog in nawk gawk awk
8500 do
8501   # Extract the first word of "$ac_prog", so it can be a program name with args.
8502 set dummy $ac_prog; ac_word=$2
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8504 $as_echo_n "checking for $ac_word... " >&6; }
8505 if ${ac_cv_path_NAWK+:} false; then :
8506   $as_echo_n "(cached) " >&6
8507 else
8508   case $NAWK in
8509   [\\/]* | ?:[\\/]*)
8510   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8511   ;;
8512   *)
8513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514 for as_dir in $PATH
8515 do
8516   IFS=$as_save_IFS
8517   test -z "$as_dir" && as_dir=.
8518     for ac_exec_ext in '' $ac_executable_extensions; do
8519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8520     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8522     break 2
8523   fi
8524 done
8525   done
8526 IFS=$as_save_IFS
8527 
8528   ;;
8529 esac
8530 fi
8531 NAWK=$ac_cv_path_NAWK
8532 if test -n "$NAWK"; then
8533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8534 $as_echo "$NAWK" >&6; }
8535 else
8536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537 $as_echo "no" >&6; }
8538 fi
8539 
8540 
8541   test -n "$NAWK" && break
8542 done
8543 
8544     else
8545       # If it succeeded, then it was overridden by the user. We will use it
8546       # for the tool.
8547 
8548       # First remove it from the list of overridden variables, so we can test
8549       # for unknown variables in the end.
8550       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8551 
8552       # Check if the provided tool contains a complete path.
8553       tool_specified="$NAWK"
8554       tool_basename="${tool_specified##*/}"
8555       if test "x$tool_basename" = "x$tool_specified"; then
8556         # A command without a complete path is provided, search $PATH.
8557         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8558 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8559         # Extract the first word of "$tool_basename", so it can be a program name with args.
8560 set dummy $tool_basename; ac_word=$2
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8562 $as_echo_n "checking for $ac_word... " >&6; }
8563 if ${ac_cv_path_NAWK+:} false; then :
8564   $as_echo_n "(cached) " >&6
8565 else
8566   case $NAWK in
8567   [\\/]* | ?:[\\/]*)
8568   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8569   ;;
8570   *)
8571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8572 for as_dir in $PATH
8573 do
8574   IFS=$as_save_IFS
8575   test -z "$as_dir" && as_dir=.
8576     for ac_exec_ext in '' $ac_executable_extensions; do
8577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8578     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8580     break 2
8581   fi
8582 done
8583   done
8584 IFS=$as_save_IFS
8585 
8586   ;;
8587 esac
8588 fi
8589 NAWK=$ac_cv_path_NAWK
8590 if test -n "$NAWK"; then
8591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8592 $as_echo "$NAWK" >&6; }
8593 else
8594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8595 $as_echo "no" >&6; }
8596 fi
8597 
8598 
8599         if test "x$NAWK" = x; then
8600           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8601         fi
8602       else
8603         # Otherwise we believe it is a complete path. Use it as it is.
8604         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8605 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8606         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8607 $as_echo_n "checking for NAWK... " >&6; }
8608         if test ! -x "$tool_specified"; then
8609           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8610 $as_echo "not found" >&6; }
8611           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8612         fi
8613         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8614 $as_echo "$tool_specified" >&6; }
8615       fi
8616     fi
8617   fi
8618 
8619 
8620 
8621   if test "x$NAWK" = x; then
8622     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8623   fi
8624 
8625 
8626 
8627 
8628 
8629   # Publish this variable in the help.
8630 
8631 
8632   if test "x$PRINTF" = x; then
8633     # The variable is not set by user, try to locate tool using the code snippet
8634     for ac_prog in printf
8635 do
8636   # Extract the first word of "$ac_prog", so it can be a program name with args.
8637 set dummy $ac_prog; ac_word=$2
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639 $as_echo_n "checking for $ac_word... " >&6; }
8640 if ${ac_cv_path_PRINTF+:} false; then :
8641   $as_echo_n "(cached) " >&6
8642 else
8643   case $PRINTF in
8644   [\\/]* | ?:[\\/]*)
8645   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8646   ;;
8647   *)
8648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649 for as_dir in $PATH
8650 do
8651   IFS=$as_save_IFS
8652   test -z "$as_dir" && as_dir=.
8653     for ac_exec_ext in '' $ac_executable_extensions; do
8654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657     break 2
8658   fi
8659 done
8660   done
8661 IFS=$as_save_IFS
8662 
8663   ;;
8664 esac
8665 fi
8666 PRINTF=$ac_cv_path_PRINTF
8667 if test -n "$PRINTF"; then
8668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8669 $as_echo "$PRINTF" >&6; }
8670 else
8671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672 $as_echo "no" >&6; }
8673 fi
8674 
8675 
8676   test -n "$PRINTF" && break
8677 done
8678 
8679   else
8680     # The variable is set, but is it from the command line or the environment?
8681 
8682     # Try to remove the string !PRINTF! from our list.
8683     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8684     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8685       # If it failed, the variable was not from the command line. Ignore it,
8686       # but warn the user (except for BASH, which is always set by the calling BASH).
8687       if test "xPRINTF" != xBASH; then
8688         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8689 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8690       fi
8691       # Try to locate tool using the code snippet
8692       for ac_prog in printf
8693 do
8694   # Extract the first word of "$ac_prog", so it can be a program name with args.
8695 set dummy $ac_prog; ac_word=$2
8696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8697 $as_echo_n "checking for $ac_word... " >&6; }
8698 if ${ac_cv_path_PRINTF+:} false; then :
8699   $as_echo_n "(cached) " >&6
8700 else
8701   case $PRINTF in
8702   [\\/]* | ?:[\\/]*)
8703   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8704   ;;
8705   *)
8706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707 for as_dir in $PATH
8708 do
8709   IFS=$as_save_IFS
8710   test -z "$as_dir" && as_dir=.
8711     for ac_exec_ext in '' $ac_executable_extensions; do
8712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8713     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8715     break 2
8716   fi
8717 done
8718   done
8719 IFS=$as_save_IFS
8720 
8721   ;;
8722 esac
8723 fi
8724 PRINTF=$ac_cv_path_PRINTF
8725 if test -n "$PRINTF"; then
8726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8727 $as_echo "$PRINTF" >&6; }
8728 else
8729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730 $as_echo "no" >&6; }
8731 fi
8732 
8733 
8734   test -n "$PRINTF" && break
8735 done
8736 
8737     else
8738       # If it succeeded, then it was overridden by the user. We will use it
8739       # for the tool.
8740 
8741       # First remove it from the list of overridden variables, so we can test
8742       # for unknown variables in the end.
8743       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8744 
8745       # Check if the provided tool contains a complete path.
8746       tool_specified="$PRINTF"
8747       tool_basename="${tool_specified##*/}"
8748       if test "x$tool_basename" = "x$tool_specified"; then
8749         # A command without a complete path is provided, search $PATH.
8750         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8751 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8752         # Extract the first word of "$tool_basename", so it can be a program name with args.
8753 set dummy $tool_basename; ac_word=$2
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755 $as_echo_n "checking for $ac_word... " >&6; }
8756 if ${ac_cv_path_PRINTF+:} false; then :
8757   $as_echo_n "(cached) " >&6
8758 else
8759   case $PRINTF in
8760   [\\/]* | ?:[\\/]*)
8761   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8762   ;;
8763   *)
8764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765 for as_dir in $PATH
8766 do
8767   IFS=$as_save_IFS
8768   test -z "$as_dir" && as_dir=.
8769     for ac_exec_ext in '' $ac_executable_extensions; do
8770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773     break 2
8774   fi
8775 done
8776   done
8777 IFS=$as_save_IFS
8778 
8779   ;;
8780 esac
8781 fi
8782 PRINTF=$ac_cv_path_PRINTF
8783 if test -n "$PRINTF"; then
8784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8785 $as_echo "$PRINTF" >&6; }
8786 else
8787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788 $as_echo "no" >&6; }
8789 fi
8790 
8791 
8792         if test "x$PRINTF" = x; then
8793           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8794         fi
8795       else
8796         # Otherwise we believe it is a complete path. Use it as it is.
8797         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8798 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8799         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8800 $as_echo_n "checking for PRINTF... " >&6; }
8801         if test ! -x "$tool_specified"; then
8802           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8803 $as_echo "not found" >&6; }
8804           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8805         fi
8806         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8807 $as_echo "$tool_specified" >&6; }
8808       fi
8809     fi
8810   fi
8811 
8812 
8813 
8814   if test "x$PRINTF" = x; then
8815     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8816   fi
8817 
8818 
8819 
8820 
8821 
8822   # Publish this variable in the help.
8823 
8824 
8825   if test "x$RM" = x; then
8826     # The variable is not set by user, try to locate tool using the code snippet
8827     for ac_prog in rm
8828 do
8829   # Extract the first word of "$ac_prog", so it can be a program name with args.
8830 set dummy $ac_prog; ac_word=$2
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832 $as_echo_n "checking for $ac_word... " >&6; }
8833 if ${ac_cv_path_RM+:} false; then :
8834   $as_echo_n "(cached) " >&6
8835 else
8836   case $RM in
8837   [\\/]* | ?:[\\/]*)
8838   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8839   ;;
8840   *)
8841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8842 for as_dir in $PATH
8843 do
8844   IFS=$as_save_IFS
8845   test -z "$as_dir" && as_dir=.
8846     for ac_exec_ext in '' $ac_executable_extensions; do
8847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8850     break 2
8851   fi
8852 done
8853   done
8854 IFS=$as_save_IFS
8855 
8856   ;;
8857 esac
8858 fi
8859 RM=$ac_cv_path_RM
8860 if test -n "$RM"; then
8861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8862 $as_echo "$RM" >&6; }
8863 else
8864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865 $as_echo "no" >&6; }
8866 fi
8867 
8868 
8869   test -n "$RM" && break
8870 done
8871 
8872   else
8873     # The variable is set, but is it from the command line or the environment?
8874 
8875     # Try to remove the string !RM! from our list.
8876     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8877     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8878       # If it failed, the variable was not from the command line. Ignore it,
8879       # but warn the user (except for BASH, which is always set by the calling BASH).
8880       if test "xRM" != xBASH; then
8881         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8882 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8883       fi
8884       # Try to locate tool using the code snippet
8885       for ac_prog in rm
8886 do
8887   # Extract the first word of "$ac_prog", so it can be a program name with args.
8888 set dummy $ac_prog; ac_word=$2
8889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8890 $as_echo_n "checking for $ac_word... " >&6; }
8891 if ${ac_cv_path_RM+:} false; then :
8892   $as_echo_n "(cached) " >&6
8893 else
8894   case $RM in
8895   [\\/]* | ?:[\\/]*)
8896   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8897   ;;
8898   *)
8899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900 for as_dir in $PATH
8901 do
8902   IFS=$as_save_IFS
8903   test -z "$as_dir" && as_dir=.
8904     for ac_exec_ext in '' $ac_executable_extensions; do
8905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908     break 2
8909   fi
8910 done
8911   done
8912 IFS=$as_save_IFS
8913 
8914   ;;
8915 esac
8916 fi
8917 RM=$ac_cv_path_RM
8918 if test -n "$RM"; then
8919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8920 $as_echo "$RM" >&6; }
8921 else
8922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923 $as_echo "no" >&6; }
8924 fi
8925 
8926 
8927   test -n "$RM" && break
8928 done
8929 
8930     else
8931       # If it succeeded, then it was overridden by the user. We will use it
8932       # for the tool.
8933 
8934       # First remove it from the list of overridden variables, so we can test
8935       # for unknown variables in the end.
8936       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8937 
8938       # Check if the provided tool contains a complete path.
8939       tool_specified="$RM"
8940       tool_basename="${tool_specified##*/}"
8941       if test "x$tool_basename" = "x$tool_specified"; then
8942         # A command without a complete path is provided, search $PATH.
8943         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8944 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8945         # Extract the first word of "$tool_basename", so it can be a program name with args.
8946 set dummy $tool_basename; ac_word=$2
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8948 $as_echo_n "checking for $ac_word... " >&6; }
8949 if ${ac_cv_path_RM+:} false; then :
8950   $as_echo_n "(cached) " >&6
8951 else
8952   case $RM in
8953   [\\/]* | ?:[\\/]*)
8954   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8955   ;;
8956   *)
8957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8958 for as_dir in $PATH
8959 do
8960   IFS=$as_save_IFS
8961   test -z "$as_dir" && as_dir=.
8962     for ac_exec_ext in '' $ac_executable_extensions; do
8963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8964     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8966     break 2
8967   fi
8968 done
8969   done
8970 IFS=$as_save_IFS
8971 
8972   ;;
8973 esac
8974 fi
8975 RM=$ac_cv_path_RM
8976 if test -n "$RM"; then
8977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8978 $as_echo "$RM" >&6; }
8979 else
8980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8981 $as_echo "no" >&6; }
8982 fi
8983 
8984 
8985         if test "x$RM" = x; then
8986           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8987         fi
8988       else
8989         # Otherwise we believe it is a complete path. Use it as it is.
8990         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8991 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8993 $as_echo_n "checking for RM... " >&6; }
8994         if test ! -x "$tool_specified"; then
8995           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8996 $as_echo "not found" >&6; }
8997           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8998         fi
8999         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9000 $as_echo "$tool_specified" >&6; }
9001       fi
9002     fi
9003   fi
9004 
9005 
9006 
9007   if test "x$RM" = x; then
9008     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9009   fi
9010 
9011 
9012 
9013 
9014 
9015   # Publish this variable in the help.
9016 
9017 
9018   if test "x$SH" = x; then
9019     # The variable is not set by user, try to locate tool using the code snippet
9020     for ac_prog in sh
9021 do
9022   # Extract the first word of "$ac_prog", so it can be a program name with args.
9023 set dummy $ac_prog; ac_word=$2
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9025 $as_echo_n "checking for $ac_word... " >&6; }
9026 if ${ac_cv_path_SH+:} false; then :
9027   $as_echo_n "(cached) " >&6
9028 else
9029   case $SH in
9030   [\\/]* | ?:[\\/]*)
9031   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9032   ;;
9033   *)
9034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9035 for as_dir in $PATH
9036 do
9037   IFS=$as_save_IFS
9038   test -z "$as_dir" && as_dir=.
9039     for ac_exec_ext in '' $ac_executable_extensions; do
9040   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9041     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9043     break 2
9044   fi
9045 done
9046   done
9047 IFS=$as_save_IFS
9048 
9049   ;;
9050 esac
9051 fi
9052 SH=$ac_cv_path_SH
9053 if test -n "$SH"; then
9054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9055 $as_echo "$SH" >&6; }
9056 else
9057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9058 $as_echo "no" >&6; }
9059 fi
9060 
9061 
9062   test -n "$SH" && break
9063 done
9064 
9065   else
9066     # The variable is set, but is it from the command line or the environment?
9067 
9068     # Try to remove the string !SH! from our list.
9069     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9070     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9071       # If it failed, the variable was not from the command line. Ignore it,
9072       # but warn the user (except for BASH, which is always set by the calling BASH).
9073       if test "xSH" != xBASH; then
9074         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9075 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9076       fi
9077       # Try to locate tool using the code snippet
9078       for ac_prog in sh
9079 do
9080   # Extract the first word of "$ac_prog", so it can be a program name with args.
9081 set dummy $ac_prog; ac_word=$2
9082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083 $as_echo_n "checking for $ac_word... " >&6; }
9084 if ${ac_cv_path_SH+:} false; then :
9085   $as_echo_n "(cached) " >&6
9086 else
9087   case $SH in
9088   [\\/]* | ?:[\\/]*)
9089   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9090   ;;
9091   *)
9092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093 for as_dir in $PATH
9094 do
9095   IFS=$as_save_IFS
9096   test -z "$as_dir" && as_dir=.
9097     for ac_exec_ext in '' $ac_executable_extensions; do
9098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9099     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9101     break 2
9102   fi
9103 done
9104   done
9105 IFS=$as_save_IFS
9106 
9107   ;;
9108 esac
9109 fi
9110 SH=$ac_cv_path_SH
9111 if test -n "$SH"; then
9112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9113 $as_echo "$SH" >&6; }
9114 else
9115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116 $as_echo "no" >&6; }
9117 fi
9118 
9119 
9120   test -n "$SH" && break
9121 done
9122 
9123     else
9124       # If it succeeded, then it was overridden by the user. We will use it
9125       # for the tool.
9126 
9127       # First remove it from the list of overridden variables, so we can test
9128       # for unknown variables in the end.
9129       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9130 
9131       # Check if the provided tool contains a complete path.
9132       tool_specified="$SH"
9133       tool_basename="${tool_specified##*/}"
9134       if test "x$tool_basename" = "x$tool_specified"; then
9135         # A command without a complete path is provided, search $PATH.
9136         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9137 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9138         # Extract the first word of "$tool_basename", so it can be a program name with args.
9139 set dummy $tool_basename; ac_word=$2
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141 $as_echo_n "checking for $ac_word... " >&6; }
9142 if ${ac_cv_path_SH+:} false; then :
9143   $as_echo_n "(cached) " >&6
9144 else
9145   case $SH in
9146   [\\/]* | ?:[\\/]*)
9147   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9148   ;;
9149   *)
9150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9151 for as_dir in $PATH
9152 do
9153   IFS=$as_save_IFS
9154   test -z "$as_dir" && as_dir=.
9155     for ac_exec_ext in '' $ac_executable_extensions; do
9156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9157     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9159     break 2
9160   fi
9161 done
9162   done
9163 IFS=$as_save_IFS
9164 
9165   ;;
9166 esac
9167 fi
9168 SH=$ac_cv_path_SH
9169 if test -n "$SH"; then
9170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9171 $as_echo "$SH" >&6; }
9172 else
9173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174 $as_echo "no" >&6; }
9175 fi
9176 
9177 
9178         if test "x$SH" = x; then
9179           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9180         fi
9181       else
9182         # Otherwise we believe it is a complete path. Use it as it is.
9183         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9184 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9185         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9186 $as_echo_n "checking for SH... " >&6; }
9187         if test ! -x "$tool_specified"; then
9188           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9189 $as_echo "not found" >&6; }
9190           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9191         fi
9192         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9193 $as_echo "$tool_specified" >&6; }
9194       fi
9195     fi
9196   fi
9197 
9198 
9199 
9200   if test "x$SH" = x; then
9201     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9202   fi
9203 
9204 
9205 
9206 
9207 
9208   # Publish this variable in the help.
9209 
9210 
9211   if test "x$SORT" = x; then
9212     # The variable is not set by user, try to locate tool using the code snippet
9213     for ac_prog in sort
9214 do
9215   # Extract the first word of "$ac_prog", so it can be a program name with args.
9216 set dummy $ac_prog; ac_word=$2
9217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9218 $as_echo_n "checking for $ac_word... " >&6; }
9219 if ${ac_cv_path_SORT+:} false; then :
9220   $as_echo_n "(cached) " >&6
9221 else
9222   case $SORT in
9223   [\\/]* | ?:[\\/]*)
9224   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9225   ;;
9226   *)
9227   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9228 for as_dir in $PATH
9229 do
9230   IFS=$as_save_IFS
9231   test -z "$as_dir" && as_dir=.
9232     for ac_exec_ext in '' $ac_executable_extensions; do
9233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9234     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9236     break 2
9237   fi
9238 done
9239   done
9240 IFS=$as_save_IFS
9241 
9242   ;;
9243 esac
9244 fi
9245 SORT=$ac_cv_path_SORT
9246 if test -n "$SORT"; then
9247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9248 $as_echo "$SORT" >&6; }
9249 else
9250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9251 $as_echo "no" >&6; }
9252 fi
9253 
9254 
9255   test -n "$SORT" && break
9256 done
9257 
9258   else
9259     # The variable is set, but is it from the command line or the environment?
9260 
9261     # Try to remove the string !SORT! from our list.
9262     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9263     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9264       # If it failed, the variable was not from the command line. Ignore it,
9265       # but warn the user (except for BASH, which is always set by the calling BASH).
9266       if test "xSORT" != xBASH; then
9267         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9268 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9269       fi
9270       # Try to locate tool using the code snippet
9271       for ac_prog in sort
9272 do
9273   # Extract the first word of "$ac_prog", so it can be a program name with args.
9274 set dummy $ac_prog; ac_word=$2
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9276 $as_echo_n "checking for $ac_word... " >&6; }
9277 if ${ac_cv_path_SORT+:} false; then :
9278   $as_echo_n "(cached) " >&6
9279 else
9280   case $SORT in
9281   [\\/]* | ?:[\\/]*)
9282   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9283   ;;
9284   *)
9285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286 for as_dir in $PATH
9287 do
9288   IFS=$as_save_IFS
9289   test -z "$as_dir" && as_dir=.
9290     for ac_exec_ext in '' $ac_executable_extensions; do
9291   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9292     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9293     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9294     break 2
9295   fi
9296 done
9297   done
9298 IFS=$as_save_IFS
9299 
9300   ;;
9301 esac
9302 fi
9303 SORT=$ac_cv_path_SORT
9304 if test -n "$SORT"; then
9305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9306 $as_echo "$SORT" >&6; }
9307 else
9308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309 $as_echo "no" >&6; }
9310 fi
9311 
9312 
9313   test -n "$SORT" && break
9314 done
9315 
9316     else
9317       # If it succeeded, then it was overridden by the user. We will use it
9318       # for the tool.
9319 
9320       # First remove it from the list of overridden variables, so we can test
9321       # for unknown variables in the end.
9322       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9323 
9324       # Check if the provided tool contains a complete path.
9325       tool_specified="$SORT"
9326       tool_basename="${tool_specified##*/}"
9327       if test "x$tool_basename" = "x$tool_specified"; then
9328         # A command without a complete path is provided, search $PATH.
9329         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9330 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9331         # Extract the first word of "$tool_basename", so it can be a program name with args.
9332 set dummy $tool_basename; ac_word=$2
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334 $as_echo_n "checking for $ac_word... " >&6; }
9335 if ${ac_cv_path_SORT+:} false; then :
9336   $as_echo_n "(cached) " >&6
9337 else
9338   case $SORT in
9339   [\\/]* | ?:[\\/]*)
9340   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9341   ;;
9342   *)
9343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344 for as_dir in $PATH
9345 do
9346   IFS=$as_save_IFS
9347   test -z "$as_dir" && as_dir=.
9348     for ac_exec_ext in '' $ac_executable_extensions; do
9349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352     break 2
9353   fi
9354 done
9355   done
9356 IFS=$as_save_IFS
9357 
9358   ;;
9359 esac
9360 fi
9361 SORT=$ac_cv_path_SORT
9362 if test -n "$SORT"; then
9363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9364 $as_echo "$SORT" >&6; }
9365 else
9366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367 $as_echo "no" >&6; }
9368 fi
9369 
9370 
9371         if test "x$SORT" = x; then
9372           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9373         fi
9374       else
9375         # Otherwise we believe it is a complete path. Use it as it is.
9376         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9377 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9378         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9379 $as_echo_n "checking for SORT... " >&6; }
9380         if test ! -x "$tool_specified"; then
9381           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9382 $as_echo "not found" >&6; }
9383           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9384         fi
9385         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9386 $as_echo "$tool_specified" >&6; }
9387       fi
9388     fi
9389   fi
9390 
9391 
9392 
9393   if test "x$SORT" = x; then
9394     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9395   fi
9396 
9397 
9398 
9399 
9400 
9401   # Publish this variable in the help.
9402 
9403 
9404   if test "x$TAIL" = x; then
9405     # The variable is not set by user, try to locate tool using the code snippet
9406     for ac_prog in tail
9407 do
9408   # Extract the first word of "$ac_prog", so it can be a program name with args.
9409 set dummy $ac_prog; ac_word=$2
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9411 $as_echo_n "checking for $ac_word... " >&6; }
9412 if ${ac_cv_path_TAIL+:} false; then :
9413   $as_echo_n "(cached) " >&6
9414 else
9415   case $TAIL in
9416   [\\/]* | ?:[\\/]*)
9417   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9418   ;;
9419   *)
9420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9421 for as_dir in $PATH
9422 do
9423   IFS=$as_save_IFS
9424   test -z "$as_dir" && as_dir=.
9425     for ac_exec_ext in '' $ac_executable_extensions; do
9426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9427     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9429     break 2
9430   fi
9431 done
9432   done
9433 IFS=$as_save_IFS
9434 
9435   ;;
9436 esac
9437 fi
9438 TAIL=$ac_cv_path_TAIL
9439 if test -n "$TAIL"; then
9440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9441 $as_echo "$TAIL" >&6; }
9442 else
9443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444 $as_echo "no" >&6; }
9445 fi
9446 
9447 
9448   test -n "$TAIL" && break
9449 done
9450 
9451   else
9452     # The variable is set, but is it from the command line or the environment?
9453 
9454     # Try to remove the string !TAIL! from our list.
9455     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9456     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9457       # If it failed, the variable was not from the command line. Ignore it,
9458       # but warn the user (except for BASH, which is always set by the calling BASH).
9459       if test "xTAIL" != xBASH; then
9460         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9461 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9462       fi
9463       # Try to locate tool using the code snippet
9464       for ac_prog in tail
9465 do
9466   # Extract the first word of "$ac_prog", so it can be a program name with args.
9467 set dummy $ac_prog; ac_word=$2
9468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9469 $as_echo_n "checking for $ac_word... " >&6; }
9470 if ${ac_cv_path_TAIL+:} false; then :
9471   $as_echo_n "(cached) " >&6
9472 else
9473   case $TAIL in
9474   [\\/]* | ?:[\\/]*)
9475   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9476   ;;
9477   *)
9478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479 for as_dir in $PATH
9480 do
9481   IFS=$as_save_IFS
9482   test -z "$as_dir" && as_dir=.
9483     for ac_exec_ext in '' $ac_executable_extensions; do
9484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9485     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9487     break 2
9488   fi
9489 done
9490   done
9491 IFS=$as_save_IFS
9492 
9493   ;;
9494 esac
9495 fi
9496 TAIL=$ac_cv_path_TAIL
9497 if test -n "$TAIL"; then
9498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9499 $as_echo "$TAIL" >&6; }
9500 else
9501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502 $as_echo "no" >&6; }
9503 fi
9504 
9505 
9506   test -n "$TAIL" && break
9507 done
9508 
9509     else
9510       # If it succeeded, then it was overridden by the user. We will use it
9511       # for the tool.
9512 
9513       # First remove it from the list of overridden variables, so we can test
9514       # for unknown variables in the end.
9515       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9516 
9517       # Check if the provided tool contains a complete path.
9518       tool_specified="$TAIL"
9519       tool_basename="${tool_specified##*/}"
9520       if test "x$tool_basename" = "x$tool_specified"; then
9521         # A command without a complete path is provided, search $PATH.
9522         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9523 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9524         # Extract the first word of "$tool_basename", so it can be a program name with args.
9525 set dummy $tool_basename; ac_word=$2
9526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527 $as_echo_n "checking for $ac_word... " >&6; }
9528 if ${ac_cv_path_TAIL+:} false; then :
9529   $as_echo_n "(cached) " >&6
9530 else
9531   case $TAIL in
9532   [\\/]* | ?:[\\/]*)
9533   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9534   ;;
9535   *)
9536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537 for as_dir in $PATH
9538 do
9539   IFS=$as_save_IFS
9540   test -z "$as_dir" && as_dir=.
9541     for ac_exec_ext in '' $ac_executable_extensions; do
9542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9543     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9545     break 2
9546   fi
9547 done
9548   done
9549 IFS=$as_save_IFS
9550 
9551   ;;
9552 esac
9553 fi
9554 TAIL=$ac_cv_path_TAIL
9555 if test -n "$TAIL"; then
9556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9557 $as_echo "$TAIL" >&6; }
9558 else
9559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560 $as_echo "no" >&6; }
9561 fi
9562 
9563 
9564         if test "x$TAIL" = x; then
9565           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9566         fi
9567       else
9568         # Otherwise we believe it is a complete path. Use it as it is.
9569         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9570 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9571         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9572 $as_echo_n "checking for TAIL... " >&6; }
9573         if test ! -x "$tool_specified"; then
9574           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9575 $as_echo "not found" >&6; }
9576           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9577         fi
9578         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9579 $as_echo "$tool_specified" >&6; }
9580       fi
9581     fi
9582   fi
9583 
9584 
9585 
9586   if test "x$TAIL" = x; then
9587     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9588   fi
9589 
9590 
9591 
9592 
9593 
9594   # Publish this variable in the help.
9595 
9596 
9597   if test "x$TAR" = x; then
9598     # The variable is not set by user, try to locate tool using the code snippet
9599     for ac_prog in tar
9600 do
9601   # Extract the first word of "$ac_prog", so it can be a program name with args.
9602 set dummy $ac_prog; ac_word=$2
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9604 $as_echo_n "checking for $ac_word... " >&6; }
9605 if ${ac_cv_path_TAR+:} false; then :
9606   $as_echo_n "(cached) " >&6
9607 else
9608   case $TAR in
9609   [\\/]* | ?:[\\/]*)
9610   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9611   ;;
9612   *)
9613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9614 for as_dir in $PATH
9615 do
9616   IFS=$as_save_IFS
9617   test -z "$as_dir" && as_dir=.
9618     for ac_exec_ext in '' $ac_executable_extensions; do
9619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9620     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9622     break 2
9623   fi
9624 done
9625   done
9626 IFS=$as_save_IFS
9627 
9628   ;;
9629 esac
9630 fi
9631 TAR=$ac_cv_path_TAR
9632 if test -n "$TAR"; then
9633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9634 $as_echo "$TAR" >&6; }
9635 else
9636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637 $as_echo "no" >&6; }
9638 fi
9639 
9640 
9641   test -n "$TAR" && break
9642 done
9643 
9644   else
9645     # The variable is set, but is it from the command line or the environment?
9646 
9647     # Try to remove the string !TAR! from our list.
9648     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9649     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9650       # If it failed, the variable was not from the command line. Ignore it,
9651       # but warn the user (except for BASH, which is always set by the calling BASH).
9652       if test "xTAR" != xBASH; then
9653         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9654 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9655       fi
9656       # Try to locate tool using the code snippet
9657       for ac_prog in tar
9658 do
9659   # Extract the first word of "$ac_prog", so it can be a program name with args.
9660 set dummy $ac_prog; ac_word=$2
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9662 $as_echo_n "checking for $ac_word... " >&6; }
9663 if ${ac_cv_path_TAR+:} false; then :
9664   $as_echo_n "(cached) " >&6
9665 else
9666   case $TAR in
9667   [\\/]* | ?:[\\/]*)
9668   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9669   ;;
9670   *)
9671   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672 for as_dir in $PATH
9673 do
9674   IFS=$as_save_IFS
9675   test -z "$as_dir" && as_dir=.
9676     for ac_exec_ext in '' $ac_executable_extensions; do
9677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9678     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9680     break 2
9681   fi
9682 done
9683   done
9684 IFS=$as_save_IFS
9685 
9686   ;;
9687 esac
9688 fi
9689 TAR=$ac_cv_path_TAR
9690 if test -n "$TAR"; then
9691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9692 $as_echo "$TAR" >&6; }
9693 else
9694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695 $as_echo "no" >&6; }
9696 fi
9697 
9698 
9699   test -n "$TAR" && break
9700 done
9701 
9702     else
9703       # If it succeeded, then it was overridden by the user. We will use it
9704       # for the tool.
9705 
9706       # First remove it from the list of overridden variables, so we can test
9707       # for unknown variables in the end.
9708       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9709 
9710       # Check if the provided tool contains a complete path.
9711       tool_specified="$TAR"
9712       tool_basename="${tool_specified##*/}"
9713       if test "x$tool_basename" = "x$tool_specified"; then
9714         # A command without a complete path is provided, search $PATH.
9715         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9716 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9717         # Extract the first word of "$tool_basename", so it can be a program name with args.
9718 set dummy $tool_basename; ac_word=$2
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9720 $as_echo_n "checking for $ac_word... " >&6; }
9721 if ${ac_cv_path_TAR+:} false; then :
9722   $as_echo_n "(cached) " >&6
9723 else
9724   case $TAR in
9725   [\\/]* | ?:[\\/]*)
9726   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9727   ;;
9728   *)
9729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730 for as_dir in $PATH
9731 do
9732   IFS=$as_save_IFS
9733   test -z "$as_dir" && as_dir=.
9734     for ac_exec_ext in '' $ac_executable_extensions; do
9735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9736     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9738     break 2
9739   fi
9740 done
9741   done
9742 IFS=$as_save_IFS
9743 
9744   ;;
9745 esac
9746 fi
9747 TAR=$ac_cv_path_TAR
9748 if test -n "$TAR"; then
9749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9750 $as_echo "$TAR" >&6; }
9751 else
9752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753 $as_echo "no" >&6; }
9754 fi
9755 
9756 
9757         if test "x$TAR" = x; then
9758           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9759         fi
9760       else
9761         # Otherwise we believe it is a complete path. Use it as it is.
9762         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9763 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9764         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9765 $as_echo_n "checking for TAR... " >&6; }
9766         if test ! -x "$tool_specified"; then
9767           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9768 $as_echo "not found" >&6; }
9769           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9770         fi
9771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9772 $as_echo "$tool_specified" >&6; }
9773       fi
9774     fi
9775   fi
9776 
9777 
9778 
9779   if test "x$TAR" = x; then
9780     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9781   fi
9782 
9783 
9784 
9785 
9786 
9787   # Publish this variable in the help.
9788 
9789 
9790   if test "x$TEE" = x; then
9791     # The variable is not set by user, try to locate tool using the code snippet
9792     for ac_prog in tee
9793 do
9794   # Extract the first word of "$ac_prog", so it can be a program name with args.
9795 set dummy $ac_prog; ac_word=$2
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797 $as_echo_n "checking for $ac_word... " >&6; }
9798 if ${ac_cv_path_TEE+:} false; then :
9799   $as_echo_n "(cached) " >&6
9800 else
9801   case $TEE in
9802   [\\/]* | ?:[\\/]*)
9803   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9804   ;;
9805   *)
9806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807 for as_dir in $PATH
9808 do
9809   IFS=$as_save_IFS
9810   test -z "$as_dir" && as_dir=.
9811     for ac_exec_ext in '' $ac_executable_extensions; do
9812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815     break 2
9816   fi
9817 done
9818   done
9819 IFS=$as_save_IFS
9820 
9821   ;;
9822 esac
9823 fi
9824 TEE=$ac_cv_path_TEE
9825 if test -n "$TEE"; then
9826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9827 $as_echo "$TEE" >&6; }
9828 else
9829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830 $as_echo "no" >&6; }
9831 fi
9832 
9833 
9834   test -n "$TEE" && break
9835 done
9836 
9837   else
9838     # The variable is set, but is it from the command line or the environment?
9839 
9840     # Try to remove the string !TEE! from our list.
9841     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9842     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9843       # If it failed, the variable was not from the command line. Ignore it,
9844       # but warn the user (except for BASH, which is always set by the calling BASH).
9845       if test "xTEE" != xBASH; then
9846         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9847 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9848       fi
9849       # Try to locate tool using the code snippet
9850       for ac_prog in tee
9851 do
9852   # Extract the first word of "$ac_prog", so it can be a program name with args.
9853 set dummy $ac_prog; ac_word=$2
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855 $as_echo_n "checking for $ac_word... " >&6; }
9856 if ${ac_cv_path_TEE+:} false; then :
9857   $as_echo_n "(cached) " >&6
9858 else
9859   case $TEE in
9860   [\\/]* | ?:[\\/]*)
9861   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9862   ;;
9863   *)
9864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865 for as_dir in $PATH
9866 do
9867   IFS=$as_save_IFS
9868   test -z "$as_dir" && as_dir=.
9869     for ac_exec_ext in '' $ac_executable_extensions; do
9870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873     break 2
9874   fi
9875 done
9876   done
9877 IFS=$as_save_IFS
9878 
9879   ;;
9880 esac
9881 fi
9882 TEE=$ac_cv_path_TEE
9883 if test -n "$TEE"; then
9884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9885 $as_echo "$TEE" >&6; }
9886 else
9887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888 $as_echo "no" >&6; }
9889 fi
9890 
9891 
9892   test -n "$TEE" && break
9893 done
9894 
9895     else
9896       # If it succeeded, then it was overridden by the user. We will use it
9897       # for the tool.
9898 
9899       # First remove it from the list of overridden variables, so we can test
9900       # for unknown variables in the end.
9901       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9902 
9903       # Check if the provided tool contains a complete path.
9904       tool_specified="$TEE"
9905       tool_basename="${tool_specified##*/}"
9906       if test "x$tool_basename" = "x$tool_specified"; then
9907         # A command without a complete path is provided, search $PATH.
9908         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9909 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9910         # Extract the first word of "$tool_basename", so it can be a program name with args.
9911 set dummy $tool_basename; ac_word=$2
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9913 $as_echo_n "checking for $ac_word... " >&6; }
9914 if ${ac_cv_path_TEE+:} false; then :
9915   $as_echo_n "(cached) " >&6
9916 else
9917   case $TEE in
9918   [\\/]* | ?:[\\/]*)
9919   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9920   ;;
9921   *)
9922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923 for as_dir in $PATH
9924 do
9925   IFS=$as_save_IFS
9926   test -z "$as_dir" && as_dir=.
9927     for ac_exec_ext in '' $ac_executable_extensions; do
9928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931     break 2
9932   fi
9933 done
9934   done
9935 IFS=$as_save_IFS
9936 
9937   ;;
9938 esac
9939 fi
9940 TEE=$ac_cv_path_TEE
9941 if test -n "$TEE"; then
9942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9943 $as_echo "$TEE" >&6; }
9944 else
9945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946 $as_echo "no" >&6; }
9947 fi
9948 
9949 
9950         if test "x$TEE" = x; then
9951           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9952         fi
9953       else
9954         # Otherwise we believe it is a complete path. Use it as it is.
9955         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9956 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9957         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9958 $as_echo_n "checking for TEE... " >&6; }
9959         if test ! -x "$tool_specified"; then
9960           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9961 $as_echo "not found" >&6; }
9962           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9963         fi
9964         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9965 $as_echo "$tool_specified" >&6; }
9966       fi
9967     fi
9968   fi
9969 
9970 
9971 
9972   if test "x$TEE" = x; then
9973     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9974   fi
9975 
9976 
9977 
9978 
9979 
9980   # Publish this variable in the help.
9981 
9982 
9983   if test "x$TOUCH" = x; then
9984     # The variable is not set by user, try to locate tool using the code snippet
9985     for ac_prog in touch
9986 do
9987   # Extract the first word of "$ac_prog", so it can be a program name with args.
9988 set dummy $ac_prog; ac_word=$2
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9990 $as_echo_n "checking for $ac_word... " >&6; }
9991 if ${ac_cv_path_TOUCH+:} false; then :
9992   $as_echo_n "(cached) " >&6
9993 else
9994   case $TOUCH in
9995   [\\/]* | ?:[\\/]*)
9996   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9997   ;;
9998   *)
9999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10000 for as_dir in $PATH
10001 do
10002   IFS=$as_save_IFS
10003   test -z "$as_dir" && as_dir=.
10004     for ac_exec_ext in '' $ac_executable_extensions; do
10005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10006     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10008     break 2
10009   fi
10010 done
10011   done
10012 IFS=$as_save_IFS
10013 
10014   ;;
10015 esac
10016 fi
10017 TOUCH=$ac_cv_path_TOUCH
10018 if test -n "$TOUCH"; then
10019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10020 $as_echo "$TOUCH" >&6; }
10021 else
10022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023 $as_echo "no" >&6; }
10024 fi
10025 
10026 
10027   test -n "$TOUCH" && break
10028 done
10029 
10030   else
10031     # The variable is set, but is it from the command line or the environment?
10032 
10033     # Try to remove the string !TOUCH! from our list.
10034     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10035     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10036       # If it failed, the variable was not from the command line. Ignore it,
10037       # but warn the user (except for BASH, which is always set by the calling BASH).
10038       if test "xTOUCH" != xBASH; then
10039         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10040 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10041       fi
10042       # Try to locate tool using the code snippet
10043       for ac_prog in touch
10044 do
10045   # Extract the first word of "$ac_prog", so it can be a program name with args.
10046 set dummy $ac_prog; ac_word=$2
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048 $as_echo_n "checking for $ac_word... " >&6; }
10049 if ${ac_cv_path_TOUCH+:} false; then :
10050   $as_echo_n "(cached) " >&6
10051 else
10052   case $TOUCH in
10053   [\\/]* | ?:[\\/]*)
10054   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10055   ;;
10056   *)
10057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058 for as_dir in $PATH
10059 do
10060   IFS=$as_save_IFS
10061   test -z "$as_dir" && as_dir=.
10062     for ac_exec_ext in '' $ac_executable_extensions; do
10063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066     break 2
10067   fi
10068 done
10069   done
10070 IFS=$as_save_IFS
10071 
10072   ;;
10073 esac
10074 fi
10075 TOUCH=$ac_cv_path_TOUCH
10076 if test -n "$TOUCH"; then
10077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10078 $as_echo "$TOUCH" >&6; }
10079 else
10080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081 $as_echo "no" >&6; }
10082 fi
10083 
10084 
10085   test -n "$TOUCH" && break
10086 done
10087 
10088     else
10089       # If it succeeded, then it was overridden by the user. We will use it
10090       # for the tool.
10091 
10092       # First remove it from the list of overridden variables, so we can test
10093       # for unknown variables in the end.
10094       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10095 
10096       # Check if the provided tool contains a complete path.
10097       tool_specified="$TOUCH"
10098       tool_basename="${tool_specified##*/}"
10099       if test "x$tool_basename" = "x$tool_specified"; then
10100         # A command without a complete path is provided, search $PATH.
10101         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10102 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10103         # Extract the first word of "$tool_basename", so it can be a program name with args.
10104 set dummy $tool_basename; ac_word=$2
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106 $as_echo_n "checking for $ac_word... " >&6; }
10107 if ${ac_cv_path_TOUCH+:} false; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   case $TOUCH in
10111   [\\/]* | ?:[\\/]*)
10112   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10113   ;;
10114   *)
10115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116 for as_dir in $PATH
10117 do
10118   IFS=$as_save_IFS
10119   test -z "$as_dir" && as_dir=.
10120     for ac_exec_ext in '' $ac_executable_extensions; do
10121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124     break 2
10125   fi
10126 done
10127   done
10128 IFS=$as_save_IFS
10129 
10130   ;;
10131 esac
10132 fi
10133 TOUCH=$ac_cv_path_TOUCH
10134 if test -n "$TOUCH"; then
10135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10136 $as_echo "$TOUCH" >&6; }
10137 else
10138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139 $as_echo "no" >&6; }
10140 fi
10141 
10142 
10143         if test "x$TOUCH" = x; then
10144           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10145         fi
10146       else
10147         # Otherwise we believe it is a complete path. Use it as it is.
10148         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10149 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10150         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10151 $as_echo_n "checking for TOUCH... " >&6; }
10152         if test ! -x "$tool_specified"; then
10153           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10154 $as_echo "not found" >&6; }
10155           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10156         fi
10157         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10158 $as_echo "$tool_specified" >&6; }
10159       fi
10160     fi
10161   fi
10162 
10163 
10164 
10165   if test "x$TOUCH" = x; then
10166     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10167   fi
10168 
10169 
10170 
10171 
10172 
10173   # Publish this variable in the help.
10174 
10175 
10176   if test "x$TR" = x; then
10177     # The variable is not set by user, try to locate tool using the code snippet
10178     for ac_prog in tr
10179 do
10180   # Extract the first word of "$ac_prog", so it can be a program name with args.
10181 set dummy $ac_prog; ac_word=$2
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183 $as_echo_n "checking for $ac_word... " >&6; }
10184 if ${ac_cv_path_TR+:} false; then :
10185   $as_echo_n "(cached) " >&6
10186 else
10187   case $TR in
10188   [\\/]* | ?:[\\/]*)
10189   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10190   ;;
10191   *)
10192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193 for as_dir in $PATH
10194 do
10195   IFS=$as_save_IFS
10196   test -z "$as_dir" && as_dir=.
10197     for ac_exec_ext in '' $ac_executable_extensions; do
10198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10199     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201     break 2
10202   fi
10203 done
10204   done
10205 IFS=$as_save_IFS
10206 
10207   ;;
10208 esac
10209 fi
10210 TR=$ac_cv_path_TR
10211 if test -n "$TR"; then
10212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10213 $as_echo "$TR" >&6; }
10214 else
10215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216 $as_echo "no" >&6; }
10217 fi
10218 
10219 
10220   test -n "$TR" && break
10221 done
10222 
10223   else
10224     # The variable is set, but is it from the command line or the environment?
10225 
10226     # Try to remove the string !TR! from our list.
10227     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10228     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10229       # If it failed, the variable was not from the command line. Ignore it,
10230       # but warn the user (except for BASH, which is always set by the calling BASH).
10231       if test "xTR" != xBASH; then
10232         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10233 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10234       fi
10235       # Try to locate tool using the code snippet
10236       for ac_prog in tr
10237 do
10238   # Extract the first word of "$ac_prog", so it can be a program name with args.
10239 set dummy $ac_prog; ac_word=$2
10240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241 $as_echo_n "checking for $ac_word... " >&6; }
10242 if ${ac_cv_path_TR+:} false; then :
10243   $as_echo_n "(cached) " >&6
10244 else
10245   case $TR in
10246   [\\/]* | ?:[\\/]*)
10247   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10248   ;;
10249   *)
10250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251 for as_dir in $PATH
10252 do
10253   IFS=$as_save_IFS
10254   test -z "$as_dir" && as_dir=.
10255     for ac_exec_ext in '' $ac_executable_extensions; do
10256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10257     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259     break 2
10260   fi
10261 done
10262   done
10263 IFS=$as_save_IFS
10264 
10265   ;;
10266 esac
10267 fi
10268 TR=$ac_cv_path_TR
10269 if test -n "$TR"; then
10270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10271 $as_echo "$TR" >&6; }
10272 else
10273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274 $as_echo "no" >&6; }
10275 fi
10276 
10277 
10278   test -n "$TR" && break
10279 done
10280 
10281     else
10282       # If it succeeded, then it was overridden by the user. We will use it
10283       # for the tool.
10284 
10285       # First remove it from the list of overridden variables, so we can test
10286       # for unknown variables in the end.
10287       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10288 
10289       # Check if the provided tool contains a complete path.
10290       tool_specified="$TR"
10291       tool_basename="${tool_specified##*/}"
10292       if test "x$tool_basename" = "x$tool_specified"; then
10293         # A command without a complete path is provided, search $PATH.
10294         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10295 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10296         # Extract the first word of "$tool_basename", so it can be a program name with args.
10297 set dummy $tool_basename; ac_word=$2
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10299 $as_echo_n "checking for $ac_word... " >&6; }
10300 if ${ac_cv_path_TR+:} false; then :
10301   $as_echo_n "(cached) " >&6
10302 else
10303   case $TR in
10304   [\\/]* | ?:[\\/]*)
10305   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10306   ;;
10307   *)
10308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10309 for as_dir in $PATH
10310 do
10311   IFS=$as_save_IFS
10312   test -z "$as_dir" && as_dir=.
10313     for ac_exec_ext in '' $ac_executable_extensions; do
10314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10315     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10317     break 2
10318   fi
10319 done
10320   done
10321 IFS=$as_save_IFS
10322 
10323   ;;
10324 esac
10325 fi
10326 TR=$ac_cv_path_TR
10327 if test -n "$TR"; then
10328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10329 $as_echo "$TR" >&6; }
10330 else
10331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332 $as_echo "no" >&6; }
10333 fi
10334 
10335 
10336         if test "x$TR" = x; then
10337           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10338         fi
10339       else
10340         # Otherwise we believe it is a complete path. Use it as it is.
10341         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10342 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10343         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10344 $as_echo_n "checking for TR... " >&6; }
10345         if test ! -x "$tool_specified"; then
10346           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10347 $as_echo "not found" >&6; }
10348           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10349         fi
10350         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10351 $as_echo "$tool_specified" >&6; }
10352       fi
10353     fi
10354   fi
10355 
10356 
10357 
10358   if test "x$TR" = x; then
10359     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10360   fi
10361 
10362 
10363 
10364 
10365 
10366   # Publish this variable in the help.
10367 
10368 
10369   if test "x$UNAME" = x; then
10370     # The variable is not set by user, try to locate tool using the code snippet
10371     for ac_prog in uname
10372 do
10373   # Extract the first word of "$ac_prog", so it can be a program name with args.
10374 set dummy $ac_prog; ac_word=$2
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10376 $as_echo_n "checking for $ac_word... " >&6; }
10377 if ${ac_cv_path_UNAME+:} false; then :
10378   $as_echo_n "(cached) " >&6
10379 else
10380   case $UNAME in
10381   [\\/]* | ?:[\\/]*)
10382   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10383   ;;
10384   *)
10385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10386 for as_dir in $PATH
10387 do
10388   IFS=$as_save_IFS
10389   test -z "$as_dir" && as_dir=.
10390     for ac_exec_ext in '' $ac_executable_extensions; do
10391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10392     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10394     break 2
10395   fi
10396 done
10397   done
10398 IFS=$as_save_IFS
10399 
10400   ;;
10401 esac
10402 fi
10403 UNAME=$ac_cv_path_UNAME
10404 if test -n "$UNAME"; then
10405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10406 $as_echo "$UNAME" >&6; }
10407 else
10408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409 $as_echo "no" >&6; }
10410 fi
10411 
10412 
10413   test -n "$UNAME" && break
10414 done
10415 
10416   else
10417     # The variable is set, but is it from the command line or the environment?
10418 
10419     # Try to remove the string !UNAME! from our list.
10420     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10421     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10422       # If it failed, the variable was not from the command line. Ignore it,
10423       # but warn the user (except for BASH, which is always set by the calling BASH).
10424       if test "xUNAME" != xBASH; then
10425         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10426 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10427       fi
10428       # Try to locate tool using the code snippet
10429       for ac_prog in uname
10430 do
10431   # Extract the first word of "$ac_prog", so it can be a program name with args.
10432 set dummy $ac_prog; ac_word=$2
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434 $as_echo_n "checking for $ac_word... " >&6; }
10435 if ${ac_cv_path_UNAME+:} false; then :
10436   $as_echo_n "(cached) " >&6
10437 else
10438   case $UNAME in
10439   [\\/]* | ?:[\\/]*)
10440   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10441   ;;
10442   *)
10443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444 for as_dir in $PATH
10445 do
10446   IFS=$as_save_IFS
10447   test -z "$as_dir" && as_dir=.
10448     for ac_exec_ext in '' $ac_executable_extensions; do
10449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452     break 2
10453   fi
10454 done
10455   done
10456 IFS=$as_save_IFS
10457 
10458   ;;
10459 esac
10460 fi
10461 UNAME=$ac_cv_path_UNAME
10462 if test -n "$UNAME"; then
10463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10464 $as_echo "$UNAME" >&6; }
10465 else
10466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467 $as_echo "no" >&6; }
10468 fi
10469 
10470 
10471   test -n "$UNAME" && break
10472 done
10473 
10474     else
10475       # If it succeeded, then it was overridden by the user. We will use it
10476       # for the tool.
10477 
10478       # First remove it from the list of overridden variables, so we can test
10479       # for unknown variables in the end.
10480       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10481 
10482       # Check if the provided tool contains a complete path.
10483       tool_specified="$UNAME"
10484       tool_basename="${tool_specified##*/}"
10485       if test "x$tool_basename" = "x$tool_specified"; then
10486         # A command without a complete path is provided, search $PATH.
10487         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10488 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10489         # Extract the first word of "$tool_basename", so it can be a program name with args.
10490 set dummy $tool_basename; ac_word=$2
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492 $as_echo_n "checking for $ac_word... " >&6; }
10493 if ${ac_cv_path_UNAME+:} false; then :
10494   $as_echo_n "(cached) " >&6
10495 else
10496   case $UNAME in
10497   [\\/]* | ?:[\\/]*)
10498   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10499   ;;
10500   *)
10501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502 for as_dir in $PATH
10503 do
10504   IFS=$as_save_IFS
10505   test -z "$as_dir" && as_dir=.
10506     for ac_exec_ext in '' $ac_executable_extensions; do
10507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510     break 2
10511   fi
10512 done
10513   done
10514 IFS=$as_save_IFS
10515 
10516   ;;
10517 esac
10518 fi
10519 UNAME=$ac_cv_path_UNAME
10520 if test -n "$UNAME"; then
10521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10522 $as_echo "$UNAME" >&6; }
10523 else
10524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525 $as_echo "no" >&6; }
10526 fi
10527 
10528 
10529         if test "x$UNAME" = x; then
10530           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10531         fi
10532       else
10533         # Otherwise we believe it is a complete path. Use it as it is.
10534         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10535 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10536         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10537 $as_echo_n "checking for UNAME... " >&6; }
10538         if test ! -x "$tool_specified"; then
10539           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10540 $as_echo "not found" >&6; }
10541           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10542         fi
10543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10544 $as_echo "$tool_specified" >&6; }
10545       fi
10546     fi
10547   fi
10548 
10549 
10550 
10551   if test "x$UNAME" = x; then
10552     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10553   fi
10554 
10555 
10556 
10557 
10558 
10559   # Publish this variable in the help.
10560 
10561 
10562   if test "x$UNIQ" = x; then
10563     # The variable is not set by user, try to locate tool using the code snippet
10564     for ac_prog in uniq
10565 do
10566   # Extract the first word of "$ac_prog", so it can be a program name with args.
10567 set dummy $ac_prog; ac_word=$2
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10569 $as_echo_n "checking for $ac_word... " >&6; }
10570 if ${ac_cv_path_UNIQ+:} false; then :
10571   $as_echo_n "(cached) " >&6
10572 else
10573   case $UNIQ in
10574   [\\/]* | ?:[\\/]*)
10575   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10576   ;;
10577   *)
10578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10579 for as_dir in $PATH
10580 do
10581   IFS=$as_save_IFS
10582   test -z "$as_dir" && as_dir=.
10583     for ac_exec_ext in '' $ac_executable_extensions; do
10584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10585     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10587     break 2
10588   fi
10589 done
10590   done
10591 IFS=$as_save_IFS
10592 
10593   ;;
10594 esac
10595 fi
10596 UNIQ=$ac_cv_path_UNIQ
10597 if test -n "$UNIQ"; then
10598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10599 $as_echo "$UNIQ" >&6; }
10600 else
10601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602 $as_echo "no" >&6; }
10603 fi
10604 
10605 
10606   test -n "$UNIQ" && break
10607 done
10608 
10609   else
10610     # The variable is set, but is it from the command line or the environment?
10611 
10612     # Try to remove the string !UNIQ! from our list.
10613     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10614     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10615       # If it failed, the variable was not from the command line. Ignore it,
10616       # but warn the user (except for BASH, which is always set by the calling BASH).
10617       if test "xUNIQ" != xBASH; then
10618         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10619 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10620       fi
10621       # Try to locate tool using the code snippet
10622       for ac_prog in uniq
10623 do
10624   # Extract the first word of "$ac_prog", so it can be a program name with args.
10625 set dummy $ac_prog; ac_word=$2
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627 $as_echo_n "checking for $ac_word... " >&6; }
10628 if ${ac_cv_path_UNIQ+:} false; then :
10629   $as_echo_n "(cached) " >&6
10630 else
10631   case $UNIQ in
10632   [\\/]* | ?:[\\/]*)
10633   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10634   ;;
10635   *)
10636   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637 for as_dir in $PATH
10638 do
10639   IFS=$as_save_IFS
10640   test -z "$as_dir" && as_dir=.
10641     for ac_exec_ext in '' $ac_executable_extensions; do
10642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10643     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645     break 2
10646   fi
10647 done
10648   done
10649 IFS=$as_save_IFS
10650 
10651   ;;
10652 esac
10653 fi
10654 UNIQ=$ac_cv_path_UNIQ
10655 if test -n "$UNIQ"; then
10656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10657 $as_echo "$UNIQ" >&6; }
10658 else
10659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660 $as_echo "no" >&6; }
10661 fi
10662 
10663 
10664   test -n "$UNIQ" && break
10665 done
10666 
10667     else
10668       # If it succeeded, then it was overridden by the user. We will use it
10669       # for the tool.
10670 
10671       # First remove it from the list of overridden variables, so we can test
10672       # for unknown variables in the end.
10673       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10674 
10675       # Check if the provided tool contains a complete path.
10676       tool_specified="$UNIQ"
10677       tool_basename="${tool_specified##*/}"
10678       if test "x$tool_basename" = "x$tool_specified"; then
10679         # A command without a complete path is provided, search $PATH.
10680         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10681 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10682         # Extract the first word of "$tool_basename", so it can be a program name with args.
10683 set dummy $tool_basename; ac_word=$2
10684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685 $as_echo_n "checking for $ac_word... " >&6; }
10686 if ${ac_cv_path_UNIQ+:} false; then :
10687   $as_echo_n "(cached) " >&6
10688 else
10689   case $UNIQ in
10690   [\\/]* | ?:[\\/]*)
10691   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10692   ;;
10693   *)
10694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10695 for as_dir in $PATH
10696 do
10697   IFS=$as_save_IFS
10698   test -z "$as_dir" && as_dir=.
10699     for ac_exec_ext in '' $ac_executable_extensions; do
10700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10701     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10703     break 2
10704   fi
10705 done
10706   done
10707 IFS=$as_save_IFS
10708 
10709   ;;
10710 esac
10711 fi
10712 UNIQ=$ac_cv_path_UNIQ
10713 if test -n "$UNIQ"; then
10714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10715 $as_echo "$UNIQ" >&6; }
10716 else
10717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718 $as_echo "no" >&6; }
10719 fi
10720 
10721 
10722         if test "x$UNIQ" = x; then
10723           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10724         fi
10725       else
10726         # Otherwise we believe it is a complete path. Use it as it is.
10727         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10728 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10729         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10730 $as_echo_n "checking for UNIQ... " >&6; }
10731         if test ! -x "$tool_specified"; then
10732           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10733 $as_echo "not found" >&6; }
10734           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10735         fi
10736         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10737 $as_echo "$tool_specified" >&6; }
10738       fi
10739     fi
10740   fi
10741 
10742 
10743 
10744   if test "x$UNIQ" = x; then
10745     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10746   fi
10747 
10748 
10749 
10750 
10751 
10752   # Publish this variable in the help.
10753 
10754 
10755   if test "x$WC" = x; then
10756     # The variable is not set by user, try to locate tool using the code snippet
10757     for ac_prog in wc
10758 do
10759   # Extract the first word of "$ac_prog", so it can be a program name with args.
10760 set dummy $ac_prog; ac_word=$2
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762 $as_echo_n "checking for $ac_word... " >&6; }
10763 if ${ac_cv_path_WC+:} false; then :
10764   $as_echo_n "(cached) " >&6
10765 else
10766   case $WC in
10767   [\\/]* | ?:[\\/]*)
10768   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10769   ;;
10770   *)
10771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772 for as_dir in $PATH
10773 do
10774   IFS=$as_save_IFS
10775   test -z "$as_dir" && as_dir=.
10776     for ac_exec_ext in '' $ac_executable_extensions; do
10777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780     break 2
10781   fi
10782 done
10783   done
10784 IFS=$as_save_IFS
10785 
10786   ;;
10787 esac
10788 fi
10789 WC=$ac_cv_path_WC
10790 if test -n "$WC"; then
10791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10792 $as_echo "$WC" >&6; }
10793 else
10794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795 $as_echo "no" >&6; }
10796 fi
10797 
10798 
10799   test -n "$WC" && break
10800 done
10801 
10802   else
10803     # The variable is set, but is it from the command line or the environment?
10804 
10805     # Try to remove the string !WC! from our list.
10806     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10807     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10808       # If it failed, the variable was not from the command line. Ignore it,
10809       # but warn the user (except for BASH, which is always set by the calling BASH).
10810       if test "xWC" != xBASH; then
10811         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10812 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10813       fi
10814       # Try to locate tool using the code snippet
10815       for ac_prog in wc
10816 do
10817   # Extract the first word of "$ac_prog", so it can be a program name with args.
10818 set dummy $ac_prog; ac_word=$2
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820 $as_echo_n "checking for $ac_word... " >&6; }
10821 if ${ac_cv_path_WC+:} false; then :
10822   $as_echo_n "(cached) " >&6
10823 else
10824   case $WC in
10825   [\\/]* | ?:[\\/]*)
10826   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10827   ;;
10828   *)
10829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830 for as_dir in $PATH
10831 do
10832   IFS=$as_save_IFS
10833   test -z "$as_dir" && as_dir=.
10834     for ac_exec_ext in '' $ac_executable_extensions; do
10835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838     break 2
10839   fi
10840 done
10841   done
10842 IFS=$as_save_IFS
10843 
10844   ;;
10845 esac
10846 fi
10847 WC=$ac_cv_path_WC
10848 if test -n "$WC"; then
10849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10850 $as_echo "$WC" >&6; }
10851 else
10852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853 $as_echo "no" >&6; }
10854 fi
10855 
10856 
10857   test -n "$WC" && break
10858 done
10859 
10860     else
10861       # If it succeeded, then it was overridden by the user. We will use it
10862       # for the tool.
10863 
10864       # First remove it from the list of overridden variables, so we can test
10865       # for unknown variables in the end.
10866       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10867 
10868       # Check if the provided tool contains a complete path.
10869       tool_specified="$WC"
10870       tool_basename="${tool_specified##*/}"
10871       if test "x$tool_basename" = "x$tool_specified"; then
10872         # A command without a complete path is provided, search $PATH.
10873         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10874 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10875         # Extract the first word of "$tool_basename", so it can be a program name with args.
10876 set dummy $tool_basename; ac_word=$2
10877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878 $as_echo_n "checking for $ac_word... " >&6; }
10879 if ${ac_cv_path_WC+:} false; then :
10880   $as_echo_n "(cached) " >&6
10881 else
10882   case $WC in
10883   [\\/]* | ?:[\\/]*)
10884   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10885   ;;
10886   *)
10887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888 for as_dir in $PATH
10889 do
10890   IFS=$as_save_IFS
10891   test -z "$as_dir" && as_dir=.
10892     for ac_exec_ext in '' $ac_executable_extensions; do
10893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896     break 2
10897   fi
10898 done
10899   done
10900 IFS=$as_save_IFS
10901 
10902   ;;
10903 esac
10904 fi
10905 WC=$ac_cv_path_WC
10906 if test -n "$WC"; then
10907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10908 $as_echo "$WC" >&6; }
10909 else
10910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911 $as_echo "no" >&6; }
10912 fi
10913 
10914 
10915         if test "x$WC" = x; then
10916           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10917         fi
10918       else
10919         # Otherwise we believe it is a complete path. Use it as it is.
10920         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10921 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10922         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10923 $as_echo_n "checking for WC... " >&6; }
10924         if test ! -x "$tool_specified"; then
10925           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10926 $as_echo "not found" >&6; }
10927           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10928         fi
10929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10930 $as_echo "$tool_specified" >&6; }
10931       fi
10932     fi
10933   fi
10934 
10935 
10936 
10937   if test "x$WC" = x; then
10938     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10939   fi
10940 
10941 
10942 
10943 
10944 
10945   # Publish this variable in the help.
10946 
10947 
10948   if test "x$WHICH" = x; then
10949     # The variable is not set by user, try to locate tool using the code snippet
10950     for ac_prog in which
10951 do
10952   # Extract the first word of "$ac_prog", so it can be a program name with args.
10953 set dummy $ac_prog; ac_word=$2
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10955 $as_echo_n "checking for $ac_word... " >&6; }
10956 if ${ac_cv_path_WHICH+:} false; then :
10957   $as_echo_n "(cached) " >&6
10958 else
10959   case $WHICH in
10960   [\\/]* | ?:[\\/]*)
10961   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10962   ;;
10963   *)
10964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10965 for as_dir in $PATH
10966 do
10967   IFS=$as_save_IFS
10968   test -z "$as_dir" && as_dir=.
10969     for ac_exec_ext in '' $ac_executable_extensions; do
10970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10971     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10973     break 2
10974   fi
10975 done
10976   done
10977 IFS=$as_save_IFS
10978 
10979   ;;
10980 esac
10981 fi
10982 WHICH=$ac_cv_path_WHICH
10983 if test -n "$WHICH"; then
10984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10985 $as_echo "$WHICH" >&6; }
10986 else
10987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988 $as_echo "no" >&6; }
10989 fi
10990 
10991 
10992   test -n "$WHICH" && break
10993 done
10994 
10995   else
10996     # The variable is set, but is it from the command line or the environment?
10997 
10998     # Try to remove the string !WHICH! from our list.
10999     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11000     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11001       # If it failed, the variable was not from the command line. Ignore it,
11002       # but warn the user (except for BASH, which is always set by the calling BASH).
11003       if test "xWHICH" != xBASH; then
11004         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11005 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11006       fi
11007       # Try to locate tool using the code snippet
11008       for ac_prog in which
11009 do
11010   # Extract the first word of "$ac_prog", so it can be a program name with args.
11011 set dummy $ac_prog; ac_word=$2
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11013 $as_echo_n "checking for $ac_word... " >&6; }
11014 if ${ac_cv_path_WHICH+:} false; then :
11015   $as_echo_n "(cached) " >&6
11016 else
11017   case $WHICH in
11018   [\\/]* | ?:[\\/]*)
11019   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11020   ;;
11021   *)
11022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11023 for as_dir in $PATH
11024 do
11025   IFS=$as_save_IFS
11026   test -z "$as_dir" && as_dir=.
11027     for ac_exec_ext in '' $ac_executable_extensions; do
11028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11029     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11031     break 2
11032   fi
11033 done
11034   done
11035 IFS=$as_save_IFS
11036 
11037   ;;
11038 esac
11039 fi
11040 WHICH=$ac_cv_path_WHICH
11041 if test -n "$WHICH"; then
11042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11043 $as_echo "$WHICH" >&6; }
11044 else
11045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046 $as_echo "no" >&6; }
11047 fi
11048 
11049 
11050   test -n "$WHICH" && break
11051 done
11052 
11053     else
11054       # If it succeeded, then it was overridden by the user. We will use it
11055       # for the tool.
11056 
11057       # First remove it from the list of overridden variables, so we can test
11058       # for unknown variables in the end.
11059       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11060 
11061       # Check if the provided tool contains a complete path.
11062       tool_specified="$WHICH"
11063       tool_basename="${tool_specified##*/}"
11064       if test "x$tool_basename" = "x$tool_specified"; then
11065         # A command without a complete path is provided, search $PATH.
11066         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11067 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11068         # Extract the first word of "$tool_basename", so it can be a program name with args.
11069 set dummy $tool_basename; ac_word=$2
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071 $as_echo_n "checking for $ac_word... " >&6; }
11072 if ${ac_cv_path_WHICH+:} false; then :
11073   $as_echo_n "(cached) " >&6
11074 else
11075   case $WHICH in
11076   [\\/]* | ?:[\\/]*)
11077   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11078   ;;
11079   *)
11080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11081 for as_dir in $PATH
11082 do
11083   IFS=$as_save_IFS
11084   test -z "$as_dir" && as_dir=.
11085     for ac_exec_ext in '' $ac_executable_extensions; do
11086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11087     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11089     break 2
11090   fi
11091 done
11092   done
11093 IFS=$as_save_IFS
11094 
11095   ;;
11096 esac
11097 fi
11098 WHICH=$ac_cv_path_WHICH
11099 if test -n "$WHICH"; then
11100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11101 $as_echo "$WHICH" >&6; }
11102 else
11103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104 $as_echo "no" >&6; }
11105 fi
11106 
11107 
11108         if test "x$WHICH" = x; then
11109           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11110         fi
11111       else
11112         # Otherwise we believe it is a complete path. Use it as it is.
11113         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11114 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11115         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11116 $as_echo_n "checking for WHICH... " >&6; }
11117         if test ! -x "$tool_specified"; then
11118           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11119 $as_echo "not found" >&6; }
11120           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11121         fi
11122         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11123 $as_echo "$tool_specified" >&6; }
11124       fi
11125     fi
11126   fi
11127 
11128 
11129 
11130   if test "x$WHICH" = x; then
11131     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11132   fi
11133 
11134 
11135 
11136 
11137 
11138   # Publish this variable in the help.
11139 
11140 
11141   if test "x$XARGS" = x; then
11142     # The variable is not set by user, try to locate tool using the code snippet
11143     for ac_prog in xargs
11144 do
11145   # Extract the first word of "$ac_prog", so it can be a program name with args.
11146 set dummy $ac_prog; ac_word=$2
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11148 $as_echo_n "checking for $ac_word... " >&6; }
11149 if ${ac_cv_path_XARGS+:} false; then :
11150   $as_echo_n "(cached) " >&6
11151 else
11152   case $XARGS in
11153   [\\/]* | ?:[\\/]*)
11154   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11155   ;;
11156   *)
11157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11158 for as_dir in $PATH
11159 do
11160   IFS=$as_save_IFS
11161   test -z "$as_dir" && as_dir=.
11162     for ac_exec_ext in '' $ac_executable_extensions; do
11163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11164     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11166     break 2
11167   fi
11168 done
11169   done
11170 IFS=$as_save_IFS
11171 
11172   ;;
11173 esac
11174 fi
11175 XARGS=$ac_cv_path_XARGS
11176 if test -n "$XARGS"; then
11177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11178 $as_echo "$XARGS" >&6; }
11179 else
11180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11181 $as_echo "no" >&6; }
11182 fi
11183 
11184 
11185   test -n "$XARGS" && break
11186 done
11187 
11188   else
11189     # The variable is set, but is it from the command line or the environment?
11190 
11191     # Try to remove the string !XARGS! from our list.
11192     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11193     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11194       # If it failed, the variable was not from the command line. Ignore it,
11195       # but warn the user (except for BASH, which is always set by the calling BASH).
11196       if test "xXARGS" != xBASH; then
11197         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11198 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11199       fi
11200       # Try to locate tool using the code snippet
11201       for ac_prog in xargs
11202 do
11203   # Extract the first word of "$ac_prog", so it can be a program name with args.
11204 set dummy $ac_prog; ac_word=$2
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11206 $as_echo_n "checking for $ac_word... " >&6; }
11207 if ${ac_cv_path_XARGS+:} false; then :
11208   $as_echo_n "(cached) " >&6
11209 else
11210   case $XARGS in
11211   [\\/]* | ?:[\\/]*)
11212   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11213   ;;
11214   *)
11215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11216 for as_dir in $PATH
11217 do
11218   IFS=$as_save_IFS
11219   test -z "$as_dir" && as_dir=.
11220     for ac_exec_ext in '' $ac_executable_extensions; do
11221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11222     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11224     break 2
11225   fi
11226 done
11227   done
11228 IFS=$as_save_IFS
11229 
11230   ;;
11231 esac
11232 fi
11233 XARGS=$ac_cv_path_XARGS
11234 if test -n "$XARGS"; then
11235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11236 $as_echo "$XARGS" >&6; }
11237 else
11238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239 $as_echo "no" >&6; }
11240 fi
11241 
11242 
11243   test -n "$XARGS" && break
11244 done
11245 
11246     else
11247       # If it succeeded, then it was overridden by the user. We will use it
11248       # for the tool.
11249 
11250       # First remove it from the list of overridden variables, so we can test
11251       # for unknown variables in the end.
11252       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11253 
11254       # Check if the provided tool contains a complete path.
11255       tool_specified="$XARGS"
11256       tool_basename="${tool_specified##*/}"
11257       if test "x$tool_basename" = "x$tool_specified"; then
11258         # A command without a complete path is provided, search $PATH.
11259         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11260 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11261         # Extract the first word of "$tool_basename", so it can be a program name with args.
11262 set dummy $tool_basename; ac_word=$2
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11264 $as_echo_n "checking for $ac_word... " >&6; }
11265 if ${ac_cv_path_XARGS+:} false; then :
11266   $as_echo_n "(cached) " >&6
11267 else
11268   case $XARGS in
11269   [\\/]* | ?:[\\/]*)
11270   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11271   ;;
11272   *)
11273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11274 for as_dir in $PATH
11275 do
11276   IFS=$as_save_IFS
11277   test -z "$as_dir" && as_dir=.
11278     for ac_exec_ext in '' $ac_executable_extensions; do
11279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11280     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11282     break 2
11283   fi
11284 done
11285   done
11286 IFS=$as_save_IFS
11287 
11288   ;;
11289 esac
11290 fi
11291 XARGS=$ac_cv_path_XARGS
11292 if test -n "$XARGS"; then
11293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11294 $as_echo "$XARGS" >&6; }
11295 else
11296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297 $as_echo "no" >&6; }
11298 fi
11299 
11300 
11301         if test "x$XARGS" = x; then
11302           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11303         fi
11304       else
11305         # Otherwise we believe it is a complete path. Use it as it is.
11306         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11307 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11308         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11309 $as_echo_n "checking for XARGS... " >&6; }
11310         if test ! -x "$tool_specified"; then
11311           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11312 $as_echo "not found" >&6; }
11313           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11314         fi
11315         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11316 $as_echo "$tool_specified" >&6; }
11317       fi
11318     fi
11319   fi
11320 
11321 
11322 
11323   if test "x$XARGS" = x; then
11324     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11325   fi
11326 
11327 
11328 
11329   # Then required tools that require some special treatment.
11330 
11331 
11332   # Publish this variable in the help.
11333 
11334 
11335   if test "x$AWK" = x; then
11336     # The variable is not set by user, try to locate tool using the code snippet
11337     for ac_prog in gawk mawk nawk awk
11338 do
11339   # Extract the first word of "$ac_prog", so it can be a program name with args.
11340 set dummy $ac_prog; ac_word=$2
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342 $as_echo_n "checking for $ac_word... " >&6; }
11343 if ${ac_cv_prog_AWK+:} false; then :
11344   $as_echo_n "(cached) " >&6
11345 else
11346   if test -n "$AWK"; then
11347   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11348 else
11349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11350 for as_dir in $PATH
11351 do
11352   IFS=$as_save_IFS
11353   test -z "$as_dir" && as_dir=.
11354     for ac_exec_ext in '' $ac_executable_extensions; do
11355   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11356     ac_cv_prog_AWK="$ac_prog"
11357     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11358     break 2
11359   fi
11360 done
11361   done
11362 IFS=$as_save_IFS
11363 
11364 fi
11365 fi
11366 AWK=$ac_cv_prog_AWK
11367 if test -n "$AWK"; then
11368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11369 $as_echo "$AWK" >&6; }
11370 else
11371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372 $as_echo "no" >&6; }
11373 fi
11374 
11375 
11376   test -n "$AWK" && break
11377 done
11378 
11379   else
11380     # The variable is set, but is it from the command line or the environment?
11381 
11382     # Try to remove the string !AWK! from our list.
11383     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11384     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11385       # If it failed, the variable was not from the command line. Ignore it,
11386       # but warn the user (except for BASH, which is always set by the calling BASH).
11387       if test "xAWK" != xBASH; then
11388         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11389 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11390       fi
11391       # Try to locate tool using the code snippet
11392       for ac_prog in gawk mawk nawk awk
11393 do
11394   # Extract the first word of "$ac_prog", so it can be a program name with args.
11395 set dummy $ac_prog; ac_word=$2
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11397 $as_echo_n "checking for $ac_word... " >&6; }
11398 if ${ac_cv_prog_AWK+:} false; then :
11399   $as_echo_n "(cached) " >&6
11400 else
11401   if test -n "$AWK"; then
11402   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11403 else
11404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11405 for as_dir in $PATH
11406 do
11407   IFS=$as_save_IFS
11408   test -z "$as_dir" && as_dir=.
11409     for ac_exec_ext in '' $ac_executable_extensions; do
11410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11411     ac_cv_prog_AWK="$ac_prog"
11412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11413     break 2
11414   fi
11415 done
11416   done
11417 IFS=$as_save_IFS
11418 
11419 fi
11420 fi
11421 AWK=$ac_cv_prog_AWK
11422 if test -n "$AWK"; then
11423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11424 $as_echo "$AWK" >&6; }
11425 else
11426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427 $as_echo "no" >&6; }
11428 fi
11429 
11430 
11431   test -n "$AWK" && break
11432 done
11433 
11434     else
11435       # If it succeeded, then it was overridden by the user. We will use it
11436       # for the tool.
11437 
11438       # First remove it from the list of overridden variables, so we can test
11439       # for unknown variables in the end.
11440       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11441 
11442       # Check if the provided tool contains a complete path.
11443       tool_specified="$AWK"
11444       tool_basename="${tool_specified##*/}"
11445       if test "x$tool_basename" = "x$tool_specified"; then
11446         # A command without a complete path is provided, search $PATH.
11447         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11448 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11449         # Extract the first word of "$tool_basename", so it can be a program name with args.
11450 set dummy $tool_basename; ac_word=$2
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452 $as_echo_n "checking for $ac_word... " >&6; }
11453 if ${ac_cv_path_AWK+:} false; then :
11454   $as_echo_n "(cached) " >&6
11455 else
11456   case $AWK in
11457   [\\/]* | ?:[\\/]*)
11458   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11459   ;;
11460   *)
11461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462 for as_dir in $PATH
11463 do
11464   IFS=$as_save_IFS
11465   test -z "$as_dir" && as_dir=.
11466     for ac_exec_ext in '' $ac_executable_extensions; do
11467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470     break 2
11471   fi
11472 done
11473   done
11474 IFS=$as_save_IFS
11475 
11476   ;;
11477 esac
11478 fi
11479 AWK=$ac_cv_path_AWK
11480 if test -n "$AWK"; then
11481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11482 $as_echo "$AWK" >&6; }
11483 else
11484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485 $as_echo "no" >&6; }
11486 fi
11487 
11488 
11489         if test "x$AWK" = x; then
11490           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11491         fi
11492       else
11493         # Otherwise we believe it is a complete path. Use it as it is.
11494         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11495 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11496         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11497 $as_echo_n "checking for AWK... " >&6; }
11498         if test ! -x "$tool_specified"; then
11499           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11500 $as_echo "not found" >&6; }
11501           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11502         fi
11503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11504 $as_echo "$tool_specified" >&6; }
11505       fi
11506     fi
11507   fi
11508 
11509 
11510   if test "x$AWK" = x; then
11511     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11512   fi
11513 
11514 
11515 
11516 
11517   # Publish this variable in the help.
11518 
11519 
11520   if test "x$GREP" = x; then
11521     # The variable is not set by user, try to locate tool using the code snippet
11522     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11523 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11524 if ${ac_cv_path_GREP+:} false; then :
11525   $as_echo_n "(cached) " >&6
11526 else
11527   if test -z "$GREP"; then
11528   ac_path_GREP_found=false
11529   # Loop through the user's path and test for each of PROGNAME-LIST
11530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11531 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11532 do
11533   IFS=$as_save_IFS
11534   test -z "$as_dir" && as_dir=.
11535     for ac_prog in grep ggrep; do
11536     for ac_exec_ext in '' $ac_executable_extensions; do
11537       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11538       as_fn_executable_p "$ac_path_GREP" || continue
11539 # Check for GNU ac_path_GREP and select it if it is found.
11540   # Check for GNU $ac_path_GREP
11541 case `"$ac_path_GREP" --version 2>&1` in
11542 *GNU*)
11543   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11544 *)
11545   ac_count=0
11546   $as_echo_n 0123456789 >"conftest.in"
11547   while :
11548   do
11549     cat "conftest.in" "conftest.in" >"conftest.tmp"
11550     mv "conftest.tmp" "conftest.in"
11551     cp "conftest.in" "conftest.nl"
11552     $as_echo 'GREP' >> "conftest.nl"
11553     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11554     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11555     as_fn_arith $ac_count + 1 && ac_count=$as_val
11556     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11557       # Best one so far, save it but keep looking for a better one
11558       ac_cv_path_GREP="$ac_path_GREP"
11559       ac_path_GREP_max=$ac_count
11560     fi
11561     # 10*(2^10) chars as input seems more than enough
11562     test $ac_count -gt 10 && break
11563   done
11564   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11565 esac
11566 
11567       $ac_path_GREP_found && break 3
11568     done
11569   done
11570   done
11571 IFS=$as_save_IFS
11572   if test -z "$ac_cv_path_GREP"; then
11573     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11574   fi
11575 else
11576   ac_cv_path_GREP=$GREP
11577 fi
11578 
11579 fi
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11581 $as_echo "$ac_cv_path_GREP" >&6; }
11582  GREP="$ac_cv_path_GREP"
11583 
11584 
11585   else
11586     # The variable is set, but is it from the command line or the environment?
11587 
11588     # Try to remove the string !GREP! from our list.
11589     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11590     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11591       # If it failed, the variable was not from the command line. Ignore it,
11592       # but warn the user (except for BASH, which is always set by the calling BASH).
11593       if test "xGREP" != xBASH; then
11594         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11595 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11596       fi
11597       # Try to locate tool using the code snippet
11598       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11599 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11600 if ${ac_cv_path_GREP+:} false; then :
11601   $as_echo_n "(cached) " >&6
11602 else
11603   if test -z "$GREP"; then
11604   ac_path_GREP_found=false
11605   # Loop through the user's path and test for each of PROGNAME-LIST
11606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11607 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11608 do
11609   IFS=$as_save_IFS
11610   test -z "$as_dir" && as_dir=.
11611     for ac_prog in grep ggrep; do
11612     for ac_exec_ext in '' $ac_executable_extensions; do
11613       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11614       as_fn_executable_p "$ac_path_GREP" || continue
11615 # Check for GNU ac_path_GREP and select it if it is found.
11616   # Check for GNU $ac_path_GREP
11617 case `"$ac_path_GREP" --version 2>&1` in
11618 *GNU*)
11619   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11620 *)
11621   ac_count=0
11622   $as_echo_n 0123456789 >"conftest.in"
11623   while :
11624   do
11625     cat "conftest.in" "conftest.in" >"conftest.tmp"
11626     mv "conftest.tmp" "conftest.in"
11627     cp "conftest.in" "conftest.nl"
11628     $as_echo 'GREP' >> "conftest.nl"
11629     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11630     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11631     as_fn_arith $ac_count + 1 && ac_count=$as_val
11632     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11633       # Best one so far, save it but keep looking for a better one
11634       ac_cv_path_GREP="$ac_path_GREP"
11635       ac_path_GREP_max=$ac_count
11636     fi
11637     # 10*(2^10) chars as input seems more than enough
11638     test $ac_count -gt 10 && break
11639   done
11640   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11641 esac
11642 
11643       $ac_path_GREP_found && break 3
11644     done
11645   done
11646   done
11647 IFS=$as_save_IFS
11648   if test -z "$ac_cv_path_GREP"; then
11649     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11650   fi
11651 else
11652   ac_cv_path_GREP=$GREP
11653 fi
11654 
11655 fi
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11657 $as_echo "$ac_cv_path_GREP" >&6; }
11658  GREP="$ac_cv_path_GREP"
11659 
11660 
11661     else
11662       # If it succeeded, then it was overridden by the user. We will use it
11663       # for the tool.
11664 
11665       # First remove it from the list of overridden variables, so we can test
11666       # for unknown variables in the end.
11667       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11668 
11669       # Check if the provided tool contains a complete path.
11670       tool_specified="$GREP"
11671       tool_basename="${tool_specified##*/}"
11672       if test "x$tool_basename" = "x$tool_specified"; then
11673         # A command without a complete path is provided, search $PATH.
11674         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11675 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11676         # Extract the first word of "$tool_basename", so it can be a program name with args.
11677 set dummy $tool_basename; ac_word=$2
11678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11679 $as_echo_n "checking for $ac_word... " >&6; }
11680 if ${ac_cv_path_GREP+:} false; then :
11681   $as_echo_n "(cached) " >&6
11682 else
11683   case $GREP in
11684   [\\/]* | ?:[\\/]*)
11685   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11686   ;;
11687   *)
11688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689 for as_dir in $PATH
11690 do
11691   IFS=$as_save_IFS
11692   test -z "$as_dir" && as_dir=.
11693     for ac_exec_ext in '' $ac_executable_extensions; do
11694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11695     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11697     break 2
11698   fi
11699 done
11700   done
11701 IFS=$as_save_IFS
11702 
11703   ;;
11704 esac
11705 fi
11706 GREP=$ac_cv_path_GREP
11707 if test -n "$GREP"; then
11708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11709 $as_echo "$GREP" >&6; }
11710 else
11711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712 $as_echo "no" >&6; }
11713 fi
11714 
11715 
11716         if test "x$GREP" = x; then
11717           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11718         fi
11719       else
11720         # Otherwise we believe it is a complete path. Use it as it is.
11721         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11722 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11723         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11724 $as_echo_n "checking for GREP... " >&6; }
11725         if test ! -x "$tool_specified"; then
11726           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11727 $as_echo "not found" >&6; }
11728           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11729         fi
11730         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11731 $as_echo "$tool_specified" >&6; }
11732       fi
11733     fi
11734   fi
11735 
11736 
11737   if test "x$GREP" = x; then
11738     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11739   fi
11740 
11741 
11742 
11743 
11744   # Publish this variable in the help.
11745 
11746 
11747   if test "x$EGREP" = x; then
11748     # The variable is not set by user, try to locate tool using the code snippet
11749     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11750 $as_echo_n "checking for egrep... " >&6; }
11751 if ${ac_cv_path_EGREP+:} false; then :
11752   $as_echo_n "(cached) " >&6
11753 else
11754   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11755    then ac_cv_path_EGREP="$GREP -E"
11756    else
11757      if test -z "$EGREP"; then
11758   ac_path_EGREP_found=false
11759   # Loop through the user's path and test for each of PROGNAME-LIST
11760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11761 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11762 do
11763   IFS=$as_save_IFS
11764   test -z "$as_dir" && as_dir=.
11765     for ac_prog in egrep; do
11766     for ac_exec_ext in '' $ac_executable_extensions; do
11767       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11768       as_fn_executable_p "$ac_path_EGREP" || continue
11769 # Check for GNU ac_path_EGREP and select it if it is found.
11770   # Check for GNU $ac_path_EGREP
11771 case `"$ac_path_EGREP" --version 2>&1` in
11772 *GNU*)
11773   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11774 *)
11775   ac_count=0
11776   $as_echo_n 0123456789 >"conftest.in"
11777   while :
11778   do
11779     cat "conftest.in" "conftest.in" >"conftest.tmp"
11780     mv "conftest.tmp" "conftest.in"
11781     cp "conftest.in" "conftest.nl"
11782     $as_echo 'EGREP' >> "conftest.nl"
11783     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11784     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11785     as_fn_arith $ac_count + 1 && ac_count=$as_val
11786     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11787       # Best one so far, save it but keep looking for a better one
11788       ac_cv_path_EGREP="$ac_path_EGREP"
11789       ac_path_EGREP_max=$ac_count
11790     fi
11791     # 10*(2^10) chars as input seems more than enough
11792     test $ac_count -gt 10 && break
11793   done
11794   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11795 esac
11796 
11797       $ac_path_EGREP_found && break 3
11798     done
11799   done
11800   done
11801 IFS=$as_save_IFS
11802   if test -z "$ac_cv_path_EGREP"; then
11803     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11804   fi
11805 else
11806   ac_cv_path_EGREP=$EGREP
11807 fi
11808 
11809    fi
11810 fi
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11812 $as_echo "$ac_cv_path_EGREP" >&6; }
11813  EGREP="$ac_cv_path_EGREP"
11814 
11815 
11816   else
11817     # The variable is set, but is it from the command line or the environment?
11818 
11819     # Try to remove the string !EGREP! from our list.
11820     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11821     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11822       # If it failed, the variable was not from the command line. Ignore it,
11823       # but warn the user (except for BASH, which is always set by the calling BASH).
11824       if test "xEGREP" != xBASH; then
11825         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11826 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11827       fi
11828       # Try to locate tool using the code snippet
11829       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11830 $as_echo_n "checking for egrep... " >&6; }
11831 if ${ac_cv_path_EGREP+:} false; then :
11832   $as_echo_n "(cached) " >&6
11833 else
11834   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11835    then ac_cv_path_EGREP="$GREP -E"
11836    else
11837      if test -z "$EGREP"; then
11838   ac_path_EGREP_found=false
11839   # Loop through the user's path and test for each of PROGNAME-LIST
11840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11841 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11842 do
11843   IFS=$as_save_IFS
11844   test -z "$as_dir" && as_dir=.
11845     for ac_prog in egrep; do
11846     for ac_exec_ext in '' $ac_executable_extensions; do
11847       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11848       as_fn_executable_p "$ac_path_EGREP" || continue
11849 # Check for GNU ac_path_EGREP and select it if it is found.
11850   # Check for GNU $ac_path_EGREP
11851 case `"$ac_path_EGREP" --version 2>&1` in
11852 *GNU*)
11853   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11854 *)
11855   ac_count=0
11856   $as_echo_n 0123456789 >"conftest.in"
11857   while :
11858   do
11859     cat "conftest.in" "conftest.in" >"conftest.tmp"
11860     mv "conftest.tmp" "conftest.in"
11861     cp "conftest.in" "conftest.nl"
11862     $as_echo 'EGREP' >> "conftest.nl"
11863     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11864     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11865     as_fn_arith $ac_count + 1 && ac_count=$as_val
11866     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11867       # Best one so far, save it but keep looking for a better one
11868       ac_cv_path_EGREP="$ac_path_EGREP"
11869       ac_path_EGREP_max=$ac_count
11870     fi
11871     # 10*(2^10) chars as input seems more than enough
11872     test $ac_count -gt 10 && break
11873   done
11874   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11875 esac
11876 
11877       $ac_path_EGREP_found && break 3
11878     done
11879   done
11880   done
11881 IFS=$as_save_IFS
11882   if test -z "$ac_cv_path_EGREP"; then
11883     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11884   fi
11885 else
11886   ac_cv_path_EGREP=$EGREP
11887 fi
11888 
11889    fi
11890 fi
11891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11892 $as_echo "$ac_cv_path_EGREP" >&6; }
11893  EGREP="$ac_cv_path_EGREP"
11894 
11895 
11896     else
11897       # If it succeeded, then it was overridden by the user. We will use it
11898       # for the tool.
11899 
11900       # First remove it from the list of overridden variables, so we can test
11901       # for unknown variables in the end.
11902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11903 
11904       # Check if the provided tool contains a complete path.
11905       tool_specified="$EGREP"
11906       tool_basename="${tool_specified##*/}"
11907       if test "x$tool_basename" = "x$tool_specified"; then
11908         # A command without a complete path is provided, search $PATH.
11909         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11910 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11911         # Extract the first word of "$tool_basename", so it can be a program name with args.
11912 set dummy $tool_basename; ac_word=$2
11913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11914 $as_echo_n "checking for $ac_word... " >&6; }
11915 if ${ac_cv_path_EGREP+:} false; then :
11916   $as_echo_n "(cached) " >&6
11917 else
11918   case $EGREP in
11919   [\\/]* | ?:[\\/]*)
11920   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11921   ;;
11922   *)
11923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924 for as_dir in $PATH
11925 do
11926   IFS=$as_save_IFS
11927   test -z "$as_dir" && as_dir=.
11928     for ac_exec_ext in '' $ac_executable_extensions; do
11929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11930     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11932     break 2
11933   fi
11934 done
11935   done
11936 IFS=$as_save_IFS
11937 
11938   ;;
11939 esac
11940 fi
11941 EGREP=$ac_cv_path_EGREP
11942 if test -n "$EGREP"; then
11943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11944 $as_echo "$EGREP" >&6; }
11945 else
11946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947 $as_echo "no" >&6; }
11948 fi
11949 
11950 
11951         if test "x$EGREP" = x; then
11952           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11953         fi
11954       else
11955         # Otherwise we believe it is a complete path. Use it as it is.
11956         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11957 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11959 $as_echo_n "checking for EGREP... " >&6; }
11960         if test ! -x "$tool_specified"; then
11961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11962 $as_echo "not found" >&6; }
11963           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11964         fi
11965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11966 $as_echo "$tool_specified" >&6; }
11967       fi
11968     fi
11969   fi
11970 
11971 
11972   if test "x$EGREP" = x; then
11973     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11974   fi
11975 
11976 
11977 
11978 
11979   # Publish this variable in the help.
11980 
11981 
11982   if test "x$FGREP" = x; then
11983     # The variable is not set by user, try to locate tool using the code snippet
11984     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11985 $as_echo_n "checking for fgrep... " >&6; }
11986 if ${ac_cv_path_FGREP+:} false; then :
11987   $as_echo_n "(cached) " >&6
11988 else
11989   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11990    then ac_cv_path_FGREP="$GREP -F"
11991    else
11992      if test -z "$FGREP"; then
11993   ac_path_FGREP_found=false
11994   # Loop through the user's path and test for each of PROGNAME-LIST
11995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11996 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11997 do
11998   IFS=$as_save_IFS
11999   test -z "$as_dir" && as_dir=.
12000     for ac_prog in fgrep; do
12001     for ac_exec_ext in '' $ac_executable_extensions; do
12002       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12003       as_fn_executable_p "$ac_path_FGREP" || continue
12004 # Check for GNU ac_path_FGREP and select it if it is found.
12005   # Check for GNU $ac_path_FGREP
12006 case `"$ac_path_FGREP" --version 2>&1` in
12007 *GNU*)
12008   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12009 *)
12010   ac_count=0
12011   $as_echo_n 0123456789 >"conftest.in"
12012   while :
12013   do
12014     cat "conftest.in" "conftest.in" >"conftest.tmp"
12015     mv "conftest.tmp" "conftest.in"
12016     cp "conftest.in" "conftest.nl"
12017     $as_echo 'FGREP' >> "conftest.nl"
12018     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12019     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12020     as_fn_arith $ac_count + 1 && ac_count=$as_val
12021     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12022       # Best one so far, save it but keep looking for a better one
12023       ac_cv_path_FGREP="$ac_path_FGREP"
12024       ac_path_FGREP_max=$ac_count
12025     fi
12026     # 10*(2^10) chars as input seems more than enough
12027     test $ac_count -gt 10 && break
12028   done
12029   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12030 esac
12031 
12032       $ac_path_FGREP_found && break 3
12033     done
12034   done
12035   done
12036 IFS=$as_save_IFS
12037   if test -z "$ac_cv_path_FGREP"; then
12038     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12039   fi
12040 else
12041   ac_cv_path_FGREP=$FGREP
12042 fi
12043 
12044    fi
12045 fi
12046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12047 $as_echo "$ac_cv_path_FGREP" >&6; }
12048  FGREP="$ac_cv_path_FGREP"
12049 
12050 
12051   else
12052     # The variable is set, but is it from the command line or the environment?
12053 
12054     # Try to remove the string !FGREP! from our list.
12055     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12056     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12057       # If it failed, the variable was not from the command line. Ignore it,
12058       # but warn the user (except for BASH, which is always set by the calling BASH).
12059       if test "xFGREP" != xBASH; then
12060         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12061 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12062       fi
12063       # Try to locate tool using the code snippet
12064       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12065 $as_echo_n "checking for fgrep... " >&6; }
12066 if ${ac_cv_path_FGREP+:} false; then :
12067   $as_echo_n "(cached) " >&6
12068 else
12069   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12070    then ac_cv_path_FGREP="$GREP -F"
12071    else
12072      if test -z "$FGREP"; then
12073   ac_path_FGREP_found=false
12074   # Loop through the user's path and test for each of PROGNAME-LIST
12075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12077 do
12078   IFS=$as_save_IFS
12079   test -z "$as_dir" && as_dir=.
12080     for ac_prog in fgrep; do
12081     for ac_exec_ext in '' $ac_executable_extensions; do
12082       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12083       as_fn_executable_p "$ac_path_FGREP" || continue
12084 # Check for GNU ac_path_FGREP and select it if it is found.
12085   # Check for GNU $ac_path_FGREP
12086 case `"$ac_path_FGREP" --version 2>&1` in
12087 *GNU*)
12088   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12089 *)
12090   ac_count=0
12091   $as_echo_n 0123456789 >"conftest.in"
12092   while :
12093   do
12094     cat "conftest.in" "conftest.in" >"conftest.tmp"
12095     mv "conftest.tmp" "conftest.in"
12096     cp "conftest.in" "conftest.nl"
12097     $as_echo 'FGREP' >> "conftest.nl"
12098     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12099     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12100     as_fn_arith $ac_count + 1 && ac_count=$as_val
12101     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12102       # Best one so far, save it but keep looking for a better one
12103       ac_cv_path_FGREP="$ac_path_FGREP"
12104       ac_path_FGREP_max=$ac_count
12105     fi
12106     # 10*(2^10) chars as input seems more than enough
12107     test $ac_count -gt 10 && break
12108   done
12109   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12110 esac
12111 
12112       $ac_path_FGREP_found && break 3
12113     done
12114   done
12115   done
12116 IFS=$as_save_IFS
12117   if test -z "$ac_cv_path_FGREP"; then
12118     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12119   fi
12120 else
12121   ac_cv_path_FGREP=$FGREP
12122 fi
12123 
12124    fi
12125 fi
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12127 $as_echo "$ac_cv_path_FGREP" >&6; }
12128  FGREP="$ac_cv_path_FGREP"
12129 
12130 
12131     else
12132       # If it succeeded, then it was overridden by the user. We will use it
12133       # for the tool.
12134 
12135       # First remove it from the list of overridden variables, so we can test
12136       # for unknown variables in the end.
12137       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12138 
12139       # Check if the provided tool contains a complete path.
12140       tool_specified="$FGREP"
12141       tool_basename="${tool_specified##*/}"
12142       if test "x$tool_basename" = "x$tool_specified"; then
12143         # A command without a complete path is provided, search $PATH.
12144         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12145 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12146         # Extract the first word of "$tool_basename", so it can be a program name with args.
12147 set dummy $tool_basename; ac_word=$2
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12149 $as_echo_n "checking for $ac_word... " >&6; }
12150 if ${ac_cv_path_FGREP+:} false; then :
12151   $as_echo_n "(cached) " >&6
12152 else
12153   case $FGREP in
12154   [\\/]* | ?:[\\/]*)
12155   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12156   ;;
12157   *)
12158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12159 for as_dir in $PATH
12160 do
12161   IFS=$as_save_IFS
12162   test -z "$as_dir" && as_dir=.
12163     for ac_exec_ext in '' $ac_executable_extensions; do
12164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12165     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12167     break 2
12168   fi
12169 done
12170   done
12171 IFS=$as_save_IFS
12172 
12173   ;;
12174 esac
12175 fi
12176 FGREP=$ac_cv_path_FGREP
12177 if test -n "$FGREP"; then
12178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12179 $as_echo "$FGREP" >&6; }
12180 else
12181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182 $as_echo "no" >&6; }
12183 fi
12184 
12185 
12186         if test "x$FGREP" = x; then
12187           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12188         fi
12189       else
12190         # Otherwise we believe it is a complete path. Use it as it is.
12191         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12192 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12194 $as_echo_n "checking for FGREP... " >&6; }
12195         if test ! -x "$tool_specified"; then
12196           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12197 $as_echo "not found" >&6; }
12198           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12199         fi
12200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12201 $as_echo "$tool_specified" >&6; }
12202       fi
12203     fi
12204   fi
12205 
12206 
12207   if test "x$FGREP" = x; then
12208     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12209   fi
12210 
12211 
12212 
12213 
12214   # Publish this variable in the help.
12215 
12216 
12217   if test "x$SED" = x; then
12218     # The variable is not set by user, try to locate tool using the code snippet
12219     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12220 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12221 if ${ac_cv_path_SED+:} false; then :
12222   $as_echo_n "(cached) " >&6
12223 else
12224             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12225      for ac_i in 1 2 3 4 5 6 7; do
12226        ac_script="$ac_script$as_nl$ac_script"
12227      done
12228      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12229      { ac_script=; unset ac_script;}
12230      if test -z "$SED"; then
12231   ac_path_SED_found=false
12232   # Loop through the user's path and test for each of PROGNAME-LIST
12233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12234 for as_dir in $PATH
12235 do
12236   IFS=$as_save_IFS
12237   test -z "$as_dir" && as_dir=.
12238     for ac_prog in sed gsed; do
12239     for ac_exec_ext in '' $ac_executable_extensions; do
12240       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12241       as_fn_executable_p "$ac_path_SED" || continue
12242 # Check for GNU ac_path_SED and select it if it is found.
12243   # Check for GNU $ac_path_SED
12244 case `"$ac_path_SED" --version 2>&1` in
12245 *GNU*)
12246   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12247 *)
12248   ac_count=0
12249   $as_echo_n 0123456789 >"conftest.in"
12250   while :
12251   do
12252     cat "conftest.in" "conftest.in" >"conftest.tmp"
12253     mv "conftest.tmp" "conftest.in"
12254     cp "conftest.in" "conftest.nl"
12255     $as_echo '' >> "conftest.nl"
12256     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12257     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12258     as_fn_arith $ac_count + 1 && ac_count=$as_val
12259     if test $ac_count -gt ${ac_path_SED_max-0}; then
12260       # Best one so far, save it but keep looking for a better one
12261       ac_cv_path_SED="$ac_path_SED"
12262       ac_path_SED_max=$ac_count
12263     fi
12264     # 10*(2^10) chars as input seems more than enough
12265     test $ac_count -gt 10 && break
12266   done
12267   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12268 esac
12269 
12270       $ac_path_SED_found && break 3
12271     done
12272   done
12273   done
12274 IFS=$as_save_IFS
12275   if test -z "$ac_cv_path_SED"; then
12276     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12277   fi
12278 else
12279   ac_cv_path_SED=$SED
12280 fi
12281 
12282 fi
12283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12284 $as_echo "$ac_cv_path_SED" >&6; }
12285  SED="$ac_cv_path_SED"
12286   rm -f conftest.sed
12287 
12288   else
12289     # The variable is set, but is it from the command line or the environment?
12290 
12291     # Try to remove the string !SED! from our list.
12292     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12293     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12294       # If it failed, the variable was not from the command line. Ignore it,
12295       # but warn the user (except for BASH, which is always set by the calling BASH).
12296       if test "xSED" != xBASH; then
12297         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12298 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12299       fi
12300       # Try to locate tool using the code snippet
12301       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12302 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12303 if ${ac_cv_path_SED+:} false; then :
12304   $as_echo_n "(cached) " >&6
12305 else
12306             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12307      for ac_i in 1 2 3 4 5 6 7; do
12308        ac_script="$ac_script$as_nl$ac_script"
12309      done
12310      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12311      { ac_script=; unset ac_script;}
12312      if test -z "$SED"; then
12313   ac_path_SED_found=false
12314   # Loop through the user's path and test for each of PROGNAME-LIST
12315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316 for as_dir in $PATH
12317 do
12318   IFS=$as_save_IFS
12319   test -z "$as_dir" && as_dir=.
12320     for ac_prog in sed gsed; do
12321     for ac_exec_ext in '' $ac_executable_extensions; do
12322       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12323       as_fn_executable_p "$ac_path_SED" || continue
12324 # Check for GNU ac_path_SED and select it if it is found.
12325   # Check for GNU $ac_path_SED
12326 case `"$ac_path_SED" --version 2>&1` in
12327 *GNU*)
12328   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12329 *)
12330   ac_count=0
12331   $as_echo_n 0123456789 >"conftest.in"
12332   while :
12333   do
12334     cat "conftest.in" "conftest.in" >"conftest.tmp"
12335     mv "conftest.tmp" "conftest.in"
12336     cp "conftest.in" "conftest.nl"
12337     $as_echo '' >> "conftest.nl"
12338     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12339     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12340     as_fn_arith $ac_count + 1 && ac_count=$as_val
12341     if test $ac_count -gt ${ac_path_SED_max-0}; then
12342       # Best one so far, save it but keep looking for a better one
12343       ac_cv_path_SED="$ac_path_SED"
12344       ac_path_SED_max=$ac_count
12345     fi
12346     # 10*(2^10) chars as input seems more than enough
12347     test $ac_count -gt 10 && break
12348   done
12349   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12350 esac
12351 
12352       $ac_path_SED_found && break 3
12353     done
12354   done
12355   done
12356 IFS=$as_save_IFS
12357   if test -z "$ac_cv_path_SED"; then
12358     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12359   fi
12360 else
12361   ac_cv_path_SED=$SED
12362 fi
12363 
12364 fi
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12366 $as_echo "$ac_cv_path_SED" >&6; }
12367  SED="$ac_cv_path_SED"
12368   rm -f conftest.sed
12369 
12370     else
12371       # If it succeeded, then it was overridden by the user. We will use it
12372       # for the tool.
12373 
12374       # First remove it from the list of overridden variables, so we can test
12375       # for unknown variables in the end.
12376       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12377 
12378       # Check if the provided tool contains a complete path.
12379       tool_specified="$SED"
12380       tool_basename="${tool_specified##*/}"
12381       if test "x$tool_basename" = "x$tool_specified"; then
12382         # A command without a complete path is provided, search $PATH.
12383         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12384 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12385         # Extract the first word of "$tool_basename", so it can be a program name with args.
12386 set dummy $tool_basename; ac_word=$2
12387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12388 $as_echo_n "checking for $ac_word... " >&6; }
12389 if ${ac_cv_path_SED+:} false; then :
12390   $as_echo_n "(cached) " >&6
12391 else
12392   case $SED in
12393   [\\/]* | ?:[\\/]*)
12394   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12395   ;;
12396   *)
12397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12398 for as_dir in $PATH
12399 do
12400   IFS=$as_save_IFS
12401   test -z "$as_dir" && as_dir=.
12402     for ac_exec_ext in '' $ac_executable_extensions; do
12403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12404     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12406     break 2
12407   fi
12408 done
12409   done
12410 IFS=$as_save_IFS
12411 
12412   ;;
12413 esac
12414 fi
12415 SED=$ac_cv_path_SED
12416 if test -n "$SED"; then
12417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12418 $as_echo "$SED" >&6; }
12419 else
12420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421 $as_echo "no" >&6; }
12422 fi
12423 
12424 
12425         if test "x$SED" = x; then
12426           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12427         fi
12428       else
12429         # Otherwise we believe it is a complete path. Use it as it is.
12430         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12431 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12433 $as_echo_n "checking for SED... " >&6; }
12434         if test ! -x "$tool_specified"; then
12435           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12436 $as_echo "not found" >&6; }
12437           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12438         fi
12439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12440 $as_echo "$tool_specified" >&6; }
12441       fi
12442     fi
12443   fi
12444 
12445 
12446   if test "x$SED" = x; then
12447     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12448   fi
12449 
12450 
12451 
12452   # Always force rm.
12453   RM="$RM -f"
12454 
12455   # pwd behaves differently on various platforms and some don't support the -L flag.
12456   # Always use the bash builtin pwd to get uniform behavior.
12457   THEPWDCMD=pwd
12458 
12459   # These are not required on all platforms
12460 
12461 
12462   # Publish this variable in the help.
12463 
12464 
12465   if test "x$CYGPATH" = x; then
12466     # The variable is not set by user, try to locate tool using the code snippet
12467     for ac_prog in cygpath
12468 do
12469   # Extract the first word of "$ac_prog", so it can be a program name with args.
12470 set dummy $ac_prog; ac_word=$2
12471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12472 $as_echo_n "checking for $ac_word... " >&6; }
12473 if ${ac_cv_path_CYGPATH+:} false; then :
12474   $as_echo_n "(cached) " >&6
12475 else
12476   case $CYGPATH in
12477   [\\/]* | ?:[\\/]*)
12478   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12479   ;;
12480   *)
12481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12482 for as_dir in $PATH
12483 do
12484   IFS=$as_save_IFS
12485   test -z "$as_dir" && as_dir=.
12486     for ac_exec_ext in '' $ac_executable_extensions; do
12487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12488     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12490     break 2
12491   fi
12492 done
12493   done
12494 IFS=$as_save_IFS
12495 
12496   ;;
12497 esac
12498 fi
12499 CYGPATH=$ac_cv_path_CYGPATH
12500 if test -n "$CYGPATH"; then
12501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12502 $as_echo "$CYGPATH" >&6; }
12503 else
12504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12505 $as_echo "no" >&6; }
12506 fi
12507 
12508 
12509   test -n "$CYGPATH" && break
12510 done
12511 
12512   else
12513     # The variable is set, but is it from the command line or the environment?
12514 
12515     # Try to remove the string !CYGPATH! from our list.
12516     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12517     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12518       # If it failed, the variable was not from the command line. Ignore it,
12519       # but warn the user (except for BASH, which is always set by the calling BASH).
12520       if test "xCYGPATH" != xBASH; then
12521         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12522 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12523       fi
12524       # Try to locate tool using the code snippet
12525       for ac_prog in cygpath
12526 do
12527   # Extract the first word of "$ac_prog", so it can be a program name with args.
12528 set dummy $ac_prog; ac_word=$2
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12530 $as_echo_n "checking for $ac_word... " >&6; }
12531 if ${ac_cv_path_CYGPATH+:} false; then :
12532   $as_echo_n "(cached) " >&6
12533 else
12534   case $CYGPATH in
12535   [\\/]* | ?:[\\/]*)
12536   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12537   ;;
12538   *)
12539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12540 for as_dir in $PATH
12541 do
12542   IFS=$as_save_IFS
12543   test -z "$as_dir" && as_dir=.
12544     for ac_exec_ext in '' $ac_executable_extensions; do
12545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12546     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12548     break 2
12549   fi
12550 done
12551   done
12552 IFS=$as_save_IFS
12553 
12554   ;;
12555 esac
12556 fi
12557 CYGPATH=$ac_cv_path_CYGPATH
12558 if test -n "$CYGPATH"; then
12559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12560 $as_echo "$CYGPATH" >&6; }
12561 else
12562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12563 $as_echo "no" >&6; }
12564 fi
12565 
12566 
12567   test -n "$CYGPATH" && break
12568 done
12569 
12570     else
12571       # If it succeeded, then it was overridden by the user. We will use it
12572       # for the tool.
12573 
12574       # First remove it from the list of overridden variables, so we can test
12575       # for unknown variables in the end.
12576       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12577 
12578       # Check if the provided tool contains a complete path.
12579       tool_specified="$CYGPATH"
12580       tool_basename="${tool_specified##*/}"
12581       if test "x$tool_basename" = "x$tool_specified"; then
12582         # A command without a complete path is provided, search $PATH.
12583         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12584 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12585         # Extract the first word of "$tool_basename", so it can be a program name with args.
12586 set dummy $tool_basename; ac_word=$2
12587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588 $as_echo_n "checking for $ac_word... " >&6; }
12589 if ${ac_cv_path_CYGPATH+:} false; then :
12590   $as_echo_n "(cached) " >&6
12591 else
12592   case $CYGPATH in
12593   [\\/]* | ?:[\\/]*)
12594   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12595   ;;
12596   *)
12597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598 for as_dir in $PATH
12599 do
12600   IFS=$as_save_IFS
12601   test -z "$as_dir" && as_dir=.
12602     for ac_exec_ext in '' $ac_executable_extensions; do
12603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606     break 2
12607   fi
12608 done
12609   done
12610 IFS=$as_save_IFS
12611 
12612   ;;
12613 esac
12614 fi
12615 CYGPATH=$ac_cv_path_CYGPATH
12616 if test -n "$CYGPATH"; then
12617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12618 $as_echo "$CYGPATH" >&6; }
12619 else
12620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621 $as_echo "no" >&6; }
12622 fi
12623 
12624 
12625         if test "x$CYGPATH" = x; then
12626           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12627         fi
12628       else
12629         # Otherwise we believe it is a complete path. Use it as it is.
12630         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12631 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12632         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12633 $as_echo_n "checking for CYGPATH... " >&6; }
12634         if test ! -x "$tool_specified"; then
12635           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12636 $as_echo "not found" >&6; }
12637           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12638         fi
12639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12640 $as_echo "$tool_specified" >&6; }
12641       fi
12642     fi
12643   fi
12644 
12645 
12646 
12647 
12648   # Publish this variable in the help.
12649 
12650 
12651   if test "x$READLINK" = x; then
12652     # The variable is not set by user, try to locate tool using the code snippet
12653     for ac_prog in greadlink readlink
12654 do
12655   # Extract the first word of "$ac_prog", so it can be a program name with args.
12656 set dummy $ac_prog; ac_word=$2
12657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12658 $as_echo_n "checking for $ac_word... " >&6; }
12659 if ${ac_cv_path_READLINK+:} false; then :
12660   $as_echo_n "(cached) " >&6
12661 else
12662   case $READLINK in
12663   [\\/]* | ?:[\\/]*)
12664   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12665   ;;
12666   *)
12667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12668 for as_dir in $PATH
12669 do
12670   IFS=$as_save_IFS
12671   test -z "$as_dir" && as_dir=.
12672     for ac_exec_ext in '' $ac_executable_extensions; do
12673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12674     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12676     break 2
12677   fi
12678 done
12679   done
12680 IFS=$as_save_IFS
12681 
12682   ;;
12683 esac
12684 fi
12685 READLINK=$ac_cv_path_READLINK
12686 if test -n "$READLINK"; then
12687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12688 $as_echo "$READLINK" >&6; }
12689 else
12690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12691 $as_echo "no" >&6; }
12692 fi
12693 
12694 
12695   test -n "$READLINK" && break
12696 done
12697 
12698   else
12699     # The variable is set, but is it from the command line or the environment?
12700 
12701     # Try to remove the string !READLINK! from our list.
12702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12704       # If it failed, the variable was not from the command line. Ignore it,
12705       # but warn the user (except for BASH, which is always set by the calling BASH).
12706       if test "xREADLINK" != xBASH; then
12707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12708 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12709       fi
12710       # Try to locate tool using the code snippet
12711       for ac_prog in greadlink readlink
12712 do
12713   # Extract the first word of "$ac_prog", so it can be a program name with args.
12714 set dummy $ac_prog; ac_word=$2
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716 $as_echo_n "checking for $ac_word... " >&6; }
12717 if ${ac_cv_path_READLINK+:} false; then :
12718   $as_echo_n "(cached) " >&6
12719 else
12720   case $READLINK in
12721   [\\/]* | ?:[\\/]*)
12722   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12723   ;;
12724   *)
12725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726 for as_dir in $PATH
12727 do
12728   IFS=$as_save_IFS
12729   test -z "$as_dir" && as_dir=.
12730     for ac_exec_ext in '' $ac_executable_extensions; do
12731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734     break 2
12735   fi
12736 done
12737   done
12738 IFS=$as_save_IFS
12739 
12740   ;;
12741 esac
12742 fi
12743 READLINK=$ac_cv_path_READLINK
12744 if test -n "$READLINK"; then
12745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12746 $as_echo "$READLINK" >&6; }
12747 else
12748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749 $as_echo "no" >&6; }
12750 fi
12751 
12752 
12753   test -n "$READLINK" && break
12754 done
12755 
12756     else
12757       # If it succeeded, then it was overridden by the user. We will use it
12758       # for the tool.
12759 
12760       # First remove it from the list of overridden variables, so we can test
12761       # for unknown variables in the end.
12762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12763 
12764       # Check if the provided tool contains a complete path.
12765       tool_specified="$READLINK"
12766       tool_basename="${tool_specified##*/}"
12767       if test "x$tool_basename" = "x$tool_specified"; then
12768         # A command without a complete path is provided, search $PATH.
12769         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12770 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12771         # Extract the first word of "$tool_basename", so it can be a program name with args.
12772 set dummy $tool_basename; ac_word=$2
12773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774 $as_echo_n "checking for $ac_word... " >&6; }
12775 if ${ac_cv_path_READLINK+:} false; then :
12776   $as_echo_n "(cached) " >&6
12777 else
12778   case $READLINK in
12779   [\\/]* | ?:[\\/]*)
12780   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12781   ;;
12782   *)
12783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784 for as_dir in $PATH
12785 do
12786   IFS=$as_save_IFS
12787   test -z "$as_dir" && as_dir=.
12788     for ac_exec_ext in '' $ac_executable_extensions; do
12789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792     break 2
12793   fi
12794 done
12795   done
12796 IFS=$as_save_IFS
12797 
12798   ;;
12799 esac
12800 fi
12801 READLINK=$ac_cv_path_READLINK
12802 if test -n "$READLINK"; then
12803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12804 $as_echo "$READLINK" >&6; }
12805 else
12806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807 $as_echo "no" >&6; }
12808 fi
12809 
12810 
12811         if test "x$READLINK" = x; then
12812           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12813         fi
12814       else
12815         # Otherwise we believe it is a complete path. Use it as it is.
12816         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12817 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12818         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12819 $as_echo_n "checking for READLINK... " >&6; }
12820         if test ! -x "$tool_specified"; then
12821           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12822 $as_echo "not found" >&6; }
12823           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12824         fi
12825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12826 $as_echo "$tool_specified" >&6; }
12827       fi
12828     fi
12829   fi
12830 
12831 
12832 
12833 
12834   # Publish this variable in the help.
12835 
12836 
12837   if test "x$DF" = x; then
12838     # The variable is not set by user, try to locate tool using the code snippet
12839     for ac_prog in df
12840 do
12841   # Extract the first word of "$ac_prog", so it can be a program name with args.
12842 set dummy $ac_prog; ac_word=$2
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12844 $as_echo_n "checking for $ac_word... " >&6; }
12845 if ${ac_cv_path_DF+:} false; then :
12846   $as_echo_n "(cached) " >&6
12847 else
12848   case $DF in
12849   [\\/]* | ?:[\\/]*)
12850   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12851   ;;
12852   *)
12853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12854 for as_dir in $PATH
12855 do
12856   IFS=$as_save_IFS
12857   test -z "$as_dir" && as_dir=.
12858     for ac_exec_ext in '' $ac_executable_extensions; do
12859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12860     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12862     break 2
12863   fi
12864 done
12865   done
12866 IFS=$as_save_IFS
12867 
12868   ;;
12869 esac
12870 fi
12871 DF=$ac_cv_path_DF
12872 if test -n "$DF"; then
12873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12874 $as_echo "$DF" >&6; }
12875 else
12876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12877 $as_echo "no" >&6; }
12878 fi
12879 
12880 
12881   test -n "$DF" && break
12882 done
12883 
12884   else
12885     # The variable is set, but is it from the command line or the environment?
12886 
12887     # Try to remove the string !DF! from our list.
12888     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12889     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12890       # If it failed, the variable was not from the command line. Ignore it,
12891       # but warn the user (except for BASH, which is always set by the calling BASH).
12892       if test "xDF" != xBASH; then
12893         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12894 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12895       fi
12896       # Try to locate tool using the code snippet
12897       for ac_prog in df
12898 do
12899   # Extract the first word of "$ac_prog", so it can be a program name with args.
12900 set dummy $ac_prog; ac_word=$2
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12902 $as_echo_n "checking for $ac_word... " >&6; }
12903 if ${ac_cv_path_DF+:} false; then :
12904   $as_echo_n "(cached) " >&6
12905 else
12906   case $DF in
12907   [\\/]* | ?:[\\/]*)
12908   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12909   ;;
12910   *)
12911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912 for as_dir in $PATH
12913 do
12914   IFS=$as_save_IFS
12915   test -z "$as_dir" && as_dir=.
12916     for ac_exec_ext in '' $ac_executable_extensions; do
12917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12920     break 2
12921   fi
12922 done
12923   done
12924 IFS=$as_save_IFS
12925 
12926   ;;
12927 esac
12928 fi
12929 DF=$ac_cv_path_DF
12930 if test -n "$DF"; then
12931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12932 $as_echo "$DF" >&6; }
12933 else
12934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12935 $as_echo "no" >&6; }
12936 fi
12937 
12938 
12939   test -n "$DF" && break
12940 done
12941 
12942     else
12943       # If it succeeded, then it was overridden by the user. We will use it
12944       # for the tool.
12945 
12946       # First remove it from the list of overridden variables, so we can test
12947       # for unknown variables in the end.
12948       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12949 
12950       # Check if the provided tool contains a complete path.
12951       tool_specified="$DF"
12952       tool_basename="${tool_specified##*/}"
12953       if test "x$tool_basename" = "x$tool_specified"; then
12954         # A command without a complete path is provided, search $PATH.
12955         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12956 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12957         # Extract the first word of "$tool_basename", so it can be a program name with args.
12958 set dummy $tool_basename; ac_word=$2
12959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12960 $as_echo_n "checking for $ac_word... " >&6; }
12961 if ${ac_cv_path_DF+:} false; then :
12962   $as_echo_n "(cached) " >&6
12963 else
12964   case $DF in
12965   [\\/]* | ?:[\\/]*)
12966   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12967   ;;
12968   *)
12969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12970 for as_dir in $PATH
12971 do
12972   IFS=$as_save_IFS
12973   test -z "$as_dir" && as_dir=.
12974     for ac_exec_ext in '' $ac_executable_extensions; do
12975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12976     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12978     break 2
12979   fi
12980 done
12981   done
12982 IFS=$as_save_IFS
12983 
12984   ;;
12985 esac
12986 fi
12987 DF=$ac_cv_path_DF
12988 if test -n "$DF"; then
12989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12990 $as_echo "$DF" >&6; }
12991 else
12992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12993 $as_echo "no" >&6; }
12994 fi
12995 
12996 
12997         if test "x$DF" = x; then
12998           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12999         fi
13000       else
13001         # Otherwise we believe it is a complete path. Use it as it is.
13002         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13003 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13004         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13005 $as_echo_n "checking for DF... " >&6; }
13006         if test ! -x "$tool_specified"; then
13007           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13008 $as_echo "not found" >&6; }
13009           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13010         fi
13011         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13012 $as_echo "$tool_specified" >&6; }
13013       fi
13014     fi
13015   fi
13016 
13017 
13018 
13019 
13020   # Publish this variable in the help.
13021 
13022 
13023   if test "x$SETFILE" = x; then
13024     # The variable is not set by user, try to locate tool using the code snippet
13025     for ac_prog in SetFile
13026 do
13027   # Extract the first word of "$ac_prog", so it can be a program name with args.
13028 set dummy $ac_prog; ac_word=$2
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13030 $as_echo_n "checking for $ac_word... " >&6; }
13031 if ${ac_cv_path_SETFILE+:} false; then :
13032   $as_echo_n "(cached) " >&6
13033 else
13034   case $SETFILE in
13035   [\\/]* | ?:[\\/]*)
13036   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13037   ;;
13038   *)
13039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13040 for as_dir in $PATH
13041 do
13042   IFS=$as_save_IFS
13043   test -z "$as_dir" && as_dir=.
13044     for ac_exec_ext in '' $ac_executable_extensions; do
13045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13046     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13048     break 2
13049   fi
13050 done
13051   done
13052 IFS=$as_save_IFS
13053 
13054   ;;
13055 esac
13056 fi
13057 SETFILE=$ac_cv_path_SETFILE
13058 if test -n "$SETFILE"; then
13059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13060 $as_echo "$SETFILE" >&6; }
13061 else
13062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063 $as_echo "no" >&6; }
13064 fi
13065 
13066 
13067   test -n "$SETFILE" && break
13068 done
13069 
13070   else
13071     # The variable is set, but is it from the command line or the environment?
13072 
13073     # Try to remove the string !SETFILE! from our list.
13074     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13075     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13076       # If it failed, the variable was not from the command line. Ignore it,
13077       # but warn the user (except for BASH, which is always set by the calling BASH).
13078       if test "xSETFILE" != xBASH; then
13079         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13080 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13081       fi
13082       # Try to locate tool using the code snippet
13083       for ac_prog in SetFile
13084 do
13085   # Extract the first word of "$ac_prog", so it can be a program name with args.
13086 set dummy $ac_prog; ac_word=$2
13087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13088 $as_echo_n "checking for $ac_word... " >&6; }
13089 if ${ac_cv_path_SETFILE+:} false; then :
13090   $as_echo_n "(cached) " >&6
13091 else
13092   case $SETFILE in
13093   [\\/]* | ?:[\\/]*)
13094   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13095   ;;
13096   *)
13097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13098 for as_dir in $PATH
13099 do
13100   IFS=$as_save_IFS
13101   test -z "$as_dir" && as_dir=.
13102     for ac_exec_ext in '' $ac_executable_extensions; do
13103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13104     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13106     break 2
13107   fi
13108 done
13109   done
13110 IFS=$as_save_IFS
13111 
13112   ;;
13113 esac
13114 fi
13115 SETFILE=$ac_cv_path_SETFILE
13116 if test -n "$SETFILE"; then
13117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13118 $as_echo "$SETFILE" >&6; }
13119 else
13120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13121 $as_echo "no" >&6; }
13122 fi
13123 
13124 
13125   test -n "$SETFILE" && break
13126 done
13127 
13128     else
13129       # If it succeeded, then it was overridden by the user. We will use it
13130       # for the tool.
13131 
13132       # First remove it from the list of overridden variables, so we can test
13133       # for unknown variables in the end.
13134       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13135 
13136       # Check if the provided tool contains a complete path.
13137       tool_specified="$SETFILE"
13138       tool_basename="${tool_specified##*/}"
13139       if test "x$tool_basename" = "x$tool_specified"; then
13140         # A command without a complete path is provided, search $PATH.
13141         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13142 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13143         # Extract the first word of "$tool_basename", so it can be a program name with args.
13144 set dummy $tool_basename; ac_word=$2
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13146 $as_echo_n "checking for $ac_word... " >&6; }
13147 if ${ac_cv_path_SETFILE+:} false; then :
13148   $as_echo_n "(cached) " >&6
13149 else
13150   case $SETFILE in
13151   [\\/]* | ?:[\\/]*)
13152   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13153   ;;
13154   *)
13155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13156 for as_dir in $PATH
13157 do
13158   IFS=$as_save_IFS
13159   test -z "$as_dir" && as_dir=.
13160     for ac_exec_ext in '' $ac_executable_extensions; do
13161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13162     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13164     break 2
13165   fi
13166 done
13167   done
13168 IFS=$as_save_IFS
13169 
13170   ;;
13171 esac
13172 fi
13173 SETFILE=$ac_cv_path_SETFILE
13174 if test -n "$SETFILE"; then
13175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13176 $as_echo "$SETFILE" >&6; }
13177 else
13178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13179 $as_echo "no" >&6; }
13180 fi
13181 
13182 
13183         if test "x$SETFILE" = x; then
13184           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13185         fi
13186       else
13187         # Otherwise we believe it is a complete path. Use it as it is.
13188         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13189 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13191 $as_echo_n "checking for SETFILE... " >&6; }
13192         if test ! -x "$tool_specified"; then
13193           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13194 $as_echo "not found" >&6; }
13195           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13196         fi
13197         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13198 $as_echo "$tool_specified" >&6; }
13199       fi
13200     fi
13201   fi
13202 
13203 
13204 
13205 
13206   # Publish this variable in the help.
13207 
13208 
13209   if test "x$CPIO" = x; then
13210     # The variable is not set by user, try to locate tool using the code snippet
13211     for ac_prog in cpio bsdcpio
13212 do
13213   # Extract the first word of "$ac_prog", so it can be a program name with args.
13214 set dummy $ac_prog; ac_word=$2
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13216 $as_echo_n "checking for $ac_word... " >&6; }
13217 if ${ac_cv_path_CPIO+:} false; then :
13218   $as_echo_n "(cached) " >&6
13219 else
13220   case $CPIO in
13221   [\\/]* | ?:[\\/]*)
13222   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13223   ;;
13224   *)
13225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13226 for as_dir in $PATH
13227 do
13228   IFS=$as_save_IFS
13229   test -z "$as_dir" && as_dir=.
13230     for ac_exec_ext in '' $ac_executable_extensions; do
13231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13232     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13234     break 2
13235   fi
13236 done
13237   done
13238 IFS=$as_save_IFS
13239 
13240   ;;
13241 esac
13242 fi
13243 CPIO=$ac_cv_path_CPIO
13244 if test -n "$CPIO"; then
13245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13246 $as_echo "$CPIO" >&6; }
13247 else
13248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13249 $as_echo "no" >&6; }
13250 fi
13251 
13252 
13253   test -n "$CPIO" && break
13254 done
13255 
13256   else
13257     # The variable is set, but is it from the command line or the environment?
13258 
13259     # Try to remove the string !CPIO! from our list.
13260     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13261     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13262       # If it failed, the variable was not from the command line. Ignore it,
13263       # but warn the user (except for BASH, which is always set by the calling BASH).
13264       if test "xCPIO" != xBASH; then
13265         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13266 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13267       fi
13268       # Try to locate tool using the code snippet
13269       for ac_prog in cpio bsdcpio
13270 do
13271   # Extract the first word of "$ac_prog", so it can be a program name with args.
13272 set dummy $ac_prog; ac_word=$2
13273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13274 $as_echo_n "checking for $ac_word... " >&6; }
13275 if ${ac_cv_path_CPIO+:} false; then :
13276   $as_echo_n "(cached) " >&6
13277 else
13278   case $CPIO in
13279   [\\/]* | ?:[\\/]*)
13280   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13281   ;;
13282   *)
13283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13284 for as_dir in $PATH
13285 do
13286   IFS=$as_save_IFS
13287   test -z "$as_dir" && as_dir=.
13288     for ac_exec_ext in '' $ac_executable_extensions; do
13289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13290     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13292     break 2
13293   fi
13294 done
13295   done
13296 IFS=$as_save_IFS
13297 
13298   ;;
13299 esac
13300 fi
13301 CPIO=$ac_cv_path_CPIO
13302 if test -n "$CPIO"; then
13303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13304 $as_echo "$CPIO" >&6; }
13305 else
13306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307 $as_echo "no" >&6; }
13308 fi
13309 
13310 
13311   test -n "$CPIO" && break
13312 done
13313 
13314     else
13315       # If it succeeded, then it was overridden by the user. We will use it
13316       # for the tool.
13317 
13318       # First remove it from the list of overridden variables, so we can test
13319       # for unknown variables in the end.
13320       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13321 
13322       # Check if the provided tool contains a complete path.
13323       tool_specified="$CPIO"
13324       tool_basename="${tool_specified##*/}"
13325       if test "x$tool_basename" = "x$tool_specified"; then
13326         # A command without a complete path is provided, search $PATH.
13327         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13328 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13329         # Extract the first word of "$tool_basename", so it can be a program name with args.
13330 set dummy $tool_basename; ac_word=$2
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13332 $as_echo_n "checking for $ac_word... " >&6; }
13333 if ${ac_cv_path_CPIO+:} false; then :
13334   $as_echo_n "(cached) " >&6
13335 else
13336   case $CPIO in
13337   [\\/]* | ?:[\\/]*)
13338   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13339   ;;
13340   *)
13341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13342 for as_dir in $PATH
13343 do
13344   IFS=$as_save_IFS
13345   test -z "$as_dir" && as_dir=.
13346     for ac_exec_ext in '' $ac_executable_extensions; do
13347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13348     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13350     break 2
13351   fi
13352 done
13353   done
13354 IFS=$as_save_IFS
13355 
13356   ;;
13357 esac
13358 fi
13359 CPIO=$ac_cv_path_CPIO
13360 if test -n "$CPIO"; then
13361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13362 $as_echo "$CPIO" >&6; }
13363 else
13364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13365 $as_echo "no" >&6; }
13366 fi
13367 
13368 
13369         if test "x$CPIO" = x; then
13370           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13371         fi
13372       else
13373         # Otherwise we believe it is a complete path. Use it as it is.
13374         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13375 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13376         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13377 $as_echo_n "checking for CPIO... " >&6; }
13378         if test ! -x "$tool_specified"; then
13379           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13380 $as_echo "not found" >&6; }
13381           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13382         fi
13383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13384 $as_echo "$tool_specified" >&6; }
13385       fi
13386     fi
13387   fi
13388 
13389 
13390 
13391 
13392 # Now we can determine OpenJDK build and target platforms. This is required to
13393 # have early on.
13394 # Make sure we can run config.sub.
13395 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13396   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13397 
13398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13399 $as_echo_n "checking build system type... " >&6; }
13400 if ${ac_cv_build+:} false; then :
13401   $as_echo_n "(cached) " >&6
13402 else
13403   ac_build_alias=$build_alias
13404 test "x$ac_build_alias" = x &&
13405   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13406 test "x$ac_build_alias" = x &&
13407   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13408 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13409   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13410 
13411 fi
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13413 $as_echo "$ac_cv_build" >&6; }
13414 case $ac_cv_build in
13415 *-*-*) ;;
13416 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13417 esac
13418 build=$ac_cv_build
13419 ac_save_IFS=$IFS; IFS='-'
13420 set x $ac_cv_build
13421 shift
13422 build_cpu=$1
13423 build_vendor=$2
13424 shift; shift
13425 # Remember, the first character of IFS is used to create $*,
13426 # except with old shells:
13427 build_os=$*
13428 IFS=$ac_save_IFS
13429 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13430 
13431 
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13433 $as_echo_n "checking host system type... " >&6; }
13434 if ${ac_cv_host+:} false; then :
13435   $as_echo_n "(cached) " >&6
13436 else
13437   if test "x$host_alias" = x; then
13438   ac_cv_host=$ac_cv_build
13439 else
13440   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13441     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13442 fi
13443 
13444 fi
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13446 $as_echo "$ac_cv_host" >&6; }
13447 case $ac_cv_host in
13448 *-*-*) ;;
13449 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13450 esac
13451 host=$ac_cv_host
13452 ac_save_IFS=$IFS; IFS='-'
13453 set x $ac_cv_host
13454 shift
13455 host_cpu=$1
13456 host_vendor=$2
13457 shift; shift
13458 # Remember, the first character of IFS is used to create $*,
13459 # except with old shells:
13460 host_os=$*
13461 IFS=$ac_save_IFS
13462 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13463 
13464 
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13466 $as_echo_n "checking target system type... " >&6; }
13467 if ${ac_cv_target+:} false; then :
13468   $as_echo_n "(cached) " >&6
13469 else
13470   if test "x$target_alias" = x; then
13471   ac_cv_target=$ac_cv_host
13472 else
13473   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13474     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13475 fi
13476 
13477 fi
13478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13479 $as_echo "$ac_cv_target" >&6; }
13480 case $ac_cv_target in
13481 *-*-*) ;;
13482 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13483 esac
13484 target=$ac_cv_target
13485 ac_save_IFS=$IFS; IFS='-'
13486 set x $ac_cv_target
13487 shift
13488 target_cpu=$1
13489 target_vendor=$2
13490 shift; shift
13491 # Remember, the first character of IFS is used to create $*,
13492 # except with old shells:
13493 target_os=$*
13494 IFS=$ac_save_IFS
13495 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13496 
13497 
13498 # The aliases save the names the user supplied, while $host etc.
13499 # will get canonicalized.
13500 test -n "$target_alias" &&
13501   test "$program_prefix$program_suffix$program_transform_name" = \
13502     NONENONEs,x,x, &&
13503   program_prefix=${target_alias}-
13504 
13505   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13506   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13507   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13508   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13509   # to use the configure naming style.
13510 
13511 
13512 
13513 
13514 
13515   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13516   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13517   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13518   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13519   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13520   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13521 
13522 
13523 
13524   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13525 
13526   case "$build_os" in
13527     *linux*)
13528       VAR_OS=linux
13529       VAR_OS_TYPE=unix
13530       ;;
13531     *solaris*)
13532       VAR_OS=solaris
13533       VAR_OS_TYPE=unix
13534       ;;
13535     *darwin*)
13536       VAR_OS=macosx
13537       VAR_OS_TYPE=unix
13538       ;;
13539     *bsd*)
13540       VAR_OS=bsd
13541       VAR_OS_TYPE=unix
13542       ;;
13543     *cygwin*)
13544       VAR_OS=windows
13545       VAR_OS_ENV=windows.cygwin
13546       ;;
13547     *mingw*)
13548       VAR_OS=windows
13549       VAR_OS_ENV=windows.msys
13550       ;;
13551     *aix*)
13552       VAR_OS=aix
13553       VAR_OS_TYPE=unix
13554       ;;
13555     *)
13556       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13557       ;;
13558   esac
13559 
13560 
13561   # First argument is the cpu name from the trip/quad
13562   case "$build_cpu" in
13563     x86_64)
13564       VAR_CPU=x86_64
13565       VAR_CPU_ARCH=x86
13566       VAR_CPU_BITS=64
13567       VAR_CPU_ENDIAN=little
13568       ;;
13569     i?86)
13570       VAR_CPU=x86
13571       VAR_CPU_ARCH=x86
13572       VAR_CPU_BITS=32
13573       VAR_CPU_ENDIAN=little
13574       ;;
13575     arm*)
13576       VAR_CPU=arm
13577       VAR_CPU_ARCH=arm
13578       VAR_CPU_BITS=32
13579       VAR_CPU_ENDIAN=little
13580       ;;
13581     powerpc)
13582       VAR_CPU=ppc
13583       VAR_CPU_ARCH=ppc
13584       VAR_CPU_BITS=32
13585       VAR_CPU_ENDIAN=big
13586       ;;
13587     powerpc64)
13588       VAR_CPU=ppc64
13589       VAR_CPU_ARCH=ppc
13590       VAR_CPU_BITS=64
13591       VAR_CPU_ENDIAN=big
13592       ;;
13593     powerpc64le)
13594       VAR_CPU=ppc64
13595       VAR_CPU_ARCH=ppc
13596       VAR_CPU_BITS=64
13597       VAR_CPU_ENDIAN=little
13598       ;;
13599     s390)
13600       VAR_CPU=s390
13601       VAR_CPU_ARCH=s390
13602       VAR_CPU_BITS=32
13603       VAR_CPU_ENDIAN=big
13604       ;;
13605     s390x)
13606       VAR_CPU=s390x
13607       VAR_CPU_ARCH=s390
13608       VAR_CPU_BITS=64
13609       VAR_CPU_ENDIAN=big
13610       ;;
13611     sparc)
13612       VAR_CPU=sparc
13613       VAR_CPU_ARCH=sparc
13614       VAR_CPU_BITS=32
13615       VAR_CPU_ENDIAN=big
13616       ;;
13617     sparcv9|sparc64)
13618       VAR_CPU=sparcv9
13619       VAR_CPU_ARCH=sparc
13620       VAR_CPU_BITS=64
13621       VAR_CPU_ENDIAN=big
13622       ;;
13623     *)
13624       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13625       ;;
13626   esac
13627 
13628   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13629   OPENJDK_BUILD_OS="$VAR_OS"
13630   if test "x$VAR_OS_TYPE" != x; then
13631     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13632   else
13633     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13634   fi
13635   if test "x$VAR_OS_ENV" != x; then
13636     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13637   else
13638     OPENJDK_BUILD_OS_ENV="$VAR_OS"
13639   fi
13640   OPENJDK_BUILD_CPU="$VAR_CPU"
13641   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13642   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13643   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13644 
13645 
13646 
13647 
13648 
13649 
13650 
13651 
13652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13653 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13655 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13656 
13657   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13658 
13659   case "$host_os" in
13660     *linux*)
13661       VAR_OS=linux
13662       VAR_OS_TYPE=unix
13663       ;;
13664     *solaris*)
13665       VAR_OS=solaris
13666       VAR_OS_TYPE=unix
13667       ;;
13668     *darwin*)
13669       VAR_OS=macosx
13670       VAR_OS_TYPE=unix
13671       ;;
13672     *bsd*)
13673       VAR_OS=bsd
13674       VAR_OS_TYPE=unix
13675       ;;
13676     *cygwin*)
13677       VAR_OS=windows
13678       VAR_OS_ENV=windows.cygwin
13679       ;;
13680     *mingw*)
13681       VAR_OS=windows
13682       VAR_OS_ENV=windows.msys
13683       ;;
13684     *aix*)
13685       VAR_OS=aix
13686       VAR_OS_TYPE=unix
13687       ;;
13688     *)
13689       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13690       ;;
13691   esac
13692 
13693 
13694   # First argument is the cpu name from the trip/quad
13695   case "$host_cpu" in
13696     x86_64)
13697       VAR_CPU=x86_64
13698       VAR_CPU_ARCH=x86
13699       VAR_CPU_BITS=64
13700       VAR_CPU_ENDIAN=little
13701       ;;
13702     i?86)
13703       VAR_CPU=x86
13704       VAR_CPU_ARCH=x86
13705       VAR_CPU_BITS=32
13706       VAR_CPU_ENDIAN=little
13707       ;;
13708     arm*)
13709       VAR_CPU=arm
13710       VAR_CPU_ARCH=arm
13711       VAR_CPU_BITS=32
13712       VAR_CPU_ENDIAN=little
13713       ;;
13714     powerpc)
13715       VAR_CPU=ppc
13716       VAR_CPU_ARCH=ppc
13717       VAR_CPU_BITS=32
13718       VAR_CPU_ENDIAN=big
13719       ;;
13720     powerpc64)
13721       VAR_CPU=ppc64
13722       VAR_CPU_ARCH=ppc
13723       VAR_CPU_BITS=64
13724       VAR_CPU_ENDIAN=big
13725       ;;
13726     powerpc64le)
13727       VAR_CPU=ppc64
13728       VAR_CPU_ARCH=ppc
13729       VAR_CPU_BITS=64
13730       VAR_CPU_ENDIAN=little
13731       ;;
13732     s390)
13733       VAR_CPU=s390
13734       VAR_CPU_ARCH=s390
13735       VAR_CPU_BITS=32
13736       VAR_CPU_ENDIAN=big
13737       ;;
13738     s390x)
13739       VAR_CPU=s390x
13740       VAR_CPU_ARCH=s390
13741       VAR_CPU_BITS=64
13742       VAR_CPU_ENDIAN=big
13743       ;;
13744     sparc)
13745       VAR_CPU=sparc
13746       VAR_CPU_ARCH=sparc
13747       VAR_CPU_BITS=32
13748       VAR_CPU_ENDIAN=big
13749       ;;
13750     sparcv9|sparc64)
13751       VAR_CPU=sparcv9
13752       VAR_CPU_ARCH=sparc
13753       VAR_CPU_BITS=64
13754       VAR_CPU_ENDIAN=big
13755       ;;
13756     *)
13757       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13758       ;;
13759   esac
13760 
13761   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13762   OPENJDK_TARGET_OS="$VAR_OS"
13763   if test "x$VAR_OS_TYPE" != x; then
13764     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13765   else
13766     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13767   fi
13768   if test "x$VAR_OS_ENV" != x; then
13769     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13770   else
13771     OPENJDK_TARGET_OS_ENV="$VAR_OS"
13772   fi
13773   OPENJDK_TARGET_CPU="$VAR_CPU"
13774   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13775   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13776   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13777 
13778 
13779 
13780 
13781 
13782 
13783 
13784 
13785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13786 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13788 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13789 
13790 
13791 
13792 # Check whether --with-target-bits was given.
13793 if test "${with_target_bits+set}" = set; then :
13794   withval=$with_target_bits;
13795 fi
13796 
13797 
13798   # We have three types of compiles:
13799   # native  == normal compilation, target system == build system
13800   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13801   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13802   #
13803   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13804     # We're doing a proper cross-compilation
13805     COMPILE_TYPE="cross"
13806   else
13807     COMPILE_TYPE="native"
13808   fi
13809 
13810   if test "x$with_target_bits" != x; then
13811     if test "x$COMPILE_TYPE" = "xcross"; then
13812       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13813     fi
13814 
13815     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13816       # A reduced build is requested
13817       COMPILE_TYPE="reduced"
13818       OPENJDK_TARGET_CPU_BITS=32
13819       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13820         OPENJDK_TARGET_CPU=x86
13821       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13822         OPENJDK_TARGET_CPU=sparc
13823       else
13824         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13825       fi
13826     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13827       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
13828     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13829       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13830 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13831     else
13832       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13833     fi
13834   fi
13835 
13836 
13837   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13838 $as_echo_n "checking compilation type... " >&6; }
13839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13840 $as_echo "$COMPILE_TYPE" >&6; }
13841 
13842 
13843   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13844     REQUIRED_OS_NAME=SunOS
13845     REQUIRED_OS_VERSION=5.10
13846   fi
13847   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13848     REQUIRED_OS_NAME=Linux
13849     REQUIRED_OS_VERSION=2.6
13850   fi
13851   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13852     REQUIRED_OS_NAME=Windows
13853     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13854       REQUIRED_OS_VERSION=5.2
13855     else
13856       REQUIRED_OS_VERSION=5.1
13857     fi
13858   fi
13859   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13860     REQUIRED_OS_NAME=Darwin
13861     REQUIRED_OS_VERSION=11.2
13862   fi
13863 
13864 
13865 
13866 
13867 
13868   # Also store the legacy naming of the cpu.
13869   # Ie i586 and amd64 instead of x86 and x86_64
13870   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13871   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13872     OPENJDK_TARGET_CPU_LEGACY="i586"
13873   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13874     # On all platforms except MacOSX replace x86_64 with amd64.
13875     OPENJDK_TARGET_CPU_LEGACY="amd64"
13876   fi
13877 
13878 
13879   # And the second legacy naming of the cpu.
13880   # Ie i386 and amd64 instead of x86 and x86_64.
13881   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13882   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13883     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13884   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13885     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13886   fi
13887 
13888 
13889   # This is the name of the cpu (but using i386 and amd64 instead of
13890   # x86 and x86_64, respectively), preceeded by a /, to be used when
13891   # locating libraries. On macosx, it's empty, though.
13892   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13893   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13894     OPENJDK_TARGET_CPU_LIBDIR=""
13895   fi
13896 
13897 
13898   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13899   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13900   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13901   OPENJDK_TARGET_CPU_ISADIR=""
13902   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13903     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13904       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13905     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13906       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13907     fi
13908   fi
13909 
13910 
13911   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13912   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13913   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13914     # On linux only, we replace x86 with i386.
13915     OPENJDK_TARGET_CPU_OSARCH="i386"
13916   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13917     # On all platforms except macosx, we replace x86_64 with amd64.
13918     OPENJDK_TARGET_CPU_OSARCH="amd64"
13919   fi
13920 
13921 
13922   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13923   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13924     OPENJDK_TARGET_CPU_JLI="i386"
13925   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13926     # On all platforms except macosx, we replace x86_64 with amd64.
13927     OPENJDK_TARGET_CPU_JLI="amd64"
13928   fi
13929   # Now setup the -D flags for building libjli.
13930   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13931   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13932     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13933       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13934     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13935       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13936     fi
13937   fi
13938 
13939 
13940   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13941       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13942   else
13943       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13944   fi
13945 
13946 
13947   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13948     A_LP64="LP64:="
13949     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13950     # unpack200.exe
13951     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13952       ADD_LP64="-D_LP64=1"
13953     fi
13954   fi
13955   LP64=$A_LP64
13956 
13957 
13958   if test "x$COMPILE_TYPE" = "xcross"; then
13959     # FIXME: ... or should this include reduced builds..?
13960     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13961   else
13962     DEFINE_CROSS_COMPILE_ARCH=""
13963   fi
13964 
13965 
13966   # ZERO_ARCHDEF is used to enable architecture-specific code
13967   case "${OPENJDK_TARGET_CPU}" in
13968     ppc)     ZERO_ARCHDEF=PPC32 ;;
13969     ppc64)   ZERO_ARCHDEF=PPC64 ;;
13970     s390*)   ZERO_ARCHDEF=S390  ;;
13971     sparc*)  ZERO_ARCHDEF=SPARC ;;
13972     x86_64*) ZERO_ARCHDEF=AMD64 ;;
13973     x86)     ZERO_ARCHDEF=IA32  ;;
13974     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13975   esac
13976 
13977 
13978 
13979 
13980 # Continue setting up basic stuff. Most remaining code require fundamental tools.
13981 
13982   # Save the current directory this script was started from
13983   CURDIR="$PWD"
13984 
13985   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13986     PATH_SEP=";"
13987 
13988   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13989   if test $SRC_ROOT_LENGTH -gt 100; then
13990     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13991   fi
13992 
13993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13994     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13995 $as_echo_n "checking cygwin release... " >&6; }
13996     CYGWIN_VERSION=`$UNAME -r`
13997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13998 $as_echo "$CYGWIN_VERSION" >&6; }
13999     WINDOWS_ENV_VENDOR='cygwin'
14000     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14001 
14002     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14003     if test "x$CYGWIN_VERSION_OK" = x; then
14004       { $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
14005 $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;}
14006       as_fn_error $? "Cannot continue" "$LINENO" 5
14007     fi
14008     if test "x$CYGPATH" = x; then
14009       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14010     fi
14011     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14012 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14013     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14014     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14015     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14016     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14017     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14018 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14019     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14020     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14021     if test "x$test_cygdrive_prefix" = x; then
14022       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14023     fi
14024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14025     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14026 $as_echo_n "checking msys release... " >&6; }
14027     MSYS_VERSION=`$UNAME -r`
14028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14029 $as_echo "$MSYS_VERSION" >&6; }
14030 
14031     WINDOWS_ENV_VENDOR='msys'
14032     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14033 
14034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14035 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14036     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14037     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14038 
14039   windows_path="$MSYS_ROOT_PATH"
14040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14041     unix_path=`$CYGPATH -u "$windows_path"`
14042     MSYS_ROOT_PATH="$unix_path"
14043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14045     MSYS_ROOT_PATH="$unix_path"
14046   fi
14047 
14048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14049 $as_echo "$MSYS_ROOT_PATH" >&6; }
14050     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14051   else
14052     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14053   fi
14054 
14055   # Test if windows or unix (cygwin/msys) find is first in path.
14056   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14057 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14058   FIND_BINARY_OUTPUT=`find --version 2>&1`
14059   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14060     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14061 $as_echo "unix style" >&6; }
14062   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14063     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14064 $as_echo "Windows" >&6; }
14065     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14066 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14067     { $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
14068 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14069     as_fn_error $? "Cannot continue" "$LINENO" 5
14070   else
14071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14072 $as_echo "unknown" >&6; }
14073     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14074 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14075   fi
14076 
14077   else
14078     PATH_SEP=":"
14079   fi
14080 
14081 
14082   # We get the top-level directory from the supporting wrappers.
14083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14084 $as_echo_n "checking for top-level directory... " >&6; }
14085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14086 $as_echo "$TOPDIR" >&6; }
14087 
14088 
14089   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14090 
14091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14092 
14093   # Input might be given as Windows format, start by converting to
14094   # unix format.
14095   path="$CURDIR"
14096   new_path=`$CYGPATH -u "$path"`
14097 
14098   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14099   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14100   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14101   # "foo.exe" is OK but "foo" is an error.
14102   #
14103   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14104   # It is also a way to make sure we got the proper file name for the real test later on.
14105   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14106   if test "x$test_shortpath" = x; then
14107     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14108 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14109     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14110   fi
14111 
14112   # Call helper function which possibly converts this using DOS-style short mode.
14113   # If so, the updated path is stored in $new_path.
14114 
14115   input_path="$new_path"
14116   # Check if we need to convert this using DOS-style short mode. If the path
14117   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14118   # take no chances and rewrite it.
14119   # Note: m4 eats our [], so we need to use [ and ] instead.
14120   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14121   if test "x$has_forbidden_chars" != x; then
14122     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14123     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14124     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14125     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14126       # Going to short mode and back again did indeed matter. Since short mode is
14127       # case insensitive, let's make it lowercase to improve readability.
14128       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14129       # Now convert it back to Unix-stile (cygpath)
14130       input_path=`$CYGPATH -u "$shortmode_path"`
14131       new_path="$input_path"
14132     fi
14133   fi
14134 
14135   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14136   if test "x$test_cygdrive_prefix" = x; then
14137     # As a simple fix, exclude /usr/bin since it's not a real path.
14138     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14139       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14140       # a path prefixed by /cygdrive for fixpath to work.
14141       new_path="$CYGWIN_ROOT_PATH$input_path"
14142     fi
14143   fi
14144 
14145 
14146   if test "x$path" != "x$new_path"; then
14147     CURDIR="$new_path"
14148     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14149 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14150   fi
14151 
14152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14153 
14154   path="$CURDIR"
14155   has_colon=`$ECHO $path | $GREP ^.:`
14156   new_path="$path"
14157   if test "x$has_colon" = x; then
14158     # Not in mixed or Windows style, start by that.
14159     new_path=`cmd //c echo $path`
14160   fi
14161 
14162 
14163   input_path="$new_path"
14164   # Check if we need to convert this using DOS-style short mode. If the path
14165   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14166   # take no chances and rewrite it.
14167   # Note: m4 eats our [], so we need to use [ and ] instead.
14168   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14169   if test "x$has_forbidden_chars" != x; then
14170     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14171     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14172   fi
14173 
14174 
14175   windows_path="$new_path"
14176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14177     unix_path=`$CYGPATH -u "$windows_path"`
14178     new_path="$unix_path"
14179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14180     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14181     new_path="$unix_path"
14182   fi
14183 
14184   if test "x$path" != "x$new_path"; then
14185     CURDIR="$new_path"
14186     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14187 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14188   fi
14189 
14190   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14191   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14192 
14193   else
14194     # We're on a unix platform. Hooray! :)
14195     path="$CURDIR"
14196     has_space=`$ECHO "$path" | $GREP " "`
14197     if test "x$has_space" != x; then
14198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14199 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14200       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14201     fi
14202 
14203     # Use eval to expand a potential ~
14204     eval path="$path"
14205     if test ! -f "$path" && test ! -d "$path"; then
14206       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14207     fi
14208 
14209     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14210   fi
14211 
14212 
14213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14214 
14215   # Input might be given as Windows format, start by converting to
14216   # unix format.
14217   path="$TOPDIR"
14218   new_path=`$CYGPATH -u "$path"`
14219 
14220   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14221   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14222   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14223   # "foo.exe" is OK but "foo" is an error.
14224   #
14225   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14226   # It is also a way to make sure we got the proper file name for the real test later on.
14227   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14228   if test "x$test_shortpath" = x; then
14229     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14230 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14231     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14232   fi
14233 
14234   # Call helper function which possibly converts this using DOS-style short mode.
14235   # If so, the updated path is stored in $new_path.
14236 
14237   input_path="$new_path"
14238   # Check if we need to convert this using DOS-style short mode. If the path
14239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14240   # take no chances and rewrite it.
14241   # Note: m4 eats our [], so we need to use [ and ] instead.
14242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14243   if test "x$has_forbidden_chars" != x; then
14244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14245     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14246     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14247     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14248       # Going to short mode and back again did indeed matter. Since short mode is
14249       # case insensitive, let's make it lowercase to improve readability.
14250       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14251       # Now convert it back to Unix-stile (cygpath)
14252       input_path=`$CYGPATH -u "$shortmode_path"`
14253       new_path="$input_path"
14254     fi
14255   fi
14256 
14257   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14258   if test "x$test_cygdrive_prefix" = x; then
14259     # As a simple fix, exclude /usr/bin since it's not a real path.
14260     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14261       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14262       # a path prefixed by /cygdrive for fixpath to work.
14263       new_path="$CYGWIN_ROOT_PATH$input_path"
14264     fi
14265   fi
14266 
14267 
14268   if test "x$path" != "x$new_path"; then
14269     TOPDIR="$new_path"
14270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14271 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14272   fi
14273 
14274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14275 
14276   path="$TOPDIR"
14277   has_colon=`$ECHO $path | $GREP ^.:`
14278   new_path="$path"
14279   if test "x$has_colon" = x; then
14280     # Not in mixed or Windows style, start by that.
14281     new_path=`cmd //c echo $path`
14282   fi
14283 
14284 
14285   input_path="$new_path"
14286   # Check if we need to convert this using DOS-style short mode. If the path
14287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14288   # take no chances and rewrite it.
14289   # Note: m4 eats our [], so we need to use [ and ] instead.
14290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14291   if test "x$has_forbidden_chars" != x; then
14292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14294   fi
14295 
14296 
14297   windows_path="$new_path"
14298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14299     unix_path=`$CYGPATH -u "$windows_path"`
14300     new_path="$unix_path"
14301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14303     new_path="$unix_path"
14304   fi
14305 
14306   if test "x$path" != "x$new_path"; then
14307     TOPDIR="$new_path"
14308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14309 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14310   fi
14311 
14312   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14313   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14314 
14315   else
14316     # We're on a unix platform. Hooray! :)
14317     path="$TOPDIR"
14318     has_space=`$ECHO "$path" | $GREP " "`
14319     if test "x$has_space" != x; then
14320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14321 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14322       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14323     fi
14324 
14325     # Use eval to expand a potential ~
14326     eval path="$path"
14327     if test ! -f "$path" && test ! -d "$path"; then
14328       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14329     fi
14330 
14331     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14332   fi
14333 
14334   # SRC_ROOT is a traditional alias for TOPDIR.
14335   SRC_ROOT=$TOPDIR
14336 
14337   # Locate the directory of this script.
14338   AUTOCONF_DIR=$TOPDIR/common/autoconf
14339 
14340 
14341   # Setup default logging of stdout and stderr to build.log in the output root.
14342   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14343   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14344   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14345 
14346 
14347 
14348 
14349 
14350 # Check if it's a pure open build or if custom sources are to be used.
14351 
14352   # Check whether --enable-openjdk-only was given.
14353 if test "${enable_openjdk_only+set}" = set; then :
14354   enableval=$enable_openjdk_only;
14355 else
14356   enable_openjdk_only="no"
14357 fi
14358 
14359 
14360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14361 $as_echo_n "checking for presence of closed sources... " >&6; }
14362   if test -d "$SRC_ROOT/jdk/src/closed"; then
14363     CLOSED_SOURCE_PRESENT=yes
14364   else
14365     CLOSED_SOURCE_PRESENT=no
14366   fi
14367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14368 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14369 
14370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14371 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14372   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14374 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14375 
14376   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14377     OPENJDK=true
14378     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14379       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14380 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14381     fi
14382   else
14383     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14384       OPENJDK=true
14385     else
14386       OPENJDK=false
14387     fi
14388   fi
14389 
14390   if test "x$OPENJDK" = "xtrue"; then
14391     SET_OPENJDK="OPENJDK=true"
14392   fi
14393 
14394 
14395 
14396   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14397   # the IncludeCustomExtension macro.
14398 
14399 
14400 # Check whether --with-custom-make-dir was given.
14401 if test "${with_custom_make_dir+set}" = set; then :
14402   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
14403 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14404 fi
14405 
14406 
14407 
14408 
14409 # These are needed to be able to create a configuration name (and thus the output directory)
14410 
14411   ###############################################################################
14412   #
14413   # Check which variant of the JDK that we want to build.
14414   # Currently we have:
14415   #    normal:   standard edition
14416   # but the custom make system may add other variants
14417   #
14418   # Effectively the JDK variant gives a name to a specific set of
14419   # modules to compile into the JDK. In the future, these modules
14420   # might even be Jigsaw modules.
14421   #
14422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14423 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14424 
14425 # Check whether --with-jdk-variant was given.
14426 if test "${with_jdk_variant+set}" = set; then :
14427   withval=$with_jdk_variant;
14428 fi
14429 
14430 
14431   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14432     JDK_VARIANT="normal"
14433   else
14434     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14435   fi
14436 
14437 
14438 
14439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14440 $as_echo "$JDK_VARIANT" >&6; }
14441 
14442 
14443 ###############################################################################
14444 #
14445 # Check which interpreter of the JVM we want to build.
14446 # Currently we have:
14447 #    template: Template interpreter (the default)
14448 #    cpp     : C++ interpreter
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14450 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14451 
14452 # Check whether --with-jvm-interpreter was given.
14453 if test "${with_jvm_interpreter+set}" = set; then :
14454   withval=$with_jvm_interpreter;
14455 fi
14456 
14457 
14458 if test "x$with_jvm_interpreter" = x; then
14459      with_jvm_interpreter="template"
14460 fi
14461 
14462 JVM_INTERPRETER="$with_jvm_interpreter"
14463 
14464 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14465    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14466 fi
14467 
14468 
14469 
14470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14471 $as_echo "$with_jvm_interpreter" >&6; }
14472 
14473 
14474 
14475   ###############################################################################
14476   #
14477   # Check which variants of the JVM that we want to build.
14478   # Currently we have:
14479   #    server: normal interpreter and a tiered C1/C2 compiler
14480   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14481   #    minimal1: reduced form of client with optional VM services and features stripped out
14482   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14483   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14484   #    zero: no machine code interpreter, no compiler
14485   #    zeroshark: zero interpreter and shark/llvm compiler backend
14486 #    core: interpreter only, no compiler (only works on some platforms)
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14488 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14489 
14490 # Check whether --with-jvm-variants was given.
14491 if test "${with_jvm_variants+set}" = set; then :
14492   withval=$with_jvm_variants;
14493 fi
14494 
14495 
14496   if test "x$with_jvm_variants" = x; then
14497     with_jvm_variants="server"
14498   fi
14499 
14500   JVM_VARIANTS=",$with_jvm_variants,"
14501   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,//'`
14502 
14503   if test "x$TEST_VARIANTS" != "x,"; then
14504      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14505   fi
14506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14507 $as_echo "$with_jvm_variants" >&6; }
14508 
14509   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14510   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14511   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14512   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14513   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14514   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14515   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14516 
14517   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14518     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14519       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14520     fi
14521   fi
14522   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14523     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14524       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14525     fi
14526   fi
14527   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14528     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14529       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14530     fi
14531   fi
14532 
14533   # Replace the commas with AND for use in the build directory name.
14534   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14535   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/'`
14536   if test "x$COUNT_VARIANTS" != "x,1"; then
14537     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14538   else
14539     BUILDING_MULTIPLE_JVM_VARIANTS=no
14540   fi
14541 
14542 
14543 
14544 
14545 
14546 
14547 
14548 
14549 
14550 
14551   INCLUDE_SA=true
14552   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14553     INCLUDE_SA=false
14554   fi
14555   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14556     INCLUDE_SA=false
14557   fi
14558   if test "x$OPENJDK_TARGET_OS" = xaix ; then
14559     INCLUDE_SA=false
14560   fi
14561 
14562 
14563   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14564     MACOSX_UNIVERSAL="true"
14565   fi
14566 
14567 
14568 
14569 
14570   ###############################################################################
14571   #
14572   # Set the debug level
14573   #    release: no debug information, all optimizations, no asserts.
14574   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14575   #    fastdebug: debug information (-g), all optimizations, all asserts
14576   #    slowdebug: debug information (-g), no optimizations, all asserts
14577   #
14578   DEBUG_LEVEL="release"
14579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14580 $as_echo_n "checking which debug level to use... " >&6; }
14581   # Check whether --enable-debug was given.
14582 if test "${enable_debug+set}" = set; then :
14583   enableval=$enable_debug;
14584         ENABLE_DEBUG="${enableval}"
14585         DEBUG_LEVEL="fastdebug"
14586 
14587 else
14588   ENABLE_DEBUG="no"
14589 fi
14590 
14591 
14592 
14593 # Check whether --with-debug-level was given.
14594 if test "${with_debug_level+set}" = set; then :
14595   withval=$with_debug_level;
14596         DEBUG_LEVEL="${withval}"
14597         if test "x$ENABLE_DEBUG" = xyes; then
14598           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14599         fi
14600 
14601 fi
14602 
14603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14604 $as_echo "$DEBUG_LEVEL" >&6; }
14605 
14606   if test "x$DEBUG_LEVEL" != xrelease && \
14607       test "x$DEBUG_LEVEL" != xoptimized && \
14608       test "x$DEBUG_LEVEL" != xfastdebug && \
14609       test "x$DEBUG_LEVEL" != xslowdebug; then
14610     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14611   fi
14612 
14613 
14614   ###############################################################################
14615   #
14616   # Setup legacy vars/targets and new vars to deal with different debug levels.
14617   #
14618 
14619   case $DEBUG_LEVEL in
14620     release )
14621       VARIANT="OPT"
14622       FASTDEBUG="false"
14623       DEBUG_CLASSFILES="false"
14624       BUILD_VARIANT_RELEASE=""
14625       HOTSPOT_DEBUG_LEVEL="product"
14626       HOTSPOT_EXPORT="product"
14627       ;;
14628     fastdebug )
14629       VARIANT="DBG"
14630       FASTDEBUG="true"
14631       DEBUG_CLASSFILES="true"
14632       BUILD_VARIANT_RELEASE="-fastdebug"
14633       HOTSPOT_DEBUG_LEVEL="fastdebug"
14634       HOTSPOT_EXPORT="fastdebug"
14635       ;;
14636     slowdebug )
14637       VARIANT="DBG"
14638       FASTDEBUG="false"
14639       DEBUG_CLASSFILES="true"
14640       BUILD_VARIANT_RELEASE="-debug"
14641       HOTSPOT_DEBUG_LEVEL="debug"
14642       HOTSPOT_EXPORT="debug"
14643       ;;
14644     optimized )
14645       VARIANT="OPT"
14646       FASTDEBUG="false"
14647       DEBUG_CLASSFILES="false"
14648       BUILD_VARIANT_RELEASE="-optimized"
14649       HOTSPOT_DEBUG_LEVEL="optimized"
14650       HOTSPOT_EXPORT="optimized"
14651       ;;
14652   esac
14653 
14654   # The debug level 'optimized' is a little special because it is currently only
14655   # applicable to the HotSpot build where it means to build a completely
14656   # optimized version of the VM without any debugging code (like for the
14657   # 'release' debug level which is called 'product' in the HotSpot build) but
14658   # with the exception that it can contain additional code which is otherwise
14659   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14660   # test new and/or experimental features which are not intended for customer
14661   # shipment. Because these new features need to be tested and benchmarked in
14662   # real world scenarios, we want to build the containing JDK at the 'release'
14663   # debug level.
14664   if test "x$DEBUG_LEVEL" = xoptimized; then
14665     DEBUG_LEVEL="release"
14666   fi
14667 
14668   #####
14669   # Generate the legacy makefile targets for hotspot.
14670   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14671   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14672   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14673   # But until then ...
14674   HOTSPOT_TARGET=""
14675 
14676   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14677     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14678   fi
14679 
14680   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14681     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14682   fi
14683 
14684   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14685     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14686   fi
14687 
14688   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14689     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14690   fi
14691 
14692   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14693     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14694   fi
14695 
14696   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14697     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14698   fi
14699 
14700   if test "x$JVM_VARIANT_CORE" = xtrue; then
14701     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14702   fi
14703 
14704   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14705 
14706   # On Macosx universal binaries are produced, but they only contain
14707   # 64 bit intel. This invalidates control of which jvms are built
14708   # from configure, but only server is valid anyway. Fix this
14709   # when hotspot makefiles are rewritten.
14710   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14711     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14712   fi
14713 
14714   #####
14715 
14716 
14717 
14718 
14719 
14720 
14721 
14722 
14723 # With basic setup done, call the custom early hook.
14724 
14725 
14726 # Check if we have devkits, extra paths or sysroot set.
14727 
14728 
14729 # Check whether --with-devkit was given.
14730 if test "${with_devkit+set}" = set; then :
14731   withval=$with_devkit;
14732 
14733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14734 
14735   # Input might be given as Windows format, start by converting to
14736   # unix format.
14737   path="$with_devkit"
14738   new_path=`$CYGPATH -u "$path"`
14739 
14740   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14741   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14742   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14743   # "foo.exe" is OK but "foo" is an error.
14744   #
14745   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14746   # It is also a way to make sure we got the proper file name for the real test later on.
14747   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14748   if test "x$test_shortpath" = x; then
14749     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14750 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14751     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14752   fi
14753 
14754   # Call helper function which possibly converts this using DOS-style short mode.
14755   # If so, the updated path is stored in $new_path.
14756 
14757   input_path="$new_path"
14758   # Check if we need to convert this using DOS-style short mode. If the path
14759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14760   # take no chances and rewrite it.
14761   # Note: m4 eats our [], so we need to use [ and ] instead.
14762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14763   if test "x$has_forbidden_chars" != x; then
14764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14765     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14766     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14767     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14768       # Going to short mode and back again did indeed matter. Since short mode is
14769       # case insensitive, let's make it lowercase to improve readability.
14770       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14771       # Now convert it back to Unix-stile (cygpath)
14772       input_path=`$CYGPATH -u "$shortmode_path"`
14773       new_path="$input_path"
14774     fi
14775   fi
14776 
14777   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14778   if test "x$test_cygdrive_prefix" = x; then
14779     # As a simple fix, exclude /usr/bin since it's not a real path.
14780     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14781       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14782       # a path prefixed by /cygdrive for fixpath to work.
14783       new_path="$CYGWIN_ROOT_PATH$input_path"
14784     fi
14785   fi
14786 
14787 
14788   if test "x$path" != "x$new_path"; then
14789     with_devkit="$new_path"
14790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14791 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14792   fi
14793 
14794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14795 
14796   path="$with_devkit"
14797   has_colon=`$ECHO $path | $GREP ^.:`
14798   new_path="$path"
14799   if test "x$has_colon" = x; then
14800     # Not in mixed or Windows style, start by that.
14801     new_path=`cmd //c echo $path`
14802   fi
14803 
14804 
14805   input_path="$new_path"
14806   # Check if we need to convert this using DOS-style short mode. If the path
14807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14808   # take no chances and rewrite it.
14809   # Note: m4 eats our [], so we need to use [ and ] instead.
14810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14811   if test "x$has_forbidden_chars" != x; then
14812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14813     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14814   fi
14815 
14816 
14817   windows_path="$new_path"
14818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14819     unix_path=`$CYGPATH -u "$windows_path"`
14820     new_path="$unix_path"
14821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14823     new_path="$unix_path"
14824   fi
14825 
14826   if test "x$path" != "x$new_path"; then
14827     with_devkit="$new_path"
14828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14829 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14830   fi
14831 
14832   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14833   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14834 
14835   else
14836     # We're on a unix platform. Hooray! :)
14837     path="$with_devkit"
14838     has_space=`$ECHO "$path" | $GREP " "`
14839     if test "x$has_space" != x; then
14840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14841 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14842       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14843     fi
14844 
14845     # Use eval to expand a potential ~
14846     eval path="$path"
14847     if test ! -f "$path" && test ! -d "$path"; then
14848       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14849     fi
14850 
14851     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14852   fi
14853 
14854         DEVKIT_ROOT="$with_devkit"
14855         # Check for a meta data info file in the root of the devkit
14856         if test -f "$DEVKIT_ROOT/devkit.info"; then
14857           # This potentially sets the following:
14858           # DEVKIT_NAME: A descriptive name of the devkit
14859           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14860           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14861           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14862           . $DEVKIT_ROOT/devkit.info
14863         fi
14864 
14865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14866 $as_echo_n "checking for devkit... " >&6; }
14867         if test "x$DEVKIT_NAME" != x; then
14868           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14869 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14870         else
14871           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14872 $as_echo "$DEVKIT_ROOT" >&6; }
14873         fi
14874 
14875         if test "x$DEVKIT_EXTRA_PATH" != x; then
14876 
14877   if test "x$DEVKIT_EXTRA_PATH" != x; then
14878     if test "x$EXTRA_PATH" = x; then
14879       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14880     else
14881       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14882     fi
14883   fi
14884 
14885         fi
14886 
14887         # Fallback default of just /bin if DEVKIT_PATH is not defined
14888         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14889           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14890         fi
14891 
14892   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14893     if test "x$TOOLCHAIN_PATH" = x; then
14894       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14895     else
14896       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14897     fi
14898   fi
14899 
14900 
14901         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14902         # places for backwards compatiblity.
14903         if test "x$DEVKIT_SYSROOT" != x; then
14904           SYSROOT="$DEVKIT_SYSROOT"
14905         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14906           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14907         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14908           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14909         fi
14910 
14911 
14912 fi
14913 
14914 
14915   # You can force the sysroot if the sysroot encoded into the compiler tools
14916   # is not correct.
14917 
14918 # Check whether --with-sys-root was given.
14919 if test "${with_sys_root+set}" = set; then :
14920   withval=$with_sys_root; SYSROOT=$with_sys_root
14921 
14922 fi
14923 
14924 
14925 
14926 # Check whether --with-sysroot was given.
14927 if test "${with_sysroot+set}" = set; then :
14928   withval=$with_sysroot; SYSROOT=$with_sysroot
14929 
14930 fi
14931 
14932 
14933 
14934 # Check whether --with-tools-dir was given.
14935 if test "${with_tools_dir+set}" = set; then :
14936   withval=$with_tools_dir;
14937   if test "x$with_tools_dir" != x; then
14938     if test "x$TOOLCHAIN_PATH" = x; then
14939       TOOLCHAIN_PATH="$with_tools_dir"
14940     else
14941       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14942     fi
14943   fi
14944 
14945 
14946 fi
14947 
14948 
14949 
14950 # Check whether --with-toolchain-path was given.
14951 if test "${with_toolchain_path+set}" = set; then :
14952   withval=$with_toolchain_path;
14953   if test "x$with_toolchain_path" != x; then
14954     if test "x$TOOLCHAIN_PATH" = x; then
14955       TOOLCHAIN_PATH="$with_toolchain_path"
14956     else
14957       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14958     fi
14959   fi
14960 
14961 
14962 fi
14963 
14964 
14965 
14966 # Check whether --with-extra-path was given.
14967 if test "${with_extra_path+set}" = set; then :
14968   withval=$with_extra_path;
14969   if test "x$with_extra_path" != x; then
14970     if test "x$EXTRA_PATH" = x; then
14971       EXTRA_PATH="$with_extra_path"
14972     else
14973       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14974     fi
14975   fi
14976 
14977 
14978 fi
14979 
14980 
14981   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14982     # detect if Xcode is installed by running xcodebuild -version
14983     # if no Xcode installed, xcodebuild exits with 1
14984     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14985     if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14986       # We need to use xcodebuild in the toolchain dir provided by the user, this will
14987       # fall back on the stub binary in /usr/bin/xcodebuild
14988       # Extract the first word of "xcodebuild", so it can be a program name with args.
14989 set dummy xcodebuild; ac_word=$2
14990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14991 $as_echo_n "checking for $ac_word... " >&6; }
14992 if ${ac_cv_path_XCODEBUILD+:} false; then :
14993   $as_echo_n "(cached) " >&6
14994 else
14995   case $XCODEBUILD in
14996   [\\/]* | ?:[\\/]*)
14997   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14998   ;;
14999   *)
15000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15001 for as_dir in $TOOLCHAIN_PATH
15002 do
15003   IFS=$as_save_IFS
15004   test -z "$as_dir" && as_dir=.
15005     for ac_exec_ext in '' $ac_executable_extensions; do
15006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15007     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15009     break 2
15010   fi
15011 done
15012   done
15013 IFS=$as_save_IFS
15014 
15015   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15016   ;;
15017 esac
15018 fi
15019 XCODEBUILD=$ac_cv_path_XCODEBUILD
15020 if test -n "$XCODEBUILD"; then
15021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15022 $as_echo "$XCODEBUILD" >&6; }
15023 else
15024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15025 $as_echo "no" >&6; }
15026 fi
15027 
15028 
15029     else
15030       # this should result in SYSROOT being empty, unless --with-sysroot is provided
15031       # when only the command line tools are installed there are no SDKs, so headers
15032       # are copied into the system frameworks
15033       XCODEBUILD=
15034 
15035     fi
15036 
15037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15038 $as_echo_n "checking for sdk name... " >&6; }
15039 
15040 # Check whether --with-sdk-name was given.
15041 if test "${with_sdk_name+set}" = set; then :
15042   withval=$with_sdk_name; SDKNAME=$with_sdk_name
15043 
15044 fi
15045 
15046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15047 $as_echo "$SDKNAME" >&6; }
15048 
15049     # if toolchain path is specified then don't rely on system headers, they may not compile
15050     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15051     test -z "$TOOLCHAIN_PATH" && \
15052       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15053 
15054     if test -z "$SYSROOT"; then
15055       if test -n "$XCODEBUILD"; then
15056         # if we don't have system headers, use default SDK name (last resort)
15057         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15058           SDKNAME=${SDKNAME:-macosx}
15059         fi
15060 
15061         if test -n "$SDKNAME"; then
15062           # Call xcodebuild to determine SYSROOT
15063           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15064         fi
15065       else
15066         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15067           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
15068         fi
15069       fi
15070     else
15071       # warn user if --with-sdk-name was also set
15072       if test -n "$with_sdk_name"; then
15073         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15074 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15075       fi
15076     fi
15077 
15078     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15079       # If no system framework headers, then SYSROOT must be set, or we won't build
15080       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
15081     fi
15082 
15083     # Perform a basic sanity test
15084     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15085       if test -z "$SYSROOT"; then
15086         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
15087       else
15088         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15089       fi
15090     fi
15091 
15092     # set SDKROOT too, Xcode tools will pick it up
15093     SDKROOT=$SYSROOT
15094 
15095   fi
15096 
15097   # Prepend the extra path to the global path
15098 
15099   if test "x$EXTRA_PATH" != x; then
15100     if test "x$PATH" = x; then
15101       PATH="$EXTRA_PATH"
15102     else
15103       PATH="$EXTRA_PATH:$PATH"
15104     fi
15105   fi
15106 
15107 
15108   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15109     # Add extra search paths on solaris for utilities like ar and as etc...
15110     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15111   fi
15112 
15113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15114 $as_echo_n "checking for sysroot... " >&6; }
15115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15116 $as_echo "$SYSROOT" >&6; }
15117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15118 $as_echo_n "checking for toolchain path... " >&6; }
15119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15120 $as_echo "$TOOLCHAIN_PATH" >&6; }
15121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15122 $as_echo_n "checking for extra path... " >&6; }
15123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15124 $as_echo "$EXTRA_PATH" >&6; }
15125 
15126 
15127 # To properly create a configuration name, we need to have the OpenJDK target
15128 # and options (variants and debug level) parsed.
15129 
15130 
15131 
15132 # Check whether --with-conf-name was given.
15133 if test "${with_conf_name+set}" = set; then :
15134   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15135 fi
15136 
15137 
15138   # Test from where we are running configure, in or outside of src root.
15139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15140 $as_echo_n "checking where to store configuration... " >&6; }
15141   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15142       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15143       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15144     # We are running configure from the src root.
15145     # Create a default ./build/target-variant-debuglevel output root.
15146     if test "x${CONF_NAME}" = x; then
15147       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15148 $as_echo "in default location" >&6; }
15149       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15150     else
15151       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15152 $as_echo "in build directory with custom name" >&6; }
15153     fi
15154     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15155     $MKDIR -p "$OUTPUT_ROOT"
15156     if test ! -d "$OUTPUT_ROOT"; then
15157       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15158     fi
15159   else
15160     # We are running configure from outside of the src dir.
15161     # Then use the current directory as output dir!
15162     # If configuration is situated in normal build directory, just use the build
15163     # directory name as configuration name, otherwise use the complete path.
15164     if test "x${CONF_NAME}" = x; then
15165       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15166     fi
15167     OUTPUT_ROOT="$CURDIR"
15168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15169 $as_echo "in current directory" >&6; }
15170 
15171     # WARNING: This might be a bad thing to do. You need to be sure you want to
15172     # have a configuration in this directory. Do some sanity checks!
15173 
15174     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15175       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15176       # other files
15177       files_present=`$LS $OUTPUT_ROOT`
15178       # Configure has already touched config.log and confdefs.h in the current dir when this check
15179       # is performed.
15180       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15181       | $TR -d '\n'`
15182       if test "x$filtered_files" != x; then
15183         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15184 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15185         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15186 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15187         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15188 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15189         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15190 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15191         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15192 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15193         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15194 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15195         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15196 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15197         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15198       fi
15199     fi
15200   fi
15201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15202 $as_echo_n "checking what configuration name to use... " >&6; }
15203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15204 $as_echo "$CONF_NAME" >&6; }
15205 
15206 
15207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15208 
15209   # Input might be given as Windows format, start by converting to
15210   # unix format.
15211   path="$OUTPUT_ROOT"
15212   new_path=`$CYGPATH -u "$path"`
15213 
15214   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15215   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15216   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15217   # "foo.exe" is OK but "foo" is an error.
15218   #
15219   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15220   # It is also a way to make sure we got the proper file name for the real test later on.
15221   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15222   if test "x$test_shortpath" = x; then
15223     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15224 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15225     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15226   fi
15227 
15228   # Call helper function which possibly converts this using DOS-style short mode.
15229   # If so, the updated path is stored in $new_path.
15230 
15231   input_path="$new_path"
15232   # Check if we need to convert this using DOS-style short mode. If the path
15233   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15234   # take no chances and rewrite it.
15235   # Note: m4 eats our [], so we need to use [ and ] instead.
15236   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15237   if test "x$has_forbidden_chars" != x; then
15238     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15239     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15240     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15241     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15242       # Going to short mode and back again did indeed matter. Since short mode is
15243       # case insensitive, let's make it lowercase to improve readability.
15244       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15245       # Now convert it back to Unix-stile (cygpath)
15246       input_path=`$CYGPATH -u "$shortmode_path"`
15247       new_path="$input_path"
15248     fi
15249   fi
15250 
15251   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15252   if test "x$test_cygdrive_prefix" = x; then
15253     # As a simple fix, exclude /usr/bin since it's not a real path.
15254     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15255       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15256       # a path prefixed by /cygdrive for fixpath to work.
15257       new_path="$CYGWIN_ROOT_PATH$input_path"
15258     fi
15259   fi
15260 
15261 
15262   if test "x$path" != "x$new_path"; then
15263     OUTPUT_ROOT="$new_path"
15264     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15265 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15266   fi
15267 
15268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15269 
15270   path="$OUTPUT_ROOT"
15271   has_colon=`$ECHO $path | $GREP ^.:`
15272   new_path="$path"
15273   if test "x$has_colon" = x; then
15274     # Not in mixed or Windows style, start by that.
15275     new_path=`cmd //c echo $path`
15276   fi
15277 
15278 
15279   input_path="$new_path"
15280   # Check if we need to convert this using DOS-style short mode. If the path
15281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15282   # take no chances and rewrite it.
15283   # Note: m4 eats our [], so we need to use [ and ] instead.
15284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15285   if test "x$has_forbidden_chars" != x; then
15286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15287     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15288   fi
15289 
15290 
15291   windows_path="$new_path"
15292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15293     unix_path=`$CYGPATH -u "$windows_path"`
15294     new_path="$unix_path"
15295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15296     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15297     new_path="$unix_path"
15298   fi
15299 
15300   if test "x$path" != "x$new_path"; then
15301     OUTPUT_ROOT="$new_path"
15302     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15303 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15304   fi
15305 
15306   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15307   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15308 
15309   else
15310     # We're on a unix platform. Hooray! :)
15311     path="$OUTPUT_ROOT"
15312     has_space=`$ECHO "$path" | $GREP " "`
15313     if test "x$has_space" != x; then
15314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15315 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15316       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15317     fi
15318 
15319     # Use eval to expand a potential ~
15320     eval path="$path"
15321     if test ! -f "$path" && test ! -d "$path"; then
15322       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15323     fi
15324 
15325     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15326   fi
15327 
15328 
15329   SPEC=$OUTPUT_ROOT/spec.gmk
15330 
15331   CONF_NAME=$CONF_NAME
15332 
15333   OUTPUT_ROOT=$OUTPUT_ROOT
15334 
15335 
15336   # The spec.gmk file contains all variables for the make system.
15337   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15338 
15339   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15340   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15341 
15342   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15343   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15344 
15345   # The compare.sh is used to compare the build output to other builds.
15346   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15347 
15348   # The generated Makefile knows where the spec.gmk is and where the source is.
15349   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15350   # which will look for generated configurations
15351   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15352 
15353 
15354 
15355 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15356 
15357   for ac_prog in apt-get yum port pkgutil pkgadd
15358 do
15359   # Extract the first word of "$ac_prog", so it can be a program name with args.
15360 set dummy $ac_prog; ac_word=$2
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15362 $as_echo_n "checking for $ac_word... " >&6; }
15363 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15364   $as_echo_n "(cached) " >&6
15365 else
15366   if test -n "$PKGHANDLER"; then
15367   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15368 else
15369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15370 for as_dir in $PATH
15371 do
15372   IFS=$as_save_IFS
15373   test -z "$as_dir" && as_dir=.
15374     for ac_exec_ext in '' $ac_executable_extensions; do
15375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15376     ac_cv_prog_PKGHANDLER="$ac_prog"
15377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15378     break 2
15379   fi
15380 done
15381   done
15382 IFS=$as_save_IFS
15383 
15384 fi
15385 fi
15386 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15387 if test -n "$PKGHANDLER"; then
15388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15389 $as_echo "$PKGHANDLER" >&6; }
15390 else
15391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15392 $as_echo "no" >&6; }
15393 fi
15394 
15395 
15396   test -n "$PKGHANDLER" && break
15397 done
15398 
15399 
15400 
15401 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15402 
15403 
15404   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15405   if test "x$MAKE" != x; then
15406     # User has supplied a make, test it.
15407     if test ! -f "$MAKE"; then
15408       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15409     fi
15410 
15411   MAKE_CANDIDATE=""$MAKE""
15412   DESCRIPTION="user supplied MAKE=$MAKE"
15413   if test "x$MAKE_CANDIDATE" != x; then
15414     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15415 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15416     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15417     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15418     if test "x$IS_GNU_MAKE" = x; then
15419       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15420 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15421     else
15422       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15423       if test "x$IS_MODERN_MAKE" = x; then
15424         { $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
15425 $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;}
15426       else
15427         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15428           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15429             MAKE_EXPECTED_ENV='cygwin'
15430           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15431             MAKE_EXPECTED_ENV='msys'
15432           else
15433             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15434           fi
15435           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15436           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15437         else
15438           # Not relevant for non-Windows
15439           IS_MAKE_CORRECT_ENV=true
15440         fi
15441         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15442           { $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
15443 $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;}
15444         else
15445           FOUND_MAKE=$MAKE_CANDIDATE
15446 
15447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15448 
15449   # First separate the path from the arguments. This will split at the first
15450   # space.
15451   complete="$FOUND_MAKE"
15452   path="${complete%% *}"
15453   tmp="$complete EOL"
15454   arguments="${tmp#* }"
15455 
15456   # Input might be given as Windows format, start by converting to
15457   # unix format.
15458   new_path=`$CYGPATH -u "$path"`
15459 
15460   # Now try to locate executable using which
15461   new_path=`$WHICH "$new_path" 2> /dev/null`
15462   # bat and cmd files are not always considered executable in cygwin causing which
15463   # to not find them
15464   if test "x$new_path" = x \
15465       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15466       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15467     new_path=`$CYGPATH -u "$path"`
15468   fi
15469   if test "x$new_path" = x; then
15470     # Oops. Which didn't find the executable.
15471     # The splitting of arguments from the executable at a space might have been incorrect,
15472     # since paths with space are more likely in Windows. Give it another try with the whole
15473     # argument.
15474     path="$complete"
15475     arguments="EOL"
15476     new_path=`$CYGPATH -u "$path"`
15477     new_path=`$WHICH "$new_path" 2> /dev/null`
15478     # bat and cmd files are not always considered executable in cygwin causing which
15479     # to not find them
15480     if test "x$new_path" = x \
15481         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15482         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15483       new_path=`$CYGPATH -u "$path"`
15484     fi
15485     if test "x$new_path" = x; then
15486       # It's still not found. Now this is an unrecoverable error.
15487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15488 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15489       has_space=`$ECHO "$complete" | $GREP " "`
15490       if test "x$has_space" != x; then
15491         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15492 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15493       fi
15494       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15495     fi
15496   fi
15497 
15498   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15499   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15500   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15501   # "foo.exe" is OK but "foo" is an error.
15502   #
15503   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15504   # It is also a way to make sure we got the proper file name for the real test later on.
15505   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15506   if test "x$test_shortpath" = x; then
15507     # Short path failed, file does not exist as specified.
15508     # Try adding .exe or .cmd
15509     if test -f "${new_path}.exe"; then
15510       input_to_shortpath="${new_path}.exe"
15511     elif test -f "${new_path}.cmd"; then
15512       input_to_shortpath="${new_path}.cmd"
15513     else
15514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15515 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15516       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15517 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15518       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15519     fi
15520   else
15521     input_to_shortpath="$new_path"
15522   fi
15523 
15524   # Call helper function which possibly converts this using DOS-style short mode.
15525   # If so, the updated path is stored in $new_path.
15526   new_path="$input_to_shortpath"
15527 
15528   input_path="$input_to_shortpath"
15529   # Check if we need to convert this using DOS-style short mode. If the path
15530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15531   # take no chances and rewrite it.
15532   # Note: m4 eats our [], so we need to use [ and ] instead.
15533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15534   if test "x$has_forbidden_chars" != x; then
15535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15536     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15537     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15538     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15539       # Going to short mode and back again did indeed matter. Since short mode is
15540       # case insensitive, let's make it lowercase to improve readability.
15541       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15542       # Now convert it back to Unix-stile (cygpath)
15543       input_path=`$CYGPATH -u "$shortmode_path"`
15544       new_path="$input_path"
15545     fi
15546   fi
15547 
15548   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15549   if test "x$test_cygdrive_prefix" = x; then
15550     # As a simple fix, exclude /usr/bin since it's not a real path.
15551     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15552       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15553       # a path prefixed by /cygdrive for fixpath to work.
15554       new_path="$CYGWIN_ROOT_PATH$input_path"
15555     fi
15556   fi
15557 
15558   # remove trailing .exe if any
15559   new_path="${new_path/%.exe/}"
15560 
15561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15562 
15563   # First separate the path from the arguments. This will split at the first
15564   # space.
15565   complete="$FOUND_MAKE"
15566   path="${complete%% *}"
15567   tmp="$complete EOL"
15568   arguments="${tmp#* }"
15569 
15570   # Input might be given as Windows format, start by converting to
15571   # unix format.
15572   new_path="$path"
15573 
15574   windows_path="$new_path"
15575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15576     unix_path=`$CYGPATH -u "$windows_path"`
15577     new_path="$unix_path"
15578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15580     new_path="$unix_path"
15581   fi
15582 
15583 
15584   # Now try to locate executable using which
15585   new_path=`$WHICH "$new_path" 2> /dev/null`
15586 
15587   if test "x$new_path" = x; then
15588     # Oops. Which didn't find the executable.
15589     # The splitting of arguments from the executable at a space might have been incorrect,
15590     # since paths with space are more likely in Windows. Give it another try with the whole
15591     # argument.
15592     path="$complete"
15593     arguments="EOL"
15594     new_path="$path"
15595 
15596   windows_path="$new_path"
15597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15598     unix_path=`$CYGPATH -u "$windows_path"`
15599     new_path="$unix_path"
15600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15602     new_path="$unix_path"
15603   fi
15604 
15605 
15606     new_path=`$WHICH "$new_path" 2> /dev/null`
15607     # bat and cmd files are not always considered executable in MSYS causing which
15608     # to not find them
15609     if test "x$new_path" = x \
15610         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15611         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15612       new_path="$path"
15613 
15614   windows_path="$new_path"
15615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15616     unix_path=`$CYGPATH -u "$windows_path"`
15617     new_path="$unix_path"
15618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15620     new_path="$unix_path"
15621   fi
15622 
15623     fi
15624 
15625     if test "x$new_path" = x; then
15626       # It's still not found. Now this is an unrecoverable error.
15627       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15628 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15629       has_space=`$ECHO "$complete" | $GREP " "`
15630       if test "x$has_space" != x; then
15631         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15632 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15633       fi
15634       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15635     fi
15636   fi
15637 
15638   # Now new_path has a complete unix path to the binary
15639   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15640     # Keep paths in /bin as-is, but remove trailing .exe if any
15641     new_path="${new_path/%.exe/}"
15642     # Do not save /bin paths to all_fixpath_prefixes!
15643   else
15644     # Not in mixed or Windows style, start by that.
15645     new_path=`cmd //c echo $new_path`
15646 
15647   input_path="$new_path"
15648   # Check if we need to convert this using DOS-style short mode. If the path
15649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15650   # take no chances and rewrite it.
15651   # Note: m4 eats our [], so we need to use [ and ] instead.
15652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15653   if test "x$has_forbidden_chars" != x; then
15654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15655     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15656   fi
15657 
15658     # Output is in $new_path
15659 
15660   windows_path="$new_path"
15661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15662     unix_path=`$CYGPATH -u "$windows_path"`
15663     new_path="$unix_path"
15664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15666     new_path="$unix_path"
15667   fi
15668 
15669     # remove trailing .exe if any
15670     new_path="${new_path/%.exe/}"
15671 
15672     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15673     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15674   fi
15675 
15676   else
15677     # We're on a unix platform. Hooray! :)
15678     # First separate the path from the arguments. This will split at the first
15679     # space.
15680     complete="$FOUND_MAKE"
15681     path="${complete%% *}"
15682     tmp="$complete EOL"
15683     arguments="${tmp#* }"
15684 
15685     # Cannot rely on the command "which" here since it doesn't always work.
15686     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15687     if test -z "$is_absolute_path"; then
15688       # Path to executable is not absolute. Find it.
15689       IFS_save="$IFS"
15690       IFS=:
15691       for p in $PATH; do
15692         if test -f "$p/$path" && test -x "$p/$path"; then
15693           new_path="$p/$path"
15694           break
15695         fi
15696       done
15697       IFS="$IFS_save"
15698     else
15699       # This is an absolute path, we can use it without further modifications.
15700       new_path="$path"
15701     fi
15702 
15703     if test "x$new_path" = x; then
15704       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15705 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15706       has_space=`$ECHO "$complete" | $GREP " "`
15707       if test "x$has_space" != x; then
15708         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15709 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15710       fi
15711       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15712     fi
15713   fi
15714 
15715   # Now join together the path and the arguments once again
15716   if test "x$arguments" != xEOL; then
15717     new_complete="$new_path ${arguments% *}"
15718   else
15719     new_complete="$new_path"
15720   fi
15721 
15722   if test "x$complete" != "x$new_complete"; then
15723     FOUND_MAKE="$new_complete"
15724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15725 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15726   fi
15727 
15728         fi
15729       fi
15730     fi
15731   fi
15732 
15733     if test "x$FOUND_MAKE" = x; then
15734       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15735     fi
15736   else
15737     # Try our hardest to locate a correct version of GNU make
15738     for ac_prog in gmake
15739 do
15740   # Extract the first word of "$ac_prog", so it can be a program name with args.
15741 set dummy $ac_prog; ac_word=$2
15742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15743 $as_echo_n "checking for $ac_word... " >&6; }
15744 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15745   $as_echo_n "(cached) " >&6
15746 else
15747   case $CHECK_GMAKE in
15748   [\\/]* | ?:[\\/]*)
15749   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15750   ;;
15751   *)
15752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15753 for as_dir in $PATH
15754 do
15755   IFS=$as_save_IFS
15756   test -z "$as_dir" && as_dir=.
15757     for ac_exec_ext in '' $ac_executable_extensions; do
15758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15759     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15761     break 2
15762   fi
15763 done
15764   done
15765 IFS=$as_save_IFS
15766 
15767   ;;
15768 esac
15769 fi
15770 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15771 if test -n "$CHECK_GMAKE"; then
15772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15773 $as_echo "$CHECK_GMAKE" >&6; }
15774 else
15775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15776 $as_echo "no" >&6; }
15777 fi
15778 
15779 
15780   test -n "$CHECK_GMAKE" && break
15781 done
15782 
15783 
15784   MAKE_CANDIDATE=""$CHECK_GMAKE""
15785   DESCRIPTION="gmake in PATH"
15786   if test "x$MAKE_CANDIDATE" != x; then
15787     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15788 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15789     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15790     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15791     if test "x$IS_GNU_MAKE" = x; then
15792       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15793 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15794     else
15795       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15796       if test "x$IS_MODERN_MAKE" = x; then
15797         { $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
15798 $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;}
15799       else
15800         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15801           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15802             MAKE_EXPECTED_ENV='cygwin'
15803           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15804             MAKE_EXPECTED_ENV='msys'
15805           else
15806             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15807           fi
15808           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15809           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15810         else
15811           # Not relevant for non-Windows
15812           IS_MAKE_CORRECT_ENV=true
15813         fi
15814         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15815           { $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
15816 $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;}
15817         else
15818           FOUND_MAKE=$MAKE_CANDIDATE
15819 
15820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15821 
15822   # First separate the path from the arguments. This will split at the first
15823   # space.
15824   complete="$FOUND_MAKE"
15825   path="${complete%% *}"
15826   tmp="$complete EOL"
15827   arguments="${tmp#* }"
15828 
15829   # Input might be given as Windows format, start by converting to
15830   # unix format.
15831   new_path=`$CYGPATH -u "$path"`
15832 
15833   # Now try to locate executable using which
15834   new_path=`$WHICH "$new_path" 2> /dev/null`
15835   # bat and cmd files are not always considered executable in cygwin causing which
15836   # to not find them
15837   if test "x$new_path" = x \
15838       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15839       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15840     new_path=`$CYGPATH -u "$path"`
15841   fi
15842   if test "x$new_path" = x; then
15843     # Oops. Which didn't find the executable.
15844     # The splitting of arguments from the executable at a space might have been incorrect,
15845     # since paths with space are more likely in Windows. Give it another try with the whole
15846     # argument.
15847     path="$complete"
15848     arguments="EOL"
15849     new_path=`$CYGPATH -u "$path"`
15850     new_path=`$WHICH "$new_path" 2> /dev/null`
15851     # bat and cmd files are not always considered executable in cygwin causing which
15852     # to not find them
15853     if test "x$new_path" = x \
15854         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15855         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15856       new_path=`$CYGPATH -u "$path"`
15857     fi
15858     if test "x$new_path" = x; then
15859       # It's still not found. Now this is an unrecoverable error.
15860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15861 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15862       has_space=`$ECHO "$complete" | $GREP " "`
15863       if test "x$has_space" != x; then
15864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15866       fi
15867       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15868     fi
15869   fi
15870 
15871   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15872   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15873   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15874   # "foo.exe" is OK but "foo" is an error.
15875   #
15876   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15877   # It is also a way to make sure we got the proper file name for the real test later on.
15878   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15879   if test "x$test_shortpath" = x; then
15880     # Short path failed, file does not exist as specified.
15881     # Try adding .exe or .cmd
15882     if test -f "${new_path}.exe"; then
15883       input_to_shortpath="${new_path}.exe"
15884     elif test -f "${new_path}.cmd"; then
15885       input_to_shortpath="${new_path}.cmd"
15886     else
15887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15888 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15889       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15890 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15891       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15892     fi
15893   else
15894     input_to_shortpath="$new_path"
15895   fi
15896 
15897   # Call helper function which possibly converts this using DOS-style short mode.
15898   # If so, the updated path is stored in $new_path.
15899   new_path="$input_to_shortpath"
15900 
15901   input_path="$input_to_shortpath"
15902   # Check if we need to convert this using DOS-style short mode. If the path
15903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15904   # take no chances and rewrite it.
15905   # Note: m4 eats our [], so we need to use [ and ] instead.
15906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15907   if test "x$has_forbidden_chars" != x; then
15908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15912       # Going to short mode and back again did indeed matter. Since short mode is
15913       # case insensitive, let's make it lowercase to improve readability.
15914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15915       # Now convert it back to Unix-stile (cygpath)
15916       input_path=`$CYGPATH -u "$shortmode_path"`
15917       new_path="$input_path"
15918     fi
15919   fi
15920 
15921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15922   if test "x$test_cygdrive_prefix" = x; then
15923     # As a simple fix, exclude /usr/bin since it's not a real path.
15924     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15926       # a path prefixed by /cygdrive for fixpath to work.
15927       new_path="$CYGWIN_ROOT_PATH$input_path"
15928     fi
15929   fi
15930 
15931   # remove trailing .exe if any
15932   new_path="${new_path/%.exe/}"
15933 
15934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15935 
15936   # First separate the path from the arguments. This will split at the first
15937   # space.
15938   complete="$FOUND_MAKE"
15939   path="${complete%% *}"
15940   tmp="$complete EOL"
15941   arguments="${tmp#* }"
15942 
15943   # Input might be given as Windows format, start by converting to
15944   # unix format.
15945   new_path="$path"
15946 
15947   windows_path="$new_path"
15948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15949     unix_path=`$CYGPATH -u "$windows_path"`
15950     new_path="$unix_path"
15951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15953     new_path="$unix_path"
15954   fi
15955 
15956 
15957   # Now try to locate executable using which
15958   new_path=`$WHICH "$new_path" 2> /dev/null`
15959 
15960   if test "x$new_path" = x; then
15961     # Oops. Which didn't find the executable.
15962     # The splitting of arguments from the executable at a space might have been incorrect,
15963     # since paths with space are more likely in Windows. Give it another try with the whole
15964     # argument.
15965     path="$complete"
15966     arguments="EOL"
15967     new_path="$path"
15968 
15969   windows_path="$new_path"
15970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15971     unix_path=`$CYGPATH -u "$windows_path"`
15972     new_path="$unix_path"
15973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15975     new_path="$unix_path"
15976   fi
15977 
15978 
15979     new_path=`$WHICH "$new_path" 2> /dev/null`
15980     # bat and cmd files are not always considered executable in MSYS causing which
15981     # to not find them
15982     if test "x$new_path" = x \
15983         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15984         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15985       new_path="$path"
15986 
15987   windows_path="$new_path"
15988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15989     unix_path=`$CYGPATH -u "$windows_path"`
15990     new_path="$unix_path"
15991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15993     new_path="$unix_path"
15994   fi
15995 
15996     fi
15997 
15998     if test "x$new_path" = x; then
15999       # It's still not found. Now this is an unrecoverable error.
16000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16001 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16002       has_space=`$ECHO "$complete" | $GREP " "`
16003       if test "x$has_space" != x; then
16004         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16006       fi
16007       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16008     fi
16009   fi
16010 
16011   # Now new_path has a complete unix path to the binary
16012   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16013     # Keep paths in /bin as-is, but remove trailing .exe if any
16014     new_path="${new_path/%.exe/}"
16015     # Do not save /bin paths to all_fixpath_prefixes!
16016   else
16017     # Not in mixed or Windows style, start by that.
16018     new_path=`cmd //c echo $new_path`
16019 
16020   input_path="$new_path"
16021   # Check if we need to convert this using DOS-style short mode. If the path
16022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16023   # take no chances and rewrite it.
16024   # Note: m4 eats our [], so we need to use [ and ] instead.
16025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16026   if test "x$has_forbidden_chars" != x; then
16027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16028     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16029   fi
16030 
16031     # Output is in $new_path
16032 
16033   windows_path="$new_path"
16034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16035     unix_path=`$CYGPATH -u "$windows_path"`
16036     new_path="$unix_path"
16037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16039     new_path="$unix_path"
16040   fi
16041 
16042     # remove trailing .exe if any
16043     new_path="${new_path/%.exe/}"
16044 
16045     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16046     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16047   fi
16048 
16049   else
16050     # We're on a unix platform. Hooray! :)
16051     # First separate the path from the arguments. This will split at the first
16052     # space.
16053     complete="$FOUND_MAKE"
16054     path="${complete%% *}"
16055     tmp="$complete EOL"
16056     arguments="${tmp#* }"
16057 
16058     # Cannot rely on the command "which" here since it doesn't always work.
16059     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16060     if test -z "$is_absolute_path"; then
16061       # Path to executable is not absolute. Find it.
16062       IFS_save="$IFS"
16063       IFS=:
16064       for p in $PATH; do
16065         if test -f "$p/$path" && test -x "$p/$path"; then
16066           new_path="$p/$path"
16067           break
16068         fi
16069       done
16070       IFS="$IFS_save"
16071     else
16072       # This is an absolute path, we can use it without further modifications.
16073       new_path="$path"
16074     fi
16075 
16076     if test "x$new_path" = x; then
16077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16078 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16079       has_space=`$ECHO "$complete" | $GREP " "`
16080       if test "x$has_space" != x; then
16081         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16082 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16083       fi
16084       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16085     fi
16086   fi
16087 
16088   # Now join together the path and the arguments once again
16089   if test "x$arguments" != xEOL; then
16090     new_complete="$new_path ${arguments% *}"
16091   else
16092     new_complete="$new_path"
16093   fi
16094 
16095   if test "x$complete" != "x$new_complete"; then
16096     FOUND_MAKE="$new_complete"
16097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16098 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16099   fi
16100 
16101         fi
16102       fi
16103     fi
16104   fi
16105 
16106 
16107     if test "x$FOUND_MAKE" = x; then
16108       for ac_prog in make
16109 do
16110   # Extract the first word of "$ac_prog", so it can be a program name with args.
16111 set dummy $ac_prog; ac_word=$2
16112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16113 $as_echo_n "checking for $ac_word... " >&6; }
16114 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16115   $as_echo_n "(cached) " >&6
16116 else
16117   case $CHECK_MAKE in
16118   [\\/]* | ?:[\\/]*)
16119   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16120   ;;
16121   *)
16122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16123 for as_dir in $PATH
16124 do
16125   IFS=$as_save_IFS
16126   test -z "$as_dir" && as_dir=.
16127     for ac_exec_ext in '' $ac_executable_extensions; do
16128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16129     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16131     break 2
16132   fi
16133 done
16134   done
16135 IFS=$as_save_IFS
16136 
16137   ;;
16138 esac
16139 fi
16140 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16141 if test -n "$CHECK_MAKE"; then
16142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16143 $as_echo "$CHECK_MAKE" >&6; }
16144 else
16145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16146 $as_echo "no" >&6; }
16147 fi
16148 
16149 
16150   test -n "$CHECK_MAKE" && break
16151 done
16152 
16153 
16154   MAKE_CANDIDATE=""$CHECK_MAKE""
16155   DESCRIPTION="make in PATH"
16156   if test "x$MAKE_CANDIDATE" != x; then
16157     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16158 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16159     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16160     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16161     if test "x$IS_GNU_MAKE" = x; then
16162       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16163 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16164     else
16165       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16166       if test "x$IS_MODERN_MAKE" = x; then
16167         { $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
16168 $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;}
16169       else
16170         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16171           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16172             MAKE_EXPECTED_ENV='cygwin'
16173           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16174             MAKE_EXPECTED_ENV='msys'
16175           else
16176             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16177           fi
16178           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16179           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16180         else
16181           # Not relevant for non-Windows
16182           IS_MAKE_CORRECT_ENV=true
16183         fi
16184         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16185           { $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
16186 $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;}
16187         else
16188           FOUND_MAKE=$MAKE_CANDIDATE
16189 
16190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16191 
16192   # First separate the path from the arguments. This will split at the first
16193   # space.
16194   complete="$FOUND_MAKE"
16195   path="${complete%% *}"
16196   tmp="$complete EOL"
16197   arguments="${tmp#* }"
16198 
16199   # Input might be given as Windows format, start by converting to
16200   # unix format.
16201   new_path=`$CYGPATH -u "$path"`
16202 
16203   # Now try to locate executable using which
16204   new_path=`$WHICH "$new_path" 2> /dev/null`
16205   # bat and cmd files are not always considered executable in cygwin causing which
16206   # to not find them
16207   if test "x$new_path" = x \
16208       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16209       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16210     new_path=`$CYGPATH -u "$path"`
16211   fi
16212   if test "x$new_path" = x; then
16213     # Oops. Which didn't find the executable.
16214     # The splitting of arguments from the executable at a space might have been incorrect,
16215     # since paths with space are more likely in Windows. Give it another try with the whole
16216     # argument.
16217     path="$complete"
16218     arguments="EOL"
16219     new_path=`$CYGPATH -u "$path"`
16220     new_path=`$WHICH "$new_path" 2> /dev/null`
16221     # bat and cmd files are not always considered executable in cygwin causing which
16222     # to not find them
16223     if test "x$new_path" = x \
16224         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16225         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16226       new_path=`$CYGPATH -u "$path"`
16227     fi
16228     if test "x$new_path" = x; then
16229       # It's still not found. Now this is an unrecoverable error.
16230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16231 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16232       has_space=`$ECHO "$complete" | $GREP " "`
16233       if test "x$has_space" != x; then
16234         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16235 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16236       fi
16237       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16238     fi
16239   fi
16240 
16241   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16242   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16243   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16244   # "foo.exe" is OK but "foo" is an error.
16245   #
16246   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16247   # It is also a way to make sure we got the proper file name for the real test later on.
16248   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16249   if test "x$test_shortpath" = x; then
16250     # Short path failed, file does not exist as specified.
16251     # Try adding .exe or .cmd
16252     if test -f "${new_path}.exe"; then
16253       input_to_shortpath="${new_path}.exe"
16254     elif test -f "${new_path}.cmd"; then
16255       input_to_shortpath="${new_path}.cmd"
16256     else
16257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16258 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16259       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16260 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16261       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16262     fi
16263   else
16264     input_to_shortpath="$new_path"
16265   fi
16266 
16267   # Call helper function which possibly converts this using DOS-style short mode.
16268   # If so, the updated path is stored in $new_path.
16269   new_path="$input_to_shortpath"
16270 
16271   input_path="$input_to_shortpath"
16272   # Check if we need to convert this using DOS-style short mode. If the path
16273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16274   # take no chances and rewrite it.
16275   # Note: m4 eats our [], so we need to use [ and ] instead.
16276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16277   if test "x$has_forbidden_chars" != x; then
16278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16279     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16280     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16281     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16282       # Going to short mode and back again did indeed matter. Since short mode is
16283       # case insensitive, let's make it lowercase to improve readability.
16284       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16285       # Now convert it back to Unix-stile (cygpath)
16286       input_path=`$CYGPATH -u "$shortmode_path"`
16287       new_path="$input_path"
16288     fi
16289   fi
16290 
16291   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16292   if test "x$test_cygdrive_prefix" = x; then
16293     # As a simple fix, exclude /usr/bin since it's not a real path.
16294     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16295       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16296       # a path prefixed by /cygdrive for fixpath to work.
16297       new_path="$CYGWIN_ROOT_PATH$input_path"
16298     fi
16299   fi
16300 
16301   # remove trailing .exe if any
16302   new_path="${new_path/%.exe/}"
16303 
16304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16305 
16306   # First separate the path from the arguments. This will split at the first
16307   # space.
16308   complete="$FOUND_MAKE"
16309   path="${complete%% *}"
16310   tmp="$complete EOL"
16311   arguments="${tmp#* }"
16312 
16313   # Input might be given as Windows format, start by converting to
16314   # unix format.
16315   new_path="$path"
16316 
16317   windows_path="$new_path"
16318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16319     unix_path=`$CYGPATH -u "$windows_path"`
16320     new_path="$unix_path"
16321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16323     new_path="$unix_path"
16324   fi
16325 
16326 
16327   # Now try to locate executable using which
16328   new_path=`$WHICH "$new_path" 2> /dev/null`
16329 
16330   if test "x$new_path" = x; then
16331     # Oops. Which didn't find the executable.
16332     # The splitting of arguments from the executable at a space might have been incorrect,
16333     # since paths with space are more likely in Windows. Give it another try with the whole
16334     # argument.
16335     path="$complete"
16336     arguments="EOL"
16337     new_path="$path"
16338 
16339   windows_path="$new_path"
16340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16341     unix_path=`$CYGPATH -u "$windows_path"`
16342     new_path="$unix_path"
16343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16345     new_path="$unix_path"
16346   fi
16347 
16348 
16349     new_path=`$WHICH "$new_path" 2> /dev/null`
16350     # bat and cmd files are not always considered executable in MSYS causing which
16351     # to not find them
16352     if test "x$new_path" = x \
16353         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16354         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16355       new_path="$path"
16356 
16357   windows_path="$new_path"
16358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16359     unix_path=`$CYGPATH -u "$windows_path"`
16360     new_path="$unix_path"
16361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16363     new_path="$unix_path"
16364   fi
16365 
16366     fi
16367 
16368     if test "x$new_path" = x; then
16369       # It's still not found. Now this is an unrecoverable error.
16370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16371 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16372       has_space=`$ECHO "$complete" | $GREP " "`
16373       if test "x$has_space" != x; then
16374         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16375 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16376       fi
16377       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16378     fi
16379   fi
16380 
16381   # Now new_path has a complete unix path to the binary
16382   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16383     # Keep paths in /bin as-is, but remove trailing .exe if any
16384     new_path="${new_path/%.exe/}"
16385     # Do not save /bin paths to all_fixpath_prefixes!
16386   else
16387     # Not in mixed or Windows style, start by that.
16388     new_path=`cmd //c echo $new_path`
16389 
16390   input_path="$new_path"
16391   # Check if we need to convert this using DOS-style short mode. If the path
16392   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16393   # take no chances and rewrite it.
16394   # Note: m4 eats our [], so we need to use [ and ] instead.
16395   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16396   if test "x$has_forbidden_chars" != x; then
16397     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16398     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16399   fi
16400 
16401     # Output is in $new_path
16402 
16403   windows_path="$new_path"
16404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16405     unix_path=`$CYGPATH -u "$windows_path"`
16406     new_path="$unix_path"
16407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16409     new_path="$unix_path"
16410   fi
16411 
16412     # remove trailing .exe if any
16413     new_path="${new_path/%.exe/}"
16414 
16415     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16416     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16417   fi
16418 
16419   else
16420     # We're on a unix platform. Hooray! :)
16421     # First separate the path from the arguments. This will split at the first
16422     # space.
16423     complete="$FOUND_MAKE"
16424     path="${complete%% *}"
16425     tmp="$complete EOL"
16426     arguments="${tmp#* }"
16427 
16428     # Cannot rely on the command "which" here since it doesn't always work.
16429     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16430     if test -z "$is_absolute_path"; then
16431       # Path to executable is not absolute. Find it.
16432       IFS_save="$IFS"
16433       IFS=:
16434       for p in $PATH; do
16435         if test -f "$p/$path" && test -x "$p/$path"; then
16436           new_path="$p/$path"
16437           break
16438         fi
16439       done
16440       IFS="$IFS_save"
16441     else
16442       # This is an absolute path, we can use it without further modifications.
16443       new_path="$path"
16444     fi
16445 
16446     if test "x$new_path" = x; then
16447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16448 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16449       has_space=`$ECHO "$complete" | $GREP " "`
16450       if test "x$has_space" != x; then
16451         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16452 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16453       fi
16454       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16455     fi
16456   fi
16457 
16458   # Now join together the path and the arguments once again
16459   if test "x$arguments" != xEOL; then
16460     new_complete="$new_path ${arguments% *}"
16461   else
16462     new_complete="$new_path"
16463   fi
16464 
16465   if test "x$complete" != "x$new_complete"; then
16466     FOUND_MAKE="$new_complete"
16467     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16468 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16469   fi
16470 
16471         fi
16472       fi
16473     fi
16474   fi
16475 
16476     fi
16477 
16478     if test "x$FOUND_MAKE" = x; then
16479       if test "x$TOOLCHAIN_PATH" != x; then
16480         # We have a toolchain path, check that as well before giving up.
16481         OLD_PATH=$PATH
16482         PATH=$TOOLCHAIN_PATH:$PATH
16483         for ac_prog in gmake
16484 do
16485   # Extract the first word of "$ac_prog", so it can be a program name with args.
16486 set dummy $ac_prog; ac_word=$2
16487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16488 $as_echo_n "checking for $ac_word... " >&6; }
16489 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16490   $as_echo_n "(cached) " >&6
16491 else
16492   case $CHECK_TOOLSDIR_GMAKE in
16493   [\\/]* | ?:[\\/]*)
16494   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16495   ;;
16496   *)
16497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16498 for as_dir in $PATH
16499 do
16500   IFS=$as_save_IFS
16501   test -z "$as_dir" && as_dir=.
16502     for ac_exec_ext in '' $ac_executable_extensions; do
16503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16504     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16506     break 2
16507   fi
16508 done
16509   done
16510 IFS=$as_save_IFS
16511 
16512   ;;
16513 esac
16514 fi
16515 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16516 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16518 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16519 else
16520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16521 $as_echo "no" >&6; }
16522 fi
16523 
16524 
16525   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16526 done
16527 
16528 
16529   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16530   DESCRIPTION="gmake in tools-dir"
16531   if test "x$MAKE_CANDIDATE" != x; then
16532     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16533 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16534     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16535     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16536     if test "x$IS_GNU_MAKE" = x; then
16537       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16538 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16539     else
16540       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16541       if test "x$IS_MODERN_MAKE" = x; then
16542         { $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
16543 $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;}
16544       else
16545         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16546           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16547             MAKE_EXPECTED_ENV='cygwin'
16548           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16549             MAKE_EXPECTED_ENV='msys'
16550           else
16551             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16552           fi
16553           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16554           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16555         else
16556           # Not relevant for non-Windows
16557           IS_MAKE_CORRECT_ENV=true
16558         fi
16559         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16560           { $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
16561 $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;}
16562         else
16563           FOUND_MAKE=$MAKE_CANDIDATE
16564 
16565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16566 
16567   # First separate the path from the arguments. This will split at the first
16568   # space.
16569   complete="$FOUND_MAKE"
16570   path="${complete%% *}"
16571   tmp="$complete EOL"
16572   arguments="${tmp#* }"
16573 
16574   # Input might be given as Windows format, start by converting to
16575   # unix format.
16576   new_path=`$CYGPATH -u "$path"`
16577 
16578   # Now try to locate executable using which
16579   new_path=`$WHICH "$new_path" 2> /dev/null`
16580   # bat and cmd files are not always considered executable in cygwin causing which
16581   # to not find them
16582   if test "x$new_path" = x \
16583       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16584       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16585     new_path=`$CYGPATH -u "$path"`
16586   fi
16587   if test "x$new_path" = x; then
16588     # Oops. Which didn't find the executable.
16589     # The splitting of arguments from the executable at a space might have been incorrect,
16590     # since paths with space are more likely in Windows. Give it another try with the whole
16591     # argument.
16592     path="$complete"
16593     arguments="EOL"
16594     new_path=`$CYGPATH -u "$path"`
16595     new_path=`$WHICH "$new_path" 2> /dev/null`
16596     # bat and cmd files are not always considered executable in cygwin causing which
16597     # to not find them
16598     if test "x$new_path" = x \
16599         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16600         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16601       new_path=`$CYGPATH -u "$path"`
16602     fi
16603     if test "x$new_path" = x; then
16604       # It's still not found. Now this is an unrecoverable error.
16605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16606 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16607       has_space=`$ECHO "$complete" | $GREP " "`
16608       if test "x$has_space" != x; then
16609         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16610 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16611       fi
16612       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16613     fi
16614   fi
16615 
16616   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16617   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16618   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16619   # "foo.exe" is OK but "foo" is an error.
16620   #
16621   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16622   # It is also a way to make sure we got the proper file name for the real test later on.
16623   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16624   if test "x$test_shortpath" = x; then
16625     # Short path failed, file does not exist as specified.
16626     # Try adding .exe or .cmd
16627     if test -f "${new_path}.exe"; then
16628       input_to_shortpath="${new_path}.exe"
16629     elif test -f "${new_path}.cmd"; then
16630       input_to_shortpath="${new_path}.cmd"
16631     else
16632       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16633 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16634       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16635 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16636       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16637     fi
16638   else
16639     input_to_shortpath="$new_path"
16640   fi
16641 
16642   # Call helper function which possibly converts this using DOS-style short mode.
16643   # If so, the updated path is stored in $new_path.
16644   new_path="$input_to_shortpath"
16645 
16646   input_path="$input_to_shortpath"
16647   # Check if we need to convert this using DOS-style short mode. If the path
16648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16649   # take no chances and rewrite it.
16650   # Note: m4 eats our [], so we need to use [ and ] instead.
16651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16652   if test "x$has_forbidden_chars" != x; then
16653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16654     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16655     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16656     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16657       # Going to short mode and back again did indeed matter. Since short mode is
16658       # case insensitive, let's make it lowercase to improve readability.
16659       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16660       # Now convert it back to Unix-stile (cygpath)
16661       input_path=`$CYGPATH -u "$shortmode_path"`
16662       new_path="$input_path"
16663     fi
16664   fi
16665 
16666   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16667   if test "x$test_cygdrive_prefix" = x; then
16668     # As a simple fix, exclude /usr/bin since it's not a real path.
16669     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16670       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16671       # a path prefixed by /cygdrive for fixpath to work.
16672       new_path="$CYGWIN_ROOT_PATH$input_path"
16673     fi
16674   fi
16675 
16676   # remove trailing .exe if any
16677   new_path="${new_path/%.exe/}"
16678 
16679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16680 
16681   # First separate the path from the arguments. This will split at the first
16682   # space.
16683   complete="$FOUND_MAKE"
16684   path="${complete%% *}"
16685   tmp="$complete EOL"
16686   arguments="${tmp#* }"
16687 
16688   # Input might be given as Windows format, start by converting to
16689   # unix format.
16690   new_path="$path"
16691 
16692   windows_path="$new_path"
16693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16694     unix_path=`$CYGPATH -u "$windows_path"`
16695     new_path="$unix_path"
16696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16698     new_path="$unix_path"
16699   fi
16700 
16701 
16702   # Now try to locate executable using which
16703   new_path=`$WHICH "$new_path" 2> /dev/null`
16704 
16705   if test "x$new_path" = x; then
16706     # Oops. Which didn't find the executable.
16707     # The splitting of arguments from the executable at a space might have been incorrect,
16708     # since paths with space are more likely in Windows. Give it another try with the whole
16709     # argument.
16710     path="$complete"
16711     arguments="EOL"
16712     new_path="$path"
16713 
16714   windows_path="$new_path"
16715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16716     unix_path=`$CYGPATH -u "$windows_path"`
16717     new_path="$unix_path"
16718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16720     new_path="$unix_path"
16721   fi
16722 
16723 
16724     new_path=`$WHICH "$new_path" 2> /dev/null`
16725     # bat and cmd files are not always considered executable in MSYS causing which
16726     # to not find them
16727     if test "x$new_path" = x \
16728         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16729         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16730       new_path="$path"
16731 
16732   windows_path="$new_path"
16733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16734     unix_path=`$CYGPATH -u "$windows_path"`
16735     new_path="$unix_path"
16736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16738     new_path="$unix_path"
16739   fi
16740 
16741     fi
16742 
16743     if test "x$new_path" = x; then
16744       # It's still not found. Now this is an unrecoverable error.
16745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16746 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16747       has_space=`$ECHO "$complete" | $GREP " "`
16748       if test "x$has_space" != x; then
16749         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16750 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16751       fi
16752       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16753     fi
16754   fi
16755 
16756   # Now new_path has a complete unix path to the binary
16757   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16758     # Keep paths in /bin as-is, but remove trailing .exe if any
16759     new_path="${new_path/%.exe/}"
16760     # Do not save /bin paths to all_fixpath_prefixes!
16761   else
16762     # Not in mixed or Windows style, start by that.
16763     new_path=`cmd //c echo $new_path`
16764 
16765   input_path="$new_path"
16766   # Check if we need to convert this using DOS-style short mode. If the path
16767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16768   # take no chances and rewrite it.
16769   # Note: m4 eats our [], so we need to use [ and ] instead.
16770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16771   if test "x$has_forbidden_chars" != x; then
16772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16773     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16774   fi
16775 
16776     # Output is in $new_path
16777 
16778   windows_path="$new_path"
16779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16780     unix_path=`$CYGPATH -u "$windows_path"`
16781     new_path="$unix_path"
16782   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16783     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16784     new_path="$unix_path"
16785   fi
16786 
16787     # remove trailing .exe if any
16788     new_path="${new_path/%.exe/}"
16789 
16790     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16791     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16792   fi
16793 
16794   else
16795     # We're on a unix platform. Hooray! :)
16796     # First separate the path from the arguments. This will split at the first
16797     # space.
16798     complete="$FOUND_MAKE"
16799     path="${complete%% *}"
16800     tmp="$complete EOL"
16801     arguments="${tmp#* }"
16802 
16803     # Cannot rely on the command "which" here since it doesn't always work.
16804     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16805     if test -z "$is_absolute_path"; then
16806       # Path to executable is not absolute. Find it.
16807       IFS_save="$IFS"
16808       IFS=:
16809       for p in $PATH; do
16810         if test -f "$p/$path" && test -x "$p/$path"; then
16811           new_path="$p/$path"
16812           break
16813         fi
16814       done
16815       IFS="$IFS_save"
16816     else
16817       # This is an absolute path, we can use it without further modifications.
16818       new_path="$path"
16819     fi
16820 
16821     if test "x$new_path" = x; then
16822       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16823 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16824       has_space=`$ECHO "$complete" | $GREP " "`
16825       if test "x$has_space" != x; then
16826         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16827 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16828       fi
16829       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16830     fi
16831   fi
16832 
16833   # Now join together the path and the arguments once again
16834   if test "x$arguments" != xEOL; then
16835     new_complete="$new_path ${arguments% *}"
16836   else
16837     new_complete="$new_path"
16838   fi
16839 
16840   if test "x$complete" != "x$new_complete"; then
16841     FOUND_MAKE="$new_complete"
16842     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16843 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16844   fi
16845 
16846         fi
16847       fi
16848     fi
16849   fi
16850 
16851         if test "x$FOUND_MAKE" = x; then
16852           for ac_prog in make
16853 do
16854   # Extract the first word of "$ac_prog", so it can be a program name with args.
16855 set dummy $ac_prog; ac_word=$2
16856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16857 $as_echo_n "checking for $ac_word... " >&6; }
16858 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16859   $as_echo_n "(cached) " >&6
16860 else
16861   case $CHECK_TOOLSDIR_MAKE in
16862   [\\/]* | ?:[\\/]*)
16863   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16864   ;;
16865   *)
16866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16867 for as_dir in $PATH
16868 do
16869   IFS=$as_save_IFS
16870   test -z "$as_dir" && as_dir=.
16871     for ac_exec_ext in '' $ac_executable_extensions; do
16872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16873     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16875     break 2
16876   fi
16877 done
16878   done
16879 IFS=$as_save_IFS
16880 
16881   ;;
16882 esac
16883 fi
16884 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16885 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16887 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16888 else
16889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16890 $as_echo "no" >&6; }
16891 fi
16892 
16893 
16894   test -n "$CHECK_TOOLSDIR_MAKE" && break
16895 done
16896 
16897 
16898   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16899   DESCRIPTION="make in tools-dir"
16900   if test "x$MAKE_CANDIDATE" != x; then
16901     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16902 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16903     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16904     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16905     if test "x$IS_GNU_MAKE" = x; then
16906       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16907 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16908     else
16909       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16910       if test "x$IS_MODERN_MAKE" = x; then
16911         { $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
16912 $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;}
16913       else
16914         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16915           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16916             MAKE_EXPECTED_ENV='cygwin'
16917           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16918             MAKE_EXPECTED_ENV='msys'
16919           else
16920             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16921           fi
16922           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16923           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16924         else
16925           # Not relevant for non-Windows
16926           IS_MAKE_CORRECT_ENV=true
16927         fi
16928         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16929           { $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
16930 $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;}
16931         else
16932           FOUND_MAKE=$MAKE_CANDIDATE
16933 
16934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16935 
16936   # First separate the path from the arguments. This will split at the first
16937   # space.
16938   complete="$FOUND_MAKE"
16939   path="${complete%% *}"
16940   tmp="$complete EOL"
16941   arguments="${tmp#* }"
16942 
16943   # Input might be given as Windows format, start by converting to
16944   # unix format.
16945   new_path=`$CYGPATH -u "$path"`
16946 
16947   # Now try to locate executable using which
16948   new_path=`$WHICH "$new_path" 2> /dev/null`
16949   # bat and cmd files are not always considered executable in cygwin causing which
16950   # to not find them
16951   if test "x$new_path" = x \
16952       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16953       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16954     new_path=`$CYGPATH -u "$path"`
16955   fi
16956   if test "x$new_path" = x; then
16957     # Oops. Which didn't find the executable.
16958     # The splitting of arguments from the executable at a space might have been incorrect,
16959     # since paths with space are more likely in Windows. Give it another try with the whole
16960     # argument.
16961     path="$complete"
16962     arguments="EOL"
16963     new_path=`$CYGPATH -u "$path"`
16964     new_path=`$WHICH "$new_path" 2> /dev/null`
16965     # bat and cmd files are not always considered executable in cygwin causing which
16966     # to not find them
16967     if test "x$new_path" = x \
16968         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16969         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16970       new_path=`$CYGPATH -u "$path"`
16971     fi
16972     if test "x$new_path" = x; then
16973       # It's still not found. Now this is an unrecoverable error.
16974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16975 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16976       has_space=`$ECHO "$complete" | $GREP " "`
16977       if test "x$has_space" != x; then
16978         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16979 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16980       fi
16981       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16982     fi
16983   fi
16984 
16985   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16986   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16987   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16988   # "foo.exe" is OK but "foo" is an error.
16989   #
16990   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16991   # It is also a way to make sure we got the proper file name for the real test later on.
16992   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16993   if test "x$test_shortpath" = x; then
16994     # Short path failed, file does not exist as specified.
16995     # Try adding .exe or .cmd
16996     if test -f "${new_path}.exe"; then
16997       input_to_shortpath="${new_path}.exe"
16998     elif test -f "${new_path}.cmd"; then
16999       input_to_shortpath="${new_path}.cmd"
17000     else
17001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17002 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17003       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17004 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17005       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17006     fi
17007   else
17008     input_to_shortpath="$new_path"
17009   fi
17010 
17011   # Call helper function which possibly converts this using DOS-style short mode.
17012   # If so, the updated path is stored in $new_path.
17013   new_path="$input_to_shortpath"
17014 
17015   input_path="$input_to_shortpath"
17016   # Check if we need to convert this using DOS-style short mode. If the path
17017   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17018   # take no chances and rewrite it.
17019   # Note: m4 eats our [], so we need to use [ and ] instead.
17020   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17021   if test "x$has_forbidden_chars" != x; then
17022     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17023     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17024     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17025     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17026       # Going to short mode and back again did indeed matter. Since short mode is
17027       # case insensitive, let's make it lowercase to improve readability.
17028       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17029       # Now convert it back to Unix-stile (cygpath)
17030       input_path=`$CYGPATH -u "$shortmode_path"`
17031       new_path="$input_path"
17032     fi
17033   fi
17034 
17035   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17036   if test "x$test_cygdrive_prefix" = x; then
17037     # As a simple fix, exclude /usr/bin since it's not a real path.
17038     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17039       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17040       # a path prefixed by /cygdrive for fixpath to work.
17041       new_path="$CYGWIN_ROOT_PATH$input_path"
17042     fi
17043   fi
17044 
17045   # remove trailing .exe if any
17046   new_path="${new_path/%.exe/}"
17047 
17048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17049 
17050   # First separate the path from the arguments. This will split at the first
17051   # space.
17052   complete="$FOUND_MAKE"
17053   path="${complete%% *}"
17054   tmp="$complete EOL"
17055   arguments="${tmp#* }"
17056 
17057   # Input might be given as Windows format, start by converting to
17058   # unix format.
17059   new_path="$path"
17060 
17061   windows_path="$new_path"
17062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17063     unix_path=`$CYGPATH -u "$windows_path"`
17064     new_path="$unix_path"
17065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17067     new_path="$unix_path"
17068   fi
17069 
17070 
17071   # Now try to locate executable using which
17072   new_path=`$WHICH "$new_path" 2> /dev/null`
17073 
17074   if test "x$new_path" = x; then
17075     # Oops. Which didn't find the executable.
17076     # The splitting of arguments from the executable at a space might have been incorrect,
17077     # since paths with space are more likely in Windows. Give it another try with the whole
17078     # argument.
17079     path="$complete"
17080     arguments="EOL"
17081     new_path="$path"
17082 
17083   windows_path="$new_path"
17084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17085     unix_path=`$CYGPATH -u "$windows_path"`
17086     new_path="$unix_path"
17087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17089     new_path="$unix_path"
17090   fi
17091 
17092 
17093     new_path=`$WHICH "$new_path" 2> /dev/null`
17094     # bat and cmd files are not always considered executable in MSYS causing which
17095     # to not find them
17096     if test "x$new_path" = x \
17097         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17098         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17099       new_path="$path"
17100 
17101   windows_path="$new_path"
17102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17103     unix_path=`$CYGPATH -u "$windows_path"`
17104     new_path="$unix_path"
17105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17107     new_path="$unix_path"
17108   fi
17109 
17110     fi
17111 
17112     if test "x$new_path" = x; then
17113       # It's still not found. Now this is an unrecoverable error.
17114       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17115 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17116       has_space=`$ECHO "$complete" | $GREP " "`
17117       if test "x$has_space" != x; then
17118         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17119 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17120       fi
17121       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17122     fi
17123   fi
17124 
17125   # Now new_path has a complete unix path to the binary
17126   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17127     # Keep paths in /bin as-is, but remove trailing .exe if any
17128     new_path="${new_path/%.exe/}"
17129     # Do not save /bin paths to all_fixpath_prefixes!
17130   else
17131     # Not in mixed or Windows style, start by that.
17132     new_path=`cmd //c echo $new_path`
17133 
17134   input_path="$new_path"
17135   # Check if we need to convert this using DOS-style short mode. If the path
17136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17137   # take no chances and rewrite it.
17138   # Note: m4 eats our [], so we need to use [ and ] instead.
17139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17140   if test "x$has_forbidden_chars" != x; then
17141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17142     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17143   fi
17144 
17145     # Output is in $new_path
17146 
17147   windows_path="$new_path"
17148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17149     unix_path=`$CYGPATH -u "$windows_path"`
17150     new_path="$unix_path"
17151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17153     new_path="$unix_path"
17154   fi
17155 
17156     # remove trailing .exe if any
17157     new_path="${new_path/%.exe/}"
17158 
17159     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17160     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17161   fi
17162 
17163   else
17164     # We're on a unix platform. Hooray! :)
17165     # First separate the path from the arguments. This will split at the first
17166     # space.
17167     complete="$FOUND_MAKE"
17168     path="${complete%% *}"
17169     tmp="$complete EOL"
17170     arguments="${tmp#* }"
17171 
17172     # Cannot rely on the command "which" here since it doesn't always work.
17173     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17174     if test -z "$is_absolute_path"; then
17175       # Path to executable is not absolute. Find it.
17176       IFS_save="$IFS"
17177       IFS=:
17178       for p in $PATH; do
17179         if test -f "$p/$path" && test -x "$p/$path"; then
17180           new_path="$p/$path"
17181           break
17182         fi
17183       done
17184       IFS="$IFS_save"
17185     else
17186       # This is an absolute path, we can use it without further modifications.
17187       new_path="$path"
17188     fi
17189 
17190     if test "x$new_path" = x; then
17191       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17192 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17193       has_space=`$ECHO "$complete" | $GREP " "`
17194       if test "x$has_space" != x; then
17195         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17196 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17197       fi
17198       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17199     fi
17200   fi
17201 
17202   # Now join together the path and the arguments once again
17203   if test "x$arguments" != xEOL; then
17204     new_complete="$new_path ${arguments% *}"
17205   else
17206     new_complete="$new_path"
17207   fi
17208 
17209   if test "x$complete" != "x$new_complete"; then
17210     FOUND_MAKE="$new_complete"
17211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17212 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17213   fi
17214 
17215         fi
17216       fi
17217     fi
17218   fi
17219 
17220         fi
17221         PATH=$OLD_PATH
17222       fi
17223     fi
17224 
17225     if test "x$FOUND_MAKE" = x; then
17226       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
17227     fi
17228   fi
17229 
17230   MAKE=$FOUND_MAKE
17231 
17232   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17233 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17234 
17235 
17236   # Check if make supports the output sync option and if so, setup using it.
17237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17238 $as_echo_n "checking if make --output-sync is supported... " >&6; }
17239   if $MAKE --version -O > /dev/null 2>&1; then
17240     OUTPUT_SYNC_SUPPORTED=true
17241     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17242 $as_echo "yes" >&6; }
17243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17244 $as_echo_n "checking for output-sync value... " >&6; }
17245 
17246 # Check whether --with-output-sync was given.
17247 if test "${with_output_sync+set}" = set; then :
17248   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17249 fi
17250 
17251     if test "x$OUTPUT_SYNC" = "x"; then
17252       OUTPUT_SYNC=none
17253     fi
17254     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17255 $as_echo "$OUTPUT_SYNC" >&6; }
17256     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17257       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17258     fi
17259   else
17260     OUTPUT_SYNC_SUPPORTED=false
17261     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17262 $as_echo "no" >&6; }
17263   fi
17264 
17265 
17266 
17267 
17268 
17269 
17270   # Test if find supports -delete
17271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17272 $as_echo_n "checking if find supports -delete... " >&6; }
17273   FIND_DELETE="-delete"
17274 
17275   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17276 
17277   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17278 
17279   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17280   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17281     # No, it does not.
17282     rm $DELETEDIR/TestIfFindSupportsDelete
17283     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17284       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17285       FIND_DELETE="-print | xargs rm"
17286     else
17287       FIND_DELETE="-exec rm \{\} \+"
17288     fi
17289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17290 $as_echo "no" >&6; }
17291   else
17292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17293 $as_echo "yes" >&6; }
17294   fi
17295   rmdir $DELETEDIR
17296 
17297 
17298 
17299   # These tools might not be installed by default,
17300   # need hint on how to install them.
17301 
17302 
17303 
17304   # Publish this variable in the help.
17305 
17306 
17307   if test "x$UNZIP" = x; then
17308     # The variable is not set by user, try to locate tool using the code snippet
17309     for ac_prog in unzip
17310 do
17311   # Extract the first word of "$ac_prog", so it can be a program name with args.
17312 set dummy $ac_prog; ac_word=$2
17313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17314 $as_echo_n "checking for $ac_word... " >&6; }
17315 if ${ac_cv_path_UNZIP+:} false; then :
17316   $as_echo_n "(cached) " >&6
17317 else
17318   case $UNZIP in
17319   [\\/]* | ?:[\\/]*)
17320   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17321   ;;
17322   *)
17323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17324 for as_dir in $PATH
17325 do
17326   IFS=$as_save_IFS
17327   test -z "$as_dir" && as_dir=.
17328     for ac_exec_ext in '' $ac_executable_extensions; do
17329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17330     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17332     break 2
17333   fi
17334 done
17335   done
17336 IFS=$as_save_IFS
17337 
17338   ;;
17339 esac
17340 fi
17341 UNZIP=$ac_cv_path_UNZIP
17342 if test -n "$UNZIP"; then
17343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17344 $as_echo "$UNZIP" >&6; }
17345 else
17346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17347 $as_echo "no" >&6; }
17348 fi
17349 
17350 
17351   test -n "$UNZIP" && break
17352 done
17353 
17354   else
17355     # The variable is set, but is it from the command line or the environment?
17356 
17357     # Try to remove the string !UNZIP! from our list.
17358     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17359     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17360       # If it failed, the variable was not from the command line. Ignore it,
17361       # but warn the user (except for BASH, which is always set by the calling BASH).
17362       if test "xUNZIP" != xBASH; then
17363         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17364 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17365       fi
17366       # Try to locate tool using the code snippet
17367       for ac_prog in unzip
17368 do
17369   # Extract the first word of "$ac_prog", so it can be a program name with args.
17370 set dummy $ac_prog; ac_word=$2
17371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17372 $as_echo_n "checking for $ac_word... " >&6; }
17373 if ${ac_cv_path_UNZIP+:} false; then :
17374   $as_echo_n "(cached) " >&6
17375 else
17376   case $UNZIP in
17377   [\\/]* | ?:[\\/]*)
17378   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17379   ;;
17380   *)
17381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17382 for as_dir in $PATH
17383 do
17384   IFS=$as_save_IFS
17385   test -z "$as_dir" && as_dir=.
17386     for ac_exec_ext in '' $ac_executable_extensions; do
17387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17388     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17390     break 2
17391   fi
17392 done
17393   done
17394 IFS=$as_save_IFS
17395 
17396   ;;
17397 esac
17398 fi
17399 UNZIP=$ac_cv_path_UNZIP
17400 if test -n "$UNZIP"; then
17401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17402 $as_echo "$UNZIP" >&6; }
17403 else
17404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17405 $as_echo "no" >&6; }
17406 fi
17407 
17408 
17409   test -n "$UNZIP" && break
17410 done
17411 
17412     else
17413       # If it succeeded, then it was overridden by the user. We will use it
17414       # for the tool.
17415 
17416       # First remove it from the list of overridden variables, so we can test
17417       # for unknown variables in the end.
17418       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17419 
17420       # Check if the provided tool contains a complete path.
17421       tool_specified="$UNZIP"
17422       tool_basename="${tool_specified##*/}"
17423       if test "x$tool_basename" = "x$tool_specified"; then
17424         # A command without a complete path is provided, search $PATH.
17425         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17426 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17427         # Extract the first word of "$tool_basename", so it can be a program name with args.
17428 set dummy $tool_basename; ac_word=$2
17429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17430 $as_echo_n "checking for $ac_word... " >&6; }
17431 if ${ac_cv_path_UNZIP+:} false; then :
17432   $as_echo_n "(cached) " >&6
17433 else
17434   case $UNZIP in
17435   [\\/]* | ?:[\\/]*)
17436   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17437   ;;
17438   *)
17439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17440 for as_dir in $PATH
17441 do
17442   IFS=$as_save_IFS
17443   test -z "$as_dir" && as_dir=.
17444     for ac_exec_ext in '' $ac_executable_extensions; do
17445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17446     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17448     break 2
17449   fi
17450 done
17451   done
17452 IFS=$as_save_IFS
17453 
17454   ;;
17455 esac
17456 fi
17457 UNZIP=$ac_cv_path_UNZIP
17458 if test -n "$UNZIP"; then
17459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17460 $as_echo "$UNZIP" >&6; }
17461 else
17462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17463 $as_echo "no" >&6; }
17464 fi
17465 
17466 
17467         if test "x$UNZIP" = x; then
17468           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17469         fi
17470       else
17471         # Otherwise we believe it is a complete path. Use it as it is.
17472         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17473 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17474         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17475 $as_echo_n "checking for UNZIP... " >&6; }
17476         if test ! -x "$tool_specified"; then
17477           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17478 $as_echo "not found" >&6; }
17479           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17480         fi
17481         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17482 $as_echo "$tool_specified" >&6; }
17483       fi
17484     fi
17485   fi
17486 
17487 
17488 
17489   if test "x$UNZIP" = x; then
17490     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17491   fi
17492 
17493 
17494 
17495 
17496 
17497   # Publish this variable in the help.
17498 
17499 
17500   if test "x$ZIP" = x; then
17501     # The variable is not set by user, try to locate tool using the code snippet
17502     for ac_prog in zip
17503 do
17504   # Extract the first word of "$ac_prog", so it can be a program name with args.
17505 set dummy $ac_prog; ac_word=$2
17506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17507 $as_echo_n "checking for $ac_word... " >&6; }
17508 if ${ac_cv_path_ZIP+:} false; then :
17509   $as_echo_n "(cached) " >&6
17510 else
17511   case $ZIP in
17512   [\\/]* | ?:[\\/]*)
17513   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17514   ;;
17515   *)
17516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17517 for as_dir in $PATH
17518 do
17519   IFS=$as_save_IFS
17520   test -z "$as_dir" && as_dir=.
17521     for ac_exec_ext in '' $ac_executable_extensions; do
17522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17523     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17525     break 2
17526   fi
17527 done
17528   done
17529 IFS=$as_save_IFS
17530 
17531   ;;
17532 esac
17533 fi
17534 ZIP=$ac_cv_path_ZIP
17535 if test -n "$ZIP"; then
17536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17537 $as_echo "$ZIP" >&6; }
17538 else
17539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17540 $as_echo "no" >&6; }
17541 fi
17542 
17543 
17544   test -n "$ZIP" && break
17545 done
17546 
17547   else
17548     # The variable is set, but is it from the command line or the environment?
17549 
17550     # Try to remove the string !ZIP! from our list.
17551     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17552     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17553       # If it failed, the variable was not from the command line. Ignore it,
17554       # but warn the user (except for BASH, which is always set by the calling BASH).
17555       if test "xZIP" != xBASH; then
17556         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17557 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17558       fi
17559       # Try to locate tool using the code snippet
17560       for ac_prog in zip
17561 do
17562   # Extract the first word of "$ac_prog", so it can be a program name with args.
17563 set dummy $ac_prog; ac_word=$2
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17565 $as_echo_n "checking for $ac_word... " >&6; }
17566 if ${ac_cv_path_ZIP+:} false; then :
17567   $as_echo_n "(cached) " >&6
17568 else
17569   case $ZIP in
17570   [\\/]* | ?:[\\/]*)
17571   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17572   ;;
17573   *)
17574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17575 for as_dir in $PATH
17576 do
17577   IFS=$as_save_IFS
17578   test -z "$as_dir" && as_dir=.
17579     for ac_exec_ext in '' $ac_executable_extensions; do
17580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17581     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17583     break 2
17584   fi
17585 done
17586   done
17587 IFS=$as_save_IFS
17588 
17589   ;;
17590 esac
17591 fi
17592 ZIP=$ac_cv_path_ZIP
17593 if test -n "$ZIP"; then
17594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17595 $as_echo "$ZIP" >&6; }
17596 else
17597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17598 $as_echo "no" >&6; }
17599 fi
17600 
17601 
17602   test -n "$ZIP" && break
17603 done
17604 
17605     else
17606       # If it succeeded, then it was overridden by the user. We will use it
17607       # for the tool.
17608 
17609       # First remove it from the list of overridden variables, so we can test
17610       # for unknown variables in the end.
17611       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17612 
17613       # Check if the provided tool contains a complete path.
17614       tool_specified="$ZIP"
17615       tool_basename="${tool_specified##*/}"
17616       if test "x$tool_basename" = "x$tool_specified"; then
17617         # A command without a complete path is provided, search $PATH.
17618         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17619 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17620         # Extract the first word of "$tool_basename", so it can be a program name with args.
17621 set dummy $tool_basename; ac_word=$2
17622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17623 $as_echo_n "checking for $ac_word... " >&6; }
17624 if ${ac_cv_path_ZIP+:} false; then :
17625   $as_echo_n "(cached) " >&6
17626 else
17627   case $ZIP in
17628   [\\/]* | ?:[\\/]*)
17629   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17630   ;;
17631   *)
17632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17633 for as_dir in $PATH
17634 do
17635   IFS=$as_save_IFS
17636   test -z "$as_dir" && as_dir=.
17637     for ac_exec_ext in '' $ac_executable_extensions; do
17638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17639     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17641     break 2
17642   fi
17643 done
17644   done
17645 IFS=$as_save_IFS
17646 
17647   ;;
17648 esac
17649 fi
17650 ZIP=$ac_cv_path_ZIP
17651 if test -n "$ZIP"; then
17652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17653 $as_echo "$ZIP" >&6; }
17654 else
17655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17656 $as_echo "no" >&6; }
17657 fi
17658 
17659 
17660         if test "x$ZIP" = x; then
17661           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17662         fi
17663       else
17664         # Otherwise we believe it is a complete path. Use it as it is.
17665         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17666 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17667         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17668 $as_echo_n "checking for ZIP... " >&6; }
17669         if test ! -x "$tool_specified"; then
17670           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17671 $as_echo "not found" >&6; }
17672           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17673         fi
17674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17675 $as_echo "$tool_specified" >&6; }
17676       fi
17677     fi
17678   fi
17679 
17680 
17681 
17682   if test "x$ZIP" = x; then
17683     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17684   fi
17685 
17686 
17687 
17688   # Non-required basic tools
17689 
17690 
17691 
17692   # Publish this variable in the help.
17693 
17694 
17695   if test "x$LDD" = x; then
17696     # The variable is not set by user, try to locate tool using the code snippet
17697     for ac_prog in ldd
17698 do
17699   # Extract the first word of "$ac_prog", so it can be a program name with args.
17700 set dummy $ac_prog; ac_word=$2
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17702 $as_echo_n "checking for $ac_word... " >&6; }
17703 if ${ac_cv_path_LDD+:} false; then :
17704   $as_echo_n "(cached) " >&6
17705 else
17706   case $LDD in
17707   [\\/]* | ?:[\\/]*)
17708   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17709   ;;
17710   *)
17711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17712 for as_dir in $PATH
17713 do
17714   IFS=$as_save_IFS
17715   test -z "$as_dir" && as_dir=.
17716     for ac_exec_ext in '' $ac_executable_extensions; do
17717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17718     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17720     break 2
17721   fi
17722 done
17723   done
17724 IFS=$as_save_IFS
17725 
17726   ;;
17727 esac
17728 fi
17729 LDD=$ac_cv_path_LDD
17730 if test -n "$LDD"; then
17731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17732 $as_echo "$LDD" >&6; }
17733 else
17734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735 $as_echo "no" >&6; }
17736 fi
17737 
17738 
17739   test -n "$LDD" && break
17740 done
17741 
17742   else
17743     # The variable is set, but is it from the command line or the environment?
17744 
17745     # Try to remove the string !LDD! from our list.
17746     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17747     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17748       # If it failed, the variable was not from the command line. Ignore it,
17749       # but warn the user (except for BASH, which is always set by the calling BASH).
17750       if test "xLDD" != xBASH; then
17751         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17752 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17753       fi
17754       # Try to locate tool using the code snippet
17755       for ac_prog in ldd
17756 do
17757   # Extract the first word of "$ac_prog", so it can be a program name with args.
17758 set dummy $ac_prog; ac_word=$2
17759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17760 $as_echo_n "checking for $ac_word... " >&6; }
17761 if ${ac_cv_path_LDD+:} false; then :
17762   $as_echo_n "(cached) " >&6
17763 else
17764   case $LDD in
17765   [\\/]* | ?:[\\/]*)
17766   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17767   ;;
17768   *)
17769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17770 for as_dir in $PATH
17771 do
17772   IFS=$as_save_IFS
17773   test -z "$as_dir" && as_dir=.
17774     for ac_exec_ext in '' $ac_executable_extensions; do
17775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17776     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17778     break 2
17779   fi
17780 done
17781   done
17782 IFS=$as_save_IFS
17783 
17784   ;;
17785 esac
17786 fi
17787 LDD=$ac_cv_path_LDD
17788 if test -n "$LDD"; then
17789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17790 $as_echo "$LDD" >&6; }
17791 else
17792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17793 $as_echo "no" >&6; }
17794 fi
17795 
17796 
17797   test -n "$LDD" && break
17798 done
17799 
17800     else
17801       # If it succeeded, then it was overridden by the user. We will use it
17802       # for the tool.
17803 
17804       # First remove it from the list of overridden variables, so we can test
17805       # for unknown variables in the end.
17806       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17807 
17808       # Check if the provided tool contains a complete path.
17809       tool_specified="$LDD"
17810       tool_basename="${tool_specified##*/}"
17811       if test "x$tool_basename" = "x$tool_specified"; then
17812         # A command without a complete path is provided, search $PATH.
17813         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17814 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17815         # Extract the first word of "$tool_basename", so it can be a program name with args.
17816 set dummy $tool_basename; ac_word=$2
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17818 $as_echo_n "checking for $ac_word... " >&6; }
17819 if ${ac_cv_path_LDD+:} false; then :
17820   $as_echo_n "(cached) " >&6
17821 else
17822   case $LDD in
17823   [\\/]* | ?:[\\/]*)
17824   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17825   ;;
17826   *)
17827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17828 for as_dir in $PATH
17829 do
17830   IFS=$as_save_IFS
17831   test -z "$as_dir" && as_dir=.
17832     for ac_exec_ext in '' $ac_executable_extensions; do
17833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17834     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17836     break 2
17837   fi
17838 done
17839   done
17840 IFS=$as_save_IFS
17841 
17842   ;;
17843 esac
17844 fi
17845 LDD=$ac_cv_path_LDD
17846 if test -n "$LDD"; then
17847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17848 $as_echo "$LDD" >&6; }
17849 else
17850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17851 $as_echo "no" >&6; }
17852 fi
17853 
17854 
17855         if test "x$LDD" = x; then
17856           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17857         fi
17858       else
17859         # Otherwise we believe it is a complete path. Use it as it is.
17860         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17861 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17862         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17863 $as_echo_n "checking for LDD... " >&6; }
17864         if test ! -x "$tool_specified"; then
17865           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17866 $as_echo "not found" >&6; }
17867           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17868         fi
17869         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17870 $as_echo "$tool_specified" >&6; }
17871       fi
17872     fi
17873   fi
17874 
17875 
17876   if test "x$LDD" = "x"; then
17877     # List shared lib dependencies is used for
17878     # debug output and checking for forbidden dependencies.
17879     # We can build without it.
17880     LDD="true"
17881   fi
17882 
17883 
17884   # Publish this variable in the help.
17885 
17886 
17887   if test "x$OTOOL" = x; then
17888     # The variable is not set by user, try to locate tool using the code snippet
17889     for ac_prog in otool
17890 do
17891   # Extract the first word of "$ac_prog", so it can be a program name with args.
17892 set dummy $ac_prog; ac_word=$2
17893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17894 $as_echo_n "checking for $ac_word... " >&6; }
17895 if ${ac_cv_path_OTOOL+:} false; then :
17896   $as_echo_n "(cached) " >&6
17897 else
17898   case $OTOOL in
17899   [\\/]* | ?:[\\/]*)
17900   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17901   ;;
17902   *)
17903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17904 for as_dir in $PATH
17905 do
17906   IFS=$as_save_IFS
17907   test -z "$as_dir" && as_dir=.
17908     for ac_exec_ext in '' $ac_executable_extensions; do
17909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17910     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17912     break 2
17913   fi
17914 done
17915   done
17916 IFS=$as_save_IFS
17917 
17918   ;;
17919 esac
17920 fi
17921 OTOOL=$ac_cv_path_OTOOL
17922 if test -n "$OTOOL"; then
17923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17924 $as_echo "$OTOOL" >&6; }
17925 else
17926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17927 $as_echo "no" >&6; }
17928 fi
17929 
17930 
17931   test -n "$OTOOL" && break
17932 done
17933 
17934   else
17935     # The variable is set, but is it from the command line or the environment?
17936 
17937     # Try to remove the string !OTOOL! from our list.
17938     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17939     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17940       # If it failed, the variable was not from the command line. Ignore it,
17941       # but warn the user (except for BASH, which is always set by the calling BASH).
17942       if test "xOTOOL" != xBASH; then
17943         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17944 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17945       fi
17946       # Try to locate tool using the code snippet
17947       for ac_prog in otool
17948 do
17949   # Extract the first word of "$ac_prog", so it can be a program name with args.
17950 set dummy $ac_prog; ac_word=$2
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17952 $as_echo_n "checking for $ac_word... " >&6; }
17953 if ${ac_cv_path_OTOOL+:} false; then :
17954   $as_echo_n "(cached) " >&6
17955 else
17956   case $OTOOL in
17957   [\\/]* | ?:[\\/]*)
17958   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17959   ;;
17960   *)
17961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17962 for as_dir in $PATH
17963 do
17964   IFS=$as_save_IFS
17965   test -z "$as_dir" && as_dir=.
17966     for ac_exec_ext in '' $ac_executable_extensions; do
17967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17968     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17970     break 2
17971   fi
17972 done
17973   done
17974 IFS=$as_save_IFS
17975 
17976   ;;
17977 esac
17978 fi
17979 OTOOL=$ac_cv_path_OTOOL
17980 if test -n "$OTOOL"; then
17981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17982 $as_echo "$OTOOL" >&6; }
17983 else
17984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17985 $as_echo "no" >&6; }
17986 fi
17987 
17988 
17989   test -n "$OTOOL" && break
17990 done
17991 
17992     else
17993       # If it succeeded, then it was overridden by the user. We will use it
17994       # for the tool.
17995 
17996       # First remove it from the list of overridden variables, so we can test
17997       # for unknown variables in the end.
17998       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17999 
18000       # Check if the provided tool contains a complete path.
18001       tool_specified="$OTOOL"
18002       tool_basename="${tool_specified##*/}"
18003       if test "x$tool_basename" = "x$tool_specified"; then
18004         # A command without a complete path is provided, search $PATH.
18005         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18006 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18007         # Extract the first word of "$tool_basename", so it can be a program name with args.
18008 set dummy $tool_basename; ac_word=$2
18009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18010 $as_echo_n "checking for $ac_word... " >&6; }
18011 if ${ac_cv_path_OTOOL+:} false; then :
18012   $as_echo_n "(cached) " >&6
18013 else
18014   case $OTOOL in
18015   [\\/]* | ?:[\\/]*)
18016   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18017   ;;
18018   *)
18019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18020 for as_dir in $PATH
18021 do
18022   IFS=$as_save_IFS
18023   test -z "$as_dir" && as_dir=.
18024     for ac_exec_ext in '' $ac_executable_extensions; do
18025   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18026     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18027     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18028     break 2
18029   fi
18030 done
18031   done
18032 IFS=$as_save_IFS
18033 
18034   ;;
18035 esac
18036 fi
18037 OTOOL=$ac_cv_path_OTOOL
18038 if test -n "$OTOOL"; then
18039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18040 $as_echo "$OTOOL" >&6; }
18041 else
18042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18043 $as_echo "no" >&6; }
18044 fi
18045 
18046 
18047         if test "x$OTOOL" = x; then
18048           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18049         fi
18050       else
18051         # Otherwise we believe it is a complete path. Use it as it is.
18052         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18053 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18054         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18055 $as_echo_n "checking for OTOOL... " >&6; }
18056         if test ! -x "$tool_specified"; then
18057           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18058 $as_echo "not found" >&6; }
18059           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18060         fi
18061         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18062 $as_echo "$tool_specified" >&6; }
18063       fi
18064     fi
18065   fi
18066 
18067 
18068   if test "x$OTOOL" = "x"; then
18069     OTOOL="true"
18070   fi
18071 
18072 
18073   # Publish this variable in the help.
18074 
18075 
18076   if test "x$READELF" = x; then
18077     # The variable is not set by user, try to locate tool using the code snippet
18078     for ac_prog in greadelf readelf
18079 do
18080   # Extract the first word of "$ac_prog", so it can be a program name with args.
18081 set dummy $ac_prog; ac_word=$2
18082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18083 $as_echo_n "checking for $ac_word... " >&6; }
18084 if ${ac_cv_path_READELF+:} false; then :
18085   $as_echo_n "(cached) " >&6
18086 else
18087   case $READELF in
18088   [\\/]* | ?:[\\/]*)
18089   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18090   ;;
18091   *)
18092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18093 for as_dir in $PATH
18094 do
18095   IFS=$as_save_IFS
18096   test -z "$as_dir" && as_dir=.
18097     for ac_exec_ext in '' $ac_executable_extensions; do
18098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18099     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18101     break 2
18102   fi
18103 done
18104   done
18105 IFS=$as_save_IFS
18106 
18107   ;;
18108 esac
18109 fi
18110 READELF=$ac_cv_path_READELF
18111 if test -n "$READELF"; then
18112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18113 $as_echo "$READELF" >&6; }
18114 else
18115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18116 $as_echo "no" >&6; }
18117 fi
18118 
18119 
18120   test -n "$READELF" && break
18121 done
18122 
18123   else
18124     # The variable is set, but is it from the command line or the environment?
18125 
18126     # Try to remove the string !READELF! from our list.
18127     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18128     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18129       # If it failed, the variable was not from the command line. Ignore it,
18130       # but warn the user (except for BASH, which is always set by the calling BASH).
18131       if test "xREADELF" != xBASH; then
18132         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18133 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18134       fi
18135       # Try to locate tool using the code snippet
18136       for ac_prog in greadelf readelf
18137 do
18138   # Extract the first word of "$ac_prog", so it can be a program name with args.
18139 set dummy $ac_prog; ac_word=$2
18140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18141 $as_echo_n "checking for $ac_word... " >&6; }
18142 if ${ac_cv_path_READELF+:} false; then :
18143   $as_echo_n "(cached) " >&6
18144 else
18145   case $READELF in
18146   [\\/]* | ?:[\\/]*)
18147   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18148   ;;
18149   *)
18150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18151 for as_dir in $PATH
18152 do
18153   IFS=$as_save_IFS
18154   test -z "$as_dir" && as_dir=.
18155     for ac_exec_ext in '' $ac_executable_extensions; do
18156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18157     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18159     break 2
18160   fi
18161 done
18162   done
18163 IFS=$as_save_IFS
18164 
18165   ;;
18166 esac
18167 fi
18168 READELF=$ac_cv_path_READELF
18169 if test -n "$READELF"; then
18170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18171 $as_echo "$READELF" >&6; }
18172 else
18173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18174 $as_echo "no" >&6; }
18175 fi
18176 
18177 
18178   test -n "$READELF" && break
18179 done
18180 
18181     else
18182       # If it succeeded, then it was overridden by the user. We will use it
18183       # for the tool.
18184 
18185       # First remove it from the list of overridden variables, so we can test
18186       # for unknown variables in the end.
18187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18188 
18189       # Check if the provided tool contains a complete path.
18190       tool_specified="$READELF"
18191       tool_basename="${tool_specified##*/}"
18192       if test "x$tool_basename" = "x$tool_specified"; then
18193         # A command without a complete path is provided, search $PATH.
18194         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18195 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18196         # Extract the first word of "$tool_basename", so it can be a program name with args.
18197 set dummy $tool_basename; ac_word=$2
18198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18199 $as_echo_n "checking for $ac_word... " >&6; }
18200 if ${ac_cv_path_READELF+:} false; then :
18201   $as_echo_n "(cached) " >&6
18202 else
18203   case $READELF in
18204   [\\/]* | ?:[\\/]*)
18205   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18206   ;;
18207   *)
18208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18209 for as_dir in $PATH
18210 do
18211   IFS=$as_save_IFS
18212   test -z "$as_dir" && as_dir=.
18213     for ac_exec_ext in '' $ac_executable_extensions; do
18214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18215     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18217     break 2
18218   fi
18219 done
18220   done
18221 IFS=$as_save_IFS
18222 
18223   ;;
18224 esac
18225 fi
18226 READELF=$ac_cv_path_READELF
18227 if test -n "$READELF"; then
18228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18229 $as_echo "$READELF" >&6; }
18230 else
18231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18232 $as_echo "no" >&6; }
18233 fi
18234 
18235 
18236         if test "x$READELF" = x; then
18237           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18238         fi
18239       else
18240         # Otherwise we believe it is a complete path. Use it as it is.
18241         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18242 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18243         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18244 $as_echo_n "checking for READELF... " >&6; }
18245         if test ! -x "$tool_specified"; then
18246           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18247 $as_echo "not found" >&6; }
18248           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18249         fi
18250         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18251 $as_echo "$tool_specified" >&6; }
18252       fi
18253     fi
18254   fi
18255 
18256 
18257 
18258 
18259   # Publish this variable in the help.
18260 
18261 
18262   if test "x$HG" = x; then
18263     # The variable is not set by user, try to locate tool using the code snippet
18264     for ac_prog in hg
18265 do
18266   # Extract the first word of "$ac_prog", so it can be a program name with args.
18267 set dummy $ac_prog; ac_word=$2
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18269 $as_echo_n "checking for $ac_word... " >&6; }
18270 if ${ac_cv_path_HG+:} false; then :
18271   $as_echo_n "(cached) " >&6
18272 else
18273   case $HG in
18274   [\\/]* | ?:[\\/]*)
18275   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18276   ;;
18277   *)
18278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18279 for as_dir in $PATH
18280 do
18281   IFS=$as_save_IFS
18282   test -z "$as_dir" && as_dir=.
18283     for ac_exec_ext in '' $ac_executable_extensions; do
18284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18285     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18287     break 2
18288   fi
18289 done
18290   done
18291 IFS=$as_save_IFS
18292 
18293   ;;
18294 esac
18295 fi
18296 HG=$ac_cv_path_HG
18297 if test -n "$HG"; then
18298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18299 $as_echo "$HG" >&6; }
18300 else
18301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18302 $as_echo "no" >&6; }
18303 fi
18304 
18305 
18306   test -n "$HG" && break
18307 done
18308 
18309   else
18310     # The variable is set, but is it from the command line or the environment?
18311 
18312     # Try to remove the string !HG! from our list.
18313     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18314     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18315       # If it failed, the variable was not from the command line. Ignore it,
18316       # but warn the user (except for BASH, which is always set by the calling BASH).
18317       if test "xHG" != xBASH; then
18318         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18319 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18320       fi
18321       # Try to locate tool using the code snippet
18322       for ac_prog in hg
18323 do
18324   # Extract the first word of "$ac_prog", so it can be a program name with args.
18325 set dummy $ac_prog; ac_word=$2
18326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327 $as_echo_n "checking for $ac_word... " >&6; }
18328 if ${ac_cv_path_HG+:} false; then :
18329   $as_echo_n "(cached) " >&6
18330 else
18331   case $HG in
18332   [\\/]* | ?:[\\/]*)
18333   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18334   ;;
18335   *)
18336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337 for as_dir in $PATH
18338 do
18339   IFS=$as_save_IFS
18340   test -z "$as_dir" && as_dir=.
18341     for ac_exec_ext in '' $ac_executable_extensions; do
18342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345     break 2
18346   fi
18347 done
18348   done
18349 IFS=$as_save_IFS
18350 
18351   ;;
18352 esac
18353 fi
18354 HG=$ac_cv_path_HG
18355 if test -n "$HG"; then
18356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18357 $as_echo "$HG" >&6; }
18358 else
18359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360 $as_echo "no" >&6; }
18361 fi
18362 
18363 
18364   test -n "$HG" && break
18365 done
18366 
18367     else
18368       # If it succeeded, then it was overridden by the user. We will use it
18369       # for the tool.
18370 
18371       # First remove it from the list of overridden variables, so we can test
18372       # for unknown variables in the end.
18373       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18374 
18375       # Check if the provided tool contains a complete path.
18376       tool_specified="$HG"
18377       tool_basename="${tool_specified##*/}"
18378       if test "x$tool_basename" = "x$tool_specified"; then
18379         # A command without a complete path is provided, search $PATH.
18380         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18381 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18382         # Extract the first word of "$tool_basename", so it can be a program name with args.
18383 set dummy $tool_basename; ac_word=$2
18384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18385 $as_echo_n "checking for $ac_word... " >&6; }
18386 if ${ac_cv_path_HG+:} false; then :
18387   $as_echo_n "(cached) " >&6
18388 else
18389   case $HG in
18390   [\\/]* | ?:[\\/]*)
18391   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18392   ;;
18393   *)
18394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18395 for as_dir in $PATH
18396 do
18397   IFS=$as_save_IFS
18398   test -z "$as_dir" && as_dir=.
18399     for ac_exec_ext in '' $ac_executable_extensions; do
18400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18401     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18403     break 2
18404   fi
18405 done
18406   done
18407 IFS=$as_save_IFS
18408 
18409   ;;
18410 esac
18411 fi
18412 HG=$ac_cv_path_HG
18413 if test -n "$HG"; then
18414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18415 $as_echo "$HG" >&6; }
18416 else
18417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18418 $as_echo "no" >&6; }
18419 fi
18420 
18421 
18422         if test "x$HG" = x; then
18423           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18424         fi
18425       else
18426         # Otherwise we believe it is a complete path. Use it as it is.
18427         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18428 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18429         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18430 $as_echo_n "checking for HG... " >&6; }
18431         if test ! -x "$tool_specified"; then
18432           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18433 $as_echo "not found" >&6; }
18434           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18435         fi
18436         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18437 $as_echo "$tool_specified" >&6; }
18438       fi
18439     fi
18440   fi
18441 
18442 
18443 
18444 
18445   # Publish this variable in the help.
18446 
18447 
18448   if test "x$STAT" = x; then
18449     # The variable is not set by user, try to locate tool using the code snippet
18450     for ac_prog in stat
18451 do
18452   # Extract the first word of "$ac_prog", so it can be a program name with args.
18453 set dummy $ac_prog; ac_word=$2
18454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18455 $as_echo_n "checking for $ac_word... " >&6; }
18456 if ${ac_cv_path_STAT+:} false; then :
18457   $as_echo_n "(cached) " >&6
18458 else
18459   case $STAT in
18460   [\\/]* | ?:[\\/]*)
18461   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18462   ;;
18463   *)
18464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18465 for as_dir in $PATH
18466 do
18467   IFS=$as_save_IFS
18468   test -z "$as_dir" && as_dir=.
18469     for ac_exec_ext in '' $ac_executable_extensions; do
18470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18471     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18473     break 2
18474   fi
18475 done
18476   done
18477 IFS=$as_save_IFS
18478 
18479   ;;
18480 esac
18481 fi
18482 STAT=$ac_cv_path_STAT
18483 if test -n "$STAT"; then
18484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18485 $as_echo "$STAT" >&6; }
18486 else
18487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18488 $as_echo "no" >&6; }
18489 fi
18490 
18491 
18492   test -n "$STAT" && break
18493 done
18494 
18495   else
18496     # The variable is set, but is it from the command line or the environment?
18497 
18498     # Try to remove the string !STAT! from our list.
18499     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18500     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18501       # If it failed, the variable was not from the command line. Ignore it,
18502       # but warn the user (except for BASH, which is always set by the calling BASH).
18503       if test "xSTAT" != xBASH; then
18504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18505 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18506       fi
18507       # Try to locate tool using the code snippet
18508       for ac_prog in stat
18509 do
18510   # Extract the first word of "$ac_prog", so it can be a program name with args.
18511 set dummy $ac_prog; ac_word=$2
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18513 $as_echo_n "checking for $ac_word... " >&6; }
18514 if ${ac_cv_path_STAT+:} false; then :
18515   $as_echo_n "(cached) " >&6
18516 else
18517   case $STAT in
18518   [\\/]* | ?:[\\/]*)
18519   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18520   ;;
18521   *)
18522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18523 for as_dir in $PATH
18524 do
18525   IFS=$as_save_IFS
18526   test -z "$as_dir" && as_dir=.
18527     for ac_exec_ext in '' $ac_executable_extensions; do
18528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18529     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18531     break 2
18532   fi
18533 done
18534   done
18535 IFS=$as_save_IFS
18536 
18537   ;;
18538 esac
18539 fi
18540 STAT=$ac_cv_path_STAT
18541 if test -n "$STAT"; then
18542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18543 $as_echo "$STAT" >&6; }
18544 else
18545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18546 $as_echo "no" >&6; }
18547 fi
18548 
18549 
18550   test -n "$STAT" && break
18551 done
18552 
18553     else
18554       # If it succeeded, then it was overridden by the user. We will use it
18555       # for the tool.
18556 
18557       # First remove it from the list of overridden variables, so we can test
18558       # for unknown variables in the end.
18559       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18560 
18561       # Check if the provided tool contains a complete path.
18562       tool_specified="$STAT"
18563       tool_basename="${tool_specified##*/}"
18564       if test "x$tool_basename" = "x$tool_specified"; then
18565         # A command without a complete path is provided, search $PATH.
18566         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18567 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18568         # Extract the first word of "$tool_basename", so it can be a program name with args.
18569 set dummy $tool_basename; ac_word=$2
18570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18571 $as_echo_n "checking for $ac_word... " >&6; }
18572 if ${ac_cv_path_STAT+:} false; then :
18573   $as_echo_n "(cached) " >&6
18574 else
18575   case $STAT in
18576   [\\/]* | ?:[\\/]*)
18577   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18578   ;;
18579   *)
18580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18581 for as_dir in $PATH
18582 do
18583   IFS=$as_save_IFS
18584   test -z "$as_dir" && as_dir=.
18585     for ac_exec_ext in '' $ac_executable_extensions; do
18586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18587     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18589     break 2
18590   fi
18591 done
18592   done
18593 IFS=$as_save_IFS
18594 
18595   ;;
18596 esac
18597 fi
18598 STAT=$ac_cv_path_STAT
18599 if test -n "$STAT"; then
18600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18601 $as_echo "$STAT" >&6; }
18602 else
18603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18604 $as_echo "no" >&6; }
18605 fi
18606 
18607 
18608         if test "x$STAT" = x; then
18609           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18610         fi
18611       else
18612         # Otherwise we believe it is a complete path. Use it as it is.
18613         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18614 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18615         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18616 $as_echo_n "checking for STAT... " >&6; }
18617         if test ! -x "$tool_specified"; then
18618           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18619 $as_echo "not found" >&6; }
18620           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18621         fi
18622         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18623 $as_echo "$tool_specified" >&6; }
18624       fi
18625     fi
18626   fi
18627 
18628 
18629 
18630 
18631   # Publish this variable in the help.
18632 
18633 
18634   if test "x$TIME" = x; then
18635     # The variable is not set by user, try to locate tool using the code snippet
18636     for ac_prog in time
18637 do
18638   # Extract the first word of "$ac_prog", so it can be a program name with args.
18639 set dummy $ac_prog; ac_word=$2
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18641 $as_echo_n "checking for $ac_word... " >&6; }
18642 if ${ac_cv_path_TIME+:} false; then :
18643   $as_echo_n "(cached) " >&6
18644 else
18645   case $TIME in
18646   [\\/]* | ?:[\\/]*)
18647   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18648   ;;
18649   *)
18650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18651 for as_dir in $PATH
18652 do
18653   IFS=$as_save_IFS
18654   test -z "$as_dir" && as_dir=.
18655     for ac_exec_ext in '' $ac_executable_extensions; do
18656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18657     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18659     break 2
18660   fi
18661 done
18662   done
18663 IFS=$as_save_IFS
18664 
18665   ;;
18666 esac
18667 fi
18668 TIME=$ac_cv_path_TIME
18669 if test -n "$TIME"; then
18670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18671 $as_echo "$TIME" >&6; }
18672 else
18673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18674 $as_echo "no" >&6; }
18675 fi
18676 
18677 
18678   test -n "$TIME" && break
18679 done
18680 
18681   else
18682     # The variable is set, but is it from the command line or the environment?
18683 
18684     # Try to remove the string !TIME! from our list.
18685     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18686     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18687       # If it failed, the variable was not from the command line. Ignore it,
18688       # but warn the user (except for BASH, which is always set by the calling BASH).
18689       if test "xTIME" != xBASH; then
18690         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18691 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18692       fi
18693       # Try to locate tool using the code snippet
18694       for ac_prog in time
18695 do
18696   # Extract the first word of "$ac_prog", so it can be a program name with args.
18697 set dummy $ac_prog; ac_word=$2
18698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18699 $as_echo_n "checking for $ac_word... " >&6; }
18700 if ${ac_cv_path_TIME+:} false; then :
18701   $as_echo_n "(cached) " >&6
18702 else
18703   case $TIME in
18704   [\\/]* | ?:[\\/]*)
18705   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18706   ;;
18707   *)
18708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18709 for as_dir in $PATH
18710 do
18711   IFS=$as_save_IFS
18712   test -z "$as_dir" && as_dir=.
18713     for ac_exec_ext in '' $ac_executable_extensions; do
18714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18715     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18717     break 2
18718   fi
18719 done
18720   done
18721 IFS=$as_save_IFS
18722 
18723   ;;
18724 esac
18725 fi
18726 TIME=$ac_cv_path_TIME
18727 if test -n "$TIME"; then
18728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18729 $as_echo "$TIME" >&6; }
18730 else
18731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732 $as_echo "no" >&6; }
18733 fi
18734 
18735 
18736   test -n "$TIME" && break
18737 done
18738 
18739     else
18740       # If it succeeded, then it was overridden by the user. We will use it
18741       # for the tool.
18742 
18743       # First remove it from the list of overridden variables, so we can test
18744       # for unknown variables in the end.
18745       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18746 
18747       # Check if the provided tool contains a complete path.
18748       tool_specified="$TIME"
18749       tool_basename="${tool_specified##*/}"
18750       if test "x$tool_basename" = "x$tool_specified"; then
18751         # A command without a complete path is provided, search $PATH.
18752         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18753 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18754         # Extract the first word of "$tool_basename", so it can be a program name with args.
18755 set dummy $tool_basename; ac_word=$2
18756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18757 $as_echo_n "checking for $ac_word... " >&6; }
18758 if ${ac_cv_path_TIME+:} false; then :
18759   $as_echo_n "(cached) " >&6
18760 else
18761   case $TIME in
18762   [\\/]* | ?:[\\/]*)
18763   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18764   ;;
18765   *)
18766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18767 for as_dir in $PATH
18768 do
18769   IFS=$as_save_IFS
18770   test -z "$as_dir" && as_dir=.
18771     for ac_exec_ext in '' $ac_executable_extensions; do
18772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18773     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18775     break 2
18776   fi
18777 done
18778   done
18779 IFS=$as_save_IFS
18780 
18781   ;;
18782 esac
18783 fi
18784 TIME=$ac_cv_path_TIME
18785 if test -n "$TIME"; then
18786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18787 $as_echo "$TIME" >&6; }
18788 else
18789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18790 $as_echo "no" >&6; }
18791 fi
18792 
18793 
18794         if test "x$TIME" = x; then
18795           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18796         fi
18797       else
18798         # Otherwise we believe it is a complete path. Use it as it is.
18799         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18800 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18801         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18802 $as_echo_n "checking for TIME... " >&6; }
18803         if test ! -x "$tool_specified"; then
18804           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18805 $as_echo "not found" >&6; }
18806           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18807         fi
18808         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18809 $as_echo "$tool_specified" >&6; }
18810       fi
18811     fi
18812   fi
18813 
18814 
18815   # Check if it's GNU time
18816   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18817   if test "x$IS_GNU_TIME" != x; then
18818     IS_GNU_TIME=yes
18819   else
18820     IS_GNU_TIME=no
18821   fi
18822 
18823 
18824   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18825 
18826 
18827 
18828   # Publish this variable in the help.
18829 
18830 
18831   if test "x$COMM" = x; then
18832     # The variable is not set by user, try to locate tool using the code snippet
18833     for ac_prog in comm
18834 do
18835   # Extract the first word of "$ac_prog", so it can be a program name with args.
18836 set dummy $ac_prog; ac_word=$2
18837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18838 $as_echo_n "checking for $ac_word... " >&6; }
18839 if ${ac_cv_path_COMM+:} false; then :
18840   $as_echo_n "(cached) " >&6
18841 else
18842   case $COMM in
18843   [\\/]* | ?:[\\/]*)
18844   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18845   ;;
18846   *)
18847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18848 for as_dir in $PATH
18849 do
18850   IFS=$as_save_IFS
18851   test -z "$as_dir" && as_dir=.
18852     for ac_exec_ext in '' $ac_executable_extensions; do
18853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18854     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18856     break 2
18857   fi
18858 done
18859   done
18860 IFS=$as_save_IFS
18861 
18862   ;;
18863 esac
18864 fi
18865 COMM=$ac_cv_path_COMM
18866 if test -n "$COMM"; then
18867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18868 $as_echo "$COMM" >&6; }
18869 else
18870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18871 $as_echo "no" >&6; }
18872 fi
18873 
18874 
18875   test -n "$COMM" && break
18876 done
18877 
18878   else
18879     # The variable is set, but is it from the command line or the environment?
18880 
18881     # Try to remove the string !COMM! from our list.
18882     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18883     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18884       # If it failed, the variable was not from the command line. Ignore it,
18885       # but warn the user (except for BASH, which is always set by the calling BASH).
18886       if test "xCOMM" != xBASH; then
18887         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18888 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18889       fi
18890       # Try to locate tool using the code snippet
18891       for ac_prog in comm
18892 do
18893   # Extract the first word of "$ac_prog", so it can be a program name with args.
18894 set dummy $ac_prog; ac_word=$2
18895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18896 $as_echo_n "checking for $ac_word... " >&6; }
18897 if ${ac_cv_path_COMM+:} false; then :
18898   $as_echo_n "(cached) " >&6
18899 else
18900   case $COMM in
18901   [\\/]* | ?:[\\/]*)
18902   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18903   ;;
18904   *)
18905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18906 for as_dir in $PATH
18907 do
18908   IFS=$as_save_IFS
18909   test -z "$as_dir" && as_dir=.
18910     for ac_exec_ext in '' $ac_executable_extensions; do
18911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18912     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18914     break 2
18915   fi
18916 done
18917   done
18918 IFS=$as_save_IFS
18919 
18920   ;;
18921 esac
18922 fi
18923 COMM=$ac_cv_path_COMM
18924 if test -n "$COMM"; then
18925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18926 $as_echo "$COMM" >&6; }
18927 else
18928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18929 $as_echo "no" >&6; }
18930 fi
18931 
18932 
18933   test -n "$COMM" && break
18934 done
18935 
18936     else
18937       # If it succeeded, then it was overridden by the user. We will use it
18938       # for the tool.
18939 
18940       # First remove it from the list of overridden variables, so we can test
18941       # for unknown variables in the end.
18942       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18943 
18944       # Check if the provided tool contains a complete path.
18945       tool_specified="$COMM"
18946       tool_basename="${tool_specified##*/}"
18947       if test "x$tool_basename" = "x$tool_specified"; then
18948         # A command without a complete path is provided, search $PATH.
18949         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18950 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18951         # Extract the first word of "$tool_basename", so it can be a program name with args.
18952 set dummy $tool_basename; ac_word=$2
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18954 $as_echo_n "checking for $ac_word... " >&6; }
18955 if ${ac_cv_path_COMM+:} false; then :
18956   $as_echo_n "(cached) " >&6
18957 else
18958   case $COMM in
18959   [\\/]* | ?:[\\/]*)
18960   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18961   ;;
18962   *)
18963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18964 for as_dir in $PATH
18965 do
18966   IFS=$as_save_IFS
18967   test -z "$as_dir" && as_dir=.
18968     for ac_exec_ext in '' $ac_executable_extensions; do
18969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18970     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18972     break 2
18973   fi
18974 done
18975   done
18976 IFS=$as_save_IFS
18977 
18978   ;;
18979 esac
18980 fi
18981 COMM=$ac_cv_path_COMM
18982 if test -n "$COMM"; then
18983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18984 $as_echo "$COMM" >&6; }
18985 else
18986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18987 $as_echo "no" >&6; }
18988 fi
18989 
18990 
18991         if test "x$COMM" = x; then
18992           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18993         fi
18994       else
18995         # Otherwise we believe it is a complete path. Use it as it is.
18996         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18997 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18999 $as_echo_n "checking for COMM... " >&6; }
19000         if test ! -x "$tool_specified"; then
19001           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19002 $as_echo "not found" >&6; }
19003           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19004         fi
19005         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19006 $as_echo "$tool_specified" >&6; }
19007       fi
19008     fi
19009   fi
19010 
19011 
19012 
19013   if test "x$COMM" = x; then
19014     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19015   fi
19016 
19017 
19018   fi
19019 
19020   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19021 
19022 
19023 
19024   # Publish this variable in the help.
19025 
19026 
19027   if test "x$DSYMUTIL" = x; then
19028     # The variable is not set by user, try to locate tool using the code snippet
19029     for ac_prog in dsymutil
19030 do
19031   # Extract the first word of "$ac_prog", so it can be a program name with args.
19032 set dummy $ac_prog; ac_word=$2
19033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19034 $as_echo_n "checking for $ac_word... " >&6; }
19035 if ${ac_cv_path_DSYMUTIL+:} false; then :
19036   $as_echo_n "(cached) " >&6
19037 else
19038   case $DSYMUTIL in
19039   [\\/]* | ?:[\\/]*)
19040   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19041   ;;
19042   *)
19043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19044 for as_dir in $PATH
19045 do
19046   IFS=$as_save_IFS
19047   test -z "$as_dir" && as_dir=.
19048     for ac_exec_ext in '' $ac_executable_extensions; do
19049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19050     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19052     break 2
19053   fi
19054 done
19055   done
19056 IFS=$as_save_IFS
19057 
19058   ;;
19059 esac
19060 fi
19061 DSYMUTIL=$ac_cv_path_DSYMUTIL
19062 if test -n "$DSYMUTIL"; then
19063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19064 $as_echo "$DSYMUTIL" >&6; }
19065 else
19066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19067 $as_echo "no" >&6; }
19068 fi
19069 
19070 
19071   test -n "$DSYMUTIL" && break
19072 done
19073 
19074   else
19075     # The variable is set, but is it from the command line or the environment?
19076 
19077     # Try to remove the string !DSYMUTIL! from our list.
19078     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19079     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19080       # If it failed, the variable was not from the command line. Ignore it,
19081       # but warn the user (except for BASH, which is always set by the calling BASH).
19082       if test "xDSYMUTIL" != xBASH; then
19083         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19084 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19085       fi
19086       # Try to locate tool using the code snippet
19087       for ac_prog in dsymutil
19088 do
19089   # Extract the first word of "$ac_prog", so it can be a program name with args.
19090 set dummy $ac_prog; ac_word=$2
19091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19092 $as_echo_n "checking for $ac_word... " >&6; }
19093 if ${ac_cv_path_DSYMUTIL+:} false; then :
19094   $as_echo_n "(cached) " >&6
19095 else
19096   case $DSYMUTIL in
19097   [\\/]* | ?:[\\/]*)
19098   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19099   ;;
19100   *)
19101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19102 for as_dir in $PATH
19103 do
19104   IFS=$as_save_IFS
19105   test -z "$as_dir" && as_dir=.
19106     for ac_exec_ext in '' $ac_executable_extensions; do
19107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19108     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19110     break 2
19111   fi
19112 done
19113   done
19114 IFS=$as_save_IFS
19115 
19116   ;;
19117 esac
19118 fi
19119 DSYMUTIL=$ac_cv_path_DSYMUTIL
19120 if test -n "$DSYMUTIL"; then
19121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19122 $as_echo "$DSYMUTIL" >&6; }
19123 else
19124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19125 $as_echo "no" >&6; }
19126 fi
19127 
19128 
19129   test -n "$DSYMUTIL" && break
19130 done
19131 
19132     else
19133       # If it succeeded, then it was overridden by the user. We will use it
19134       # for the tool.
19135 
19136       # First remove it from the list of overridden variables, so we can test
19137       # for unknown variables in the end.
19138       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19139 
19140       # Check if the provided tool contains a complete path.
19141       tool_specified="$DSYMUTIL"
19142       tool_basename="${tool_specified##*/}"
19143       if test "x$tool_basename" = "x$tool_specified"; then
19144         # A command without a complete path is provided, search $PATH.
19145         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19146 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19147         # Extract the first word of "$tool_basename", so it can be a program name with args.
19148 set dummy $tool_basename; ac_word=$2
19149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19150 $as_echo_n "checking for $ac_word... " >&6; }
19151 if ${ac_cv_path_DSYMUTIL+:} false; then :
19152   $as_echo_n "(cached) " >&6
19153 else
19154   case $DSYMUTIL in
19155   [\\/]* | ?:[\\/]*)
19156   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19157   ;;
19158   *)
19159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19160 for as_dir in $PATH
19161 do
19162   IFS=$as_save_IFS
19163   test -z "$as_dir" && as_dir=.
19164     for ac_exec_ext in '' $ac_executable_extensions; do
19165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19166     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19168     break 2
19169   fi
19170 done
19171   done
19172 IFS=$as_save_IFS
19173 
19174   ;;
19175 esac
19176 fi
19177 DSYMUTIL=$ac_cv_path_DSYMUTIL
19178 if test -n "$DSYMUTIL"; then
19179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19180 $as_echo "$DSYMUTIL" >&6; }
19181 else
19182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19183 $as_echo "no" >&6; }
19184 fi
19185 
19186 
19187         if test "x$DSYMUTIL" = x; then
19188           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19189         fi
19190       else
19191         # Otherwise we believe it is a complete path. Use it as it is.
19192         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19193 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19195 $as_echo_n "checking for DSYMUTIL... " >&6; }
19196         if test ! -x "$tool_specified"; then
19197           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19198 $as_echo "not found" >&6; }
19199           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19200         fi
19201         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19202 $as_echo "$tool_specified" >&6; }
19203       fi
19204     fi
19205   fi
19206 
19207 
19208 
19209   if test "x$DSYMUTIL" = x; then
19210     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19211   fi
19212 
19213 
19214 
19215 
19216 
19217   # Publish this variable in the help.
19218 
19219 
19220   if test "x$XATTR" = x; then
19221     # The variable is not set by user, try to locate tool using the code snippet
19222     for ac_prog in xattr
19223 do
19224   # Extract the first word of "$ac_prog", so it can be a program name with args.
19225 set dummy $ac_prog; ac_word=$2
19226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19227 $as_echo_n "checking for $ac_word... " >&6; }
19228 if ${ac_cv_path_XATTR+:} false; then :
19229   $as_echo_n "(cached) " >&6
19230 else
19231   case $XATTR in
19232   [\\/]* | ?:[\\/]*)
19233   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19234   ;;
19235   *)
19236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19237 for as_dir in $PATH
19238 do
19239   IFS=$as_save_IFS
19240   test -z "$as_dir" && as_dir=.
19241     for ac_exec_ext in '' $ac_executable_extensions; do
19242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19243     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19245     break 2
19246   fi
19247 done
19248   done
19249 IFS=$as_save_IFS
19250 
19251   ;;
19252 esac
19253 fi
19254 XATTR=$ac_cv_path_XATTR
19255 if test -n "$XATTR"; then
19256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19257 $as_echo "$XATTR" >&6; }
19258 else
19259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19260 $as_echo "no" >&6; }
19261 fi
19262 
19263 
19264   test -n "$XATTR" && break
19265 done
19266 
19267   else
19268     # The variable is set, but is it from the command line or the environment?
19269 
19270     # Try to remove the string !XATTR! from our list.
19271     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19272     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19273       # If it failed, the variable was not from the command line. Ignore it,
19274       # but warn the user (except for BASH, which is always set by the calling BASH).
19275       if test "xXATTR" != xBASH; then
19276         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19277 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19278       fi
19279       # Try to locate tool using the code snippet
19280       for ac_prog in xattr
19281 do
19282   # Extract the first word of "$ac_prog", so it can be a program name with args.
19283 set dummy $ac_prog; ac_word=$2
19284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19285 $as_echo_n "checking for $ac_word... " >&6; }
19286 if ${ac_cv_path_XATTR+:} false; then :
19287   $as_echo_n "(cached) " >&6
19288 else
19289   case $XATTR in
19290   [\\/]* | ?:[\\/]*)
19291   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19292   ;;
19293   *)
19294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19295 for as_dir in $PATH
19296 do
19297   IFS=$as_save_IFS
19298   test -z "$as_dir" && as_dir=.
19299     for ac_exec_ext in '' $ac_executable_extensions; do
19300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19301     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19303     break 2
19304   fi
19305 done
19306   done
19307 IFS=$as_save_IFS
19308 
19309   ;;
19310 esac
19311 fi
19312 XATTR=$ac_cv_path_XATTR
19313 if test -n "$XATTR"; then
19314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19315 $as_echo "$XATTR" >&6; }
19316 else
19317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19318 $as_echo "no" >&6; }
19319 fi
19320 
19321 
19322   test -n "$XATTR" && break
19323 done
19324 
19325     else
19326       # If it succeeded, then it was overridden by the user. We will use it
19327       # for the tool.
19328 
19329       # First remove it from the list of overridden variables, so we can test
19330       # for unknown variables in the end.
19331       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19332 
19333       # Check if the provided tool contains a complete path.
19334       tool_specified="$XATTR"
19335       tool_basename="${tool_specified##*/}"
19336       if test "x$tool_basename" = "x$tool_specified"; then
19337         # A command without a complete path is provided, search $PATH.
19338         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19339 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19340         # Extract the first word of "$tool_basename", so it can be a program name with args.
19341 set dummy $tool_basename; ac_word=$2
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19343 $as_echo_n "checking for $ac_word... " >&6; }
19344 if ${ac_cv_path_XATTR+:} false; then :
19345   $as_echo_n "(cached) " >&6
19346 else
19347   case $XATTR in
19348   [\\/]* | ?:[\\/]*)
19349   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19350   ;;
19351   *)
19352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19353 for as_dir in $PATH
19354 do
19355   IFS=$as_save_IFS
19356   test -z "$as_dir" && as_dir=.
19357     for ac_exec_ext in '' $ac_executable_extensions; do
19358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19359     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19361     break 2
19362   fi
19363 done
19364   done
19365 IFS=$as_save_IFS
19366 
19367   ;;
19368 esac
19369 fi
19370 XATTR=$ac_cv_path_XATTR
19371 if test -n "$XATTR"; then
19372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19373 $as_echo "$XATTR" >&6; }
19374 else
19375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19376 $as_echo "no" >&6; }
19377 fi
19378 
19379 
19380         if test "x$XATTR" = x; then
19381           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19382         fi
19383       else
19384         # Otherwise we believe it is a complete path. Use it as it is.
19385         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19386 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19387         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19388 $as_echo_n "checking for XATTR... " >&6; }
19389         if test ! -x "$tool_specified"; then
19390           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19391 $as_echo "not found" >&6; }
19392           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19393         fi
19394         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19395 $as_echo "$tool_specified" >&6; }
19396       fi
19397     fi
19398   fi
19399 
19400 
19401 
19402   if test "x$XATTR" = x; then
19403     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19404   fi
19405 
19406 
19407 
19408 
19409   # Publish this variable in the help.
19410 
19411 
19412   if test "x$CODESIGN" = x; then
19413     # The variable is not set by user, try to locate tool using the code snippet
19414     for ac_prog in codesign
19415 do
19416   # Extract the first word of "$ac_prog", so it can be a program name with args.
19417 set dummy $ac_prog; ac_word=$2
19418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19419 $as_echo_n "checking for $ac_word... " >&6; }
19420 if ${ac_cv_path_CODESIGN+:} false; then :
19421   $as_echo_n "(cached) " >&6
19422 else
19423   case $CODESIGN in
19424   [\\/]* | ?:[\\/]*)
19425   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19426   ;;
19427   *)
19428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19429 for as_dir in $PATH
19430 do
19431   IFS=$as_save_IFS
19432   test -z "$as_dir" && as_dir=.
19433     for ac_exec_ext in '' $ac_executable_extensions; do
19434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19435     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19437     break 2
19438   fi
19439 done
19440   done
19441 IFS=$as_save_IFS
19442 
19443   ;;
19444 esac
19445 fi
19446 CODESIGN=$ac_cv_path_CODESIGN
19447 if test -n "$CODESIGN"; then
19448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19449 $as_echo "$CODESIGN" >&6; }
19450 else
19451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19452 $as_echo "no" >&6; }
19453 fi
19454 
19455 
19456   test -n "$CODESIGN" && break
19457 done
19458 
19459   else
19460     # The variable is set, but is it from the command line or the environment?
19461 
19462     # Try to remove the string !CODESIGN! from our list.
19463     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19464     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19465       # If it failed, the variable was not from the command line. Ignore it,
19466       # but warn the user (except for BASH, which is always set by the calling BASH).
19467       if test "xCODESIGN" != xBASH; then
19468         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19469 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19470       fi
19471       # Try to locate tool using the code snippet
19472       for ac_prog in codesign
19473 do
19474   # Extract the first word of "$ac_prog", so it can be a program name with args.
19475 set dummy $ac_prog; ac_word=$2
19476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19477 $as_echo_n "checking for $ac_word... " >&6; }
19478 if ${ac_cv_path_CODESIGN+:} false; then :
19479   $as_echo_n "(cached) " >&6
19480 else
19481   case $CODESIGN in
19482   [\\/]* | ?:[\\/]*)
19483   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19484   ;;
19485   *)
19486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19487 for as_dir in $PATH
19488 do
19489   IFS=$as_save_IFS
19490   test -z "$as_dir" && as_dir=.
19491     for ac_exec_ext in '' $ac_executable_extensions; do
19492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19493     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19495     break 2
19496   fi
19497 done
19498   done
19499 IFS=$as_save_IFS
19500 
19501   ;;
19502 esac
19503 fi
19504 CODESIGN=$ac_cv_path_CODESIGN
19505 if test -n "$CODESIGN"; then
19506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19507 $as_echo "$CODESIGN" >&6; }
19508 else
19509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19510 $as_echo "no" >&6; }
19511 fi
19512 
19513 
19514   test -n "$CODESIGN" && break
19515 done
19516 
19517     else
19518       # If it succeeded, then it was overridden by the user. We will use it
19519       # for the tool.
19520 
19521       # First remove it from the list of overridden variables, so we can test
19522       # for unknown variables in the end.
19523       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19524 
19525       # Check if the provided tool contains a complete path.
19526       tool_specified="$CODESIGN"
19527       tool_basename="${tool_specified##*/}"
19528       if test "x$tool_basename" = "x$tool_specified"; then
19529         # A command without a complete path is provided, search $PATH.
19530         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19531 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19532         # Extract the first word of "$tool_basename", so it can be a program name with args.
19533 set dummy $tool_basename; ac_word=$2
19534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19535 $as_echo_n "checking for $ac_word... " >&6; }
19536 if ${ac_cv_path_CODESIGN+:} false; then :
19537   $as_echo_n "(cached) " >&6
19538 else
19539   case $CODESIGN in
19540   [\\/]* | ?:[\\/]*)
19541   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19542   ;;
19543   *)
19544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19545 for as_dir in $PATH
19546 do
19547   IFS=$as_save_IFS
19548   test -z "$as_dir" && as_dir=.
19549     for ac_exec_ext in '' $ac_executable_extensions; do
19550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19551     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19553     break 2
19554   fi
19555 done
19556   done
19557 IFS=$as_save_IFS
19558 
19559   ;;
19560 esac
19561 fi
19562 CODESIGN=$ac_cv_path_CODESIGN
19563 if test -n "$CODESIGN"; then
19564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19565 $as_echo "$CODESIGN" >&6; }
19566 else
19567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19568 $as_echo "no" >&6; }
19569 fi
19570 
19571 
19572         if test "x$CODESIGN" = x; then
19573           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19574         fi
19575       else
19576         # Otherwise we believe it is a complete path. Use it as it is.
19577         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19578 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19579         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19580 $as_echo_n "checking for CODESIGN... " >&6; }
19581         if test ! -x "$tool_specified"; then
19582           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19583 $as_echo "not found" >&6; }
19584           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19585         fi
19586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19587 $as_echo "$tool_specified" >&6; }
19588       fi
19589     fi
19590   fi
19591 
19592 
19593     if test "x$CODESIGN" != "x"; then
19594       # Verify that the openjdk_codesign certificate is present
19595       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19596 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19597       rm -f codesign-testfile
19598       touch codesign-testfile
19599       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19600       rm -f codesign-testfile
19601       if test "x$CODESIGN" = x; then
19602         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19603 $as_echo "no" >&6; }
19604       else
19605         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19606 $as_echo "yes" >&6; }
19607       fi
19608     fi
19609   fi
19610 
19611 
19612 # Check if pkg-config is available.
19613 
19614 
19615 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19616         if test -n "$ac_tool_prefix"; then
19617   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19618 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19620 $as_echo_n "checking for $ac_word... " >&6; }
19621 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19622   $as_echo_n "(cached) " >&6
19623 else
19624   case $PKG_CONFIG in
19625   [\\/]* | ?:[\\/]*)
19626   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19627   ;;
19628   *)
19629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19630 for as_dir in $PATH
19631 do
19632   IFS=$as_save_IFS
19633   test -z "$as_dir" && as_dir=.
19634     for ac_exec_ext in '' $ac_executable_extensions; do
19635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19636     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19638     break 2
19639   fi
19640 done
19641   done
19642 IFS=$as_save_IFS
19643 
19644   ;;
19645 esac
19646 fi
19647 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19648 if test -n "$PKG_CONFIG"; then
19649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19650 $as_echo "$PKG_CONFIG" >&6; }
19651 else
19652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19653 $as_echo "no" >&6; }
19654 fi
19655 
19656 
19657 fi
19658 if test -z "$ac_cv_path_PKG_CONFIG"; then
19659   ac_pt_PKG_CONFIG=$PKG_CONFIG
19660   # Extract the first word of "pkg-config", so it can be a program name with args.
19661 set dummy pkg-config; ac_word=$2
19662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19663 $as_echo_n "checking for $ac_word... " >&6; }
19664 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19665   $as_echo_n "(cached) " >&6
19666 else
19667   case $ac_pt_PKG_CONFIG in
19668   [\\/]* | ?:[\\/]*)
19669   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19670   ;;
19671   *)
19672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19673 for as_dir in $PATH
19674 do
19675   IFS=$as_save_IFS
19676   test -z "$as_dir" && as_dir=.
19677     for ac_exec_ext in '' $ac_executable_extensions; do
19678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19679     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19681     break 2
19682   fi
19683 done
19684   done
19685 IFS=$as_save_IFS
19686 
19687   ;;
19688 esac
19689 fi
19690 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19691 if test -n "$ac_pt_PKG_CONFIG"; then
19692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19693 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19694 else
19695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19696 $as_echo "no" >&6; }
19697 fi
19698 
19699   if test "x$ac_pt_PKG_CONFIG" = x; then
19700     PKG_CONFIG=""
19701   else
19702     case $cross_compiling:$ac_tool_warned in
19703 yes:)
19704 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19705 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19706 ac_tool_warned=yes ;;
19707 esac
19708     PKG_CONFIG=$ac_pt_PKG_CONFIG
19709   fi
19710 else
19711   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19712 fi
19713 
19714 fi
19715 if test -n "$PKG_CONFIG"; then
19716         _pkg_min_version=0.9.0
19717         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19718 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19719         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19720                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19721 $as_echo "yes" >&6; }
19722         else
19723                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19724 $as_echo "no" >&6; }
19725                 PKG_CONFIG=""
19726         fi
19727 
19728 fi
19729 
19730 # After basic tools have been setup, we can check build os specific details.
19731 
19732   ###############################################################################
19733 
19734   # Note that this is the build platform OS version!
19735 
19736   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19737   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19738   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19739   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19740 
19741 
19742 
19743 
19744 
19745 # Setup builddeps, for automatic downloading of tools we need.
19746 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19747 # boot-jdk setup, but we need to have basic tools setup first.
19748 
19749 
19750 # Check whether --with-builddeps-conf was given.
19751 if test "${with_builddeps_conf+set}" = set; then :
19752   withval=$with_builddeps_conf;
19753 fi
19754 
19755 
19756 
19757 # Check whether --with-builddeps-server was given.
19758 if test "${with_builddeps_server+set}" = set; then :
19759   withval=$with_builddeps_server;
19760 fi
19761 
19762 
19763 
19764 # Check whether --with-builddeps-dir was given.
19765 if test "${with_builddeps_dir+set}" = set; then :
19766   withval=$with_builddeps_dir;
19767 else
19768   with_builddeps_dir=/localhome/builddeps
19769 fi
19770 
19771 
19772 
19773 # Check whether --with-builddeps-group was given.
19774 if test "${with_builddeps_group+set}" = set; then :
19775   withval=$with_builddeps_group;
19776 fi
19777 
19778 
19779 
19780 
19781   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19782     if test "x$with_builddeps_conf" != x; then
19783       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19784 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19785       builddepsfile=$with_builddeps_conf
19786       if test -s $builddepsfile; then
19787         . $builddepsfile
19788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19789 $as_echo "loaded!" >&6; }
19790       else
19791         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19792       fi
19793     else
19794       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19795 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19796       builddepsfile=`mktemp`
19797       touch $builddepsfile
19798       # Put all found confs into a single file.
19799       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19800       # Source the file to acquire the variables
19801       if test -s $builddepsfile; then
19802         . $builddepsfile
19803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19804 $as_echo "found at least one!" >&6; }
19805       else
19806         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19807       fi
19808     fi
19809     # Create build and target names that use _ instead of "-" and ".".
19810     # This is necessary to use them in variable names.
19811     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19812     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19813     # Extract rewrite information for build and target
19814     eval rewritten_build=\${REWRITE_${build_var}}
19815     if test "x$rewritten_build" = x; then
19816       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19817       echo Build stays the same $rewritten_build
19818     else
19819       echo Rewriting build for builddeps into $rewritten_build
19820     fi
19821     eval rewritten_target=\${REWRITE_${target_var}}
19822     if test "x$rewritten_target" = x; then
19823       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19824       echo Target stays the same $rewritten_target
19825     else
19826       echo Rewriting target for builddeps into $rewritten_target
19827     fi
19828     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19829     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19830   fi
19831   for ac_prog in 7z unzip
19832 do
19833   # Extract the first word of "$ac_prog", so it can be a program name with args.
19834 set dummy $ac_prog; ac_word=$2
19835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19836 $as_echo_n "checking for $ac_word... " >&6; }
19837 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19838   $as_echo_n "(cached) " >&6
19839 else
19840   if test -n "$BDEPS_UNZIP"; then
19841   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19842 else
19843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19844 for as_dir in $PATH
19845 do
19846   IFS=$as_save_IFS
19847   test -z "$as_dir" && as_dir=.
19848     for ac_exec_ext in '' $ac_executable_extensions; do
19849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19850     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19852     break 2
19853   fi
19854 done
19855   done
19856 IFS=$as_save_IFS
19857 
19858 fi
19859 fi
19860 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19861 if test -n "$BDEPS_UNZIP"; then
19862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19863 $as_echo "$BDEPS_UNZIP" >&6; }
19864 else
19865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19866 $as_echo "no" >&6; }
19867 fi
19868 
19869 
19870   test -n "$BDEPS_UNZIP" && break
19871 done
19872 
19873   if test "x$BDEPS_UNZIP" = x7z; then
19874     BDEPS_UNZIP="7z x"
19875   fi
19876 
19877   for ac_prog in wget lftp ftp
19878 do
19879   # Extract the first word of "$ac_prog", so it can be a program name with args.
19880 set dummy $ac_prog; ac_word=$2
19881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19882 $as_echo_n "checking for $ac_word... " >&6; }
19883 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19884   $as_echo_n "(cached) " >&6
19885 else
19886   if test -n "$BDEPS_FTP"; then
19887   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19888 else
19889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19890 for as_dir in $PATH
19891 do
19892   IFS=$as_save_IFS
19893   test -z "$as_dir" && as_dir=.
19894     for ac_exec_ext in '' $ac_executable_extensions; do
19895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19896     ac_cv_prog_BDEPS_FTP="$ac_prog"
19897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19898     break 2
19899   fi
19900 done
19901   done
19902 IFS=$as_save_IFS
19903 
19904 fi
19905 fi
19906 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19907 if test -n "$BDEPS_FTP"; then
19908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19909 $as_echo "$BDEPS_FTP" >&6; }
19910 else
19911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19912 $as_echo "no" >&6; }
19913 fi
19914 
19915 
19916   test -n "$BDEPS_FTP" && break
19917 done
19918 
19919 
19920 
19921 ###############################################################################
19922 #
19923 # Determine OpenJDK variants, options and version numbers.
19924 #
19925 ###############################################################################
19926 
19927 # We need build & target for this.
19928 
19929 
19930   ###############################################################################
19931   #
19932   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19933   # We always build headless support.
19934   #
19935   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19936 $as_echo_n "checking headful support... " >&6; }
19937   # Check whether --enable-headful was given.
19938 if test "${enable_headful+set}" = set; then :
19939   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19940 else
19941   SUPPORT_HEADFUL=yes
19942 fi
19943 
19944 
19945   SUPPORT_HEADLESS=yes
19946   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19947 
19948   if test "x$SUPPORT_HEADFUL" = xyes; then
19949     # We are building both headful and headless.
19950     headful_msg="include support for both headful and headless"
19951   fi
19952 
19953   if test "x$SUPPORT_HEADFUL" = xno; then
19954     # Thus we are building headless only.
19955     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19956     headful_msg="headless only"
19957   fi
19958 
19959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19960 $as_echo "$headful_msg" >&6; }
19961 
19962 
19963 
19964 
19965 
19966   # Control wether Hotspot runs Queens test after build.
19967   # Check whether --enable-hotspot-test-in-build was given.
19968 if test "${enable_hotspot_test_in_build+set}" = set; then :
19969   enableval=$enable_hotspot_test_in_build;
19970 else
19971   enable_hotspot_test_in_build=no
19972 fi
19973 
19974   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19975     TEST_IN_BUILD=true
19976   else
19977     TEST_IN_BUILD=false
19978   fi
19979 
19980 
19981   ###############################################################################
19982   #
19983   # Choose cacerts source file
19984   #
19985 
19986 # Check whether --with-cacerts-file was given.
19987 if test "${with_cacerts_file+set}" = set; then :
19988   withval=$with_cacerts_file;
19989 fi
19990 
19991   if test "x$with_cacerts_file" != x; then
19992     CACERTS_FILE=$with_cacerts_file
19993   fi
19994 
19995 
19996   ###############################################################################
19997   #
19998   # Enable or disable unlimited crypto
19999   #
20000   # Check whether --enable-unlimited-crypto was given.
20001 if test "${enable_unlimited_crypto+set}" = set; then :
20002   enableval=$enable_unlimited_crypto;
20003 else
20004   enable_unlimited_crypto=no
20005 fi
20006 
20007   if test "x$enable_unlimited_crypto" = "xyes"; then
20008     UNLIMITED_CRYPTO=true
20009   else
20010     UNLIMITED_CRYPTO=false
20011   fi
20012 
20013 
20014   ###############################################################################
20015   #
20016   # Enable or disable the elliptic curve crypto implementation
20017   #
20018 
20019 
20020   ###############################################################################
20021   #
20022   # --enable-rmiconnector-iiop
20023   #
20024   # Check whether --enable-rmiconnector-iiop was given.
20025 if test "${enable_rmiconnector_iiop+set}" = set; then :
20026   enableval=$enable_rmiconnector_iiop;
20027 fi
20028 
20029   if test "x$enable_rmiconnector_iiop" = "xyes"; then
20030     RMICONNECTOR_IIOP=true
20031   else
20032     RMICONNECTOR_IIOP=false
20033   fi
20034 
20035 
20036   ###############################################################################
20037   #
20038   # Compress jars
20039   #
20040   COMPRESS_JARS=false
20041 
20042 
20043 
20044 
20045   # Source the version numbers
20046   . $AUTOCONF_DIR/version-numbers
20047 
20048   # Get the settings from parameters
20049 
20050 # Check whether --with-milestone was given.
20051 if test "${with_milestone+set}" = set; then :
20052   withval=$with_milestone;
20053 fi
20054 
20055   if test "x$with_milestone" = xyes; then
20056     as_fn_error $? "Milestone must have a value" "$LINENO" 5
20057   elif test "x$with_milestone" != x; then
20058     MILESTONE="$with_milestone"
20059   fi
20060   if test "x$MILESTONE" = x; then
20061     MILESTONE=internal
20062   fi
20063 
20064 
20065 # Check whether --with-update-version was given.
20066 if test "${with_update_version+set}" = set; then :
20067   withval=$with_update_version;
20068 fi
20069 
20070   if test "x$with_update_version" = xyes; then
20071     as_fn_error $? "Update version must have a value" "$LINENO" 5
20072   elif test "x$with_update_version" != x; then
20073     JDK_UPDATE_VERSION="$with_update_version"
20074     # On macosx 10.7, it's not possible to set --with-update-version=0X due
20075     # to a bug in expr (which reduces it to just X). To work around this, we
20076     # always add a 0 to one digit update versions.
20077     if test "${#JDK_UPDATE_VERSION}" = "1"; then
20078       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20079     fi
20080   fi
20081 
20082 
20083 # Check whether --with-user-release-suffix was given.
20084 if test "${with_user_release_suffix+set}" = set; then :
20085   withval=$with_user_release_suffix;
20086 fi
20087 
20088   if test "x$with_user_release_suffix" = xyes; then
20089     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20090   elif test "x$with_user_release_suffix" != x; then
20091     USER_RELEASE_SUFFIX="$with_user_release_suffix"
20092   fi
20093 
20094 
20095 # Check whether --with-build-number was given.
20096 if test "${with_build_number+set}" = set; then :
20097   withval=$with_build_number;
20098 fi
20099 
20100   if test "x$with_build_number" = xyes; then
20101     as_fn_error $? "Build number must have a value" "$LINENO" 5
20102   elif test "x$with_build_number" != x; then
20103     JDK_BUILD_NUMBER="$with_build_number"
20104   fi
20105   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20106   if test "x$JDK_BUILD_NUMBER" = x; then
20107     JDK_BUILD_NUMBER=b00
20108     if test "x$USER_RELEASE_SUFFIX" = x; then
20109       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20110       # Avoid [:alnum:] since it depends on the locale.
20111       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20112       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20113     fi
20114   fi
20115 
20116   # Now set the JDK version, milestone, build number etc.
20117 
20118 
20119 
20120 
20121 
20122 
20123 
20124 
20125 
20126 
20127 
20128 
20129 
20130 
20131 
20132 
20133 # Check whether --with-copyright-year was given.
20134 if test "${with_copyright_year+set}" = set; then :
20135   withval=$with_copyright_year;
20136 fi
20137 
20138   if test "x$with_copyright_year" = xyes; then
20139     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20140   elif test "x$with_copyright_year" != x; then
20141     COPYRIGHT_YEAR="$with_copyright_year"
20142   else
20143     COPYRIGHT_YEAR=`date +'%Y'`
20144   fi
20145 
20146 
20147   if test "x$JDK_UPDATE_VERSION" != x; then
20148     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20149   else
20150     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20151   fi
20152 
20153 
20154   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20155 
20156 
20157 
20158 ###############################################################################
20159 #
20160 # Setup BootJDK, used to bootstrap the build.
20161 #
20162 ###############################################################################
20163 
20164 
20165   BOOT_JDK_FOUND=no
20166 
20167 # Check whether --with-boot-jdk was given.
20168 if test "${with_boot_jdk+set}" = set; then :
20169   withval=$with_boot_jdk;
20170 fi
20171 
20172 
20173   # We look for the Boot JDK through various means, going from more certain to
20174   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20175   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20176   # must check if this is indeed valid; otherwise we'll continue looking.
20177 
20178   # Test: Is bootjdk explicitely set by command line arguments?
20179 
20180   if test "x$BOOT_JDK_FOUND" = xno; then
20181     # Now execute the test
20182 
20183   if test "x$with_boot_jdk" != x; then
20184     BOOT_JDK=$with_boot_jdk
20185     BOOT_JDK_FOUND=maybe
20186     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20187 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20188   fi
20189 
20190 
20191     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20192     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20193       # Do we have a bin/java?
20194       if test ! -x "$BOOT_JDK/bin/java"; then
20195         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20196 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20197         BOOT_JDK_FOUND=no
20198       else
20199         # Do we have a bin/javac?
20200         if test ! -x "$BOOT_JDK/bin/javac"; then
20201           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20202 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20203           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20204 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20205           BOOT_JDK_FOUND=no
20206         else
20207           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20208           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20209 
20210           # Extra M4 quote needed to protect [] in grep expression.
20211           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20212           if test "x$FOUND_CORRECT_VERSION" = x; then
20213             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20214 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20215             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20216 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20217             BOOT_JDK_FOUND=no
20218           else
20219             # We're done! :-)
20220             BOOT_JDK_FOUND=yes
20221 
20222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20223 
20224   # Input might be given as Windows format, start by converting to
20225   # unix format.
20226   path="$BOOT_JDK"
20227   new_path=`$CYGPATH -u "$path"`
20228 
20229   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20230   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20231   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20232   # "foo.exe" is OK but "foo" is an error.
20233   #
20234   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20235   # It is also a way to make sure we got the proper file name for the real test later on.
20236   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20237   if test "x$test_shortpath" = x; then
20238     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20239 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20240     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20241   fi
20242 
20243   # Call helper function which possibly converts this using DOS-style short mode.
20244   # If so, the updated path is stored in $new_path.
20245 
20246   input_path="$new_path"
20247   # Check if we need to convert this using DOS-style short mode. If the path
20248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20249   # take no chances and rewrite it.
20250   # Note: m4 eats our [], so we need to use [ and ] instead.
20251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20252   if test "x$has_forbidden_chars" != x; then
20253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20257       # Going to short mode and back again did indeed matter. Since short mode is
20258       # case insensitive, let's make it lowercase to improve readability.
20259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20260       # Now convert it back to Unix-stile (cygpath)
20261       input_path=`$CYGPATH -u "$shortmode_path"`
20262       new_path="$input_path"
20263     fi
20264   fi
20265 
20266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20267   if test "x$test_cygdrive_prefix" = x; then
20268     # As a simple fix, exclude /usr/bin since it's not a real path.
20269     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20271       # a path prefixed by /cygdrive for fixpath to work.
20272       new_path="$CYGWIN_ROOT_PATH$input_path"
20273     fi
20274   fi
20275 
20276 
20277   if test "x$path" != "x$new_path"; then
20278     BOOT_JDK="$new_path"
20279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20280 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20281   fi
20282 
20283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20284 
20285   path="$BOOT_JDK"
20286   has_colon=`$ECHO $path | $GREP ^.:`
20287   new_path="$path"
20288   if test "x$has_colon" = x; then
20289     # Not in mixed or Windows style, start by that.
20290     new_path=`cmd //c echo $path`
20291   fi
20292 
20293 
20294   input_path="$new_path"
20295   # Check if we need to convert this using DOS-style short mode. If the path
20296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20297   # take no chances and rewrite it.
20298   # Note: m4 eats our [], so we need to use [ and ] instead.
20299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20300   if test "x$has_forbidden_chars" != x; then
20301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20303   fi
20304 
20305 
20306   windows_path="$new_path"
20307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20308     unix_path=`$CYGPATH -u "$windows_path"`
20309     new_path="$unix_path"
20310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20312     new_path="$unix_path"
20313   fi
20314 
20315   if test "x$path" != "x$new_path"; then
20316     BOOT_JDK="$new_path"
20317     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20318 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20319   fi
20320 
20321   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20322   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20323 
20324   else
20325     # We're on a unix platform. Hooray! :)
20326     path="$BOOT_JDK"
20327     has_space=`$ECHO "$path" | $GREP " "`
20328     if test "x$has_space" != x; then
20329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20330 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20331       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20332     fi
20333 
20334     # Use eval to expand a potential ~
20335     eval path="$path"
20336     if test ! -f "$path" && test ! -d "$path"; then
20337       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20338     fi
20339 
20340     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20341   fi
20342 
20343             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20344 $as_echo_n "checking for Boot JDK... " >&6; }
20345             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20346 $as_echo "$BOOT_JDK" >&6; }
20347             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20348 $as_echo_n "checking Boot JDK version... " >&6; }
20349             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20350             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20351 $as_echo "$BOOT_JDK_VERSION" >&6; }
20352           fi # end check jdk version
20353         fi # end check javac
20354       fi # end check java
20355     fi # end check boot jdk found
20356   fi
20357 
20358   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20359     # Having specified an argument which is incorrect will produce an instant failure;
20360     # we should not go on looking
20361     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20362   fi
20363 
20364   # Test: Is bootjdk available from builddeps?
20365 
20366   if test "x$BOOT_JDK_FOUND" = xno; then
20367     # Now execute the test
20368 
20369 
20370 
20371   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20372     # Source the builddeps file again, to make sure it uses the latest variables!
20373     . $builddepsfile
20374     # Look for a target and build machine specific resource!
20375     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20376     if test "x$resource" = x; then
20377       # Ok, lets instead look for a target specific resource
20378       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20379     fi
20380     if test "x$resource" = x; then
20381       # Ok, lets instead look for a build specific resource
20382       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20383     fi
20384     if test "x$resource" = x; then
20385       # Ok, lets instead look for a generic resource
20386       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20387       resource=${builddep_bootjdk}
20388     fi
20389     if test "x$resource" != x; then
20390       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20391 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20392       # If the resource in the builddeps.conf file is an existing directory,
20393       # for example /java/linux/cups
20394       if test -d ${resource}; then
20395         depdir=${resource}
20396       else
20397 
20398   # bootjdk is for example mymodule
20399   # $resource is for example libs/general/libmymod_1_2_3.zip
20400   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20401   # $with_builddeps_dir is for example /localhome/builddeps
20402   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20403   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20404   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20405   filename=`basename $resource`
20406   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20407   filebase=${filename%%.*}
20408   extension=${filename#*.}
20409   installdir=$with_builddeps_dir/$filebase
20410   if test ! -f $installdir/$filename.unpacked; then
20411     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20412 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20413     if test ! -d $installdir; then
20414       mkdir -p $installdir
20415     fi
20416     if test ! -d $installdir; then
20417       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20418     fi
20419     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20420     touch $tmpfile
20421     if test ! -f $tmpfile; then
20422       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20423     fi
20424 
20425   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20426   # $tmpfile is the local file name for the downloaded file.
20427   VALID_TOOL=no
20428   if test "x$BDEPS_FTP" = xwget; then
20429     VALID_TOOL=yes
20430     wget -O $tmpfile $with_builddeps_server/$resource
20431   fi
20432   if test "x$BDEPS_FTP" = xlftp; then
20433     VALID_TOOL=yes
20434     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20435   fi
20436   if test "x$BDEPS_FTP" = xftp; then
20437     VALID_TOOL=yes
20438     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20439     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20440     FTPUSERPWD=${FTPSERVER%%@*}
20441     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20442       FTPUSER=${userpwd%%:*}
20443       FTPPWD=${userpwd#*@}
20444       FTPSERVER=${FTPSERVER#*@}
20445     else
20446       FTPUSER=ftp
20447       FTPPWD=ftp
20448     fi
20449     # the "pass" command does not work on some
20450     # ftp clients (read ftp.exe) but if it works,
20451     # passive mode is better!
20452     ( \
20453         echo "user $FTPUSER $FTPPWD"        ; \
20454         echo "pass"                         ; \
20455         echo "bin"                          ; \
20456         echo "get $FTPPATH $tmpfile"              ; \
20457     ) | ftp -in $FTPSERVER
20458   fi
20459   if test "x$VALID_TOOL" != xyes; then
20460     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20461   fi
20462 
20463     mv $tmpfile $installdir/$filename
20464     if test ! -s $installdir/$filename; then
20465       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20466     fi
20467     case "$extension" in
20468       zip)  echo "Unzipping $installdir/$filename..."
20469         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20470         ;;
20471       tar.gz) echo "Untaring $installdir/$filename..."
20472         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20473         ;;
20474       tgz) echo "Untaring $installdir/$filename..."
20475         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20476         ;;
20477       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20478         ;;
20479     esac
20480   fi
20481   if test -f $installdir/$filename.unpacked; then
20482     depdir=$installdir
20483   fi
20484 
20485       fi
20486       # Source the builddeps file again, because in the previous command, the depdir
20487       # was updated to point at the current build dependency install directory.
20488       . $builddepsfile
20489       # Now extract variables from the builddeps.conf files.
20490       theroot=${builddep_bootjdk_ROOT}
20491       thecflags=${builddep_bootjdk_CFLAGS}
20492       thelibs=${builddep_bootjdk_LIBS}
20493       if test "x$depdir" = x; then
20494         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20495       fi
20496       BOOT_JDK=$depdir
20497       if test "x$theroot" != x; then
20498         BOOT_JDK="$theroot"
20499       fi
20500       if test "x$thecflags" != x; then
20501         BOOT_JDK_CFLAGS="$thecflags"
20502       fi
20503       if test "x$thelibs" != x; then
20504         BOOT_JDK_LIBS="$thelibs"
20505       fi
20506       BOOT_JDK_FOUND=maybe
20507       else BOOT_JDK_FOUND=no
20508 
20509     fi
20510     else BOOT_JDK_FOUND=no
20511 
20512   fi
20513 
20514 
20515 
20516     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20517     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20518       # Do we have a bin/java?
20519       if test ! -x "$BOOT_JDK/bin/java"; then
20520         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20521 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20522         BOOT_JDK_FOUND=no
20523       else
20524         # Do we have a bin/javac?
20525         if test ! -x "$BOOT_JDK/bin/javac"; then
20526           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20527 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20528           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20529 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20530           BOOT_JDK_FOUND=no
20531         else
20532           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20533           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20534 
20535           # Extra M4 quote needed to protect [] in grep expression.
20536           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20537           if test "x$FOUND_CORRECT_VERSION" = x; then
20538             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20539 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20540             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20541 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20542             BOOT_JDK_FOUND=no
20543           else
20544             # We're done! :-)
20545             BOOT_JDK_FOUND=yes
20546 
20547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20548 
20549   # Input might be given as Windows format, start by converting to
20550   # unix format.
20551   path="$BOOT_JDK"
20552   new_path=`$CYGPATH -u "$path"`
20553 
20554   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20555   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20556   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20557   # "foo.exe" is OK but "foo" is an error.
20558   #
20559   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20560   # It is also a way to make sure we got the proper file name for the real test later on.
20561   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20562   if test "x$test_shortpath" = x; then
20563     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20564 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20565     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20566   fi
20567 
20568   # Call helper function which possibly converts this using DOS-style short mode.
20569   # If so, the updated path is stored in $new_path.
20570 
20571   input_path="$new_path"
20572   # Check if we need to convert this using DOS-style short mode. If the path
20573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20574   # take no chances and rewrite it.
20575   # Note: m4 eats our [], so we need to use [ and ] instead.
20576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20577   if test "x$has_forbidden_chars" != x; then
20578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20579     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20580     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20581     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20582       # Going to short mode and back again did indeed matter. Since short mode is
20583       # case insensitive, let's make it lowercase to improve readability.
20584       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20585       # Now convert it back to Unix-stile (cygpath)
20586       input_path=`$CYGPATH -u "$shortmode_path"`
20587       new_path="$input_path"
20588     fi
20589   fi
20590 
20591   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20592   if test "x$test_cygdrive_prefix" = x; then
20593     # As a simple fix, exclude /usr/bin since it's not a real path.
20594     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20595       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20596       # a path prefixed by /cygdrive for fixpath to work.
20597       new_path="$CYGWIN_ROOT_PATH$input_path"
20598     fi
20599   fi
20600 
20601 
20602   if test "x$path" != "x$new_path"; then
20603     BOOT_JDK="$new_path"
20604     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20605 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20606   fi
20607 
20608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20609 
20610   path="$BOOT_JDK"
20611   has_colon=`$ECHO $path | $GREP ^.:`
20612   new_path="$path"
20613   if test "x$has_colon" = x; then
20614     # Not in mixed or Windows style, start by that.
20615     new_path=`cmd //c echo $path`
20616   fi
20617 
20618 
20619   input_path="$new_path"
20620   # Check if we need to convert this using DOS-style short mode. If the path
20621   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20622   # take no chances and rewrite it.
20623   # Note: m4 eats our [], so we need to use [ and ] instead.
20624   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20625   if test "x$has_forbidden_chars" != x; then
20626     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20627     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20628   fi
20629 
20630 
20631   windows_path="$new_path"
20632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20633     unix_path=`$CYGPATH -u "$windows_path"`
20634     new_path="$unix_path"
20635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20637     new_path="$unix_path"
20638   fi
20639 
20640   if test "x$path" != "x$new_path"; then
20641     BOOT_JDK="$new_path"
20642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20643 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20644   fi
20645 
20646   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20647   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20648 
20649   else
20650     # We're on a unix platform. Hooray! :)
20651     path="$BOOT_JDK"
20652     has_space=`$ECHO "$path" | $GREP " "`
20653     if test "x$has_space" != x; then
20654       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20655 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20656       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20657     fi
20658 
20659     # Use eval to expand a potential ~
20660     eval path="$path"
20661     if test ! -f "$path" && test ! -d "$path"; then
20662       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20663     fi
20664 
20665     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20666   fi
20667 
20668             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20669 $as_echo_n "checking for Boot JDK... " >&6; }
20670             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20671 $as_echo "$BOOT_JDK" >&6; }
20672             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20673 $as_echo_n "checking Boot JDK version... " >&6; }
20674             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20675             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20676 $as_echo "$BOOT_JDK_VERSION" >&6; }
20677           fi # end check jdk version
20678         fi # end check javac
20679       fi # end check java
20680     fi # end check boot jdk found
20681   fi
20682 
20683 
20684   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20685 
20686   if test "x$BOOT_JDK_FOUND" = xno; then
20687     # Now execute the test
20688 
20689   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20690     # First check at user selected default
20691 
20692   if test "x$BOOT_JDK_FOUND" = xno; then
20693     # Now execute the test
20694 
20695   if test -x /usr/libexec/java_home; then
20696     BOOT_JDK=`/usr/libexec/java_home `
20697     BOOT_JDK_FOUND=maybe
20698     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20699 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20700   fi
20701 
20702 
20703     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20704     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20705       # Do we have a bin/java?
20706       if test ! -x "$BOOT_JDK/bin/java"; then
20707         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20708 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20709         BOOT_JDK_FOUND=no
20710       else
20711         # Do we have a bin/javac?
20712         if test ! -x "$BOOT_JDK/bin/javac"; then
20713           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20714 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20715           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20716 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20717           BOOT_JDK_FOUND=no
20718         else
20719           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20720           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20721 
20722           # Extra M4 quote needed to protect [] in grep expression.
20723           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20724           if test "x$FOUND_CORRECT_VERSION" = x; then
20725             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20727             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20728 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20729             BOOT_JDK_FOUND=no
20730           else
20731             # We're done! :-)
20732             BOOT_JDK_FOUND=yes
20733 
20734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20735 
20736   # Input might be given as Windows format, start by converting to
20737   # unix format.
20738   path="$BOOT_JDK"
20739   new_path=`$CYGPATH -u "$path"`
20740 
20741   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20742   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20743   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20744   # "foo.exe" is OK but "foo" is an error.
20745   #
20746   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20747   # It is also a way to make sure we got the proper file name for the real test later on.
20748   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20749   if test "x$test_shortpath" = x; then
20750     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20751 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20752     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20753   fi
20754 
20755   # Call helper function which possibly converts this using DOS-style short mode.
20756   # If so, the updated path is stored in $new_path.
20757 
20758   input_path="$new_path"
20759   # Check if we need to convert this using DOS-style short mode. If the path
20760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20761   # take no chances and rewrite it.
20762   # Note: m4 eats our [], so we need to use [ and ] instead.
20763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20764   if test "x$has_forbidden_chars" != x; then
20765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20766     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20767     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20768     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20769       # Going to short mode and back again did indeed matter. Since short mode is
20770       # case insensitive, let's make it lowercase to improve readability.
20771       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20772       # Now convert it back to Unix-stile (cygpath)
20773       input_path=`$CYGPATH -u "$shortmode_path"`
20774       new_path="$input_path"
20775     fi
20776   fi
20777 
20778   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20779   if test "x$test_cygdrive_prefix" = x; then
20780     # As a simple fix, exclude /usr/bin since it's not a real path.
20781     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20782       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20783       # a path prefixed by /cygdrive for fixpath to work.
20784       new_path="$CYGWIN_ROOT_PATH$input_path"
20785     fi
20786   fi
20787 
20788 
20789   if test "x$path" != "x$new_path"; then
20790     BOOT_JDK="$new_path"
20791     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20792 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20793   fi
20794 
20795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20796 
20797   path="$BOOT_JDK"
20798   has_colon=`$ECHO $path | $GREP ^.:`
20799   new_path="$path"
20800   if test "x$has_colon" = x; then
20801     # Not in mixed or Windows style, start by that.
20802     new_path=`cmd //c echo $path`
20803   fi
20804 
20805 
20806   input_path="$new_path"
20807   # Check if we need to convert this using DOS-style short mode. If the path
20808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20809   # take no chances and rewrite it.
20810   # Note: m4 eats our [], so we need to use [ and ] instead.
20811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20812   if test "x$has_forbidden_chars" != x; then
20813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20814     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20815   fi
20816 
20817 
20818   windows_path="$new_path"
20819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20820     unix_path=`$CYGPATH -u "$windows_path"`
20821     new_path="$unix_path"
20822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20824     new_path="$unix_path"
20825   fi
20826 
20827   if test "x$path" != "x$new_path"; then
20828     BOOT_JDK="$new_path"
20829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20830 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20831   fi
20832 
20833   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20834   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20835 
20836   else
20837     # We're on a unix platform. Hooray! :)
20838     path="$BOOT_JDK"
20839     has_space=`$ECHO "$path" | $GREP " "`
20840     if test "x$has_space" != x; then
20841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20842 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20843       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20844     fi
20845 
20846     # Use eval to expand a potential ~
20847     eval path="$path"
20848     if test ! -f "$path" && test ! -d "$path"; then
20849       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20850     fi
20851 
20852     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20853   fi
20854 
20855             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20856 $as_echo_n "checking for Boot JDK... " >&6; }
20857             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20858 $as_echo "$BOOT_JDK" >&6; }
20859             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20860 $as_echo_n "checking Boot JDK version... " >&6; }
20861             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20863 $as_echo "$BOOT_JDK_VERSION" >&6; }
20864           fi # end check jdk version
20865         fi # end check javac
20866       fi # end check java
20867     fi # end check boot jdk found
20868   fi
20869 
20870     # If that did not work out (e.g. too old), try explicit versions instead
20871 
20872   if test "x$BOOT_JDK_FOUND" = xno; then
20873     # Now execute the test
20874 
20875   if test -x /usr/libexec/java_home; then
20876     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20877     BOOT_JDK_FOUND=maybe
20878     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20879 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20880   fi
20881 
20882 
20883     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20884     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20885       # Do we have a bin/java?
20886       if test ! -x "$BOOT_JDK/bin/java"; then
20887         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20888 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20889         BOOT_JDK_FOUND=no
20890       else
20891         # Do we have a bin/javac?
20892         if test ! -x "$BOOT_JDK/bin/javac"; then
20893           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20894 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20895           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20896 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20897           BOOT_JDK_FOUND=no
20898         else
20899           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20900           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20901 
20902           # Extra M4 quote needed to protect [] in grep expression.
20903           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20904           if test "x$FOUND_CORRECT_VERSION" = x; then
20905             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20906 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20907             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20908 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20909             BOOT_JDK_FOUND=no
20910           else
20911             # We're done! :-)
20912             BOOT_JDK_FOUND=yes
20913 
20914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20915 
20916   # Input might be given as Windows format, start by converting to
20917   # unix format.
20918   path="$BOOT_JDK"
20919   new_path=`$CYGPATH -u "$path"`
20920 
20921   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20922   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20923   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20924   # "foo.exe" is OK but "foo" is an error.
20925   #
20926   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20927   # It is also a way to make sure we got the proper file name for the real test later on.
20928   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20929   if test "x$test_shortpath" = x; then
20930     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20931 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20932     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20933   fi
20934 
20935   # Call helper function which possibly converts this using DOS-style short mode.
20936   # If so, the updated path is stored in $new_path.
20937 
20938   input_path="$new_path"
20939   # Check if we need to convert this using DOS-style short mode. If the path
20940   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20941   # take no chances and rewrite it.
20942   # Note: m4 eats our [], so we need to use [ and ] instead.
20943   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20944   if test "x$has_forbidden_chars" != x; then
20945     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20946     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20947     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20948     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20949       # Going to short mode and back again did indeed matter. Since short mode is
20950       # case insensitive, let's make it lowercase to improve readability.
20951       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20952       # Now convert it back to Unix-stile (cygpath)
20953       input_path=`$CYGPATH -u "$shortmode_path"`
20954       new_path="$input_path"
20955     fi
20956   fi
20957 
20958   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20959   if test "x$test_cygdrive_prefix" = x; then
20960     # As a simple fix, exclude /usr/bin since it's not a real path.
20961     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20962       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20963       # a path prefixed by /cygdrive for fixpath to work.
20964       new_path="$CYGWIN_ROOT_PATH$input_path"
20965     fi
20966   fi
20967 
20968 
20969   if test "x$path" != "x$new_path"; then
20970     BOOT_JDK="$new_path"
20971     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20972 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20973   fi
20974 
20975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20976 
20977   path="$BOOT_JDK"
20978   has_colon=`$ECHO $path | $GREP ^.:`
20979   new_path="$path"
20980   if test "x$has_colon" = x; then
20981     # Not in mixed or Windows style, start by that.
20982     new_path=`cmd //c echo $path`
20983   fi
20984 
20985 
20986   input_path="$new_path"
20987   # Check if we need to convert this using DOS-style short mode. If the path
20988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20989   # take no chances and rewrite it.
20990   # Note: m4 eats our [], so we need to use [ and ] instead.
20991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20992   if test "x$has_forbidden_chars" != x; then
20993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20995   fi
20996 
20997 
20998   windows_path="$new_path"
20999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21000     unix_path=`$CYGPATH -u "$windows_path"`
21001     new_path="$unix_path"
21002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21004     new_path="$unix_path"
21005   fi
21006 
21007   if test "x$path" != "x$new_path"; then
21008     BOOT_JDK="$new_path"
21009     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21010 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21011   fi
21012 
21013   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21014   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21015 
21016   else
21017     # We're on a unix platform. Hooray! :)
21018     path="$BOOT_JDK"
21019     has_space=`$ECHO "$path" | $GREP " "`
21020     if test "x$has_space" != x; then
21021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21022 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21023       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21024     fi
21025 
21026     # Use eval to expand a potential ~
21027     eval path="$path"
21028     if test ! -f "$path" && test ! -d "$path"; then
21029       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21030     fi
21031 
21032     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21033   fi
21034 
21035             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21036 $as_echo_n "checking for Boot JDK... " >&6; }
21037             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21038 $as_echo "$BOOT_JDK" >&6; }
21039             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21040 $as_echo_n "checking Boot JDK version... " >&6; }
21041             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21042             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21043 $as_echo "$BOOT_JDK_VERSION" >&6; }
21044           fi # end check jdk version
21045         fi # end check javac
21046       fi # end check java
21047     fi # end check boot jdk found
21048   fi
21049 
21050 
21051   if test "x$BOOT_JDK_FOUND" = xno; then
21052     # Now execute the test
21053 
21054   if test -x /usr/libexec/java_home; then
21055     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21056     BOOT_JDK_FOUND=maybe
21057     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21058 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21059   fi
21060 
21061 
21062     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21063     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21064       # Do we have a bin/java?
21065       if test ! -x "$BOOT_JDK/bin/java"; then
21066         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21067 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21068         BOOT_JDK_FOUND=no
21069       else
21070         # Do we have a bin/javac?
21071         if test ! -x "$BOOT_JDK/bin/javac"; then
21072           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21073 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21074           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21075 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21076           BOOT_JDK_FOUND=no
21077         else
21078           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21079           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21080 
21081           # Extra M4 quote needed to protect [] in grep expression.
21082           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21083           if test "x$FOUND_CORRECT_VERSION" = x; then
21084             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21085 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21086             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21087 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21088             BOOT_JDK_FOUND=no
21089           else
21090             # We're done! :-)
21091             BOOT_JDK_FOUND=yes
21092 
21093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21094 
21095   # Input might be given as Windows format, start by converting to
21096   # unix format.
21097   path="$BOOT_JDK"
21098   new_path=`$CYGPATH -u "$path"`
21099 
21100   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21101   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21102   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21103   # "foo.exe" is OK but "foo" is an error.
21104   #
21105   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21106   # It is also a way to make sure we got the proper file name for the real test later on.
21107   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21108   if test "x$test_shortpath" = x; then
21109     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21110 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21111     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21112   fi
21113 
21114   # Call helper function which possibly converts this using DOS-style short mode.
21115   # If so, the updated path is stored in $new_path.
21116 
21117   input_path="$new_path"
21118   # Check if we need to convert this using DOS-style short mode. If the path
21119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21120   # take no chances and rewrite it.
21121   # Note: m4 eats our [], so we need to use [ and ] instead.
21122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21123   if test "x$has_forbidden_chars" != x; then
21124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21125     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21126     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21127     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21128       # Going to short mode and back again did indeed matter. Since short mode is
21129       # case insensitive, let's make it lowercase to improve readability.
21130       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21131       # Now convert it back to Unix-stile (cygpath)
21132       input_path=`$CYGPATH -u "$shortmode_path"`
21133       new_path="$input_path"
21134     fi
21135   fi
21136 
21137   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21138   if test "x$test_cygdrive_prefix" = x; then
21139     # As a simple fix, exclude /usr/bin since it's not a real path.
21140     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21141       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21142       # a path prefixed by /cygdrive for fixpath to work.
21143       new_path="$CYGWIN_ROOT_PATH$input_path"
21144     fi
21145   fi
21146 
21147 
21148   if test "x$path" != "x$new_path"; then
21149     BOOT_JDK="$new_path"
21150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21151 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21152   fi
21153 
21154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21155 
21156   path="$BOOT_JDK"
21157   has_colon=`$ECHO $path | $GREP ^.:`
21158   new_path="$path"
21159   if test "x$has_colon" = x; then
21160     # Not in mixed or Windows style, start by that.
21161     new_path=`cmd //c echo $path`
21162   fi
21163 
21164 
21165   input_path="$new_path"
21166   # Check if we need to convert this using DOS-style short mode. If the path
21167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21168   # take no chances and rewrite it.
21169   # Note: m4 eats our [], so we need to use [ and ] instead.
21170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21171   if test "x$has_forbidden_chars" != x; then
21172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21173     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21174   fi
21175 
21176 
21177   windows_path="$new_path"
21178   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21179     unix_path=`$CYGPATH -u "$windows_path"`
21180     new_path="$unix_path"
21181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21182     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21183     new_path="$unix_path"
21184   fi
21185 
21186   if test "x$path" != "x$new_path"; then
21187     BOOT_JDK="$new_path"
21188     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21189 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21190   fi
21191 
21192   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21193   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21194 
21195   else
21196     # We're on a unix platform. Hooray! :)
21197     path="$BOOT_JDK"
21198     has_space=`$ECHO "$path" | $GREP " "`
21199     if test "x$has_space" != x; then
21200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21201 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21202       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21203     fi
21204 
21205     # Use eval to expand a potential ~
21206     eval path="$path"
21207     if test ! -f "$path" && test ! -d "$path"; then
21208       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21209     fi
21210 
21211     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21212   fi
21213 
21214             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21215 $as_echo_n "checking for Boot JDK... " >&6; }
21216             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21217 $as_echo "$BOOT_JDK" >&6; }
21218             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21219 $as_echo_n "checking Boot JDK version... " >&6; }
21220             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21221             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21222 $as_echo "$BOOT_JDK_VERSION" >&6; }
21223           fi # end check jdk version
21224         fi # end check javac
21225       fi # end check java
21226     fi # end check boot jdk found
21227   fi
21228 
21229 
21230   if test "x$BOOT_JDK_FOUND" = xno; then
21231     # Now execute the test
21232 
21233   if test -x /usr/libexec/java_home; then
21234     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21235     BOOT_JDK_FOUND=maybe
21236     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21237 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21238   fi
21239 
21240 
21241     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21242     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21243       # Do we have a bin/java?
21244       if test ! -x "$BOOT_JDK/bin/java"; then
21245         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21246 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21247         BOOT_JDK_FOUND=no
21248       else
21249         # Do we have a bin/javac?
21250         if test ! -x "$BOOT_JDK/bin/javac"; then
21251           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21253           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21254 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21255           BOOT_JDK_FOUND=no
21256         else
21257           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21258           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21259 
21260           # Extra M4 quote needed to protect [] in grep expression.
21261           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21262           if test "x$FOUND_CORRECT_VERSION" = x; then
21263             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21264 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21265             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21266 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21267             BOOT_JDK_FOUND=no
21268           else
21269             # We're done! :-)
21270             BOOT_JDK_FOUND=yes
21271 
21272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21273 
21274   # Input might be given as Windows format, start by converting to
21275   # unix format.
21276   path="$BOOT_JDK"
21277   new_path=`$CYGPATH -u "$path"`
21278 
21279   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21280   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21281   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21282   # "foo.exe" is OK but "foo" is an error.
21283   #
21284   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21285   # It is also a way to make sure we got the proper file name for the real test later on.
21286   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21287   if test "x$test_shortpath" = x; then
21288     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21289 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21290     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21291   fi
21292 
21293   # Call helper function which possibly converts this using DOS-style short mode.
21294   # If so, the updated path is stored in $new_path.
21295 
21296   input_path="$new_path"
21297   # Check if we need to convert this using DOS-style short mode. If the path
21298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21299   # take no chances and rewrite it.
21300   # Note: m4 eats our [], so we need to use [ and ] instead.
21301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21302   if test "x$has_forbidden_chars" != x; then
21303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21304     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21305     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21306     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21307       # Going to short mode and back again did indeed matter. Since short mode is
21308       # case insensitive, let's make it lowercase to improve readability.
21309       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21310       # Now convert it back to Unix-stile (cygpath)
21311       input_path=`$CYGPATH -u "$shortmode_path"`
21312       new_path="$input_path"
21313     fi
21314   fi
21315 
21316   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21317   if test "x$test_cygdrive_prefix" = x; then
21318     # As a simple fix, exclude /usr/bin since it's not a real path.
21319     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21320       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21321       # a path prefixed by /cygdrive for fixpath to work.
21322       new_path="$CYGWIN_ROOT_PATH$input_path"
21323     fi
21324   fi
21325 
21326 
21327   if test "x$path" != "x$new_path"; then
21328     BOOT_JDK="$new_path"
21329     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21330 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21331   fi
21332 
21333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21334 
21335   path="$BOOT_JDK"
21336   has_colon=`$ECHO $path | $GREP ^.:`
21337   new_path="$path"
21338   if test "x$has_colon" = x; then
21339     # Not in mixed or Windows style, start by that.
21340     new_path=`cmd //c echo $path`
21341   fi
21342 
21343 
21344   input_path="$new_path"
21345   # Check if we need to convert this using DOS-style short mode. If the path
21346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21347   # take no chances and rewrite it.
21348   # Note: m4 eats our [], so we need to use [ and ] instead.
21349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21350   if test "x$has_forbidden_chars" != x; then
21351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21352     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21353   fi
21354 
21355 
21356   windows_path="$new_path"
21357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21358     unix_path=`$CYGPATH -u "$windows_path"`
21359     new_path="$unix_path"
21360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21362     new_path="$unix_path"
21363   fi
21364 
21365   if test "x$path" != "x$new_path"; then
21366     BOOT_JDK="$new_path"
21367     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21368 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21369   fi
21370 
21371   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21372   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21373 
21374   else
21375     # We're on a unix platform. Hooray! :)
21376     path="$BOOT_JDK"
21377     has_space=`$ECHO "$path" | $GREP " "`
21378     if test "x$has_space" != x; then
21379       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21380 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21381       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21382     fi
21383 
21384     # Use eval to expand a potential ~
21385     eval path="$path"
21386     if test ! -f "$path" && test ! -d "$path"; then
21387       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21388     fi
21389 
21390     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21391   fi
21392 
21393             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21394 $as_echo_n "checking for Boot JDK... " >&6; }
21395             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21396 $as_echo "$BOOT_JDK" >&6; }
21397             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21398 $as_echo_n "checking Boot JDK version... " >&6; }
21399             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21400             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21401 $as_echo "$BOOT_JDK_VERSION" >&6; }
21402           fi # end check jdk version
21403         fi # end check javac
21404       fi # end check java
21405     fi # end check boot jdk found
21406   fi
21407 
21408   fi
21409 
21410 
21411     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21412     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21413       # Do we have a bin/java?
21414       if test ! -x "$BOOT_JDK/bin/java"; then
21415         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21416 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21417         BOOT_JDK_FOUND=no
21418       else
21419         # Do we have a bin/javac?
21420         if test ! -x "$BOOT_JDK/bin/javac"; then
21421           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21422 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21423           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21424 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21425           BOOT_JDK_FOUND=no
21426         else
21427           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21428           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21429 
21430           # Extra M4 quote needed to protect [] in grep expression.
21431           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21432           if test "x$FOUND_CORRECT_VERSION" = x; then
21433             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21435             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21436 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21437             BOOT_JDK_FOUND=no
21438           else
21439             # We're done! :-)
21440             BOOT_JDK_FOUND=yes
21441 
21442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21443 
21444   # Input might be given as Windows format, start by converting to
21445   # unix format.
21446   path="$BOOT_JDK"
21447   new_path=`$CYGPATH -u "$path"`
21448 
21449   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21450   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21451   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21452   # "foo.exe" is OK but "foo" is an error.
21453   #
21454   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21455   # It is also a way to make sure we got the proper file name for the real test later on.
21456   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21457   if test "x$test_shortpath" = x; then
21458     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21459 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21460     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21461   fi
21462 
21463   # Call helper function which possibly converts this using DOS-style short mode.
21464   # If so, the updated path is stored in $new_path.
21465 
21466   input_path="$new_path"
21467   # Check if we need to convert this using DOS-style short mode. If the path
21468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21469   # take no chances and rewrite it.
21470   # Note: m4 eats our [], so we need to use [ and ] instead.
21471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21472   if test "x$has_forbidden_chars" != x; then
21473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21474     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21475     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21476     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21477       # Going to short mode and back again did indeed matter. Since short mode is
21478       # case insensitive, let's make it lowercase to improve readability.
21479       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21480       # Now convert it back to Unix-stile (cygpath)
21481       input_path=`$CYGPATH -u "$shortmode_path"`
21482       new_path="$input_path"
21483     fi
21484   fi
21485 
21486   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21487   if test "x$test_cygdrive_prefix" = x; then
21488     # As a simple fix, exclude /usr/bin since it's not a real path.
21489     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21490       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21491       # a path prefixed by /cygdrive for fixpath to work.
21492       new_path="$CYGWIN_ROOT_PATH$input_path"
21493     fi
21494   fi
21495 
21496 
21497   if test "x$path" != "x$new_path"; then
21498     BOOT_JDK="$new_path"
21499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21500 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21501   fi
21502 
21503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21504 
21505   path="$BOOT_JDK"
21506   has_colon=`$ECHO $path | $GREP ^.:`
21507   new_path="$path"
21508   if test "x$has_colon" = x; then
21509     # Not in mixed or Windows style, start by that.
21510     new_path=`cmd //c echo $path`
21511   fi
21512 
21513 
21514   input_path="$new_path"
21515   # Check if we need to convert this using DOS-style short mode. If the path
21516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21517   # take no chances and rewrite it.
21518   # Note: m4 eats our [], so we need to use [ and ] instead.
21519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21520   if test "x$has_forbidden_chars" != x; then
21521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21522     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21523   fi
21524 
21525 
21526   windows_path="$new_path"
21527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21528     unix_path=`$CYGPATH -u "$windows_path"`
21529     new_path="$unix_path"
21530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21532     new_path="$unix_path"
21533   fi
21534 
21535   if test "x$path" != "x$new_path"; then
21536     BOOT_JDK="$new_path"
21537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21538 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21539   fi
21540 
21541   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21542   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21543 
21544   else
21545     # We're on a unix platform. Hooray! :)
21546     path="$BOOT_JDK"
21547     has_space=`$ECHO "$path" | $GREP " "`
21548     if test "x$has_space" != x; then
21549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21550 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21551       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21552     fi
21553 
21554     # Use eval to expand a potential ~
21555     eval path="$path"
21556     if test ! -f "$path" && test ! -d "$path"; then
21557       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21558     fi
21559 
21560     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21561   fi
21562 
21563             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21564 $as_echo_n "checking for Boot JDK... " >&6; }
21565             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21566 $as_echo "$BOOT_JDK" >&6; }
21567             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21568 $as_echo_n "checking Boot JDK version... " >&6; }
21569             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21570             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21571 $as_echo "$BOOT_JDK_VERSION" >&6; }
21572           fi # end check jdk version
21573         fi # end check javac
21574       fi # end check java
21575     fi # end check boot jdk found
21576   fi
21577 
21578 
21579   # Test: Is $JAVA_HOME set?
21580 
21581   if test "x$BOOT_JDK_FOUND" = xno; then
21582     # Now execute the test
21583 
21584   if test "x$JAVA_HOME" != x; then
21585     JAVA_HOME_PROCESSED="$JAVA_HOME"
21586 
21587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21588 
21589   # Input might be given as Windows format, start by converting to
21590   # unix format.
21591   path="$JAVA_HOME_PROCESSED"
21592   new_path=`$CYGPATH -u "$path"`
21593 
21594   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21595   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21596   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21597   # "foo.exe" is OK but "foo" is an error.
21598   #
21599   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21600   # It is also a way to make sure we got the proper file name for the real test later on.
21601   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21602   if test "x$test_shortpath" = x; then
21603     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21604 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21605     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21606   fi
21607 
21608   # Call helper function which possibly converts this using DOS-style short mode.
21609   # If so, the updated path is stored in $new_path.
21610 
21611   input_path="$new_path"
21612   # Check if we need to convert this using DOS-style short mode. If the path
21613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21614   # take no chances and rewrite it.
21615   # Note: m4 eats our [], so we need to use [ and ] instead.
21616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21617   if test "x$has_forbidden_chars" != x; then
21618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21619     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21620     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21621     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21622       # Going to short mode and back again did indeed matter. Since short mode is
21623       # case insensitive, let's make it lowercase to improve readability.
21624       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21625       # Now convert it back to Unix-stile (cygpath)
21626       input_path=`$CYGPATH -u "$shortmode_path"`
21627       new_path="$input_path"
21628     fi
21629   fi
21630 
21631   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21632   if test "x$test_cygdrive_prefix" = x; then
21633     # As a simple fix, exclude /usr/bin since it's not a real path.
21634     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21635       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21636       # a path prefixed by /cygdrive for fixpath to work.
21637       new_path="$CYGWIN_ROOT_PATH$input_path"
21638     fi
21639   fi
21640 
21641 
21642   if test "x$path" != "x$new_path"; then
21643     JAVA_HOME_PROCESSED="$new_path"
21644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21645 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21646   fi
21647 
21648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21649 
21650   path="$JAVA_HOME_PROCESSED"
21651   has_colon=`$ECHO $path | $GREP ^.:`
21652   new_path="$path"
21653   if test "x$has_colon" = x; then
21654     # Not in mixed or Windows style, start by that.
21655     new_path=`cmd //c echo $path`
21656   fi
21657 
21658 
21659   input_path="$new_path"
21660   # Check if we need to convert this using DOS-style short mode. If the path
21661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21662   # take no chances and rewrite it.
21663   # Note: m4 eats our [], so we need to use [ and ] instead.
21664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21665   if test "x$has_forbidden_chars" != x; then
21666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21667     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21668   fi
21669 
21670 
21671   windows_path="$new_path"
21672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21673     unix_path=`$CYGPATH -u "$windows_path"`
21674     new_path="$unix_path"
21675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21677     new_path="$unix_path"
21678   fi
21679 
21680   if test "x$path" != "x$new_path"; then
21681     JAVA_HOME_PROCESSED="$new_path"
21682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21683 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21684   fi
21685 
21686   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21687   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21688 
21689   else
21690     # We're on a unix platform. Hooray! :)
21691     path="$JAVA_HOME_PROCESSED"
21692     has_space=`$ECHO "$path" | $GREP " "`
21693     if test "x$has_space" != x; then
21694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21695 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21696       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21697     fi
21698 
21699     # Use eval to expand a potential ~
21700     eval path="$path"
21701     if test ! -f "$path" && test ! -d "$path"; then
21702       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21703     fi
21704 
21705     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21706   fi
21707 
21708     if test ! -d "$JAVA_HOME_PROCESSED"; then
21709       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21710 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21711     else
21712       # Aha, the user has set a JAVA_HOME
21713       # let us use that as the Boot JDK.
21714       BOOT_JDK="$JAVA_HOME_PROCESSED"
21715       BOOT_JDK_FOUND=maybe
21716       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21717 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21718     fi
21719   fi
21720 
21721 
21722     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21723     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21724       # Do we have a bin/java?
21725       if test ! -x "$BOOT_JDK/bin/java"; then
21726         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21728         BOOT_JDK_FOUND=no
21729       else
21730         # Do we have a bin/javac?
21731         if test ! -x "$BOOT_JDK/bin/javac"; then
21732           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21733 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21734           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21735 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21736           BOOT_JDK_FOUND=no
21737         else
21738           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21739           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21740 
21741           # Extra M4 quote needed to protect [] in grep expression.
21742           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21743           if test "x$FOUND_CORRECT_VERSION" = x; then
21744             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21745 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21746             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21747 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21748             BOOT_JDK_FOUND=no
21749           else
21750             # We're done! :-)
21751             BOOT_JDK_FOUND=yes
21752 
21753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21754 
21755   # Input might be given as Windows format, start by converting to
21756   # unix format.
21757   path="$BOOT_JDK"
21758   new_path=`$CYGPATH -u "$path"`
21759 
21760   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21761   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21762   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21763   # "foo.exe" is OK but "foo" is an error.
21764   #
21765   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21766   # It is also a way to make sure we got the proper file name for the real test later on.
21767   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21768   if test "x$test_shortpath" = x; then
21769     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21770 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21771     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21772   fi
21773 
21774   # Call helper function which possibly converts this using DOS-style short mode.
21775   # If so, the updated path is stored in $new_path.
21776 
21777   input_path="$new_path"
21778   # Check if we need to convert this using DOS-style short mode. If the path
21779   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21780   # take no chances and rewrite it.
21781   # Note: m4 eats our [], so we need to use [ and ] instead.
21782   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21783   if test "x$has_forbidden_chars" != x; then
21784     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21785     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21786     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21787     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21788       # Going to short mode and back again did indeed matter. Since short mode is
21789       # case insensitive, let's make it lowercase to improve readability.
21790       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21791       # Now convert it back to Unix-stile (cygpath)
21792       input_path=`$CYGPATH -u "$shortmode_path"`
21793       new_path="$input_path"
21794     fi
21795   fi
21796 
21797   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21798   if test "x$test_cygdrive_prefix" = x; then
21799     # As a simple fix, exclude /usr/bin since it's not a real path.
21800     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21801       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21802       # a path prefixed by /cygdrive for fixpath to work.
21803       new_path="$CYGWIN_ROOT_PATH$input_path"
21804     fi
21805   fi
21806 
21807 
21808   if test "x$path" != "x$new_path"; then
21809     BOOT_JDK="$new_path"
21810     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21811 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21812   fi
21813 
21814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21815 
21816   path="$BOOT_JDK"
21817   has_colon=`$ECHO $path | $GREP ^.:`
21818   new_path="$path"
21819   if test "x$has_colon" = x; then
21820     # Not in mixed or Windows style, start by that.
21821     new_path=`cmd //c echo $path`
21822   fi
21823 
21824 
21825   input_path="$new_path"
21826   # Check if we need to convert this using DOS-style short mode. If the path
21827   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21828   # take no chances and rewrite it.
21829   # Note: m4 eats our [], so we need to use [ and ] instead.
21830   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21831   if test "x$has_forbidden_chars" != x; then
21832     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21833     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21834   fi
21835 
21836 
21837   windows_path="$new_path"
21838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21839     unix_path=`$CYGPATH -u "$windows_path"`
21840     new_path="$unix_path"
21841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21843     new_path="$unix_path"
21844   fi
21845 
21846   if test "x$path" != "x$new_path"; then
21847     BOOT_JDK="$new_path"
21848     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21849 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21850   fi
21851 
21852   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21853   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21854 
21855   else
21856     # We're on a unix platform. Hooray! :)
21857     path="$BOOT_JDK"
21858     has_space=`$ECHO "$path" | $GREP " "`
21859     if test "x$has_space" != x; then
21860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21861 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21862       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21863     fi
21864 
21865     # Use eval to expand a potential ~
21866     eval path="$path"
21867     if test ! -f "$path" && test ! -d "$path"; then
21868       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21869     fi
21870 
21871     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21872   fi
21873 
21874             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21875 $as_echo_n "checking for Boot JDK... " >&6; }
21876             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21877 $as_echo "$BOOT_JDK" >&6; }
21878             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21879 $as_echo_n "checking Boot JDK version... " >&6; }
21880             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21881             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21882 $as_echo "$BOOT_JDK_VERSION" >&6; }
21883           fi # end check jdk version
21884         fi # end check javac
21885       fi # end check java
21886     fi # end check boot jdk found
21887   fi
21888 
21889 
21890   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21891 
21892   if test "x$BOOT_JDK_FOUND" = xno; then
21893     # Now execute the test
21894 
21895   # Extract the first word of "javac", so it can be a program name with args.
21896 set dummy javac; ac_word=$2
21897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21898 $as_echo_n "checking for $ac_word... " >&6; }
21899 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21900   $as_echo_n "(cached) " >&6
21901 else
21902   case $JAVAC_CHECK in
21903   [\\/]* | ?:[\\/]*)
21904   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21905   ;;
21906   *)
21907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21908 for as_dir in $PATH
21909 do
21910   IFS=$as_save_IFS
21911   test -z "$as_dir" && as_dir=.
21912     for ac_exec_ext in '' $ac_executable_extensions; do
21913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21914     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21916     break 2
21917   fi
21918 done
21919   done
21920 IFS=$as_save_IFS
21921 
21922   ;;
21923 esac
21924 fi
21925 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21926 if test -n "$JAVAC_CHECK"; then
21927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21928 $as_echo "$JAVAC_CHECK" >&6; }
21929 else
21930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21931 $as_echo "no" >&6; }
21932 fi
21933 
21934 
21935   # Extract the first word of "java", so it can be a program name with args.
21936 set dummy java; ac_word=$2
21937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21938 $as_echo_n "checking for $ac_word... " >&6; }
21939 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21940   $as_echo_n "(cached) " >&6
21941 else
21942   case $JAVA_CHECK in
21943   [\\/]* | ?:[\\/]*)
21944   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21945   ;;
21946   *)
21947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21948 for as_dir in $PATH
21949 do
21950   IFS=$as_save_IFS
21951   test -z "$as_dir" && as_dir=.
21952     for ac_exec_ext in '' $ac_executable_extensions; do
21953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21954     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21956     break 2
21957   fi
21958 done
21959   done
21960 IFS=$as_save_IFS
21961 
21962   ;;
21963 esac
21964 fi
21965 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21966 if test -n "$JAVA_CHECK"; then
21967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21968 $as_echo "$JAVA_CHECK" >&6; }
21969 else
21970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21971 $as_echo "no" >&6; }
21972 fi
21973 
21974 
21975   BINARY="$JAVAC_CHECK"
21976   if test "x$JAVAC_CHECK" = x; then
21977     BINARY="$JAVA_CHECK"
21978   fi
21979   if test "x$BINARY" != x; then
21980     # So there is a java(c) binary, it might be part of a JDK.
21981     # Lets find the JDK/JRE directory by following symbolic links.
21982     # Linux/GNU systems often have links from /usr/bin/java to
21983     # /etc/alternatives/java to the real JDK binary.
21984 
21985   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21986     # Follow a chain of symbolic links. Use readlink
21987     # where it exists, else fall back to horribly
21988     # complicated shell code.
21989     if test "x$READLINK_TESTED" != yes; then
21990       # On MacOSX there is a readlink tool with a different
21991       # purpose than the GNU readlink tool. Check the found readlink.
21992       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21993       if test "x$ISGNU" = x; then
21994         # A readlink that we do not know how to use.
21995         # Are there other non-GNU readlinks out there?
21996         READLINK_TESTED=yes
21997         READLINK=
21998       fi
21999     fi
22000 
22001     if test "x$READLINK" != x; then
22002       BINARY=`$READLINK -f $BINARY`
22003     else
22004       # Save the current directory for restoring afterwards
22005       STARTDIR=$PWD
22006       COUNTER=0
22007       sym_link_dir=`$DIRNAME $BINARY`
22008       sym_link_file=`$BASENAME $BINARY`
22009       cd $sym_link_dir
22010       # Use -P flag to resolve symlinks in directories.
22011       cd `$THEPWDCMD -P`
22012       sym_link_dir=`$THEPWDCMD -P`
22013       # Resolve file symlinks
22014       while test $COUNTER -lt 20; do
22015         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22016         if test "x$ISLINK" == x; then
22017           # This is not a symbolic link! We are done!
22018           break
22019         fi
22020         # Again resolve directory symlinks since the target of the just found
22021         # link could be in a different directory
22022         cd `$DIRNAME $ISLINK`
22023         sym_link_dir=`$THEPWDCMD -P`
22024         sym_link_file=`$BASENAME $ISLINK`
22025         let COUNTER=COUNTER+1
22026       done
22027       cd $STARTDIR
22028       BINARY=$sym_link_dir/$sym_link_file
22029     fi
22030   fi
22031 
22032     BOOT_JDK=`dirname "$BINARY"`
22033     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22034     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22035       # Looks like we found ourselves an JDK
22036       BOOT_JDK_FOUND=maybe
22037       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22038 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22039     fi
22040   fi
22041 
22042 
22043     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22044     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22045       # Do we have a bin/java?
22046       if test ! -x "$BOOT_JDK/bin/java"; then
22047         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22048 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22049         BOOT_JDK_FOUND=no
22050       else
22051         # Do we have a bin/javac?
22052         if test ! -x "$BOOT_JDK/bin/javac"; then
22053           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22054 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22055           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22056 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22057           BOOT_JDK_FOUND=no
22058         else
22059           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22060           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22061 
22062           # Extra M4 quote needed to protect [] in grep expression.
22063           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22064           if test "x$FOUND_CORRECT_VERSION" = x; then
22065             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22066 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22067             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22068 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22069             BOOT_JDK_FOUND=no
22070           else
22071             # We're done! :-)
22072             BOOT_JDK_FOUND=yes
22073 
22074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22075 
22076   # Input might be given as Windows format, start by converting to
22077   # unix format.
22078   path="$BOOT_JDK"
22079   new_path=`$CYGPATH -u "$path"`
22080 
22081   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22082   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22083   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22084   # "foo.exe" is OK but "foo" is an error.
22085   #
22086   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22087   # It is also a way to make sure we got the proper file name for the real test later on.
22088   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22089   if test "x$test_shortpath" = x; then
22090     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22091 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22092     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22093   fi
22094 
22095   # Call helper function which possibly converts this using DOS-style short mode.
22096   # If so, the updated path is stored in $new_path.
22097 
22098   input_path="$new_path"
22099   # Check if we need to convert this using DOS-style short mode. If the path
22100   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22101   # take no chances and rewrite it.
22102   # Note: m4 eats our [], so we need to use [ and ] instead.
22103   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22104   if test "x$has_forbidden_chars" != x; then
22105     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22106     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22107     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22108     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22109       # Going to short mode and back again did indeed matter. Since short mode is
22110       # case insensitive, let's make it lowercase to improve readability.
22111       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22112       # Now convert it back to Unix-stile (cygpath)
22113       input_path=`$CYGPATH -u "$shortmode_path"`
22114       new_path="$input_path"
22115     fi
22116   fi
22117 
22118   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22119   if test "x$test_cygdrive_prefix" = x; then
22120     # As a simple fix, exclude /usr/bin since it's not a real path.
22121     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22122       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22123       # a path prefixed by /cygdrive for fixpath to work.
22124       new_path="$CYGWIN_ROOT_PATH$input_path"
22125     fi
22126   fi
22127 
22128 
22129   if test "x$path" != "x$new_path"; then
22130     BOOT_JDK="$new_path"
22131     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22132 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22133   fi
22134 
22135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22136 
22137   path="$BOOT_JDK"
22138   has_colon=`$ECHO $path | $GREP ^.:`
22139   new_path="$path"
22140   if test "x$has_colon" = x; then
22141     # Not in mixed or Windows style, start by that.
22142     new_path=`cmd //c echo $path`
22143   fi
22144 
22145 
22146   input_path="$new_path"
22147   # Check if we need to convert this using DOS-style short mode. If the path
22148   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22149   # take no chances and rewrite it.
22150   # Note: m4 eats our [], so we need to use [ and ] instead.
22151   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22152   if test "x$has_forbidden_chars" != x; then
22153     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22154     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22155   fi
22156 
22157 
22158   windows_path="$new_path"
22159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22160     unix_path=`$CYGPATH -u "$windows_path"`
22161     new_path="$unix_path"
22162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22164     new_path="$unix_path"
22165   fi
22166 
22167   if test "x$path" != "x$new_path"; then
22168     BOOT_JDK="$new_path"
22169     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22171   fi
22172 
22173   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22174   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22175 
22176   else
22177     # We're on a unix platform. Hooray! :)
22178     path="$BOOT_JDK"
22179     has_space=`$ECHO "$path" | $GREP " "`
22180     if test "x$has_space" != x; then
22181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22182 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22183       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22184     fi
22185 
22186     # Use eval to expand a potential ~
22187     eval path="$path"
22188     if test ! -f "$path" && test ! -d "$path"; then
22189       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22190     fi
22191 
22192     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22193   fi
22194 
22195             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22196 $as_echo_n "checking for Boot JDK... " >&6; }
22197             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22198 $as_echo "$BOOT_JDK" >&6; }
22199             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22200 $as_echo_n "checking Boot JDK version... " >&6; }
22201             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22202             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22203 $as_echo "$BOOT_JDK_VERSION" >&6; }
22204           fi # end check jdk version
22205         fi # end check javac
22206       fi # end check java
22207     fi # end check boot jdk found
22208   fi
22209 
22210 
22211   # Test: Is there a JDK installed in default, well-known locations?
22212 
22213   if test "x$BOOT_JDK_FOUND" = xno; then
22214     # Now execute the test
22215 
22216   if test "x$OPENJDK_TARGET_OS" = xwindows; then
22217 
22218   if test "x$BOOT_JDK_FOUND" = xno; then
22219     # Now execute the test
22220 
22221   if test "x$ProgramW6432" != x; then
22222     VIRTUAL_DIR="$ProgramW6432/Java"
22223 
22224   windows_path="$VIRTUAL_DIR"
22225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22226     unix_path=`$CYGPATH -u "$windows_path"`
22227     VIRTUAL_DIR="$unix_path"
22228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22230     VIRTUAL_DIR="$unix_path"
22231   fi
22232 
22233 
22234   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22235   BOOT_JDK_SUFFIX=""
22236   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22237   if test "x$ALL_JDKS_FOUND" != x; then
22238     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22239 
22240   if test "x$BOOT_JDK_FOUND" = xno; then
22241     # Now execute the test
22242 
22243         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22244         if test -d "$BOOT_JDK"; then
22245           BOOT_JDK_FOUND=maybe
22246           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22247 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22248         fi
22249 
22250 
22251     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22252     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22253       # Do we have a bin/java?
22254       if test ! -x "$BOOT_JDK/bin/java"; then
22255         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22257         BOOT_JDK_FOUND=no
22258       else
22259         # Do we have a bin/javac?
22260         if test ! -x "$BOOT_JDK/bin/javac"; then
22261           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22263           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22264 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22265           BOOT_JDK_FOUND=no
22266         else
22267           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22268           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22269 
22270           # Extra M4 quote needed to protect [] in grep expression.
22271           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22272           if test "x$FOUND_CORRECT_VERSION" = x; then
22273             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22274 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22275             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22276 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22277             BOOT_JDK_FOUND=no
22278           else
22279             # We're done! :-)
22280             BOOT_JDK_FOUND=yes
22281 
22282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22283 
22284   # Input might be given as Windows format, start by converting to
22285   # unix format.
22286   path="$BOOT_JDK"
22287   new_path=`$CYGPATH -u "$path"`
22288 
22289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22292   # "foo.exe" is OK but "foo" is an error.
22293   #
22294   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22295   # It is also a way to make sure we got the proper file name for the real test later on.
22296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22297   if test "x$test_shortpath" = x; then
22298     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22299 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22300     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22301   fi
22302 
22303   # Call helper function which possibly converts this using DOS-style short mode.
22304   # If so, the updated path is stored in $new_path.
22305 
22306   input_path="$new_path"
22307   # Check if we need to convert this using DOS-style short mode. If the path
22308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22309   # take no chances and rewrite it.
22310   # Note: m4 eats our [], so we need to use [ and ] instead.
22311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22312   if test "x$has_forbidden_chars" != x; then
22313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22314     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22315     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22316     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22317       # Going to short mode and back again did indeed matter. Since short mode is
22318       # case insensitive, let's make it lowercase to improve readability.
22319       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22320       # Now convert it back to Unix-stile (cygpath)
22321       input_path=`$CYGPATH -u "$shortmode_path"`
22322       new_path="$input_path"
22323     fi
22324   fi
22325 
22326   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22327   if test "x$test_cygdrive_prefix" = x; then
22328     # As a simple fix, exclude /usr/bin since it's not a real path.
22329     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22330       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22331       # a path prefixed by /cygdrive for fixpath to work.
22332       new_path="$CYGWIN_ROOT_PATH$input_path"
22333     fi
22334   fi
22335 
22336 
22337   if test "x$path" != "x$new_path"; then
22338     BOOT_JDK="$new_path"
22339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22341   fi
22342 
22343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22344 
22345   path="$BOOT_JDK"
22346   has_colon=`$ECHO $path | $GREP ^.:`
22347   new_path="$path"
22348   if test "x$has_colon" = x; then
22349     # Not in mixed or Windows style, start by that.
22350     new_path=`cmd //c echo $path`
22351   fi
22352 
22353 
22354   input_path="$new_path"
22355   # Check if we need to convert this using DOS-style short mode. If the path
22356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22357   # take no chances and rewrite it.
22358   # Note: m4 eats our [], so we need to use [ and ] instead.
22359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22360   if test "x$has_forbidden_chars" != x; then
22361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22362     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22363   fi
22364 
22365 
22366   windows_path="$new_path"
22367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22368     unix_path=`$CYGPATH -u "$windows_path"`
22369     new_path="$unix_path"
22370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22372     new_path="$unix_path"
22373   fi
22374 
22375   if test "x$path" != "x$new_path"; then
22376     BOOT_JDK="$new_path"
22377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22378 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22379   fi
22380 
22381   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22382   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22383 
22384   else
22385     # We're on a unix platform. Hooray! :)
22386     path="$BOOT_JDK"
22387     has_space=`$ECHO "$path" | $GREP " "`
22388     if test "x$has_space" != x; then
22389       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22390 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22391       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22392     fi
22393 
22394     # Use eval to expand a potential ~
22395     eval path="$path"
22396     if test ! -f "$path" && test ! -d "$path"; then
22397       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22398     fi
22399 
22400     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22401   fi
22402 
22403             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22404 $as_echo_n "checking for Boot JDK... " >&6; }
22405             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22406 $as_echo "$BOOT_JDK" >&6; }
22407             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22408 $as_echo_n "checking Boot JDK version... " >&6; }
22409             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22411 $as_echo "$BOOT_JDK_VERSION" >&6; }
22412           fi # end check jdk version
22413         fi # end check javac
22414       fi # end check java
22415     fi # end check boot jdk found
22416   fi
22417 
22418     done
22419   fi
22420 
22421   fi
22422 
22423 
22424     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22425     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22426       # Do we have a bin/java?
22427       if test ! -x "$BOOT_JDK/bin/java"; then
22428         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22430         BOOT_JDK_FOUND=no
22431       else
22432         # Do we have a bin/javac?
22433         if test ! -x "$BOOT_JDK/bin/javac"; then
22434           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22436           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22437 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22438           BOOT_JDK_FOUND=no
22439         else
22440           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22441           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22442 
22443           # Extra M4 quote needed to protect [] in grep expression.
22444           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22445           if test "x$FOUND_CORRECT_VERSION" = x; then
22446             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22448             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22449 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22450             BOOT_JDK_FOUND=no
22451           else
22452             # We're done! :-)
22453             BOOT_JDK_FOUND=yes
22454 
22455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22456 
22457   # Input might be given as Windows format, start by converting to
22458   # unix format.
22459   path="$BOOT_JDK"
22460   new_path=`$CYGPATH -u "$path"`
22461 
22462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22465   # "foo.exe" is OK but "foo" is an error.
22466   #
22467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22468   # It is also a way to make sure we got the proper file name for the real test later on.
22469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22470   if test "x$test_shortpath" = x; then
22471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22472 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22473     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22474   fi
22475 
22476   # Call helper function which possibly converts this using DOS-style short mode.
22477   # If so, the updated path is stored in $new_path.
22478 
22479   input_path="$new_path"
22480   # Check if we need to convert this using DOS-style short mode. If the path
22481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22482   # take no chances and rewrite it.
22483   # Note: m4 eats our [], so we need to use [ and ] instead.
22484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22485   if test "x$has_forbidden_chars" != x; then
22486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22490       # Going to short mode and back again did indeed matter. Since short mode is
22491       # case insensitive, let's make it lowercase to improve readability.
22492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22493       # Now convert it back to Unix-stile (cygpath)
22494       input_path=`$CYGPATH -u "$shortmode_path"`
22495       new_path="$input_path"
22496     fi
22497   fi
22498 
22499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22500   if test "x$test_cygdrive_prefix" = x; then
22501     # As a simple fix, exclude /usr/bin since it's not a real path.
22502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22504       # a path prefixed by /cygdrive for fixpath to work.
22505       new_path="$CYGWIN_ROOT_PATH$input_path"
22506     fi
22507   fi
22508 
22509 
22510   if test "x$path" != "x$new_path"; then
22511     BOOT_JDK="$new_path"
22512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22513 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22514   fi
22515 
22516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22517 
22518   path="$BOOT_JDK"
22519   has_colon=`$ECHO $path | $GREP ^.:`
22520   new_path="$path"
22521   if test "x$has_colon" = x; then
22522     # Not in mixed or Windows style, start by that.
22523     new_path=`cmd //c echo $path`
22524   fi
22525 
22526 
22527   input_path="$new_path"
22528   # Check if we need to convert this using DOS-style short mode. If the path
22529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22530   # take no chances and rewrite it.
22531   # Note: m4 eats our [], so we need to use [ and ] instead.
22532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22533   if test "x$has_forbidden_chars" != x; then
22534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22536   fi
22537 
22538 
22539   windows_path="$new_path"
22540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22541     unix_path=`$CYGPATH -u "$windows_path"`
22542     new_path="$unix_path"
22543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22545     new_path="$unix_path"
22546   fi
22547 
22548   if test "x$path" != "x$new_path"; then
22549     BOOT_JDK="$new_path"
22550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22551 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22552   fi
22553 
22554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22556 
22557   else
22558     # We're on a unix platform. Hooray! :)
22559     path="$BOOT_JDK"
22560     has_space=`$ECHO "$path" | $GREP " "`
22561     if test "x$has_space" != x; then
22562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22563 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22564       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22565     fi
22566 
22567     # Use eval to expand a potential ~
22568     eval path="$path"
22569     if test ! -f "$path" && test ! -d "$path"; then
22570       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22571     fi
22572 
22573     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22574   fi
22575 
22576             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22577 $as_echo_n "checking for Boot JDK... " >&6; }
22578             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22579 $as_echo "$BOOT_JDK" >&6; }
22580             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22581 $as_echo_n "checking Boot JDK version... " >&6; }
22582             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22583             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22584 $as_echo "$BOOT_JDK_VERSION" >&6; }
22585           fi # end check jdk version
22586         fi # end check javac
22587       fi # end check java
22588     fi # end check boot jdk found
22589   fi
22590 
22591 
22592   if test "x$BOOT_JDK_FOUND" = xno; then
22593     # Now execute the test
22594 
22595   if test "x$PROGRAMW6432" != x; then
22596     VIRTUAL_DIR="$PROGRAMW6432/Java"
22597 
22598   windows_path="$VIRTUAL_DIR"
22599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22600     unix_path=`$CYGPATH -u "$windows_path"`
22601     VIRTUAL_DIR="$unix_path"
22602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22604     VIRTUAL_DIR="$unix_path"
22605   fi
22606 
22607 
22608   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22609   BOOT_JDK_SUFFIX=""
22610   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22611   if test "x$ALL_JDKS_FOUND" != x; then
22612     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22613 
22614   if test "x$BOOT_JDK_FOUND" = xno; then
22615     # Now execute the test
22616 
22617         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22618         if test -d "$BOOT_JDK"; then
22619           BOOT_JDK_FOUND=maybe
22620           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22621 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22622         fi
22623 
22624 
22625     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22626     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22627       # Do we have a bin/java?
22628       if test ! -x "$BOOT_JDK/bin/java"; then
22629         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22631         BOOT_JDK_FOUND=no
22632       else
22633         # Do we have a bin/javac?
22634         if test ! -x "$BOOT_JDK/bin/javac"; then
22635           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22637           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22638 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22639           BOOT_JDK_FOUND=no
22640         else
22641           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22642           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22643 
22644           # Extra M4 quote needed to protect [] in grep expression.
22645           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22646           if test "x$FOUND_CORRECT_VERSION" = x; then
22647             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22649             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22650 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22651             BOOT_JDK_FOUND=no
22652           else
22653             # We're done! :-)
22654             BOOT_JDK_FOUND=yes
22655 
22656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22657 
22658   # Input might be given as Windows format, start by converting to
22659   # unix format.
22660   path="$BOOT_JDK"
22661   new_path=`$CYGPATH -u "$path"`
22662 
22663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22666   # "foo.exe" is OK but "foo" is an error.
22667   #
22668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22669   # It is also a way to make sure we got the proper file name for the real test later on.
22670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22671   if test "x$test_shortpath" = x; then
22672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22673 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22674     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22675   fi
22676 
22677   # Call helper function which possibly converts this using DOS-style short mode.
22678   # If so, the updated path is stored in $new_path.
22679 
22680   input_path="$new_path"
22681   # Check if we need to convert this using DOS-style short mode. If the path
22682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22683   # take no chances and rewrite it.
22684   # Note: m4 eats our [], so we need to use [ and ] instead.
22685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22686   if test "x$has_forbidden_chars" != x; then
22687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22691       # Going to short mode and back again did indeed matter. Since short mode is
22692       # case insensitive, let's make it lowercase to improve readability.
22693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22694       # Now convert it back to Unix-stile (cygpath)
22695       input_path=`$CYGPATH -u "$shortmode_path"`
22696       new_path="$input_path"
22697     fi
22698   fi
22699 
22700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22701   if test "x$test_cygdrive_prefix" = x; then
22702     # As a simple fix, exclude /usr/bin since it's not a real path.
22703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22705       # a path prefixed by /cygdrive for fixpath to work.
22706       new_path="$CYGWIN_ROOT_PATH$input_path"
22707     fi
22708   fi
22709 
22710 
22711   if test "x$path" != "x$new_path"; then
22712     BOOT_JDK="$new_path"
22713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22714 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22715   fi
22716 
22717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22718 
22719   path="$BOOT_JDK"
22720   has_colon=`$ECHO $path | $GREP ^.:`
22721   new_path="$path"
22722   if test "x$has_colon" = x; then
22723     # Not in mixed or Windows style, start by that.
22724     new_path=`cmd //c echo $path`
22725   fi
22726 
22727 
22728   input_path="$new_path"
22729   # Check if we need to convert this using DOS-style short mode. If the path
22730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22731   # take no chances and rewrite it.
22732   # Note: m4 eats our [], so we need to use [ and ] instead.
22733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22734   if test "x$has_forbidden_chars" != x; then
22735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22737   fi
22738 
22739 
22740   windows_path="$new_path"
22741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22742     unix_path=`$CYGPATH -u "$windows_path"`
22743     new_path="$unix_path"
22744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22746     new_path="$unix_path"
22747   fi
22748 
22749   if test "x$path" != "x$new_path"; then
22750     BOOT_JDK="$new_path"
22751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22752 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22753   fi
22754 
22755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22757 
22758   else
22759     # We're on a unix platform. Hooray! :)
22760     path="$BOOT_JDK"
22761     has_space=`$ECHO "$path" | $GREP " "`
22762     if test "x$has_space" != x; then
22763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22764 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22765       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22766     fi
22767 
22768     # Use eval to expand a potential ~
22769     eval path="$path"
22770     if test ! -f "$path" && test ! -d "$path"; then
22771       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22772     fi
22773 
22774     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22775   fi
22776 
22777             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22778 $as_echo_n "checking for Boot JDK... " >&6; }
22779             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22780 $as_echo "$BOOT_JDK" >&6; }
22781             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22782 $as_echo_n "checking Boot JDK version... " >&6; }
22783             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22784             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22785 $as_echo "$BOOT_JDK_VERSION" >&6; }
22786           fi # end check jdk version
22787         fi # end check javac
22788       fi # end check java
22789     fi # end check boot jdk found
22790   fi
22791 
22792     done
22793   fi
22794 
22795   fi
22796 
22797 
22798     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22799     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22800       # Do we have a bin/java?
22801       if test ! -x "$BOOT_JDK/bin/java"; then
22802         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22804         BOOT_JDK_FOUND=no
22805       else
22806         # Do we have a bin/javac?
22807         if test ! -x "$BOOT_JDK/bin/javac"; then
22808           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22810           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22811 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22812           BOOT_JDK_FOUND=no
22813         else
22814           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22815           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22816 
22817           # Extra M4 quote needed to protect [] in grep expression.
22818           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22819           if test "x$FOUND_CORRECT_VERSION" = x; then
22820             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22822             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22823 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22824             BOOT_JDK_FOUND=no
22825           else
22826             # We're done! :-)
22827             BOOT_JDK_FOUND=yes
22828 
22829   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22830 
22831   # Input might be given as Windows format, start by converting to
22832   # unix format.
22833   path="$BOOT_JDK"
22834   new_path=`$CYGPATH -u "$path"`
22835 
22836   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22837   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22838   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22839   # "foo.exe" is OK but "foo" is an error.
22840   #
22841   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22842   # It is also a way to make sure we got the proper file name for the real test later on.
22843   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22844   if test "x$test_shortpath" = x; then
22845     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22846 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22847     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22848   fi
22849 
22850   # Call helper function which possibly converts this using DOS-style short mode.
22851   # If so, the updated path is stored in $new_path.
22852 
22853   input_path="$new_path"
22854   # Check if we need to convert this using DOS-style short mode. If the path
22855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22856   # take no chances and rewrite it.
22857   # Note: m4 eats our [], so we need to use [ and ] instead.
22858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22859   if test "x$has_forbidden_chars" != x; then
22860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22861     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22862     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22863     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22864       # Going to short mode and back again did indeed matter. Since short mode is
22865       # case insensitive, let's make it lowercase to improve readability.
22866       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22867       # Now convert it back to Unix-stile (cygpath)
22868       input_path=`$CYGPATH -u "$shortmode_path"`
22869       new_path="$input_path"
22870     fi
22871   fi
22872 
22873   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22874   if test "x$test_cygdrive_prefix" = x; then
22875     # As a simple fix, exclude /usr/bin since it's not a real path.
22876     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22877       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22878       # a path prefixed by /cygdrive for fixpath to work.
22879       new_path="$CYGWIN_ROOT_PATH$input_path"
22880     fi
22881   fi
22882 
22883 
22884   if test "x$path" != "x$new_path"; then
22885     BOOT_JDK="$new_path"
22886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22887 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22888   fi
22889 
22890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22891 
22892   path="$BOOT_JDK"
22893   has_colon=`$ECHO $path | $GREP ^.:`
22894   new_path="$path"
22895   if test "x$has_colon" = x; then
22896     # Not in mixed or Windows style, start by that.
22897     new_path=`cmd //c echo $path`
22898   fi
22899 
22900 
22901   input_path="$new_path"
22902   # Check if we need to convert this using DOS-style short mode. If the path
22903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22904   # take no chances and rewrite it.
22905   # Note: m4 eats our [], so we need to use [ and ] instead.
22906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22907   if test "x$has_forbidden_chars" != x; then
22908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22909     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22910   fi
22911 
22912 
22913   windows_path="$new_path"
22914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22915     unix_path=`$CYGPATH -u "$windows_path"`
22916     new_path="$unix_path"
22917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22919     new_path="$unix_path"
22920   fi
22921 
22922   if test "x$path" != "x$new_path"; then
22923     BOOT_JDK="$new_path"
22924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22925 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22926   fi
22927 
22928   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22929   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22930 
22931   else
22932     # We're on a unix platform. Hooray! :)
22933     path="$BOOT_JDK"
22934     has_space=`$ECHO "$path" | $GREP " "`
22935     if test "x$has_space" != x; then
22936       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22937 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22938       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22939     fi
22940 
22941     # Use eval to expand a potential ~
22942     eval path="$path"
22943     if test ! -f "$path" && test ! -d "$path"; then
22944       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22945     fi
22946 
22947     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22948   fi
22949 
22950             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22951 $as_echo_n "checking for Boot JDK... " >&6; }
22952             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22953 $as_echo "$BOOT_JDK" >&6; }
22954             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22955 $as_echo_n "checking Boot JDK version... " >&6; }
22956             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22957             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22958 $as_echo "$BOOT_JDK_VERSION" >&6; }
22959           fi # end check jdk version
22960         fi # end check javac
22961       fi # end check java
22962     fi # end check boot jdk found
22963   fi
22964 
22965 
22966   if test "x$BOOT_JDK_FOUND" = xno; then
22967     # Now execute the test
22968 
22969   if test "x$PROGRAMFILES" != x; then
22970     VIRTUAL_DIR="$PROGRAMFILES/Java"
22971 
22972   windows_path="$VIRTUAL_DIR"
22973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22974     unix_path=`$CYGPATH -u "$windows_path"`
22975     VIRTUAL_DIR="$unix_path"
22976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22978     VIRTUAL_DIR="$unix_path"
22979   fi
22980 
22981 
22982   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22983   BOOT_JDK_SUFFIX=""
22984   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22985   if test "x$ALL_JDKS_FOUND" != x; then
22986     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22987 
22988   if test "x$BOOT_JDK_FOUND" = xno; then
22989     # Now execute the test
22990 
22991         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22992         if test -d "$BOOT_JDK"; then
22993           BOOT_JDK_FOUND=maybe
22994           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22995 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22996         fi
22997 
22998 
22999     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23000     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23001       # Do we have a bin/java?
23002       if test ! -x "$BOOT_JDK/bin/java"; then
23003         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23004 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23005         BOOT_JDK_FOUND=no
23006       else
23007         # Do we have a bin/javac?
23008         if test ! -x "$BOOT_JDK/bin/javac"; then
23009           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23010 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23011           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23012 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23013           BOOT_JDK_FOUND=no
23014         else
23015           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23016           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23017 
23018           # Extra M4 quote needed to protect [] in grep expression.
23019           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23020           if test "x$FOUND_CORRECT_VERSION" = x; then
23021             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23023             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23024 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23025             BOOT_JDK_FOUND=no
23026           else
23027             # We're done! :-)
23028             BOOT_JDK_FOUND=yes
23029 
23030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23031 
23032   # Input might be given as Windows format, start by converting to
23033   # unix format.
23034   path="$BOOT_JDK"
23035   new_path=`$CYGPATH -u "$path"`
23036 
23037   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23038   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23039   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23040   # "foo.exe" is OK but "foo" is an error.
23041   #
23042   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23043   # It is also a way to make sure we got the proper file name for the real test later on.
23044   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23045   if test "x$test_shortpath" = x; then
23046     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23047 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23048     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23049   fi
23050 
23051   # Call helper function which possibly converts this using DOS-style short mode.
23052   # If so, the updated path is stored in $new_path.
23053 
23054   input_path="$new_path"
23055   # Check if we need to convert this using DOS-style short mode. If the path
23056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23057   # take no chances and rewrite it.
23058   # Note: m4 eats our [], so we need to use [ and ] instead.
23059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23060   if test "x$has_forbidden_chars" != x; then
23061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23062     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23063     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23064     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23065       # Going to short mode and back again did indeed matter. Since short mode is
23066       # case insensitive, let's make it lowercase to improve readability.
23067       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23068       # Now convert it back to Unix-stile (cygpath)
23069       input_path=`$CYGPATH -u "$shortmode_path"`
23070       new_path="$input_path"
23071     fi
23072   fi
23073 
23074   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23075   if test "x$test_cygdrive_prefix" = x; then
23076     # As a simple fix, exclude /usr/bin since it's not a real path.
23077     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23078       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23079       # a path prefixed by /cygdrive for fixpath to work.
23080       new_path="$CYGWIN_ROOT_PATH$input_path"
23081     fi
23082   fi
23083 
23084 
23085   if test "x$path" != "x$new_path"; then
23086     BOOT_JDK="$new_path"
23087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23088 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23089   fi
23090 
23091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23092 
23093   path="$BOOT_JDK"
23094   has_colon=`$ECHO $path | $GREP ^.:`
23095   new_path="$path"
23096   if test "x$has_colon" = x; then
23097     # Not in mixed or Windows style, start by that.
23098     new_path=`cmd //c echo $path`
23099   fi
23100 
23101 
23102   input_path="$new_path"
23103   # Check if we need to convert this using DOS-style short mode. If the path
23104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23105   # take no chances and rewrite it.
23106   # Note: m4 eats our [], so we need to use [ and ] instead.
23107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23108   if test "x$has_forbidden_chars" != x; then
23109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23110     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23111   fi
23112 
23113 
23114   windows_path="$new_path"
23115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23116     unix_path=`$CYGPATH -u "$windows_path"`
23117     new_path="$unix_path"
23118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23120     new_path="$unix_path"
23121   fi
23122 
23123   if test "x$path" != "x$new_path"; then
23124     BOOT_JDK="$new_path"
23125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23126 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23127   fi
23128 
23129   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23130   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23131 
23132   else
23133     # We're on a unix platform. Hooray! :)
23134     path="$BOOT_JDK"
23135     has_space=`$ECHO "$path" | $GREP " "`
23136     if test "x$has_space" != x; then
23137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23138 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23139       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23140     fi
23141 
23142     # Use eval to expand a potential ~
23143     eval path="$path"
23144     if test ! -f "$path" && test ! -d "$path"; then
23145       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23146     fi
23147 
23148     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23149   fi
23150 
23151             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23152 $as_echo_n "checking for Boot JDK... " >&6; }
23153             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23154 $as_echo "$BOOT_JDK" >&6; }
23155             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23156 $as_echo_n "checking Boot JDK version... " >&6; }
23157             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23158             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23159 $as_echo "$BOOT_JDK_VERSION" >&6; }
23160           fi # end check jdk version
23161         fi # end check javac
23162       fi # end check java
23163     fi # end check boot jdk found
23164   fi
23165 
23166     done
23167   fi
23168 
23169   fi
23170 
23171 
23172     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23173     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23174       # Do we have a bin/java?
23175       if test ! -x "$BOOT_JDK/bin/java"; then
23176         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23177 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23178         BOOT_JDK_FOUND=no
23179       else
23180         # Do we have a bin/javac?
23181         if test ! -x "$BOOT_JDK/bin/javac"; then
23182           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23184           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23185 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23186           BOOT_JDK_FOUND=no
23187         else
23188           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23189           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23190 
23191           # Extra M4 quote needed to protect [] in grep expression.
23192           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23193           if test "x$FOUND_CORRECT_VERSION" = x; then
23194             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23196             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23197 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23198             BOOT_JDK_FOUND=no
23199           else
23200             # We're done! :-)
23201             BOOT_JDK_FOUND=yes
23202 
23203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23204 
23205   # Input might be given as Windows format, start by converting to
23206   # unix format.
23207   path="$BOOT_JDK"
23208   new_path=`$CYGPATH -u "$path"`
23209 
23210   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23211   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23212   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23213   # "foo.exe" is OK but "foo" is an error.
23214   #
23215   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23216   # It is also a way to make sure we got the proper file name for the real test later on.
23217   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23218   if test "x$test_shortpath" = x; then
23219     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23220 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23221     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23222   fi
23223 
23224   # Call helper function which possibly converts this using DOS-style short mode.
23225   # If so, the updated path is stored in $new_path.
23226 
23227   input_path="$new_path"
23228   # Check if we need to convert this using DOS-style short mode. If the path
23229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23230   # take no chances and rewrite it.
23231   # Note: m4 eats our [], so we need to use [ and ] instead.
23232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23233   if test "x$has_forbidden_chars" != x; then
23234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23238       # Going to short mode and back again did indeed matter. Since short mode is
23239       # case insensitive, let's make it lowercase to improve readability.
23240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23241       # Now convert it back to Unix-stile (cygpath)
23242       input_path=`$CYGPATH -u "$shortmode_path"`
23243       new_path="$input_path"
23244     fi
23245   fi
23246 
23247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23248   if test "x$test_cygdrive_prefix" = x; then
23249     # As a simple fix, exclude /usr/bin since it's not a real path.
23250     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23252       # a path prefixed by /cygdrive for fixpath to work.
23253       new_path="$CYGWIN_ROOT_PATH$input_path"
23254     fi
23255   fi
23256 
23257 
23258   if test "x$path" != "x$new_path"; then
23259     BOOT_JDK="$new_path"
23260     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23261 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23262   fi
23263 
23264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23265 
23266   path="$BOOT_JDK"
23267   has_colon=`$ECHO $path | $GREP ^.:`
23268   new_path="$path"
23269   if test "x$has_colon" = x; then
23270     # Not in mixed or Windows style, start by that.
23271     new_path=`cmd //c echo $path`
23272   fi
23273 
23274 
23275   input_path="$new_path"
23276   # Check if we need to convert this using DOS-style short mode. If the path
23277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23278   # take no chances and rewrite it.
23279   # Note: m4 eats our [], so we need to use [ and ] instead.
23280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23281   if test "x$has_forbidden_chars" != x; then
23282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23283     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23284   fi
23285 
23286 
23287   windows_path="$new_path"
23288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289     unix_path=`$CYGPATH -u "$windows_path"`
23290     new_path="$unix_path"
23291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23293     new_path="$unix_path"
23294   fi
23295 
23296   if test "x$path" != "x$new_path"; then
23297     BOOT_JDK="$new_path"
23298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23299 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23300   fi
23301 
23302   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23303   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23304 
23305   else
23306     # We're on a unix platform. Hooray! :)
23307     path="$BOOT_JDK"
23308     has_space=`$ECHO "$path" | $GREP " "`
23309     if test "x$has_space" != x; then
23310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23311 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23312       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23313     fi
23314 
23315     # Use eval to expand a potential ~
23316     eval path="$path"
23317     if test ! -f "$path" && test ! -d "$path"; then
23318       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23319     fi
23320 
23321     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23322   fi
23323 
23324             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23325 $as_echo_n "checking for Boot JDK... " >&6; }
23326             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23327 $as_echo "$BOOT_JDK" >&6; }
23328             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23329 $as_echo_n "checking Boot JDK version... " >&6; }
23330             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23331             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23332 $as_echo "$BOOT_JDK_VERSION" >&6; }
23333           fi # end check jdk version
23334         fi # end check javac
23335       fi # end check java
23336     fi # end check boot jdk found
23337   fi
23338 
23339 
23340   if test "x$BOOT_JDK_FOUND" = xno; then
23341     # Now execute the test
23342 
23343   if test "x$ProgramFiles" != x; then
23344     VIRTUAL_DIR="$ProgramFiles/Java"
23345 
23346   windows_path="$VIRTUAL_DIR"
23347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23348     unix_path=`$CYGPATH -u "$windows_path"`
23349     VIRTUAL_DIR="$unix_path"
23350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23352     VIRTUAL_DIR="$unix_path"
23353   fi
23354 
23355 
23356   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23357   BOOT_JDK_SUFFIX=""
23358   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23359   if test "x$ALL_JDKS_FOUND" != x; then
23360     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23361 
23362   if test "x$BOOT_JDK_FOUND" = xno; then
23363     # Now execute the test
23364 
23365         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23366         if test -d "$BOOT_JDK"; then
23367           BOOT_JDK_FOUND=maybe
23368           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23369 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23370         fi
23371 
23372 
23373     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23374     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23375       # Do we have a bin/java?
23376       if test ! -x "$BOOT_JDK/bin/java"; then
23377         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23379         BOOT_JDK_FOUND=no
23380       else
23381         # Do we have a bin/javac?
23382         if test ! -x "$BOOT_JDK/bin/javac"; then
23383           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23384 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23385           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23386 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23387           BOOT_JDK_FOUND=no
23388         else
23389           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23390           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23391 
23392           # Extra M4 quote needed to protect [] in grep expression.
23393           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23394           if test "x$FOUND_CORRECT_VERSION" = x; then
23395             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23396 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23397             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23398 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23399             BOOT_JDK_FOUND=no
23400           else
23401             # We're done! :-)
23402             BOOT_JDK_FOUND=yes
23403 
23404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23405 
23406   # Input might be given as Windows format, start by converting to
23407   # unix format.
23408   path="$BOOT_JDK"
23409   new_path=`$CYGPATH -u "$path"`
23410 
23411   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23412   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23413   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23414   # "foo.exe" is OK but "foo" is an error.
23415   #
23416   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23417   # It is also a way to make sure we got the proper file name for the real test later on.
23418   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23419   if test "x$test_shortpath" = x; then
23420     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23421 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23422     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23423   fi
23424 
23425   # Call helper function which possibly converts this using DOS-style short mode.
23426   # If so, the updated path is stored in $new_path.
23427 
23428   input_path="$new_path"
23429   # Check if we need to convert this using DOS-style short mode. If the path
23430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23431   # take no chances and rewrite it.
23432   # Note: m4 eats our [], so we need to use [ and ] instead.
23433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23434   if test "x$has_forbidden_chars" != x; then
23435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23436     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23437     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23438     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23439       # Going to short mode and back again did indeed matter. Since short mode is
23440       # case insensitive, let's make it lowercase to improve readability.
23441       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23442       # Now convert it back to Unix-stile (cygpath)
23443       input_path=`$CYGPATH -u "$shortmode_path"`
23444       new_path="$input_path"
23445     fi
23446   fi
23447 
23448   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23449   if test "x$test_cygdrive_prefix" = x; then
23450     # As a simple fix, exclude /usr/bin since it's not a real path.
23451     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23452       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23453       # a path prefixed by /cygdrive for fixpath to work.
23454       new_path="$CYGWIN_ROOT_PATH$input_path"
23455     fi
23456   fi
23457 
23458 
23459   if test "x$path" != "x$new_path"; then
23460     BOOT_JDK="$new_path"
23461     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23462 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23463   fi
23464 
23465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23466 
23467   path="$BOOT_JDK"
23468   has_colon=`$ECHO $path | $GREP ^.:`
23469   new_path="$path"
23470   if test "x$has_colon" = x; then
23471     # Not in mixed or Windows style, start by that.
23472     new_path=`cmd //c echo $path`
23473   fi
23474 
23475 
23476   input_path="$new_path"
23477   # Check if we need to convert this using DOS-style short mode. If the path
23478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23479   # take no chances and rewrite it.
23480   # Note: m4 eats our [], so we need to use [ and ] instead.
23481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23482   if test "x$has_forbidden_chars" != x; then
23483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23484     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23485   fi
23486 
23487 
23488   windows_path="$new_path"
23489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23490     unix_path=`$CYGPATH -u "$windows_path"`
23491     new_path="$unix_path"
23492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23494     new_path="$unix_path"
23495   fi
23496 
23497   if test "x$path" != "x$new_path"; then
23498     BOOT_JDK="$new_path"
23499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23500 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23501   fi
23502 
23503   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23504   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23505 
23506   else
23507     # We're on a unix platform. Hooray! :)
23508     path="$BOOT_JDK"
23509     has_space=`$ECHO "$path" | $GREP " "`
23510     if test "x$has_space" != x; then
23511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23512 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23513       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23514     fi
23515 
23516     # Use eval to expand a potential ~
23517     eval path="$path"
23518     if test ! -f "$path" && test ! -d "$path"; then
23519       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23520     fi
23521 
23522     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23523   fi
23524 
23525             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23526 $as_echo_n "checking for Boot JDK... " >&6; }
23527             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23528 $as_echo "$BOOT_JDK" >&6; }
23529             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23530 $as_echo_n "checking Boot JDK version... " >&6; }
23531             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23532             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23533 $as_echo "$BOOT_JDK_VERSION" >&6; }
23534           fi # end check jdk version
23535         fi # end check javac
23536       fi # end check java
23537     fi # end check boot jdk found
23538   fi
23539 
23540     done
23541   fi
23542 
23543   fi
23544 
23545 
23546     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23547     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23548       # Do we have a bin/java?
23549       if test ! -x "$BOOT_JDK/bin/java"; then
23550         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23551 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23552         BOOT_JDK_FOUND=no
23553       else
23554         # Do we have a bin/javac?
23555         if test ! -x "$BOOT_JDK/bin/javac"; then
23556           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23557 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23558           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23559 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23560           BOOT_JDK_FOUND=no
23561         else
23562           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23563           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23564 
23565           # Extra M4 quote needed to protect [] in grep expression.
23566           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23567           if test "x$FOUND_CORRECT_VERSION" = x; then
23568             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23569 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23570             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23571 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23572             BOOT_JDK_FOUND=no
23573           else
23574             # We're done! :-)
23575             BOOT_JDK_FOUND=yes
23576 
23577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23578 
23579   # Input might be given as Windows format, start by converting to
23580   # unix format.
23581   path="$BOOT_JDK"
23582   new_path=`$CYGPATH -u "$path"`
23583 
23584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23587   # "foo.exe" is OK but "foo" is an error.
23588   #
23589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23590   # It is also a way to make sure we got the proper file name for the real test later on.
23591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23592   if test "x$test_shortpath" = x; then
23593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23594 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23595     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23596   fi
23597 
23598   # Call helper function which possibly converts this using DOS-style short mode.
23599   # If so, the updated path is stored in $new_path.
23600 
23601   input_path="$new_path"
23602   # Check if we need to convert this using DOS-style short mode. If the path
23603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23604   # take no chances and rewrite it.
23605   # Note: m4 eats our [], so we need to use [ and ] instead.
23606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23607   if test "x$has_forbidden_chars" != x; then
23608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23612       # Going to short mode and back again did indeed matter. Since short mode is
23613       # case insensitive, let's make it lowercase to improve readability.
23614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23615       # Now convert it back to Unix-stile (cygpath)
23616       input_path=`$CYGPATH -u "$shortmode_path"`
23617       new_path="$input_path"
23618     fi
23619   fi
23620 
23621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23622   if test "x$test_cygdrive_prefix" = x; then
23623     # As a simple fix, exclude /usr/bin since it's not a real path.
23624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23626       # a path prefixed by /cygdrive for fixpath to work.
23627       new_path="$CYGWIN_ROOT_PATH$input_path"
23628     fi
23629   fi
23630 
23631 
23632   if test "x$path" != "x$new_path"; then
23633     BOOT_JDK="$new_path"
23634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23636   fi
23637 
23638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23639 
23640   path="$BOOT_JDK"
23641   has_colon=`$ECHO $path | $GREP ^.:`
23642   new_path="$path"
23643   if test "x$has_colon" = x; then
23644     # Not in mixed or Windows style, start by that.
23645     new_path=`cmd //c echo $path`
23646   fi
23647 
23648 
23649   input_path="$new_path"
23650   # Check if we need to convert this using DOS-style short mode. If the path
23651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23652   # take no chances and rewrite it.
23653   # Note: m4 eats our [], so we need to use [ and ] instead.
23654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23655   if test "x$has_forbidden_chars" != x; then
23656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23658   fi
23659 
23660 
23661   windows_path="$new_path"
23662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23663     unix_path=`$CYGPATH -u "$windows_path"`
23664     new_path="$unix_path"
23665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23667     new_path="$unix_path"
23668   fi
23669 
23670   if test "x$path" != "x$new_path"; then
23671     BOOT_JDK="$new_path"
23672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23673 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23674   fi
23675 
23676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23678 
23679   else
23680     # We're on a unix platform. Hooray! :)
23681     path="$BOOT_JDK"
23682     has_space=`$ECHO "$path" | $GREP " "`
23683     if test "x$has_space" != x; then
23684       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23685 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23686       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23687     fi
23688 
23689     # Use eval to expand a potential ~
23690     eval path="$path"
23691     if test ! -f "$path" && test ! -d "$path"; then
23692       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23693     fi
23694 
23695     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23696   fi
23697 
23698             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23699 $as_echo_n "checking for Boot JDK... " >&6; }
23700             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23701 $as_echo "$BOOT_JDK" >&6; }
23702             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23703 $as_echo_n "checking Boot JDK version... " >&6; }
23704             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23706 $as_echo "$BOOT_JDK_VERSION" >&6; }
23707           fi # end check jdk version
23708         fi # end check javac
23709       fi # end check java
23710     fi # end check boot jdk found
23711   fi
23712 
23713 
23714   if test "x$BOOT_JDK_FOUND" = xno; then
23715     # Now execute the test
23716 
23717   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23718   BOOT_JDK_SUFFIX=""
23719   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23720   if test "x$ALL_JDKS_FOUND" != x; then
23721     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23722 
23723   if test "x$BOOT_JDK_FOUND" = xno; then
23724     # Now execute the test
23725 
23726         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23727         if test -d "$BOOT_JDK"; then
23728           BOOT_JDK_FOUND=maybe
23729           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23730 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23731         fi
23732 
23733 
23734     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23735     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23736       # Do we have a bin/java?
23737       if test ! -x "$BOOT_JDK/bin/java"; then
23738         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23739 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23740         BOOT_JDK_FOUND=no
23741       else
23742         # Do we have a bin/javac?
23743         if test ! -x "$BOOT_JDK/bin/javac"; then
23744           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23745 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23746           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23747 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23748           BOOT_JDK_FOUND=no
23749         else
23750           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23751           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23752 
23753           # Extra M4 quote needed to protect [] in grep expression.
23754           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23755           if test "x$FOUND_CORRECT_VERSION" = x; then
23756             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23757 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23758             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23759 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23760             BOOT_JDK_FOUND=no
23761           else
23762             # We're done! :-)
23763             BOOT_JDK_FOUND=yes
23764 
23765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23766 
23767   # Input might be given as Windows format, start by converting to
23768   # unix format.
23769   path="$BOOT_JDK"
23770   new_path=`$CYGPATH -u "$path"`
23771 
23772   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23773   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23774   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23775   # "foo.exe" is OK but "foo" is an error.
23776   #
23777   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23778   # It is also a way to make sure we got the proper file name for the real test later on.
23779   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23780   if test "x$test_shortpath" = x; then
23781     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23782 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23783     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23784   fi
23785 
23786   # Call helper function which possibly converts this using DOS-style short mode.
23787   # If so, the updated path is stored in $new_path.
23788 
23789   input_path="$new_path"
23790   # Check if we need to convert this using DOS-style short mode. If the path
23791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23792   # take no chances and rewrite it.
23793   # Note: m4 eats our [], so we need to use [ and ] instead.
23794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23795   if test "x$has_forbidden_chars" != x; then
23796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23797     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23798     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23799     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23800       # Going to short mode and back again did indeed matter. Since short mode is
23801       # case insensitive, let's make it lowercase to improve readability.
23802       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23803       # Now convert it back to Unix-stile (cygpath)
23804       input_path=`$CYGPATH -u "$shortmode_path"`
23805       new_path="$input_path"
23806     fi
23807   fi
23808 
23809   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23810   if test "x$test_cygdrive_prefix" = x; then
23811     # As a simple fix, exclude /usr/bin since it's not a real path.
23812     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23813       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23814       # a path prefixed by /cygdrive for fixpath to work.
23815       new_path="$CYGWIN_ROOT_PATH$input_path"
23816     fi
23817   fi
23818 
23819 
23820   if test "x$path" != "x$new_path"; then
23821     BOOT_JDK="$new_path"
23822     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23823 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23824   fi
23825 
23826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23827 
23828   path="$BOOT_JDK"
23829   has_colon=`$ECHO $path | $GREP ^.:`
23830   new_path="$path"
23831   if test "x$has_colon" = x; then
23832     # Not in mixed or Windows style, start by that.
23833     new_path=`cmd //c echo $path`
23834   fi
23835 
23836 
23837   input_path="$new_path"
23838   # Check if we need to convert this using DOS-style short mode. If the path
23839   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23840   # take no chances and rewrite it.
23841   # Note: m4 eats our [], so we need to use [ and ] instead.
23842   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23843   if test "x$has_forbidden_chars" != x; then
23844     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23845     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23846   fi
23847 
23848 
23849   windows_path="$new_path"
23850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23851     unix_path=`$CYGPATH -u "$windows_path"`
23852     new_path="$unix_path"
23853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23855     new_path="$unix_path"
23856   fi
23857 
23858   if test "x$path" != "x$new_path"; then
23859     BOOT_JDK="$new_path"
23860     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23861 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23862   fi
23863 
23864   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23865   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23866 
23867   else
23868     # We're on a unix platform. Hooray! :)
23869     path="$BOOT_JDK"
23870     has_space=`$ECHO "$path" | $GREP " "`
23871     if test "x$has_space" != x; then
23872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23873 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23874       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23875     fi
23876 
23877     # Use eval to expand a potential ~
23878     eval path="$path"
23879     if test ! -f "$path" && test ! -d "$path"; then
23880       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23881     fi
23882 
23883     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23884   fi
23885 
23886             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23887 $as_echo_n "checking for Boot JDK... " >&6; }
23888             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23889 $as_echo "$BOOT_JDK" >&6; }
23890             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23891 $as_echo_n "checking Boot JDK version... " >&6; }
23892             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23893             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23894 $as_echo "$BOOT_JDK_VERSION" >&6; }
23895           fi # end check jdk version
23896         fi # end check javac
23897       fi # end check java
23898     fi # end check boot jdk found
23899   fi
23900 
23901     done
23902   fi
23903 
23904 
23905     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23906     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23907       # Do we have a bin/java?
23908       if test ! -x "$BOOT_JDK/bin/java"; then
23909         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23910 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23911         BOOT_JDK_FOUND=no
23912       else
23913         # Do we have a bin/javac?
23914         if test ! -x "$BOOT_JDK/bin/javac"; then
23915           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23916 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23917           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23918 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23919           BOOT_JDK_FOUND=no
23920         else
23921           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23922           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23923 
23924           # Extra M4 quote needed to protect [] in grep expression.
23925           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23926           if test "x$FOUND_CORRECT_VERSION" = x; then
23927             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23928 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23929             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23930 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23931             BOOT_JDK_FOUND=no
23932           else
23933             # We're done! :-)
23934             BOOT_JDK_FOUND=yes
23935 
23936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23937 
23938   # Input might be given as Windows format, start by converting to
23939   # unix format.
23940   path="$BOOT_JDK"
23941   new_path=`$CYGPATH -u "$path"`
23942 
23943   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23944   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23945   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23946   # "foo.exe" is OK but "foo" is an error.
23947   #
23948   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23949   # It is also a way to make sure we got the proper file name for the real test later on.
23950   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23951   if test "x$test_shortpath" = x; then
23952     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23953 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23954     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23955   fi
23956 
23957   # Call helper function which possibly converts this using DOS-style short mode.
23958   # If so, the updated path is stored in $new_path.
23959 
23960   input_path="$new_path"
23961   # Check if we need to convert this using DOS-style short mode. If the path
23962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23963   # take no chances and rewrite it.
23964   # Note: m4 eats our [], so we need to use [ and ] instead.
23965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23966   if test "x$has_forbidden_chars" != x; then
23967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23968     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23969     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23970     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23971       # Going to short mode and back again did indeed matter. Since short mode is
23972       # case insensitive, let's make it lowercase to improve readability.
23973       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23974       # Now convert it back to Unix-stile (cygpath)
23975       input_path=`$CYGPATH -u "$shortmode_path"`
23976       new_path="$input_path"
23977     fi
23978   fi
23979 
23980   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23981   if test "x$test_cygdrive_prefix" = x; then
23982     # As a simple fix, exclude /usr/bin since it's not a real path.
23983     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23984       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23985       # a path prefixed by /cygdrive for fixpath to work.
23986       new_path="$CYGWIN_ROOT_PATH$input_path"
23987     fi
23988   fi
23989 
23990 
23991   if test "x$path" != "x$new_path"; then
23992     BOOT_JDK="$new_path"
23993     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23994 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23995   fi
23996 
23997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23998 
23999   path="$BOOT_JDK"
24000   has_colon=`$ECHO $path | $GREP ^.:`
24001   new_path="$path"
24002   if test "x$has_colon" = x; then
24003     # Not in mixed or Windows style, start by that.
24004     new_path=`cmd //c echo $path`
24005   fi
24006 
24007 
24008   input_path="$new_path"
24009   # Check if we need to convert this using DOS-style short mode. If the path
24010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24011   # take no chances and rewrite it.
24012   # Note: m4 eats our [], so we need to use [ and ] instead.
24013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24014   if test "x$has_forbidden_chars" != x; then
24015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24016     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24017   fi
24018 
24019 
24020   windows_path="$new_path"
24021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24022     unix_path=`$CYGPATH -u "$windows_path"`
24023     new_path="$unix_path"
24024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24026     new_path="$unix_path"
24027   fi
24028 
24029   if test "x$path" != "x$new_path"; then
24030     BOOT_JDK="$new_path"
24031     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24032 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24033   fi
24034 
24035   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24036   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24037 
24038   else
24039     # We're on a unix platform. Hooray! :)
24040     path="$BOOT_JDK"
24041     has_space=`$ECHO "$path" | $GREP " "`
24042     if test "x$has_space" != x; then
24043       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24044 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24045       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24046     fi
24047 
24048     # Use eval to expand a potential ~
24049     eval path="$path"
24050     if test ! -f "$path" && test ! -d "$path"; then
24051       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24052     fi
24053 
24054     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24055   fi
24056 
24057             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24058 $as_echo_n "checking for Boot JDK... " >&6; }
24059             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24060 $as_echo "$BOOT_JDK" >&6; }
24061             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24062 $as_echo_n "checking Boot JDK version... " >&6; }
24063             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24064             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24065 $as_echo "$BOOT_JDK_VERSION" >&6; }
24066           fi # end check jdk version
24067         fi # end check javac
24068       fi # end check java
24069     fi # end check boot jdk found
24070   fi
24071 
24072   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24073 
24074   if test "x$BOOT_JDK_FOUND" = xno; then
24075     # Now execute the test
24076 
24077   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24078   BOOT_JDK_SUFFIX="/Contents/Home"
24079   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24080   if test "x$ALL_JDKS_FOUND" != x; then
24081     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24082 
24083   if test "x$BOOT_JDK_FOUND" = xno; then
24084     # Now execute the test
24085 
24086         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24087         if test -d "$BOOT_JDK"; then
24088           BOOT_JDK_FOUND=maybe
24089           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24090 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24091         fi
24092 
24093 
24094     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24095     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24096       # Do we have a bin/java?
24097       if test ! -x "$BOOT_JDK/bin/java"; then
24098         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24099 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24100         BOOT_JDK_FOUND=no
24101       else
24102         # Do we have a bin/javac?
24103         if test ! -x "$BOOT_JDK/bin/javac"; then
24104           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24105 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24106           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24107 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24108           BOOT_JDK_FOUND=no
24109         else
24110           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24111           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24112 
24113           # Extra M4 quote needed to protect [] in grep expression.
24114           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24115           if test "x$FOUND_CORRECT_VERSION" = x; then
24116             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24117 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24118             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24119 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24120             BOOT_JDK_FOUND=no
24121           else
24122             # We're done! :-)
24123             BOOT_JDK_FOUND=yes
24124 
24125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24126 
24127   # Input might be given as Windows format, start by converting to
24128   # unix format.
24129   path="$BOOT_JDK"
24130   new_path=`$CYGPATH -u "$path"`
24131 
24132   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24133   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24134   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24135   # "foo.exe" is OK but "foo" is an error.
24136   #
24137   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24138   # It is also a way to make sure we got the proper file name for the real test later on.
24139   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24140   if test "x$test_shortpath" = x; then
24141     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24142 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24143     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24144   fi
24145 
24146   # Call helper function which possibly converts this using DOS-style short mode.
24147   # If so, the updated path is stored in $new_path.
24148 
24149   input_path="$new_path"
24150   # Check if we need to convert this using DOS-style short mode. If the path
24151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24152   # take no chances and rewrite it.
24153   # Note: m4 eats our [], so we need to use [ and ] instead.
24154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24155   if test "x$has_forbidden_chars" != x; then
24156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24157     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24158     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24159     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24160       # Going to short mode and back again did indeed matter. Since short mode is
24161       # case insensitive, let's make it lowercase to improve readability.
24162       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24163       # Now convert it back to Unix-stile (cygpath)
24164       input_path=`$CYGPATH -u "$shortmode_path"`
24165       new_path="$input_path"
24166     fi
24167   fi
24168 
24169   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24170   if test "x$test_cygdrive_prefix" = x; then
24171     # As a simple fix, exclude /usr/bin since it's not a real path.
24172     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24173       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24174       # a path prefixed by /cygdrive for fixpath to work.
24175       new_path="$CYGWIN_ROOT_PATH$input_path"
24176     fi
24177   fi
24178 
24179 
24180   if test "x$path" != "x$new_path"; then
24181     BOOT_JDK="$new_path"
24182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24183 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24184   fi
24185 
24186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24187 
24188   path="$BOOT_JDK"
24189   has_colon=`$ECHO $path | $GREP ^.:`
24190   new_path="$path"
24191   if test "x$has_colon" = x; then
24192     # Not in mixed or Windows style, start by that.
24193     new_path=`cmd //c echo $path`
24194   fi
24195 
24196 
24197   input_path="$new_path"
24198   # Check if we need to convert this using DOS-style short mode. If the path
24199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24200   # take no chances and rewrite it.
24201   # Note: m4 eats our [], so we need to use [ and ] instead.
24202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24203   if test "x$has_forbidden_chars" != x; then
24204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24205     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24206   fi
24207 
24208 
24209   windows_path="$new_path"
24210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24211     unix_path=`$CYGPATH -u "$windows_path"`
24212     new_path="$unix_path"
24213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24214     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24215     new_path="$unix_path"
24216   fi
24217 
24218   if test "x$path" != "x$new_path"; then
24219     BOOT_JDK="$new_path"
24220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24221 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24222   fi
24223 
24224   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24225   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24226 
24227   else
24228     # We're on a unix platform. Hooray! :)
24229     path="$BOOT_JDK"
24230     has_space=`$ECHO "$path" | $GREP " "`
24231     if test "x$has_space" != x; then
24232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24233 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24234       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24235     fi
24236 
24237     # Use eval to expand a potential ~
24238     eval path="$path"
24239     if test ! -f "$path" && test ! -d "$path"; then
24240       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24241     fi
24242 
24243     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24244   fi
24245 
24246             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24247 $as_echo_n "checking for Boot JDK... " >&6; }
24248             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24249 $as_echo "$BOOT_JDK" >&6; }
24250             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24251 $as_echo_n "checking Boot JDK version... " >&6; }
24252             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24253             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24254 $as_echo "$BOOT_JDK_VERSION" >&6; }
24255           fi # end check jdk version
24256         fi # end check javac
24257       fi # end check java
24258     fi # end check boot jdk found
24259   fi
24260 
24261     done
24262   fi
24263 
24264 
24265     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24266     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24267       # Do we have a bin/java?
24268       if test ! -x "$BOOT_JDK/bin/java"; then
24269         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24271         BOOT_JDK_FOUND=no
24272       else
24273         # Do we have a bin/javac?
24274         if test ! -x "$BOOT_JDK/bin/javac"; then
24275           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24276 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24277           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24278 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24279           BOOT_JDK_FOUND=no
24280         else
24281           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24282           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24283 
24284           # Extra M4 quote needed to protect [] in grep expression.
24285           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24286           if test "x$FOUND_CORRECT_VERSION" = x; then
24287             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24288 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24289             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24290 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24291             BOOT_JDK_FOUND=no
24292           else
24293             # We're done! :-)
24294             BOOT_JDK_FOUND=yes
24295 
24296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24297 
24298   # Input might be given as Windows format, start by converting to
24299   # unix format.
24300   path="$BOOT_JDK"
24301   new_path=`$CYGPATH -u "$path"`
24302 
24303   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24304   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24305   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24306   # "foo.exe" is OK but "foo" is an error.
24307   #
24308   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24309   # It is also a way to make sure we got the proper file name for the real test later on.
24310   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24311   if test "x$test_shortpath" = x; then
24312     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24313 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24314     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24315   fi
24316 
24317   # Call helper function which possibly converts this using DOS-style short mode.
24318   # If so, the updated path is stored in $new_path.
24319 
24320   input_path="$new_path"
24321   # Check if we need to convert this using DOS-style short mode. If the path
24322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24323   # take no chances and rewrite it.
24324   # Note: m4 eats our [], so we need to use [ and ] instead.
24325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24326   if test "x$has_forbidden_chars" != x; then
24327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24328     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24329     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24330     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24331       # Going to short mode and back again did indeed matter. Since short mode is
24332       # case insensitive, let's make it lowercase to improve readability.
24333       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24334       # Now convert it back to Unix-stile (cygpath)
24335       input_path=`$CYGPATH -u "$shortmode_path"`
24336       new_path="$input_path"
24337     fi
24338   fi
24339 
24340   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24341   if test "x$test_cygdrive_prefix" = x; then
24342     # As a simple fix, exclude /usr/bin since it's not a real path.
24343     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24344       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24345       # a path prefixed by /cygdrive for fixpath to work.
24346       new_path="$CYGWIN_ROOT_PATH$input_path"
24347     fi
24348   fi
24349 
24350 
24351   if test "x$path" != "x$new_path"; then
24352     BOOT_JDK="$new_path"
24353     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24354 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24355   fi
24356 
24357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24358 
24359   path="$BOOT_JDK"
24360   has_colon=`$ECHO $path | $GREP ^.:`
24361   new_path="$path"
24362   if test "x$has_colon" = x; then
24363     # Not in mixed or Windows style, start by that.
24364     new_path=`cmd //c echo $path`
24365   fi
24366 
24367 
24368   input_path="$new_path"
24369   # Check if we need to convert this using DOS-style short mode. If the path
24370   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24371   # take no chances and rewrite it.
24372   # Note: m4 eats our [], so we need to use [ and ] instead.
24373   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24374   if test "x$has_forbidden_chars" != x; then
24375     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24376     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24377   fi
24378 
24379 
24380   windows_path="$new_path"
24381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24382     unix_path=`$CYGPATH -u "$windows_path"`
24383     new_path="$unix_path"
24384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24386     new_path="$unix_path"
24387   fi
24388 
24389   if test "x$path" != "x$new_path"; then
24390     BOOT_JDK="$new_path"
24391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24392 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24393   fi
24394 
24395   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24396   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24397 
24398   else
24399     # We're on a unix platform. Hooray! :)
24400     path="$BOOT_JDK"
24401     has_space=`$ECHO "$path" | $GREP " "`
24402     if test "x$has_space" != x; then
24403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24404 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24405       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24406     fi
24407 
24408     # Use eval to expand a potential ~
24409     eval path="$path"
24410     if test ! -f "$path" && test ! -d "$path"; then
24411       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24412     fi
24413 
24414     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24415   fi
24416 
24417             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24418 $as_echo_n "checking for Boot JDK... " >&6; }
24419             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24420 $as_echo "$BOOT_JDK" >&6; }
24421             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24422 $as_echo_n "checking Boot JDK version... " >&6; }
24423             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24424             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24425 $as_echo "$BOOT_JDK_VERSION" >&6; }
24426           fi # end check jdk version
24427         fi # end check javac
24428       fi # end check java
24429     fi # end check boot jdk found
24430   fi
24431 
24432 
24433   if test "x$BOOT_JDK_FOUND" = xno; then
24434     # Now execute the test
24435 
24436   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24437   BOOT_JDK_SUFFIX="/Contents/Home"
24438   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24439   if test "x$ALL_JDKS_FOUND" != x; then
24440     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24441 
24442   if test "x$BOOT_JDK_FOUND" = xno; then
24443     # Now execute the test
24444 
24445         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24446         if test -d "$BOOT_JDK"; then
24447           BOOT_JDK_FOUND=maybe
24448           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24449 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24450         fi
24451 
24452 
24453     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24454     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24455       # Do we have a bin/java?
24456       if test ! -x "$BOOT_JDK/bin/java"; then
24457         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24458 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24459         BOOT_JDK_FOUND=no
24460       else
24461         # Do we have a bin/javac?
24462         if test ! -x "$BOOT_JDK/bin/javac"; then
24463           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24465           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24466 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24467           BOOT_JDK_FOUND=no
24468         else
24469           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24470           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24471 
24472           # Extra M4 quote needed to protect [] in grep expression.
24473           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24474           if test "x$FOUND_CORRECT_VERSION" = x; then
24475             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24477             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24478 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24479             BOOT_JDK_FOUND=no
24480           else
24481             # We're done! :-)
24482             BOOT_JDK_FOUND=yes
24483 
24484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24485 
24486   # Input might be given as Windows format, start by converting to
24487   # unix format.
24488   path="$BOOT_JDK"
24489   new_path=`$CYGPATH -u "$path"`
24490 
24491   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24492   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24493   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24494   # "foo.exe" is OK but "foo" is an error.
24495   #
24496   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24497   # It is also a way to make sure we got the proper file name for the real test later on.
24498   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24499   if test "x$test_shortpath" = x; then
24500     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24501 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24502     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24503   fi
24504 
24505   # Call helper function which possibly converts this using DOS-style short mode.
24506   # If so, the updated path is stored in $new_path.
24507 
24508   input_path="$new_path"
24509   # Check if we need to convert this using DOS-style short mode. If the path
24510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24511   # take no chances and rewrite it.
24512   # Note: m4 eats our [], so we need to use [ and ] instead.
24513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24514   if test "x$has_forbidden_chars" != x; then
24515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24516     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24517     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24518     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24519       # Going to short mode and back again did indeed matter. Since short mode is
24520       # case insensitive, let's make it lowercase to improve readability.
24521       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24522       # Now convert it back to Unix-stile (cygpath)
24523       input_path=`$CYGPATH -u "$shortmode_path"`
24524       new_path="$input_path"
24525     fi
24526   fi
24527 
24528   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24529   if test "x$test_cygdrive_prefix" = x; then
24530     # As a simple fix, exclude /usr/bin since it's not a real path.
24531     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24532       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24533       # a path prefixed by /cygdrive for fixpath to work.
24534       new_path="$CYGWIN_ROOT_PATH$input_path"
24535     fi
24536   fi
24537 
24538 
24539   if test "x$path" != "x$new_path"; then
24540     BOOT_JDK="$new_path"
24541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24542 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24543   fi
24544 
24545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24546 
24547   path="$BOOT_JDK"
24548   has_colon=`$ECHO $path | $GREP ^.:`
24549   new_path="$path"
24550   if test "x$has_colon" = x; then
24551     # Not in mixed or Windows style, start by that.
24552     new_path=`cmd //c echo $path`
24553   fi
24554 
24555 
24556   input_path="$new_path"
24557   # Check if we need to convert this using DOS-style short mode. If the path
24558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24559   # take no chances and rewrite it.
24560   # Note: m4 eats our [], so we need to use [ and ] instead.
24561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24562   if test "x$has_forbidden_chars" != x; then
24563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24564     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24565   fi
24566 
24567 
24568   windows_path="$new_path"
24569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24570     unix_path=`$CYGPATH -u "$windows_path"`
24571     new_path="$unix_path"
24572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24573     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24574     new_path="$unix_path"
24575   fi
24576 
24577   if test "x$path" != "x$new_path"; then
24578     BOOT_JDK="$new_path"
24579     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24580 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24581   fi
24582 
24583   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24584   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24585 
24586   else
24587     # We're on a unix platform. Hooray! :)
24588     path="$BOOT_JDK"
24589     has_space=`$ECHO "$path" | $GREP " "`
24590     if test "x$has_space" != x; then
24591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24592 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24593       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24594     fi
24595 
24596     # Use eval to expand a potential ~
24597     eval path="$path"
24598     if test ! -f "$path" && test ! -d "$path"; then
24599       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24600     fi
24601 
24602     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24603   fi
24604 
24605             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24606 $as_echo_n "checking for Boot JDK... " >&6; }
24607             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24608 $as_echo "$BOOT_JDK" >&6; }
24609             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24610 $as_echo_n "checking Boot JDK version... " >&6; }
24611             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24612             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24613 $as_echo "$BOOT_JDK_VERSION" >&6; }
24614           fi # end check jdk version
24615         fi # end check javac
24616       fi # end check java
24617     fi # end check boot jdk found
24618   fi
24619 
24620     done
24621   fi
24622 
24623 
24624     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24625     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24626       # Do we have a bin/java?
24627       if test ! -x "$BOOT_JDK/bin/java"; then
24628         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24629 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24630         BOOT_JDK_FOUND=no
24631       else
24632         # Do we have a bin/javac?
24633         if test ! -x "$BOOT_JDK/bin/javac"; then
24634           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24635 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24636           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24637 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24638           BOOT_JDK_FOUND=no
24639         else
24640           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24641           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24642 
24643           # Extra M4 quote needed to protect [] in grep expression.
24644           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24645           if test "x$FOUND_CORRECT_VERSION" = x; then
24646             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24647 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24648             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24649 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24650             BOOT_JDK_FOUND=no
24651           else
24652             # We're done! :-)
24653             BOOT_JDK_FOUND=yes
24654 
24655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24656 
24657   # Input might be given as Windows format, start by converting to
24658   # unix format.
24659   path="$BOOT_JDK"
24660   new_path=`$CYGPATH -u "$path"`
24661 
24662   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24663   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24664   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24665   # "foo.exe" is OK but "foo" is an error.
24666   #
24667   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24668   # It is also a way to make sure we got the proper file name for the real test later on.
24669   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24670   if test "x$test_shortpath" = x; then
24671     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24672 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24673     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24674   fi
24675 
24676   # Call helper function which possibly converts this using DOS-style short mode.
24677   # If so, the updated path is stored in $new_path.
24678 
24679   input_path="$new_path"
24680   # Check if we need to convert this using DOS-style short mode. If the path
24681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24682   # take no chances and rewrite it.
24683   # Note: m4 eats our [], so we need to use [ and ] instead.
24684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24685   if test "x$has_forbidden_chars" != x; then
24686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24690       # Going to short mode and back again did indeed matter. Since short mode is
24691       # case insensitive, let's make it lowercase to improve readability.
24692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24693       # Now convert it back to Unix-stile (cygpath)
24694       input_path=`$CYGPATH -u "$shortmode_path"`
24695       new_path="$input_path"
24696     fi
24697   fi
24698 
24699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24700   if test "x$test_cygdrive_prefix" = x; then
24701     # As a simple fix, exclude /usr/bin since it's not a real path.
24702     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24704       # a path prefixed by /cygdrive for fixpath to work.
24705       new_path="$CYGWIN_ROOT_PATH$input_path"
24706     fi
24707   fi
24708 
24709 
24710   if test "x$path" != "x$new_path"; then
24711     BOOT_JDK="$new_path"
24712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24713 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24714   fi
24715 
24716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24717 
24718   path="$BOOT_JDK"
24719   has_colon=`$ECHO $path | $GREP ^.:`
24720   new_path="$path"
24721   if test "x$has_colon" = x; then
24722     # Not in mixed or Windows style, start by that.
24723     new_path=`cmd //c echo $path`
24724   fi
24725 
24726 
24727   input_path="$new_path"
24728   # Check if we need to convert this using DOS-style short mode. If the path
24729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24730   # take no chances and rewrite it.
24731   # Note: m4 eats our [], so we need to use [ and ] instead.
24732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24733   if test "x$has_forbidden_chars" != x; then
24734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24735     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24736   fi
24737 
24738 
24739   windows_path="$new_path"
24740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24741     unix_path=`$CYGPATH -u "$windows_path"`
24742     new_path="$unix_path"
24743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24745     new_path="$unix_path"
24746   fi
24747 
24748   if test "x$path" != "x$new_path"; then
24749     BOOT_JDK="$new_path"
24750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24751 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24752   fi
24753 
24754   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24755   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24756 
24757   else
24758     # We're on a unix platform. Hooray! :)
24759     path="$BOOT_JDK"
24760     has_space=`$ECHO "$path" | $GREP " "`
24761     if test "x$has_space" != x; then
24762       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24763 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24764       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24765     fi
24766 
24767     # Use eval to expand a potential ~
24768     eval path="$path"
24769     if test ! -f "$path" && test ! -d "$path"; then
24770       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24771     fi
24772 
24773     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24774   fi
24775 
24776             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24777 $as_echo_n "checking for Boot JDK... " >&6; }
24778             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24779 $as_echo "$BOOT_JDK" >&6; }
24780             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24781 $as_echo_n "checking Boot JDK version... " >&6; }
24782             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24783             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24784 $as_echo "$BOOT_JDK_VERSION" >&6; }
24785           fi # end check jdk version
24786         fi # end check javac
24787       fi # end check java
24788     fi # end check boot jdk found
24789   fi
24790 
24791   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24792 
24793   if test "x$BOOT_JDK_FOUND" = xno; then
24794     # Now execute the test
24795 
24796   BOOT_JDK_PREFIX="/usr/lib/jvm"
24797   BOOT_JDK_SUFFIX=""
24798   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24799   if test "x$ALL_JDKS_FOUND" != x; then
24800     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24801 
24802   if test "x$BOOT_JDK_FOUND" = xno; then
24803     # Now execute the test
24804 
24805         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24806         if test -d "$BOOT_JDK"; then
24807           BOOT_JDK_FOUND=maybe
24808           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24809 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24810         fi
24811 
24812 
24813     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24814     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24815       # Do we have a bin/java?
24816       if test ! -x "$BOOT_JDK/bin/java"; then
24817         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24818 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24819         BOOT_JDK_FOUND=no
24820       else
24821         # Do we have a bin/javac?
24822         if test ! -x "$BOOT_JDK/bin/javac"; then
24823           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24824 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24825           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24826 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24827           BOOT_JDK_FOUND=no
24828         else
24829           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24830           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24831 
24832           # Extra M4 quote needed to protect [] in grep expression.
24833           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24834           if test "x$FOUND_CORRECT_VERSION" = x; then
24835             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24836 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24837             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24838 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24839             BOOT_JDK_FOUND=no
24840           else
24841             # We're done! :-)
24842             BOOT_JDK_FOUND=yes
24843 
24844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24845 
24846   # Input might be given as Windows format, start by converting to
24847   # unix format.
24848   path="$BOOT_JDK"
24849   new_path=`$CYGPATH -u "$path"`
24850 
24851   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24852   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24853   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24854   # "foo.exe" is OK but "foo" is an error.
24855   #
24856   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24857   # It is also a way to make sure we got the proper file name for the real test later on.
24858   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24859   if test "x$test_shortpath" = x; then
24860     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24861 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24862     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24863   fi
24864 
24865   # Call helper function which possibly converts this using DOS-style short mode.
24866   # If so, the updated path is stored in $new_path.
24867 
24868   input_path="$new_path"
24869   # Check if we need to convert this using DOS-style short mode. If the path
24870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24871   # take no chances and rewrite it.
24872   # Note: m4 eats our [], so we need to use [ and ] instead.
24873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24874   if test "x$has_forbidden_chars" != x; then
24875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24879       # Going to short mode and back again did indeed matter. Since short mode is
24880       # case insensitive, let's make it lowercase to improve readability.
24881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24882       # Now convert it back to Unix-stile (cygpath)
24883       input_path=`$CYGPATH -u "$shortmode_path"`
24884       new_path="$input_path"
24885     fi
24886   fi
24887 
24888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24889   if test "x$test_cygdrive_prefix" = x; then
24890     # As a simple fix, exclude /usr/bin since it's not a real path.
24891     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24893       # a path prefixed by /cygdrive for fixpath to work.
24894       new_path="$CYGWIN_ROOT_PATH$input_path"
24895     fi
24896   fi
24897 
24898 
24899   if test "x$path" != "x$new_path"; then
24900     BOOT_JDK="$new_path"
24901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24902 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24903   fi
24904 
24905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24906 
24907   path="$BOOT_JDK"
24908   has_colon=`$ECHO $path | $GREP ^.:`
24909   new_path="$path"
24910   if test "x$has_colon" = x; then
24911     # Not in mixed or Windows style, start by that.
24912     new_path=`cmd //c echo $path`
24913   fi
24914 
24915 
24916   input_path="$new_path"
24917   # Check if we need to convert this using DOS-style short mode. If the path
24918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24919   # take no chances and rewrite it.
24920   # Note: m4 eats our [], so we need to use [ and ] instead.
24921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24922   if test "x$has_forbidden_chars" != x; then
24923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24924     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24925   fi
24926 
24927 
24928   windows_path="$new_path"
24929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24930     unix_path=`$CYGPATH -u "$windows_path"`
24931     new_path="$unix_path"
24932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24934     new_path="$unix_path"
24935   fi
24936 
24937   if test "x$path" != "x$new_path"; then
24938     BOOT_JDK="$new_path"
24939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24940 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24941   fi
24942 
24943   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24944   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24945 
24946   else
24947     # We're on a unix platform. Hooray! :)
24948     path="$BOOT_JDK"
24949     has_space=`$ECHO "$path" | $GREP " "`
24950     if test "x$has_space" != x; then
24951       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24953       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24954     fi
24955 
24956     # Use eval to expand a potential ~
24957     eval path="$path"
24958     if test ! -f "$path" && test ! -d "$path"; then
24959       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24960     fi
24961 
24962     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24963   fi
24964 
24965             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24966 $as_echo_n "checking for Boot JDK... " >&6; }
24967             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24968 $as_echo "$BOOT_JDK" >&6; }
24969             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24970 $as_echo_n "checking Boot JDK version... " >&6; }
24971             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24972             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24973 $as_echo "$BOOT_JDK_VERSION" >&6; }
24974           fi # end check jdk version
24975         fi # end check javac
24976       fi # end check java
24977     fi # end check boot jdk found
24978   fi
24979 
24980     done
24981   fi
24982 
24983 
24984     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24985     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24986       # Do we have a bin/java?
24987       if test ! -x "$BOOT_JDK/bin/java"; then
24988         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24990         BOOT_JDK_FOUND=no
24991       else
24992         # Do we have a bin/javac?
24993         if test ! -x "$BOOT_JDK/bin/javac"; then
24994           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24995 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24996           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24997 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24998           BOOT_JDK_FOUND=no
24999         else
25000           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25001           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25002 
25003           # Extra M4 quote needed to protect [] in grep expression.
25004           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25005           if test "x$FOUND_CORRECT_VERSION" = x; then
25006             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25007 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25008             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25009 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25010             BOOT_JDK_FOUND=no
25011           else
25012             # We're done! :-)
25013             BOOT_JDK_FOUND=yes
25014 
25015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25016 
25017   # Input might be given as Windows format, start by converting to
25018   # unix format.
25019   path="$BOOT_JDK"
25020   new_path=`$CYGPATH -u "$path"`
25021 
25022   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25023   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25024   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25025   # "foo.exe" is OK but "foo" is an error.
25026   #
25027   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25028   # It is also a way to make sure we got the proper file name for the real test later on.
25029   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25030   if test "x$test_shortpath" = x; then
25031     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25032 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25033     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25034   fi
25035 
25036   # Call helper function which possibly converts this using DOS-style short mode.
25037   # If so, the updated path is stored in $new_path.
25038 
25039   input_path="$new_path"
25040   # Check if we need to convert this using DOS-style short mode. If the path
25041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25042   # take no chances and rewrite it.
25043   # Note: m4 eats our [], so we need to use [ and ] instead.
25044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25045   if test "x$has_forbidden_chars" != x; then
25046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25047     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25048     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25049     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25050       # Going to short mode and back again did indeed matter. Since short mode is
25051       # case insensitive, let's make it lowercase to improve readability.
25052       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25053       # Now convert it back to Unix-stile (cygpath)
25054       input_path=`$CYGPATH -u "$shortmode_path"`
25055       new_path="$input_path"
25056     fi
25057   fi
25058 
25059   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25060   if test "x$test_cygdrive_prefix" = x; then
25061     # As a simple fix, exclude /usr/bin since it's not a real path.
25062     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25063       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25064       # a path prefixed by /cygdrive for fixpath to work.
25065       new_path="$CYGWIN_ROOT_PATH$input_path"
25066     fi
25067   fi
25068 
25069 
25070   if test "x$path" != "x$new_path"; then
25071     BOOT_JDK="$new_path"
25072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25073 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25074   fi
25075 
25076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25077 
25078   path="$BOOT_JDK"
25079   has_colon=`$ECHO $path | $GREP ^.:`
25080   new_path="$path"
25081   if test "x$has_colon" = x; then
25082     # Not in mixed or Windows style, start by that.
25083     new_path=`cmd //c echo $path`
25084   fi
25085 
25086 
25087   input_path="$new_path"
25088   # Check if we need to convert this using DOS-style short mode. If the path
25089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25090   # take no chances and rewrite it.
25091   # Note: m4 eats our [], so we need to use [ and ] instead.
25092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25093   if test "x$has_forbidden_chars" != x; then
25094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25095     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25096   fi
25097 
25098 
25099   windows_path="$new_path"
25100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25101     unix_path=`$CYGPATH -u "$windows_path"`
25102     new_path="$unix_path"
25103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25105     new_path="$unix_path"
25106   fi
25107 
25108   if test "x$path" != "x$new_path"; then
25109     BOOT_JDK="$new_path"
25110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25111 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25112   fi
25113 
25114   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25115   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25116 
25117   else
25118     # We're on a unix platform. Hooray! :)
25119     path="$BOOT_JDK"
25120     has_space=`$ECHO "$path" | $GREP " "`
25121     if test "x$has_space" != x; then
25122       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25123 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25124       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25125     fi
25126 
25127     # Use eval to expand a potential ~
25128     eval path="$path"
25129     if test ! -f "$path" && test ! -d "$path"; then
25130       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25131     fi
25132 
25133     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25134   fi
25135 
25136             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25137 $as_echo_n "checking for Boot JDK... " >&6; }
25138             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25139 $as_echo "$BOOT_JDK" >&6; }
25140             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25141 $as_echo_n "checking Boot JDK version... " >&6; }
25142             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25143             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25144 $as_echo "$BOOT_JDK_VERSION" >&6; }
25145           fi # end check jdk version
25146         fi # end check javac
25147       fi # end check java
25148     fi # end check boot jdk found
25149   fi
25150 
25151   fi
25152 
25153 
25154     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25155     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25156       # Do we have a bin/java?
25157       if test ! -x "$BOOT_JDK/bin/java"; then
25158         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25160         BOOT_JDK_FOUND=no
25161       else
25162         # Do we have a bin/javac?
25163         if test ! -x "$BOOT_JDK/bin/javac"; then
25164           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25165 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25166           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25167 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25168           BOOT_JDK_FOUND=no
25169         else
25170           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25171           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25172 
25173           # Extra M4 quote needed to protect [] in grep expression.
25174           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25175           if test "x$FOUND_CORRECT_VERSION" = x; then
25176             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25177 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25178             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25179 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25180             BOOT_JDK_FOUND=no
25181           else
25182             # We're done! :-)
25183             BOOT_JDK_FOUND=yes
25184 
25185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25186 
25187   # Input might be given as Windows format, start by converting to
25188   # unix format.
25189   path="$BOOT_JDK"
25190   new_path=`$CYGPATH -u "$path"`
25191 
25192   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25193   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25194   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25195   # "foo.exe" is OK but "foo" is an error.
25196   #
25197   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25198   # It is also a way to make sure we got the proper file name for the real test later on.
25199   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25200   if test "x$test_shortpath" = x; then
25201     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25202 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25203     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25204   fi
25205 
25206   # Call helper function which possibly converts this using DOS-style short mode.
25207   # If so, the updated path is stored in $new_path.
25208 
25209   input_path="$new_path"
25210   # Check if we need to convert this using DOS-style short mode. If the path
25211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25212   # take no chances and rewrite it.
25213   # Note: m4 eats our [], so we need to use [ and ] instead.
25214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25215   if test "x$has_forbidden_chars" != x; then
25216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25217     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25218     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25219     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25220       # Going to short mode and back again did indeed matter. Since short mode is
25221       # case insensitive, let's make it lowercase to improve readability.
25222       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25223       # Now convert it back to Unix-stile (cygpath)
25224       input_path=`$CYGPATH -u "$shortmode_path"`
25225       new_path="$input_path"
25226     fi
25227   fi
25228 
25229   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25230   if test "x$test_cygdrive_prefix" = x; then
25231     # As a simple fix, exclude /usr/bin since it's not a real path.
25232     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25233       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25234       # a path prefixed by /cygdrive for fixpath to work.
25235       new_path="$CYGWIN_ROOT_PATH$input_path"
25236     fi
25237   fi
25238 
25239 
25240   if test "x$path" != "x$new_path"; then
25241     BOOT_JDK="$new_path"
25242     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25243 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25244   fi
25245 
25246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25247 
25248   path="$BOOT_JDK"
25249   has_colon=`$ECHO $path | $GREP ^.:`
25250   new_path="$path"
25251   if test "x$has_colon" = x; then
25252     # Not in mixed or Windows style, start by that.
25253     new_path=`cmd //c echo $path`
25254   fi
25255 
25256 
25257   input_path="$new_path"
25258   # Check if we need to convert this using DOS-style short mode. If the path
25259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25260   # take no chances and rewrite it.
25261   # Note: m4 eats our [], so we need to use [ and ] instead.
25262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25263   if test "x$has_forbidden_chars" != x; then
25264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25265     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25266   fi
25267 
25268 
25269   windows_path="$new_path"
25270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25271     unix_path=`$CYGPATH -u "$windows_path"`
25272     new_path="$unix_path"
25273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25275     new_path="$unix_path"
25276   fi
25277 
25278   if test "x$path" != "x$new_path"; then
25279     BOOT_JDK="$new_path"
25280     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25281 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25282   fi
25283 
25284   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25285   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25286 
25287   else
25288     # We're on a unix platform. Hooray! :)
25289     path="$BOOT_JDK"
25290     has_space=`$ECHO "$path" | $GREP " "`
25291     if test "x$has_space" != x; then
25292       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25293 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25294       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25295     fi
25296 
25297     # Use eval to expand a potential ~
25298     eval path="$path"
25299     if test ! -f "$path" && test ! -d "$path"; then
25300       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25301     fi
25302 
25303     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25304   fi
25305 
25306             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25307 $as_echo_n "checking for Boot JDK... " >&6; }
25308             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25309 $as_echo "$BOOT_JDK" >&6; }
25310             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25311 $as_echo_n "checking Boot JDK version... " >&6; }
25312             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25313             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25314 $as_echo "$BOOT_JDK_VERSION" >&6; }
25315           fi # end check jdk version
25316         fi # end check javac
25317       fi # end check java
25318     fi # end check boot jdk found
25319   fi
25320 
25321 
25322   # If we haven't found anything yet, we've truly lost. Give up.
25323   if test "x$BOOT_JDK_FOUND" = xno; then
25324 
25325   # Print a helpful message on how to acquire the necessary build dependency.
25326   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25327   MISSING_DEPENDENCY=openjdk
25328 
25329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25330     cygwin_help $MISSING_DEPENDENCY
25331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25332     msys_help $MISSING_DEPENDENCY
25333   else
25334     PKGHANDLER_COMMAND=
25335 
25336     case $PKGHANDLER in
25337       apt-get)
25338         apt_help     $MISSING_DEPENDENCY ;;
25339       yum)
25340         yum_help     $MISSING_DEPENDENCY ;;
25341       port)
25342         port_help    $MISSING_DEPENDENCY ;;
25343       pkgutil)
25344         pkgutil_help $MISSING_DEPENDENCY ;;
25345       pkgadd)
25346         pkgadd_help  $MISSING_DEPENDENCY ;;
25347     esac
25348 
25349     if test "x$PKGHANDLER_COMMAND" != x; then
25350       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25351     fi
25352   fi
25353 
25354     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25355 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25356     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25357 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25358     as_fn_error $? "Cannot continue" "$LINENO" 5
25359   fi
25360 
25361 
25362 
25363   # Setup tools from the Boot JDK.
25364 
25365   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25366 
25367   # Publish this variable in the help.
25368 
25369 
25370   if test "x$JAVA" = x; then
25371     # The variable is not set by user, try to locate tool using the code snippet
25372 
25373       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25374 $as_echo_n "checking for java in Boot JDK... " >&6; }
25375       JAVA=$BOOT_JDK/bin/java
25376       if test ! -x $JAVA; then
25377         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25378 $as_echo "not found" >&6; }
25379         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25380 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25381         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25382       fi
25383       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25384 $as_echo "ok" >&6; }
25385 
25386 
25387   else
25388     # The variable is set, but is it from the command line or the environment?
25389 
25390     # Try to remove the string !JAVA! from our list.
25391     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25392     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25393       # If it failed, the variable was not from the command line. Ignore it,
25394       # but warn the user (except for BASH, which is always set by the calling BASH).
25395       if test "xJAVA" != xBASH; then
25396         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25397 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25398       fi
25399       # Try to locate tool using the code snippet
25400 
25401       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25402 $as_echo_n "checking for java in Boot JDK... " >&6; }
25403       JAVA=$BOOT_JDK/bin/java
25404       if test ! -x $JAVA; then
25405         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25406 $as_echo "not found" >&6; }
25407         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25408 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25409         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25410       fi
25411       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25412 $as_echo "ok" >&6; }
25413 
25414 
25415     else
25416       # If it succeeded, then it was overridden by the user. We will use it
25417       # for the tool.
25418 
25419       # First remove it from the list of overridden variables, so we can test
25420       # for unknown variables in the end.
25421       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25422 
25423       # Check if the provided tool contains a complete path.
25424       tool_specified="$JAVA"
25425       tool_basename="${tool_specified##*/}"
25426       if test "x$tool_basename" = "x$tool_specified"; then
25427         # A command without a complete path is provided, search $PATH.
25428         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25429 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25430         # Extract the first word of "$tool_basename", so it can be a program name with args.
25431 set dummy $tool_basename; ac_word=$2
25432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25433 $as_echo_n "checking for $ac_word... " >&6; }
25434 if ${ac_cv_path_JAVA+:} false; then :
25435   $as_echo_n "(cached) " >&6
25436 else
25437   case $JAVA in
25438   [\\/]* | ?:[\\/]*)
25439   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25440   ;;
25441   *)
25442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25443 for as_dir in $PATH
25444 do
25445   IFS=$as_save_IFS
25446   test -z "$as_dir" && as_dir=.
25447     for ac_exec_ext in '' $ac_executable_extensions; do
25448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25449     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25451     break 2
25452   fi
25453 done
25454   done
25455 IFS=$as_save_IFS
25456 
25457   ;;
25458 esac
25459 fi
25460 JAVA=$ac_cv_path_JAVA
25461 if test -n "$JAVA"; then
25462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25463 $as_echo "$JAVA" >&6; }
25464 else
25465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25466 $as_echo "no" >&6; }
25467 fi
25468 
25469 
25470         if test "x$JAVA" = x; then
25471           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25472         fi
25473       else
25474         # Otherwise we believe it is a complete path. Use it as it is.
25475         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25476 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25477         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25478 $as_echo_n "checking for JAVA... " >&6; }
25479         if test ! -x "$tool_specified"; then
25480           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25481 $as_echo "not found" >&6; }
25482           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25483         fi
25484         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25485 $as_echo "$tool_specified" >&6; }
25486       fi
25487     fi
25488   fi
25489 
25490 
25491 
25492   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25493 
25494   # Publish this variable in the help.
25495 
25496 
25497   if test "x$JAVAC" = x; then
25498     # The variable is not set by user, try to locate tool using the code snippet
25499 
25500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25501 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25502       JAVAC=$BOOT_JDK/bin/javac
25503       if test ! -x $JAVAC; then
25504         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25505 $as_echo "not found" >&6; }
25506         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25507 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25508         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25509       fi
25510       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25511 $as_echo "ok" >&6; }
25512 
25513 
25514   else
25515     # The variable is set, but is it from the command line or the environment?
25516 
25517     # Try to remove the string !JAVAC! from our list.
25518     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25519     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25520       # If it failed, the variable was not from the command line. Ignore it,
25521       # but warn the user (except for BASH, which is always set by the calling BASH).
25522       if test "xJAVAC" != xBASH; then
25523         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25524 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25525       fi
25526       # Try to locate tool using the code snippet
25527 
25528       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25529 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25530       JAVAC=$BOOT_JDK/bin/javac
25531       if test ! -x $JAVAC; then
25532         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25533 $as_echo "not found" >&6; }
25534         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25535 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25536         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25537       fi
25538       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25539 $as_echo "ok" >&6; }
25540 
25541 
25542     else
25543       # If it succeeded, then it was overridden by the user. We will use it
25544       # for the tool.
25545 
25546       # First remove it from the list of overridden variables, so we can test
25547       # for unknown variables in the end.
25548       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25549 
25550       # Check if the provided tool contains a complete path.
25551       tool_specified="$JAVAC"
25552       tool_basename="${tool_specified##*/}"
25553       if test "x$tool_basename" = "x$tool_specified"; then
25554         # A command without a complete path is provided, search $PATH.
25555         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25556 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25557         # Extract the first word of "$tool_basename", so it can be a program name with args.
25558 set dummy $tool_basename; ac_word=$2
25559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25560 $as_echo_n "checking for $ac_word... " >&6; }
25561 if ${ac_cv_path_JAVAC+:} false; then :
25562   $as_echo_n "(cached) " >&6
25563 else
25564   case $JAVAC in
25565   [\\/]* | ?:[\\/]*)
25566   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25567   ;;
25568   *)
25569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25570 for as_dir in $PATH
25571 do
25572   IFS=$as_save_IFS
25573   test -z "$as_dir" && as_dir=.
25574     for ac_exec_ext in '' $ac_executable_extensions; do
25575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25576     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25578     break 2
25579   fi
25580 done
25581   done
25582 IFS=$as_save_IFS
25583 
25584   ;;
25585 esac
25586 fi
25587 JAVAC=$ac_cv_path_JAVAC
25588 if test -n "$JAVAC"; then
25589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25590 $as_echo "$JAVAC" >&6; }
25591 else
25592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25593 $as_echo "no" >&6; }
25594 fi
25595 
25596 
25597         if test "x$JAVAC" = x; then
25598           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25599         fi
25600       else
25601         # Otherwise we believe it is a complete path. Use it as it is.
25602         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25603 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25604         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25605 $as_echo_n "checking for JAVAC... " >&6; }
25606         if test ! -x "$tool_specified"; then
25607           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25608 $as_echo "not found" >&6; }
25609           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25610         fi
25611         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25612 $as_echo "$tool_specified" >&6; }
25613       fi
25614     fi
25615   fi
25616 
25617 
25618 
25619   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25620 
25621   # Publish this variable in the help.
25622 
25623 
25624   if test "x$JAVAH" = x; then
25625     # The variable is not set by user, try to locate tool using the code snippet
25626 
25627       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25628 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25629       JAVAH=$BOOT_JDK/bin/javah
25630       if test ! -x $JAVAH; then
25631         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25632 $as_echo "not found" >&6; }
25633         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25634 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25635         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25636       fi
25637       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25638 $as_echo "ok" >&6; }
25639 
25640 
25641   else
25642     # The variable is set, but is it from the command line or the environment?
25643 
25644     # Try to remove the string !JAVAH! from our list.
25645     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25646     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25647       # If it failed, the variable was not from the command line. Ignore it,
25648       # but warn the user (except for BASH, which is always set by the calling BASH).
25649       if test "xJAVAH" != xBASH; then
25650         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25651 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25652       fi
25653       # Try to locate tool using the code snippet
25654 
25655       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25656 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25657       JAVAH=$BOOT_JDK/bin/javah
25658       if test ! -x $JAVAH; then
25659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25660 $as_echo "not found" >&6; }
25661         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25662 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25663         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25664       fi
25665       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25666 $as_echo "ok" >&6; }
25667 
25668 
25669     else
25670       # If it succeeded, then it was overridden by the user. We will use it
25671       # for the tool.
25672 
25673       # First remove it from the list of overridden variables, so we can test
25674       # for unknown variables in the end.
25675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25676 
25677       # Check if the provided tool contains a complete path.
25678       tool_specified="$JAVAH"
25679       tool_basename="${tool_specified##*/}"
25680       if test "x$tool_basename" = "x$tool_specified"; then
25681         # A command without a complete path is provided, search $PATH.
25682         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25683 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25684         # Extract the first word of "$tool_basename", so it can be a program name with args.
25685 set dummy $tool_basename; ac_word=$2
25686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25687 $as_echo_n "checking for $ac_word... " >&6; }
25688 if ${ac_cv_path_JAVAH+:} false; then :
25689   $as_echo_n "(cached) " >&6
25690 else
25691   case $JAVAH in
25692   [\\/]* | ?:[\\/]*)
25693   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25694   ;;
25695   *)
25696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25697 for as_dir in $PATH
25698 do
25699   IFS=$as_save_IFS
25700   test -z "$as_dir" && as_dir=.
25701     for ac_exec_ext in '' $ac_executable_extensions; do
25702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25703     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25705     break 2
25706   fi
25707 done
25708   done
25709 IFS=$as_save_IFS
25710 
25711   ;;
25712 esac
25713 fi
25714 JAVAH=$ac_cv_path_JAVAH
25715 if test -n "$JAVAH"; then
25716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25717 $as_echo "$JAVAH" >&6; }
25718 else
25719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25720 $as_echo "no" >&6; }
25721 fi
25722 
25723 
25724         if test "x$JAVAH" = x; then
25725           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25726         fi
25727       else
25728         # Otherwise we believe it is a complete path. Use it as it is.
25729         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25730 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25732 $as_echo_n "checking for JAVAH... " >&6; }
25733         if test ! -x "$tool_specified"; then
25734           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25735 $as_echo "not found" >&6; }
25736           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25737         fi
25738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25739 $as_echo "$tool_specified" >&6; }
25740       fi
25741     fi
25742   fi
25743 
25744 
25745 
25746   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25747 
25748   # Publish this variable in the help.
25749 
25750 
25751   if test "x$JAR" = x; then
25752     # The variable is not set by user, try to locate tool using the code snippet
25753 
25754       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25755 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25756       JAR=$BOOT_JDK/bin/jar
25757       if test ! -x $JAR; then
25758         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25759 $as_echo "not found" >&6; }
25760         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25761 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25762         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25763       fi
25764       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25765 $as_echo "ok" >&6; }
25766 
25767 
25768   else
25769     # The variable is set, but is it from the command line or the environment?
25770 
25771     # Try to remove the string !JAR! from our list.
25772     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25773     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25774       # If it failed, the variable was not from the command line. Ignore it,
25775       # but warn the user (except for BASH, which is always set by the calling BASH).
25776       if test "xJAR" != xBASH; then
25777         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25778 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25779       fi
25780       # Try to locate tool using the code snippet
25781 
25782       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25783 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25784       JAR=$BOOT_JDK/bin/jar
25785       if test ! -x $JAR; then
25786         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25787 $as_echo "not found" >&6; }
25788         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25789 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25790         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25791       fi
25792       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25793 $as_echo "ok" >&6; }
25794 
25795 
25796     else
25797       # If it succeeded, then it was overridden by the user. We will use it
25798       # for the tool.
25799 
25800       # First remove it from the list of overridden variables, so we can test
25801       # for unknown variables in the end.
25802       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25803 
25804       # Check if the provided tool contains a complete path.
25805       tool_specified="$JAR"
25806       tool_basename="${tool_specified##*/}"
25807       if test "x$tool_basename" = "x$tool_specified"; then
25808         # A command without a complete path is provided, search $PATH.
25809         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25810 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25811         # Extract the first word of "$tool_basename", so it can be a program name with args.
25812 set dummy $tool_basename; ac_word=$2
25813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25814 $as_echo_n "checking for $ac_word... " >&6; }
25815 if ${ac_cv_path_JAR+:} false; then :
25816   $as_echo_n "(cached) " >&6
25817 else
25818   case $JAR in
25819   [\\/]* | ?:[\\/]*)
25820   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25821   ;;
25822   *)
25823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25824 for as_dir in $PATH
25825 do
25826   IFS=$as_save_IFS
25827   test -z "$as_dir" && as_dir=.
25828     for ac_exec_ext in '' $ac_executable_extensions; do
25829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25830     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25832     break 2
25833   fi
25834 done
25835   done
25836 IFS=$as_save_IFS
25837 
25838   ;;
25839 esac
25840 fi
25841 JAR=$ac_cv_path_JAR
25842 if test -n "$JAR"; then
25843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25844 $as_echo "$JAR" >&6; }
25845 else
25846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25847 $as_echo "no" >&6; }
25848 fi
25849 
25850 
25851         if test "x$JAR" = x; then
25852           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25853         fi
25854       else
25855         # Otherwise we believe it is a complete path. Use it as it is.
25856         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25857 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25858         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25859 $as_echo_n "checking for JAR... " >&6; }
25860         if test ! -x "$tool_specified"; then
25861           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25862 $as_echo "not found" >&6; }
25863           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25864         fi
25865         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25866 $as_echo "$tool_specified" >&6; }
25867       fi
25868     fi
25869   fi
25870 
25871 
25872 
25873   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25874 
25875   # Publish this variable in the help.
25876 
25877 
25878   if test "x$NATIVE2ASCII" = x; then
25879     # The variable is not set by user, try to locate tool using the code snippet
25880 
25881       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25882 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25883       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25884       if test ! -x $NATIVE2ASCII; then
25885         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25886 $as_echo "not found" >&6; }
25887         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25888 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25889         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25890       fi
25891       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25892 $as_echo "ok" >&6; }
25893 
25894 
25895   else
25896     # The variable is set, but is it from the command line or the environment?
25897 
25898     # Try to remove the string !NATIVE2ASCII! from our list.
25899     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25900     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25901       # If it failed, the variable was not from the command line. Ignore it,
25902       # but warn the user (except for BASH, which is always set by the calling BASH).
25903       if test "xNATIVE2ASCII" != xBASH; then
25904         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25905 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25906       fi
25907       # Try to locate tool using the code snippet
25908 
25909       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25910 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25911       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25912       if test ! -x $NATIVE2ASCII; then
25913         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25914 $as_echo "not found" >&6; }
25915         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25916 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25917         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25918       fi
25919       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25920 $as_echo "ok" >&6; }
25921 
25922 
25923     else
25924       # If it succeeded, then it was overridden by the user. We will use it
25925       # for the tool.
25926 
25927       # First remove it from the list of overridden variables, so we can test
25928       # for unknown variables in the end.
25929       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25930 
25931       # Check if the provided tool contains a complete path.
25932       tool_specified="$NATIVE2ASCII"
25933       tool_basename="${tool_specified##*/}"
25934       if test "x$tool_basename" = "x$tool_specified"; then
25935         # A command without a complete path is provided, search $PATH.
25936         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25937 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25938         # Extract the first word of "$tool_basename", so it can be a program name with args.
25939 set dummy $tool_basename; ac_word=$2
25940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25941 $as_echo_n "checking for $ac_word... " >&6; }
25942 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25943   $as_echo_n "(cached) " >&6
25944 else
25945   case $NATIVE2ASCII in
25946   [\\/]* | ?:[\\/]*)
25947   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25948   ;;
25949   *)
25950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25951 for as_dir in $PATH
25952 do
25953   IFS=$as_save_IFS
25954   test -z "$as_dir" && as_dir=.
25955     for ac_exec_ext in '' $ac_executable_extensions; do
25956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25957     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25959     break 2
25960   fi
25961 done
25962   done
25963 IFS=$as_save_IFS
25964 
25965   ;;
25966 esac
25967 fi
25968 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25969 if test -n "$NATIVE2ASCII"; then
25970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25971 $as_echo "$NATIVE2ASCII" >&6; }
25972 else
25973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25974 $as_echo "no" >&6; }
25975 fi
25976 
25977 
25978         if test "x$NATIVE2ASCII" = x; then
25979           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25980         fi
25981       else
25982         # Otherwise we believe it is a complete path. Use it as it is.
25983         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25984 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25985         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25986 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
25987         if test ! -x "$tool_specified"; then
25988           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25989 $as_echo "not found" >&6; }
25990           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25991         fi
25992         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25993 $as_echo "$tool_specified" >&6; }
25994       fi
25995     fi
25996   fi
25997 
25998 
25999 
26000   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26001 
26002   # Publish this variable in the help.
26003 
26004 
26005   if test "x$JARSIGNER" = x; then
26006     # The variable is not set by user, try to locate tool using the code snippet
26007 
26008       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26009 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26010       JARSIGNER=$BOOT_JDK/bin/jarsigner
26011       if test ! -x $JARSIGNER; then
26012         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26013 $as_echo "not found" >&6; }
26014         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26015 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26016         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26017       fi
26018       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26019 $as_echo "ok" >&6; }
26020 
26021 
26022   else
26023     # The variable is set, but is it from the command line or the environment?
26024 
26025     # Try to remove the string !JARSIGNER! from our list.
26026     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26027     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26028       # If it failed, the variable was not from the command line. Ignore it,
26029       # but warn the user (except for BASH, which is always set by the calling BASH).
26030       if test "xJARSIGNER" != xBASH; then
26031         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26032 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26033       fi
26034       # Try to locate tool using the code snippet
26035 
26036       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26037 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26038       JARSIGNER=$BOOT_JDK/bin/jarsigner
26039       if test ! -x $JARSIGNER; then
26040         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26041 $as_echo "not found" >&6; }
26042         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26043 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26044         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26045       fi
26046       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26047 $as_echo "ok" >&6; }
26048 
26049 
26050     else
26051       # If it succeeded, then it was overridden by the user. We will use it
26052       # for the tool.
26053 
26054       # First remove it from the list of overridden variables, so we can test
26055       # for unknown variables in the end.
26056       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26057 
26058       # Check if the provided tool contains a complete path.
26059       tool_specified="$JARSIGNER"
26060       tool_basename="${tool_specified##*/}"
26061       if test "x$tool_basename" = "x$tool_specified"; then
26062         # A command without a complete path is provided, search $PATH.
26063         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26064 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26065         # Extract the first word of "$tool_basename", so it can be a program name with args.
26066 set dummy $tool_basename; ac_word=$2
26067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26068 $as_echo_n "checking for $ac_word... " >&6; }
26069 if ${ac_cv_path_JARSIGNER+:} false; then :
26070   $as_echo_n "(cached) " >&6
26071 else
26072   case $JARSIGNER in
26073   [\\/]* | ?:[\\/]*)
26074   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26075   ;;
26076   *)
26077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26078 for as_dir in $PATH
26079 do
26080   IFS=$as_save_IFS
26081   test -z "$as_dir" && as_dir=.
26082     for ac_exec_ext in '' $ac_executable_extensions; do
26083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26084     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26086     break 2
26087   fi
26088 done
26089   done
26090 IFS=$as_save_IFS
26091 
26092   ;;
26093 esac
26094 fi
26095 JARSIGNER=$ac_cv_path_JARSIGNER
26096 if test -n "$JARSIGNER"; then
26097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26098 $as_echo "$JARSIGNER" >&6; }
26099 else
26100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26101 $as_echo "no" >&6; }
26102 fi
26103 
26104 
26105         if test "x$JARSIGNER" = x; then
26106           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26107         fi
26108       else
26109         # Otherwise we believe it is a complete path. Use it as it is.
26110         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26111 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26112         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26113 $as_echo_n "checking for JARSIGNER... " >&6; }
26114         if test ! -x "$tool_specified"; then
26115           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26116 $as_echo "not found" >&6; }
26117           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26118         fi
26119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26120 $as_echo "$tool_specified" >&6; }
26121       fi
26122     fi
26123   fi
26124 
26125 
26126 
26127   # Finally, set some other options...
26128 
26129   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26130   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26131 
26132 
26133 
26134 
26135 ###############################################################################
26136 #
26137 # Configure the sources to use. We can add or override individual directories.
26138 #
26139 ###############################################################################
26140 
26141 
26142   # Where are the sources. Any of these can be overridden
26143   # using --with-override-corba and the likes.
26144   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26145   CORBA_TOPDIR="$SRC_ROOT/corba"
26146   JAXP_TOPDIR="$SRC_ROOT/jaxp"
26147   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26148   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26149   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26150   JDK_TOPDIR="$SRC_ROOT/jdk"
26151 
26152 
26153 
26154 
26155 
26156 
26157 
26158 
26159 
26160 
26161   ###############################################################################
26162   #
26163   # Pickup additional source for a component from outside of the source root
26164   # or override source for a component.
26165   #
26166 
26167 # Check whether --with-add-source-root was given.
26168 if test "${with_add_source_root+set}" = set; then :
26169   withval=$with_add_source_root;
26170 fi
26171 
26172 
26173 
26174 # Check whether --with-override-source-root was given.
26175 if test "${with_override_source_root+set}" = set; then :
26176   withval=$with_override_source_root;
26177 fi
26178 
26179 
26180 
26181 # Check whether --with-adds-and-overrides was given.
26182 if test "${with_adds_and_overrides+set}" = set; then :
26183   withval=$with_adds_and_overrides;
26184 fi
26185 
26186 
26187   if test "x$with_adds_and_overrides" != x; then
26188     with_add_source_root="$with_adds_and_overrides/adds"
26189     with_override_source_root="$with_adds_and_overrides/overrides"
26190   fi
26191 
26192   if test "x$with_add_source_root" != x; then
26193     if ! test -d $with_add_source_root; then
26194       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26195     fi
26196     CURDIR="$PWD"
26197     cd "$with_add_source_root"
26198     ADD_SRC_ROOT="`pwd`"
26199     cd "$CURDIR"
26200     # Verify that the addon source root does not have any root makefiles.
26201     # If it does, then it is usually an error, prevent this.
26202     if test -f $with_add_source_root/langtools/make/Makefile; then
26203       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
26204     fi
26205     if test -f $with_add_source_root/corba/make/Makefile; then
26206       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
26207     fi
26208     if test -f $with_add_source_root/jaxp/make/Makefile; then
26209       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
26210     fi
26211     if test -f $with_add_source_root/jaxws/make/Makefile; then
26212       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
26213     fi
26214     if test -f $with_add_source_root/hotspot/make/Makefile; then
26215       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
26216     fi
26217     if test -f $with_add_source_root/nashorn/make/Makefile; then
26218       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
26219     fi
26220     if test -f $with_add_source_root/jdk/make/Makefile; then
26221       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
26222     fi
26223   fi
26224 
26225 
26226   if test "x$with_override_source_root" != x; then
26227     if ! test -d $with_override_source_root; then
26228       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26229     fi
26230     CURDIR="$PWD"
26231     cd "$with_override_source_root"
26232     OVERRIDE_SRC_ROOT="`pwd`"
26233     cd "$CURDIR"
26234     if test -f $with_override_source_root/langtools/make/Makefile; then
26235       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
26236     fi
26237     if test -f $with_override_source_root/corba/make/Makefile; then
26238       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
26239     fi
26240     if test -f $with_override_source_root/jaxp/make/Makefile; then
26241       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
26242     fi
26243     if test -f $with_override_source_root/jaxws/make/Makefile; then
26244       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
26245     fi
26246     if test -f $with_override_source_root/hotspot/make/Makefile; then
26247       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
26248     fi
26249     if test -f $with_override_source_root/nashorn/make/Makefile; then
26250       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
26251     fi
26252     if test -f $with_override_source_root/jdk/make/Makefile; then
26253       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
26254     fi
26255   fi
26256 
26257 
26258   ###############################################################################
26259   #
26260   # Override a repo completely, this is used for example when you have 3 small
26261   # development sandboxes of the langtools sources and want to avoid having 3 full
26262   # OpenJDK sources checked out on disk.
26263   #
26264   # Assuming that the 3 langtools sandboxes are located here:
26265   # /home/fredrik/sandbox1/langtools
26266   # /home/fredrik/sandbox2/langtools
26267   # /home/fredrik/sandbox3/langtools
26268   #
26269   # From the source root you create build subdirs manually:
26270   #     mkdir -p build1 build2 build3
26271   # in each build directory run:
26272   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26273   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26274   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26275   #
26276 
26277 
26278 # Check whether --with-override-langtools was given.
26279 if test "${with_override_langtools+set}" = set; then :
26280   withval=$with_override_langtools;
26281 fi
26282 
26283 
26284 
26285 # Check whether --with-override-corba was given.
26286 if test "${with_override_corba+set}" = set; then :
26287   withval=$with_override_corba;
26288 fi
26289 
26290 
26291 
26292 # Check whether --with-override-jaxp was given.
26293 if test "${with_override_jaxp+set}" = set; then :
26294   withval=$with_override_jaxp;
26295 fi
26296 
26297 
26298 
26299 # Check whether --with-override-jaxws was given.
26300 if test "${with_override_jaxws+set}" = set; then :
26301   withval=$with_override_jaxws;
26302 fi
26303 
26304 
26305 
26306 # Check whether --with-override-hotspot was given.
26307 if test "${with_override_hotspot+set}" = set; then :
26308   withval=$with_override_hotspot;
26309 fi
26310 
26311 
26312 
26313 # Check whether --with-override-nashorn was given.
26314 if test "${with_override_nashorn+set}" = set; then :
26315   withval=$with_override_nashorn;
26316 fi
26317 
26318 
26319 
26320 # Check whether --with-override-jdk was given.
26321 if test "${with_override_jdk+set}" = set; then :
26322   withval=$with_override_jdk;
26323 fi
26324 
26325 
26326   if test "x$with_override_langtools" != x; then
26327     CURDIR="$PWD"
26328     cd "$with_override_langtools"
26329     LANGTOOLS_TOPDIR="`pwd`"
26330     cd "$CURDIR"
26331     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26332       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26333     fi
26334     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26335 $as_echo_n "checking if langtools should be overridden... " >&6; }
26336     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26337 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26338   fi
26339   if test "x$with_override_corba" != x; then
26340     CURDIR="$PWD"
26341     cd "$with_override_corba"
26342     CORBA_TOPDIR="`pwd`"
26343     cd "$CURDIR"
26344     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26345       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26346     fi
26347     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26348 $as_echo_n "checking if corba should be overridden... " >&6; }
26349     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26350 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26351   fi
26352   if test "x$with_override_jaxp" != x; then
26353     CURDIR="$PWD"
26354     cd "$with_override_jaxp"
26355     JAXP_TOPDIR="`pwd`"
26356     cd "$CURDIR"
26357     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26358       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26359     fi
26360     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26361 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26362     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26363 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26364   fi
26365   if test "x$with_override_jaxws" != x; then
26366     CURDIR="$PWD"
26367     cd "$with_override_jaxws"
26368     JAXWS_TOPDIR="`pwd`"
26369     cd "$CURDIR"
26370     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26371       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26372     fi
26373     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26374 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26375     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26376 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26377   fi
26378   if test "x$with_override_hotspot" != x; then
26379     CURDIR="$PWD"
26380     cd "$with_override_hotspot"
26381     HOTSPOT_TOPDIR="`pwd`"
26382     cd "$CURDIR"
26383     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26384       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26385     fi
26386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26387 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26389 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26390   fi
26391   if test "x$with_override_nashorn" != x; then
26392     CURDIR="$PWD"
26393     cd "$with_override_nashorn"
26394     NASHORN_TOPDIR="`pwd`"
26395     cd "$CURDIR"
26396     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26397       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26398     fi
26399     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26400 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26401     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26402 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26403   fi
26404   if test "x$with_override_jdk" != x; then
26405     CURDIR="$PWD"
26406     cd "$with_override_jdk"
26407     JDK_TOPDIR="`pwd`"
26408     cd "$CURDIR"
26409     if ! test -f $JDK_TOPDIR/make/Makefile; then
26410       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26411     fi
26412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26413 $as_echo_n "checking if JDK should be overridden... " >&6; }
26414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26415 $as_echo "yes with $JDK_TOPDIR" >&6; }
26416   fi
26417 
26418 
26419   BUILD_OUTPUT="$OUTPUT_ROOT"
26420 
26421 
26422   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26423   BUILD_HOTSPOT=true
26424 
26425 
26426 
26427 # Check whether --with-import-hotspot was given.
26428 if test "${with_import_hotspot+set}" = set; then :
26429   withval=$with_import_hotspot;
26430 fi
26431 
26432   if test "x$with_import_hotspot" != x; then
26433     CURDIR="$PWD"
26434     cd "$with_import_hotspot"
26435     HOTSPOT_DIST="`pwd`"
26436     cd "$CURDIR"
26437     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26438       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26439     fi
26440     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26441 $as_echo_n "checking if hotspot should be imported... " >&6; }
26442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26443 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26444     BUILD_HOTSPOT=false
26445   fi
26446 
26447   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26448 
26449 
26450 ###############################################################################
26451 #
26452 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26453 # native code.
26454 #
26455 ###############################################################################
26456 
26457 # First determine the toolchain type (compiler family)
26458 
26459 
26460 # Check whether --with-toolchain-type was given.
26461 if test "${with_toolchain_type+set}" = set; then :
26462   withval=$with_toolchain_type;
26463 fi
26464 
26465 
26466   # Use indirect variable referencing
26467   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26468   VALID_TOOLCHAINS=${!toolchain_var_name}
26469 
26470   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26471     if test -n "$XCODEBUILD"; then
26472       # On Mac OS X, default toolchain to clang after Xcode 5
26473       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26474       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26475       if test $? -ne 0; then
26476         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26477       fi
26478       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26479           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26480           $CUT -f 1 -d .`
26481       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26482 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26483       if test $XCODE_MAJOR_VERSION -ge 5; then
26484           DEFAULT_TOOLCHAIN="clang"
26485       else
26486           DEFAULT_TOOLCHAIN="gcc"
26487       fi
26488     else
26489       # If Xcode is not installed, but the command line tools are
26490       # then we can't run xcodebuild. On these systems we should
26491       # default to clang
26492       DEFAULT_TOOLCHAIN="clang"
26493     fi
26494   else
26495     # First toolchain type in the list is the default
26496     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26497   fi
26498 
26499   if test "x$with_toolchain_type" = xlist; then
26500     # List all toolchains
26501     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26502 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26503     for toolchain in $VALID_TOOLCHAINS; do
26504       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26505       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26506       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26507     done
26508 
26509     exit 0
26510   elif test "x$with_toolchain_type" != x; then
26511     # User override; check that it is valid
26512     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26513       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26514 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26515       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26516 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26517       as_fn_error $? "Cannot continue." "$LINENO" 5
26518     fi
26519     TOOLCHAIN_TYPE=$with_toolchain_type
26520   else
26521     # No flag given, use default
26522     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26523   fi
26524 
26525 
26526   TOOLCHAIN_CC_BINARY_clang="clang"
26527   TOOLCHAIN_CC_BINARY_gcc="gcc"
26528   TOOLCHAIN_CC_BINARY_microsoft="cl"
26529   TOOLCHAIN_CC_BINARY_solstudio="cc"
26530   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26531 
26532   TOOLCHAIN_CXX_BINARY_clang="clang++"
26533   TOOLCHAIN_CXX_BINARY_gcc="g++"
26534   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26535   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26536   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26537 
26538   # Use indirect variable referencing
26539   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26540   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26541   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26542   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26543   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26544   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26545 
26546 
26547   # Define filename patterns
26548   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26549     LIBRARY_PREFIX=
26550     SHARED_LIBRARY_SUFFIX='.dll'
26551     STATIC_LIBRARY_SUFFIX='.lib'
26552     SHARED_LIBRARY='$1.dll'
26553     STATIC_LIBRARY='$1.lib'
26554     OBJ_SUFFIX='.obj'
26555     EXE_SUFFIX='.exe'
26556   else
26557     LIBRARY_PREFIX=lib
26558     SHARED_LIBRARY_SUFFIX='.so'
26559     STATIC_LIBRARY_SUFFIX='.a'
26560     SHARED_LIBRARY='lib$1.so'
26561     STATIC_LIBRARY='lib$1.a'
26562     OBJ_SUFFIX='.o'
26563     EXE_SUFFIX=''
26564     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26565       SHARED_LIBRARY='lib$1.dylib'
26566       SHARED_LIBRARY_SUFFIX='.dylib'
26567     fi
26568   fi
26569 
26570 
26571 
26572 
26573 
26574 
26575 
26576 
26577 
26578 
26579   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26580     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26581 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26582   else
26583     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26584 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26585   fi
26586 
26587 
26588 # Then detect the actual binaries needed
26589 
26590   # FIXME: Is this needed?
26591   ac_ext=cpp
26592 ac_cpp='$CXXCPP $CPPFLAGS'
26593 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26594 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26595 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26596 
26597 
26598   # Store the CFLAGS etc passed to the configure script.
26599   ORG_CFLAGS="$CFLAGS"
26600   ORG_CXXFLAGS="$CXXFLAGS"
26601   ORG_OBJCFLAGS="$OBJCFLAGS"
26602 
26603   # On Windows, we need to detect the visual studio installation first.
26604   # This will change the PATH, but we need to keep that new PATH even
26605   # after toolchain detection is done, since the compiler (on x86) uses
26606   # it for DLL resolution in runtime.
26607   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26608 
26609   # Store path to cygwin link.exe to help excluding it when searching for
26610   # VS linker. This must be done before changing the PATH when looking for VS.
26611   # Extract the first word of "link", so it can be a program name with args.
26612 set dummy link; ac_word=$2
26613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26614 $as_echo_n "checking for $ac_word... " >&6; }
26615 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26616   $as_echo_n "(cached) " >&6
26617 else
26618   case $CYGWIN_LINK in
26619   [\\/]* | ?:[\\/]*)
26620   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26621   ;;
26622   *)
26623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26624 for as_dir in $PATH
26625 do
26626   IFS=$as_save_IFS
26627   test -z "$as_dir" && as_dir=.
26628     for ac_exec_ext in '' $ac_executable_extensions; do
26629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26630     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26632     break 2
26633   fi
26634 done
26635   done
26636 IFS=$as_save_IFS
26637 
26638   ;;
26639 esac
26640 fi
26641 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26642 if test -n "$CYGWIN_LINK"; then
26643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26644 $as_echo "$CYGWIN_LINK" >&6; }
26645 else
26646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26647 $as_echo "no" >&6; }
26648 fi
26649 
26650 
26651   if test "x$CYGWIN_LINK" != x; then
26652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26653 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26654     "$CYGWIN_LINK" --version > /dev/null
26655     if test $? -eq 0 ; then
26656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26657 $as_echo "yes" >&6; }
26658     else
26659       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26660 $as_echo "no" >&6; }
26661       # This might be the VS linker. Don't exclude it later on.
26662       CYGWIN_LINK=""
26663     fi
26664   fi
26665 
26666   # First-hand choice is to locate and run the vsvars bat file.
26667 
26668   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26669     VCVARSFILE="vc/bin/vcvars32.bat"
26670   else
26671     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26672   fi
26673 
26674   VS_ENV_CMD=""
26675   VS_ENV_ARGS=""
26676   if test "x$with_toolsdir" != x; then
26677 
26678   if test "x$VS_ENV_CMD" = x; then
26679     VS100BASE="$with_toolsdir/../.."
26680     METHOD="--with-tools-dir"
26681 
26682   windows_path="$VS100BASE"
26683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26684     unix_path=`$CYGPATH -u "$windows_path"`
26685     VS100BASE="$unix_path"
26686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26688     VS100BASE="$unix_path"
26689   fi
26690 
26691     if test -d "$VS100BASE"; then
26692       if test -f "$VS100BASE/$VCVARSFILE"; then
26693         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26694 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26695         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26696         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26697         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26698         # TODO: improve detection for other versions of VS
26699         PLATFORM_TOOLSET="v100"
26700       else
26701         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26702 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26703         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26704 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26705       fi
26706     fi
26707   fi
26708 
26709   fi
26710 
26711   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26712     # Having specified an argument which is incorrect will produce an instant failure;
26713     # we should not go on looking
26714     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26715 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26716     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26717 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26718     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26719   fi
26720 
26721   if test "x$VS100COMNTOOLS" != x; then
26722 
26723   if test "x$VS_ENV_CMD" = x; then
26724     VS100BASE="$VS100COMNTOOLS/../.."
26725     METHOD="VS100COMNTOOLS variable"
26726 
26727   windows_path="$VS100BASE"
26728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26729     unix_path=`$CYGPATH -u "$windows_path"`
26730     VS100BASE="$unix_path"
26731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26733     VS100BASE="$unix_path"
26734   fi
26735 
26736     if test -d "$VS100BASE"; then
26737       if test -f "$VS100BASE/$VCVARSFILE"; then
26738         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26739 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26740         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26741         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26742         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26743         # TODO: improve detection for other versions of VS
26744         PLATFORM_TOOLSET="v100"
26745       else
26746         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26747 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26748         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26749 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26750       fi
26751     fi
26752   fi
26753 
26754   fi
26755   if test "x$PROGRAMFILES" != x; then
26756 
26757   if test "x$VS_ENV_CMD" = x; then
26758     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26759     METHOD="well-known name"
26760 
26761   windows_path="$VS100BASE"
26762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26763     unix_path=`$CYGPATH -u "$windows_path"`
26764     VS100BASE="$unix_path"
26765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26767     VS100BASE="$unix_path"
26768   fi
26769 
26770     if test -d "$VS100BASE"; then
26771       if test -f "$VS100BASE/$VCVARSFILE"; then
26772         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26773 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26774         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26775         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26776         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26777         # TODO: improve detection for other versions of VS
26778         PLATFORM_TOOLSET="v100"
26779       else
26780         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26781 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26782         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26783 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26784       fi
26785     fi
26786   fi
26787 
26788   fi
26789 
26790   if test "x$VS_ENV_CMD" = x; then
26791     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26792     METHOD="well-known name"
26793 
26794   windows_path="$VS100BASE"
26795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26796     unix_path=`$CYGPATH -u "$windows_path"`
26797     VS100BASE="$unix_path"
26798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26800     VS100BASE="$unix_path"
26801   fi
26802 
26803     if test -d "$VS100BASE"; then
26804       if test -f "$VS100BASE/$VCVARSFILE"; then
26805         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26806 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26807         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26808         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26809         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26810         # TODO: improve detection for other versions of VS
26811         PLATFORM_TOOLSET="v100"
26812       else
26813         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26814 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26815         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26816 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26817       fi
26818     fi
26819   fi
26820 
26821 
26822   if test "x$VS_ENV_CMD" = x; then
26823     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26824     METHOD="well-known name"
26825 
26826   windows_path="$VS100BASE"
26827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26828     unix_path=`$CYGPATH -u "$windows_path"`
26829     VS100BASE="$unix_path"
26830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26832     VS100BASE="$unix_path"
26833   fi
26834 
26835     if test -d "$VS100BASE"; then
26836       if test -f "$VS100BASE/$VCVARSFILE"; then
26837         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26838 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26839         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26840         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26841         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26842         # TODO: improve detection for other versions of VS
26843         PLATFORM_TOOLSET="v100"
26844       else
26845         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26846 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26847         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26848 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26849       fi
26850     fi
26851   fi
26852 
26853 
26854   if test "x$ProgramW6432" != x; then
26855 
26856   if test "x$VS_ENV_CMD" = x; then
26857     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26858     METHOD="well-known name"
26859 
26860   windows_path="$WIN_SDK_BASE"
26861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26862     unix_path=`$CYGPATH -u "$windows_path"`
26863     WIN_SDK_BASE="$unix_path"
26864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26866     WIN_SDK_BASE="$unix_path"
26867   fi
26868 
26869     if test -d "$WIN_SDK_BASE"; then
26870       # There have been cases of partial or broken SDK installations. A missing
26871       # lib dir is not going to work.
26872       if test ! -d "$WIN_SDK_BASE/../lib"; then
26873         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26874 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26875         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26876 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26877       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26878         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26879 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26880         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26881         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26882           VS_ENV_ARGS="/x86"
26883         else
26884           VS_ENV_ARGS="/x64"
26885         fi
26886         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26887         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26888         # TODO: improve detection for other versions of SDK
26889         PLATFORM_TOOLSET="Windows7.1SDK"
26890       else
26891         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26892 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26893         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26894 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26895       fi
26896     fi
26897   fi
26898 
26899   fi
26900   if test "x$PROGRAMW6432" != x; then
26901 
26902   if test "x$VS_ENV_CMD" = x; then
26903     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26904     METHOD="well-known name"
26905 
26906   windows_path="$WIN_SDK_BASE"
26907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26908     unix_path=`$CYGPATH -u "$windows_path"`
26909     WIN_SDK_BASE="$unix_path"
26910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26912     WIN_SDK_BASE="$unix_path"
26913   fi
26914 
26915     if test -d "$WIN_SDK_BASE"; then
26916       # There have been cases of partial or broken SDK installations. A missing
26917       # lib dir is not going to work.
26918       if test ! -d "$WIN_SDK_BASE/../lib"; then
26919         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26920 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26921         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26922 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26923       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26924         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26925 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26926         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26927         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26928           VS_ENV_ARGS="/x86"
26929         else
26930           VS_ENV_ARGS="/x64"
26931         fi
26932         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26933         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26934         # TODO: improve detection for other versions of SDK
26935         PLATFORM_TOOLSET="Windows7.1SDK"
26936       else
26937         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26938 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26939         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26940 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26941       fi
26942     fi
26943   fi
26944 
26945   fi
26946   if test "x$PROGRAMFILES" != x; then
26947 
26948   if test "x$VS_ENV_CMD" = x; then
26949     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26950     METHOD="well-known name"
26951 
26952   windows_path="$WIN_SDK_BASE"
26953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26954     unix_path=`$CYGPATH -u "$windows_path"`
26955     WIN_SDK_BASE="$unix_path"
26956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26958     WIN_SDK_BASE="$unix_path"
26959   fi
26960 
26961     if test -d "$WIN_SDK_BASE"; then
26962       # There have been cases of partial or broken SDK installations. A missing
26963       # lib dir is not going to work.
26964       if test ! -d "$WIN_SDK_BASE/../lib"; then
26965         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26966 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26967         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26968 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26969       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26970         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26971 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26972         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26973         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26974           VS_ENV_ARGS="/x86"
26975         else
26976           VS_ENV_ARGS="/x64"
26977         fi
26978         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26979         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26980         # TODO: improve detection for other versions of SDK
26981         PLATFORM_TOOLSET="Windows7.1SDK"
26982       else
26983         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26984 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26985         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26986 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26987       fi
26988     fi
26989   fi
26990 
26991   fi
26992 
26993   if test "x$VS_ENV_CMD" = x; then
26994     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26995     METHOD="well-known name"
26996 
26997   windows_path="$WIN_SDK_BASE"
26998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26999     unix_path=`$CYGPATH -u "$windows_path"`
27000     WIN_SDK_BASE="$unix_path"
27001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27003     WIN_SDK_BASE="$unix_path"
27004   fi
27005 
27006     if test -d "$WIN_SDK_BASE"; then
27007       # There have been cases of partial or broken SDK installations. A missing
27008       # lib dir is not going to work.
27009       if test ! -d "$WIN_SDK_BASE/../lib"; then
27010         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27011 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27012         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27013 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27014       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27015         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27016 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27017         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27018         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27019           VS_ENV_ARGS="/x86"
27020         else
27021           VS_ENV_ARGS="/x64"
27022         fi
27023         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27024         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27025         # TODO: improve detection for other versions of SDK
27026         PLATFORM_TOOLSET="Windows7.1SDK"
27027       else
27028         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27029 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27030         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27031 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27032       fi
27033     fi
27034   fi
27035 
27036 
27037   if test "x$VS_ENV_CMD" = x; then
27038     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27039     METHOD="well-known name"
27040 
27041   windows_path="$WIN_SDK_BASE"
27042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27043     unix_path=`$CYGPATH -u "$windows_path"`
27044     WIN_SDK_BASE="$unix_path"
27045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27047     WIN_SDK_BASE="$unix_path"
27048   fi
27049 
27050     if test -d "$WIN_SDK_BASE"; then
27051       # There have been cases of partial or broken SDK installations. A missing
27052       # lib dir is not going to work.
27053       if test ! -d "$WIN_SDK_BASE/../lib"; then
27054         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27055 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27056         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27057 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27058       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27059         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27060 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27061         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27062         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27063           VS_ENV_ARGS="/x86"
27064         else
27065           VS_ENV_ARGS="/x64"
27066         fi
27067         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27068         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27069         # TODO: improve detection for other versions of SDK
27070         PLATFORM_TOOLSET="Windows7.1SDK"
27071       else
27072         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27073 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27074         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27075 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27076       fi
27077     fi
27078   fi
27079 
27080 
27081   if test "x$VS_ENV_CMD" != x; then
27082     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27083 
27084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27085 
27086   # First separate the path from the arguments. This will split at the first
27087   # space.
27088   complete="$VS_ENV_CMD"
27089   path="${complete%% *}"
27090   tmp="$complete EOL"
27091   arguments="${tmp#* }"
27092 
27093   # Input might be given as Windows format, start by converting to
27094   # unix format.
27095   new_path=`$CYGPATH -u "$path"`
27096 
27097   # Now try to locate executable using which
27098   new_path=`$WHICH "$new_path" 2> /dev/null`
27099   # bat and cmd files are not always considered executable in cygwin causing which
27100   # to not find them
27101   if test "x$new_path" = x \
27102       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27103       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27104     new_path=`$CYGPATH -u "$path"`
27105   fi
27106   if test "x$new_path" = x; then
27107     # Oops. Which didn't find the executable.
27108     # The splitting of arguments from the executable at a space might have been incorrect,
27109     # since paths with space are more likely in Windows. Give it another try with the whole
27110     # argument.
27111     path="$complete"
27112     arguments="EOL"
27113     new_path=`$CYGPATH -u "$path"`
27114     new_path=`$WHICH "$new_path" 2> /dev/null`
27115     # bat and cmd files are not always considered executable in cygwin causing which
27116     # to not find them
27117     if test "x$new_path" = x \
27118         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27119         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27120       new_path=`$CYGPATH -u "$path"`
27121     fi
27122     if test "x$new_path" = x; then
27123       # It's still not found. Now this is an unrecoverable error.
27124       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27125 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27126       has_space=`$ECHO "$complete" | $GREP " "`
27127       if test "x$has_space" != x; then
27128         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27129 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27130       fi
27131       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27132     fi
27133   fi
27134 
27135   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27136   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27137   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27138   # "foo.exe" is OK but "foo" is an error.
27139   #
27140   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27141   # It is also a way to make sure we got the proper file name for the real test later on.
27142   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27143   if test "x$test_shortpath" = x; then
27144     # Short path failed, file does not exist as specified.
27145     # Try adding .exe or .cmd
27146     if test -f "${new_path}.exe"; then
27147       input_to_shortpath="${new_path}.exe"
27148     elif test -f "${new_path}.cmd"; then
27149       input_to_shortpath="${new_path}.cmd"
27150     else
27151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27152 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27153       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27154 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27155       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27156     fi
27157   else
27158     input_to_shortpath="$new_path"
27159   fi
27160 
27161   # Call helper function which possibly converts this using DOS-style short mode.
27162   # If so, the updated path is stored in $new_path.
27163   new_path="$input_to_shortpath"
27164 
27165   input_path="$input_to_shortpath"
27166   # Check if we need to convert this using DOS-style short mode. If the path
27167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27168   # take no chances and rewrite it.
27169   # Note: m4 eats our [], so we need to use [ and ] instead.
27170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27171   if test "x$has_forbidden_chars" != x; then
27172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27173     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27174     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27175     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27176       # Going to short mode and back again did indeed matter. Since short mode is
27177       # case insensitive, let's make it lowercase to improve readability.
27178       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27179       # Now convert it back to Unix-stile (cygpath)
27180       input_path=`$CYGPATH -u "$shortmode_path"`
27181       new_path="$input_path"
27182     fi
27183   fi
27184 
27185   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27186   if test "x$test_cygdrive_prefix" = x; then
27187     # As a simple fix, exclude /usr/bin since it's not a real path.
27188     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27189       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27190       # a path prefixed by /cygdrive for fixpath to work.
27191       new_path="$CYGWIN_ROOT_PATH$input_path"
27192     fi
27193   fi
27194 
27195   # remove trailing .exe if any
27196   new_path="${new_path/%.exe/}"
27197 
27198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199 
27200   # First separate the path from the arguments. This will split at the first
27201   # space.
27202   complete="$VS_ENV_CMD"
27203   path="${complete%% *}"
27204   tmp="$complete EOL"
27205   arguments="${tmp#* }"
27206 
27207   # Input might be given as Windows format, start by converting to
27208   # unix format.
27209   new_path="$path"
27210 
27211   windows_path="$new_path"
27212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27213     unix_path=`$CYGPATH -u "$windows_path"`
27214     new_path="$unix_path"
27215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27216     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27217     new_path="$unix_path"
27218   fi
27219 
27220 
27221   # Now try to locate executable using which
27222   new_path=`$WHICH "$new_path" 2> /dev/null`
27223 
27224   if test "x$new_path" = x; then
27225     # Oops. Which didn't find the executable.
27226     # The splitting of arguments from the executable at a space might have been incorrect,
27227     # since paths with space are more likely in Windows. Give it another try with the whole
27228     # argument.
27229     path="$complete"
27230     arguments="EOL"
27231     new_path="$path"
27232 
27233   windows_path="$new_path"
27234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27235     unix_path=`$CYGPATH -u "$windows_path"`
27236     new_path="$unix_path"
27237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27239     new_path="$unix_path"
27240   fi
27241 
27242 
27243     new_path=`$WHICH "$new_path" 2> /dev/null`
27244     # bat and cmd files are not always considered executable in MSYS causing which
27245     # to not find them
27246     if test "x$new_path" = x \
27247         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27248         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27249       new_path="$path"
27250 
27251   windows_path="$new_path"
27252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27253     unix_path=`$CYGPATH -u "$windows_path"`
27254     new_path="$unix_path"
27255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27257     new_path="$unix_path"
27258   fi
27259 
27260     fi
27261 
27262     if test "x$new_path" = x; then
27263       # It's still not found. Now this is an unrecoverable error.
27264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27265 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27266       has_space=`$ECHO "$complete" | $GREP " "`
27267       if test "x$has_space" != x; then
27268         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27269 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27270       fi
27271       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27272     fi
27273   fi
27274 
27275   # Now new_path has a complete unix path to the binary
27276   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27277     # Keep paths in /bin as-is, but remove trailing .exe if any
27278     new_path="${new_path/%.exe/}"
27279     # Do not save /bin paths to all_fixpath_prefixes!
27280   else
27281     # Not in mixed or Windows style, start by that.
27282     new_path=`cmd //c echo $new_path`
27283 
27284   input_path="$new_path"
27285   # Check if we need to convert this using DOS-style short mode. If the path
27286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27287   # take no chances and rewrite it.
27288   # Note: m4 eats our [], so we need to use [ and ] instead.
27289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27290   if test "x$has_forbidden_chars" != x; then
27291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27292     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27293   fi
27294 
27295     # Output is in $new_path
27296 
27297   windows_path="$new_path"
27298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27299     unix_path=`$CYGPATH -u "$windows_path"`
27300     new_path="$unix_path"
27301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27303     new_path="$unix_path"
27304   fi
27305 
27306     # remove trailing .exe if any
27307     new_path="${new_path/%.exe/}"
27308 
27309     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27310     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27311   fi
27312 
27313   else
27314     # We're on a unix platform. Hooray! :)
27315     # First separate the path from the arguments. This will split at the first
27316     # space.
27317     complete="$VS_ENV_CMD"
27318     path="${complete%% *}"
27319     tmp="$complete EOL"
27320     arguments="${tmp#* }"
27321 
27322     # Cannot rely on the command "which" here since it doesn't always work.
27323     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27324     if test -z "$is_absolute_path"; then
27325       # Path to executable is not absolute. Find it.
27326       IFS_save="$IFS"
27327       IFS=:
27328       for p in $PATH; do
27329         if test -f "$p/$path" && test -x "$p/$path"; then
27330           new_path="$p/$path"
27331           break
27332         fi
27333       done
27334       IFS="$IFS_save"
27335     else
27336       # This is an absolute path, we can use it without further modifications.
27337       new_path="$path"
27338     fi
27339 
27340     if test "x$new_path" = x; then
27341       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27342 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27343       has_space=`$ECHO "$complete" | $GREP " "`
27344       if test "x$has_space" != x; then
27345         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27346 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27347       fi
27348       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27349     fi
27350   fi
27351 
27352   # Now join together the path and the arguments once again
27353   if test "x$arguments" != xEOL; then
27354     new_complete="$new_path ${arguments% *}"
27355   else
27356     new_complete="$new_path"
27357   fi
27358 
27359   if test "x$complete" != "x$new_complete"; then
27360     VS_ENV_CMD="$new_complete"
27361     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27362 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27363   fi
27364 
27365 
27366     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27367     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27368 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27369 
27370     # We need to create a couple of temporary files.
27371     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27372     $MKDIR -p $VS_ENV_TMP_DIR
27373 
27374     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27375     # Instead create a shell script which will set the relevant variables when run.
27376     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27377 
27378   unix_path="$WINPATH_VS_ENV_CMD"
27379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27380     windows_path=`$CYGPATH -m "$unix_path"`
27381     WINPATH_VS_ENV_CMD="$windows_path"
27382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27383     windows_path=`cmd //c echo $unix_path`
27384     WINPATH_VS_ENV_CMD="$windows_path"
27385   fi
27386 
27387     WINPATH_BASH="$BASH"
27388 
27389   unix_path="$WINPATH_BASH"
27390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27391     windows_path=`$CYGPATH -m "$unix_path"`
27392     WINPATH_BASH="$windows_path"
27393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27394     windows_path=`cmd //c echo $unix_path`
27395     WINPATH_BASH="$windows_path"
27396   fi
27397 
27398 
27399     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27400     # script (executable by bash) that will setup the important variables.
27401     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27402     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27403     # This will end up something like:
27404     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27405     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27406     # These will end up something like:
27407     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27408     # The trailing space for everyone except PATH is no typo, but is needed due
27409     # to trailing \ in the Windows paths. These will be stripped later.
27410     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27411     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27412     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27413     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27414     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> 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 
27417     # Now execute the newly created bat file.
27418     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27419     # Change directory so we don't need to mess with Windows paths in redirects.
27420     cd $VS_ENV_TMP_DIR
27421     cmd /c extract-vs-env.bat | $CAT
27422     cd $CURDIR
27423 
27424     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27425       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27426 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27427       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27428 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27429       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27430 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27431       as_fn_error $? "Cannot continue" "$LINENO" 5
27432     fi
27433 
27434     # Now set all paths and other env variables. This will allow the rest of
27435     # the configure script to find and run the compiler in the proper way.
27436     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27437 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27438     . $VS_ENV_TMP_DIR/set-vs-env.sh
27439     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27440     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27441   else
27442     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27443     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27444 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27445   fi
27446 
27447   # At this point, we should have correct variables in the environment, or we can't continue.
27448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27449 $as_echo_n "checking for Visual Studio variables... " >&6; }
27450 
27451   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27452     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27453       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27454 $as_echo "present but broken" >&6; }
27455       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27456     else
27457       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27458 $as_echo "ok" >&6; }
27459       # Remove any trailing "\" and " " from the variables.
27460       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27461       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27462       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27463       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27464       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27465       # Remove any paths containing # (typically F#) as that messes up make. This
27466       # is needed if visual studio was installed with F# support.
27467       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27468 
27469 
27470 
27471 
27472     fi
27473   else
27474     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27475 $as_echo "not found" >&6; }
27476 
27477     if test "x$VS_ENV_CMD" = x; then
27478       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27479 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27480       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27481 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27482     else
27483       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27484 $as_echo "$as_me: Running the extraction script failed." >&6;}
27485     fi
27486     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27487 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27488     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27489 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27490     as_fn_error $? "Cannot continue" "$LINENO" 5
27491   fi
27492 
27493     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27494     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27495     PATH="$VS_PATH"
27496     # The microsoft toolchain also requires INCLUDE and LIB to be set.
27497     export INCLUDE="$VS_INCLUDE"
27498     export LIB="$VS_LIB"
27499   fi
27500 
27501   # autoconf magic only relies on PATH, so update it if tools dir is specified
27502   OLD_PATH="$PATH"
27503 
27504   # For solaris we really need solaris tools, and not the GNU equivalent.
27505   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27506   # so add that to path before starting to probe.
27507   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27508   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27509     PATH="/usr/ccs/bin:$PATH"
27510   fi
27511 
27512   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27513   # override all other locations.
27514   if test "x$TOOLCHAIN_PATH" != x; then
27515     PATH=$TOOLCHAIN_PATH:$PATH
27516   fi
27517 
27518 
27519   #
27520   # Setup the compilers (CC and CXX)
27521   #
27522 
27523   COMPILER_NAME=C
27524   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27525 
27526   if test "x$CC" != x; then
27527     # User has supplied compiler name already, always let that override.
27528     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27529 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27530     if test "x`basename $CC`" = "x$CC"; then
27531       # A command without a complete path is provided, search $PATH.
27532 
27533       for ac_prog in $CC
27534 do
27535   # Extract the first word of "$ac_prog", so it can be a program name with args.
27536 set dummy $ac_prog; ac_word=$2
27537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27538 $as_echo_n "checking for $ac_word... " >&6; }
27539 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27540   $as_echo_n "(cached) " >&6
27541 else
27542   case $POTENTIAL_CC in
27543   [\\/]* | ?:[\\/]*)
27544   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27545   ;;
27546   *)
27547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27548 for as_dir in $PATH
27549 do
27550   IFS=$as_save_IFS
27551   test -z "$as_dir" && as_dir=.
27552     for ac_exec_ext in '' $ac_executable_extensions; do
27553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27554     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27556     break 2
27557   fi
27558 done
27559   done
27560 IFS=$as_save_IFS
27561 
27562   ;;
27563 esac
27564 fi
27565 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27566 if test -n "$POTENTIAL_CC"; then
27567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27568 $as_echo "$POTENTIAL_CC" >&6; }
27569 else
27570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27571 $as_echo "no" >&6; }
27572 fi
27573 
27574 
27575   test -n "$POTENTIAL_CC" && break
27576 done
27577 
27578       if test "x$POTENTIAL_CC" != x; then
27579         CC=$POTENTIAL_CC
27580       else
27581         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27582       fi
27583     else
27584       # Otherwise it might already be a complete path
27585       if test ! -x "$CC"; then
27586         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27587       fi
27588     fi
27589   else
27590     # No user supplied value. Locate compiler ourselves.
27591 
27592     # If we are cross compiling, assume cross compilation tools follows the
27593     # cross compilation standard where they are prefixed with the autoconf
27594     # standard name for the target. For example the binary
27595     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27596     # If we are not cross compiling, then the default compiler name will be
27597     # used.
27598 
27599     CC=
27600     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27601     # before checking the rest of the PATH.
27602     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27603     # step, this should not be necessary.
27604     if test -n "$TOOLCHAIN_PATH"; then
27605       PATH_save="$PATH"
27606       PATH="$TOOLCHAIN_PATH"
27607       for ac_prog in $SEARCH_LIST
27608 do
27609   # Extract the first word of "$ac_prog", so it can be a program name with args.
27610 set dummy $ac_prog; ac_word=$2
27611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27612 $as_echo_n "checking for $ac_word... " >&6; }
27613 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27614   $as_echo_n "(cached) " >&6
27615 else
27616   case $TOOLCHAIN_PATH_CC in
27617   [\\/]* | ?:[\\/]*)
27618   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27619   ;;
27620   *)
27621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27622 for as_dir in $PATH
27623 do
27624   IFS=$as_save_IFS
27625   test -z "$as_dir" && as_dir=.
27626     for ac_exec_ext in '' $ac_executable_extensions; do
27627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27628     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27630     break 2
27631   fi
27632 done
27633   done
27634 IFS=$as_save_IFS
27635 
27636   ;;
27637 esac
27638 fi
27639 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27640 if test -n "$TOOLCHAIN_PATH_CC"; then
27641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27642 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27643 else
27644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27645 $as_echo "no" >&6; }
27646 fi
27647 
27648 
27649   test -n "$TOOLCHAIN_PATH_CC" && break
27650 done
27651 
27652       CC=$TOOLCHAIN_PATH_CC
27653       PATH="$PATH_save"
27654     fi
27655 
27656     # AC_PATH_PROGS can't be run multiple times with the same variable,
27657     # so create a new name for this run.
27658     if test "x$CC" = x; then
27659       for ac_prog in $SEARCH_LIST
27660 do
27661   # Extract the first word of "$ac_prog", so it can be a program name with args.
27662 set dummy $ac_prog; ac_word=$2
27663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27664 $as_echo_n "checking for $ac_word... " >&6; }
27665 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27666   $as_echo_n "(cached) " >&6
27667 else
27668   case $POTENTIAL_CC in
27669   [\\/]* | ?:[\\/]*)
27670   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27671   ;;
27672   *)
27673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27674 for as_dir in $PATH
27675 do
27676   IFS=$as_save_IFS
27677   test -z "$as_dir" && as_dir=.
27678     for ac_exec_ext in '' $ac_executable_extensions; do
27679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27680     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27682     break 2
27683   fi
27684 done
27685   done
27686 IFS=$as_save_IFS
27687 
27688   ;;
27689 esac
27690 fi
27691 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27692 if test -n "$POTENTIAL_CC"; then
27693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27694 $as_echo "$POTENTIAL_CC" >&6; }
27695 else
27696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27697 $as_echo "no" >&6; }
27698 fi
27699 
27700 
27701   test -n "$POTENTIAL_CC" && break
27702 done
27703 
27704       CC=$POTENTIAL_CC
27705     fi
27706 
27707     if test "x$CC" = x; then
27708 
27709   # Print a helpful message on how to acquire the necessary build dependency.
27710   # devkit is the help tag: freetype, cups, pulse, alsa etc
27711   MISSING_DEPENDENCY=devkit
27712 
27713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27714     cygwin_help $MISSING_DEPENDENCY
27715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27716     msys_help $MISSING_DEPENDENCY
27717   else
27718     PKGHANDLER_COMMAND=
27719 
27720     case $PKGHANDLER in
27721       apt-get)
27722         apt_help     $MISSING_DEPENDENCY ;;
27723       yum)
27724         yum_help     $MISSING_DEPENDENCY ;;
27725       port)
27726         port_help    $MISSING_DEPENDENCY ;;
27727       pkgutil)
27728         pkgutil_help $MISSING_DEPENDENCY ;;
27729       pkgadd)
27730         pkgadd_help  $MISSING_DEPENDENCY ;;
27731     esac
27732 
27733     if test "x$PKGHANDLER_COMMAND" != x; then
27734       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27735     fi
27736   fi
27737 
27738       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27739     fi
27740   fi
27741 
27742   # Now we have a compiler binary in CC. Make sure it's okay.
27743 
27744   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27745 
27746   # First separate the path from the arguments. This will split at the first
27747   # space.
27748   complete="$CC"
27749   path="${complete%% *}"
27750   tmp="$complete EOL"
27751   arguments="${tmp#* }"
27752 
27753   # Input might be given as Windows format, start by converting to
27754   # unix format.
27755   new_path=`$CYGPATH -u "$path"`
27756 
27757   # Now try to locate executable using which
27758   new_path=`$WHICH "$new_path" 2> /dev/null`
27759   # bat and cmd files are not always considered executable in cygwin causing which
27760   # to not find them
27761   if test "x$new_path" = x \
27762       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27763       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27764     new_path=`$CYGPATH -u "$path"`
27765   fi
27766   if test "x$new_path" = x; then
27767     # Oops. Which didn't find the executable.
27768     # The splitting of arguments from the executable at a space might have been incorrect,
27769     # since paths with space are more likely in Windows. Give it another try with the whole
27770     # argument.
27771     path="$complete"
27772     arguments="EOL"
27773     new_path=`$CYGPATH -u "$path"`
27774     new_path=`$WHICH "$new_path" 2> /dev/null`
27775     # bat and cmd files are not always considered executable in cygwin causing which
27776     # to not find them
27777     if test "x$new_path" = x \
27778         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27779         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27780       new_path=`$CYGPATH -u "$path"`
27781     fi
27782     if test "x$new_path" = x; then
27783       # It's still not found. Now this is an unrecoverable error.
27784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27785 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27786       has_space=`$ECHO "$complete" | $GREP " "`
27787       if test "x$has_space" != x; then
27788         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27789 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27790       fi
27791       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27792     fi
27793   fi
27794 
27795   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27796   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27797   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27798   # "foo.exe" is OK but "foo" is an error.
27799   #
27800   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27801   # It is also a way to make sure we got the proper file name for the real test later on.
27802   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27803   if test "x$test_shortpath" = x; then
27804     # Short path failed, file does not exist as specified.
27805     # Try adding .exe or .cmd
27806     if test -f "${new_path}.exe"; then
27807       input_to_shortpath="${new_path}.exe"
27808     elif test -f "${new_path}.cmd"; then
27809       input_to_shortpath="${new_path}.cmd"
27810     else
27811       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27812 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27813       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27814 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27815       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27816     fi
27817   else
27818     input_to_shortpath="$new_path"
27819   fi
27820 
27821   # Call helper function which possibly converts this using DOS-style short mode.
27822   # If so, the updated path is stored in $new_path.
27823   new_path="$input_to_shortpath"
27824 
27825   input_path="$input_to_shortpath"
27826   # Check if we need to convert this using DOS-style short mode. If the path
27827   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27828   # take no chances and rewrite it.
27829   # Note: m4 eats our [], so we need to use [ and ] instead.
27830   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27831   if test "x$has_forbidden_chars" != x; then
27832     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27833     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27834     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27835     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27836       # Going to short mode and back again did indeed matter. Since short mode is
27837       # case insensitive, let's make it lowercase to improve readability.
27838       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27839       # Now convert it back to Unix-stile (cygpath)
27840       input_path=`$CYGPATH -u "$shortmode_path"`
27841       new_path="$input_path"
27842     fi
27843   fi
27844 
27845   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27846   if test "x$test_cygdrive_prefix" = x; then
27847     # As a simple fix, exclude /usr/bin since it's not a real path.
27848     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27849       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27850       # a path prefixed by /cygdrive for fixpath to work.
27851       new_path="$CYGWIN_ROOT_PATH$input_path"
27852     fi
27853   fi
27854 
27855   # remove trailing .exe if any
27856   new_path="${new_path/%.exe/}"
27857 
27858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27859 
27860   # First separate the path from the arguments. This will split at the first
27861   # space.
27862   complete="$CC"
27863   path="${complete%% *}"
27864   tmp="$complete EOL"
27865   arguments="${tmp#* }"
27866 
27867   # Input might be given as Windows format, start by converting to
27868   # unix format.
27869   new_path="$path"
27870 
27871   windows_path="$new_path"
27872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27873     unix_path=`$CYGPATH -u "$windows_path"`
27874     new_path="$unix_path"
27875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27877     new_path="$unix_path"
27878   fi
27879 
27880 
27881   # Now try to locate executable using which
27882   new_path=`$WHICH "$new_path" 2> /dev/null`
27883 
27884   if test "x$new_path" = x; then
27885     # Oops. Which didn't find the executable.
27886     # The splitting of arguments from the executable at a space might have been incorrect,
27887     # since paths with space are more likely in Windows. Give it another try with the whole
27888     # argument.
27889     path="$complete"
27890     arguments="EOL"
27891     new_path="$path"
27892 
27893   windows_path="$new_path"
27894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27895     unix_path=`$CYGPATH -u "$windows_path"`
27896     new_path="$unix_path"
27897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27899     new_path="$unix_path"
27900   fi
27901 
27902 
27903     new_path=`$WHICH "$new_path" 2> /dev/null`
27904     # bat and cmd files are not always considered executable in MSYS causing which
27905     # to not find them
27906     if test "x$new_path" = x \
27907         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27908         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27909       new_path="$path"
27910 
27911   windows_path="$new_path"
27912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27913     unix_path=`$CYGPATH -u "$windows_path"`
27914     new_path="$unix_path"
27915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27917     new_path="$unix_path"
27918   fi
27919 
27920     fi
27921 
27922     if test "x$new_path" = x; then
27923       # It's still not found. Now this is an unrecoverable error.
27924       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27925 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27926       has_space=`$ECHO "$complete" | $GREP " "`
27927       if test "x$has_space" != x; then
27928         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27929 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27930       fi
27931       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27932     fi
27933   fi
27934 
27935   # Now new_path has a complete unix path to the binary
27936   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27937     # Keep paths in /bin as-is, but remove trailing .exe if any
27938     new_path="${new_path/%.exe/}"
27939     # Do not save /bin paths to all_fixpath_prefixes!
27940   else
27941     # Not in mixed or Windows style, start by that.
27942     new_path=`cmd //c echo $new_path`
27943 
27944   input_path="$new_path"
27945   # Check if we need to convert this using DOS-style short mode. If the path
27946   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27947   # take no chances and rewrite it.
27948   # Note: m4 eats our [], so we need to use [ and ] instead.
27949   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27950   if test "x$has_forbidden_chars" != x; then
27951     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27952     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27953   fi
27954 
27955     # Output is in $new_path
27956 
27957   windows_path="$new_path"
27958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27959     unix_path=`$CYGPATH -u "$windows_path"`
27960     new_path="$unix_path"
27961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27963     new_path="$unix_path"
27964   fi
27965 
27966     # remove trailing .exe if any
27967     new_path="${new_path/%.exe/}"
27968 
27969     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27970     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27971   fi
27972 
27973   else
27974     # We're on a unix platform. Hooray! :)
27975     # First separate the path from the arguments. This will split at the first
27976     # space.
27977     complete="$CC"
27978     path="${complete%% *}"
27979     tmp="$complete EOL"
27980     arguments="${tmp#* }"
27981 
27982     # Cannot rely on the command "which" here since it doesn't always work.
27983     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27984     if test -z "$is_absolute_path"; then
27985       # Path to executable is not absolute. Find it.
27986       IFS_save="$IFS"
27987       IFS=:
27988       for p in $PATH; do
27989         if test -f "$p/$path" && test -x "$p/$path"; then
27990           new_path="$p/$path"
27991           break
27992         fi
27993       done
27994       IFS="$IFS_save"
27995     else
27996       # This is an absolute path, we can use it without further modifications.
27997       new_path="$path"
27998     fi
27999 
28000     if test "x$new_path" = x; then
28001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28002 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28003       has_space=`$ECHO "$complete" | $GREP " "`
28004       if test "x$has_space" != x; then
28005         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28006 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28007       fi
28008       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28009     fi
28010   fi
28011 
28012   # Now join together the path and the arguments once again
28013   if test "x$arguments" != xEOL; then
28014     new_complete="$new_path ${arguments% *}"
28015   else
28016     new_complete="$new_path"
28017   fi
28018 
28019   if test "x$complete" != "x$new_complete"; then
28020     CC="$new_complete"
28021     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28022 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28023   fi
28024 
28025   TEST_COMPILER="$CC"
28026   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28027   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28028   if test "x$OPENJDK_BUILD_OS" != xaix; then
28029     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28030     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28031 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
28032 
28033   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28034     # Follow a chain of symbolic links. Use readlink
28035     # where it exists, else fall back to horribly
28036     # complicated shell code.
28037     if test "x$READLINK_TESTED" != yes; then
28038       # On MacOSX there is a readlink tool with a different
28039       # purpose than the GNU readlink tool. Check the found readlink.
28040       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28041       if test "x$ISGNU" = x; then
28042         # A readlink that we do not know how to use.
28043         # Are there other non-GNU readlinks out there?
28044         READLINK_TESTED=yes
28045         READLINK=
28046       fi
28047     fi
28048 
28049     if test "x$READLINK" != x; then
28050       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28051     else
28052       # Save the current directory for restoring afterwards
28053       STARTDIR=$PWD
28054       COUNTER=0
28055       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28056       sym_link_file=`$BASENAME $TEST_COMPILER`
28057       cd $sym_link_dir
28058       # Use -P flag to resolve symlinks in directories.
28059       cd `$THEPWDCMD -P`
28060       sym_link_dir=`$THEPWDCMD -P`
28061       # Resolve file symlinks
28062       while test $COUNTER -lt 20; do
28063         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28064         if test "x$ISLINK" == x; then
28065           # This is not a symbolic link! We are done!
28066           break
28067         fi
28068         # Again resolve directory symlinks since the target of the just found
28069         # link could be in a different directory
28070         cd `$DIRNAME $ISLINK`
28071         sym_link_dir=`$THEPWDCMD -P`
28072         sym_link_file=`$BASENAME $ISLINK`
28073         let COUNTER=COUNTER+1
28074       done
28075       cd $STARTDIR
28076       TEST_COMPILER=$sym_link_dir/$sym_link_file
28077     fi
28078   fi
28079 
28080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28081 $as_echo "$TEST_COMPILER" >&6; }
28082   fi
28083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28084 $as_echo_n "checking if CC is disguised ccache... " >&6; }
28085 
28086   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28087   if test "x$COMPILER_BASENAME" = "xccache"; then
28088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28089 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28090     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28091     # We want to control ccache invocation ourselves, so ignore this cc and try
28092     # searching again.
28093 
28094     # Remove the path to the fake ccache cc from the PATH
28095     RETRY_COMPILER_SAVED_PATH="$PATH"
28096     COMPILER_DIRNAME=`$DIRNAME $CC`
28097     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28098 
28099     # Try again looking for our compiler
28100     if test -n "$ac_tool_prefix"; then
28101   for ac_prog in $TOOLCHAIN_CC_BINARY
28102   do
28103     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28104 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28106 $as_echo_n "checking for $ac_word... " >&6; }
28107 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28108   $as_echo_n "(cached) " >&6
28109 else
28110   if test -n "$PROPER_COMPILER_CC"; then
28111   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28112 else
28113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28114 for as_dir in $PATH
28115 do
28116   IFS=$as_save_IFS
28117   test -z "$as_dir" && as_dir=.
28118     for ac_exec_ext in '' $ac_executable_extensions; do
28119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28120     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28122     break 2
28123   fi
28124 done
28125   done
28126 IFS=$as_save_IFS
28127 
28128 fi
28129 fi
28130 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28131 if test -n "$PROPER_COMPILER_CC"; then
28132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28133 $as_echo "$PROPER_COMPILER_CC" >&6; }
28134 else
28135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28136 $as_echo "no" >&6; }
28137 fi
28138 
28139 
28140     test -n "$PROPER_COMPILER_CC" && break
28141   done
28142 fi
28143 if test -z "$PROPER_COMPILER_CC"; then
28144   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28145   for ac_prog in $TOOLCHAIN_CC_BINARY
28146 do
28147   # Extract the first word of "$ac_prog", so it can be a program name with args.
28148 set dummy $ac_prog; ac_word=$2
28149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28150 $as_echo_n "checking for $ac_word... " >&6; }
28151 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28152   $as_echo_n "(cached) " >&6
28153 else
28154   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28155   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28156 else
28157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28158 for as_dir in $PATH
28159 do
28160   IFS=$as_save_IFS
28161   test -z "$as_dir" && as_dir=.
28162     for ac_exec_ext in '' $ac_executable_extensions; do
28163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28164     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28166     break 2
28167   fi
28168 done
28169   done
28170 IFS=$as_save_IFS
28171 
28172 fi
28173 fi
28174 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28175 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28177 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28178 else
28179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28180 $as_echo "no" >&6; }
28181 fi
28182 
28183 
28184   test -n "$ac_ct_PROPER_COMPILER_CC" && break
28185 done
28186 
28187   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28188     PROPER_COMPILER_CC=""
28189   else
28190     case $cross_compiling:$ac_tool_warned in
28191 yes:)
28192 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28193 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28194 ac_tool_warned=yes ;;
28195 esac
28196     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28197   fi
28198 fi
28199 
28200 
28201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28202 
28203   # First separate the path from the arguments. This will split at the first
28204   # space.
28205   complete="$PROPER_COMPILER_CC"
28206   path="${complete%% *}"
28207   tmp="$complete EOL"
28208   arguments="${tmp#* }"
28209 
28210   # Input might be given as Windows format, start by converting to
28211   # unix format.
28212   new_path=`$CYGPATH -u "$path"`
28213 
28214   # Now try to locate executable using which
28215   new_path=`$WHICH "$new_path" 2> /dev/null`
28216   # bat and cmd files are not always considered executable in cygwin causing which
28217   # to not find them
28218   if test "x$new_path" = x \
28219       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28220       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28221     new_path=`$CYGPATH -u "$path"`
28222   fi
28223   if test "x$new_path" = x; then
28224     # Oops. Which didn't find the executable.
28225     # The splitting of arguments from the executable at a space might have been incorrect,
28226     # since paths with space are more likely in Windows. Give it another try with the whole
28227     # argument.
28228     path="$complete"
28229     arguments="EOL"
28230     new_path=`$CYGPATH -u "$path"`
28231     new_path=`$WHICH "$new_path" 2> /dev/null`
28232     # bat and cmd files are not always considered executable in cygwin causing which
28233     # to not find them
28234     if test "x$new_path" = x \
28235         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28236         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28237       new_path=`$CYGPATH -u "$path"`
28238     fi
28239     if test "x$new_path" = x; then
28240       # It's still not found. Now this is an unrecoverable error.
28241       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28242 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28243       has_space=`$ECHO "$complete" | $GREP " "`
28244       if test "x$has_space" != x; then
28245         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28246 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28247       fi
28248       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28249     fi
28250   fi
28251 
28252   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28253   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28254   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28255   # "foo.exe" is OK but "foo" is an error.
28256   #
28257   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28258   # It is also a way to make sure we got the proper file name for the real test later on.
28259   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28260   if test "x$test_shortpath" = x; then
28261     # Short path failed, file does not exist as specified.
28262     # Try adding .exe or .cmd
28263     if test -f "${new_path}.exe"; then
28264       input_to_shortpath="${new_path}.exe"
28265     elif test -f "${new_path}.cmd"; then
28266       input_to_shortpath="${new_path}.cmd"
28267     else
28268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28269 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28270       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28271 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28272       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28273     fi
28274   else
28275     input_to_shortpath="$new_path"
28276   fi
28277 
28278   # Call helper function which possibly converts this using DOS-style short mode.
28279   # If so, the updated path is stored in $new_path.
28280   new_path="$input_to_shortpath"
28281 
28282   input_path="$input_to_shortpath"
28283   # Check if we need to convert this using DOS-style short mode. If the path
28284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28285   # take no chances and rewrite it.
28286   # Note: m4 eats our [], so we need to use [ and ] instead.
28287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28288   if test "x$has_forbidden_chars" != x; then
28289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28290     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28291     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28292     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28293       # Going to short mode and back again did indeed matter. Since short mode is
28294       # case insensitive, let's make it lowercase to improve readability.
28295       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28296       # Now convert it back to Unix-stile (cygpath)
28297       input_path=`$CYGPATH -u "$shortmode_path"`
28298       new_path="$input_path"
28299     fi
28300   fi
28301 
28302   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28303   if test "x$test_cygdrive_prefix" = x; then
28304     # As a simple fix, exclude /usr/bin since it's not a real path.
28305     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28306       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28307       # a path prefixed by /cygdrive for fixpath to work.
28308       new_path="$CYGWIN_ROOT_PATH$input_path"
28309     fi
28310   fi
28311 
28312   # remove trailing .exe if any
28313   new_path="${new_path/%.exe/}"
28314 
28315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28316 
28317   # First separate the path from the arguments. This will split at the first
28318   # space.
28319   complete="$PROPER_COMPILER_CC"
28320   path="${complete%% *}"
28321   tmp="$complete EOL"
28322   arguments="${tmp#* }"
28323 
28324   # Input might be given as Windows format, start by converting to
28325   # unix format.
28326   new_path="$path"
28327 
28328   windows_path="$new_path"
28329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28330     unix_path=`$CYGPATH -u "$windows_path"`
28331     new_path="$unix_path"
28332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28334     new_path="$unix_path"
28335   fi
28336 
28337 
28338   # Now try to locate executable using which
28339   new_path=`$WHICH "$new_path" 2> /dev/null`
28340 
28341   if test "x$new_path" = x; then
28342     # Oops. Which didn't find the executable.
28343     # The splitting of arguments from the executable at a space might have been incorrect,
28344     # since paths with space are more likely in Windows. Give it another try with the whole
28345     # argument.
28346     path="$complete"
28347     arguments="EOL"
28348     new_path="$path"
28349 
28350   windows_path="$new_path"
28351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28352     unix_path=`$CYGPATH -u "$windows_path"`
28353     new_path="$unix_path"
28354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28356     new_path="$unix_path"
28357   fi
28358 
28359 
28360     new_path=`$WHICH "$new_path" 2> /dev/null`
28361     # bat and cmd files are not always considered executable in MSYS causing which
28362     # to not find them
28363     if test "x$new_path" = x \
28364         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28365         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28366       new_path="$path"
28367 
28368   windows_path="$new_path"
28369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28370     unix_path=`$CYGPATH -u "$windows_path"`
28371     new_path="$unix_path"
28372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28374     new_path="$unix_path"
28375   fi
28376 
28377     fi
28378 
28379     if test "x$new_path" = x; then
28380       # It's still not found. Now this is an unrecoverable error.
28381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28382 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28383       has_space=`$ECHO "$complete" | $GREP " "`
28384       if test "x$has_space" != x; then
28385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28387       fi
28388       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28389     fi
28390   fi
28391 
28392   # Now new_path has a complete unix path to the binary
28393   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28394     # Keep paths in /bin as-is, but remove trailing .exe if any
28395     new_path="${new_path/%.exe/}"
28396     # Do not save /bin paths to all_fixpath_prefixes!
28397   else
28398     # Not in mixed or Windows style, start by that.
28399     new_path=`cmd //c echo $new_path`
28400 
28401   input_path="$new_path"
28402   # Check if we need to convert this using DOS-style short mode. If the path
28403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28404   # take no chances and rewrite it.
28405   # Note: m4 eats our [], so we need to use [ and ] instead.
28406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28407   if test "x$has_forbidden_chars" != x; then
28408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28410   fi
28411 
28412     # Output is in $new_path
28413 
28414   windows_path="$new_path"
28415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28416     unix_path=`$CYGPATH -u "$windows_path"`
28417     new_path="$unix_path"
28418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28420     new_path="$unix_path"
28421   fi
28422 
28423     # remove trailing .exe if any
28424     new_path="${new_path/%.exe/}"
28425 
28426     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28427     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28428   fi
28429 
28430   else
28431     # We're on a unix platform. Hooray! :)
28432     # First separate the path from the arguments. This will split at the first
28433     # space.
28434     complete="$PROPER_COMPILER_CC"
28435     path="${complete%% *}"
28436     tmp="$complete EOL"
28437     arguments="${tmp#* }"
28438 
28439     # Cannot rely on the command "which" here since it doesn't always work.
28440     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28441     if test -z "$is_absolute_path"; then
28442       # Path to executable is not absolute. Find it.
28443       IFS_save="$IFS"
28444       IFS=:
28445       for p in $PATH; do
28446         if test -f "$p/$path" && test -x "$p/$path"; then
28447           new_path="$p/$path"
28448           break
28449         fi
28450       done
28451       IFS="$IFS_save"
28452     else
28453       # This is an absolute path, we can use it without further modifications.
28454       new_path="$path"
28455     fi
28456 
28457     if test "x$new_path" = x; then
28458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28459 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28460       has_space=`$ECHO "$complete" | $GREP " "`
28461       if test "x$has_space" != x; then
28462         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28463 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28464       fi
28465       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28466     fi
28467   fi
28468 
28469   # Now join together the path and the arguments once again
28470   if test "x$arguments" != xEOL; then
28471     new_complete="$new_path ${arguments% *}"
28472   else
28473     new_complete="$new_path"
28474   fi
28475 
28476   if test "x$complete" != "x$new_complete"; then
28477     PROPER_COMPILER_CC="$new_complete"
28478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28479 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28480   fi
28481 
28482     PATH="$RETRY_COMPILER_SAVED_PATH"
28483 
28484     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28485 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28486 
28487   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28488     # Follow a chain of symbolic links. Use readlink
28489     # where it exists, else fall back to horribly
28490     # complicated shell code.
28491     if test "x$READLINK_TESTED" != yes; then
28492       # On MacOSX there is a readlink tool with a different
28493       # purpose than the GNU readlink tool. Check the found readlink.
28494       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28495       if test "x$ISGNU" = x; then
28496         # A readlink that we do not know how to use.
28497         # Are there other non-GNU readlinks out there?
28498         READLINK_TESTED=yes
28499         READLINK=
28500       fi
28501     fi
28502 
28503     if test "x$READLINK" != x; then
28504       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28505     else
28506       # Save the current directory for restoring afterwards
28507       STARTDIR=$PWD
28508       COUNTER=0
28509       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28510       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28511       cd $sym_link_dir
28512       # Use -P flag to resolve symlinks in directories.
28513       cd `$THEPWDCMD -P`
28514       sym_link_dir=`$THEPWDCMD -P`
28515       # Resolve file symlinks
28516       while test $COUNTER -lt 20; do
28517         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28518         if test "x$ISLINK" == x; then
28519           # This is not a symbolic link! We are done!
28520           break
28521         fi
28522         # Again resolve directory symlinks since the target of the just found
28523         # link could be in a different directory
28524         cd `$DIRNAME $ISLINK`
28525         sym_link_dir=`$THEPWDCMD -P`
28526         sym_link_file=`$BASENAME $ISLINK`
28527         let COUNTER=COUNTER+1
28528       done
28529       cd $STARTDIR
28530       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28531     fi
28532   fi
28533 
28534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28535 $as_echo "$PROPER_COMPILER_CC" >&6; }
28536     CC="$PROPER_COMPILER_CC"
28537   else
28538     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28539 $as_echo "no, keeping CC" >&6; }
28540   fi
28541 
28542 
28543   COMPILER=$CC
28544   COMPILER_NAME=$COMPILER_NAME
28545 
28546   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28547     # cc -V output typically looks like
28548     #     cc: Sun C 5.12 Linux_i386 2011/11/16
28549     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28550     # Check that this is likely to be the Solaris Studio cc.
28551     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28552     if test $? -ne 0; then
28553       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28554       { $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
28555 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28556       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28557 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28558       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28559 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28560       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28561     fi
28562     # Remove usage instructions (if present), and
28563     # collapse compiler output into a single line
28564     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28565         $SED -e 's/ *[Uu]sage:.*//'`
28566     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28567         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28568   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28569     # xlc -qversion output typically looks like
28570     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28571     #     Version: 11.01.0000.0015
28572     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28573     # Check that this is likely to be the IBM XL C compiler.
28574     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28575     if test $? -ne 0; then
28576       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28577       { $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
28578 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28579       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28580 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28581       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28582 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28583       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28584     fi
28585     # Collapse compiler output into a single line
28586     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28587     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28588         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28589   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28590     # There is no specific version flag, but all output starts with a version string.
28591     # First line typically looks something like:
28592     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28593     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28594     # Check that this is likely to be Microsoft CL.EXE.
28595     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28596     if test $? -ne 0; then
28597       { $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
28598 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28599       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28600 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28601       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28602     fi
28603     # Collapse compiler output into a single line
28604     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28605     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28606         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28607   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28608     # gcc --version output typically looks like
28609     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28610     #     Copyright (C) 2013 Free Software Foundation, Inc.
28611     #     This is free software; see the source for copying conditions.  There is NO
28612     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28613     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28614     # Check that this is likely to be GCC.
28615     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28616     if test $? -ne 0; then
28617       { $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
28618 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28619       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28620 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28621       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28622     fi
28623     # Remove Copyright and legalese from version string, and
28624     # collapse into a single line
28625     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28626         $SED -e 's/ *Copyright .*//'`
28627     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28628         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28629   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28630     # clang --version output typically looks like
28631     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28632     #    clang version 3.3 (tags/RELEASE_33/final)
28633     # or
28634     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28635     #    Target: x86_64-pc-linux-gnu
28636     #    Thread model: posix
28637     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28638     # Check that this is likely to be clang
28639     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28640     if test $? -ne 0; then
28641       { $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
28642 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28643       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28644 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28645       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28646     fi
28647     # Collapse compiler output into a single line
28648     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28649     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28650         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28651   else
28652       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28653   fi
28654   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28655   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28656   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28657   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28658 
28659   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28660 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28661 
28662 
28663   # Now that we have resolved CC ourself, let autoconf have its go at it
28664   ac_ext=c
28665 ac_cpp='$CPP $CPPFLAGS'
28666 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28667 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28668 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28669 if test -n "$ac_tool_prefix"; then
28670   for ac_prog in $CC
28671   do
28672     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28673 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28675 $as_echo_n "checking for $ac_word... " >&6; }
28676 if ${ac_cv_prog_CC+:} false; then :
28677   $as_echo_n "(cached) " >&6
28678 else
28679   if test -n "$CC"; then
28680   ac_cv_prog_CC="$CC" # Let the user override the test.
28681 else
28682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28683 for as_dir in $PATH
28684 do
28685   IFS=$as_save_IFS
28686   test -z "$as_dir" && as_dir=.
28687     for ac_exec_ext in '' $ac_executable_extensions; do
28688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28689     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28691     break 2
28692   fi
28693 done
28694   done
28695 IFS=$as_save_IFS
28696 
28697 fi
28698 fi
28699 CC=$ac_cv_prog_CC
28700 if test -n "$CC"; then
28701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28702 $as_echo "$CC" >&6; }
28703 else
28704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28705 $as_echo "no" >&6; }
28706 fi
28707 
28708 
28709     test -n "$CC" && break
28710   done
28711 fi
28712 if test -z "$CC"; then
28713   ac_ct_CC=$CC
28714   for ac_prog in $CC
28715 do
28716   # Extract the first word of "$ac_prog", so it can be a program name with args.
28717 set dummy $ac_prog; ac_word=$2
28718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28719 $as_echo_n "checking for $ac_word... " >&6; }
28720 if ${ac_cv_prog_ac_ct_CC+:} false; then :
28721   $as_echo_n "(cached) " >&6
28722 else
28723   if test -n "$ac_ct_CC"; then
28724   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28725 else
28726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28727 for as_dir in $PATH
28728 do
28729   IFS=$as_save_IFS
28730   test -z "$as_dir" && as_dir=.
28731     for ac_exec_ext in '' $ac_executable_extensions; do
28732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28733     ac_cv_prog_ac_ct_CC="$ac_prog"
28734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28735     break 2
28736   fi
28737 done
28738   done
28739 IFS=$as_save_IFS
28740 
28741 fi
28742 fi
28743 ac_ct_CC=$ac_cv_prog_ac_ct_CC
28744 if test -n "$ac_ct_CC"; then
28745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28746 $as_echo "$ac_ct_CC" >&6; }
28747 else
28748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28749 $as_echo "no" >&6; }
28750 fi
28751 
28752 
28753   test -n "$ac_ct_CC" && break
28754 done
28755 
28756   if test "x$ac_ct_CC" = x; then
28757     CC=""
28758   else
28759     case $cross_compiling:$ac_tool_warned in
28760 yes:)
28761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28762 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28763 ac_tool_warned=yes ;;
28764 esac
28765     CC=$ac_ct_CC
28766   fi
28767 fi
28768 
28769 
28770 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28771 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28772 as_fn_error $? "no acceptable C compiler found in \$PATH
28773 See \`config.log' for more details" "$LINENO" 5; }
28774 
28775 # Provide some information about the compiler.
28776 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28777 set X $ac_compile
28778 ac_compiler=$2
28779 for ac_option in --version -v -V -qversion; do
28780   { { ac_try="$ac_compiler $ac_option >&5"
28781 case "(($ac_try" in
28782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28783   *) ac_try_echo=$ac_try;;
28784 esac
28785 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28786 $as_echo "$ac_try_echo"; } >&5
28787   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28788   ac_status=$?
28789   if test -s conftest.err; then
28790     sed '10a\
28791 ... rest of stderr output deleted ...
28792          10q' conftest.err >conftest.er1
28793     cat conftest.er1 >&5
28794   fi
28795   rm -f conftest.er1 conftest.err
28796   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28797   test $ac_status = 0; }
28798 done
28799 
28800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28801 /* end confdefs.h.  */
28802 
28803 int
28804 main ()
28805 {
28806 
28807   ;
28808   return 0;
28809 }
28810 _ACEOF
28811 ac_clean_files_save=$ac_clean_files
28812 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28813 # Try to create an executable without -o first, disregard a.out.
28814 # It will help us diagnose broken compilers, and finding out an intuition
28815 # of exeext.
28816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28817 $as_echo_n "checking whether the C compiler works... " >&6; }
28818 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28819 
28820 # The possible output files:
28821 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28822 
28823 ac_rmfiles=
28824 for ac_file in $ac_files
28825 do
28826   case $ac_file in
28827     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28828     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28829   esac
28830 done
28831 rm -f $ac_rmfiles
28832 
28833 if { { ac_try="$ac_link_default"
28834 case "(($ac_try" in
28835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28836   *) ac_try_echo=$ac_try;;
28837 esac
28838 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28839 $as_echo "$ac_try_echo"; } >&5
28840   (eval "$ac_link_default") 2>&5
28841   ac_status=$?
28842   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28843   test $ac_status = 0; }; then :
28844   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28845 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28846 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
28847 # so that the user can short-circuit this test for compilers unknown to
28848 # Autoconf.
28849 for ac_file in $ac_files ''
28850 do
28851   test -f "$ac_file" || continue
28852   case $ac_file in
28853     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28854         ;;
28855     [ab].out )
28856         # We found the default executable, but exeext='' is most
28857         # certainly right.
28858         break;;
28859     *.* )
28860         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28861         then :; else
28862            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28863         fi
28864         # We set ac_cv_exeext here because the later test for it is not
28865         # safe: cross compilers may not add the suffix if given an `-o'
28866         # argument, so we may need to know it at that point already.
28867         # Even if this section looks crufty: it has the advantage of
28868         # actually working.
28869         break;;
28870     * )
28871         break;;
28872   esac
28873 done
28874 test "$ac_cv_exeext" = no && ac_cv_exeext=
28875 
28876 else
28877   ac_file=''
28878 fi
28879 if test -z "$ac_file"; then :
28880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28881 $as_echo "no" >&6; }
28882 $as_echo "$as_me: failed program was:" >&5
28883 sed 's/^/| /' conftest.$ac_ext >&5
28884 
28885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28886 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28887 as_fn_error 77 "C compiler cannot create executables
28888 See \`config.log' for more details" "$LINENO" 5; }
28889 else
28890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28891 $as_echo "yes" >&6; }
28892 fi
28893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28894 $as_echo_n "checking for C compiler default output file name... " >&6; }
28895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28896 $as_echo "$ac_file" >&6; }
28897 ac_exeext=$ac_cv_exeext
28898 
28899 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28900 ac_clean_files=$ac_clean_files_save
28901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28902 $as_echo_n "checking for suffix of executables... " >&6; }
28903 if { { ac_try="$ac_link"
28904 case "(($ac_try" in
28905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28906   *) ac_try_echo=$ac_try;;
28907 esac
28908 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28909 $as_echo "$ac_try_echo"; } >&5
28910   (eval "$ac_link") 2>&5
28911   ac_status=$?
28912   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28913   test $ac_status = 0; }; then :
28914   # If both `conftest.exe' and `conftest' are `present' (well, observable)
28915 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28916 # work properly (i.e., refer to `conftest.exe'), while it won't with
28917 # `rm'.
28918 for ac_file in conftest.exe conftest conftest.*; do
28919   test -f "$ac_file" || continue
28920   case $ac_file in
28921     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28922     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28923           break;;
28924     * ) break;;
28925   esac
28926 done
28927 else
28928   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28930 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28931 See \`config.log' for more details" "$LINENO" 5; }
28932 fi
28933 rm -f conftest conftest$ac_cv_exeext
28934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28935 $as_echo "$ac_cv_exeext" >&6; }
28936 
28937 rm -f conftest.$ac_ext
28938 EXEEXT=$ac_cv_exeext
28939 ac_exeext=$EXEEXT
28940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28941 /* end confdefs.h.  */
28942 #include <stdio.h>
28943 int
28944 main ()
28945 {
28946 FILE *f = fopen ("conftest.out", "w");
28947  return ferror (f) || fclose (f) != 0;
28948 
28949   ;
28950   return 0;
28951 }
28952 _ACEOF
28953 ac_clean_files="$ac_clean_files conftest.out"
28954 # Check that the compiler produces executables we can run.  If not, either
28955 # the compiler is broken, or we cross compile.
28956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28957 $as_echo_n "checking whether we are cross compiling... " >&6; }
28958 if test "$cross_compiling" != yes; then
28959   { { ac_try="$ac_link"
28960 case "(($ac_try" in
28961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28962   *) ac_try_echo=$ac_try;;
28963 esac
28964 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28965 $as_echo "$ac_try_echo"; } >&5
28966   (eval "$ac_link") 2>&5
28967   ac_status=$?
28968   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28969   test $ac_status = 0; }
28970   if { ac_try='./conftest$ac_cv_exeext'
28971   { { case "(($ac_try" in
28972   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28973   *) ac_try_echo=$ac_try;;
28974 esac
28975 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28976 $as_echo "$ac_try_echo"; } >&5
28977   (eval "$ac_try") 2>&5
28978   ac_status=$?
28979   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28980   test $ac_status = 0; }; }; then
28981     cross_compiling=no
28982   else
28983     if test "$cross_compiling" = maybe; then
28984         cross_compiling=yes
28985     else
28986         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28987 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28988 as_fn_error $? "cannot run C compiled programs.
28989 If you meant to cross compile, use \`--host'.
28990 See \`config.log' for more details" "$LINENO" 5; }
28991     fi
28992   fi
28993 fi
28994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28995 $as_echo "$cross_compiling" >&6; }
28996 
28997 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28998 ac_clean_files=$ac_clean_files_save
28999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29000 $as_echo_n "checking for suffix of object files... " >&6; }
29001 if ${ac_cv_objext+:} false; then :
29002   $as_echo_n "(cached) " >&6
29003 else
29004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29005 /* end confdefs.h.  */
29006 
29007 int
29008 main ()
29009 {
29010 
29011   ;
29012   return 0;
29013 }
29014 _ACEOF
29015 rm -f conftest.o conftest.obj
29016 if { { ac_try="$ac_compile"
29017 case "(($ac_try" in
29018   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29019   *) ac_try_echo=$ac_try;;
29020 esac
29021 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29022 $as_echo "$ac_try_echo"; } >&5
29023   (eval "$ac_compile") 2>&5
29024   ac_status=$?
29025   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29026   test $ac_status = 0; }; then :
29027   for ac_file in conftest.o conftest.obj conftest.*; do
29028   test -f "$ac_file" || continue;
29029   case $ac_file in
29030     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29031     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29032        break;;
29033   esac
29034 done
29035 else
29036   $as_echo "$as_me: failed program was:" >&5
29037 sed 's/^/| /' conftest.$ac_ext >&5
29038 
29039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29040 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29041 as_fn_error $? "cannot compute suffix of object files: cannot compile
29042 See \`config.log' for more details" "$LINENO" 5; }
29043 fi
29044 rm -f conftest.$ac_cv_objext conftest.$ac_ext
29045 fi
29046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29047 $as_echo "$ac_cv_objext" >&6; }
29048 OBJEXT=$ac_cv_objext
29049 ac_objext=$OBJEXT
29050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29051 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29052 if ${ac_cv_c_compiler_gnu+:} false; then :
29053   $as_echo_n "(cached) " >&6
29054 else
29055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29056 /* end confdefs.h.  */
29057 
29058 int
29059 main ()
29060 {
29061 #ifndef __GNUC__
29062        choke me
29063 #endif
29064 
29065   ;
29066   return 0;
29067 }
29068 _ACEOF
29069 if ac_fn_c_try_compile "$LINENO"; then :
29070   ac_compiler_gnu=yes
29071 else
29072   ac_compiler_gnu=no
29073 fi
29074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29075 ac_cv_c_compiler_gnu=$ac_compiler_gnu
29076 
29077 fi
29078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29079 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
29080 if test $ac_compiler_gnu = yes; then
29081   GCC=yes
29082 else
29083   GCC=
29084 fi
29085 ac_test_CFLAGS=${CFLAGS+set}
29086 ac_save_CFLAGS=$CFLAGS
29087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29088 $as_echo_n "checking whether $CC accepts -g... " >&6; }
29089 if ${ac_cv_prog_cc_g+:} false; then :
29090   $as_echo_n "(cached) " >&6
29091 else
29092   ac_save_c_werror_flag=$ac_c_werror_flag
29093    ac_c_werror_flag=yes
29094    ac_cv_prog_cc_g=no
29095    CFLAGS="-g"
29096    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29097 /* end confdefs.h.  */
29098 
29099 int
29100 main ()
29101 {
29102 
29103   ;
29104   return 0;
29105 }
29106 _ACEOF
29107 if ac_fn_c_try_compile "$LINENO"; then :
29108   ac_cv_prog_cc_g=yes
29109 else
29110   CFLAGS=""
29111       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29112 /* end confdefs.h.  */
29113 
29114 int
29115 main ()
29116 {
29117 
29118   ;
29119   return 0;
29120 }
29121 _ACEOF
29122 if ac_fn_c_try_compile "$LINENO"; then :
29123 
29124 else
29125   ac_c_werror_flag=$ac_save_c_werror_flag
29126          CFLAGS="-g"
29127          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29128 /* end confdefs.h.  */
29129 
29130 int
29131 main ()
29132 {
29133 
29134   ;
29135   return 0;
29136 }
29137 _ACEOF
29138 if ac_fn_c_try_compile "$LINENO"; then :
29139   ac_cv_prog_cc_g=yes
29140 fi
29141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29142 fi
29143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29144 fi
29145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29146    ac_c_werror_flag=$ac_save_c_werror_flag
29147 fi
29148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29149 $as_echo "$ac_cv_prog_cc_g" >&6; }
29150 if test "$ac_test_CFLAGS" = set; then
29151   CFLAGS=$ac_save_CFLAGS
29152 elif test $ac_cv_prog_cc_g = yes; then
29153   if test "$GCC" = yes; then
29154     CFLAGS="-g -O2"
29155   else
29156     CFLAGS="-g"
29157   fi
29158 else
29159   if test "$GCC" = yes; then
29160     CFLAGS="-O2"
29161   else
29162     CFLAGS=
29163   fi
29164 fi
29165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29166 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29167 if ${ac_cv_prog_cc_c89+:} false; then :
29168   $as_echo_n "(cached) " >&6
29169 else
29170   ac_cv_prog_cc_c89=no
29171 ac_save_CC=$CC
29172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29173 /* end confdefs.h.  */
29174 #include <stdarg.h>
29175 #include <stdio.h>
29176 struct stat;
29177 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29178 struct buf { int x; };
29179 FILE * (*rcsopen) (struct buf *, struct stat *, int);
29180 static char *e (p, i)
29181      char **p;
29182      int i;
29183 {
29184   return p[i];
29185 }
29186 static char *f (char * (*g) (char **, int), char **p, ...)
29187 {
29188   char *s;
29189   va_list v;
29190   va_start (v,p);
29191   s = g (p, va_arg (v,int));
29192   va_end (v);
29193   return s;
29194 }
29195 
29196 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29197    function prototypes and stuff, but not '\xHH' hex character constants.
29198    These don't provoke an error unfortunately, instead are silently treated
29199    as 'x'.  The following induces an error, until -std is added to get
29200    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29201    array size at least.  It's necessary to write '\x00'==0 to get something
29202    that's true only with -std.  */
29203 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29204 
29205 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29206    inside strings and character constants.  */
29207 #define FOO(x) 'x'
29208 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29209 
29210 int test (int i, double x);
29211 struct s1 {int (*f) (int a);};
29212 struct s2 {int (*f) (double a);};
29213 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29214 int argc;
29215 char **argv;
29216 int
29217 main ()
29218 {
29219 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29220   ;
29221   return 0;
29222 }
29223 _ACEOF
29224 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29225         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29226 do
29227   CC="$ac_save_CC $ac_arg"
29228   if ac_fn_c_try_compile "$LINENO"; then :
29229   ac_cv_prog_cc_c89=$ac_arg
29230 fi
29231 rm -f core conftest.err conftest.$ac_objext
29232   test "x$ac_cv_prog_cc_c89" != "xno" && break
29233 done
29234 rm -f conftest.$ac_ext
29235 CC=$ac_save_CC
29236 
29237 fi
29238 # AC_CACHE_VAL
29239 case "x$ac_cv_prog_cc_c89" in
29240   x)
29241     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29242 $as_echo "none needed" >&6; } ;;
29243   xno)
29244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29245 $as_echo "unsupported" >&6; } ;;
29246   *)
29247     CC="$CC $ac_cv_prog_cc_c89"
29248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29249 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29250 esac
29251 if test "x$ac_cv_prog_cc_c89" != xno; then :
29252 
29253 fi
29254 
29255 ac_ext=cpp
29256 ac_cpp='$CXXCPP $CPPFLAGS'
29257 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29258 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29259 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29260 
29261 
29262 
29263   COMPILER_NAME=C++
29264   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29265 
29266   if test "x$CXX" != x; then
29267     # User has supplied compiler name already, always let that override.
29268     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29269 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29270     if test "x`basename $CXX`" = "x$CXX"; then
29271       # A command without a complete path is provided, search $PATH.
29272 
29273       for ac_prog in $CXX
29274 do
29275   # Extract the first word of "$ac_prog", so it can be a program name with args.
29276 set dummy $ac_prog; ac_word=$2
29277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29278 $as_echo_n "checking for $ac_word... " >&6; }
29279 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29280   $as_echo_n "(cached) " >&6
29281 else
29282   case $POTENTIAL_CXX in
29283   [\\/]* | ?:[\\/]*)
29284   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29285   ;;
29286   *)
29287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29288 for as_dir in $PATH
29289 do
29290   IFS=$as_save_IFS
29291   test -z "$as_dir" && as_dir=.
29292     for ac_exec_ext in '' $ac_executable_extensions; do
29293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29294     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29296     break 2
29297   fi
29298 done
29299   done
29300 IFS=$as_save_IFS
29301 
29302   ;;
29303 esac
29304 fi
29305 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29306 if test -n "$POTENTIAL_CXX"; then
29307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29308 $as_echo "$POTENTIAL_CXX" >&6; }
29309 else
29310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29311 $as_echo "no" >&6; }
29312 fi
29313 
29314 
29315   test -n "$POTENTIAL_CXX" && break
29316 done
29317 
29318       if test "x$POTENTIAL_CXX" != x; then
29319         CXX=$POTENTIAL_CXX
29320       else
29321         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29322       fi
29323     else
29324       # Otherwise it might already be a complete path
29325       if test ! -x "$CXX"; then
29326         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29327       fi
29328     fi
29329   else
29330     # No user supplied value. Locate compiler ourselves.
29331 
29332     # If we are cross compiling, assume cross compilation tools follows the
29333     # cross compilation standard where they are prefixed with the autoconf
29334     # standard name for the target. For example the binary
29335     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29336     # If we are not cross compiling, then the default compiler name will be
29337     # used.
29338 
29339     CXX=
29340     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29341     # before checking the rest of the PATH.
29342     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29343     # step, this should not be necessary.
29344     if test -n "$TOOLCHAIN_PATH"; then
29345       PATH_save="$PATH"
29346       PATH="$TOOLCHAIN_PATH"
29347       for ac_prog in $SEARCH_LIST
29348 do
29349   # Extract the first word of "$ac_prog", so it can be a program name with args.
29350 set dummy $ac_prog; ac_word=$2
29351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29352 $as_echo_n "checking for $ac_word... " >&6; }
29353 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29354   $as_echo_n "(cached) " >&6
29355 else
29356   case $TOOLCHAIN_PATH_CXX in
29357   [\\/]* | ?:[\\/]*)
29358   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29359   ;;
29360   *)
29361   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29362 for as_dir in $PATH
29363 do
29364   IFS=$as_save_IFS
29365   test -z "$as_dir" && as_dir=.
29366     for ac_exec_ext in '' $ac_executable_extensions; do
29367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29368     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29370     break 2
29371   fi
29372 done
29373   done
29374 IFS=$as_save_IFS
29375 
29376   ;;
29377 esac
29378 fi
29379 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29380 if test -n "$TOOLCHAIN_PATH_CXX"; then
29381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29382 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29383 else
29384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29385 $as_echo "no" >&6; }
29386 fi
29387 
29388 
29389   test -n "$TOOLCHAIN_PATH_CXX" && break
29390 done
29391 
29392       CXX=$TOOLCHAIN_PATH_CXX
29393       PATH="$PATH_save"
29394     fi
29395 
29396     # AC_PATH_PROGS can't be run multiple times with the same variable,
29397     # so create a new name for this run.
29398     if test "x$CXX" = x; then
29399       for ac_prog in $SEARCH_LIST
29400 do
29401   # Extract the first word of "$ac_prog", so it can be a program name with args.
29402 set dummy $ac_prog; ac_word=$2
29403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29404 $as_echo_n "checking for $ac_word... " >&6; }
29405 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29406   $as_echo_n "(cached) " >&6
29407 else
29408   case $POTENTIAL_CXX in
29409   [\\/]* | ?:[\\/]*)
29410   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29411   ;;
29412   *)
29413   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29414 for as_dir in $PATH
29415 do
29416   IFS=$as_save_IFS
29417   test -z "$as_dir" && as_dir=.
29418     for ac_exec_ext in '' $ac_executable_extensions; do
29419   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29420     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29422     break 2
29423   fi
29424 done
29425   done
29426 IFS=$as_save_IFS
29427 
29428   ;;
29429 esac
29430 fi
29431 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29432 if test -n "$POTENTIAL_CXX"; then
29433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29434 $as_echo "$POTENTIAL_CXX" >&6; }
29435 else
29436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29437 $as_echo "no" >&6; }
29438 fi
29439 
29440 
29441   test -n "$POTENTIAL_CXX" && break
29442 done
29443 
29444       CXX=$POTENTIAL_CXX
29445     fi
29446 
29447     if test "x$CXX" = x; then
29448 
29449   # Print a helpful message on how to acquire the necessary build dependency.
29450   # devkit is the help tag: freetype, cups, pulse, alsa etc
29451   MISSING_DEPENDENCY=devkit
29452 
29453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29454     cygwin_help $MISSING_DEPENDENCY
29455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29456     msys_help $MISSING_DEPENDENCY
29457   else
29458     PKGHANDLER_COMMAND=
29459 
29460     case $PKGHANDLER in
29461       apt-get)
29462         apt_help     $MISSING_DEPENDENCY ;;
29463       yum)
29464         yum_help     $MISSING_DEPENDENCY ;;
29465       port)
29466         port_help    $MISSING_DEPENDENCY ;;
29467       pkgutil)
29468         pkgutil_help $MISSING_DEPENDENCY ;;
29469       pkgadd)
29470         pkgadd_help  $MISSING_DEPENDENCY ;;
29471     esac
29472 
29473     if test "x$PKGHANDLER_COMMAND" != x; then
29474       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29475     fi
29476   fi
29477 
29478       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29479     fi
29480   fi
29481 
29482   # Now we have a compiler binary in CXX. Make sure it's okay.
29483 
29484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29485 
29486   # First separate the path from the arguments. This will split at the first
29487   # space.
29488   complete="$CXX"
29489   path="${complete%% *}"
29490   tmp="$complete EOL"
29491   arguments="${tmp#* }"
29492 
29493   # Input might be given as Windows format, start by converting to
29494   # unix format.
29495   new_path=`$CYGPATH -u "$path"`
29496 
29497   # Now try to locate executable using which
29498   new_path=`$WHICH "$new_path" 2> /dev/null`
29499   # bat and cmd files are not always considered executable in cygwin causing which
29500   # to not find them
29501   if test "x$new_path" = x \
29502       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29503       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29504     new_path=`$CYGPATH -u "$path"`
29505   fi
29506   if test "x$new_path" = x; then
29507     # Oops. Which didn't find the executable.
29508     # The splitting of arguments from the executable at a space might have been incorrect,
29509     # since paths with space are more likely in Windows. Give it another try with the whole
29510     # argument.
29511     path="$complete"
29512     arguments="EOL"
29513     new_path=`$CYGPATH -u "$path"`
29514     new_path=`$WHICH "$new_path" 2> /dev/null`
29515     # bat and cmd files are not always considered executable in cygwin causing which
29516     # to not find them
29517     if test "x$new_path" = x \
29518         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29519         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29520       new_path=`$CYGPATH -u "$path"`
29521     fi
29522     if test "x$new_path" = x; then
29523       # It's still not found. Now this is an unrecoverable error.
29524       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29525 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29526       has_space=`$ECHO "$complete" | $GREP " "`
29527       if test "x$has_space" != x; then
29528         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29529 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29530       fi
29531       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29532     fi
29533   fi
29534 
29535   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29536   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29537   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29538   # "foo.exe" is OK but "foo" is an error.
29539   #
29540   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29541   # It is also a way to make sure we got the proper file name for the real test later on.
29542   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29543   if test "x$test_shortpath" = x; then
29544     # Short path failed, file does not exist as specified.
29545     # Try adding .exe or .cmd
29546     if test -f "${new_path}.exe"; then
29547       input_to_shortpath="${new_path}.exe"
29548     elif test -f "${new_path}.cmd"; then
29549       input_to_shortpath="${new_path}.cmd"
29550     else
29551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29552 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29553       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29554 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29555       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29556     fi
29557   else
29558     input_to_shortpath="$new_path"
29559   fi
29560 
29561   # Call helper function which possibly converts this using DOS-style short mode.
29562   # If so, the updated path is stored in $new_path.
29563   new_path="$input_to_shortpath"
29564 
29565   input_path="$input_to_shortpath"
29566   # Check if we need to convert this using DOS-style short mode. If the path
29567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29568   # take no chances and rewrite it.
29569   # Note: m4 eats our [], so we need to use [ and ] instead.
29570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29571   if test "x$has_forbidden_chars" != x; then
29572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29573     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29574     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29575     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29576       # Going to short mode and back again did indeed matter. Since short mode is
29577       # case insensitive, let's make it lowercase to improve readability.
29578       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29579       # Now convert it back to Unix-stile (cygpath)
29580       input_path=`$CYGPATH -u "$shortmode_path"`
29581       new_path="$input_path"
29582     fi
29583   fi
29584 
29585   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29586   if test "x$test_cygdrive_prefix" = x; then
29587     # As a simple fix, exclude /usr/bin since it's not a real path.
29588     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29589       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29590       # a path prefixed by /cygdrive for fixpath to work.
29591       new_path="$CYGWIN_ROOT_PATH$input_path"
29592     fi
29593   fi
29594 
29595   # remove trailing .exe if any
29596   new_path="${new_path/%.exe/}"
29597 
29598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29599 
29600   # First separate the path from the arguments. This will split at the first
29601   # space.
29602   complete="$CXX"
29603   path="${complete%% *}"
29604   tmp="$complete EOL"
29605   arguments="${tmp#* }"
29606 
29607   # Input might be given as Windows format, start by converting to
29608   # unix format.
29609   new_path="$path"
29610 
29611   windows_path="$new_path"
29612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29613     unix_path=`$CYGPATH -u "$windows_path"`
29614     new_path="$unix_path"
29615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29617     new_path="$unix_path"
29618   fi
29619 
29620 
29621   # Now try to locate executable using which
29622   new_path=`$WHICH "$new_path" 2> /dev/null`
29623 
29624   if test "x$new_path" = x; then
29625     # Oops. Which didn't find the executable.
29626     # The splitting of arguments from the executable at a space might have been incorrect,
29627     # since paths with space are more likely in Windows. Give it another try with the whole
29628     # argument.
29629     path="$complete"
29630     arguments="EOL"
29631     new_path="$path"
29632 
29633   windows_path="$new_path"
29634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29635     unix_path=`$CYGPATH -u "$windows_path"`
29636     new_path="$unix_path"
29637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29639     new_path="$unix_path"
29640   fi
29641 
29642 
29643     new_path=`$WHICH "$new_path" 2> /dev/null`
29644     # bat and cmd files are not always considered executable in MSYS causing which
29645     # to not find them
29646     if test "x$new_path" = x \
29647         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29648         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29649       new_path="$path"
29650 
29651   windows_path="$new_path"
29652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29653     unix_path=`$CYGPATH -u "$windows_path"`
29654     new_path="$unix_path"
29655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29657     new_path="$unix_path"
29658   fi
29659 
29660     fi
29661 
29662     if test "x$new_path" = x; then
29663       # It's still not found. Now this is an unrecoverable error.
29664       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29665 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29666       has_space=`$ECHO "$complete" | $GREP " "`
29667       if test "x$has_space" != x; then
29668         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29669 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29670       fi
29671       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29672     fi
29673   fi
29674 
29675   # Now new_path has a complete unix path to the binary
29676   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29677     # Keep paths in /bin as-is, but remove trailing .exe if any
29678     new_path="${new_path/%.exe/}"
29679     # Do not save /bin paths to all_fixpath_prefixes!
29680   else
29681     # Not in mixed or Windows style, start by that.
29682     new_path=`cmd //c echo $new_path`
29683 
29684   input_path="$new_path"
29685   # Check if we need to convert this using DOS-style short mode. If the path
29686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29687   # take no chances and rewrite it.
29688   # Note: m4 eats our [], so we need to use [ and ] instead.
29689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29690   if test "x$has_forbidden_chars" != x; then
29691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29692     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29693   fi
29694 
29695     # Output is in $new_path
29696 
29697   windows_path="$new_path"
29698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29699     unix_path=`$CYGPATH -u "$windows_path"`
29700     new_path="$unix_path"
29701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29703     new_path="$unix_path"
29704   fi
29705 
29706     # remove trailing .exe if any
29707     new_path="${new_path/%.exe/}"
29708 
29709     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29710     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29711   fi
29712 
29713   else
29714     # We're on a unix platform. Hooray! :)
29715     # First separate the path from the arguments. This will split at the first
29716     # space.
29717     complete="$CXX"
29718     path="${complete%% *}"
29719     tmp="$complete EOL"
29720     arguments="${tmp#* }"
29721 
29722     # Cannot rely on the command "which" here since it doesn't always work.
29723     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29724     if test -z "$is_absolute_path"; then
29725       # Path to executable is not absolute. Find it.
29726       IFS_save="$IFS"
29727       IFS=:
29728       for p in $PATH; do
29729         if test -f "$p/$path" && test -x "$p/$path"; then
29730           new_path="$p/$path"
29731           break
29732         fi
29733       done
29734       IFS="$IFS_save"
29735     else
29736       # This is an absolute path, we can use it without further modifications.
29737       new_path="$path"
29738     fi
29739 
29740     if test "x$new_path" = x; then
29741       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29742 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29743       has_space=`$ECHO "$complete" | $GREP " "`
29744       if test "x$has_space" != x; then
29745         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29746 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29747       fi
29748       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29749     fi
29750   fi
29751 
29752   # Now join together the path and the arguments once again
29753   if test "x$arguments" != xEOL; then
29754     new_complete="$new_path ${arguments% *}"
29755   else
29756     new_complete="$new_path"
29757   fi
29758 
29759   if test "x$complete" != "x$new_complete"; then
29760     CXX="$new_complete"
29761     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29762 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29763   fi
29764 
29765   TEST_COMPILER="$CXX"
29766   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29767   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29768   if test "x$OPENJDK_BUILD_OS" != xaix; then
29769     # FIXME: This test should not be needed anymore; we don't do that for any platform.
29770     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29771 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29772 
29773   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29774     # Follow a chain of symbolic links. Use readlink
29775     # where it exists, else fall back to horribly
29776     # complicated shell code.
29777     if test "x$READLINK_TESTED" != yes; then
29778       # On MacOSX there is a readlink tool with a different
29779       # purpose than the GNU readlink tool. Check the found readlink.
29780       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29781       if test "x$ISGNU" = x; then
29782         # A readlink that we do not know how to use.
29783         # Are there other non-GNU readlinks out there?
29784         READLINK_TESTED=yes
29785         READLINK=
29786       fi
29787     fi
29788 
29789     if test "x$READLINK" != x; then
29790       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29791     else
29792       # Save the current directory for restoring afterwards
29793       STARTDIR=$PWD
29794       COUNTER=0
29795       sym_link_dir=`$DIRNAME $TEST_COMPILER`
29796       sym_link_file=`$BASENAME $TEST_COMPILER`
29797       cd $sym_link_dir
29798       # Use -P flag to resolve symlinks in directories.
29799       cd `$THEPWDCMD -P`
29800       sym_link_dir=`$THEPWDCMD -P`
29801       # Resolve file symlinks
29802       while test $COUNTER -lt 20; do
29803         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29804         if test "x$ISLINK" == x; then
29805           # This is not a symbolic link! We are done!
29806           break
29807         fi
29808         # Again resolve directory symlinks since the target of the just found
29809         # link could be in a different directory
29810         cd `$DIRNAME $ISLINK`
29811         sym_link_dir=`$THEPWDCMD -P`
29812         sym_link_file=`$BASENAME $ISLINK`
29813         let COUNTER=COUNTER+1
29814       done
29815       cd $STARTDIR
29816       TEST_COMPILER=$sym_link_dir/$sym_link_file
29817     fi
29818   fi
29819 
29820     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29821 $as_echo "$TEST_COMPILER" >&6; }
29822   fi
29823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29824 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
29825 
29826   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29827   if test "x$COMPILER_BASENAME" = "xccache"; then
29828     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29829 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29830     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29831     # We want to control ccache invocation ourselves, so ignore this cc and try
29832     # searching again.
29833 
29834     # Remove the path to the fake ccache cc from the PATH
29835     RETRY_COMPILER_SAVED_PATH="$PATH"
29836     COMPILER_DIRNAME=`$DIRNAME $CXX`
29837     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29838 
29839     # Try again looking for our compiler
29840     if test -n "$ac_tool_prefix"; then
29841   for ac_prog in $TOOLCHAIN_CXX_BINARY
29842   do
29843     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29844 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29846 $as_echo_n "checking for $ac_word... " >&6; }
29847 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29848   $as_echo_n "(cached) " >&6
29849 else
29850   if test -n "$PROPER_COMPILER_CXX"; then
29851   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29852 else
29853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29854 for as_dir in $PATH
29855 do
29856   IFS=$as_save_IFS
29857   test -z "$as_dir" && as_dir=.
29858     for ac_exec_ext in '' $ac_executable_extensions; do
29859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29860     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29862     break 2
29863   fi
29864 done
29865   done
29866 IFS=$as_save_IFS
29867 
29868 fi
29869 fi
29870 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29871 if test -n "$PROPER_COMPILER_CXX"; then
29872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29873 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29874 else
29875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29876 $as_echo "no" >&6; }
29877 fi
29878 
29879 
29880     test -n "$PROPER_COMPILER_CXX" && break
29881   done
29882 fi
29883 if test -z "$PROPER_COMPILER_CXX"; then
29884   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29885   for ac_prog in $TOOLCHAIN_CXX_BINARY
29886 do
29887   # Extract the first word of "$ac_prog", so it can be a program name with args.
29888 set dummy $ac_prog; ac_word=$2
29889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29890 $as_echo_n "checking for $ac_word... " >&6; }
29891 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29892   $as_echo_n "(cached) " >&6
29893 else
29894   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29895   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29896 else
29897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29898 for as_dir in $PATH
29899 do
29900   IFS=$as_save_IFS
29901   test -z "$as_dir" && as_dir=.
29902     for ac_exec_ext in '' $ac_executable_extensions; do
29903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29904     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29906     break 2
29907   fi
29908 done
29909   done
29910 IFS=$as_save_IFS
29911 
29912 fi
29913 fi
29914 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29915 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29917 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29918 else
29919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29920 $as_echo "no" >&6; }
29921 fi
29922 
29923 
29924   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29925 done
29926 
29927   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29928     PROPER_COMPILER_CXX=""
29929   else
29930     case $cross_compiling:$ac_tool_warned in
29931 yes:)
29932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29933 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29934 ac_tool_warned=yes ;;
29935 esac
29936     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29937   fi
29938 fi
29939 
29940 
29941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29942 
29943   # First separate the path from the arguments. This will split at the first
29944   # space.
29945   complete="$PROPER_COMPILER_CXX"
29946   path="${complete%% *}"
29947   tmp="$complete EOL"
29948   arguments="${tmp#* }"
29949 
29950   # Input might be given as Windows format, start by converting to
29951   # unix format.
29952   new_path=`$CYGPATH -u "$path"`
29953 
29954   # Now try to locate executable using which
29955   new_path=`$WHICH "$new_path" 2> /dev/null`
29956   # bat and cmd files are not always considered executable in cygwin causing which
29957   # to not find them
29958   if test "x$new_path" = x \
29959       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29960       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29961     new_path=`$CYGPATH -u "$path"`
29962   fi
29963   if test "x$new_path" = x; then
29964     # Oops. Which didn't find the executable.
29965     # The splitting of arguments from the executable at a space might have been incorrect,
29966     # since paths with space are more likely in Windows. Give it another try with the whole
29967     # argument.
29968     path="$complete"
29969     arguments="EOL"
29970     new_path=`$CYGPATH -u "$path"`
29971     new_path=`$WHICH "$new_path" 2> /dev/null`
29972     # bat and cmd files are not always considered executable in cygwin causing which
29973     # to not find them
29974     if test "x$new_path" = x \
29975         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29976         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29977       new_path=`$CYGPATH -u "$path"`
29978     fi
29979     if test "x$new_path" = x; then
29980       # It's still not found. Now this is an unrecoverable error.
29981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29982 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29983       has_space=`$ECHO "$complete" | $GREP " "`
29984       if test "x$has_space" != x; then
29985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29987       fi
29988       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29989     fi
29990   fi
29991 
29992   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29993   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29994   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29995   # "foo.exe" is OK but "foo" is an error.
29996   #
29997   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29998   # It is also a way to make sure we got the proper file name for the real test later on.
29999   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30000   if test "x$test_shortpath" = x; then
30001     # Short path failed, file does not exist as specified.
30002     # Try adding .exe or .cmd
30003     if test -f "${new_path}.exe"; then
30004       input_to_shortpath="${new_path}.exe"
30005     elif test -f "${new_path}.cmd"; then
30006       input_to_shortpath="${new_path}.cmd"
30007     else
30008       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30009 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30010       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30011 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30012       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30013     fi
30014   else
30015     input_to_shortpath="$new_path"
30016   fi
30017 
30018   # Call helper function which possibly converts this using DOS-style short mode.
30019   # If so, the updated path is stored in $new_path.
30020   new_path="$input_to_shortpath"
30021 
30022   input_path="$input_to_shortpath"
30023   # Check if we need to convert this using DOS-style short mode. If the path
30024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30025   # take no chances and rewrite it.
30026   # Note: m4 eats our [], so we need to use [ and ] instead.
30027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30028   if test "x$has_forbidden_chars" != x; then
30029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30030     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30031     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30032     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30033       # Going to short mode and back again did indeed matter. Since short mode is
30034       # case insensitive, let's make it lowercase to improve readability.
30035       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30036       # Now convert it back to Unix-stile (cygpath)
30037       input_path=`$CYGPATH -u "$shortmode_path"`
30038       new_path="$input_path"
30039     fi
30040   fi
30041 
30042   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30043   if test "x$test_cygdrive_prefix" = x; then
30044     # As a simple fix, exclude /usr/bin since it's not a real path.
30045     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30046       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30047       # a path prefixed by /cygdrive for fixpath to work.
30048       new_path="$CYGWIN_ROOT_PATH$input_path"
30049     fi
30050   fi
30051 
30052   # remove trailing .exe if any
30053   new_path="${new_path/%.exe/}"
30054 
30055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30056 
30057   # First separate the path from the arguments. This will split at the first
30058   # space.
30059   complete="$PROPER_COMPILER_CXX"
30060   path="${complete%% *}"
30061   tmp="$complete EOL"
30062   arguments="${tmp#* }"
30063 
30064   # Input might be given as Windows format, start by converting to
30065   # unix format.
30066   new_path="$path"
30067 
30068   windows_path="$new_path"
30069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30070     unix_path=`$CYGPATH -u "$windows_path"`
30071     new_path="$unix_path"
30072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30074     new_path="$unix_path"
30075   fi
30076 
30077 
30078   # Now try to locate executable using which
30079   new_path=`$WHICH "$new_path" 2> /dev/null`
30080 
30081   if test "x$new_path" = x; then
30082     # Oops. Which didn't find the executable.
30083     # The splitting of arguments from the executable at a space might have been incorrect,
30084     # since paths with space are more likely in Windows. Give it another try with the whole
30085     # argument.
30086     path="$complete"
30087     arguments="EOL"
30088     new_path="$path"
30089 
30090   windows_path="$new_path"
30091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30092     unix_path=`$CYGPATH -u "$windows_path"`
30093     new_path="$unix_path"
30094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30096     new_path="$unix_path"
30097   fi
30098 
30099 
30100     new_path=`$WHICH "$new_path" 2> /dev/null`
30101     # bat and cmd files are not always considered executable in MSYS causing which
30102     # to not find them
30103     if test "x$new_path" = x \
30104         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30105         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30106       new_path="$path"
30107 
30108   windows_path="$new_path"
30109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30110     unix_path=`$CYGPATH -u "$windows_path"`
30111     new_path="$unix_path"
30112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30114     new_path="$unix_path"
30115   fi
30116 
30117     fi
30118 
30119     if test "x$new_path" = x; then
30120       # It's still not found. Now this is an unrecoverable error.
30121       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30122 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30123       has_space=`$ECHO "$complete" | $GREP " "`
30124       if test "x$has_space" != x; then
30125         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30126 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30127       fi
30128       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30129     fi
30130   fi
30131 
30132   # Now new_path has a complete unix path to the binary
30133   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30134     # Keep paths in /bin as-is, but remove trailing .exe if any
30135     new_path="${new_path/%.exe/}"
30136     # Do not save /bin paths to all_fixpath_prefixes!
30137   else
30138     # Not in mixed or Windows style, start by that.
30139     new_path=`cmd //c echo $new_path`
30140 
30141   input_path="$new_path"
30142   # Check if we need to convert this using DOS-style short mode. If the path
30143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30144   # take no chances and rewrite it.
30145   # Note: m4 eats our [], so we need to use [ and ] instead.
30146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30147   if test "x$has_forbidden_chars" != x; then
30148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30149     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30150   fi
30151 
30152     # Output is in $new_path
30153 
30154   windows_path="$new_path"
30155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30156     unix_path=`$CYGPATH -u "$windows_path"`
30157     new_path="$unix_path"
30158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30160     new_path="$unix_path"
30161   fi
30162 
30163     # remove trailing .exe if any
30164     new_path="${new_path/%.exe/}"
30165 
30166     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30167     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30168   fi
30169 
30170   else
30171     # We're on a unix platform. Hooray! :)
30172     # First separate the path from the arguments. This will split at the first
30173     # space.
30174     complete="$PROPER_COMPILER_CXX"
30175     path="${complete%% *}"
30176     tmp="$complete EOL"
30177     arguments="${tmp#* }"
30178 
30179     # Cannot rely on the command "which" here since it doesn't always work.
30180     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30181     if test -z "$is_absolute_path"; then
30182       # Path to executable is not absolute. Find it.
30183       IFS_save="$IFS"
30184       IFS=:
30185       for p in $PATH; do
30186         if test -f "$p/$path" && test -x "$p/$path"; then
30187           new_path="$p/$path"
30188           break
30189         fi
30190       done
30191       IFS="$IFS_save"
30192     else
30193       # This is an absolute path, we can use it without further modifications.
30194       new_path="$path"
30195     fi
30196 
30197     if test "x$new_path" = x; then
30198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30199 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30200       has_space=`$ECHO "$complete" | $GREP " "`
30201       if test "x$has_space" != x; then
30202         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30203 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30204       fi
30205       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30206     fi
30207   fi
30208 
30209   # Now join together the path and the arguments once again
30210   if test "x$arguments" != xEOL; then
30211     new_complete="$new_path ${arguments% *}"
30212   else
30213     new_complete="$new_path"
30214   fi
30215 
30216   if test "x$complete" != "x$new_complete"; then
30217     PROPER_COMPILER_CXX="$new_complete"
30218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30219 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30220   fi
30221 
30222     PATH="$RETRY_COMPILER_SAVED_PATH"
30223 
30224     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30225 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30226 
30227   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30228     # Follow a chain of symbolic links. Use readlink
30229     # where it exists, else fall back to horribly
30230     # complicated shell code.
30231     if test "x$READLINK_TESTED" != yes; then
30232       # On MacOSX there is a readlink tool with a different
30233       # purpose than the GNU readlink tool. Check the found readlink.
30234       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30235       if test "x$ISGNU" = x; then
30236         # A readlink that we do not know how to use.
30237         # Are there other non-GNU readlinks out there?
30238         READLINK_TESTED=yes
30239         READLINK=
30240       fi
30241     fi
30242 
30243     if test "x$READLINK" != x; then
30244       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30245     else
30246       # Save the current directory for restoring afterwards
30247       STARTDIR=$PWD
30248       COUNTER=0
30249       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30250       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30251       cd $sym_link_dir
30252       # Use -P flag to resolve symlinks in directories.
30253       cd `$THEPWDCMD -P`
30254       sym_link_dir=`$THEPWDCMD -P`
30255       # Resolve file symlinks
30256       while test $COUNTER -lt 20; do
30257         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30258         if test "x$ISLINK" == x; then
30259           # This is not a symbolic link! We are done!
30260           break
30261         fi
30262         # Again resolve directory symlinks since the target of the just found
30263         # link could be in a different directory
30264         cd `$DIRNAME $ISLINK`
30265         sym_link_dir=`$THEPWDCMD -P`
30266         sym_link_file=`$BASENAME $ISLINK`
30267         let COUNTER=COUNTER+1
30268       done
30269       cd $STARTDIR
30270       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30271     fi
30272   fi
30273 
30274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30275 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30276     CXX="$PROPER_COMPILER_CXX"
30277   else
30278     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30279 $as_echo "no, keeping CXX" >&6; }
30280   fi
30281 
30282 
30283   COMPILER=$CXX
30284   COMPILER_NAME=$COMPILER_NAME
30285 
30286   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30287     # cc -V output typically looks like
30288     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30289     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30290     # Check that this is likely to be the Solaris Studio cc.
30291     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30292     if test $? -ne 0; then
30293       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30294       { $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
30295 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30296       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30297 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30298       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30299 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30300       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30301     fi
30302     # Remove usage instructions (if present), and
30303     # collapse compiler output into a single line
30304     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30305         $SED -e 's/ *[Uu]sage:.*//'`
30306     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30307         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30308   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30309     # xlc -qversion output typically looks like
30310     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30311     #     Version: 11.01.0000.0015
30312     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30313     # Check that this is likely to be the IBM XL C compiler.
30314     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30315     if test $? -ne 0; then
30316       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30317       { $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
30318 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30319       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30320 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30321       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30322 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30323       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30324     fi
30325     # Collapse compiler output into a single line
30326     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30327     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30328         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30329   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30330     # There is no specific version flag, but all output starts with a version string.
30331     # First line typically looks something like:
30332     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30333     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30334     # Check that this is likely to be Microsoft CL.EXE.
30335     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30336     if test $? -ne 0; then
30337       { $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
30338 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30339       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30340 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30341       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30342     fi
30343     # Collapse compiler output into a single line
30344     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30345     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30346         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30347   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30348     # gcc --version output typically looks like
30349     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30350     #     Copyright (C) 2013 Free Software Foundation, Inc.
30351     #     This is free software; see the source for copying conditions.  There is NO
30352     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30353     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30354     # Check that this is likely to be GCC.
30355     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30356     if test $? -ne 0; then
30357       { $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
30358 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30359       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30360 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30361       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30362     fi
30363     # Remove Copyright and legalese from version string, and
30364     # collapse into a single line
30365     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30366         $SED -e 's/ *Copyright .*//'`
30367     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30368         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30369   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30370     # clang --version output typically looks like
30371     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30372     #    clang version 3.3 (tags/RELEASE_33/final)
30373     # or
30374     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30375     #    Target: x86_64-pc-linux-gnu
30376     #    Thread model: posix
30377     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30378     # Check that this is likely to be clang
30379     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30380     if test $? -ne 0; then
30381       { $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
30382 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30383       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30384 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30385       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30386     fi
30387     # Collapse compiler output into a single line
30388     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30389     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30390         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30391   else
30392       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30393   fi
30394   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30395   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30396   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30397   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30398 
30399   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30400 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30401 
30402 
30403   # Now that we have resolved CXX ourself, let autoconf have its go at it
30404   ac_ext=cpp
30405 ac_cpp='$CXXCPP $CPPFLAGS'
30406 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30407 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30408 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30409 if test -z "$CXX"; then
30410   if test -n "$CCC"; then
30411     CXX=$CCC
30412   else
30413     if test -n "$ac_tool_prefix"; then
30414   for ac_prog in $CXX
30415   do
30416     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30417 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30419 $as_echo_n "checking for $ac_word... " >&6; }
30420 if ${ac_cv_prog_CXX+:} false; then :
30421   $as_echo_n "(cached) " >&6
30422 else
30423   if test -n "$CXX"; then
30424   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30425 else
30426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30427 for as_dir in $PATH
30428 do
30429   IFS=$as_save_IFS
30430   test -z "$as_dir" && as_dir=.
30431     for ac_exec_ext in '' $ac_executable_extensions; do
30432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30433     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30435     break 2
30436   fi
30437 done
30438   done
30439 IFS=$as_save_IFS
30440 
30441 fi
30442 fi
30443 CXX=$ac_cv_prog_CXX
30444 if test -n "$CXX"; then
30445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30446 $as_echo "$CXX" >&6; }
30447 else
30448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30449 $as_echo "no" >&6; }
30450 fi
30451 
30452 
30453     test -n "$CXX" && break
30454   done
30455 fi
30456 if test -z "$CXX"; then
30457   ac_ct_CXX=$CXX
30458   for ac_prog in $CXX
30459 do
30460   # Extract the first word of "$ac_prog", so it can be a program name with args.
30461 set dummy $ac_prog; ac_word=$2
30462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30463 $as_echo_n "checking for $ac_word... " >&6; }
30464 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30465   $as_echo_n "(cached) " >&6
30466 else
30467   if test -n "$ac_ct_CXX"; then
30468   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30469 else
30470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30471 for as_dir in $PATH
30472 do
30473   IFS=$as_save_IFS
30474   test -z "$as_dir" && as_dir=.
30475     for ac_exec_ext in '' $ac_executable_extensions; do
30476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30477     ac_cv_prog_ac_ct_CXX="$ac_prog"
30478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30479     break 2
30480   fi
30481 done
30482   done
30483 IFS=$as_save_IFS
30484 
30485 fi
30486 fi
30487 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30488 if test -n "$ac_ct_CXX"; then
30489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30490 $as_echo "$ac_ct_CXX" >&6; }
30491 else
30492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30493 $as_echo "no" >&6; }
30494 fi
30495 
30496 
30497   test -n "$ac_ct_CXX" && break
30498 done
30499 
30500   if test "x$ac_ct_CXX" = x; then
30501     CXX="g++"
30502   else
30503     case $cross_compiling:$ac_tool_warned in
30504 yes:)
30505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30506 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30507 ac_tool_warned=yes ;;
30508 esac
30509     CXX=$ac_ct_CXX
30510   fi
30511 fi
30512 
30513   fi
30514 fi
30515 # Provide some information about the compiler.
30516 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30517 set X $ac_compile
30518 ac_compiler=$2
30519 for ac_option in --version -v -V -qversion; do
30520   { { ac_try="$ac_compiler $ac_option >&5"
30521 case "(($ac_try" in
30522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30523   *) ac_try_echo=$ac_try;;
30524 esac
30525 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30526 $as_echo "$ac_try_echo"; } >&5
30527   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30528   ac_status=$?
30529   if test -s conftest.err; then
30530     sed '10a\
30531 ... rest of stderr output deleted ...
30532          10q' conftest.err >conftest.er1
30533     cat conftest.er1 >&5
30534   fi
30535   rm -f conftest.er1 conftest.err
30536   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30537   test $ac_status = 0; }
30538 done
30539 
30540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30541 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30542 if ${ac_cv_cxx_compiler_gnu+:} false; then :
30543   $as_echo_n "(cached) " >&6
30544 else
30545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30546 /* end confdefs.h.  */
30547 
30548 int
30549 main ()
30550 {
30551 #ifndef __GNUC__
30552        choke me
30553 #endif
30554 
30555   ;
30556   return 0;
30557 }
30558 _ACEOF
30559 if ac_fn_cxx_try_compile "$LINENO"; then :
30560   ac_compiler_gnu=yes
30561 else
30562   ac_compiler_gnu=no
30563 fi
30564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30565 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30566 
30567 fi
30568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30569 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30570 if test $ac_compiler_gnu = yes; then
30571   GXX=yes
30572 else
30573   GXX=
30574 fi
30575 ac_test_CXXFLAGS=${CXXFLAGS+set}
30576 ac_save_CXXFLAGS=$CXXFLAGS
30577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30578 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
30579 if ${ac_cv_prog_cxx_g+:} false; then :
30580   $as_echo_n "(cached) " >&6
30581 else
30582   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30583    ac_cxx_werror_flag=yes
30584    ac_cv_prog_cxx_g=no
30585    CXXFLAGS="-g"
30586    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30587 /* end confdefs.h.  */
30588 
30589 int
30590 main ()
30591 {
30592 
30593   ;
30594   return 0;
30595 }
30596 _ACEOF
30597 if ac_fn_cxx_try_compile "$LINENO"; then :
30598   ac_cv_prog_cxx_g=yes
30599 else
30600   CXXFLAGS=""
30601       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30602 /* end confdefs.h.  */
30603 
30604 int
30605 main ()
30606 {
30607 
30608   ;
30609   return 0;
30610 }
30611 _ACEOF
30612 if ac_fn_cxx_try_compile "$LINENO"; then :
30613 
30614 else
30615   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30616          CXXFLAGS="-g"
30617          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30618 /* end confdefs.h.  */
30619 
30620 int
30621 main ()
30622 {
30623 
30624   ;
30625   return 0;
30626 }
30627 _ACEOF
30628 if ac_fn_cxx_try_compile "$LINENO"; then :
30629   ac_cv_prog_cxx_g=yes
30630 fi
30631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30632 fi
30633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30634 fi
30635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30636    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30637 fi
30638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30639 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30640 if test "$ac_test_CXXFLAGS" = set; then
30641   CXXFLAGS=$ac_save_CXXFLAGS
30642 elif test $ac_cv_prog_cxx_g = yes; then
30643   if test "$GXX" = yes; then
30644     CXXFLAGS="-g -O2"
30645   else
30646     CXXFLAGS="-g"
30647   fi
30648 else
30649   if test "$GXX" = yes; then
30650     CXXFLAGS="-O2"
30651   else
30652     CXXFLAGS=
30653   fi
30654 fi
30655 ac_ext=cpp
30656 ac_cpp='$CXXCPP $CPPFLAGS'
30657 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30658 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30659 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30660 
30661 
30662   #
30663   # Setup the preprocessor (CPP and CXXCPP)
30664   #
30665   ac_ext=c
30666 ac_cpp='$CPP $CPPFLAGS'
30667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30671 $as_echo_n "checking how to run the C preprocessor... " >&6; }
30672 # On Suns, sometimes $CPP names a directory.
30673 if test -n "$CPP" && test -d "$CPP"; then
30674   CPP=
30675 fi
30676 if test -z "$CPP"; then
30677   if ${ac_cv_prog_CPP+:} false; then :
30678   $as_echo_n "(cached) " >&6
30679 else
30680       # Double quotes because CPP needs to be expanded
30681     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30682     do
30683       ac_preproc_ok=false
30684 for ac_c_preproc_warn_flag in '' yes
30685 do
30686   # Use a header file that comes with gcc, so configuring glibc
30687   # with a fresh cross-compiler works.
30688   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30689   # <limits.h> exists even on freestanding compilers.
30690   # On the NeXT, cc -E runs the code through the compiler's parser,
30691   # not just through cpp. "Syntax error" is here to catch this case.
30692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30693 /* end confdefs.h.  */
30694 #ifdef __STDC__
30695 # include <limits.h>
30696 #else
30697 # include <assert.h>
30698 #endif
30699                      Syntax error
30700 _ACEOF
30701 if ac_fn_c_try_cpp "$LINENO"; then :
30702 
30703 else
30704   # Broken: fails on valid input.
30705 continue
30706 fi
30707 rm -f conftest.err conftest.i conftest.$ac_ext
30708 
30709   # OK, works on sane cases.  Now check whether nonexistent headers
30710   # can be detected and how.
30711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30712 /* end confdefs.h.  */
30713 #include <ac_nonexistent.h>
30714 _ACEOF
30715 if ac_fn_c_try_cpp "$LINENO"; then :
30716   # Broken: success on invalid input.
30717 continue
30718 else
30719   # Passes both tests.
30720 ac_preproc_ok=:
30721 break
30722 fi
30723 rm -f conftest.err conftest.i conftest.$ac_ext
30724 
30725 done
30726 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30727 rm -f conftest.i conftest.err conftest.$ac_ext
30728 if $ac_preproc_ok; then :
30729   break
30730 fi
30731 
30732     done
30733     ac_cv_prog_CPP=$CPP
30734 
30735 fi
30736   CPP=$ac_cv_prog_CPP
30737 else
30738   ac_cv_prog_CPP=$CPP
30739 fi
30740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30741 $as_echo "$CPP" >&6; }
30742 ac_preproc_ok=false
30743 for ac_c_preproc_warn_flag in '' yes
30744 do
30745   # Use a header file that comes with gcc, so configuring glibc
30746   # with a fresh cross-compiler works.
30747   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30748   # <limits.h> exists even on freestanding compilers.
30749   # On the NeXT, cc -E runs the code through the compiler's parser,
30750   # not just through cpp. "Syntax error" is here to catch this case.
30751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30752 /* end confdefs.h.  */
30753 #ifdef __STDC__
30754 # include <limits.h>
30755 #else
30756 # include <assert.h>
30757 #endif
30758                      Syntax error
30759 _ACEOF
30760 if ac_fn_c_try_cpp "$LINENO"; then :
30761 
30762 else
30763   # Broken: fails on valid input.
30764 continue
30765 fi
30766 rm -f conftest.err conftest.i conftest.$ac_ext
30767 
30768   # OK, works on sane cases.  Now check whether nonexistent headers
30769   # can be detected and how.
30770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30771 /* end confdefs.h.  */
30772 #include <ac_nonexistent.h>
30773 _ACEOF
30774 if ac_fn_c_try_cpp "$LINENO"; then :
30775   # Broken: success on invalid input.
30776 continue
30777 else
30778   # Passes both tests.
30779 ac_preproc_ok=:
30780 break
30781 fi
30782 rm -f conftest.err conftest.i conftest.$ac_ext
30783 
30784 done
30785 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30786 rm -f conftest.i conftest.err conftest.$ac_ext
30787 if $ac_preproc_ok; then :
30788 
30789 else
30790   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30791 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30792 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30793 See \`config.log' for more details" "$LINENO" 5; }
30794 fi
30795 
30796 ac_ext=cpp
30797 ac_cpp='$CXXCPP $CPPFLAGS'
30798 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30799 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30800 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30801 
30802 
30803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30804 
30805   # First separate the path from the arguments. This will split at the first
30806   # space.
30807   complete="$CPP"
30808   path="${complete%% *}"
30809   tmp="$complete EOL"
30810   arguments="${tmp#* }"
30811 
30812   # Input might be given as Windows format, start by converting to
30813   # unix format.
30814   new_path=`$CYGPATH -u "$path"`
30815 
30816   # Now try to locate executable using which
30817   new_path=`$WHICH "$new_path" 2> /dev/null`
30818   # bat and cmd files are not always considered executable in cygwin causing which
30819   # to not find them
30820   if test "x$new_path" = x \
30821       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30822       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30823     new_path=`$CYGPATH -u "$path"`
30824   fi
30825   if test "x$new_path" = x; then
30826     # Oops. Which didn't find the executable.
30827     # The splitting of arguments from the executable at a space might have been incorrect,
30828     # since paths with space are more likely in Windows. Give it another try with the whole
30829     # argument.
30830     path="$complete"
30831     arguments="EOL"
30832     new_path=`$CYGPATH -u "$path"`
30833     new_path=`$WHICH "$new_path" 2> /dev/null`
30834     # bat and cmd files are not always considered executable in cygwin causing which
30835     # to not find them
30836     if test "x$new_path" = x \
30837         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30838         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30839       new_path=`$CYGPATH -u "$path"`
30840     fi
30841     if test "x$new_path" = x; then
30842       # It's still not found. Now this is an unrecoverable error.
30843       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30844 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30845       has_space=`$ECHO "$complete" | $GREP " "`
30846       if test "x$has_space" != x; then
30847         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30848 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30849       fi
30850       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30851     fi
30852   fi
30853 
30854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30857   # "foo.exe" is OK but "foo" is an error.
30858   #
30859   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30860   # It is also a way to make sure we got the proper file name for the real test later on.
30861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30862   if test "x$test_shortpath" = x; then
30863     # Short path failed, file does not exist as specified.
30864     # Try adding .exe or .cmd
30865     if test -f "${new_path}.exe"; then
30866       input_to_shortpath="${new_path}.exe"
30867     elif test -f "${new_path}.cmd"; then
30868       input_to_shortpath="${new_path}.cmd"
30869     else
30870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30871 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30872       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30873 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30874       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30875     fi
30876   else
30877     input_to_shortpath="$new_path"
30878   fi
30879 
30880   # Call helper function which possibly converts this using DOS-style short mode.
30881   # If so, the updated path is stored in $new_path.
30882   new_path="$input_to_shortpath"
30883 
30884   input_path="$input_to_shortpath"
30885   # Check if we need to convert this using DOS-style short mode. If the path
30886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30887   # take no chances and rewrite it.
30888   # Note: m4 eats our [], so we need to use [ and ] instead.
30889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30890   if test "x$has_forbidden_chars" != x; then
30891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30892     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30893     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30894     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30895       # Going to short mode and back again did indeed matter. Since short mode is
30896       # case insensitive, let's make it lowercase to improve readability.
30897       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30898       # Now convert it back to Unix-stile (cygpath)
30899       input_path=`$CYGPATH -u "$shortmode_path"`
30900       new_path="$input_path"
30901     fi
30902   fi
30903 
30904   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30905   if test "x$test_cygdrive_prefix" = x; then
30906     # As a simple fix, exclude /usr/bin since it's not a real path.
30907     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30908       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30909       # a path prefixed by /cygdrive for fixpath to work.
30910       new_path="$CYGWIN_ROOT_PATH$input_path"
30911     fi
30912   fi
30913 
30914   # remove trailing .exe if any
30915   new_path="${new_path/%.exe/}"
30916 
30917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30918 
30919   # First separate the path from the arguments. This will split at the first
30920   # space.
30921   complete="$CPP"
30922   path="${complete%% *}"
30923   tmp="$complete EOL"
30924   arguments="${tmp#* }"
30925 
30926   # Input might be given as Windows format, start by converting to
30927   # unix format.
30928   new_path="$path"
30929 
30930   windows_path="$new_path"
30931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30932     unix_path=`$CYGPATH -u "$windows_path"`
30933     new_path="$unix_path"
30934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30936     new_path="$unix_path"
30937   fi
30938 
30939 
30940   # Now try to locate executable using which
30941   new_path=`$WHICH "$new_path" 2> /dev/null`
30942 
30943   if test "x$new_path" = x; then
30944     # Oops. Which didn't find the executable.
30945     # The splitting of arguments from the executable at a space might have been incorrect,
30946     # since paths with space are more likely in Windows. Give it another try with the whole
30947     # argument.
30948     path="$complete"
30949     arguments="EOL"
30950     new_path="$path"
30951 
30952   windows_path="$new_path"
30953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30954     unix_path=`$CYGPATH -u "$windows_path"`
30955     new_path="$unix_path"
30956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30958     new_path="$unix_path"
30959   fi
30960 
30961 
30962     new_path=`$WHICH "$new_path" 2> /dev/null`
30963     # bat and cmd files are not always considered executable in MSYS causing which
30964     # to not find them
30965     if test "x$new_path" = x \
30966         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30967         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30968       new_path="$path"
30969 
30970   windows_path="$new_path"
30971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30972     unix_path=`$CYGPATH -u "$windows_path"`
30973     new_path="$unix_path"
30974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30976     new_path="$unix_path"
30977   fi
30978 
30979     fi
30980 
30981     if test "x$new_path" = x; then
30982       # It's still not found. Now this is an unrecoverable error.
30983       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30984 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30985       has_space=`$ECHO "$complete" | $GREP " "`
30986       if test "x$has_space" != x; then
30987         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30988 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30989       fi
30990       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30991     fi
30992   fi
30993 
30994   # Now new_path has a complete unix path to the binary
30995   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30996     # Keep paths in /bin as-is, but remove trailing .exe if any
30997     new_path="${new_path/%.exe/}"
30998     # Do not save /bin paths to all_fixpath_prefixes!
30999   else
31000     # Not in mixed or Windows style, start by that.
31001     new_path=`cmd //c echo $new_path`
31002 
31003   input_path="$new_path"
31004   # Check if we need to convert this using DOS-style short mode. If the path
31005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31006   # take no chances and rewrite it.
31007   # Note: m4 eats our [], so we need to use [ and ] instead.
31008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31009   if test "x$has_forbidden_chars" != x; then
31010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31011     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31012   fi
31013 
31014     # Output is in $new_path
31015 
31016   windows_path="$new_path"
31017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31018     unix_path=`$CYGPATH -u "$windows_path"`
31019     new_path="$unix_path"
31020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31022     new_path="$unix_path"
31023   fi
31024 
31025     # remove trailing .exe if any
31026     new_path="${new_path/%.exe/}"
31027 
31028     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31029     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31030   fi
31031 
31032   else
31033     # We're on a unix platform. Hooray! :)
31034     # First separate the path from the arguments. This will split at the first
31035     # space.
31036     complete="$CPP"
31037     path="${complete%% *}"
31038     tmp="$complete EOL"
31039     arguments="${tmp#* }"
31040 
31041     # Cannot rely on the command "which" here since it doesn't always work.
31042     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31043     if test -z "$is_absolute_path"; then
31044       # Path to executable is not absolute. Find it.
31045       IFS_save="$IFS"
31046       IFS=:
31047       for p in $PATH; do
31048         if test -f "$p/$path" && test -x "$p/$path"; then
31049           new_path="$p/$path"
31050           break
31051         fi
31052       done
31053       IFS="$IFS_save"
31054     else
31055       # This is an absolute path, we can use it without further modifications.
31056       new_path="$path"
31057     fi
31058 
31059     if test "x$new_path" = x; then
31060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31061 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31062       has_space=`$ECHO "$complete" | $GREP " "`
31063       if test "x$has_space" != x; then
31064         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31065 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31066       fi
31067       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31068     fi
31069   fi
31070 
31071   # Now join together the path and the arguments once again
31072   if test "x$arguments" != xEOL; then
31073     new_complete="$new_path ${arguments% *}"
31074   else
31075     new_complete="$new_path"
31076   fi
31077 
31078   if test "x$complete" != "x$new_complete"; then
31079     CPP="$new_complete"
31080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31081 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31082   fi
31083 
31084   ac_ext=cpp
31085 ac_cpp='$CXXCPP $CPPFLAGS'
31086 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31087 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31088 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31090 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31091 if test -z "$CXXCPP"; then
31092   if ${ac_cv_prog_CXXCPP+:} false; then :
31093   $as_echo_n "(cached) " >&6
31094 else
31095       # Double quotes because CXXCPP needs to be expanded
31096     for CXXCPP in "$CXX -E" "/lib/cpp"
31097     do
31098       ac_preproc_ok=false
31099 for ac_cxx_preproc_warn_flag in '' yes
31100 do
31101   # Use a header file that comes with gcc, so configuring glibc
31102   # with a fresh cross-compiler works.
31103   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31104   # <limits.h> exists even on freestanding compilers.
31105   # On the NeXT, cc -E runs the code through the compiler's parser,
31106   # not just through cpp. "Syntax error" is here to catch this case.
31107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31108 /* end confdefs.h.  */
31109 #ifdef __STDC__
31110 # include <limits.h>
31111 #else
31112 # include <assert.h>
31113 #endif
31114                      Syntax error
31115 _ACEOF
31116 if ac_fn_cxx_try_cpp "$LINENO"; then :
31117 
31118 else
31119   # Broken: fails on valid input.
31120 continue
31121 fi
31122 rm -f conftest.err conftest.i conftest.$ac_ext
31123 
31124   # OK, works on sane cases.  Now check whether nonexistent headers
31125   # can be detected and how.
31126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31127 /* end confdefs.h.  */
31128 #include <ac_nonexistent.h>
31129 _ACEOF
31130 if ac_fn_cxx_try_cpp "$LINENO"; then :
31131   # Broken: success on invalid input.
31132 continue
31133 else
31134   # Passes both tests.
31135 ac_preproc_ok=:
31136 break
31137 fi
31138 rm -f conftest.err conftest.i conftest.$ac_ext
31139 
31140 done
31141 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31142 rm -f conftest.i conftest.err conftest.$ac_ext
31143 if $ac_preproc_ok; then :
31144   break
31145 fi
31146 
31147     done
31148     ac_cv_prog_CXXCPP=$CXXCPP
31149 
31150 fi
31151   CXXCPP=$ac_cv_prog_CXXCPP
31152 else
31153   ac_cv_prog_CXXCPP=$CXXCPP
31154 fi
31155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31156 $as_echo "$CXXCPP" >&6; }
31157 ac_preproc_ok=false
31158 for ac_cxx_preproc_warn_flag in '' yes
31159 do
31160   # Use a header file that comes with gcc, so configuring glibc
31161   # with a fresh cross-compiler works.
31162   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31163   # <limits.h> exists even on freestanding compilers.
31164   # On the NeXT, cc -E runs the code through the compiler's parser,
31165   # not just through cpp. "Syntax error" is here to catch this case.
31166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31167 /* end confdefs.h.  */
31168 #ifdef __STDC__
31169 # include <limits.h>
31170 #else
31171 # include <assert.h>
31172 #endif
31173                      Syntax error
31174 _ACEOF
31175 if ac_fn_cxx_try_cpp "$LINENO"; then :
31176 
31177 else
31178   # Broken: fails on valid input.
31179 continue
31180 fi
31181 rm -f conftest.err conftest.i conftest.$ac_ext
31182 
31183   # OK, works on sane cases.  Now check whether nonexistent headers
31184   # can be detected and how.
31185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31186 /* end confdefs.h.  */
31187 #include <ac_nonexistent.h>
31188 _ACEOF
31189 if ac_fn_cxx_try_cpp "$LINENO"; then :
31190   # Broken: success on invalid input.
31191 continue
31192 else
31193   # Passes both tests.
31194 ac_preproc_ok=:
31195 break
31196 fi
31197 rm -f conftest.err conftest.i conftest.$ac_ext
31198 
31199 done
31200 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31201 rm -f conftest.i conftest.err conftest.$ac_ext
31202 if $ac_preproc_ok; then :
31203 
31204 else
31205   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31206 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31207 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31208 See \`config.log' for more details" "$LINENO" 5; }
31209 fi
31210 
31211 ac_ext=cpp
31212 ac_cpp='$CXXCPP $CPPFLAGS'
31213 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31214 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31215 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31216 
31217 
31218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31219 
31220   # First separate the path from the arguments. This will split at the first
31221   # space.
31222   complete="$CXXCPP"
31223   path="${complete%% *}"
31224   tmp="$complete EOL"
31225   arguments="${tmp#* }"
31226 
31227   # Input might be given as Windows format, start by converting to
31228   # unix format.
31229   new_path=`$CYGPATH -u "$path"`
31230 
31231   # Now try to locate executable using which
31232   new_path=`$WHICH "$new_path" 2> /dev/null`
31233   # bat and cmd files are not always considered executable in cygwin causing which
31234   # to not find them
31235   if test "x$new_path" = x \
31236       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31237       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31238     new_path=`$CYGPATH -u "$path"`
31239   fi
31240   if test "x$new_path" = x; then
31241     # Oops. Which didn't find the executable.
31242     # The splitting of arguments from the executable at a space might have been incorrect,
31243     # since paths with space are more likely in Windows. Give it another try with the whole
31244     # argument.
31245     path="$complete"
31246     arguments="EOL"
31247     new_path=`$CYGPATH -u "$path"`
31248     new_path=`$WHICH "$new_path" 2> /dev/null`
31249     # bat and cmd files are not always considered executable in cygwin causing which
31250     # to not find them
31251     if test "x$new_path" = x \
31252         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31253         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31254       new_path=`$CYGPATH -u "$path"`
31255     fi
31256     if test "x$new_path" = x; then
31257       # It's still not found. Now this is an unrecoverable error.
31258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31259 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31260       has_space=`$ECHO "$complete" | $GREP " "`
31261       if test "x$has_space" != x; then
31262         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31263 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31264       fi
31265       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31266     fi
31267   fi
31268 
31269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31272   # "foo.exe" is OK but "foo" is an error.
31273   #
31274   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31275   # It is also a way to make sure we got the proper file name for the real test later on.
31276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31277   if test "x$test_shortpath" = x; then
31278     # Short path failed, file does not exist as specified.
31279     # Try adding .exe or .cmd
31280     if test -f "${new_path}.exe"; then
31281       input_to_shortpath="${new_path}.exe"
31282     elif test -f "${new_path}.cmd"; then
31283       input_to_shortpath="${new_path}.cmd"
31284     else
31285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31286 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31287       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31288 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31289       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31290     fi
31291   else
31292     input_to_shortpath="$new_path"
31293   fi
31294 
31295   # Call helper function which possibly converts this using DOS-style short mode.
31296   # If so, the updated path is stored in $new_path.
31297   new_path="$input_to_shortpath"
31298 
31299   input_path="$input_to_shortpath"
31300   # Check if we need to convert this using DOS-style short mode. If the path
31301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31302   # take no chances and rewrite it.
31303   # Note: m4 eats our [], so we need to use [ and ] instead.
31304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31305   if test "x$has_forbidden_chars" != x; then
31306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31310       # Going to short mode and back again did indeed matter. Since short mode is
31311       # case insensitive, let's make it lowercase to improve readability.
31312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31313       # Now convert it back to Unix-stile (cygpath)
31314       input_path=`$CYGPATH -u "$shortmode_path"`
31315       new_path="$input_path"
31316     fi
31317   fi
31318 
31319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31320   if test "x$test_cygdrive_prefix" = x; then
31321     # As a simple fix, exclude /usr/bin since it's not a real path.
31322     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31324       # a path prefixed by /cygdrive for fixpath to work.
31325       new_path="$CYGWIN_ROOT_PATH$input_path"
31326     fi
31327   fi
31328 
31329   # remove trailing .exe if any
31330   new_path="${new_path/%.exe/}"
31331 
31332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31333 
31334   # First separate the path from the arguments. This will split at the first
31335   # space.
31336   complete="$CXXCPP"
31337   path="${complete%% *}"
31338   tmp="$complete EOL"
31339   arguments="${tmp#* }"
31340 
31341   # Input might be given as Windows format, start by converting to
31342   # unix format.
31343   new_path="$path"
31344 
31345   windows_path="$new_path"
31346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31347     unix_path=`$CYGPATH -u "$windows_path"`
31348     new_path="$unix_path"
31349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31351     new_path="$unix_path"
31352   fi
31353 
31354 
31355   # Now try to locate executable using which
31356   new_path=`$WHICH "$new_path" 2> /dev/null`
31357 
31358   if test "x$new_path" = x; then
31359     # Oops. Which didn't find the executable.
31360     # The splitting of arguments from the executable at a space might have been incorrect,
31361     # since paths with space are more likely in Windows. Give it another try with the whole
31362     # argument.
31363     path="$complete"
31364     arguments="EOL"
31365     new_path="$path"
31366 
31367   windows_path="$new_path"
31368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31369     unix_path=`$CYGPATH -u "$windows_path"`
31370     new_path="$unix_path"
31371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31373     new_path="$unix_path"
31374   fi
31375 
31376 
31377     new_path=`$WHICH "$new_path" 2> /dev/null`
31378     # bat and cmd files are not always considered executable in MSYS causing which
31379     # to not find them
31380     if test "x$new_path" = x \
31381         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31382         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31383       new_path="$path"
31384 
31385   windows_path="$new_path"
31386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31387     unix_path=`$CYGPATH -u "$windows_path"`
31388     new_path="$unix_path"
31389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31391     new_path="$unix_path"
31392   fi
31393 
31394     fi
31395 
31396     if test "x$new_path" = x; then
31397       # It's still not found. Now this is an unrecoverable error.
31398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31399 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31400       has_space=`$ECHO "$complete" | $GREP " "`
31401       if test "x$has_space" != x; then
31402         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31403 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31404       fi
31405       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31406     fi
31407   fi
31408 
31409   # Now new_path has a complete unix path to the binary
31410   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31411     # Keep paths in /bin as-is, but remove trailing .exe if any
31412     new_path="${new_path/%.exe/}"
31413     # Do not save /bin paths to all_fixpath_prefixes!
31414   else
31415     # Not in mixed or Windows style, start by that.
31416     new_path=`cmd //c echo $new_path`
31417 
31418   input_path="$new_path"
31419   # Check if we need to convert this using DOS-style short mode. If the path
31420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31421   # take no chances and rewrite it.
31422   # Note: m4 eats our [], so we need to use [ and ] instead.
31423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31424   if test "x$has_forbidden_chars" != x; then
31425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31426     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31427   fi
31428 
31429     # Output is in $new_path
31430 
31431   windows_path="$new_path"
31432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31433     unix_path=`$CYGPATH -u "$windows_path"`
31434     new_path="$unix_path"
31435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31437     new_path="$unix_path"
31438   fi
31439 
31440     # remove trailing .exe if any
31441     new_path="${new_path/%.exe/}"
31442 
31443     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31444     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31445   fi
31446 
31447   else
31448     # We're on a unix platform. Hooray! :)
31449     # First separate the path from the arguments. This will split at the first
31450     # space.
31451     complete="$CXXCPP"
31452     path="${complete%% *}"
31453     tmp="$complete EOL"
31454     arguments="${tmp#* }"
31455 
31456     # Cannot rely on the command "which" here since it doesn't always work.
31457     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31458     if test -z "$is_absolute_path"; then
31459       # Path to executable is not absolute. Find it.
31460       IFS_save="$IFS"
31461       IFS=:
31462       for p in $PATH; do
31463         if test -f "$p/$path" && test -x "$p/$path"; then
31464           new_path="$p/$path"
31465           break
31466         fi
31467       done
31468       IFS="$IFS_save"
31469     else
31470       # This is an absolute path, we can use it without further modifications.
31471       new_path="$path"
31472     fi
31473 
31474     if test "x$new_path" = x; then
31475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31476 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31477       has_space=`$ECHO "$complete" | $GREP " "`
31478       if test "x$has_space" != x; then
31479         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31480 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31481       fi
31482       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31483     fi
31484   fi
31485 
31486   # Now join together the path and the arguments once again
31487   if test "x$arguments" != xEOL; then
31488     new_complete="$new_path ${arguments% *}"
31489   else
31490     new_complete="$new_path"
31491   fi
31492 
31493   if test "x$complete" != "x$new_complete"; then
31494     CXXCPP="$new_complete"
31495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31496 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31497   fi
31498 
31499 
31500   #
31501   # Setup the linker (LD)
31502   #
31503   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31504     # In the Microsoft toolchain we have a separate LD command "link".
31505     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31506     # a cygwin program for something completely different.
31507     # Extract the first word of "link", so it can be a program name with args.
31508 set dummy link; ac_word=$2
31509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31510 $as_echo_n "checking for $ac_word... " >&6; }
31511 if ${ac_cv_prog_LD+:} false; then :
31512   $as_echo_n "(cached) " >&6
31513 else
31514   if test -n "$LD"; then
31515   ac_cv_prog_LD="$LD" # Let the user override the test.
31516 else
31517   ac_prog_rejected=no
31518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31519 for as_dir in $PATH
31520 do
31521   IFS=$as_save_IFS
31522   test -z "$as_dir" && as_dir=.
31523     for ac_exec_ext in '' $ac_executable_extensions; do
31524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31525     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31526        ac_prog_rejected=yes
31527        continue
31528      fi
31529     ac_cv_prog_LD="link"
31530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31531     break 2
31532   fi
31533 done
31534   done
31535 IFS=$as_save_IFS
31536 
31537 if test $ac_prog_rejected = yes; then
31538   # We found a bogon in the path, so make sure we never use it.
31539   set dummy $ac_cv_prog_LD
31540   shift
31541   if test $# != 0; then
31542     # We chose a different compiler from the bogus one.
31543     # However, it has the same basename, so the bogon will be chosen
31544     # first if we set LD to just the basename; use the full file name.
31545     shift
31546     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31547   fi
31548 fi
31549 fi
31550 fi
31551 LD=$ac_cv_prog_LD
31552 if test -n "$LD"; then
31553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31554 $as_echo "$LD" >&6; }
31555 else
31556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31557 $as_echo "no" >&6; }
31558 fi
31559 
31560 
31561 
31562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31563 
31564   # First separate the path from the arguments. This will split at the first
31565   # space.
31566   complete="$LD"
31567   path="${complete%% *}"
31568   tmp="$complete EOL"
31569   arguments="${tmp#* }"
31570 
31571   # Input might be given as Windows format, start by converting to
31572   # unix format.
31573   new_path=`$CYGPATH -u "$path"`
31574 
31575   # Now try to locate executable using which
31576   new_path=`$WHICH "$new_path" 2> /dev/null`
31577   # bat and cmd files are not always considered executable in cygwin causing which
31578   # to not find them
31579   if test "x$new_path" = x \
31580       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31581       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31582     new_path=`$CYGPATH -u "$path"`
31583   fi
31584   if test "x$new_path" = x; then
31585     # Oops. Which didn't find the executable.
31586     # The splitting of arguments from the executable at a space might have been incorrect,
31587     # since paths with space are more likely in Windows. Give it another try with the whole
31588     # argument.
31589     path="$complete"
31590     arguments="EOL"
31591     new_path=`$CYGPATH -u "$path"`
31592     new_path=`$WHICH "$new_path" 2> /dev/null`
31593     # bat and cmd files are not always considered executable in cygwin causing which
31594     # to not find them
31595     if test "x$new_path" = x \
31596         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31597         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31598       new_path=`$CYGPATH -u "$path"`
31599     fi
31600     if test "x$new_path" = x; then
31601       # It's still not found. Now this is an unrecoverable error.
31602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31603 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31604       has_space=`$ECHO "$complete" | $GREP " "`
31605       if test "x$has_space" != x; then
31606         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31608       fi
31609       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31610     fi
31611   fi
31612 
31613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31616   # "foo.exe" is OK but "foo" is an error.
31617   #
31618   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31619   # It is also a way to make sure we got the proper file name for the real test later on.
31620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31621   if test "x$test_shortpath" = x; then
31622     # Short path failed, file does not exist as specified.
31623     # Try adding .exe or .cmd
31624     if test -f "${new_path}.exe"; then
31625       input_to_shortpath="${new_path}.exe"
31626     elif test -f "${new_path}.cmd"; then
31627       input_to_shortpath="${new_path}.cmd"
31628     else
31629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31630 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31631       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31632 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31633       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31634     fi
31635   else
31636     input_to_shortpath="$new_path"
31637   fi
31638 
31639   # Call helper function which possibly converts this using DOS-style short mode.
31640   # If so, the updated path is stored in $new_path.
31641   new_path="$input_to_shortpath"
31642 
31643   input_path="$input_to_shortpath"
31644   # Check if we need to convert this using DOS-style short mode. If the path
31645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31646   # take no chances and rewrite it.
31647   # Note: m4 eats our [], so we need to use [ and ] instead.
31648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31649   if test "x$has_forbidden_chars" != x; then
31650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31651     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31652     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31653     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31654       # Going to short mode and back again did indeed matter. Since short mode is
31655       # case insensitive, let's make it lowercase to improve readability.
31656       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31657       # Now convert it back to Unix-stile (cygpath)
31658       input_path=`$CYGPATH -u "$shortmode_path"`
31659       new_path="$input_path"
31660     fi
31661   fi
31662 
31663   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31664   if test "x$test_cygdrive_prefix" = x; then
31665     # As a simple fix, exclude /usr/bin since it's not a real path.
31666     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31667       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31668       # a path prefixed by /cygdrive for fixpath to work.
31669       new_path="$CYGWIN_ROOT_PATH$input_path"
31670     fi
31671   fi
31672 
31673   # remove trailing .exe if any
31674   new_path="${new_path/%.exe/}"
31675 
31676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31677 
31678   # First separate the path from the arguments. This will split at the first
31679   # space.
31680   complete="$LD"
31681   path="${complete%% *}"
31682   tmp="$complete EOL"
31683   arguments="${tmp#* }"
31684 
31685   # Input might be given as Windows format, start by converting to
31686   # unix format.
31687   new_path="$path"
31688 
31689   windows_path="$new_path"
31690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31691     unix_path=`$CYGPATH -u "$windows_path"`
31692     new_path="$unix_path"
31693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31695     new_path="$unix_path"
31696   fi
31697 
31698 
31699   # Now try to locate executable using which
31700   new_path=`$WHICH "$new_path" 2> /dev/null`
31701 
31702   if test "x$new_path" = x; then
31703     # Oops. Which didn't find the executable.
31704     # The splitting of arguments from the executable at a space might have been incorrect,
31705     # since paths with space are more likely in Windows. Give it another try with the whole
31706     # argument.
31707     path="$complete"
31708     arguments="EOL"
31709     new_path="$path"
31710 
31711   windows_path="$new_path"
31712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31713     unix_path=`$CYGPATH -u "$windows_path"`
31714     new_path="$unix_path"
31715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31717     new_path="$unix_path"
31718   fi
31719 
31720 
31721     new_path=`$WHICH "$new_path" 2> /dev/null`
31722     # bat and cmd files are not always considered executable in MSYS causing which
31723     # to not find them
31724     if test "x$new_path" = x \
31725         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31726         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31727       new_path="$path"
31728 
31729   windows_path="$new_path"
31730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31731     unix_path=`$CYGPATH -u "$windows_path"`
31732     new_path="$unix_path"
31733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31735     new_path="$unix_path"
31736   fi
31737 
31738     fi
31739 
31740     if test "x$new_path" = x; then
31741       # It's still not found. Now this is an unrecoverable error.
31742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31743 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31744       has_space=`$ECHO "$complete" | $GREP " "`
31745       if test "x$has_space" != x; then
31746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31748       fi
31749       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31750     fi
31751   fi
31752 
31753   # Now new_path has a complete unix path to the binary
31754   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31755     # Keep paths in /bin as-is, but remove trailing .exe if any
31756     new_path="${new_path/%.exe/}"
31757     # Do not save /bin paths to all_fixpath_prefixes!
31758   else
31759     # Not in mixed or Windows style, start by that.
31760     new_path=`cmd //c echo $new_path`
31761 
31762   input_path="$new_path"
31763   # Check if we need to convert this using DOS-style short mode. If the path
31764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31765   # take no chances and rewrite it.
31766   # Note: m4 eats our [], so we need to use [ and ] instead.
31767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31768   if test "x$has_forbidden_chars" != x; then
31769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31771   fi
31772 
31773     # Output is in $new_path
31774 
31775   windows_path="$new_path"
31776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31777     unix_path=`$CYGPATH -u "$windows_path"`
31778     new_path="$unix_path"
31779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31781     new_path="$unix_path"
31782   fi
31783 
31784     # remove trailing .exe if any
31785     new_path="${new_path/%.exe/}"
31786 
31787     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31788     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31789   fi
31790 
31791   else
31792     # We're on a unix platform. Hooray! :)
31793     # First separate the path from the arguments. This will split at the first
31794     # space.
31795     complete="$LD"
31796     path="${complete%% *}"
31797     tmp="$complete EOL"
31798     arguments="${tmp#* }"
31799 
31800     # Cannot rely on the command "which" here since it doesn't always work.
31801     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31802     if test -z "$is_absolute_path"; then
31803       # Path to executable is not absolute. Find it.
31804       IFS_save="$IFS"
31805       IFS=:
31806       for p in $PATH; do
31807         if test -f "$p/$path" && test -x "$p/$path"; then
31808           new_path="$p/$path"
31809           break
31810         fi
31811       done
31812       IFS="$IFS_save"
31813     else
31814       # This is an absolute path, we can use it without further modifications.
31815       new_path="$path"
31816     fi
31817 
31818     if test "x$new_path" = x; then
31819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31820 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31821       has_space=`$ECHO "$complete" | $GREP " "`
31822       if test "x$has_space" != x; then
31823         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31824 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31825       fi
31826       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31827     fi
31828   fi
31829 
31830   # Now join together the path and the arguments once again
31831   if test "x$arguments" != xEOL; then
31832     new_complete="$new_path ${arguments% *}"
31833   else
31834     new_complete="$new_path"
31835   fi
31836 
31837   if test "x$complete" != "x$new_complete"; then
31838     LD="$new_complete"
31839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31840 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31841   fi
31842 
31843     # Verify that we indeed succeeded with this trick.
31844     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31845 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31846     "$LD" --version > /dev/null
31847     if test $? -eq 0 ; then
31848       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31849 $as_echo "no" >&6; }
31850       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31851     else
31852       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31853 $as_echo "yes" >&6; }
31854     fi
31855     LDCXX="$LD"
31856   else
31857     # All other toolchains use the compiler to link.
31858     LD="$CC"
31859     LDCXX="$CXX"
31860   fi
31861 
31862   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31863 
31864 
31865   #
31866   # Setup the assembler (AS)
31867   #
31868   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31869     # FIXME: should this really be solaris, or solstudio?
31870 
31871 
31872   # Publish this variable in the help.
31873 
31874 
31875   if test "x$AS" = x; then
31876     # The variable is not set by user, try to locate tool using the code snippet
31877     for ac_prog in as
31878 do
31879   # Extract the first word of "$ac_prog", so it can be a program name with args.
31880 set dummy $ac_prog; ac_word=$2
31881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31882 $as_echo_n "checking for $ac_word... " >&6; }
31883 if ${ac_cv_path_AS+:} false; then :
31884   $as_echo_n "(cached) " >&6
31885 else
31886   case $AS in
31887   [\\/]* | ?:[\\/]*)
31888   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31889   ;;
31890   *)
31891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31892 for as_dir in $PATH
31893 do
31894   IFS=$as_save_IFS
31895   test -z "$as_dir" && as_dir=.
31896     for ac_exec_ext in '' $ac_executable_extensions; do
31897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31898     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31900     break 2
31901   fi
31902 done
31903   done
31904 IFS=$as_save_IFS
31905 
31906   ;;
31907 esac
31908 fi
31909 AS=$ac_cv_path_AS
31910 if test -n "$AS"; then
31911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31912 $as_echo "$AS" >&6; }
31913 else
31914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31915 $as_echo "no" >&6; }
31916 fi
31917 
31918 
31919   test -n "$AS" && break
31920 done
31921 
31922   else
31923     # The variable is set, but is it from the command line or the environment?
31924 
31925     # Try to remove the string !AS! from our list.
31926     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31927     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31928       # If it failed, the variable was not from the command line. Ignore it,
31929       # but warn the user (except for BASH, which is always set by the calling BASH).
31930       if test "xAS" != xBASH; then
31931         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31932 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31933       fi
31934       # Try to locate tool using the code snippet
31935       for ac_prog in as
31936 do
31937   # Extract the first word of "$ac_prog", so it can be a program name with args.
31938 set dummy $ac_prog; ac_word=$2
31939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31940 $as_echo_n "checking for $ac_word... " >&6; }
31941 if ${ac_cv_path_AS+:} false; then :
31942   $as_echo_n "(cached) " >&6
31943 else
31944   case $AS in
31945   [\\/]* | ?:[\\/]*)
31946   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31947   ;;
31948   *)
31949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31950 for as_dir in $PATH
31951 do
31952   IFS=$as_save_IFS
31953   test -z "$as_dir" && as_dir=.
31954     for ac_exec_ext in '' $ac_executable_extensions; do
31955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31956     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31958     break 2
31959   fi
31960 done
31961   done
31962 IFS=$as_save_IFS
31963 
31964   ;;
31965 esac
31966 fi
31967 AS=$ac_cv_path_AS
31968 if test -n "$AS"; then
31969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31970 $as_echo "$AS" >&6; }
31971 else
31972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31973 $as_echo "no" >&6; }
31974 fi
31975 
31976 
31977   test -n "$AS" && break
31978 done
31979 
31980     else
31981       # If it succeeded, then it was overridden by the user. We will use it
31982       # for the tool.
31983 
31984       # First remove it from the list of overridden variables, so we can test
31985       # for unknown variables in the end.
31986       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31987 
31988       # Check if the provided tool contains a complete path.
31989       tool_specified="$AS"
31990       tool_basename="${tool_specified##*/}"
31991       if test "x$tool_basename" = "x$tool_specified"; then
31992         # A command without a complete path is provided, search $PATH.
31993         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31994 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31995         # Extract the first word of "$tool_basename", so it can be a program name with args.
31996 set dummy $tool_basename; ac_word=$2
31997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31998 $as_echo_n "checking for $ac_word... " >&6; }
31999 if ${ac_cv_path_AS+:} false; then :
32000   $as_echo_n "(cached) " >&6
32001 else
32002   case $AS in
32003   [\\/]* | ?:[\\/]*)
32004   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32005   ;;
32006   *)
32007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32008 for as_dir in $PATH
32009 do
32010   IFS=$as_save_IFS
32011   test -z "$as_dir" && as_dir=.
32012     for ac_exec_ext in '' $ac_executable_extensions; do
32013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32014     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32016     break 2
32017   fi
32018 done
32019   done
32020 IFS=$as_save_IFS
32021 
32022   ;;
32023 esac
32024 fi
32025 AS=$ac_cv_path_AS
32026 if test -n "$AS"; then
32027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32028 $as_echo "$AS" >&6; }
32029 else
32030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32031 $as_echo "no" >&6; }
32032 fi
32033 
32034 
32035         if test "x$AS" = x; then
32036           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32037         fi
32038       else
32039         # Otherwise we believe it is a complete path. Use it as it is.
32040         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32041 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32042         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32043 $as_echo_n "checking for AS... " >&6; }
32044         if test ! -x "$tool_specified"; then
32045           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32046 $as_echo "not found" >&6; }
32047           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32048         fi
32049         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32050 $as_echo "$tool_specified" >&6; }
32051       fi
32052     fi
32053   fi
32054 
32055 
32056 
32057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32058 
32059   # First separate the path from the arguments. This will split at the first
32060   # space.
32061   complete="$AS"
32062   path="${complete%% *}"
32063   tmp="$complete EOL"
32064   arguments="${tmp#* }"
32065 
32066   # Input might be given as Windows format, start by converting to
32067   # unix format.
32068   new_path=`$CYGPATH -u "$path"`
32069 
32070   # Now try to locate executable using which
32071   new_path=`$WHICH "$new_path" 2> /dev/null`
32072   # bat and cmd files are not always considered executable in cygwin causing which
32073   # to not find them
32074   if test "x$new_path" = x \
32075       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32076       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32077     new_path=`$CYGPATH -u "$path"`
32078   fi
32079   if test "x$new_path" = x; then
32080     # Oops. Which didn't find the executable.
32081     # The splitting of arguments from the executable at a space might have been incorrect,
32082     # since paths with space are more likely in Windows. Give it another try with the whole
32083     # argument.
32084     path="$complete"
32085     arguments="EOL"
32086     new_path=`$CYGPATH -u "$path"`
32087     new_path=`$WHICH "$new_path" 2> /dev/null`
32088     # bat and cmd files are not always considered executable in cygwin causing which
32089     # to not find them
32090     if test "x$new_path" = x \
32091         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32092         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32093       new_path=`$CYGPATH -u "$path"`
32094     fi
32095     if test "x$new_path" = x; then
32096       # It's still not found. Now this is an unrecoverable error.
32097       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32098 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32099       has_space=`$ECHO "$complete" | $GREP " "`
32100       if test "x$has_space" != x; then
32101         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32102 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32103       fi
32104       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32105     fi
32106   fi
32107 
32108   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32109   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32110   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32111   # "foo.exe" is OK but "foo" is an error.
32112   #
32113   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32114   # It is also a way to make sure we got the proper file name for the real test later on.
32115   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32116   if test "x$test_shortpath" = x; then
32117     # Short path failed, file does not exist as specified.
32118     # Try adding .exe or .cmd
32119     if test -f "${new_path}.exe"; then
32120       input_to_shortpath="${new_path}.exe"
32121     elif test -f "${new_path}.cmd"; then
32122       input_to_shortpath="${new_path}.cmd"
32123     else
32124       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32125 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32126       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32127 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32128       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32129     fi
32130   else
32131     input_to_shortpath="$new_path"
32132   fi
32133 
32134   # Call helper function which possibly converts this using DOS-style short mode.
32135   # If so, the updated path is stored in $new_path.
32136   new_path="$input_to_shortpath"
32137 
32138   input_path="$input_to_shortpath"
32139   # Check if we need to convert this using DOS-style short mode. If the path
32140   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32141   # take no chances and rewrite it.
32142   # Note: m4 eats our [], so we need to use [ and ] instead.
32143   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32144   if test "x$has_forbidden_chars" != x; then
32145     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32146     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32147     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32148     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32149       # Going to short mode and back again did indeed matter. Since short mode is
32150       # case insensitive, let's make it lowercase to improve readability.
32151       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32152       # Now convert it back to Unix-stile (cygpath)
32153       input_path=`$CYGPATH -u "$shortmode_path"`
32154       new_path="$input_path"
32155     fi
32156   fi
32157 
32158   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32159   if test "x$test_cygdrive_prefix" = x; then
32160     # As a simple fix, exclude /usr/bin since it's not a real path.
32161     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32162       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32163       # a path prefixed by /cygdrive for fixpath to work.
32164       new_path="$CYGWIN_ROOT_PATH$input_path"
32165     fi
32166   fi
32167 
32168   # remove trailing .exe if any
32169   new_path="${new_path/%.exe/}"
32170 
32171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32172 
32173   # First separate the path from the arguments. This will split at the first
32174   # space.
32175   complete="$AS"
32176   path="${complete%% *}"
32177   tmp="$complete EOL"
32178   arguments="${tmp#* }"
32179 
32180   # Input might be given as Windows format, start by converting to
32181   # unix format.
32182   new_path="$path"
32183 
32184   windows_path="$new_path"
32185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32186     unix_path=`$CYGPATH -u "$windows_path"`
32187     new_path="$unix_path"
32188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32189     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32190     new_path="$unix_path"
32191   fi
32192 
32193 
32194   # Now try to locate executable using which
32195   new_path=`$WHICH "$new_path" 2> /dev/null`
32196 
32197   if test "x$new_path" = x; then
32198     # Oops. Which didn't find the executable.
32199     # The splitting of arguments from the executable at a space might have been incorrect,
32200     # since paths with space are more likely in Windows. Give it another try with the whole
32201     # argument.
32202     path="$complete"
32203     arguments="EOL"
32204     new_path="$path"
32205 
32206   windows_path="$new_path"
32207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32208     unix_path=`$CYGPATH -u "$windows_path"`
32209     new_path="$unix_path"
32210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32212     new_path="$unix_path"
32213   fi
32214 
32215 
32216     new_path=`$WHICH "$new_path" 2> /dev/null`
32217     # bat and cmd files are not always considered executable in MSYS causing which
32218     # to not find them
32219     if test "x$new_path" = x \
32220         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32221         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32222       new_path="$path"
32223 
32224   windows_path="$new_path"
32225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32226     unix_path=`$CYGPATH -u "$windows_path"`
32227     new_path="$unix_path"
32228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32230     new_path="$unix_path"
32231   fi
32232 
32233     fi
32234 
32235     if test "x$new_path" = x; then
32236       # It's still not found. Now this is an unrecoverable error.
32237       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32238 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32239       has_space=`$ECHO "$complete" | $GREP " "`
32240       if test "x$has_space" != x; then
32241         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32242 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32243       fi
32244       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32245     fi
32246   fi
32247 
32248   # Now new_path has a complete unix path to the binary
32249   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32250     # Keep paths in /bin as-is, but remove trailing .exe if any
32251     new_path="${new_path/%.exe/}"
32252     # Do not save /bin paths to all_fixpath_prefixes!
32253   else
32254     # Not in mixed or Windows style, start by that.
32255     new_path=`cmd //c echo $new_path`
32256 
32257   input_path="$new_path"
32258   # Check if we need to convert this using DOS-style short mode. If the path
32259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32260   # take no chances and rewrite it.
32261   # Note: m4 eats our [], so we need to use [ and ] instead.
32262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32263   if test "x$has_forbidden_chars" != x; then
32264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32265     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32266   fi
32267 
32268     # Output is in $new_path
32269 
32270   windows_path="$new_path"
32271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32272     unix_path=`$CYGPATH -u "$windows_path"`
32273     new_path="$unix_path"
32274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32276     new_path="$unix_path"
32277   fi
32278 
32279     # remove trailing .exe if any
32280     new_path="${new_path/%.exe/}"
32281 
32282     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32283     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32284   fi
32285 
32286   else
32287     # We're on a unix platform. Hooray! :)
32288     # First separate the path from the arguments. This will split at the first
32289     # space.
32290     complete="$AS"
32291     path="${complete%% *}"
32292     tmp="$complete EOL"
32293     arguments="${tmp#* }"
32294 
32295     # Cannot rely on the command "which" here since it doesn't always work.
32296     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32297     if test -z "$is_absolute_path"; then
32298       # Path to executable is not absolute. Find it.
32299       IFS_save="$IFS"
32300       IFS=:
32301       for p in $PATH; do
32302         if test -f "$p/$path" && test -x "$p/$path"; then
32303           new_path="$p/$path"
32304           break
32305         fi
32306       done
32307       IFS="$IFS_save"
32308     else
32309       # This is an absolute path, we can use it without further modifications.
32310       new_path="$path"
32311     fi
32312 
32313     if test "x$new_path" = x; then
32314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32315 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32316       has_space=`$ECHO "$complete" | $GREP " "`
32317       if test "x$has_space" != x; then
32318         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32319 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32320       fi
32321       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32322     fi
32323   fi
32324 
32325   # Now join together the path and the arguments once again
32326   if test "x$arguments" != xEOL; then
32327     new_complete="$new_path ${arguments% *}"
32328   else
32329     new_complete="$new_path"
32330   fi
32331 
32332   if test "x$complete" != "x$new_complete"; then
32333     AS="$new_complete"
32334     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32335 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32336   fi
32337 
32338   else
32339     # FIXME: is this correct for microsoft?
32340     AS="$CC -c"
32341   fi
32342 
32343 
32344   #
32345   # Setup the archiver (AR)
32346   #
32347   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32348     # The corresponding ar tool is lib.exe (used to create static libraries)
32349     # Extract the first word of "lib", so it can be a program name with args.
32350 set dummy lib; ac_word=$2
32351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32352 $as_echo_n "checking for $ac_word... " >&6; }
32353 if ${ac_cv_prog_AR+:} false; then :
32354   $as_echo_n "(cached) " >&6
32355 else
32356   if test -n "$AR"; then
32357   ac_cv_prog_AR="$AR" # Let the user override the test.
32358 else
32359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32360 for as_dir in $PATH
32361 do
32362   IFS=$as_save_IFS
32363   test -z "$as_dir" && as_dir=.
32364     for ac_exec_ext in '' $ac_executable_extensions; do
32365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32366     ac_cv_prog_AR="lib"
32367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32368     break 2
32369   fi
32370 done
32371   done
32372 IFS=$as_save_IFS
32373 
32374 fi
32375 fi
32376 AR=$ac_cv_prog_AR
32377 if test -n "$AR"; then
32378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32379 $as_echo "$AR" >&6; }
32380 else
32381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32382 $as_echo "no" >&6; }
32383 fi
32384 
32385 
32386   else
32387 
32388 
32389   # Publish this variable in the help.
32390 
32391 
32392   if test "x$AR" = x; then
32393     # The variable is not set by user, try to locate tool using the code snippet
32394     if test -n "$ac_tool_prefix"; then
32395   for ac_prog in ar
32396   do
32397     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32398 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32400 $as_echo_n "checking for $ac_word... " >&6; }
32401 if ${ac_cv_prog_AR+:} false; then :
32402   $as_echo_n "(cached) " >&6
32403 else
32404   if test -n "$AR"; then
32405   ac_cv_prog_AR="$AR" # Let the user override the test.
32406 else
32407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32408 for as_dir in $PATH
32409 do
32410   IFS=$as_save_IFS
32411   test -z "$as_dir" && as_dir=.
32412     for ac_exec_ext in '' $ac_executable_extensions; do
32413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32414     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32416     break 2
32417   fi
32418 done
32419   done
32420 IFS=$as_save_IFS
32421 
32422 fi
32423 fi
32424 AR=$ac_cv_prog_AR
32425 if test -n "$AR"; then
32426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32427 $as_echo "$AR" >&6; }
32428 else
32429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32430 $as_echo "no" >&6; }
32431 fi
32432 
32433 
32434     test -n "$AR" && break
32435   done
32436 fi
32437 if test -z "$AR"; then
32438   ac_ct_AR=$AR
32439   for ac_prog in ar
32440 do
32441   # Extract the first word of "$ac_prog", so it can be a program name with args.
32442 set dummy $ac_prog; ac_word=$2
32443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32444 $as_echo_n "checking for $ac_word... " >&6; }
32445 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32446   $as_echo_n "(cached) " >&6
32447 else
32448   if test -n "$ac_ct_AR"; then
32449   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32450 else
32451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32452 for as_dir in $PATH
32453 do
32454   IFS=$as_save_IFS
32455   test -z "$as_dir" && as_dir=.
32456     for ac_exec_ext in '' $ac_executable_extensions; do
32457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32458     ac_cv_prog_ac_ct_AR="$ac_prog"
32459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32460     break 2
32461   fi
32462 done
32463   done
32464 IFS=$as_save_IFS
32465 
32466 fi
32467 fi
32468 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32469 if test -n "$ac_ct_AR"; then
32470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32471 $as_echo "$ac_ct_AR" >&6; }
32472 else
32473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32474 $as_echo "no" >&6; }
32475 fi
32476 
32477 
32478   test -n "$ac_ct_AR" && break
32479 done
32480 
32481   if test "x$ac_ct_AR" = x; then
32482     AR=""
32483   else
32484     case $cross_compiling:$ac_tool_warned in
32485 yes:)
32486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32487 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32488 ac_tool_warned=yes ;;
32489 esac
32490     AR=$ac_ct_AR
32491   fi
32492 fi
32493 
32494   else
32495     # The variable is set, but is it from the command line or the environment?
32496 
32497     # Try to remove the string !AR! from our list.
32498     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32499     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32500       # If it failed, the variable was not from the command line. Ignore it,
32501       # but warn the user (except for BASH, which is always set by the calling BASH).
32502       if test "xAR" != xBASH; then
32503         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32504 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32505       fi
32506       # Try to locate tool using the code snippet
32507       if test -n "$ac_tool_prefix"; then
32508   for ac_prog in ar
32509   do
32510     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32511 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32513 $as_echo_n "checking for $ac_word... " >&6; }
32514 if ${ac_cv_prog_AR+:} false; then :
32515   $as_echo_n "(cached) " >&6
32516 else
32517   if test -n "$AR"; then
32518   ac_cv_prog_AR="$AR" # Let the user override the test.
32519 else
32520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32521 for as_dir in $PATH
32522 do
32523   IFS=$as_save_IFS
32524   test -z "$as_dir" && as_dir=.
32525     for ac_exec_ext in '' $ac_executable_extensions; do
32526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32527     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32529     break 2
32530   fi
32531 done
32532   done
32533 IFS=$as_save_IFS
32534 
32535 fi
32536 fi
32537 AR=$ac_cv_prog_AR
32538 if test -n "$AR"; then
32539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32540 $as_echo "$AR" >&6; }
32541 else
32542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32543 $as_echo "no" >&6; }
32544 fi
32545 
32546 
32547     test -n "$AR" && break
32548   done
32549 fi
32550 if test -z "$AR"; then
32551   ac_ct_AR=$AR
32552   for ac_prog in ar
32553 do
32554   # Extract the first word of "$ac_prog", so it can be a program name with args.
32555 set dummy $ac_prog; ac_word=$2
32556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32557 $as_echo_n "checking for $ac_word... " >&6; }
32558 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32559   $as_echo_n "(cached) " >&6
32560 else
32561   if test -n "$ac_ct_AR"; then
32562   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32563 else
32564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32565 for as_dir in $PATH
32566 do
32567   IFS=$as_save_IFS
32568   test -z "$as_dir" && as_dir=.
32569     for ac_exec_ext in '' $ac_executable_extensions; do
32570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32571     ac_cv_prog_ac_ct_AR="$ac_prog"
32572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32573     break 2
32574   fi
32575 done
32576   done
32577 IFS=$as_save_IFS
32578 
32579 fi
32580 fi
32581 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32582 if test -n "$ac_ct_AR"; then
32583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32584 $as_echo "$ac_ct_AR" >&6; }
32585 else
32586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32587 $as_echo "no" >&6; }
32588 fi
32589 
32590 
32591   test -n "$ac_ct_AR" && break
32592 done
32593 
32594   if test "x$ac_ct_AR" = x; then
32595     AR=""
32596   else
32597     case $cross_compiling:$ac_tool_warned in
32598 yes:)
32599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32600 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32601 ac_tool_warned=yes ;;
32602 esac
32603     AR=$ac_ct_AR
32604   fi
32605 fi
32606 
32607     else
32608       # If it succeeded, then it was overridden by the user. We will use it
32609       # for the tool.
32610 
32611       # First remove it from the list of overridden variables, so we can test
32612       # for unknown variables in the end.
32613       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32614 
32615       # Check if the provided tool contains a complete path.
32616       tool_specified="$AR"
32617       tool_basename="${tool_specified##*/}"
32618       if test "x$tool_basename" = "x$tool_specified"; then
32619         # A command without a complete path is provided, search $PATH.
32620         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32621 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32622         # Extract the first word of "$tool_basename", so it can be a program name with args.
32623 set dummy $tool_basename; ac_word=$2
32624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32625 $as_echo_n "checking for $ac_word... " >&6; }
32626 if ${ac_cv_path_AR+:} false; then :
32627   $as_echo_n "(cached) " >&6
32628 else
32629   case $AR in
32630   [\\/]* | ?:[\\/]*)
32631   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32632   ;;
32633   *)
32634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32635 for as_dir in $PATH
32636 do
32637   IFS=$as_save_IFS
32638   test -z "$as_dir" && as_dir=.
32639     for ac_exec_ext in '' $ac_executable_extensions; do
32640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32641     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32643     break 2
32644   fi
32645 done
32646   done
32647 IFS=$as_save_IFS
32648 
32649   ;;
32650 esac
32651 fi
32652 AR=$ac_cv_path_AR
32653 if test -n "$AR"; then
32654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32655 $as_echo "$AR" >&6; }
32656 else
32657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32658 $as_echo "no" >&6; }
32659 fi
32660 
32661 
32662         if test "x$AR" = x; then
32663           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32664         fi
32665       else
32666         # Otherwise we believe it is a complete path. Use it as it is.
32667         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32668 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32669         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32670 $as_echo_n "checking for AR... " >&6; }
32671         if test ! -x "$tool_specified"; then
32672           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32673 $as_echo "not found" >&6; }
32674           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32675         fi
32676         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32677 $as_echo "$tool_specified" >&6; }
32678       fi
32679     fi
32680   fi
32681 
32682 
32683   fi
32684 
32685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32686 
32687   # First separate the path from the arguments. This will split at the first
32688   # space.
32689   complete="$AR"
32690   path="${complete%% *}"
32691   tmp="$complete EOL"
32692   arguments="${tmp#* }"
32693 
32694   # Input might be given as Windows format, start by converting to
32695   # unix format.
32696   new_path=`$CYGPATH -u "$path"`
32697 
32698   # Now try to locate executable using which
32699   new_path=`$WHICH "$new_path" 2> /dev/null`
32700   # bat and cmd files are not always considered executable in cygwin causing which
32701   # to not find them
32702   if test "x$new_path" = x \
32703       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32704       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32705     new_path=`$CYGPATH -u "$path"`
32706   fi
32707   if test "x$new_path" = x; then
32708     # Oops. Which didn't find the executable.
32709     # The splitting of arguments from the executable at a space might have been incorrect,
32710     # since paths with space are more likely in Windows. Give it another try with the whole
32711     # argument.
32712     path="$complete"
32713     arguments="EOL"
32714     new_path=`$CYGPATH -u "$path"`
32715     new_path=`$WHICH "$new_path" 2> /dev/null`
32716     # bat and cmd files are not always considered executable in cygwin causing which
32717     # to not find them
32718     if test "x$new_path" = x \
32719         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32720         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32721       new_path=`$CYGPATH -u "$path"`
32722     fi
32723     if test "x$new_path" = x; then
32724       # It's still not found. Now this is an unrecoverable error.
32725       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32726 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32727       has_space=`$ECHO "$complete" | $GREP " "`
32728       if test "x$has_space" != x; then
32729         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32730 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32731       fi
32732       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32733     fi
32734   fi
32735 
32736   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32737   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32738   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32739   # "foo.exe" is OK but "foo" is an error.
32740   #
32741   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32742   # It is also a way to make sure we got the proper file name for the real test later on.
32743   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32744   if test "x$test_shortpath" = x; then
32745     # Short path failed, file does not exist as specified.
32746     # Try adding .exe or .cmd
32747     if test -f "${new_path}.exe"; then
32748       input_to_shortpath="${new_path}.exe"
32749     elif test -f "${new_path}.cmd"; then
32750       input_to_shortpath="${new_path}.cmd"
32751     else
32752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32753 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32754       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32755 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32756       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32757     fi
32758   else
32759     input_to_shortpath="$new_path"
32760   fi
32761 
32762   # Call helper function which possibly converts this using DOS-style short mode.
32763   # If so, the updated path is stored in $new_path.
32764   new_path="$input_to_shortpath"
32765 
32766   input_path="$input_to_shortpath"
32767   # Check if we need to convert this using DOS-style short mode. If the path
32768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32769   # take no chances and rewrite it.
32770   # Note: m4 eats our [], so we need to use [ and ] instead.
32771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32772   if test "x$has_forbidden_chars" != x; then
32773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32774     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32775     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32776     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32777       # Going to short mode and back again did indeed matter. Since short mode is
32778       # case insensitive, let's make it lowercase to improve readability.
32779       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32780       # Now convert it back to Unix-stile (cygpath)
32781       input_path=`$CYGPATH -u "$shortmode_path"`
32782       new_path="$input_path"
32783     fi
32784   fi
32785 
32786   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32787   if test "x$test_cygdrive_prefix" = x; then
32788     # As a simple fix, exclude /usr/bin since it's not a real path.
32789     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32790       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32791       # a path prefixed by /cygdrive for fixpath to work.
32792       new_path="$CYGWIN_ROOT_PATH$input_path"
32793     fi
32794   fi
32795 
32796   # remove trailing .exe if any
32797   new_path="${new_path/%.exe/}"
32798 
32799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32800 
32801   # First separate the path from the arguments. This will split at the first
32802   # space.
32803   complete="$AR"
32804   path="${complete%% *}"
32805   tmp="$complete EOL"
32806   arguments="${tmp#* }"
32807 
32808   # Input might be given as Windows format, start by converting to
32809   # unix format.
32810   new_path="$path"
32811 
32812   windows_path="$new_path"
32813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32814     unix_path=`$CYGPATH -u "$windows_path"`
32815     new_path="$unix_path"
32816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32818     new_path="$unix_path"
32819   fi
32820 
32821 
32822   # Now try to locate executable using which
32823   new_path=`$WHICH "$new_path" 2> /dev/null`
32824 
32825   if test "x$new_path" = x; then
32826     # Oops. Which didn't find the executable.
32827     # The splitting of arguments from the executable at a space might have been incorrect,
32828     # since paths with space are more likely in Windows. Give it another try with the whole
32829     # argument.
32830     path="$complete"
32831     arguments="EOL"
32832     new_path="$path"
32833 
32834   windows_path="$new_path"
32835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32836     unix_path=`$CYGPATH -u "$windows_path"`
32837     new_path="$unix_path"
32838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32840     new_path="$unix_path"
32841   fi
32842 
32843 
32844     new_path=`$WHICH "$new_path" 2> /dev/null`
32845     # bat and cmd files are not always considered executable in MSYS causing which
32846     # to not find them
32847     if test "x$new_path" = x \
32848         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32849         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32850       new_path="$path"
32851 
32852   windows_path="$new_path"
32853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32854     unix_path=`$CYGPATH -u "$windows_path"`
32855     new_path="$unix_path"
32856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32858     new_path="$unix_path"
32859   fi
32860 
32861     fi
32862 
32863     if test "x$new_path" = x; then
32864       # It's still not found. Now this is an unrecoverable error.
32865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32866 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32867       has_space=`$ECHO "$complete" | $GREP " "`
32868       if test "x$has_space" != x; then
32869         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32870 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32871       fi
32872       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32873     fi
32874   fi
32875 
32876   # Now new_path has a complete unix path to the binary
32877   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32878     # Keep paths in /bin as-is, but remove trailing .exe if any
32879     new_path="${new_path/%.exe/}"
32880     # Do not save /bin paths to all_fixpath_prefixes!
32881   else
32882     # Not in mixed or Windows style, start by that.
32883     new_path=`cmd //c echo $new_path`
32884 
32885   input_path="$new_path"
32886   # Check if we need to convert this using DOS-style short mode. If the path
32887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32888   # take no chances and rewrite it.
32889   # Note: m4 eats our [], so we need to use [ and ] instead.
32890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32891   if test "x$has_forbidden_chars" != x; then
32892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32893     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32894   fi
32895 
32896     # Output is in $new_path
32897 
32898   windows_path="$new_path"
32899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32900     unix_path=`$CYGPATH -u "$windows_path"`
32901     new_path="$unix_path"
32902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32904     new_path="$unix_path"
32905   fi
32906 
32907     # remove trailing .exe if any
32908     new_path="${new_path/%.exe/}"
32909 
32910     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32911     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32912   fi
32913 
32914   else
32915     # We're on a unix platform. Hooray! :)
32916     # First separate the path from the arguments. This will split at the first
32917     # space.
32918     complete="$AR"
32919     path="${complete%% *}"
32920     tmp="$complete EOL"
32921     arguments="${tmp#* }"
32922 
32923     # Cannot rely on the command "which" here since it doesn't always work.
32924     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32925     if test -z "$is_absolute_path"; then
32926       # Path to executable is not absolute. Find it.
32927       IFS_save="$IFS"
32928       IFS=:
32929       for p in $PATH; do
32930         if test -f "$p/$path" && test -x "$p/$path"; then
32931           new_path="$p/$path"
32932           break
32933         fi
32934       done
32935       IFS="$IFS_save"
32936     else
32937       # This is an absolute path, we can use it without further modifications.
32938       new_path="$path"
32939     fi
32940 
32941     if test "x$new_path" = x; then
32942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32943 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32944       has_space=`$ECHO "$complete" | $GREP " "`
32945       if test "x$has_space" != x; then
32946         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32947 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32948       fi
32949       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32950     fi
32951   fi
32952 
32953   # Now join together the path and the arguments once again
32954   if test "x$arguments" != xEOL; then
32955     new_complete="$new_path ${arguments% *}"
32956   else
32957     new_complete="$new_path"
32958   fi
32959 
32960   if test "x$complete" != "x$new_complete"; then
32961     AR="$new_complete"
32962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32963 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32964   fi
32965 
32966 
32967 
32968   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32969     ac_ext=m
32970 ac_cpp='$OBJCPP $CPPFLAGS'
32971 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32972 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32973 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32974 if test -n "$ac_tool_prefix"; then
32975   for ac_prog in gcc objcc objc cc CC
32976   do
32977     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32978 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32980 $as_echo_n "checking for $ac_word... " >&6; }
32981 if ${ac_cv_prog_OBJC+:} false; then :
32982   $as_echo_n "(cached) " >&6
32983 else
32984   if test -n "$OBJC"; then
32985   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32986 else
32987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32988 for as_dir in $PATH
32989 do
32990   IFS=$as_save_IFS
32991   test -z "$as_dir" && as_dir=.
32992     for ac_exec_ext in '' $ac_executable_extensions; do
32993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32994     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32996     break 2
32997   fi
32998 done
32999   done
33000 IFS=$as_save_IFS
33001 
33002 fi
33003 fi
33004 OBJC=$ac_cv_prog_OBJC
33005 if test -n "$OBJC"; then
33006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33007 $as_echo "$OBJC" >&6; }
33008 else
33009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33010 $as_echo "no" >&6; }
33011 fi
33012 
33013 
33014     test -n "$OBJC" && break
33015   done
33016 fi
33017 if test -z "$OBJC"; then
33018   ac_ct_OBJC=$OBJC
33019   for ac_prog in gcc objcc objc cc CC
33020 do
33021   # Extract the first word of "$ac_prog", so it can be a program name with args.
33022 set dummy $ac_prog; ac_word=$2
33023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33024 $as_echo_n "checking for $ac_word... " >&6; }
33025 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33026   $as_echo_n "(cached) " >&6
33027 else
33028   if test -n "$ac_ct_OBJC"; then
33029   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33030 else
33031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33032 for as_dir in $PATH
33033 do
33034   IFS=$as_save_IFS
33035   test -z "$as_dir" && as_dir=.
33036     for ac_exec_ext in '' $ac_executable_extensions; do
33037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33038     ac_cv_prog_ac_ct_OBJC="$ac_prog"
33039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33040     break 2
33041   fi
33042 done
33043   done
33044 IFS=$as_save_IFS
33045 
33046 fi
33047 fi
33048 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33049 if test -n "$ac_ct_OBJC"; then
33050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33051 $as_echo "$ac_ct_OBJC" >&6; }
33052 else
33053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33054 $as_echo "no" >&6; }
33055 fi
33056 
33057 
33058   test -n "$ac_ct_OBJC" && break
33059 done
33060 
33061   if test "x$ac_ct_OBJC" = x; then
33062     OBJC="gcc"
33063   else
33064     case $cross_compiling:$ac_tool_warned in
33065 yes:)
33066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33067 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33068 ac_tool_warned=yes ;;
33069 esac
33070     OBJC=$ac_ct_OBJC
33071   fi
33072 fi
33073 
33074 # Provide some information about the compiler.
33075 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33076 set X $ac_compile
33077 ac_compiler=$2
33078 for ac_option in --version -v -V -qversion; do
33079   { { ac_try="$ac_compiler $ac_option >&5"
33080 case "(($ac_try" in
33081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33082   *) ac_try_echo=$ac_try;;
33083 esac
33084 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33085 $as_echo "$ac_try_echo"; } >&5
33086   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33087   ac_status=$?
33088   if test -s conftest.err; then
33089     sed '10a\
33090 ... rest of stderr output deleted ...
33091          10q' conftest.err >conftest.er1
33092     cat conftest.er1 >&5
33093   fi
33094   rm -f conftest.er1 conftest.err
33095   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33096   test $ac_status = 0; }
33097 done
33098 
33099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33100 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33101 if ${ac_cv_objc_compiler_gnu+:} false; then :
33102   $as_echo_n "(cached) " >&6
33103 else
33104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33105 /* end confdefs.h.  */
33106 
33107 int
33108 main ()
33109 {
33110 #ifndef __GNUC__
33111        choke me
33112 #endif
33113 
33114   ;
33115   return 0;
33116 }
33117 _ACEOF
33118 if ac_fn_objc_try_compile "$LINENO"; then :
33119   ac_compiler_gnu=yes
33120 else
33121   ac_compiler_gnu=no
33122 fi
33123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33124 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33125 
33126 fi
33127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33128 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33129 if test $ac_compiler_gnu = yes; then
33130   GOBJC=yes
33131 else
33132   GOBJC=
33133 fi
33134 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33135 ac_save_OBJCFLAGS=$OBJCFLAGS
33136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33137 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33138 if ${ac_cv_prog_objc_g+:} false; then :
33139   $as_echo_n "(cached) " >&6
33140 else
33141   ac_save_objc_werror_flag=$ac_objc_werror_flag
33142    ac_objc_werror_flag=yes
33143    ac_cv_prog_objc_g=no
33144    OBJCFLAGS="-g"
33145    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33146 /* end confdefs.h.  */
33147 
33148 int
33149 main ()
33150 {
33151 
33152   ;
33153   return 0;
33154 }
33155 _ACEOF
33156 if ac_fn_objc_try_compile "$LINENO"; then :
33157   ac_cv_prog_objc_g=yes
33158 else
33159   OBJCFLAGS=""
33160       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33161 /* end confdefs.h.  */
33162 
33163 int
33164 main ()
33165 {
33166 
33167   ;
33168   return 0;
33169 }
33170 _ACEOF
33171 if ac_fn_objc_try_compile "$LINENO"; then :
33172 
33173 else
33174   ac_objc_werror_flag=$ac_save_objc_werror_flag
33175          OBJCFLAGS="-g"
33176          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33177 /* end confdefs.h.  */
33178 
33179 int
33180 main ()
33181 {
33182 
33183   ;
33184   return 0;
33185 }
33186 _ACEOF
33187 if ac_fn_objc_try_compile "$LINENO"; then :
33188   ac_cv_prog_objc_g=yes
33189 fi
33190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33191 fi
33192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33193 fi
33194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33195    ac_objc_werror_flag=$ac_save_objc_werror_flag
33196 fi
33197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33198 $as_echo "$ac_cv_prog_objc_g" >&6; }
33199 if test "$ac_test_OBJCFLAGS" = set; then
33200   OBJCFLAGS=$ac_save_OBJCFLAGS
33201 elif test $ac_cv_prog_objc_g = yes; then
33202   if test "$GOBJC" = yes; then
33203     OBJCFLAGS="-g -O2"
33204   else
33205     OBJCFLAGS="-g"
33206   fi
33207 else
33208   if test "$GOBJC" = yes; then
33209     OBJCFLAGS="-O2"
33210   else
33211     OBJCFLAGS=
33212   fi
33213 fi
33214 ac_ext=cpp
33215 ac_cpp='$CXXCPP $CPPFLAGS'
33216 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33217 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33218 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33219 
33220 
33221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33222 
33223   # First separate the path from the arguments. This will split at the first
33224   # space.
33225   complete="$OBJC"
33226   path="${complete%% *}"
33227   tmp="$complete EOL"
33228   arguments="${tmp#* }"
33229 
33230   # Input might be given as Windows format, start by converting to
33231   # unix format.
33232   new_path=`$CYGPATH -u "$path"`
33233 
33234   # Now try to locate executable using which
33235   new_path=`$WHICH "$new_path" 2> /dev/null`
33236   # bat and cmd files are not always considered executable in cygwin causing which
33237   # to not find them
33238   if test "x$new_path" = x \
33239       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33240       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33241     new_path=`$CYGPATH -u "$path"`
33242   fi
33243   if test "x$new_path" = x; then
33244     # Oops. Which didn't find the executable.
33245     # The splitting of arguments from the executable at a space might have been incorrect,
33246     # since paths with space are more likely in Windows. Give it another try with the whole
33247     # argument.
33248     path="$complete"
33249     arguments="EOL"
33250     new_path=`$CYGPATH -u "$path"`
33251     new_path=`$WHICH "$new_path" 2> /dev/null`
33252     # bat and cmd files are not always considered executable in cygwin causing which
33253     # to not find them
33254     if test "x$new_path" = x \
33255         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33256         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33257       new_path=`$CYGPATH -u "$path"`
33258     fi
33259     if test "x$new_path" = x; then
33260       # It's still not found. Now this is an unrecoverable error.
33261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33262 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33263       has_space=`$ECHO "$complete" | $GREP " "`
33264       if test "x$has_space" != x; then
33265         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33266 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33267       fi
33268       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33269     fi
33270   fi
33271 
33272   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33273   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33274   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33275   # "foo.exe" is OK but "foo" is an error.
33276   #
33277   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33278   # It is also a way to make sure we got the proper file name for the real test later on.
33279   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33280   if test "x$test_shortpath" = x; then
33281     # Short path failed, file does not exist as specified.
33282     # Try adding .exe or .cmd
33283     if test -f "${new_path}.exe"; then
33284       input_to_shortpath="${new_path}.exe"
33285     elif test -f "${new_path}.cmd"; then
33286       input_to_shortpath="${new_path}.cmd"
33287     else
33288       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33289 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33290       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33291 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33292       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33293     fi
33294   else
33295     input_to_shortpath="$new_path"
33296   fi
33297 
33298   # Call helper function which possibly converts this using DOS-style short mode.
33299   # If so, the updated path is stored in $new_path.
33300   new_path="$input_to_shortpath"
33301 
33302   input_path="$input_to_shortpath"
33303   # Check if we need to convert this using DOS-style short mode. If the path
33304   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33305   # take no chances and rewrite it.
33306   # Note: m4 eats our [], so we need to use [ and ] instead.
33307   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33308   if test "x$has_forbidden_chars" != x; then
33309     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33310     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33311     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33312     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33313       # Going to short mode and back again did indeed matter. Since short mode is
33314       # case insensitive, let's make it lowercase to improve readability.
33315       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33316       # Now convert it back to Unix-stile (cygpath)
33317       input_path=`$CYGPATH -u "$shortmode_path"`
33318       new_path="$input_path"
33319     fi
33320   fi
33321 
33322   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33323   if test "x$test_cygdrive_prefix" = x; then
33324     # As a simple fix, exclude /usr/bin since it's not a real path.
33325     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33326       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33327       # a path prefixed by /cygdrive for fixpath to work.
33328       new_path="$CYGWIN_ROOT_PATH$input_path"
33329     fi
33330   fi
33331 
33332   # remove trailing .exe if any
33333   new_path="${new_path/%.exe/}"
33334 
33335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33336 
33337   # First separate the path from the arguments. This will split at the first
33338   # space.
33339   complete="$OBJC"
33340   path="${complete%% *}"
33341   tmp="$complete EOL"
33342   arguments="${tmp#* }"
33343 
33344   # Input might be given as Windows format, start by converting to
33345   # unix format.
33346   new_path="$path"
33347 
33348   windows_path="$new_path"
33349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33350     unix_path=`$CYGPATH -u "$windows_path"`
33351     new_path="$unix_path"
33352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33353     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33354     new_path="$unix_path"
33355   fi
33356 
33357 
33358   # Now try to locate executable using which
33359   new_path=`$WHICH "$new_path" 2> /dev/null`
33360 
33361   if test "x$new_path" = x; then
33362     # Oops. Which didn't find the executable.
33363     # The splitting of arguments from the executable at a space might have been incorrect,
33364     # since paths with space are more likely in Windows. Give it another try with the whole
33365     # argument.
33366     path="$complete"
33367     arguments="EOL"
33368     new_path="$path"
33369 
33370   windows_path="$new_path"
33371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33372     unix_path=`$CYGPATH -u "$windows_path"`
33373     new_path="$unix_path"
33374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33376     new_path="$unix_path"
33377   fi
33378 
33379 
33380     new_path=`$WHICH "$new_path" 2> /dev/null`
33381     # bat and cmd files are not always considered executable in MSYS causing which
33382     # to not find them
33383     if test "x$new_path" = x \
33384         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33385         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33386       new_path="$path"
33387 
33388   windows_path="$new_path"
33389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390     unix_path=`$CYGPATH -u "$windows_path"`
33391     new_path="$unix_path"
33392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33394     new_path="$unix_path"
33395   fi
33396 
33397     fi
33398 
33399     if test "x$new_path" = x; then
33400       # It's still not found. Now this is an unrecoverable error.
33401       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33402 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33403       has_space=`$ECHO "$complete" | $GREP " "`
33404       if test "x$has_space" != x; then
33405         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33406 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33407       fi
33408       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33409     fi
33410   fi
33411 
33412   # Now new_path has a complete unix path to the binary
33413   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33414     # Keep paths in /bin as-is, but remove trailing .exe if any
33415     new_path="${new_path/%.exe/}"
33416     # Do not save /bin paths to all_fixpath_prefixes!
33417   else
33418     # Not in mixed or Windows style, start by that.
33419     new_path=`cmd //c echo $new_path`
33420 
33421   input_path="$new_path"
33422   # Check if we need to convert this using DOS-style short mode. If the path
33423   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33424   # take no chances and rewrite it.
33425   # Note: m4 eats our [], so we need to use [ and ] instead.
33426   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33427   if test "x$has_forbidden_chars" != x; then
33428     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33429     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33430   fi
33431 
33432     # Output is in $new_path
33433 
33434   windows_path="$new_path"
33435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33436     unix_path=`$CYGPATH -u "$windows_path"`
33437     new_path="$unix_path"
33438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33440     new_path="$unix_path"
33441   fi
33442 
33443     # remove trailing .exe if any
33444     new_path="${new_path/%.exe/}"
33445 
33446     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33447     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33448   fi
33449 
33450   else
33451     # We're on a unix platform. Hooray! :)
33452     # First separate the path from the arguments. This will split at the first
33453     # space.
33454     complete="$OBJC"
33455     path="${complete%% *}"
33456     tmp="$complete EOL"
33457     arguments="${tmp#* }"
33458 
33459     # Cannot rely on the command "which" here since it doesn't always work.
33460     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33461     if test -z "$is_absolute_path"; then
33462       # Path to executable is not absolute. Find it.
33463       IFS_save="$IFS"
33464       IFS=:
33465       for p in $PATH; do
33466         if test -f "$p/$path" && test -x "$p/$path"; then
33467           new_path="$p/$path"
33468           break
33469         fi
33470       done
33471       IFS="$IFS_save"
33472     else
33473       # This is an absolute path, we can use it without further modifications.
33474       new_path="$path"
33475     fi
33476 
33477     if test "x$new_path" = x; then
33478       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33479 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33480       has_space=`$ECHO "$complete" | $GREP " "`
33481       if test "x$has_space" != x; then
33482         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33483 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33484       fi
33485       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33486     fi
33487   fi
33488 
33489   # Now join together the path and the arguments once again
33490   if test "x$arguments" != xEOL; then
33491     new_complete="$new_path ${arguments% *}"
33492   else
33493     new_complete="$new_path"
33494   fi
33495 
33496   if test "x$complete" != "x$new_complete"; then
33497     OBJC="$new_complete"
33498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33499 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33500   fi
33501 
33502 
33503 
33504   # Publish this variable in the help.
33505 
33506 
33507   if test "x$LIPO" = x; then
33508     # The variable is not set by user, try to locate tool using the code snippet
33509     for ac_prog in lipo
33510 do
33511   # Extract the first word of "$ac_prog", so it can be a program name with args.
33512 set dummy $ac_prog; ac_word=$2
33513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33514 $as_echo_n "checking for $ac_word... " >&6; }
33515 if ${ac_cv_path_LIPO+:} false; then :
33516   $as_echo_n "(cached) " >&6
33517 else
33518   case $LIPO in
33519   [\\/]* | ?:[\\/]*)
33520   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33521   ;;
33522   *)
33523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33524 for as_dir in $PATH
33525 do
33526   IFS=$as_save_IFS
33527   test -z "$as_dir" && as_dir=.
33528     for ac_exec_ext in '' $ac_executable_extensions; do
33529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33530     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33532     break 2
33533   fi
33534 done
33535   done
33536 IFS=$as_save_IFS
33537 
33538   ;;
33539 esac
33540 fi
33541 LIPO=$ac_cv_path_LIPO
33542 if test -n "$LIPO"; then
33543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33544 $as_echo "$LIPO" >&6; }
33545 else
33546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33547 $as_echo "no" >&6; }
33548 fi
33549 
33550 
33551   test -n "$LIPO" && break
33552 done
33553 
33554   else
33555     # The variable is set, but is it from the command line or the environment?
33556 
33557     # Try to remove the string !LIPO! from our list.
33558     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33559     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33560       # If it failed, the variable was not from the command line. Ignore it,
33561       # but warn the user (except for BASH, which is always set by the calling BASH).
33562       if test "xLIPO" != xBASH; then
33563         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33564 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33565       fi
33566       # Try to locate tool using the code snippet
33567       for ac_prog in lipo
33568 do
33569   # Extract the first word of "$ac_prog", so it can be a program name with args.
33570 set dummy $ac_prog; ac_word=$2
33571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33572 $as_echo_n "checking for $ac_word... " >&6; }
33573 if ${ac_cv_path_LIPO+:} false; then :
33574   $as_echo_n "(cached) " >&6
33575 else
33576   case $LIPO in
33577   [\\/]* | ?:[\\/]*)
33578   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33579   ;;
33580   *)
33581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33582 for as_dir in $PATH
33583 do
33584   IFS=$as_save_IFS
33585   test -z "$as_dir" && as_dir=.
33586     for ac_exec_ext in '' $ac_executable_extensions; do
33587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33588     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33590     break 2
33591   fi
33592 done
33593   done
33594 IFS=$as_save_IFS
33595 
33596   ;;
33597 esac
33598 fi
33599 LIPO=$ac_cv_path_LIPO
33600 if test -n "$LIPO"; then
33601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33602 $as_echo "$LIPO" >&6; }
33603 else
33604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33605 $as_echo "no" >&6; }
33606 fi
33607 
33608 
33609   test -n "$LIPO" && break
33610 done
33611 
33612     else
33613       # If it succeeded, then it was overridden by the user. We will use it
33614       # for the tool.
33615 
33616       # First remove it from the list of overridden variables, so we can test
33617       # for unknown variables in the end.
33618       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33619 
33620       # Check if the provided tool contains a complete path.
33621       tool_specified="$LIPO"
33622       tool_basename="${tool_specified##*/}"
33623       if test "x$tool_basename" = "x$tool_specified"; then
33624         # A command without a complete path is provided, search $PATH.
33625         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33626 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33627         # Extract the first word of "$tool_basename", so it can be a program name with args.
33628 set dummy $tool_basename; ac_word=$2
33629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33630 $as_echo_n "checking for $ac_word... " >&6; }
33631 if ${ac_cv_path_LIPO+:} false; then :
33632   $as_echo_n "(cached) " >&6
33633 else
33634   case $LIPO in
33635   [\\/]* | ?:[\\/]*)
33636   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33637   ;;
33638   *)
33639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33640 for as_dir in $PATH
33641 do
33642   IFS=$as_save_IFS
33643   test -z "$as_dir" && as_dir=.
33644     for ac_exec_ext in '' $ac_executable_extensions; do
33645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33646     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33648     break 2
33649   fi
33650 done
33651   done
33652 IFS=$as_save_IFS
33653 
33654   ;;
33655 esac
33656 fi
33657 LIPO=$ac_cv_path_LIPO
33658 if test -n "$LIPO"; then
33659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33660 $as_echo "$LIPO" >&6; }
33661 else
33662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33663 $as_echo "no" >&6; }
33664 fi
33665 
33666 
33667         if test "x$LIPO" = x; then
33668           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33669         fi
33670       else
33671         # Otherwise we believe it is a complete path. Use it as it is.
33672         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33673 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33674         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33675 $as_echo_n "checking for LIPO... " >&6; }
33676         if test ! -x "$tool_specified"; then
33677           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33678 $as_echo "not found" >&6; }
33679           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33680         fi
33681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33682 $as_echo "$tool_specified" >&6; }
33683       fi
33684     fi
33685   fi
33686 
33687 
33688 
33689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33690 
33691   # First separate the path from the arguments. This will split at the first
33692   # space.
33693   complete="$LIPO"
33694   path="${complete%% *}"
33695   tmp="$complete EOL"
33696   arguments="${tmp#* }"
33697 
33698   # Input might be given as Windows format, start by converting to
33699   # unix format.
33700   new_path=`$CYGPATH -u "$path"`
33701 
33702   # Now try to locate executable using which
33703   new_path=`$WHICH "$new_path" 2> /dev/null`
33704   # bat and cmd files are not always considered executable in cygwin causing which
33705   # to not find them
33706   if test "x$new_path" = x \
33707       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33708       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33709     new_path=`$CYGPATH -u "$path"`
33710   fi
33711   if test "x$new_path" = x; then
33712     # Oops. Which didn't find the executable.
33713     # The splitting of arguments from the executable at a space might have been incorrect,
33714     # since paths with space are more likely in Windows. Give it another try with the whole
33715     # argument.
33716     path="$complete"
33717     arguments="EOL"
33718     new_path=`$CYGPATH -u "$path"`
33719     new_path=`$WHICH "$new_path" 2> /dev/null`
33720     # bat and cmd files are not always considered executable in cygwin causing which
33721     # to not find them
33722     if test "x$new_path" = x \
33723         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33724         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33725       new_path=`$CYGPATH -u "$path"`
33726     fi
33727     if test "x$new_path" = x; then
33728       # It's still not found. Now this is an unrecoverable error.
33729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33730 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33731       has_space=`$ECHO "$complete" | $GREP " "`
33732       if test "x$has_space" != x; then
33733         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33734 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33735       fi
33736       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33737     fi
33738   fi
33739 
33740   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33741   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33742   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33743   # "foo.exe" is OK but "foo" is an error.
33744   #
33745   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33746   # It is also a way to make sure we got the proper file name for the real test later on.
33747   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33748   if test "x$test_shortpath" = x; then
33749     # Short path failed, file does not exist as specified.
33750     # Try adding .exe or .cmd
33751     if test -f "${new_path}.exe"; then
33752       input_to_shortpath="${new_path}.exe"
33753     elif test -f "${new_path}.cmd"; then
33754       input_to_shortpath="${new_path}.cmd"
33755     else
33756       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33757 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33758       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33759 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33760       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33761     fi
33762   else
33763     input_to_shortpath="$new_path"
33764   fi
33765 
33766   # Call helper function which possibly converts this using DOS-style short mode.
33767   # If so, the updated path is stored in $new_path.
33768   new_path="$input_to_shortpath"
33769 
33770   input_path="$input_to_shortpath"
33771   # Check if we need to convert this using DOS-style short mode. If the path
33772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33773   # take no chances and rewrite it.
33774   # Note: m4 eats our [], so we need to use [ and ] instead.
33775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33776   if test "x$has_forbidden_chars" != x; then
33777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33778     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33779     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33780     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33781       # Going to short mode and back again did indeed matter. Since short mode is
33782       # case insensitive, let's make it lowercase to improve readability.
33783       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33784       # Now convert it back to Unix-stile (cygpath)
33785       input_path=`$CYGPATH -u "$shortmode_path"`
33786       new_path="$input_path"
33787     fi
33788   fi
33789 
33790   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33791   if test "x$test_cygdrive_prefix" = x; then
33792     # As a simple fix, exclude /usr/bin since it's not a real path.
33793     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33794       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33795       # a path prefixed by /cygdrive for fixpath to work.
33796       new_path="$CYGWIN_ROOT_PATH$input_path"
33797     fi
33798   fi
33799 
33800   # remove trailing .exe if any
33801   new_path="${new_path/%.exe/}"
33802 
33803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33804 
33805   # First separate the path from the arguments. This will split at the first
33806   # space.
33807   complete="$LIPO"
33808   path="${complete%% *}"
33809   tmp="$complete EOL"
33810   arguments="${tmp#* }"
33811 
33812   # Input might be given as Windows format, start by converting to
33813   # unix format.
33814   new_path="$path"
33815 
33816   windows_path="$new_path"
33817   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33818     unix_path=`$CYGPATH -u "$windows_path"`
33819     new_path="$unix_path"
33820   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33821     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33822     new_path="$unix_path"
33823   fi
33824 
33825 
33826   # Now try to locate executable using which
33827   new_path=`$WHICH "$new_path" 2> /dev/null`
33828 
33829   if test "x$new_path" = x; then
33830     # Oops. Which didn't find the executable.
33831     # The splitting of arguments from the executable at a space might have been incorrect,
33832     # since paths with space are more likely in Windows. Give it another try with the whole
33833     # argument.
33834     path="$complete"
33835     arguments="EOL"
33836     new_path="$path"
33837 
33838   windows_path="$new_path"
33839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33840     unix_path=`$CYGPATH -u "$windows_path"`
33841     new_path="$unix_path"
33842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33844     new_path="$unix_path"
33845   fi
33846 
33847 
33848     new_path=`$WHICH "$new_path" 2> /dev/null`
33849     # bat and cmd files are not always considered executable in MSYS causing which
33850     # to not find them
33851     if test "x$new_path" = x \
33852         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33853         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33854       new_path="$path"
33855 
33856   windows_path="$new_path"
33857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33858     unix_path=`$CYGPATH -u "$windows_path"`
33859     new_path="$unix_path"
33860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33862     new_path="$unix_path"
33863   fi
33864 
33865     fi
33866 
33867     if test "x$new_path" = x; then
33868       # It's still not found. Now this is an unrecoverable error.
33869       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33870 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33871       has_space=`$ECHO "$complete" | $GREP " "`
33872       if test "x$has_space" != x; then
33873         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33874 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33875       fi
33876       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33877     fi
33878   fi
33879 
33880   # Now new_path has a complete unix path to the binary
33881   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33882     # Keep paths in /bin as-is, but remove trailing .exe if any
33883     new_path="${new_path/%.exe/}"
33884     # Do not save /bin paths to all_fixpath_prefixes!
33885   else
33886     # Not in mixed or Windows style, start by that.
33887     new_path=`cmd //c echo $new_path`
33888 
33889   input_path="$new_path"
33890   # Check if we need to convert this using DOS-style short mode. If the path
33891   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33892   # take no chances and rewrite it.
33893   # Note: m4 eats our [], so we need to use [ and ] instead.
33894   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33895   if test "x$has_forbidden_chars" != x; then
33896     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33897     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33898   fi
33899 
33900     # Output is in $new_path
33901 
33902   windows_path="$new_path"
33903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33904     unix_path=`$CYGPATH -u "$windows_path"`
33905     new_path="$unix_path"
33906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33908     new_path="$unix_path"
33909   fi
33910 
33911     # remove trailing .exe if any
33912     new_path="${new_path/%.exe/}"
33913 
33914     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33915     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33916   fi
33917 
33918   else
33919     # We're on a unix platform. Hooray! :)
33920     # First separate the path from the arguments. This will split at the first
33921     # space.
33922     complete="$LIPO"
33923     path="${complete%% *}"
33924     tmp="$complete EOL"
33925     arguments="${tmp#* }"
33926 
33927     # Cannot rely on the command "which" here since it doesn't always work.
33928     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33929     if test -z "$is_absolute_path"; then
33930       # Path to executable is not absolute. Find it.
33931       IFS_save="$IFS"
33932       IFS=:
33933       for p in $PATH; do
33934         if test -f "$p/$path" && test -x "$p/$path"; then
33935           new_path="$p/$path"
33936           break
33937         fi
33938       done
33939       IFS="$IFS_save"
33940     else
33941       # This is an absolute path, we can use it without further modifications.
33942       new_path="$path"
33943     fi
33944 
33945     if test "x$new_path" = x; then
33946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33947 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33948       has_space=`$ECHO "$complete" | $GREP " "`
33949       if test "x$has_space" != x; then
33950         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33951 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33952       fi
33953       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33954     fi
33955   fi
33956 
33957   # Now join together the path and the arguments once again
33958   if test "x$arguments" != xEOL; then
33959     new_complete="$new_path ${arguments% *}"
33960   else
33961     new_complete="$new_path"
33962   fi
33963 
33964   if test "x$complete" != "x$new_complete"; then
33965     LIPO="$new_complete"
33966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33967 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33968   fi
33969 
33970   else
33971     OBJC=
33972   fi
33973 
33974   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33975     # Extract the first word of "mt", so it can be a program name with args.
33976 set dummy mt; ac_word=$2
33977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33978 $as_echo_n "checking for $ac_word... " >&6; }
33979 if ${ac_cv_prog_MT+:} false; then :
33980   $as_echo_n "(cached) " >&6
33981 else
33982   if test -n "$MT"; then
33983   ac_cv_prog_MT="$MT" # Let the user override the test.
33984 else
33985   ac_prog_rejected=no
33986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33987 for as_dir in $PATH
33988 do
33989   IFS=$as_save_IFS
33990   test -z "$as_dir" && as_dir=.
33991     for ac_exec_ext in '' $ac_executable_extensions; do
33992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33993     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33994        ac_prog_rejected=yes
33995        continue
33996      fi
33997     ac_cv_prog_MT="mt"
33998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33999     break 2
34000   fi
34001 done
34002   done
34003 IFS=$as_save_IFS
34004 
34005 if test $ac_prog_rejected = yes; then
34006   # We found a bogon in the path, so make sure we never use it.
34007   set dummy $ac_cv_prog_MT
34008   shift
34009   if test $# != 0; then
34010     # We chose a different compiler from the bogus one.
34011     # However, it has the same basename, so the bogon will be chosen
34012     # first if we set MT to just the basename; use the full file name.
34013     shift
34014     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34015   fi
34016 fi
34017 fi
34018 fi
34019 MT=$ac_cv_prog_MT
34020 if test -n "$MT"; then
34021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34022 $as_echo "$MT" >&6; }
34023 else
34024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34025 $as_echo "no" >&6; }
34026 fi
34027 
34028 
34029 
34030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34031 
34032   # First separate the path from the arguments. This will split at the first
34033   # space.
34034   complete="$MT"
34035   path="${complete%% *}"
34036   tmp="$complete EOL"
34037   arguments="${tmp#* }"
34038 
34039   # Input might be given as Windows format, start by converting to
34040   # unix format.
34041   new_path=`$CYGPATH -u "$path"`
34042 
34043   # Now try to locate executable using which
34044   new_path=`$WHICH "$new_path" 2> /dev/null`
34045   # bat and cmd files are not always considered executable in cygwin causing which
34046   # to not find them
34047   if test "x$new_path" = x \
34048       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34049       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34050     new_path=`$CYGPATH -u "$path"`
34051   fi
34052   if test "x$new_path" = x; then
34053     # Oops. Which didn't find the executable.
34054     # The splitting of arguments from the executable at a space might have been incorrect,
34055     # since paths with space are more likely in Windows. Give it another try with the whole
34056     # argument.
34057     path="$complete"
34058     arguments="EOL"
34059     new_path=`$CYGPATH -u "$path"`
34060     new_path=`$WHICH "$new_path" 2> /dev/null`
34061     # bat and cmd files are not always considered executable in cygwin causing which
34062     # to not find them
34063     if test "x$new_path" = x \
34064         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34065         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34066       new_path=`$CYGPATH -u "$path"`
34067     fi
34068     if test "x$new_path" = x; then
34069       # It's still not found. Now this is an unrecoverable error.
34070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34071 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34072       has_space=`$ECHO "$complete" | $GREP " "`
34073       if test "x$has_space" != x; then
34074         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34075 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34076       fi
34077       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34078     fi
34079   fi
34080 
34081   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34082   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34083   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34084   # "foo.exe" is OK but "foo" is an error.
34085   #
34086   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34087   # It is also a way to make sure we got the proper file name for the real test later on.
34088   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34089   if test "x$test_shortpath" = x; then
34090     # Short path failed, file does not exist as specified.
34091     # Try adding .exe or .cmd
34092     if test -f "${new_path}.exe"; then
34093       input_to_shortpath="${new_path}.exe"
34094     elif test -f "${new_path}.cmd"; then
34095       input_to_shortpath="${new_path}.cmd"
34096     else
34097       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34098 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34099       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34100 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34101       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34102     fi
34103   else
34104     input_to_shortpath="$new_path"
34105   fi
34106 
34107   # Call helper function which possibly converts this using DOS-style short mode.
34108   # If so, the updated path is stored in $new_path.
34109   new_path="$input_to_shortpath"
34110 
34111   input_path="$input_to_shortpath"
34112   # Check if we need to convert this using DOS-style short mode. If the path
34113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34114   # take no chances and rewrite it.
34115   # Note: m4 eats our [], so we need to use [ and ] instead.
34116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34117   if test "x$has_forbidden_chars" != x; then
34118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34119     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34120     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34121     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34122       # Going to short mode and back again did indeed matter. Since short mode is
34123       # case insensitive, let's make it lowercase to improve readability.
34124       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34125       # Now convert it back to Unix-stile (cygpath)
34126       input_path=`$CYGPATH -u "$shortmode_path"`
34127       new_path="$input_path"
34128     fi
34129   fi
34130 
34131   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34132   if test "x$test_cygdrive_prefix" = x; then
34133     # As a simple fix, exclude /usr/bin since it's not a real path.
34134     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34135       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34136       # a path prefixed by /cygdrive for fixpath to work.
34137       new_path="$CYGWIN_ROOT_PATH$input_path"
34138     fi
34139   fi
34140 
34141   # remove trailing .exe if any
34142   new_path="${new_path/%.exe/}"
34143 
34144   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34145 
34146   # First separate the path from the arguments. This will split at the first
34147   # space.
34148   complete="$MT"
34149   path="${complete%% *}"
34150   tmp="$complete EOL"
34151   arguments="${tmp#* }"
34152 
34153   # Input might be given as Windows format, start by converting to
34154   # unix format.
34155   new_path="$path"
34156 
34157   windows_path="$new_path"
34158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34159     unix_path=`$CYGPATH -u "$windows_path"`
34160     new_path="$unix_path"
34161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34163     new_path="$unix_path"
34164   fi
34165 
34166 
34167   # Now try to locate executable using which
34168   new_path=`$WHICH "$new_path" 2> /dev/null`
34169 
34170   if test "x$new_path" = x; then
34171     # Oops. Which didn't find the executable.
34172     # The splitting of arguments from the executable at a space might have been incorrect,
34173     # since paths with space are more likely in Windows. Give it another try with the whole
34174     # argument.
34175     path="$complete"
34176     arguments="EOL"
34177     new_path="$path"
34178 
34179   windows_path="$new_path"
34180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34181     unix_path=`$CYGPATH -u "$windows_path"`
34182     new_path="$unix_path"
34183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34185     new_path="$unix_path"
34186   fi
34187 
34188 
34189     new_path=`$WHICH "$new_path" 2> /dev/null`
34190     # bat and cmd files are not always considered executable in MSYS causing which
34191     # to not find them
34192     if test "x$new_path" = x \
34193         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34194         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34195       new_path="$path"
34196 
34197   windows_path="$new_path"
34198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34199     unix_path=`$CYGPATH -u "$windows_path"`
34200     new_path="$unix_path"
34201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34203     new_path="$unix_path"
34204   fi
34205 
34206     fi
34207 
34208     if test "x$new_path" = x; then
34209       # It's still not found. Now this is an unrecoverable error.
34210       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34211 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34212       has_space=`$ECHO "$complete" | $GREP " "`
34213       if test "x$has_space" != x; then
34214         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34215 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34216       fi
34217       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34218     fi
34219   fi
34220 
34221   # Now new_path has a complete unix path to the binary
34222   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34223     # Keep paths in /bin as-is, but remove trailing .exe if any
34224     new_path="${new_path/%.exe/}"
34225     # Do not save /bin paths to all_fixpath_prefixes!
34226   else
34227     # Not in mixed or Windows style, start by that.
34228     new_path=`cmd //c echo $new_path`
34229 
34230   input_path="$new_path"
34231   # Check if we need to convert this using DOS-style short mode. If the path
34232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34233   # take no chances and rewrite it.
34234   # Note: m4 eats our [], so we need to use [ and ] instead.
34235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34236   if test "x$has_forbidden_chars" != x; then
34237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34238     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34239   fi
34240 
34241     # Output is in $new_path
34242 
34243   windows_path="$new_path"
34244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34245     unix_path=`$CYGPATH -u "$windows_path"`
34246     new_path="$unix_path"
34247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34249     new_path="$unix_path"
34250   fi
34251 
34252     # remove trailing .exe if any
34253     new_path="${new_path/%.exe/}"
34254 
34255     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34256     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34257   fi
34258 
34259   else
34260     # We're on a unix platform. Hooray! :)
34261     # First separate the path from the arguments. This will split at the first
34262     # space.
34263     complete="$MT"
34264     path="${complete%% *}"
34265     tmp="$complete EOL"
34266     arguments="${tmp#* }"
34267 
34268     # Cannot rely on the command "which" here since it doesn't always work.
34269     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34270     if test -z "$is_absolute_path"; then
34271       # Path to executable is not absolute. Find it.
34272       IFS_save="$IFS"
34273       IFS=:
34274       for p in $PATH; do
34275         if test -f "$p/$path" && test -x "$p/$path"; then
34276           new_path="$p/$path"
34277           break
34278         fi
34279       done
34280       IFS="$IFS_save"
34281     else
34282       # This is an absolute path, we can use it without further modifications.
34283       new_path="$path"
34284     fi
34285 
34286     if test "x$new_path" = x; then
34287       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34288 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34289       has_space=`$ECHO "$complete" | $GREP " "`
34290       if test "x$has_space" != x; then
34291         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34292 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34293       fi
34294       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34295     fi
34296   fi
34297 
34298   # Now join together the path and the arguments once again
34299   if test "x$arguments" != xEOL; then
34300     new_complete="$new_path ${arguments% *}"
34301   else
34302     new_complete="$new_path"
34303   fi
34304 
34305   if test "x$complete" != "x$new_complete"; then
34306     MT="$new_complete"
34307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34308 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34309   fi
34310 
34311     # Setup the resource compiler (RC)
34312     # Extract the first word of "rc", so it can be a program name with args.
34313 set dummy rc; ac_word=$2
34314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34315 $as_echo_n "checking for $ac_word... " >&6; }
34316 if ${ac_cv_prog_RC+:} false; then :
34317   $as_echo_n "(cached) " >&6
34318 else
34319   if test -n "$RC"; then
34320   ac_cv_prog_RC="$RC" # Let the user override the test.
34321 else
34322   ac_prog_rejected=no
34323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34324 for as_dir in $PATH
34325 do
34326   IFS=$as_save_IFS
34327   test -z "$as_dir" && as_dir=.
34328     for ac_exec_ext in '' $ac_executable_extensions; do
34329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34330     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34331        ac_prog_rejected=yes
34332        continue
34333      fi
34334     ac_cv_prog_RC="rc"
34335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34336     break 2
34337   fi
34338 done
34339   done
34340 IFS=$as_save_IFS
34341 
34342 if test $ac_prog_rejected = yes; then
34343   # We found a bogon in the path, so make sure we never use it.
34344   set dummy $ac_cv_prog_RC
34345   shift
34346   if test $# != 0; then
34347     # We chose a different compiler from the bogus one.
34348     # However, it has the same basename, so the bogon will be chosen
34349     # first if we set RC to just the basename; use the full file name.
34350     shift
34351     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34352   fi
34353 fi
34354 fi
34355 fi
34356 RC=$ac_cv_prog_RC
34357 if test -n "$RC"; then
34358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34359 $as_echo "$RC" >&6; }
34360 else
34361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34362 $as_echo "no" >&6; }
34363 fi
34364 
34365 
34366 
34367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34368 
34369   # First separate the path from the arguments. This will split at the first
34370   # space.
34371   complete="$RC"
34372   path="${complete%% *}"
34373   tmp="$complete EOL"
34374   arguments="${tmp#* }"
34375 
34376   # Input might be given as Windows format, start by converting to
34377   # unix format.
34378   new_path=`$CYGPATH -u "$path"`
34379 
34380   # Now try to locate executable using which
34381   new_path=`$WHICH "$new_path" 2> /dev/null`
34382   # bat and cmd files are not always considered executable in cygwin causing which
34383   # to not find them
34384   if test "x$new_path" = x \
34385       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34386       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34387     new_path=`$CYGPATH -u "$path"`
34388   fi
34389   if test "x$new_path" = x; then
34390     # Oops. Which didn't find the executable.
34391     # The splitting of arguments from the executable at a space might have been incorrect,
34392     # since paths with space are more likely in Windows. Give it another try with the whole
34393     # argument.
34394     path="$complete"
34395     arguments="EOL"
34396     new_path=`$CYGPATH -u "$path"`
34397     new_path=`$WHICH "$new_path" 2> /dev/null`
34398     # bat and cmd files are not always considered executable in cygwin causing which
34399     # to not find them
34400     if test "x$new_path" = x \
34401         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34402         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34403       new_path=`$CYGPATH -u "$path"`
34404     fi
34405     if test "x$new_path" = x; then
34406       # It's still not found. Now this is an unrecoverable error.
34407       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34408 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34409       has_space=`$ECHO "$complete" | $GREP " "`
34410       if test "x$has_space" != x; then
34411         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34412 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34413       fi
34414       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34415     fi
34416   fi
34417 
34418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34421   # "foo.exe" is OK but "foo" is an error.
34422   #
34423   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34424   # It is also a way to make sure we got the proper file name for the real test later on.
34425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34426   if test "x$test_shortpath" = x; then
34427     # Short path failed, file does not exist as specified.
34428     # Try adding .exe or .cmd
34429     if test -f "${new_path}.exe"; then
34430       input_to_shortpath="${new_path}.exe"
34431     elif test -f "${new_path}.cmd"; then
34432       input_to_shortpath="${new_path}.cmd"
34433     else
34434       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34435 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34436       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34437 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34438       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34439     fi
34440   else
34441     input_to_shortpath="$new_path"
34442   fi
34443 
34444   # Call helper function which possibly converts this using DOS-style short mode.
34445   # If so, the updated path is stored in $new_path.
34446   new_path="$input_to_shortpath"
34447 
34448   input_path="$input_to_shortpath"
34449   # Check if we need to convert this using DOS-style short mode. If the path
34450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34451   # take no chances and rewrite it.
34452   # Note: m4 eats our [], so we need to use [ and ] instead.
34453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34454   if test "x$has_forbidden_chars" != x; then
34455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34456     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34457     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34458     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34459       # Going to short mode and back again did indeed matter. Since short mode is
34460       # case insensitive, let's make it lowercase to improve readability.
34461       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34462       # Now convert it back to Unix-stile (cygpath)
34463       input_path=`$CYGPATH -u "$shortmode_path"`
34464       new_path="$input_path"
34465     fi
34466   fi
34467 
34468   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34469   if test "x$test_cygdrive_prefix" = x; then
34470     # As a simple fix, exclude /usr/bin since it's not a real path.
34471     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34472       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34473       # a path prefixed by /cygdrive for fixpath to work.
34474       new_path="$CYGWIN_ROOT_PATH$input_path"
34475     fi
34476   fi
34477 
34478   # remove trailing .exe if any
34479   new_path="${new_path/%.exe/}"
34480 
34481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34482 
34483   # First separate the path from the arguments. This will split at the first
34484   # space.
34485   complete="$RC"
34486   path="${complete%% *}"
34487   tmp="$complete EOL"
34488   arguments="${tmp#* }"
34489 
34490   # Input might be given as Windows format, start by converting to
34491   # unix format.
34492   new_path="$path"
34493 
34494   windows_path="$new_path"
34495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34496     unix_path=`$CYGPATH -u "$windows_path"`
34497     new_path="$unix_path"
34498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34500     new_path="$unix_path"
34501   fi
34502 
34503 
34504   # Now try to locate executable using which
34505   new_path=`$WHICH "$new_path" 2> /dev/null`
34506 
34507   if test "x$new_path" = x; then
34508     # Oops. Which didn't find the executable.
34509     # The splitting of arguments from the executable at a space might have been incorrect,
34510     # since paths with space are more likely in Windows. Give it another try with the whole
34511     # argument.
34512     path="$complete"
34513     arguments="EOL"
34514     new_path="$path"
34515 
34516   windows_path="$new_path"
34517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34518     unix_path=`$CYGPATH -u "$windows_path"`
34519     new_path="$unix_path"
34520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34522     new_path="$unix_path"
34523   fi
34524 
34525 
34526     new_path=`$WHICH "$new_path" 2> /dev/null`
34527     # bat and cmd files are not always considered executable in MSYS causing which
34528     # to not find them
34529     if test "x$new_path" = x \
34530         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34531         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34532       new_path="$path"
34533 
34534   windows_path="$new_path"
34535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34536     unix_path=`$CYGPATH -u "$windows_path"`
34537     new_path="$unix_path"
34538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34540     new_path="$unix_path"
34541   fi
34542 
34543     fi
34544 
34545     if test "x$new_path" = x; then
34546       # It's still not found. Now this is an unrecoverable error.
34547       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34548 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34549       has_space=`$ECHO "$complete" | $GREP " "`
34550       if test "x$has_space" != x; then
34551         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34552 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34553       fi
34554       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34555     fi
34556   fi
34557 
34558   # Now new_path has a complete unix path to the binary
34559   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34560     # Keep paths in /bin as-is, but remove trailing .exe if any
34561     new_path="${new_path/%.exe/}"
34562     # Do not save /bin paths to all_fixpath_prefixes!
34563   else
34564     # Not in mixed or Windows style, start by that.
34565     new_path=`cmd //c echo $new_path`
34566 
34567   input_path="$new_path"
34568   # Check if we need to convert this using DOS-style short mode. If the path
34569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34570   # take no chances and rewrite it.
34571   # Note: m4 eats our [], so we need to use [ and ] instead.
34572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34573   if test "x$has_forbidden_chars" != x; then
34574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34575     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34576   fi
34577 
34578     # Output is in $new_path
34579 
34580   windows_path="$new_path"
34581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34582     unix_path=`$CYGPATH -u "$windows_path"`
34583     new_path="$unix_path"
34584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34586     new_path="$unix_path"
34587   fi
34588 
34589     # remove trailing .exe if any
34590     new_path="${new_path/%.exe/}"
34591 
34592     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34593     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34594   fi
34595 
34596   else
34597     # We're on a unix platform. Hooray! :)
34598     # First separate the path from the arguments. This will split at the first
34599     # space.
34600     complete="$RC"
34601     path="${complete%% *}"
34602     tmp="$complete EOL"
34603     arguments="${tmp#* }"
34604 
34605     # Cannot rely on the command "which" here since it doesn't always work.
34606     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34607     if test -z "$is_absolute_path"; then
34608       # Path to executable is not absolute. Find it.
34609       IFS_save="$IFS"
34610       IFS=:
34611       for p in $PATH; do
34612         if test -f "$p/$path" && test -x "$p/$path"; then
34613           new_path="$p/$path"
34614           break
34615         fi
34616       done
34617       IFS="$IFS_save"
34618     else
34619       # This is an absolute path, we can use it without further modifications.
34620       new_path="$path"
34621     fi
34622 
34623     if test "x$new_path" = x; then
34624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34625 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34626       has_space=`$ECHO "$complete" | $GREP " "`
34627       if test "x$has_space" != x; then
34628         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34629 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34630       fi
34631       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34632     fi
34633   fi
34634 
34635   # Now join together the path and the arguments once again
34636   if test "x$arguments" != xEOL; then
34637     new_complete="$new_path ${arguments% *}"
34638   else
34639     new_complete="$new_path"
34640   fi
34641 
34642   if test "x$complete" != "x$new_complete"; then
34643     RC="$new_complete"
34644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34645 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34646   fi
34647 
34648     # Extract the first word of "dumpbin", so it can be a program name with args.
34649 set dummy dumpbin; ac_word=$2
34650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34651 $as_echo_n "checking for $ac_word... " >&6; }
34652 if ${ac_cv_prog_DUMPBIN+:} false; then :
34653   $as_echo_n "(cached) " >&6
34654 else
34655   if test -n "$DUMPBIN"; then
34656   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34657 else
34658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34659 for as_dir in $PATH
34660 do
34661   IFS=$as_save_IFS
34662   test -z "$as_dir" && as_dir=.
34663     for ac_exec_ext in '' $ac_executable_extensions; do
34664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34665     ac_cv_prog_DUMPBIN="dumpbin"
34666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34667     break 2
34668   fi
34669 done
34670   done
34671 IFS=$as_save_IFS
34672 
34673 fi
34674 fi
34675 DUMPBIN=$ac_cv_prog_DUMPBIN
34676 if test -n "$DUMPBIN"; then
34677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34678 $as_echo "$DUMPBIN" >&6; }
34679 else
34680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34681 $as_echo "no" >&6; }
34682 fi
34683 
34684 
34685 
34686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34687 
34688   # First separate the path from the arguments. This will split at the first
34689   # space.
34690   complete="$DUMPBIN"
34691   path="${complete%% *}"
34692   tmp="$complete EOL"
34693   arguments="${tmp#* }"
34694 
34695   # Input might be given as Windows format, start by converting to
34696   # unix format.
34697   new_path=`$CYGPATH -u "$path"`
34698 
34699   # Now try to locate executable using which
34700   new_path=`$WHICH "$new_path" 2> /dev/null`
34701   # bat and cmd files are not always considered executable in cygwin causing which
34702   # to not find them
34703   if test "x$new_path" = x \
34704       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34705       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34706     new_path=`$CYGPATH -u "$path"`
34707   fi
34708   if test "x$new_path" = x; then
34709     # Oops. Which didn't find the executable.
34710     # The splitting of arguments from the executable at a space might have been incorrect,
34711     # since paths with space are more likely in Windows. Give it another try with the whole
34712     # argument.
34713     path="$complete"
34714     arguments="EOL"
34715     new_path=`$CYGPATH -u "$path"`
34716     new_path=`$WHICH "$new_path" 2> /dev/null`
34717     # bat and cmd files are not always considered executable in cygwin causing which
34718     # to not find them
34719     if test "x$new_path" = x \
34720         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34721         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34722       new_path=`$CYGPATH -u "$path"`
34723     fi
34724     if test "x$new_path" = x; then
34725       # It's still not found. Now this is an unrecoverable error.
34726       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34727 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34728       has_space=`$ECHO "$complete" | $GREP " "`
34729       if test "x$has_space" != x; then
34730         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34731 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34732       fi
34733       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34734     fi
34735   fi
34736 
34737   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34738   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34739   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34740   # "foo.exe" is OK but "foo" is an error.
34741   #
34742   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34743   # It is also a way to make sure we got the proper file name for the real test later on.
34744   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34745   if test "x$test_shortpath" = x; then
34746     # Short path failed, file does not exist as specified.
34747     # Try adding .exe or .cmd
34748     if test -f "${new_path}.exe"; then
34749       input_to_shortpath="${new_path}.exe"
34750     elif test -f "${new_path}.cmd"; then
34751       input_to_shortpath="${new_path}.cmd"
34752     else
34753       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34754 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34755       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34756 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34757       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34758     fi
34759   else
34760     input_to_shortpath="$new_path"
34761   fi
34762 
34763   # Call helper function which possibly converts this using DOS-style short mode.
34764   # If so, the updated path is stored in $new_path.
34765   new_path="$input_to_shortpath"
34766 
34767   input_path="$input_to_shortpath"
34768   # Check if we need to convert this using DOS-style short mode. If the path
34769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34770   # take no chances and rewrite it.
34771   # Note: m4 eats our [], so we need to use [ and ] instead.
34772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34773   if test "x$has_forbidden_chars" != x; then
34774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34778       # Going to short mode and back again did indeed matter. Since short mode is
34779       # case insensitive, let's make it lowercase to improve readability.
34780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34781       # Now convert it back to Unix-stile (cygpath)
34782       input_path=`$CYGPATH -u "$shortmode_path"`
34783       new_path="$input_path"
34784     fi
34785   fi
34786 
34787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34788   if test "x$test_cygdrive_prefix" = x; then
34789     # As a simple fix, exclude /usr/bin since it's not a real path.
34790     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34792       # a path prefixed by /cygdrive for fixpath to work.
34793       new_path="$CYGWIN_ROOT_PATH$input_path"
34794     fi
34795   fi
34796 
34797   # remove trailing .exe if any
34798   new_path="${new_path/%.exe/}"
34799 
34800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34801 
34802   # First separate the path from the arguments. This will split at the first
34803   # space.
34804   complete="$DUMPBIN"
34805   path="${complete%% *}"
34806   tmp="$complete EOL"
34807   arguments="${tmp#* }"
34808 
34809   # Input might be given as Windows format, start by converting to
34810   # unix format.
34811   new_path="$path"
34812 
34813   windows_path="$new_path"
34814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34815     unix_path=`$CYGPATH -u "$windows_path"`
34816     new_path="$unix_path"
34817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34819     new_path="$unix_path"
34820   fi
34821 
34822 
34823   # Now try to locate executable using which
34824   new_path=`$WHICH "$new_path" 2> /dev/null`
34825 
34826   if test "x$new_path" = x; then
34827     # Oops. Which didn't find the executable.
34828     # The splitting of arguments from the executable at a space might have been incorrect,
34829     # since paths with space are more likely in Windows. Give it another try with the whole
34830     # argument.
34831     path="$complete"
34832     arguments="EOL"
34833     new_path="$path"
34834 
34835   windows_path="$new_path"
34836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34837     unix_path=`$CYGPATH -u "$windows_path"`
34838     new_path="$unix_path"
34839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34841     new_path="$unix_path"
34842   fi
34843 
34844 
34845     new_path=`$WHICH "$new_path" 2> /dev/null`
34846     # bat and cmd files are not always considered executable in MSYS causing which
34847     # to not find them
34848     if test "x$new_path" = x \
34849         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34850         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34851       new_path="$path"
34852 
34853   windows_path="$new_path"
34854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34855     unix_path=`$CYGPATH -u "$windows_path"`
34856     new_path="$unix_path"
34857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34859     new_path="$unix_path"
34860   fi
34861 
34862     fi
34863 
34864     if test "x$new_path" = x; then
34865       # It's still not found. Now this is an unrecoverable error.
34866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34867 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34868       has_space=`$ECHO "$complete" | $GREP " "`
34869       if test "x$has_space" != x; then
34870         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34871 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34872       fi
34873       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34874     fi
34875   fi
34876 
34877   # Now new_path has a complete unix path to the binary
34878   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34879     # Keep paths in /bin as-is, but remove trailing .exe if any
34880     new_path="${new_path/%.exe/}"
34881     # Do not save /bin paths to all_fixpath_prefixes!
34882   else
34883     # Not in mixed or Windows style, start by that.
34884     new_path=`cmd //c echo $new_path`
34885 
34886   input_path="$new_path"
34887   # Check if we need to convert this using DOS-style short mode. If the path
34888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34889   # take no chances and rewrite it.
34890   # Note: m4 eats our [], so we need to use [ and ] instead.
34891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34892   if test "x$has_forbidden_chars" != x; then
34893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34894     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34895   fi
34896 
34897     # Output is in $new_path
34898 
34899   windows_path="$new_path"
34900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34901     unix_path=`$CYGPATH -u "$windows_path"`
34902     new_path="$unix_path"
34903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34905     new_path="$unix_path"
34906   fi
34907 
34908     # remove trailing .exe if any
34909     new_path="${new_path/%.exe/}"
34910 
34911     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34912     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34913   fi
34914 
34915   else
34916     # We're on a unix platform. Hooray! :)
34917     # First separate the path from the arguments. This will split at the first
34918     # space.
34919     complete="$DUMPBIN"
34920     path="${complete%% *}"
34921     tmp="$complete EOL"
34922     arguments="${tmp#* }"
34923 
34924     # Cannot rely on the command "which" here since it doesn't always work.
34925     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34926     if test -z "$is_absolute_path"; then
34927       # Path to executable is not absolute. Find it.
34928       IFS_save="$IFS"
34929       IFS=:
34930       for p in $PATH; do
34931         if test -f "$p/$path" && test -x "$p/$path"; then
34932           new_path="$p/$path"
34933           break
34934         fi
34935       done
34936       IFS="$IFS_save"
34937     else
34938       # This is an absolute path, we can use it without further modifications.
34939       new_path="$path"
34940     fi
34941 
34942     if test "x$new_path" = x; then
34943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34944 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34945       has_space=`$ECHO "$complete" | $GREP " "`
34946       if test "x$has_space" != x; then
34947         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34948 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34949       fi
34950       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34951     fi
34952   fi
34953 
34954   # Now join together the path and the arguments once again
34955   if test "x$arguments" != xEOL; then
34956     new_complete="$new_path ${arguments% *}"
34957   else
34958     new_complete="$new_path"
34959   fi
34960 
34961   if test "x$complete" != "x$new_complete"; then
34962     DUMPBIN="$new_complete"
34963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34964 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34965   fi
34966 
34967     # We need to check for 'msbuild.exe' because at the place where we expect to
34968     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34969     # won't find the 'msbuild.exe' executable in that case (and the
34970     # 'ac_executable_extensions' is unusable due to performance reasons).
34971     # Notice that we intentionally don't fix up the path to MSBUILD because we
34972     # will call it in a DOS shell during freetype detection on Windows (see
34973     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34974     # Extract the first word of "msbuild.exe", so it can be a program name with args.
34975 set dummy msbuild.exe; ac_word=$2
34976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34977 $as_echo_n "checking for $ac_word... " >&6; }
34978 if ${ac_cv_prog_MSBUILD+:} false; then :
34979   $as_echo_n "(cached) " >&6
34980 else
34981   if test -n "$MSBUILD"; then
34982   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34983 else
34984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34985 for as_dir in $PATH
34986 do
34987   IFS=$as_save_IFS
34988   test -z "$as_dir" && as_dir=.
34989     for ac_exec_ext in '' $ac_executable_extensions; do
34990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34991     ac_cv_prog_MSBUILD="msbuild.exe"
34992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34993     break 2
34994   fi
34995 done
34996   done
34997 IFS=$as_save_IFS
34998 
34999 fi
35000 fi
35001 MSBUILD=$ac_cv_prog_MSBUILD
35002 if test -n "$MSBUILD"; then
35003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35004 $as_echo "$MSBUILD" >&6; }
35005 else
35006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35007 $as_echo "no" >&6; }
35008 fi
35009 
35010 
35011   fi
35012 
35013   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35014 
35015 
35016   # Publish this variable in the help.
35017 
35018 
35019   if test "x$STRIP" = x; then
35020     # The variable is not set by user, try to locate tool using the code snippet
35021     for ac_prog in strip
35022 do
35023   # Extract the first word of "$ac_prog", so it can be a program name with args.
35024 set dummy $ac_prog; ac_word=$2
35025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35026 $as_echo_n "checking for $ac_word... " >&6; }
35027 if ${ac_cv_path_STRIP+:} false; then :
35028   $as_echo_n "(cached) " >&6
35029 else
35030   case $STRIP in
35031   [\\/]* | ?:[\\/]*)
35032   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35033   ;;
35034   *)
35035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35036 for as_dir in $PATH
35037 do
35038   IFS=$as_save_IFS
35039   test -z "$as_dir" && as_dir=.
35040     for ac_exec_ext in '' $ac_executable_extensions; do
35041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35042     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35044     break 2
35045   fi
35046 done
35047   done
35048 IFS=$as_save_IFS
35049 
35050   ;;
35051 esac
35052 fi
35053 STRIP=$ac_cv_path_STRIP
35054 if test -n "$STRIP"; then
35055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35056 $as_echo "$STRIP" >&6; }
35057 else
35058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35059 $as_echo "no" >&6; }
35060 fi
35061 
35062 
35063   test -n "$STRIP" && break
35064 done
35065 
35066   else
35067     # The variable is set, but is it from the command line or the environment?
35068 
35069     # Try to remove the string !STRIP! from our list.
35070     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35071     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35072       # If it failed, the variable was not from the command line. Ignore it,
35073       # but warn the user (except for BASH, which is always set by the calling BASH).
35074       if test "xSTRIP" != xBASH; then
35075         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35076 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35077       fi
35078       # Try to locate tool using the code snippet
35079       for ac_prog in strip
35080 do
35081   # Extract the first word of "$ac_prog", so it can be a program name with args.
35082 set dummy $ac_prog; ac_word=$2
35083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35084 $as_echo_n "checking for $ac_word... " >&6; }
35085 if ${ac_cv_path_STRIP+:} false; then :
35086   $as_echo_n "(cached) " >&6
35087 else
35088   case $STRIP in
35089   [\\/]* | ?:[\\/]*)
35090   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35091   ;;
35092   *)
35093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35094 for as_dir in $PATH
35095 do
35096   IFS=$as_save_IFS
35097   test -z "$as_dir" && as_dir=.
35098     for ac_exec_ext in '' $ac_executable_extensions; do
35099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35100     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35102     break 2
35103   fi
35104 done
35105   done
35106 IFS=$as_save_IFS
35107 
35108   ;;
35109 esac
35110 fi
35111 STRIP=$ac_cv_path_STRIP
35112 if test -n "$STRIP"; then
35113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35114 $as_echo "$STRIP" >&6; }
35115 else
35116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35117 $as_echo "no" >&6; }
35118 fi
35119 
35120 
35121   test -n "$STRIP" && break
35122 done
35123 
35124     else
35125       # If it succeeded, then it was overridden by the user. We will use it
35126       # for the tool.
35127 
35128       # First remove it from the list of overridden variables, so we can test
35129       # for unknown variables in the end.
35130       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35131 
35132       # Check if the provided tool contains a complete path.
35133       tool_specified="$STRIP"
35134       tool_basename="${tool_specified##*/}"
35135       if test "x$tool_basename" = "x$tool_specified"; then
35136         # A command without a complete path is provided, search $PATH.
35137         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35138 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35139         # Extract the first word of "$tool_basename", so it can be a program name with args.
35140 set dummy $tool_basename; ac_word=$2
35141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35142 $as_echo_n "checking for $ac_word... " >&6; }
35143 if ${ac_cv_path_STRIP+:} false; then :
35144   $as_echo_n "(cached) " >&6
35145 else
35146   case $STRIP in
35147   [\\/]* | ?:[\\/]*)
35148   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35149   ;;
35150   *)
35151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35152 for as_dir in $PATH
35153 do
35154   IFS=$as_save_IFS
35155   test -z "$as_dir" && as_dir=.
35156     for ac_exec_ext in '' $ac_executable_extensions; do
35157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35158     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35160     break 2
35161   fi
35162 done
35163   done
35164 IFS=$as_save_IFS
35165 
35166   ;;
35167 esac
35168 fi
35169 STRIP=$ac_cv_path_STRIP
35170 if test -n "$STRIP"; then
35171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35172 $as_echo "$STRIP" >&6; }
35173 else
35174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35175 $as_echo "no" >&6; }
35176 fi
35177 
35178 
35179         if test "x$STRIP" = x; then
35180           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35181         fi
35182       else
35183         # Otherwise we believe it is a complete path. Use it as it is.
35184         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35185 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35187 $as_echo_n "checking for STRIP... " >&6; }
35188         if test ! -x "$tool_specified"; then
35189           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35190 $as_echo "not found" >&6; }
35191           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35192         fi
35193         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35194 $as_echo "$tool_specified" >&6; }
35195       fi
35196     fi
35197   fi
35198 
35199 
35200 
35201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35202 
35203   # First separate the path from the arguments. This will split at the first
35204   # space.
35205   complete="$STRIP"
35206   path="${complete%% *}"
35207   tmp="$complete EOL"
35208   arguments="${tmp#* }"
35209 
35210   # Input might be given as Windows format, start by converting to
35211   # unix format.
35212   new_path=`$CYGPATH -u "$path"`
35213 
35214   # Now try to locate executable using which
35215   new_path=`$WHICH "$new_path" 2> /dev/null`
35216   # bat and cmd files are not always considered executable in cygwin causing which
35217   # to not find them
35218   if test "x$new_path" = x \
35219       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35220       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35221     new_path=`$CYGPATH -u "$path"`
35222   fi
35223   if test "x$new_path" = x; then
35224     # Oops. Which didn't find the executable.
35225     # The splitting of arguments from the executable at a space might have been incorrect,
35226     # since paths with space are more likely in Windows. Give it another try with the whole
35227     # argument.
35228     path="$complete"
35229     arguments="EOL"
35230     new_path=`$CYGPATH -u "$path"`
35231     new_path=`$WHICH "$new_path" 2> /dev/null`
35232     # bat and cmd files are not always considered executable in cygwin causing which
35233     # to not find them
35234     if test "x$new_path" = x \
35235         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35236         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35237       new_path=`$CYGPATH -u "$path"`
35238     fi
35239     if test "x$new_path" = x; then
35240       # It's still not found. Now this is an unrecoverable error.
35241       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35242 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35243       has_space=`$ECHO "$complete" | $GREP " "`
35244       if test "x$has_space" != x; then
35245         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35246 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35247       fi
35248       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35249     fi
35250   fi
35251 
35252   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35253   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35254   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35255   # "foo.exe" is OK but "foo" is an error.
35256   #
35257   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35258   # It is also a way to make sure we got the proper file name for the real test later on.
35259   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35260   if test "x$test_shortpath" = x; then
35261     # Short path failed, file does not exist as specified.
35262     # Try adding .exe or .cmd
35263     if test -f "${new_path}.exe"; then
35264       input_to_shortpath="${new_path}.exe"
35265     elif test -f "${new_path}.cmd"; then
35266       input_to_shortpath="${new_path}.cmd"
35267     else
35268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35269 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35270       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35271 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35272       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35273     fi
35274   else
35275     input_to_shortpath="$new_path"
35276   fi
35277 
35278   # Call helper function which possibly converts this using DOS-style short mode.
35279   # If so, the updated path is stored in $new_path.
35280   new_path="$input_to_shortpath"
35281 
35282   input_path="$input_to_shortpath"
35283   # Check if we need to convert this using DOS-style short mode. If the path
35284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35285   # take no chances and rewrite it.
35286   # Note: m4 eats our [], so we need to use [ and ] instead.
35287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35288   if test "x$has_forbidden_chars" != x; then
35289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35290     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35291     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35292     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35293       # Going to short mode and back again did indeed matter. Since short mode is
35294       # case insensitive, let's make it lowercase to improve readability.
35295       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35296       # Now convert it back to Unix-stile (cygpath)
35297       input_path=`$CYGPATH -u "$shortmode_path"`
35298       new_path="$input_path"
35299     fi
35300   fi
35301 
35302   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35303   if test "x$test_cygdrive_prefix" = x; then
35304     # As a simple fix, exclude /usr/bin since it's not a real path.
35305     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35306       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35307       # a path prefixed by /cygdrive for fixpath to work.
35308       new_path="$CYGWIN_ROOT_PATH$input_path"
35309     fi
35310   fi
35311 
35312   # remove trailing .exe if any
35313   new_path="${new_path/%.exe/}"
35314 
35315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35316 
35317   # First separate the path from the arguments. This will split at the first
35318   # space.
35319   complete="$STRIP"
35320   path="${complete%% *}"
35321   tmp="$complete EOL"
35322   arguments="${tmp#* }"
35323 
35324   # Input might be given as Windows format, start by converting to
35325   # unix format.
35326   new_path="$path"
35327 
35328   windows_path="$new_path"
35329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35330     unix_path=`$CYGPATH -u "$windows_path"`
35331     new_path="$unix_path"
35332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35334     new_path="$unix_path"
35335   fi
35336 
35337 
35338   # Now try to locate executable using which
35339   new_path=`$WHICH "$new_path" 2> /dev/null`
35340 
35341   if test "x$new_path" = x; then
35342     # Oops. Which didn't find the executable.
35343     # The splitting of arguments from the executable at a space might have been incorrect,
35344     # since paths with space are more likely in Windows. Give it another try with the whole
35345     # argument.
35346     path="$complete"
35347     arguments="EOL"
35348     new_path="$path"
35349 
35350   windows_path="$new_path"
35351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35352     unix_path=`$CYGPATH -u "$windows_path"`
35353     new_path="$unix_path"
35354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35356     new_path="$unix_path"
35357   fi
35358 
35359 
35360     new_path=`$WHICH "$new_path" 2> /dev/null`
35361     # bat and cmd files are not always considered executable in MSYS causing which
35362     # to not find them
35363     if test "x$new_path" = x \
35364         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35365         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35366       new_path="$path"
35367 
35368   windows_path="$new_path"
35369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35370     unix_path=`$CYGPATH -u "$windows_path"`
35371     new_path="$unix_path"
35372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35374     new_path="$unix_path"
35375   fi
35376 
35377     fi
35378 
35379     if test "x$new_path" = x; then
35380       # It's still not found. Now this is an unrecoverable error.
35381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35382 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35383       has_space=`$ECHO "$complete" | $GREP " "`
35384       if test "x$has_space" != x; then
35385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35387       fi
35388       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35389     fi
35390   fi
35391 
35392   # Now new_path has a complete unix path to the binary
35393   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35394     # Keep paths in /bin as-is, but remove trailing .exe if any
35395     new_path="${new_path/%.exe/}"
35396     # Do not save /bin paths to all_fixpath_prefixes!
35397   else
35398     # Not in mixed or Windows style, start by that.
35399     new_path=`cmd //c echo $new_path`
35400 
35401   input_path="$new_path"
35402   # Check if we need to convert this using DOS-style short mode. If the path
35403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35404   # take no chances and rewrite it.
35405   # Note: m4 eats our [], so we need to use [ and ] instead.
35406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35407   if test "x$has_forbidden_chars" != x; then
35408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35410   fi
35411 
35412     # Output is in $new_path
35413 
35414   windows_path="$new_path"
35415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35416     unix_path=`$CYGPATH -u "$windows_path"`
35417     new_path="$unix_path"
35418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35420     new_path="$unix_path"
35421   fi
35422 
35423     # remove trailing .exe if any
35424     new_path="${new_path/%.exe/}"
35425 
35426     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35427     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35428   fi
35429 
35430   else
35431     # We're on a unix platform. Hooray! :)
35432     # First separate the path from the arguments. This will split at the first
35433     # space.
35434     complete="$STRIP"
35435     path="${complete%% *}"
35436     tmp="$complete EOL"
35437     arguments="${tmp#* }"
35438 
35439     # Cannot rely on the command "which" here since it doesn't always work.
35440     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35441     if test -z "$is_absolute_path"; then
35442       # Path to executable is not absolute. Find it.
35443       IFS_save="$IFS"
35444       IFS=:
35445       for p in $PATH; do
35446         if test -f "$p/$path" && test -x "$p/$path"; then
35447           new_path="$p/$path"
35448           break
35449         fi
35450       done
35451       IFS="$IFS_save"
35452     else
35453       # This is an absolute path, we can use it without further modifications.
35454       new_path="$path"
35455     fi
35456 
35457     if test "x$new_path" = x; then
35458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35459 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35460       has_space=`$ECHO "$complete" | $GREP " "`
35461       if test "x$has_space" != x; then
35462         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35463 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35464       fi
35465       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35466     fi
35467   fi
35468 
35469   # Now join together the path and the arguments once again
35470   if test "x$arguments" != xEOL; then
35471     new_complete="$new_path ${arguments% *}"
35472   else
35473     new_complete="$new_path"
35474   fi
35475 
35476   if test "x$complete" != "x$new_complete"; then
35477     STRIP="$new_complete"
35478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35479 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35480   fi
35481 
35482 
35483 
35484   # Publish this variable in the help.
35485 
35486 
35487   if test "x$NM" = x; then
35488     # The variable is not set by user, try to locate tool using the code snippet
35489     for ac_prog in nm
35490 do
35491   # Extract the first word of "$ac_prog", so it can be a program name with args.
35492 set dummy $ac_prog; ac_word=$2
35493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35494 $as_echo_n "checking for $ac_word... " >&6; }
35495 if ${ac_cv_path_NM+:} false; then :
35496   $as_echo_n "(cached) " >&6
35497 else
35498   case $NM in
35499   [\\/]* | ?:[\\/]*)
35500   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35501   ;;
35502   *)
35503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35504 for as_dir in $PATH
35505 do
35506   IFS=$as_save_IFS
35507   test -z "$as_dir" && as_dir=.
35508     for ac_exec_ext in '' $ac_executable_extensions; do
35509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35510     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35512     break 2
35513   fi
35514 done
35515   done
35516 IFS=$as_save_IFS
35517 
35518   ;;
35519 esac
35520 fi
35521 NM=$ac_cv_path_NM
35522 if test -n "$NM"; then
35523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35524 $as_echo "$NM" >&6; }
35525 else
35526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35527 $as_echo "no" >&6; }
35528 fi
35529 
35530 
35531   test -n "$NM" && break
35532 done
35533 
35534   else
35535     # The variable is set, but is it from the command line or the environment?
35536 
35537     # Try to remove the string !NM! from our list.
35538     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35539     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35540       # If it failed, the variable was not from the command line. Ignore it,
35541       # but warn the user (except for BASH, which is always set by the calling BASH).
35542       if test "xNM" != xBASH; then
35543         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35544 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35545       fi
35546       # Try to locate tool using the code snippet
35547       for ac_prog in nm
35548 do
35549   # Extract the first word of "$ac_prog", so it can be a program name with args.
35550 set dummy $ac_prog; ac_word=$2
35551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35552 $as_echo_n "checking for $ac_word... " >&6; }
35553 if ${ac_cv_path_NM+:} false; then :
35554   $as_echo_n "(cached) " >&6
35555 else
35556   case $NM in
35557   [\\/]* | ?:[\\/]*)
35558   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35559   ;;
35560   *)
35561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35562 for as_dir in $PATH
35563 do
35564   IFS=$as_save_IFS
35565   test -z "$as_dir" && as_dir=.
35566     for ac_exec_ext in '' $ac_executable_extensions; do
35567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35568     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35570     break 2
35571   fi
35572 done
35573   done
35574 IFS=$as_save_IFS
35575 
35576   ;;
35577 esac
35578 fi
35579 NM=$ac_cv_path_NM
35580 if test -n "$NM"; then
35581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35582 $as_echo "$NM" >&6; }
35583 else
35584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35585 $as_echo "no" >&6; }
35586 fi
35587 
35588 
35589   test -n "$NM" && break
35590 done
35591 
35592     else
35593       # If it succeeded, then it was overridden by the user. We will use it
35594       # for the tool.
35595 
35596       # First remove it from the list of overridden variables, so we can test
35597       # for unknown variables in the end.
35598       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35599 
35600       # Check if the provided tool contains a complete path.
35601       tool_specified="$NM"
35602       tool_basename="${tool_specified##*/}"
35603       if test "x$tool_basename" = "x$tool_specified"; then
35604         # A command without a complete path is provided, search $PATH.
35605         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35606 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35607         # Extract the first word of "$tool_basename", so it can be a program name with args.
35608 set dummy $tool_basename; ac_word=$2
35609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35610 $as_echo_n "checking for $ac_word... " >&6; }
35611 if ${ac_cv_path_NM+:} false; then :
35612   $as_echo_n "(cached) " >&6
35613 else
35614   case $NM in
35615   [\\/]* | ?:[\\/]*)
35616   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35617   ;;
35618   *)
35619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35620 for as_dir in $PATH
35621 do
35622   IFS=$as_save_IFS
35623   test -z "$as_dir" && as_dir=.
35624     for ac_exec_ext in '' $ac_executable_extensions; do
35625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35626     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35628     break 2
35629   fi
35630 done
35631   done
35632 IFS=$as_save_IFS
35633 
35634   ;;
35635 esac
35636 fi
35637 NM=$ac_cv_path_NM
35638 if test -n "$NM"; then
35639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35640 $as_echo "$NM" >&6; }
35641 else
35642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35643 $as_echo "no" >&6; }
35644 fi
35645 
35646 
35647         if test "x$NM" = x; then
35648           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35649         fi
35650       else
35651         # Otherwise we believe it is a complete path. Use it as it is.
35652         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35653 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35655 $as_echo_n "checking for NM... " >&6; }
35656         if test ! -x "$tool_specified"; then
35657           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35658 $as_echo "not found" >&6; }
35659           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35660         fi
35661         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35662 $as_echo "$tool_specified" >&6; }
35663       fi
35664     fi
35665   fi
35666 
35667 
35668 
35669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35670 
35671   # First separate the path from the arguments. This will split at the first
35672   # space.
35673   complete="$NM"
35674   path="${complete%% *}"
35675   tmp="$complete EOL"
35676   arguments="${tmp#* }"
35677 
35678   # Input might be given as Windows format, start by converting to
35679   # unix format.
35680   new_path=`$CYGPATH -u "$path"`
35681 
35682   # Now try to locate executable using which
35683   new_path=`$WHICH "$new_path" 2> /dev/null`
35684   # bat and cmd files are not always considered executable in cygwin causing which
35685   # to not find them
35686   if test "x$new_path" = x \
35687       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35688       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35689     new_path=`$CYGPATH -u "$path"`
35690   fi
35691   if test "x$new_path" = x; then
35692     # Oops. Which didn't find the executable.
35693     # The splitting of arguments from the executable at a space might have been incorrect,
35694     # since paths with space are more likely in Windows. Give it another try with the whole
35695     # argument.
35696     path="$complete"
35697     arguments="EOL"
35698     new_path=`$CYGPATH -u "$path"`
35699     new_path=`$WHICH "$new_path" 2> /dev/null`
35700     # bat and cmd files are not always considered executable in cygwin causing which
35701     # to not find them
35702     if test "x$new_path" = x \
35703         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35704         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35705       new_path=`$CYGPATH -u "$path"`
35706     fi
35707     if test "x$new_path" = x; then
35708       # It's still not found. Now this is an unrecoverable error.
35709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35710 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35711       has_space=`$ECHO "$complete" | $GREP " "`
35712       if test "x$has_space" != x; then
35713         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35714 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35715       fi
35716       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35717     fi
35718   fi
35719 
35720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35723   # "foo.exe" is OK but "foo" is an error.
35724   #
35725   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35726   # It is also a way to make sure we got the proper file name for the real test later on.
35727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35728   if test "x$test_shortpath" = x; then
35729     # Short path failed, file does not exist as specified.
35730     # Try adding .exe or .cmd
35731     if test -f "${new_path}.exe"; then
35732       input_to_shortpath="${new_path}.exe"
35733     elif test -f "${new_path}.cmd"; then
35734       input_to_shortpath="${new_path}.cmd"
35735     else
35736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35737 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35738       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35739 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35740       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35741     fi
35742   else
35743     input_to_shortpath="$new_path"
35744   fi
35745 
35746   # Call helper function which possibly converts this using DOS-style short mode.
35747   # If so, the updated path is stored in $new_path.
35748   new_path="$input_to_shortpath"
35749 
35750   input_path="$input_to_shortpath"
35751   # Check if we need to convert this using DOS-style short mode. If the path
35752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35753   # take no chances and rewrite it.
35754   # Note: m4 eats our [], so we need to use [ and ] instead.
35755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35756   if test "x$has_forbidden_chars" != x; then
35757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35761       # Going to short mode and back again did indeed matter. Since short mode is
35762       # case insensitive, let's make it lowercase to improve readability.
35763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35764       # Now convert it back to Unix-stile (cygpath)
35765       input_path=`$CYGPATH -u "$shortmode_path"`
35766       new_path="$input_path"
35767     fi
35768   fi
35769 
35770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35771   if test "x$test_cygdrive_prefix" = x; then
35772     # As a simple fix, exclude /usr/bin since it's not a real path.
35773     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35775       # a path prefixed by /cygdrive for fixpath to work.
35776       new_path="$CYGWIN_ROOT_PATH$input_path"
35777     fi
35778   fi
35779 
35780   # remove trailing .exe if any
35781   new_path="${new_path/%.exe/}"
35782 
35783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35784 
35785   # First separate the path from the arguments. This will split at the first
35786   # space.
35787   complete="$NM"
35788   path="${complete%% *}"
35789   tmp="$complete EOL"
35790   arguments="${tmp#* }"
35791 
35792   # Input might be given as Windows format, start by converting to
35793   # unix format.
35794   new_path="$path"
35795 
35796   windows_path="$new_path"
35797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35798     unix_path=`$CYGPATH -u "$windows_path"`
35799     new_path="$unix_path"
35800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35802     new_path="$unix_path"
35803   fi
35804 
35805 
35806   # Now try to locate executable using which
35807   new_path=`$WHICH "$new_path" 2> /dev/null`
35808 
35809   if test "x$new_path" = x; then
35810     # Oops. Which didn't find the executable.
35811     # The splitting of arguments from the executable at a space might have been incorrect,
35812     # since paths with space are more likely in Windows. Give it another try with the whole
35813     # argument.
35814     path="$complete"
35815     arguments="EOL"
35816     new_path="$path"
35817 
35818   windows_path="$new_path"
35819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35820     unix_path=`$CYGPATH -u "$windows_path"`
35821     new_path="$unix_path"
35822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35824     new_path="$unix_path"
35825   fi
35826 
35827 
35828     new_path=`$WHICH "$new_path" 2> /dev/null`
35829     # bat and cmd files are not always considered executable in MSYS causing which
35830     # to not find them
35831     if test "x$new_path" = x \
35832         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35833         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35834       new_path="$path"
35835 
35836   windows_path="$new_path"
35837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35838     unix_path=`$CYGPATH -u "$windows_path"`
35839     new_path="$unix_path"
35840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35842     new_path="$unix_path"
35843   fi
35844 
35845     fi
35846 
35847     if test "x$new_path" = x; then
35848       # It's still not found. Now this is an unrecoverable error.
35849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35850 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35851       has_space=`$ECHO "$complete" | $GREP " "`
35852       if test "x$has_space" != x; then
35853         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35854 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35855       fi
35856       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35857     fi
35858   fi
35859 
35860   # Now new_path has a complete unix path to the binary
35861   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35862     # Keep paths in /bin as-is, but remove trailing .exe if any
35863     new_path="${new_path/%.exe/}"
35864     # Do not save /bin paths to all_fixpath_prefixes!
35865   else
35866     # Not in mixed or Windows style, start by that.
35867     new_path=`cmd //c echo $new_path`
35868 
35869   input_path="$new_path"
35870   # Check if we need to convert this using DOS-style short mode. If the path
35871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35872   # take no chances and rewrite it.
35873   # Note: m4 eats our [], so we need to use [ and ] instead.
35874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35875   if test "x$has_forbidden_chars" != x; then
35876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35877     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35878   fi
35879 
35880     # Output is in $new_path
35881 
35882   windows_path="$new_path"
35883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35884     unix_path=`$CYGPATH -u "$windows_path"`
35885     new_path="$unix_path"
35886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35887     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35888     new_path="$unix_path"
35889   fi
35890 
35891     # remove trailing .exe if any
35892     new_path="${new_path/%.exe/}"
35893 
35894     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35895     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35896   fi
35897 
35898   else
35899     # We're on a unix platform. Hooray! :)
35900     # First separate the path from the arguments. This will split at the first
35901     # space.
35902     complete="$NM"
35903     path="${complete%% *}"
35904     tmp="$complete EOL"
35905     arguments="${tmp#* }"
35906 
35907     # Cannot rely on the command "which" here since it doesn't always work.
35908     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35909     if test -z "$is_absolute_path"; then
35910       # Path to executable is not absolute. Find it.
35911       IFS_save="$IFS"
35912       IFS=:
35913       for p in $PATH; do
35914         if test -f "$p/$path" && test -x "$p/$path"; then
35915           new_path="$p/$path"
35916           break
35917         fi
35918       done
35919       IFS="$IFS_save"
35920     else
35921       # This is an absolute path, we can use it without further modifications.
35922       new_path="$path"
35923     fi
35924 
35925     if test "x$new_path" = x; then
35926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35927 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35928       has_space=`$ECHO "$complete" | $GREP " "`
35929       if test "x$has_space" != x; then
35930         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35931 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35932       fi
35933       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35934     fi
35935   fi
35936 
35937   # Now join together the path and the arguments once again
35938   if test "x$arguments" != xEOL; then
35939     new_complete="$new_path ${arguments% *}"
35940   else
35941     new_complete="$new_path"
35942   fi
35943 
35944   if test "x$complete" != "x$new_complete"; then
35945     NM="$new_complete"
35946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35947 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35948   fi
35949 
35950 
35951 
35952   # Publish this variable in the help.
35953 
35954 
35955   if test "x$GNM" = x; then
35956     # The variable is not set by user, try to locate tool using the code snippet
35957     for ac_prog in gnm
35958 do
35959   # Extract the first word of "$ac_prog", so it can be a program name with args.
35960 set dummy $ac_prog; ac_word=$2
35961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35962 $as_echo_n "checking for $ac_word... " >&6; }
35963 if ${ac_cv_path_GNM+:} false; then :
35964   $as_echo_n "(cached) " >&6
35965 else
35966   case $GNM in
35967   [\\/]* | ?:[\\/]*)
35968   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35969   ;;
35970   *)
35971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35972 for as_dir in $PATH
35973 do
35974   IFS=$as_save_IFS
35975   test -z "$as_dir" && as_dir=.
35976     for ac_exec_ext in '' $ac_executable_extensions; do
35977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35978     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35980     break 2
35981   fi
35982 done
35983   done
35984 IFS=$as_save_IFS
35985 
35986   ;;
35987 esac
35988 fi
35989 GNM=$ac_cv_path_GNM
35990 if test -n "$GNM"; then
35991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35992 $as_echo "$GNM" >&6; }
35993 else
35994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35995 $as_echo "no" >&6; }
35996 fi
35997 
35998 
35999   test -n "$GNM" && break
36000 done
36001 
36002   else
36003     # The variable is set, but is it from the command line or the environment?
36004 
36005     # Try to remove the string !GNM! from our list.
36006     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36007     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36008       # If it failed, the variable was not from the command line. Ignore it,
36009       # but warn the user (except for BASH, which is always set by the calling BASH).
36010       if test "xGNM" != xBASH; then
36011         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36012 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36013       fi
36014       # Try to locate tool using the code snippet
36015       for ac_prog in gnm
36016 do
36017   # Extract the first word of "$ac_prog", so it can be a program name with args.
36018 set dummy $ac_prog; ac_word=$2
36019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36020 $as_echo_n "checking for $ac_word... " >&6; }
36021 if ${ac_cv_path_GNM+:} false; then :
36022   $as_echo_n "(cached) " >&6
36023 else
36024   case $GNM in
36025   [\\/]* | ?:[\\/]*)
36026   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36027   ;;
36028   *)
36029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36030 for as_dir in $PATH
36031 do
36032   IFS=$as_save_IFS
36033   test -z "$as_dir" && as_dir=.
36034     for ac_exec_ext in '' $ac_executable_extensions; do
36035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36036     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36038     break 2
36039   fi
36040 done
36041   done
36042 IFS=$as_save_IFS
36043 
36044   ;;
36045 esac
36046 fi
36047 GNM=$ac_cv_path_GNM
36048 if test -n "$GNM"; then
36049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36050 $as_echo "$GNM" >&6; }
36051 else
36052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36053 $as_echo "no" >&6; }
36054 fi
36055 
36056 
36057   test -n "$GNM" && break
36058 done
36059 
36060     else
36061       # If it succeeded, then it was overridden by the user. We will use it
36062       # for the tool.
36063 
36064       # First remove it from the list of overridden variables, so we can test
36065       # for unknown variables in the end.
36066       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36067 
36068       # Check if the provided tool contains a complete path.
36069       tool_specified="$GNM"
36070       tool_basename="${tool_specified##*/}"
36071       if test "x$tool_basename" = "x$tool_specified"; then
36072         # A command without a complete path is provided, search $PATH.
36073         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36074 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36075         # Extract the first word of "$tool_basename", so it can be a program name with args.
36076 set dummy $tool_basename; ac_word=$2
36077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36078 $as_echo_n "checking for $ac_word... " >&6; }
36079 if ${ac_cv_path_GNM+:} false; then :
36080   $as_echo_n "(cached) " >&6
36081 else
36082   case $GNM in
36083   [\\/]* | ?:[\\/]*)
36084   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36085   ;;
36086   *)
36087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36088 for as_dir in $PATH
36089 do
36090   IFS=$as_save_IFS
36091   test -z "$as_dir" && as_dir=.
36092     for ac_exec_ext in '' $ac_executable_extensions; do
36093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36094     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36096     break 2
36097   fi
36098 done
36099   done
36100 IFS=$as_save_IFS
36101 
36102   ;;
36103 esac
36104 fi
36105 GNM=$ac_cv_path_GNM
36106 if test -n "$GNM"; then
36107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36108 $as_echo "$GNM" >&6; }
36109 else
36110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36111 $as_echo "no" >&6; }
36112 fi
36113 
36114 
36115         if test "x$GNM" = x; then
36116           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36117         fi
36118       else
36119         # Otherwise we believe it is a complete path. Use it as it is.
36120         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36121 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36122         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36123 $as_echo_n "checking for GNM... " >&6; }
36124         if test ! -x "$tool_specified"; then
36125           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36126 $as_echo "not found" >&6; }
36127           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36128         fi
36129         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36130 $as_echo "$tool_specified" >&6; }
36131       fi
36132     fi
36133   fi
36134 
36135 
36136 
36137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36138 
36139   # First separate the path from the arguments. This will split at the first
36140   # space.
36141   complete="$GNM"
36142   path="${complete%% *}"
36143   tmp="$complete EOL"
36144   arguments="${tmp#* }"
36145 
36146   # Input might be given as Windows format, start by converting to
36147   # unix format.
36148   new_path=`$CYGPATH -u "$path"`
36149 
36150   # Now try to locate executable using which
36151   new_path=`$WHICH "$new_path" 2> /dev/null`
36152   # bat and cmd files are not always considered executable in cygwin causing which
36153   # to not find them
36154   if test "x$new_path" = x \
36155       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36156       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36157     new_path=`$CYGPATH -u "$path"`
36158   fi
36159   if test "x$new_path" = x; then
36160     # Oops. Which didn't find the executable.
36161     # The splitting of arguments from the executable at a space might have been incorrect,
36162     # since paths with space are more likely in Windows. Give it another try with the whole
36163     # argument.
36164     path="$complete"
36165     arguments="EOL"
36166     new_path=`$CYGPATH -u "$path"`
36167     new_path=`$WHICH "$new_path" 2> /dev/null`
36168     # bat and cmd files are not always considered executable in cygwin causing which
36169     # to not find them
36170     if test "x$new_path" = x \
36171         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36172         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36173       new_path=`$CYGPATH -u "$path"`
36174     fi
36175     if test "x$new_path" = x; then
36176       # It's still not found. Now this is an unrecoverable error.
36177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36178 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36179       has_space=`$ECHO "$complete" | $GREP " "`
36180       if test "x$has_space" != x; then
36181         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36182 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36183       fi
36184       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36185     fi
36186   fi
36187 
36188   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36189   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36190   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36191   # "foo.exe" is OK but "foo" is an error.
36192   #
36193   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36194   # It is also a way to make sure we got the proper file name for the real test later on.
36195   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36196   if test "x$test_shortpath" = x; then
36197     # Short path failed, file does not exist as specified.
36198     # Try adding .exe or .cmd
36199     if test -f "${new_path}.exe"; then
36200       input_to_shortpath="${new_path}.exe"
36201     elif test -f "${new_path}.cmd"; then
36202       input_to_shortpath="${new_path}.cmd"
36203     else
36204       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36205 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36206       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36207 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36208       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36209     fi
36210   else
36211     input_to_shortpath="$new_path"
36212   fi
36213 
36214   # Call helper function which possibly converts this using DOS-style short mode.
36215   # If so, the updated path is stored in $new_path.
36216   new_path="$input_to_shortpath"
36217 
36218   input_path="$input_to_shortpath"
36219   # Check if we need to convert this using DOS-style short mode. If the path
36220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36221   # take no chances and rewrite it.
36222   # Note: m4 eats our [], so we need to use [ and ] instead.
36223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36224   if test "x$has_forbidden_chars" != x; then
36225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36226     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36227     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36228     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36229       # Going to short mode and back again did indeed matter. Since short mode is
36230       # case insensitive, let's make it lowercase to improve readability.
36231       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36232       # Now convert it back to Unix-stile (cygpath)
36233       input_path=`$CYGPATH -u "$shortmode_path"`
36234       new_path="$input_path"
36235     fi
36236   fi
36237 
36238   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36239   if test "x$test_cygdrive_prefix" = x; then
36240     # As a simple fix, exclude /usr/bin since it's not a real path.
36241     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36242       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36243       # a path prefixed by /cygdrive for fixpath to work.
36244       new_path="$CYGWIN_ROOT_PATH$input_path"
36245     fi
36246   fi
36247 
36248   # remove trailing .exe if any
36249   new_path="${new_path/%.exe/}"
36250 
36251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36252 
36253   # First separate the path from the arguments. This will split at the first
36254   # space.
36255   complete="$GNM"
36256   path="${complete%% *}"
36257   tmp="$complete EOL"
36258   arguments="${tmp#* }"
36259 
36260   # Input might be given as Windows format, start by converting to
36261   # unix format.
36262   new_path="$path"
36263 
36264   windows_path="$new_path"
36265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36266     unix_path=`$CYGPATH -u "$windows_path"`
36267     new_path="$unix_path"
36268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36270     new_path="$unix_path"
36271   fi
36272 
36273 
36274   # Now try to locate executable using which
36275   new_path=`$WHICH "$new_path" 2> /dev/null`
36276 
36277   if test "x$new_path" = x; then
36278     # Oops. Which didn't find the executable.
36279     # The splitting of arguments from the executable at a space might have been incorrect,
36280     # since paths with space are more likely in Windows. Give it another try with the whole
36281     # argument.
36282     path="$complete"
36283     arguments="EOL"
36284     new_path="$path"
36285 
36286   windows_path="$new_path"
36287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36288     unix_path=`$CYGPATH -u "$windows_path"`
36289     new_path="$unix_path"
36290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36292     new_path="$unix_path"
36293   fi
36294 
36295 
36296     new_path=`$WHICH "$new_path" 2> /dev/null`
36297     # bat and cmd files are not always considered executable in MSYS causing which
36298     # to not find them
36299     if test "x$new_path" = x \
36300         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36301         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36302       new_path="$path"
36303 
36304   windows_path="$new_path"
36305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36306     unix_path=`$CYGPATH -u "$windows_path"`
36307     new_path="$unix_path"
36308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36310     new_path="$unix_path"
36311   fi
36312 
36313     fi
36314 
36315     if test "x$new_path" = x; then
36316       # It's still not found. Now this is an unrecoverable error.
36317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36318 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36319       has_space=`$ECHO "$complete" | $GREP " "`
36320       if test "x$has_space" != x; then
36321         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36322 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36323       fi
36324       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36325     fi
36326   fi
36327 
36328   # Now new_path has a complete unix path to the binary
36329   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36330     # Keep paths in /bin as-is, but remove trailing .exe if any
36331     new_path="${new_path/%.exe/}"
36332     # Do not save /bin paths to all_fixpath_prefixes!
36333   else
36334     # Not in mixed or Windows style, start by that.
36335     new_path=`cmd //c echo $new_path`
36336 
36337   input_path="$new_path"
36338   # Check if we need to convert this using DOS-style short mode. If the path
36339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36340   # take no chances and rewrite it.
36341   # Note: m4 eats our [], so we need to use [ and ] instead.
36342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36343   if test "x$has_forbidden_chars" != x; then
36344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36345     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36346   fi
36347 
36348     # Output is in $new_path
36349 
36350   windows_path="$new_path"
36351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36352     unix_path=`$CYGPATH -u "$windows_path"`
36353     new_path="$unix_path"
36354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36356     new_path="$unix_path"
36357   fi
36358 
36359     # remove trailing .exe if any
36360     new_path="${new_path/%.exe/}"
36361 
36362     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36363     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36364   fi
36365 
36366   else
36367     # We're on a unix platform. Hooray! :)
36368     # First separate the path from the arguments. This will split at the first
36369     # space.
36370     complete="$GNM"
36371     path="${complete%% *}"
36372     tmp="$complete EOL"
36373     arguments="${tmp#* }"
36374 
36375     # Cannot rely on the command "which" here since it doesn't always work.
36376     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36377     if test -z "$is_absolute_path"; then
36378       # Path to executable is not absolute. Find it.
36379       IFS_save="$IFS"
36380       IFS=:
36381       for p in $PATH; do
36382         if test -f "$p/$path" && test -x "$p/$path"; then
36383           new_path="$p/$path"
36384           break
36385         fi
36386       done
36387       IFS="$IFS_save"
36388     else
36389       # This is an absolute path, we can use it without further modifications.
36390       new_path="$path"
36391     fi
36392 
36393     if test "x$new_path" = x; then
36394       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36395 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36396       has_space=`$ECHO "$complete" | $GREP " "`
36397       if test "x$has_space" != x; then
36398         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36399 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36400       fi
36401       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36402     fi
36403   fi
36404 
36405   # Now join together the path and the arguments once again
36406   if test "x$arguments" != xEOL; then
36407     new_complete="$new_path ${arguments% *}"
36408   else
36409     new_complete="$new_path"
36410   fi
36411 
36412   if test "x$complete" != "x$new_complete"; then
36413     GNM="$new_complete"
36414     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36415 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36416   fi
36417 
36418 
36419 
36420 
36421   # Publish this variable in the help.
36422 
36423 
36424   if test "x$MCS" = x; then
36425     # The variable is not set by user, try to locate tool using the code snippet
36426     for ac_prog in mcs
36427 do
36428   # Extract the first word of "$ac_prog", so it can be a program name with args.
36429 set dummy $ac_prog; ac_word=$2
36430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36431 $as_echo_n "checking for $ac_word... " >&6; }
36432 if ${ac_cv_path_MCS+:} false; then :
36433   $as_echo_n "(cached) " >&6
36434 else
36435   case $MCS in
36436   [\\/]* | ?:[\\/]*)
36437   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36438   ;;
36439   *)
36440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36441 for as_dir in $PATH
36442 do
36443   IFS=$as_save_IFS
36444   test -z "$as_dir" && as_dir=.
36445     for ac_exec_ext in '' $ac_executable_extensions; do
36446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36447     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36449     break 2
36450   fi
36451 done
36452   done
36453 IFS=$as_save_IFS
36454 
36455   ;;
36456 esac
36457 fi
36458 MCS=$ac_cv_path_MCS
36459 if test -n "$MCS"; then
36460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36461 $as_echo "$MCS" >&6; }
36462 else
36463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36464 $as_echo "no" >&6; }
36465 fi
36466 
36467 
36468   test -n "$MCS" && break
36469 done
36470 
36471   else
36472     # The variable is set, but is it from the command line or the environment?
36473 
36474     # Try to remove the string !MCS! from our list.
36475     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36476     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36477       # If it failed, the variable was not from the command line. Ignore it,
36478       # but warn the user (except for BASH, which is always set by the calling BASH).
36479       if test "xMCS" != xBASH; then
36480         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36481 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36482       fi
36483       # Try to locate tool using the code snippet
36484       for ac_prog in mcs
36485 do
36486   # Extract the first word of "$ac_prog", so it can be a program name with args.
36487 set dummy $ac_prog; ac_word=$2
36488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36489 $as_echo_n "checking for $ac_word... " >&6; }
36490 if ${ac_cv_path_MCS+:} false; then :
36491   $as_echo_n "(cached) " >&6
36492 else
36493   case $MCS in
36494   [\\/]* | ?:[\\/]*)
36495   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36496   ;;
36497   *)
36498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36499 for as_dir in $PATH
36500 do
36501   IFS=$as_save_IFS
36502   test -z "$as_dir" && as_dir=.
36503     for ac_exec_ext in '' $ac_executable_extensions; do
36504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36505     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36507     break 2
36508   fi
36509 done
36510   done
36511 IFS=$as_save_IFS
36512 
36513   ;;
36514 esac
36515 fi
36516 MCS=$ac_cv_path_MCS
36517 if test -n "$MCS"; then
36518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36519 $as_echo "$MCS" >&6; }
36520 else
36521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36522 $as_echo "no" >&6; }
36523 fi
36524 
36525 
36526   test -n "$MCS" && break
36527 done
36528 
36529     else
36530       # If it succeeded, then it was overridden by the user. We will use it
36531       # for the tool.
36532 
36533       # First remove it from the list of overridden variables, so we can test
36534       # for unknown variables in the end.
36535       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36536 
36537       # Check if the provided tool contains a complete path.
36538       tool_specified="$MCS"
36539       tool_basename="${tool_specified##*/}"
36540       if test "x$tool_basename" = "x$tool_specified"; then
36541         # A command without a complete path is provided, search $PATH.
36542         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36543 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36544         # Extract the first word of "$tool_basename", so it can be a program name with args.
36545 set dummy $tool_basename; ac_word=$2
36546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36547 $as_echo_n "checking for $ac_word... " >&6; }
36548 if ${ac_cv_path_MCS+:} false; then :
36549   $as_echo_n "(cached) " >&6
36550 else
36551   case $MCS in
36552   [\\/]* | ?:[\\/]*)
36553   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36554   ;;
36555   *)
36556   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36557 for as_dir in $PATH
36558 do
36559   IFS=$as_save_IFS
36560   test -z "$as_dir" && as_dir=.
36561     for ac_exec_ext in '' $ac_executable_extensions; do
36562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36563     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36565     break 2
36566   fi
36567 done
36568   done
36569 IFS=$as_save_IFS
36570 
36571   ;;
36572 esac
36573 fi
36574 MCS=$ac_cv_path_MCS
36575 if test -n "$MCS"; then
36576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36577 $as_echo "$MCS" >&6; }
36578 else
36579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36580 $as_echo "no" >&6; }
36581 fi
36582 
36583 
36584         if test "x$MCS" = x; then
36585           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36586         fi
36587       else
36588         # Otherwise we believe it is a complete path. Use it as it is.
36589         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36590 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36591         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36592 $as_echo_n "checking for MCS... " >&6; }
36593         if test ! -x "$tool_specified"; then
36594           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36595 $as_echo "not found" >&6; }
36596           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36597         fi
36598         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36599 $as_echo "$tool_specified" >&6; }
36600       fi
36601     fi
36602   fi
36603 
36604 
36605 
36606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36607 
36608   # First separate the path from the arguments. This will split at the first
36609   # space.
36610   complete="$MCS"
36611   path="${complete%% *}"
36612   tmp="$complete EOL"
36613   arguments="${tmp#* }"
36614 
36615   # Input might be given as Windows format, start by converting to
36616   # unix format.
36617   new_path=`$CYGPATH -u "$path"`
36618 
36619   # Now try to locate executable using which
36620   new_path=`$WHICH "$new_path" 2> /dev/null`
36621   # bat and cmd files are not always considered executable in cygwin causing which
36622   # to not find them
36623   if test "x$new_path" = x \
36624       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36625       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36626     new_path=`$CYGPATH -u "$path"`
36627   fi
36628   if test "x$new_path" = x; then
36629     # Oops. Which didn't find the executable.
36630     # The splitting of arguments from the executable at a space might have been incorrect,
36631     # since paths with space are more likely in Windows. Give it another try with the whole
36632     # argument.
36633     path="$complete"
36634     arguments="EOL"
36635     new_path=`$CYGPATH -u "$path"`
36636     new_path=`$WHICH "$new_path" 2> /dev/null`
36637     # bat and cmd files are not always considered executable in cygwin causing which
36638     # to not find them
36639     if test "x$new_path" = x \
36640         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36641         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36642       new_path=`$CYGPATH -u "$path"`
36643     fi
36644     if test "x$new_path" = x; then
36645       # It's still not found. Now this is an unrecoverable error.
36646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36647 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36648       has_space=`$ECHO "$complete" | $GREP " "`
36649       if test "x$has_space" != x; then
36650         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36651 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36652       fi
36653       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36654     fi
36655   fi
36656 
36657   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36658   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36659   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36660   # "foo.exe" is OK but "foo" is an error.
36661   #
36662   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36663   # It is also a way to make sure we got the proper file name for the real test later on.
36664   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36665   if test "x$test_shortpath" = x; then
36666     # Short path failed, file does not exist as specified.
36667     # Try adding .exe or .cmd
36668     if test -f "${new_path}.exe"; then
36669       input_to_shortpath="${new_path}.exe"
36670     elif test -f "${new_path}.cmd"; then
36671       input_to_shortpath="${new_path}.cmd"
36672     else
36673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36674 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36675       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36676 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36677       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36678     fi
36679   else
36680     input_to_shortpath="$new_path"
36681   fi
36682 
36683   # Call helper function which possibly converts this using DOS-style short mode.
36684   # If so, the updated path is stored in $new_path.
36685   new_path="$input_to_shortpath"
36686 
36687   input_path="$input_to_shortpath"
36688   # Check if we need to convert this using DOS-style short mode. If the path
36689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36690   # take no chances and rewrite it.
36691   # Note: m4 eats our [], so we need to use [ and ] instead.
36692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36693   if test "x$has_forbidden_chars" != x; then
36694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36695     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36696     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36697     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36698       # Going to short mode and back again did indeed matter. Since short mode is
36699       # case insensitive, let's make it lowercase to improve readability.
36700       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36701       # Now convert it back to Unix-stile (cygpath)
36702       input_path=`$CYGPATH -u "$shortmode_path"`
36703       new_path="$input_path"
36704     fi
36705   fi
36706 
36707   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36708   if test "x$test_cygdrive_prefix" = x; then
36709     # As a simple fix, exclude /usr/bin since it's not a real path.
36710     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36711       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36712       # a path prefixed by /cygdrive for fixpath to work.
36713       new_path="$CYGWIN_ROOT_PATH$input_path"
36714     fi
36715   fi
36716 
36717   # remove trailing .exe if any
36718   new_path="${new_path/%.exe/}"
36719 
36720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36721 
36722   # First separate the path from the arguments. This will split at the first
36723   # space.
36724   complete="$MCS"
36725   path="${complete%% *}"
36726   tmp="$complete EOL"
36727   arguments="${tmp#* }"
36728 
36729   # Input might be given as Windows format, start by converting to
36730   # unix format.
36731   new_path="$path"
36732 
36733   windows_path="$new_path"
36734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36735     unix_path=`$CYGPATH -u "$windows_path"`
36736     new_path="$unix_path"
36737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36739     new_path="$unix_path"
36740   fi
36741 
36742 
36743   # Now try to locate executable using which
36744   new_path=`$WHICH "$new_path" 2> /dev/null`
36745 
36746   if test "x$new_path" = x; then
36747     # Oops. Which didn't find the executable.
36748     # The splitting of arguments from the executable at a space might have been incorrect,
36749     # since paths with space are more likely in Windows. Give it another try with the whole
36750     # argument.
36751     path="$complete"
36752     arguments="EOL"
36753     new_path="$path"
36754 
36755   windows_path="$new_path"
36756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36757     unix_path=`$CYGPATH -u "$windows_path"`
36758     new_path="$unix_path"
36759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36761     new_path="$unix_path"
36762   fi
36763 
36764 
36765     new_path=`$WHICH "$new_path" 2> /dev/null`
36766     # bat and cmd files are not always considered executable in MSYS causing which
36767     # to not find them
36768     if test "x$new_path" = x \
36769         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36770         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36771       new_path="$path"
36772 
36773   windows_path="$new_path"
36774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36775     unix_path=`$CYGPATH -u "$windows_path"`
36776     new_path="$unix_path"
36777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36779     new_path="$unix_path"
36780   fi
36781 
36782     fi
36783 
36784     if test "x$new_path" = x; then
36785       # It's still not found. Now this is an unrecoverable error.
36786       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36787 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36788       has_space=`$ECHO "$complete" | $GREP " "`
36789       if test "x$has_space" != x; then
36790         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36791 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36792       fi
36793       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36794     fi
36795   fi
36796 
36797   # Now new_path has a complete unix path to the binary
36798   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36799     # Keep paths in /bin as-is, but remove trailing .exe if any
36800     new_path="${new_path/%.exe/}"
36801     # Do not save /bin paths to all_fixpath_prefixes!
36802   else
36803     # Not in mixed or Windows style, start by that.
36804     new_path=`cmd //c echo $new_path`
36805 
36806   input_path="$new_path"
36807   # Check if we need to convert this using DOS-style short mode. If the path
36808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36809   # take no chances and rewrite it.
36810   # Note: m4 eats our [], so we need to use [ and ] instead.
36811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36812   if test "x$has_forbidden_chars" != x; then
36813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36814     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36815   fi
36816 
36817     # Output is in $new_path
36818 
36819   windows_path="$new_path"
36820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36821     unix_path=`$CYGPATH -u "$windows_path"`
36822     new_path="$unix_path"
36823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36825     new_path="$unix_path"
36826   fi
36827 
36828     # remove trailing .exe if any
36829     new_path="${new_path/%.exe/}"
36830 
36831     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36832     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36833   fi
36834 
36835   else
36836     # We're on a unix platform. Hooray! :)
36837     # First separate the path from the arguments. This will split at the first
36838     # space.
36839     complete="$MCS"
36840     path="${complete%% *}"
36841     tmp="$complete EOL"
36842     arguments="${tmp#* }"
36843 
36844     # Cannot rely on the command "which" here since it doesn't always work.
36845     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36846     if test -z "$is_absolute_path"; then
36847       # Path to executable is not absolute. Find it.
36848       IFS_save="$IFS"
36849       IFS=:
36850       for p in $PATH; do
36851         if test -f "$p/$path" && test -x "$p/$path"; then
36852           new_path="$p/$path"
36853           break
36854         fi
36855       done
36856       IFS="$IFS_save"
36857     else
36858       # This is an absolute path, we can use it without further modifications.
36859       new_path="$path"
36860     fi
36861 
36862     if test "x$new_path" = x; then
36863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36864 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36865       has_space=`$ECHO "$complete" | $GREP " "`
36866       if test "x$has_space" != x; then
36867         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36868 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36869       fi
36870       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36871     fi
36872   fi
36873 
36874   # Now join together the path and the arguments once again
36875   if test "x$arguments" != xEOL; then
36876     new_complete="$new_path ${arguments% *}"
36877   else
36878     new_complete="$new_path"
36879   fi
36880 
36881   if test "x$complete" != "x$new_complete"; then
36882     MCS="$new_complete"
36883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36884 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36885   fi
36886 
36887   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36888     # FIXME: we should unify this with the solaris case above.
36889 
36890 
36891   # Publish this variable in the help.
36892 
36893 
36894   if test "x$STRIP" = x; then
36895     # The variable is not set by user, try to locate tool using the code snippet
36896     if test -n "$ac_tool_prefix"; then
36897   for ac_prog in strip
36898   do
36899     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36900 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36902 $as_echo_n "checking for $ac_word... " >&6; }
36903 if ${ac_cv_prog_STRIP+:} false; then :
36904   $as_echo_n "(cached) " >&6
36905 else
36906   if test -n "$STRIP"; then
36907   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36908 else
36909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36910 for as_dir in $PATH
36911 do
36912   IFS=$as_save_IFS
36913   test -z "$as_dir" && as_dir=.
36914     for ac_exec_ext in '' $ac_executable_extensions; do
36915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36916     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36918     break 2
36919   fi
36920 done
36921   done
36922 IFS=$as_save_IFS
36923 
36924 fi
36925 fi
36926 STRIP=$ac_cv_prog_STRIP
36927 if test -n "$STRIP"; then
36928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36929 $as_echo "$STRIP" >&6; }
36930 else
36931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36932 $as_echo "no" >&6; }
36933 fi
36934 
36935 
36936     test -n "$STRIP" && break
36937   done
36938 fi
36939 if test -z "$STRIP"; then
36940   ac_ct_STRIP=$STRIP
36941   for ac_prog in strip
36942 do
36943   # Extract the first word of "$ac_prog", so it can be a program name with args.
36944 set dummy $ac_prog; ac_word=$2
36945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36946 $as_echo_n "checking for $ac_word... " >&6; }
36947 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36948   $as_echo_n "(cached) " >&6
36949 else
36950   if test -n "$ac_ct_STRIP"; then
36951   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36952 else
36953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36954 for as_dir in $PATH
36955 do
36956   IFS=$as_save_IFS
36957   test -z "$as_dir" && as_dir=.
36958     for ac_exec_ext in '' $ac_executable_extensions; do
36959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36960     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36962     break 2
36963   fi
36964 done
36965   done
36966 IFS=$as_save_IFS
36967 
36968 fi
36969 fi
36970 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36971 if test -n "$ac_ct_STRIP"; then
36972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36973 $as_echo "$ac_ct_STRIP" >&6; }
36974 else
36975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36976 $as_echo "no" >&6; }
36977 fi
36978 
36979 
36980   test -n "$ac_ct_STRIP" && break
36981 done
36982 
36983   if test "x$ac_ct_STRIP" = x; then
36984     STRIP=""
36985   else
36986     case $cross_compiling:$ac_tool_warned in
36987 yes:)
36988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36989 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36990 ac_tool_warned=yes ;;
36991 esac
36992     STRIP=$ac_ct_STRIP
36993   fi
36994 fi
36995 
36996   else
36997     # The variable is set, but is it from the command line or the environment?
36998 
36999     # Try to remove the string !STRIP! from our list.
37000     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37001     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37002       # If it failed, the variable was not from the command line. Ignore it,
37003       # but warn the user (except for BASH, which is always set by the calling BASH).
37004       if test "xSTRIP" != xBASH; then
37005         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37006 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37007       fi
37008       # Try to locate tool using the code snippet
37009       if test -n "$ac_tool_prefix"; then
37010   for ac_prog in strip
37011   do
37012     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37013 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37015 $as_echo_n "checking for $ac_word... " >&6; }
37016 if ${ac_cv_prog_STRIP+:} false; then :
37017   $as_echo_n "(cached) " >&6
37018 else
37019   if test -n "$STRIP"; then
37020   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37021 else
37022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37023 for as_dir in $PATH
37024 do
37025   IFS=$as_save_IFS
37026   test -z "$as_dir" && as_dir=.
37027     for ac_exec_ext in '' $ac_executable_extensions; do
37028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37029     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37031     break 2
37032   fi
37033 done
37034   done
37035 IFS=$as_save_IFS
37036 
37037 fi
37038 fi
37039 STRIP=$ac_cv_prog_STRIP
37040 if test -n "$STRIP"; then
37041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37042 $as_echo "$STRIP" >&6; }
37043 else
37044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37045 $as_echo "no" >&6; }
37046 fi
37047 
37048 
37049     test -n "$STRIP" && break
37050   done
37051 fi
37052 if test -z "$STRIP"; then
37053   ac_ct_STRIP=$STRIP
37054   for ac_prog in strip
37055 do
37056   # Extract the first word of "$ac_prog", so it can be a program name with args.
37057 set dummy $ac_prog; ac_word=$2
37058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37059 $as_echo_n "checking for $ac_word... " >&6; }
37060 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37061   $as_echo_n "(cached) " >&6
37062 else
37063   if test -n "$ac_ct_STRIP"; then
37064   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37065 else
37066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37067 for as_dir in $PATH
37068 do
37069   IFS=$as_save_IFS
37070   test -z "$as_dir" && as_dir=.
37071     for ac_exec_ext in '' $ac_executable_extensions; do
37072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37073     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37075     break 2
37076   fi
37077 done
37078   done
37079 IFS=$as_save_IFS
37080 
37081 fi
37082 fi
37083 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37084 if test -n "$ac_ct_STRIP"; then
37085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37086 $as_echo "$ac_ct_STRIP" >&6; }
37087 else
37088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37089 $as_echo "no" >&6; }
37090 fi
37091 
37092 
37093   test -n "$ac_ct_STRIP" && break
37094 done
37095 
37096   if test "x$ac_ct_STRIP" = x; then
37097     STRIP=""
37098   else
37099     case $cross_compiling:$ac_tool_warned in
37100 yes:)
37101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37102 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37103 ac_tool_warned=yes ;;
37104 esac
37105     STRIP=$ac_ct_STRIP
37106   fi
37107 fi
37108 
37109     else
37110       # If it succeeded, then it was overridden by the user. We will use it
37111       # for the tool.
37112 
37113       # First remove it from the list of overridden variables, so we can test
37114       # for unknown variables in the end.
37115       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37116 
37117       # Check if the provided tool contains a complete path.
37118       tool_specified="$STRIP"
37119       tool_basename="${tool_specified##*/}"
37120       if test "x$tool_basename" = "x$tool_specified"; then
37121         # A command without a complete path is provided, search $PATH.
37122         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37123 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37124         # Extract the first word of "$tool_basename", so it can be a program name with args.
37125 set dummy $tool_basename; ac_word=$2
37126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37127 $as_echo_n "checking for $ac_word... " >&6; }
37128 if ${ac_cv_path_STRIP+:} false; then :
37129   $as_echo_n "(cached) " >&6
37130 else
37131   case $STRIP in
37132   [\\/]* | ?:[\\/]*)
37133   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37134   ;;
37135   *)
37136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37137 for as_dir in $PATH
37138 do
37139   IFS=$as_save_IFS
37140   test -z "$as_dir" && as_dir=.
37141     for ac_exec_ext in '' $ac_executable_extensions; do
37142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37143     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37145     break 2
37146   fi
37147 done
37148   done
37149 IFS=$as_save_IFS
37150 
37151   ;;
37152 esac
37153 fi
37154 STRIP=$ac_cv_path_STRIP
37155 if test -n "$STRIP"; then
37156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37157 $as_echo "$STRIP" >&6; }
37158 else
37159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37160 $as_echo "no" >&6; }
37161 fi
37162 
37163 
37164         if test "x$STRIP" = x; then
37165           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37166         fi
37167       else
37168         # Otherwise we believe it is a complete path. Use it as it is.
37169         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37170 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37171         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37172 $as_echo_n "checking for STRIP... " >&6; }
37173         if test ! -x "$tool_specified"; then
37174           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37175 $as_echo "not found" >&6; }
37176           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37177         fi
37178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37179 $as_echo "$tool_specified" >&6; }
37180       fi
37181     fi
37182   fi
37183 
37184 
37185 
37186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37187 
37188   # First separate the path from the arguments. This will split at the first
37189   # space.
37190   complete="$STRIP"
37191   path="${complete%% *}"
37192   tmp="$complete EOL"
37193   arguments="${tmp#* }"
37194 
37195   # Input might be given as Windows format, start by converting to
37196   # unix format.
37197   new_path=`$CYGPATH -u "$path"`
37198 
37199   # Now try to locate executable using which
37200   new_path=`$WHICH "$new_path" 2> /dev/null`
37201   # bat and cmd files are not always considered executable in cygwin causing which
37202   # to not find them
37203   if test "x$new_path" = x \
37204       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37205       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37206     new_path=`$CYGPATH -u "$path"`
37207   fi
37208   if test "x$new_path" = x; then
37209     # Oops. Which didn't find the executable.
37210     # The splitting of arguments from the executable at a space might have been incorrect,
37211     # since paths with space are more likely in Windows. Give it another try with the whole
37212     # argument.
37213     path="$complete"
37214     arguments="EOL"
37215     new_path=`$CYGPATH -u "$path"`
37216     new_path=`$WHICH "$new_path" 2> /dev/null`
37217     # bat and cmd files are not always considered executable in cygwin causing which
37218     # to not find them
37219     if test "x$new_path" = x \
37220         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37221         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37222       new_path=`$CYGPATH -u "$path"`
37223     fi
37224     if test "x$new_path" = x; then
37225       # It's still not found. Now this is an unrecoverable error.
37226       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37227 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37228       has_space=`$ECHO "$complete" | $GREP " "`
37229       if test "x$has_space" != x; then
37230         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37232       fi
37233       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37234     fi
37235   fi
37236 
37237   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37238   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37239   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37240   # "foo.exe" is OK but "foo" is an error.
37241   #
37242   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37243   # It is also a way to make sure we got the proper file name for the real test later on.
37244   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37245   if test "x$test_shortpath" = x; then
37246     # Short path failed, file does not exist as specified.
37247     # Try adding .exe or .cmd
37248     if test -f "${new_path}.exe"; then
37249       input_to_shortpath="${new_path}.exe"
37250     elif test -f "${new_path}.cmd"; then
37251       input_to_shortpath="${new_path}.cmd"
37252     else
37253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37254 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37255       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37256 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37257       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37258     fi
37259   else
37260     input_to_shortpath="$new_path"
37261   fi
37262 
37263   # Call helper function which possibly converts this using DOS-style short mode.
37264   # If so, the updated path is stored in $new_path.
37265   new_path="$input_to_shortpath"
37266 
37267   input_path="$input_to_shortpath"
37268   # Check if we need to convert this using DOS-style short mode. If the path
37269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37270   # take no chances and rewrite it.
37271   # Note: m4 eats our [], so we need to use [ and ] instead.
37272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37273   if test "x$has_forbidden_chars" != x; then
37274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37275     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37276     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37277     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37278       # Going to short mode and back again did indeed matter. Since short mode is
37279       # case insensitive, let's make it lowercase to improve readability.
37280       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37281       # Now convert it back to Unix-stile (cygpath)
37282       input_path=`$CYGPATH -u "$shortmode_path"`
37283       new_path="$input_path"
37284     fi
37285   fi
37286 
37287   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37288   if test "x$test_cygdrive_prefix" = x; then
37289     # As a simple fix, exclude /usr/bin since it's not a real path.
37290     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37291       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37292       # a path prefixed by /cygdrive for fixpath to work.
37293       new_path="$CYGWIN_ROOT_PATH$input_path"
37294     fi
37295   fi
37296 
37297   # remove trailing .exe if any
37298   new_path="${new_path/%.exe/}"
37299 
37300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37301 
37302   # First separate the path from the arguments. This will split at the first
37303   # space.
37304   complete="$STRIP"
37305   path="${complete%% *}"
37306   tmp="$complete EOL"
37307   arguments="${tmp#* }"
37308 
37309   # Input might be given as Windows format, start by converting to
37310   # unix format.
37311   new_path="$path"
37312 
37313   windows_path="$new_path"
37314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37315     unix_path=`$CYGPATH -u "$windows_path"`
37316     new_path="$unix_path"
37317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37319     new_path="$unix_path"
37320   fi
37321 
37322 
37323   # Now try to locate executable using which
37324   new_path=`$WHICH "$new_path" 2> /dev/null`
37325 
37326   if test "x$new_path" = x; then
37327     # Oops. Which didn't find the executable.
37328     # The splitting of arguments from the executable at a space might have been incorrect,
37329     # since paths with space are more likely in Windows. Give it another try with the whole
37330     # argument.
37331     path="$complete"
37332     arguments="EOL"
37333     new_path="$path"
37334 
37335   windows_path="$new_path"
37336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37337     unix_path=`$CYGPATH -u "$windows_path"`
37338     new_path="$unix_path"
37339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37341     new_path="$unix_path"
37342   fi
37343 
37344 
37345     new_path=`$WHICH "$new_path" 2> /dev/null`
37346     # bat and cmd files are not always considered executable in MSYS causing which
37347     # to not find them
37348     if test "x$new_path" = x \
37349         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37350         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37351       new_path="$path"
37352 
37353   windows_path="$new_path"
37354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37355     unix_path=`$CYGPATH -u "$windows_path"`
37356     new_path="$unix_path"
37357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37359     new_path="$unix_path"
37360   fi
37361 
37362     fi
37363 
37364     if test "x$new_path" = x; then
37365       # It's still not found. Now this is an unrecoverable error.
37366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37367 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37368       has_space=`$ECHO "$complete" | $GREP " "`
37369       if test "x$has_space" != x; then
37370         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37372       fi
37373       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37374     fi
37375   fi
37376 
37377   # Now new_path has a complete unix path to the binary
37378   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37379     # Keep paths in /bin as-is, but remove trailing .exe if any
37380     new_path="${new_path/%.exe/}"
37381     # Do not save /bin paths to all_fixpath_prefixes!
37382   else
37383     # Not in mixed or Windows style, start by that.
37384     new_path=`cmd //c echo $new_path`
37385 
37386   input_path="$new_path"
37387   # Check if we need to convert this using DOS-style short mode. If the path
37388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37389   # take no chances and rewrite it.
37390   # Note: m4 eats our [], so we need to use [ and ] instead.
37391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37392   if test "x$has_forbidden_chars" != x; then
37393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37395   fi
37396 
37397     # Output is in $new_path
37398 
37399   windows_path="$new_path"
37400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37401     unix_path=`$CYGPATH -u "$windows_path"`
37402     new_path="$unix_path"
37403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37405     new_path="$unix_path"
37406   fi
37407 
37408     # remove trailing .exe if any
37409     new_path="${new_path/%.exe/}"
37410 
37411     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37412     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37413   fi
37414 
37415   else
37416     # We're on a unix platform. Hooray! :)
37417     # First separate the path from the arguments. This will split at the first
37418     # space.
37419     complete="$STRIP"
37420     path="${complete%% *}"
37421     tmp="$complete EOL"
37422     arguments="${tmp#* }"
37423 
37424     # Cannot rely on the command "which" here since it doesn't always work.
37425     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37426     if test -z "$is_absolute_path"; then
37427       # Path to executable is not absolute. Find it.
37428       IFS_save="$IFS"
37429       IFS=:
37430       for p in $PATH; do
37431         if test -f "$p/$path" && test -x "$p/$path"; then
37432           new_path="$p/$path"
37433           break
37434         fi
37435       done
37436       IFS="$IFS_save"
37437     else
37438       # This is an absolute path, we can use it without further modifications.
37439       new_path="$path"
37440     fi
37441 
37442     if test "x$new_path" = x; then
37443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37444 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37445       has_space=`$ECHO "$complete" | $GREP " "`
37446       if test "x$has_space" != x; then
37447         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37448 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37449       fi
37450       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37451     fi
37452   fi
37453 
37454   # Now join together the path and the arguments once again
37455   if test "x$arguments" != xEOL; then
37456     new_complete="$new_path ${arguments% *}"
37457   else
37458     new_complete="$new_path"
37459   fi
37460 
37461   if test "x$complete" != "x$new_complete"; then
37462     STRIP="$new_complete"
37463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37464 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37465   fi
37466 
37467 
37468 
37469   # Publish this variable in the help.
37470 
37471 
37472   if test "x$NM" = x; then
37473     # The variable is not set by user, try to locate tool using the code snippet
37474     if test -n "$ac_tool_prefix"; then
37475   for ac_prog in nm
37476   do
37477     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37478 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37480 $as_echo_n "checking for $ac_word... " >&6; }
37481 if ${ac_cv_prog_NM+:} false; then :
37482   $as_echo_n "(cached) " >&6
37483 else
37484   if test -n "$NM"; then
37485   ac_cv_prog_NM="$NM" # Let the user override the test.
37486 else
37487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37488 for as_dir in $PATH
37489 do
37490   IFS=$as_save_IFS
37491   test -z "$as_dir" && as_dir=.
37492     for ac_exec_ext in '' $ac_executable_extensions; do
37493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37494     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37496     break 2
37497   fi
37498 done
37499   done
37500 IFS=$as_save_IFS
37501 
37502 fi
37503 fi
37504 NM=$ac_cv_prog_NM
37505 if test -n "$NM"; then
37506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37507 $as_echo "$NM" >&6; }
37508 else
37509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37510 $as_echo "no" >&6; }
37511 fi
37512 
37513 
37514     test -n "$NM" && break
37515   done
37516 fi
37517 if test -z "$NM"; then
37518   ac_ct_NM=$NM
37519   for ac_prog in nm
37520 do
37521   # Extract the first word of "$ac_prog", so it can be a program name with args.
37522 set dummy $ac_prog; ac_word=$2
37523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37524 $as_echo_n "checking for $ac_word... " >&6; }
37525 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37526   $as_echo_n "(cached) " >&6
37527 else
37528   if test -n "$ac_ct_NM"; then
37529   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37530 else
37531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37532 for as_dir in $PATH
37533 do
37534   IFS=$as_save_IFS
37535   test -z "$as_dir" && as_dir=.
37536     for ac_exec_ext in '' $ac_executable_extensions; do
37537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37538     ac_cv_prog_ac_ct_NM="$ac_prog"
37539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37540     break 2
37541   fi
37542 done
37543   done
37544 IFS=$as_save_IFS
37545 
37546 fi
37547 fi
37548 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37549 if test -n "$ac_ct_NM"; then
37550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37551 $as_echo "$ac_ct_NM" >&6; }
37552 else
37553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37554 $as_echo "no" >&6; }
37555 fi
37556 
37557 
37558   test -n "$ac_ct_NM" && break
37559 done
37560 
37561   if test "x$ac_ct_NM" = x; then
37562     NM=""
37563   else
37564     case $cross_compiling:$ac_tool_warned in
37565 yes:)
37566 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37567 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37568 ac_tool_warned=yes ;;
37569 esac
37570     NM=$ac_ct_NM
37571   fi
37572 fi
37573 
37574   else
37575     # The variable is set, but is it from the command line or the environment?
37576 
37577     # Try to remove the string !NM! from our list.
37578     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37579     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37580       # If it failed, the variable was not from the command line. Ignore it,
37581       # but warn the user (except for BASH, which is always set by the calling BASH).
37582       if test "xNM" != xBASH; then
37583         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37584 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37585       fi
37586       # Try to locate tool using the code snippet
37587       if test -n "$ac_tool_prefix"; then
37588   for ac_prog in nm
37589   do
37590     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37591 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37593 $as_echo_n "checking for $ac_word... " >&6; }
37594 if ${ac_cv_prog_NM+:} false; then :
37595   $as_echo_n "(cached) " >&6
37596 else
37597   if test -n "$NM"; then
37598   ac_cv_prog_NM="$NM" # Let the user override the test.
37599 else
37600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37601 for as_dir in $PATH
37602 do
37603   IFS=$as_save_IFS
37604   test -z "$as_dir" && as_dir=.
37605     for ac_exec_ext in '' $ac_executable_extensions; do
37606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37607     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37609     break 2
37610   fi
37611 done
37612   done
37613 IFS=$as_save_IFS
37614 
37615 fi
37616 fi
37617 NM=$ac_cv_prog_NM
37618 if test -n "$NM"; then
37619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37620 $as_echo "$NM" >&6; }
37621 else
37622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37623 $as_echo "no" >&6; }
37624 fi
37625 
37626 
37627     test -n "$NM" && break
37628   done
37629 fi
37630 if test -z "$NM"; then
37631   ac_ct_NM=$NM
37632   for ac_prog in nm
37633 do
37634   # Extract the first word of "$ac_prog", so it can be a program name with args.
37635 set dummy $ac_prog; ac_word=$2
37636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37637 $as_echo_n "checking for $ac_word... " >&6; }
37638 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37639   $as_echo_n "(cached) " >&6
37640 else
37641   if test -n "$ac_ct_NM"; then
37642   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37643 else
37644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37645 for as_dir in $PATH
37646 do
37647   IFS=$as_save_IFS
37648   test -z "$as_dir" && as_dir=.
37649     for ac_exec_ext in '' $ac_executable_extensions; do
37650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37651     ac_cv_prog_ac_ct_NM="$ac_prog"
37652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37653     break 2
37654   fi
37655 done
37656   done
37657 IFS=$as_save_IFS
37658 
37659 fi
37660 fi
37661 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37662 if test -n "$ac_ct_NM"; then
37663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37664 $as_echo "$ac_ct_NM" >&6; }
37665 else
37666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37667 $as_echo "no" >&6; }
37668 fi
37669 
37670 
37671   test -n "$ac_ct_NM" && break
37672 done
37673 
37674   if test "x$ac_ct_NM" = x; then
37675     NM=""
37676   else
37677     case $cross_compiling:$ac_tool_warned in
37678 yes:)
37679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37680 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37681 ac_tool_warned=yes ;;
37682 esac
37683     NM=$ac_ct_NM
37684   fi
37685 fi
37686 
37687     else
37688       # If it succeeded, then it was overridden by the user. We will use it
37689       # for the tool.
37690 
37691       # First remove it from the list of overridden variables, so we can test
37692       # for unknown variables in the end.
37693       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37694 
37695       # Check if the provided tool contains a complete path.
37696       tool_specified="$NM"
37697       tool_basename="${tool_specified##*/}"
37698       if test "x$tool_basename" = "x$tool_specified"; then
37699         # A command without a complete path is provided, search $PATH.
37700         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37701 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37702         # Extract the first word of "$tool_basename", so it can be a program name with args.
37703 set dummy $tool_basename; ac_word=$2
37704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37705 $as_echo_n "checking for $ac_word... " >&6; }
37706 if ${ac_cv_path_NM+:} false; then :
37707   $as_echo_n "(cached) " >&6
37708 else
37709   case $NM in
37710   [\\/]* | ?:[\\/]*)
37711   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37712   ;;
37713   *)
37714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37715 for as_dir in $PATH
37716 do
37717   IFS=$as_save_IFS
37718   test -z "$as_dir" && as_dir=.
37719     for ac_exec_ext in '' $ac_executable_extensions; do
37720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37721     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37723     break 2
37724   fi
37725 done
37726   done
37727 IFS=$as_save_IFS
37728 
37729   ;;
37730 esac
37731 fi
37732 NM=$ac_cv_path_NM
37733 if test -n "$NM"; then
37734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37735 $as_echo "$NM" >&6; }
37736 else
37737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37738 $as_echo "no" >&6; }
37739 fi
37740 
37741 
37742         if test "x$NM" = x; then
37743           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37744         fi
37745       else
37746         # Otherwise we believe it is a complete path. Use it as it is.
37747         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37748 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37749         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37750 $as_echo_n "checking for NM... " >&6; }
37751         if test ! -x "$tool_specified"; then
37752           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37753 $as_echo "not found" >&6; }
37754           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37755         fi
37756         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37757 $as_echo "$tool_specified" >&6; }
37758       fi
37759     fi
37760   fi
37761 
37762 
37763 
37764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37765 
37766   # First separate the path from the arguments. This will split at the first
37767   # space.
37768   complete="$NM"
37769   path="${complete%% *}"
37770   tmp="$complete EOL"
37771   arguments="${tmp#* }"
37772 
37773   # Input might be given as Windows format, start by converting to
37774   # unix format.
37775   new_path=`$CYGPATH -u "$path"`
37776 
37777   # Now try to locate executable using which
37778   new_path=`$WHICH "$new_path" 2> /dev/null`
37779   # bat and cmd files are not always considered executable in cygwin causing which
37780   # to not find them
37781   if test "x$new_path" = x \
37782       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37783       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37784     new_path=`$CYGPATH -u "$path"`
37785   fi
37786   if test "x$new_path" = x; then
37787     # Oops. Which didn't find the executable.
37788     # The splitting of arguments from the executable at a space might have been incorrect,
37789     # since paths with space are more likely in Windows. Give it another try with the whole
37790     # argument.
37791     path="$complete"
37792     arguments="EOL"
37793     new_path=`$CYGPATH -u "$path"`
37794     new_path=`$WHICH "$new_path" 2> /dev/null`
37795     # bat and cmd files are not always considered executable in cygwin causing which
37796     # to not find them
37797     if test "x$new_path" = x \
37798         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37799         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37800       new_path=`$CYGPATH -u "$path"`
37801     fi
37802     if test "x$new_path" = x; then
37803       # It's still not found. Now this is an unrecoverable error.
37804       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37805 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37806       has_space=`$ECHO "$complete" | $GREP " "`
37807       if test "x$has_space" != x; then
37808         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37809 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37810       fi
37811       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37812     fi
37813   fi
37814 
37815   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37816   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37817   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37818   # "foo.exe" is OK but "foo" is an error.
37819   #
37820   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37821   # It is also a way to make sure we got the proper file name for the real test later on.
37822   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37823   if test "x$test_shortpath" = x; then
37824     # Short path failed, file does not exist as specified.
37825     # Try adding .exe or .cmd
37826     if test -f "${new_path}.exe"; then
37827       input_to_shortpath="${new_path}.exe"
37828     elif test -f "${new_path}.cmd"; then
37829       input_to_shortpath="${new_path}.cmd"
37830     else
37831       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37832 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37833       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37834 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37835       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37836     fi
37837   else
37838     input_to_shortpath="$new_path"
37839   fi
37840 
37841   # Call helper function which possibly converts this using DOS-style short mode.
37842   # If so, the updated path is stored in $new_path.
37843   new_path="$input_to_shortpath"
37844 
37845   input_path="$input_to_shortpath"
37846   # Check if we need to convert this using DOS-style short mode. If the path
37847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37848   # take no chances and rewrite it.
37849   # Note: m4 eats our [], so we need to use [ and ] instead.
37850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37851   if test "x$has_forbidden_chars" != x; then
37852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37853     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37854     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37855     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37856       # Going to short mode and back again did indeed matter. Since short mode is
37857       # case insensitive, let's make it lowercase to improve readability.
37858       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37859       # Now convert it back to Unix-stile (cygpath)
37860       input_path=`$CYGPATH -u "$shortmode_path"`
37861       new_path="$input_path"
37862     fi
37863   fi
37864 
37865   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37866   if test "x$test_cygdrive_prefix" = x; then
37867     # As a simple fix, exclude /usr/bin since it's not a real path.
37868     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37869       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37870       # a path prefixed by /cygdrive for fixpath to work.
37871       new_path="$CYGWIN_ROOT_PATH$input_path"
37872     fi
37873   fi
37874 
37875   # remove trailing .exe if any
37876   new_path="${new_path/%.exe/}"
37877 
37878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37879 
37880   # First separate the path from the arguments. This will split at the first
37881   # space.
37882   complete="$NM"
37883   path="${complete%% *}"
37884   tmp="$complete EOL"
37885   arguments="${tmp#* }"
37886 
37887   # Input might be given as Windows format, start by converting to
37888   # unix format.
37889   new_path="$path"
37890 
37891   windows_path="$new_path"
37892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37893     unix_path=`$CYGPATH -u "$windows_path"`
37894     new_path="$unix_path"
37895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37897     new_path="$unix_path"
37898   fi
37899 
37900 
37901   # Now try to locate executable using which
37902   new_path=`$WHICH "$new_path" 2> /dev/null`
37903 
37904   if test "x$new_path" = x; then
37905     # Oops. Which didn't find the executable.
37906     # The splitting of arguments from the executable at a space might have been incorrect,
37907     # since paths with space are more likely in Windows. Give it another try with the whole
37908     # argument.
37909     path="$complete"
37910     arguments="EOL"
37911     new_path="$path"
37912 
37913   windows_path="$new_path"
37914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37915     unix_path=`$CYGPATH -u "$windows_path"`
37916     new_path="$unix_path"
37917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37919     new_path="$unix_path"
37920   fi
37921 
37922 
37923     new_path=`$WHICH "$new_path" 2> /dev/null`
37924     # bat and cmd files are not always considered executable in MSYS causing which
37925     # to not find them
37926     if test "x$new_path" = x \
37927         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37928         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37929       new_path="$path"
37930 
37931   windows_path="$new_path"
37932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37933     unix_path=`$CYGPATH -u "$windows_path"`
37934     new_path="$unix_path"
37935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37937     new_path="$unix_path"
37938   fi
37939 
37940     fi
37941 
37942     if test "x$new_path" = x; then
37943       # It's still not found. Now this is an unrecoverable error.
37944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37945 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37946       has_space=`$ECHO "$complete" | $GREP " "`
37947       if test "x$has_space" != x; then
37948         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37949 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37950       fi
37951       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37952     fi
37953   fi
37954 
37955   # Now new_path has a complete unix path to the binary
37956   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37957     # Keep paths in /bin as-is, but remove trailing .exe if any
37958     new_path="${new_path/%.exe/}"
37959     # Do not save /bin paths to all_fixpath_prefixes!
37960   else
37961     # Not in mixed or Windows style, start by that.
37962     new_path=`cmd //c echo $new_path`
37963 
37964   input_path="$new_path"
37965   # Check if we need to convert this using DOS-style short mode. If the path
37966   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37967   # take no chances and rewrite it.
37968   # Note: m4 eats our [], so we need to use [ and ] instead.
37969   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37970   if test "x$has_forbidden_chars" != x; then
37971     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37972     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37973   fi
37974 
37975     # Output is in $new_path
37976 
37977   windows_path="$new_path"
37978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37979     unix_path=`$CYGPATH -u "$windows_path"`
37980     new_path="$unix_path"
37981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37983     new_path="$unix_path"
37984   fi
37985 
37986     # remove trailing .exe if any
37987     new_path="${new_path/%.exe/}"
37988 
37989     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37990     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37991   fi
37992 
37993   else
37994     # We're on a unix platform. Hooray! :)
37995     # First separate the path from the arguments. This will split at the first
37996     # space.
37997     complete="$NM"
37998     path="${complete%% *}"
37999     tmp="$complete EOL"
38000     arguments="${tmp#* }"
38001 
38002     # Cannot rely on the command "which" here since it doesn't always work.
38003     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38004     if test -z "$is_absolute_path"; then
38005       # Path to executable is not absolute. Find it.
38006       IFS_save="$IFS"
38007       IFS=:
38008       for p in $PATH; do
38009         if test -f "$p/$path" && test -x "$p/$path"; then
38010           new_path="$p/$path"
38011           break
38012         fi
38013       done
38014       IFS="$IFS_save"
38015     else
38016       # This is an absolute path, we can use it without further modifications.
38017       new_path="$path"
38018     fi
38019 
38020     if test "x$new_path" = x; then
38021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38022 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38023       has_space=`$ECHO "$complete" | $GREP " "`
38024       if test "x$has_space" != x; then
38025         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38026 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38027       fi
38028       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38029     fi
38030   fi
38031 
38032   # Now join together the path and the arguments once again
38033   if test "x$arguments" != xEOL; then
38034     new_complete="$new_path ${arguments% *}"
38035   else
38036     new_complete="$new_path"
38037   fi
38038 
38039   if test "x$complete" != "x$new_complete"; then
38040     NM="$new_complete"
38041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38042 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38043   fi
38044 
38045     GNM="$NM"
38046 
38047   fi
38048 
38049   # objcopy is used for moving debug symbols to separate files when
38050   # full debug symbols are enabled.
38051   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38052 
38053 
38054   # Publish this variable in the help.
38055 
38056 
38057   if test "x$OBJCOPY" = x; then
38058     # The variable is not set by user, try to locate tool using the code snippet
38059     if test -n "$ac_tool_prefix"; then
38060   for ac_prog in gobjcopy objcopy
38061   do
38062     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38063 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38065 $as_echo_n "checking for $ac_word... " >&6; }
38066 if ${ac_cv_prog_OBJCOPY+:} false; then :
38067   $as_echo_n "(cached) " >&6
38068 else
38069   if test -n "$OBJCOPY"; then
38070   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38071 else
38072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38073 for as_dir in $PATH
38074 do
38075   IFS=$as_save_IFS
38076   test -z "$as_dir" && as_dir=.
38077     for ac_exec_ext in '' $ac_executable_extensions; do
38078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38079     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38081     break 2
38082   fi
38083 done
38084   done
38085 IFS=$as_save_IFS
38086 
38087 fi
38088 fi
38089 OBJCOPY=$ac_cv_prog_OBJCOPY
38090 if test -n "$OBJCOPY"; then
38091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38092 $as_echo "$OBJCOPY" >&6; }
38093 else
38094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38095 $as_echo "no" >&6; }
38096 fi
38097 
38098 
38099     test -n "$OBJCOPY" && break
38100   done
38101 fi
38102 if test -z "$OBJCOPY"; then
38103   ac_ct_OBJCOPY=$OBJCOPY
38104   for ac_prog in gobjcopy objcopy
38105 do
38106   # Extract the first word of "$ac_prog", so it can be a program name with args.
38107 set dummy $ac_prog; ac_word=$2
38108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38109 $as_echo_n "checking for $ac_word... " >&6; }
38110 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38111   $as_echo_n "(cached) " >&6
38112 else
38113   if test -n "$ac_ct_OBJCOPY"; then
38114   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38115 else
38116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38117 for as_dir in $PATH
38118 do
38119   IFS=$as_save_IFS
38120   test -z "$as_dir" && as_dir=.
38121     for ac_exec_ext in '' $ac_executable_extensions; do
38122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38123     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38125     break 2
38126   fi
38127 done
38128   done
38129 IFS=$as_save_IFS
38130 
38131 fi
38132 fi
38133 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38134 if test -n "$ac_ct_OBJCOPY"; then
38135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38136 $as_echo "$ac_ct_OBJCOPY" >&6; }
38137 else
38138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38139 $as_echo "no" >&6; }
38140 fi
38141 
38142 
38143   test -n "$ac_ct_OBJCOPY" && break
38144 done
38145 
38146   if test "x$ac_ct_OBJCOPY" = x; then
38147     OBJCOPY=""
38148   else
38149     case $cross_compiling:$ac_tool_warned in
38150 yes:)
38151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38152 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38153 ac_tool_warned=yes ;;
38154 esac
38155     OBJCOPY=$ac_ct_OBJCOPY
38156   fi
38157 fi
38158 
38159   else
38160     # The variable is set, but is it from the command line or the environment?
38161 
38162     # Try to remove the string !OBJCOPY! from our list.
38163     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38164     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38165       # If it failed, the variable was not from the command line. Ignore it,
38166       # but warn the user (except for BASH, which is always set by the calling BASH).
38167       if test "xOBJCOPY" != xBASH; then
38168         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38169 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38170       fi
38171       # Try to locate tool using the code snippet
38172       if test -n "$ac_tool_prefix"; then
38173   for ac_prog in gobjcopy objcopy
38174   do
38175     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38176 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38178 $as_echo_n "checking for $ac_word... " >&6; }
38179 if ${ac_cv_prog_OBJCOPY+:} false; then :
38180   $as_echo_n "(cached) " >&6
38181 else
38182   if test -n "$OBJCOPY"; then
38183   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38184 else
38185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38186 for as_dir in $PATH
38187 do
38188   IFS=$as_save_IFS
38189   test -z "$as_dir" && as_dir=.
38190     for ac_exec_ext in '' $ac_executable_extensions; do
38191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38192     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38194     break 2
38195   fi
38196 done
38197   done
38198 IFS=$as_save_IFS
38199 
38200 fi
38201 fi
38202 OBJCOPY=$ac_cv_prog_OBJCOPY
38203 if test -n "$OBJCOPY"; then
38204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38205 $as_echo "$OBJCOPY" >&6; }
38206 else
38207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38208 $as_echo "no" >&6; }
38209 fi
38210 
38211 
38212     test -n "$OBJCOPY" && break
38213   done
38214 fi
38215 if test -z "$OBJCOPY"; then
38216   ac_ct_OBJCOPY=$OBJCOPY
38217   for ac_prog in gobjcopy objcopy
38218 do
38219   # Extract the first word of "$ac_prog", so it can be a program name with args.
38220 set dummy $ac_prog; ac_word=$2
38221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38222 $as_echo_n "checking for $ac_word... " >&6; }
38223 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38224   $as_echo_n "(cached) " >&6
38225 else
38226   if test -n "$ac_ct_OBJCOPY"; then
38227   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38228 else
38229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38230 for as_dir in $PATH
38231 do
38232   IFS=$as_save_IFS
38233   test -z "$as_dir" && as_dir=.
38234     for ac_exec_ext in '' $ac_executable_extensions; do
38235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38236     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38238     break 2
38239   fi
38240 done
38241   done
38242 IFS=$as_save_IFS
38243 
38244 fi
38245 fi
38246 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38247 if test -n "$ac_ct_OBJCOPY"; then
38248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38249 $as_echo "$ac_ct_OBJCOPY" >&6; }
38250 else
38251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38252 $as_echo "no" >&6; }
38253 fi
38254 
38255 
38256   test -n "$ac_ct_OBJCOPY" && break
38257 done
38258 
38259   if test "x$ac_ct_OBJCOPY" = x; then
38260     OBJCOPY=""
38261   else
38262     case $cross_compiling:$ac_tool_warned in
38263 yes:)
38264 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38265 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38266 ac_tool_warned=yes ;;
38267 esac
38268     OBJCOPY=$ac_ct_OBJCOPY
38269   fi
38270 fi
38271 
38272     else
38273       # If it succeeded, then it was overridden by the user. We will use it
38274       # for the tool.
38275 
38276       # First remove it from the list of overridden variables, so we can test
38277       # for unknown variables in the end.
38278       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38279 
38280       # Check if the provided tool contains a complete path.
38281       tool_specified="$OBJCOPY"
38282       tool_basename="${tool_specified##*/}"
38283       if test "x$tool_basename" = "x$tool_specified"; then
38284         # A command without a complete path is provided, search $PATH.
38285         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38286 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38287         # Extract the first word of "$tool_basename", so it can be a program name with args.
38288 set dummy $tool_basename; ac_word=$2
38289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38290 $as_echo_n "checking for $ac_word... " >&6; }
38291 if ${ac_cv_path_OBJCOPY+:} false; then :
38292   $as_echo_n "(cached) " >&6
38293 else
38294   case $OBJCOPY in
38295   [\\/]* | ?:[\\/]*)
38296   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38297   ;;
38298   *)
38299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38300 for as_dir in $PATH
38301 do
38302   IFS=$as_save_IFS
38303   test -z "$as_dir" && as_dir=.
38304     for ac_exec_ext in '' $ac_executable_extensions; do
38305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38306     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38308     break 2
38309   fi
38310 done
38311   done
38312 IFS=$as_save_IFS
38313 
38314   ;;
38315 esac
38316 fi
38317 OBJCOPY=$ac_cv_path_OBJCOPY
38318 if test -n "$OBJCOPY"; then
38319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38320 $as_echo "$OBJCOPY" >&6; }
38321 else
38322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38323 $as_echo "no" >&6; }
38324 fi
38325 
38326 
38327         if test "x$OBJCOPY" = x; then
38328           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38329         fi
38330       else
38331         # Otherwise we believe it is a complete path. Use it as it is.
38332         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38333 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38334         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38335 $as_echo_n "checking for OBJCOPY... " >&6; }
38336         if test ! -x "$tool_specified"; then
38337           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38338 $as_echo "not found" >&6; }
38339           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38340         fi
38341         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38342 $as_echo "$tool_specified" >&6; }
38343       fi
38344     fi
38345   fi
38346 
38347 
38348     # Only call fixup if objcopy was found.
38349     if test -n "$OBJCOPY"; then
38350 
38351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38352 
38353   # First separate the path from the arguments. This will split at the first
38354   # space.
38355   complete="$OBJCOPY"
38356   path="${complete%% *}"
38357   tmp="$complete EOL"
38358   arguments="${tmp#* }"
38359 
38360   # Input might be given as Windows format, start by converting to
38361   # unix format.
38362   new_path=`$CYGPATH -u "$path"`
38363 
38364   # Now try to locate executable using which
38365   new_path=`$WHICH "$new_path" 2> /dev/null`
38366   # bat and cmd files are not always considered executable in cygwin causing which
38367   # to not find them
38368   if test "x$new_path" = x \
38369       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38370       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38371     new_path=`$CYGPATH -u "$path"`
38372   fi
38373   if test "x$new_path" = x; then
38374     # Oops. Which didn't find the executable.
38375     # The splitting of arguments from the executable at a space might have been incorrect,
38376     # since paths with space are more likely in Windows. Give it another try with the whole
38377     # argument.
38378     path="$complete"
38379     arguments="EOL"
38380     new_path=`$CYGPATH -u "$path"`
38381     new_path=`$WHICH "$new_path" 2> /dev/null`
38382     # bat and cmd files are not always considered executable in cygwin causing which
38383     # to not find them
38384     if test "x$new_path" = x \
38385         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38386         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38387       new_path=`$CYGPATH -u "$path"`
38388     fi
38389     if test "x$new_path" = x; then
38390       # It's still not found. Now this is an unrecoverable error.
38391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38392 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38393       has_space=`$ECHO "$complete" | $GREP " "`
38394       if test "x$has_space" != x; then
38395         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38396 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38397       fi
38398       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38399     fi
38400   fi
38401 
38402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38405   # "foo.exe" is OK but "foo" is an error.
38406   #
38407   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38408   # It is also a way to make sure we got the proper file name for the real test later on.
38409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38410   if test "x$test_shortpath" = x; then
38411     # Short path failed, file does not exist as specified.
38412     # Try adding .exe or .cmd
38413     if test -f "${new_path}.exe"; then
38414       input_to_shortpath="${new_path}.exe"
38415     elif test -f "${new_path}.cmd"; then
38416       input_to_shortpath="${new_path}.cmd"
38417     else
38418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38419 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38420       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38421 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38422       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38423     fi
38424   else
38425     input_to_shortpath="$new_path"
38426   fi
38427 
38428   # Call helper function which possibly converts this using DOS-style short mode.
38429   # If so, the updated path is stored in $new_path.
38430   new_path="$input_to_shortpath"
38431 
38432   input_path="$input_to_shortpath"
38433   # Check if we need to convert this using DOS-style short mode. If the path
38434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38435   # take no chances and rewrite it.
38436   # Note: m4 eats our [], so we need to use [ and ] instead.
38437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38438   if test "x$has_forbidden_chars" != x; then
38439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38440     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38441     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38442     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38443       # Going to short mode and back again did indeed matter. Since short mode is
38444       # case insensitive, let's make it lowercase to improve readability.
38445       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38446       # Now convert it back to Unix-stile (cygpath)
38447       input_path=`$CYGPATH -u "$shortmode_path"`
38448       new_path="$input_path"
38449     fi
38450   fi
38451 
38452   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38453   if test "x$test_cygdrive_prefix" = x; then
38454     # As a simple fix, exclude /usr/bin since it's not a real path.
38455     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38456       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38457       # a path prefixed by /cygdrive for fixpath to work.
38458       new_path="$CYGWIN_ROOT_PATH$input_path"
38459     fi
38460   fi
38461 
38462   # remove trailing .exe if any
38463   new_path="${new_path/%.exe/}"
38464 
38465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38466 
38467   # First separate the path from the arguments. This will split at the first
38468   # space.
38469   complete="$OBJCOPY"
38470   path="${complete%% *}"
38471   tmp="$complete EOL"
38472   arguments="${tmp#* }"
38473 
38474   # Input might be given as Windows format, start by converting to
38475   # unix format.
38476   new_path="$path"
38477 
38478   windows_path="$new_path"
38479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38480     unix_path=`$CYGPATH -u "$windows_path"`
38481     new_path="$unix_path"
38482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38484     new_path="$unix_path"
38485   fi
38486 
38487 
38488   # Now try to locate executable using which
38489   new_path=`$WHICH "$new_path" 2> /dev/null`
38490 
38491   if test "x$new_path" = x; then
38492     # Oops. Which didn't find the executable.
38493     # The splitting of arguments from the executable at a space might have been incorrect,
38494     # since paths with space are more likely in Windows. Give it another try with the whole
38495     # argument.
38496     path="$complete"
38497     arguments="EOL"
38498     new_path="$path"
38499 
38500   windows_path="$new_path"
38501   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38502     unix_path=`$CYGPATH -u "$windows_path"`
38503     new_path="$unix_path"
38504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38505     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38506     new_path="$unix_path"
38507   fi
38508 
38509 
38510     new_path=`$WHICH "$new_path" 2> /dev/null`
38511     # bat and cmd files are not always considered executable in MSYS causing which
38512     # to not find them
38513     if test "x$new_path" = x \
38514         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38515         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38516       new_path="$path"
38517 
38518   windows_path="$new_path"
38519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38520     unix_path=`$CYGPATH -u "$windows_path"`
38521     new_path="$unix_path"
38522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38524     new_path="$unix_path"
38525   fi
38526 
38527     fi
38528 
38529     if test "x$new_path" = x; then
38530       # It's still not found. Now this is an unrecoverable error.
38531       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38532 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38533       has_space=`$ECHO "$complete" | $GREP " "`
38534       if test "x$has_space" != x; then
38535         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38536 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38537       fi
38538       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38539     fi
38540   fi
38541 
38542   # Now new_path has a complete unix path to the binary
38543   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38544     # Keep paths in /bin as-is, but remove trailing .exe if any
38545     new_path="${new_path/%.exe/}"
38546     # Do not save /bin paths to all_fixpath_prefixes!
38547   else
38548     # Not in mixed or Windows style, start by that.
38549     new_path=`cmd //c echo $new_path`
38550 
38551   input_path="$new_path"
38552   # Check if we need to convert this using DOS-style short mode. If the path
38553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38554   # take no chances and rewrite it.
38555   # Note: m4 eats our [], so we need to use [ and ] instead.
38556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38557   if test "x$has_forbidden_chars" != x; then
38558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38559     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38560   fi
38561 
38562     # Output is in $new_path
38563 
38564   windows_path="$new_path"
38565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38566     unix_path=`$CYGPATH -u "$windows_path"`
38567     new_path="$unix_path"
38568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38570     new_path="$unix_path"
38571   fi
38572 
38573     # remove trailing .exe if any
38574     new_path="${new_path/%.exe/}"
38575 
38576     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38577     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38578   fi
38579 
38580   else
38581     # We're on a unix platform. Hooray! :)
38582     # First separate the path from the arguments. This will split at the first
38583     # space.
38584     complete="$OBJCOPY"
38585     path="${complete%% *}"
38586     tmp="$complete EOL"
38587     arguments="${tmp#* }"
38588 
38589     # Cannot rely on the command "which" here since it doesn't always work.
38590     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38591     if test -z "$is_absolute_path"; then
38592       # Path to executable is not absolute. Find it.
38593       IFS_save="$IFS"
38594       IFS=:
38595       for p in $PATH; do
38596         if test -f "$p/$path" && test -x "$p/$path"; then
38597           new_path="$p/$path"
38598           break
38599         fi
38600       done
38601       IFS="$IFS_save"
38602     else
38603       # This is an absolute path, we can use it without further modifications.
38604       new_path="$path"
38605     fi
38606 
38607     if test "x$new_path" = x; then
38608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38609 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38610       has_space=`$ECHO "$complete" | $GREP " "`
38611       if test "x$has_space" != x; then
38612         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38613 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38614       fi
38615       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38616     fi
38617   fi
38618 
38619   # Now join together the path and the arguments once again
38620   if test "x$arguments" != xEOL; then
38621     new_complete="$new_path ${arguments% *}"
38622   else
38623     new_complete="$new_path"
38624   fi
38625 
38626   if test "x$complete" != "x$new_complete"; then
38627     OBJCOPY="$new_complete"
38628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38629 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38630   fi
38631 
38632     fi
38633   fi
38634 
38635 
38636 
38637   # Publish this variable in the help.
38638 
38639 
38640   if test "x$OBJDUMP" = x; then
38641     # The variable is not set by user, try to locate tool using the code snippet
38642     if test -n "$ac_tool_prefix"; then
38643   for ac_prog in gobjdump objdump
38644   do
38645     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38646 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38648 $as_echo_n "checking for $ac_word... " >&6; }
38649 if ${ac_cv_prog_OBJDUMP+:} false; then :
38650   $as_echo_n "(cached) " >&6
38651 else
38652   if test -n "$OBJDUMP"; then
38653   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38654 else
38655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38656 for as_dir in $PATH
38657 do
38658   IFS=$as_save_IFS
38659   test -z "$as_dir" && as_dir=.
38660     for ac_exec_ext in '' $ac_executable_extensions; do
38661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38662     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38664     break 2
38665   fi
38666 done
38667   done
38668 IFS=$as_save_IFS
38669 
38670 fi
38671 fi
38672 OBJDUMP=$ac_cv_prog_OBJDUMP
38673 if test -n "$OBJDUMP"; then
38674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38675 $as_echo "$OBJDUMP" >&6; }
38676 else
38677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38678 $as_echo "no" >&6; }
38679 fi
38680 
38681 
38682     test -n "$OBJDUMP" && break
38683   done
38684 fi
38685 if test -z "$OBJDUMP"; then
38686   ac_ct_OBJDUMP=$OBJDUMP
38687   for ac_prog in gobjdump objdump
38688 do
38689   # Extract the first word of "$ac_prog", so it can be a program name with args.
38690 set dummy $ac_prog; ac_word=$2
38691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38692 $as_echo_n "checking for $ac_word... " >&6; }
38693 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38694   $as_echo_n "(cached) " >&6
38695 else
38696   if test -n "$ac_ct_OBJDUMP"; then
38697   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38698 else
38699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38700 for as_dir in $PATH
38701 do
38702   IFS=$as_save_IFS
38703   test -z "$as_dir" && as_dir=.
38704     for ac_exec_ext in '' $ac_executable_extensions; do
38705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38706     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38708     break 2
38709   fi
38710 done
38711   done
38712 IFS=$as_save_IFS
38713 
38714 fi
38715 fi
38716 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38717 if test -n "$ac_ct_OBJDUMP"; then
38718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38719 $as_echo "$ac_ct_OBJDUMP" >&6; }
38720 else
38721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38722 $as_echo "no" >&6; }
38723 fi
38724 
38725 
38726   test -n "$ac_ct_OBJDUMP" && break
38727 done
38728 
38729   if test "x$ac_ct_OBJDUMP" = x; then
38730     OBJDUMP=""
38731   else
38732     case $cross_compiling:$ac_tool_warned in
38733 yes:)
38734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38735 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38736 ac_tool_warned=yes ;;
38737 esac
38738     OBJDUMP=$ac_ct_OBJDUMP
38739   fi
38740 fi
38741 
38742   else
38743     # The variable is set, but is it from the command line or the environment?
38744 
38745     # Try to remove the string !OBJDUMP! from our list.
38746     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38747     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38748       # If it failed, the variable was not from the command line. Ignore it,
38749       # but warn the user (except for BASH, which is always set by the calling BASH).
38750       if test "xOBJDUMP" != xBASH; then
38751         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38752 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38753       fi
38754       # Try to locate tool using the code snippet
38755       if test -n "$ac_tool_prefix"; then
38756   for ac_prog in gobjdump objdump
38757   do
38758     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38759 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38761 $as_echo_n "checking for $ac_word... " >&6; }
38762 if ${ac_cv_prog_OBJDUMP+:} false; then :
38763   $as_echo_n "(cached) " >&6
38764 else
38765   if test -n "$OBJDUMP"; then
38766   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38767 else
38768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38769 for as_dir in $PATH
38770 do
38771   IFS=$as_save_IFS
38772   test -z "$as_dir" && as_dir=.
38773     for ac_exec_ext in '' $ac_executable_extensions; do
38774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38775     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38777     break 2
38778   fi
38779 done
38780   done
38781 IFS=$as_save_IFS
38782 
38783 fi
38784 fi
38785 OBJDUMP=$ac_cv_prog_OBJDUMP
38786 if test -n "$OBJDUMP"; then
38787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38788 $as_echo "$OBJDUMP" >&6; }
38789 else
38790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38791 $as_echo "no" >&6; }
38792 fi
38793 
38794 
38795     test -n "$OBJDUMP" && break
38796   done
38797 fi
38798 if test -z "$OBJDUMP"; then
38799   ac_ct_OBJDUMP=$OBJDUMP
38800   for ac_prog in gobjdump objdump
38801 do
38802   # Extract the first word of "$ac_prog", so it can be a program name with args.
38803 set dummy $ac_prog; ac_word=$2
38804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38805 $as_echo_n "checking for $ac_word... " >&6; }
38806 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38807   $as_echo_n "(cached) " >&6
38808 else
38809   if test -n "$ac_ct_OBJDUMP"; then
38810   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38811 else
38812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38813 for as_dir in $PATH
38814 do
38815   IFS=$as_save_IFS
38816   test -z "$as_dir" && as_dir=.
38817     for ac_exec_ext in '' $ac_executable_extensions; do
38818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38819     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38821     break 2
38822   fi
38823 done
38824   done
38825 IFS=$as_save_IFS
38826 
38827 fi
38828 fi
38829 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38830 if test -n "$ac_ct_OBJDUMP"; then
38831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38832 $as_echo "$ac_ct_OBJDUMP" >&6; }
38833 else
38834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38835 $as_echo "no" >&6; }
38836 fi
38837 
38838 
38839   test -n "$ac_ct_OBJDUMP" && break
38840 done
38841 
38842   if test "x$ac_ct_OBJDUMP" = x; then
38843     OBJDUMP=""
38844   else
38845     case $cross_compiling:$ac_tool_warned in
38846 yes:)
38847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38848 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38849 ac_tool_warned=yes ;;
38850 esac
38851     OBJDUMP=$ac_ct_OBJDUMP
38852   fi
38853 fi
38854 
38855     else
38856       # If it succeeded, then it was overridden by the user. We will use it
38857       # for the tool.
38858 
38859       # First remove it from the list of overridden variables, so we can test
38860       # for unknown variables in the end.
38861       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38862 
38863       # Check if the provided tool contains a complete path.
38864       tool_specified="$OBJDUMP"
38865       tool_basename="${tool_specified##*/}"
38866       if test "x$tool_basename" = "x$tool_specified"; then
38867         # A command without a complete path is provided, search $PATH.
38868         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38869 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38870         # Extract the first word of "$tool_basename", so it can be a program name with args.
38871 set dummy $tool_basename; ac_word=$2
38872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38873 $as_echo_n "checking for $ac_word... " >&6; }
38874 if ${ac_cv_path_OBJDUMP+:} false; then :
38875   $as_echo_n "(cached) " >&6
38876 else
38877   case $OBJDUMP in
38878   [\\/]* | ?:[\\/]*)
38879   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38880   ;;
38881   *)
38882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38883 for as_dir in $PATH
38884 do
38885   IFS=$as_save_IFS
38886   test -z "$as_dir" && as_dir=.
38887     for ac_exec_ext in '' $ac_executable_extensions; do
38888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38889     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38891     break 2
38892   fi
38893 done
38894   done
38895 IFS=$as_save_IFS
38896 
38897   ;;
38898 esac
38899 fi
38900 OBJDUMP=$ac_cv_path_OBJDUMP
38901 if test -n "$OBJDUMP"; then
38902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38903 $as_echo "$OBJDUMP" >&6; }
38904 else
38905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38906 $as_echo "no" >&6; }
38907 fi
38908 
38909 
38910         if test "x$OBJDUMP" = x; then
38911           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38912         fi
38913       else
38914         # Otherwise we believe it is a complete path. Use it as it is.
38915         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38916 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38917         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38918 $as_echo_n "checking for OBJDUMP... " >&6; }
38919         if test ! -x "$tool_specified"; then
38920           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38921 $as_echo "not found" >&6; }
38922           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38923         fi
38924         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38925 $as_echo "$tool_specified" >&6; }
38926       fi
38927     fi
38928   fi
38929 
38930 
38931   if test "x$OBJDUMP" != x; then
38932     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38933     # bails if argument is missing.
38934 
38935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38936 
38937   # First separate the path from the arguments. This will split at the first
38938   # space.
38939   complete="$OBJDUMP"
38940   path="${complete%% *}"
38941   tmp="$complete EOL"
38942   arguments="${tmp#* }"
38943 
38944   # Input might be given as Windows format, start by converting to
38945   # unix format.
38946   new_path=`$CYGPATH -u "$path"`
38947 
38948   # Now try to locate executable using which
38949   new_path=`$WHICH "$new_path" 2> /dev/null`
38950   # bat and cmd files are not always considered executable in cygwin causing which
38951   # to not find them
38952   if test "x$new_path" = x \
38953       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38954       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38955     new_path=`$CYGPATH -u "$path"`
38956   fi
38957   if test "x$new_path" = x; then
38958     # Oops. Which didn't find the executable.
38959     # The splitting of arguments from the executable at a space might have been incorrect,
38960     # since paths with space are more likely in Windows. Give it another try with the whole
38961     # argument.
38962     path="$complete"
38963     arguments="EOL"
38964     new_path=`$CYGPATH -u "$path"`
38965     new_path=`$WHICH "$new_path" 2> /dev/null`
38966     # bat and cmd files are not always considered executable in cygwin causing which
38967     # to not find them
38968     if test "x$new_path" = x \
38969         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38970         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38971       new_path=`$CYGPATH -u "$path"`
38972     fi
38973     if test "x$new_path" = x; then
38974       # It's still not found. Now this is an unrecoverable error.
38975       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38976 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38977       has_space=`$ECHO "$complete" | $GREP " "`
38978       if test "x$has_space" != x; then
38979         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38980 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38981       fi
38982       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38983     fi
38984   fi
38985 
38986   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38987   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38988   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38989   # "foo.exe" is OK but "foo" is an error.
38990   #
38991   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38992   # It is also a way to make sure we got the proper file name for the real test later on.
38993   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38994   if test "x$test_shortpath" = x; then
38995     # Short path failed, file does not exist as specified.
38996     # Try adding .exe or .cmd
38997     if test -f "${new_path}.exe"; then
38998       input_to_shortpath="${new_path}.exe"
38999     elif test -f "${new_path}.cmd"; then
39000       input_to_shortpath="${new_path}.cmd"
39001     else
39002       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39003 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39004       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39005 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39006       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39007     fi
39008   else
39009     input_to_shortpath="$new_path"
39010   fi
39011 
39012   # Call helper function which possibly converts this using DOS-style short mode.
39013   # If so, the updated path is stored in $new_path.
39014   new_path="$input_to_shortpath"
39015 
39016   input_path="$input_to_shortpath"
39017   # Check if we need to convert this using DOS-style short mode. If the path
39018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39019   # take no chances and rewrite it.
39020   # Note: m4 eats our [], so we need to use [ and ] instead.
39021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39022   if test "x$has_forbidden_chars" != x; then
39023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39024     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39025     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39026     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39027       # Going to short mode and back again did indeed matter. Since short mode is
39028       # case insensitive, let's make it lowercase to improve readability.
39029       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39030       # Now convert it back to Unix-stile (cygpath)
39031       input_path=`$CYGPATH -u "$shortmode_path"`
39032       new_path="$input_path"
39033     fi
39034   fi
39035 
39036   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39037   if test "x$test_cygdrive_prefix" = x; then
39038     # As a simple fix, exclude /usr/bin since it's not a real path.
39039     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39040       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39041       # a path prefixed by /cygdrive for fixpath to work.
39042       new_path="$CYGWIN_ROOT_PATH$input_path"
39043     fi
39044   fi
39045 
39046   # remove trailing .exe if any
39047   new_path="${new_path/%.exe/}"
39048 
39049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39050 
39051   # First separate the path from the arguments. This will split at the first
39052   # space.
39053   complete="$OBJDUMP"
39054   path="${complete%% *}"
39055   tmp="$complete EOL"
39056   arguments="${tmp#* }"
39057 
39058   # Input might be given as Windows format, start by converting to
39059   # unix format.
39060   new_path="$path"
39061 
39062   windows_path="$new_path"
39063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39064     unix_path=`$CYGPATH -u "$windows_path"`
39065     new_path="$unix_path"
39066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39068     new_path="$unix_path"
39069   fi
39070 
39071 
39072   # Now try to locate executable using which
39073   new_path=`$WHICH "$new_path" 2> /dev/null`
39074 
39075   if test "x$new_path" = x; then
39076     # Oops. Which didn't find the executable.
39077     # The splitting of arguments from the executable at a space might have been incorrect,
39078     # since paths with space are more likely in Windows. Give it another try with the whole
39079     # argument.
39080     path="$complete"
39081     arguments="EOL"
39082     new_path="$path"
39083 
39084   windows_path="$new_path"
39085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39086     unix_path=`$CYGPATH -u "$windows_path"`
39087     new_path="$unix_path"
39088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39090     new_path="$unix_path"
39091   fi
39092 
39093 
39094     new_path=`$WHICH "$new_path" 2> /dev/null`
39095     # bat and cmd files are not always considered executable in MSYS causing which
39096     # to not find them
39097     if test "x$new_path" = x \
39098         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39099         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39100       new_path="$path"
39101 
39102   windows_path="$new_path"
39103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39104     unix_path=`$CYGPATH -u "$windows_path"`
39105     new_path="$unix_path"
39106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39108     new_path="$unix_path"
39109   fi
39110 
39111     fi
39112 
39113     if test "x$new_path" = x; then
39114       # It's still not found. Now this is an unrecoverable error.
39115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39116 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39117       has_space=`$ECHO "$complete" | $GREP " "`
39118       if test "x$has_space" != x; then
39119         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39120 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39121       fi
39122       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39123     fi
39124   fi
39125 
39126   # Now new_path has a complete unix path to the binary
39127   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39128     # Keep paths in /bin as-is, but remove trailing .exe if any
39129     new_path="${new_path/%.exe/}"
39130     # Do not save /bin paths to all_fixpath_prefixes!
39131   else
39132     # Not in mixed or Windows style, start by that.
39133     new_path=`cmd //c echo $new_path`
39134 
39135   input_path="$new_path"
39136   # Check if we need to convert this using DOS-style short mode. If the path
39137   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39138   # take no chances and rewrite it.
39139   # Note: m4 eats our [], so we need to use [ and ] instead.
39140   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39141   if test "x$has_forbidden_chars" != x; then
39142     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39143     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39144   fi
39145 
39146     # Output is in $new_path
39147 
39148   windows_path="$new_path"
39149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39150     unix_path=`$CYGPATH -u "$windows_path"`
39151     new_path="$unix_path"
39152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39154     new_path="$unix_path"
39155   fi
39156 
39157     # remove trailing .exe if any
39158     new_path="${new_path/%.exe/}"
39159 
39160     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39161     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39162   fi
39163 
39164   else
39165     # We're on a unix platform. Hooray! :)
39166     # First separate the path from the arguments. This will split at the first
39167     # space.
39168     complete="$OBJDUMP"
39169     path="${complete%% *}"
39170     tmp="$complete EOL"
39171     arguments="${tmp#* }"
39172 
39173     # Cannot rely on the command "which" here since it doesn't always work.
39174     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39175     if test -z "$is_absolute_path"; then
39176       # Path to executable is not absolute. Find it.
39177       IFS_save="$IFS"
39178       IFS=:
39179       for p in $PATH; do
39180         if test -f "$p/$path" && test -x "$p/$path"; then
39181           new_path="$p/$path"
39182           break
39183         fi
39184       done
39185       IFS="$IFS_save"
39186     else
39187       # This is an absolute path, we can use it without further modifications.
39188       new_path="$path"
39189     fi
39190 
39191     if test "x$new_path" = x; then
39192       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39193 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39194       has_space=`$ECHO "$complete" | $GREP " "`
39195       if test "x$has_space" != x; then
39196         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39197 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39198       fi
39199       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39200     fi
39201   fi
39202 
39203   # Now join together the path and the arguments once again
39204   if test "x$arguments" != xEOL; then
39205     new_complete="$new_path ${arguments% *}"
39206   else
39207     new_complete="$new_path"
39208   fi
39209 
39210   if test "x$complete" != "x$new_complete"; then
39211     OBJDUMP="$new_complete"
39212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39213 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39214   fi
39215 
39216   fi
39217 
39218 
39219   # Restore old path.
39220   PATH="$OLD_PATH"
39221 
39222   # Restore the flags to the user specified values.
39223   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39224   CFLAGS="$ORG_CFLAGS"
39225   CXXFLAGS="$ORG_CXXFLAGS"
39226   OBJCFLAGS="$ORG_OBJCFLAGS"
39227 
39228 
39229 # Finally do some processing after the detection phase
39230 
39231   if test "x$COMPILE_TYPE" = "xcross"; then
39232     # Now we need to find a C/C++ compiler that can build executables for the
39233     # build platform. We can't use the AC_PROG_CC macro, since it can only be
39234     # used once. Also, we need to do this without adding a tools dir to the
39235     # path, otherwise we might pick up cross-compilers which don't use standard
39236     # naming.
39237 
39238     # FIXME: we should list the discovered compilers as an exclude pattern!
39239     # If we do that, we can do this detection before POST_DETECTION, and still
39240     # find the build compilers in the tools dir, if needed.
39241 
39242 
39243   # Publish this variable in the help.
39244 
39245 
39246   if test "x$BUILD_CC" = x; then
39247     # The variable is not set by user, try to locate tool using the code snippet
39248     for ac_prog in cl cc gcc
39249 do
39250   # Extract the first word of "$ac_prog", so it can be a program name with args.
39251 set dummy $ac_prog; ac_word=$2
39252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39253 $as_echo_n "checking for $ac_word... " >&6; }
39254 if ${ac_cv_path_BUILD_CC+:} false; then :
39255   $as_echo_n "(cached) " >&6
39256 else
39257   case $BUILD_CC in
39258   [\\/]* | ?:[\\/]*)
39259   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39260   ;;
39261   *)
39262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39263 for as_dir in $PATH
39264 do
39265   IFS=$as_save_IFS
39266   test -z "$as_dir" && as_dir=.
39267     for ac_exec_ext in '' $ac_executable_extensions; do
39268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39269     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39271     break 2
39272   fi
39273 done
39274   done
39275 IFS=$as_save_IFS
39276 
39277   ;;
39278 esac
39279 fi
39280 BUILD_CC=$ac_cv_path_BUILD_CC
39281 if test -n "$BUILD_CC"; then
39282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39283 $as_echo "$BUILD_CC" >&6; }
39284 else
39285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39286 $as_echo "no" >&6; }
39287 fi
39288 
39289 
39290   test -n "$BUILD_CC" && break
39291 done
39292 
39293   else
39294     # The variable is set, but is it from the command line or the environment?
39295 
39296     # Try to remove the string !BUILD_CC! from our list.
39297     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39298     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39299       # If it failed, the variable was not from the command line. Ignore it,
39300       # but warn the user (except for BASH, which is always set by the calling BASH).
39301       if test "xBUILD_CC" != xBASH; then
39302         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39303 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39304       fi
39305       # Try to locate tool using the code snippet
39306       for ac_prog in cl cc gcc
39307 do
39308   # Extract the first word of "$ac_prog", so it can be a program name with args.
39309 set dummy $ac_prog; ac_word=$2
39310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39311 $as_echo_n "checking for $ac_word... " >&6; }
39312 if ${ac_cv_path_BUILD_CC+:} false; then :
39313   $as_echo_n "(cached) " >&6
39314 else
39315   case $BUILD_CC in
39316   [\\/]* | ?:[\\/]*)
39317   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39318   ;;
39319   *)
39320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39321 for as_dir in $PATH
39322 do
39323   IFS=$as_save_IFS
39324   test -z "$as_dir" && as_dir=.
39325     for ac_exec_ext in '' $ac_executable_extensions; do
39326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39327     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39329     break 2
39330   fi
39331 done
39332   done
39333 IFS=$as_save_IFS
39334 
39335   ;;
39336 esac
39337 fi
39338 BUILD_CC=$ac_cv_path_BUILD_CC
39339 if test -n "$BUILD_CC"; then
39340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39341 $as_echo "$BUILD_CC" >&6; }
39342 else
39343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39344 $as_echo "no" >&6; }
39345 fi
39346 
39347 
39348   test -n "$BUILD_CC" && break
39349 done
39350 
39351     else
39352       # If it succeeded, then it was overridden by the user. We will use it
39353       # for the tool.
39354 
39355       # First remove it from the list of overridden variables, so we can test
39356       # for unknown variables in the end.
39357       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39358 
39359       # Check if the provided tool contains a complete path.
39360       tool_specified="$BUILD_CC"
39361       tool_basename="${tool_specified##*/}"
39362       if test "x$tool_basename" = "x$tool_specified"; then
39363         # A command without a complete path is provided, search $PATH.
39364         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39365 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39366         # Extract the first word of "$tool_basename", so it can be a program name with args.
39367 set dummy $tool_basename; ac_word=$2
39368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39369 $as_echo_n "checking for $ac_word... " >&6; }
39370 if ${ac_cv_path_BUILD_CC+:} false; then :
39371   $as_echo_n "(cached) " >&6
39372 else
39373   case $BUILD_CC in
39374   [\\/]* | ?:[\\/]*)
39375   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39376   ;;
39377   *)
39378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39379 for as_dir in $PATH
39380 do
39381   IFS=$as_save_IFS
39382   test -z "$as_dir" && as_dir=.
39383     for ac_exec_ext in '' $ac_executable_extensions; do
39384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39385     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39387     break 2
39388   fi
39389 done
39390   done
39391 IFS=$as_save_IFS
39392 
39393   ;;
39394 esac
39395 fi
39396 BUILD_CC=$ac_cv_path_BUILD_CC
39397 if test -n "$BUILD_CC"; then
39398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39399 $as_echo "$BUILD_CC" >&6; }
39400 else
39401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39402 $as_echo "no" >&6; }
39403 fi
39404 
39405 
39406         if test "x$BUILD_CC" = x; then
39407           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39408         fi
39409       else
39410         # Otherwise we believe it is a complete path. Use it as it is.
39411         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39412 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39414 $as_echo_n "checking for BUILD_CC... " >&6; }
39415         if test ! -x "$tool_specified"; then
39416           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39417 $as_echo "not found" >&6; }
39418           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39419         fi
39420         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39421 $as_echo "$tool_specified" >&6; }
39422       fi
39423     fi
39424   fi
39425 
39426 
39427 
39428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39429 
39430   # First separate the path from the arguments. This will split at the first
39431   # space.
39432   complete="$BUILD_CC"
39433   path="${complete%% *}"
39434   tmp="$complete EOL"
39435   arguments="${tmp#* }"
39436 
39437   # Input might be given as Windows format, start by converting to
39438   # unix format.
39439   new_path=`$CYGPATH -u "$path"`
39440 
39441   # Now try to locate executable using which
39442   new_path=`$WHICH "$new_path" 2> /dev/null`
39443   # bat and cmd files are not always considered executable in cygwin causing which
39444   # to not find them
39445   if test "x$new_path" = x \
39446       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39447       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39448     new_path=`$CYGPATH -u "$path"`
39449   fi
39450   if test "x$new_path" = x; then
39451     # Oops. Which didn't find the executable.
39452     # The splitting of arguments from the executable at a space might have been incorrect,
39453     # since paths with space are more likely in Windows. Give it another try with the whole
39454     # argument.
39455     path="$complete"
39456     arguments="EOL"
39457     new_path=`$CYGPATH -u "$path"`
39458     new_path=`$WHICH "$new_path" 2> /dev/null`
39459     # bat and cmd files are not always considered executable in cygwin causing which
39460     # to not find them
39461     if test "x$new_path" = x \
39462         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39463         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39464       new_path=`$CYGPATH -u "$path"`
39465     fi
39466     if test "x$new_path" = x; then
39467       # It's still not found. Now this is an unrecoverable error.
39468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39469 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39470       has_space=`$ECHO "$complete" | $GREP " "`
39471       if test "x$has_space" != x; then
39472         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39473 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39474       fi
39475       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39476     fi
39477   fi
39478 
39479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39482   # "foo.exe" is OK but "foo" is an error.
39483   #
39484   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39485   # It is also a way to make sure we got the proper file name for the real test later on.
39486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39487   if test "x$test_shortpath" = x; then
39488     # Short path failed, file does not exist as specified.
39489     # Try adding .exe or .cmd
39490     if test -f "${new_path}.exe"; then
39491       input_to_shortpath="${new_path}.exe"
39492     elif test -f "${new_path}.cmd"; then
39493       input_to_shortpath="${new_path}.cmd"
39494     else
39495       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39496 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39497       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39498 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39499       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39500     fi
39501   else
39502     input_to_shortpath="$new_path"
39503   fi
39504 
39505   # Call helper function which possibly converts this using DOS-style short mode.
39506   # If so, the updated path is stored in $new_path.
39507   new_path="$input_to_shortpath"
39508 
39509   input_path="$input_to_shortpath"
39510   # Check if we need to convert this using DOS-style short mode. If the path
39511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39512   # take no chances and rewrite it.
39513   # Note: m4 eats our [], so we need to use [ and ] instead.
39514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39515   if test "x$has_forbidden_chars" != x; then
39516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39520       # Going to short mode and back again did indeed matter. Since short mode is
39521       # case insensitive, let's make it lowercase to improve readability.
39522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39523       # Now convert it back to Unix-stile (cygpath)
39524       input_path=`$CYGPATH -u "$shortmode_path"`
39525       new_path="$input_path"
39526     fi
39527   fi
39528 
39529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39530   if test "x$test_cygdrive_prefix" = x; then
39531     # As a simple fix, exclude /usr/bin since it's not a real path.
39532     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39534       # a path prefixed by /cygdrive for fixpath to work.
39535       new_path="$CYGWIN_ROOT_PATH$input_path"
39536     fi
39537   fi
39538 
39539   # remove trailing .exe if any
39540   new_path="${new_path/%.exe/}"
39541 
39542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39543 
39544   # First separate the path from the arguments. This will split at the first
39545   # space.
39546   complete="$BUILD_CC"
39547   path="${complete%% *}"
39548   tmp="$complete EOL"
39549   arguments="${tmp#* }"
39550 
39551   # Input might be given as Windows format, start by converting to
39552   # unix format.
39553   new_path="$path"
39554 
39555   windows_path="$new_path"
39556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39557     unix_path=`$CYGPATH -u "$windows_path"`
39558     new_path="$unix_path"
39559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39561     new_path="$unix_path"
39562   fi
39563 
39564 
39565   # Now try to locate executable using which
39566   new_path=`$WHICH "$new_path" 2> /dev/null`
39567 
39568   if test "x$new_path" = x; then
39569     # Oops. Which didn't find the executable.
39570     # The splitting of arguments from the executable at a space might have been incorrect,
39571     # since paths with space are more likely in Windows. Give it another try with the whole
39572     # argument.
39573     path="$complete"
39574     arguments="EOL"
39575     new_path="$path"
39576 
39577   windows_path="$new_path"
39578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39579     unix_path=`$CYGPATH -u "$windows_path"`
39580     new_path="$unix_path"
39581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39583     new_path="$unix_path"
39584   fi
39585 
39586 
39587     new_path=`$WHICH "$new_path" 2> /dev/null`
39588     # bat and cmd files are not always considered executable in MSYS causing which
39589     # to not find them
39590     if test "x$new_path" = x \
39591         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39592         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39593       new_path="$path"
39594 
39595   windows_path="$new_path"
39596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39597     unix_path=`$CYGPATH -u "$windows_path"`
39598     new_path="$unix_path"
39599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39601     new_path="$unix_path"
39602   fi
39603 
39604     fi
39605 
39606     if test "x$new_path" = x; then
39607       # It's still not found. Now this is an unrecoverable error.
39608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39609 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39610       has_space=`$ECHO "$complete" | $GREP " "`
39611       if test "x$has_space" != x; then
39612         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39614       fi
39615       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39616     fi
39617   fi
39618 
39619   # Now new_path has a complete unix path to the binary
39620   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39621     # Keep paths in /bin as-is, but remove trailing .exe if any
39622     new_path="${new_path/%.exe/}"
39623     # Do not save /bin paths to all_fixpath_prefixes!
39624   else
39625     # Not in mixed or Windows style, start by that.
39626     new_path=`cmd //c echo $new_path`
39627 
39628   input_path="$new_path"
39629   # Check if we need to convert this using DOS-style short mode. If the path
39630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39631   # take no chances and rewrite it.
39632   # Note: m4 eats our [], so we need to use [ and ] instead.
39633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39634   if test "x$has_forbidden_chars" != x; then
39635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39636     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39637   fi
39638 
39639     # Output is in $new_path
39640 
39641   windows_path="$new_path"
39642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39643     unix_path=`$CYGPATH -u "$windows_path"`
39644     new_path="$unix_path"
39645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39647     new_path="$unix_path"
39648   fi
39649 
39650     # remove trailing .exe if any
39651     new_path="${new_path/%.exe/}"
39652 
39653     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39654     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39655   fi
39656 
39657   else
39658     # We're on a unix platform. Hooray! :)
39659     # First separate the path from the arguments. This will split at the first
39660     # space.
39661     complete="$BUILD_CC"
39662     path="${complete%% *}"
39663     tmp="$complete EOL"
39664     arguments="${tmp#* }"
39665 
39666     # Cannot rely on the command "which" here since it doesn't always work.
39667     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39668     if test -z "$is_absolute_path"; then
39669       # Path to executable is not absolute. Find it.
39670       IFS_save="$IFS"
39671       IFS=:
39672       for p in $PATH; do
39673         if test -f "$p/$path" && test -x "$p/$path"; then
39674           new_path="$p/$path"
39675           break
39676         fi
39677       done
39678       IFS="$IFS_save"
39679     else
39680       # This is an absolute path, we can use it without further modifications.
39681       new_path="$path"
39682     fi
39683 
39684     if test "x$new_path" = x; then
39685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39686 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39687       has_space=`$ECHO "$complete" | $GREP " "`
39688       if test "x$has_space" != x; then
39689         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39690 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39691       fi
39692       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39693     fi
39694   fi
39695 
39696   # Now join together the path and the arguments once again
39697   if test "x$arguments" != xEOL; then
39698     new_complete="$new_path ${arguments% *}"
39699   else
39700     new_complete="$new_path"
39701   fi
39702 
39703   if test "x$complete" != "x$new_complete"; then
39704     BUILD_CC="$new_complete"
39705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39706 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39707   fi
39708 
39709 
39710 
39711   # Publish this variable in the help.
39712 
39713 
39714   if test "x$BUILD_CXX" = x; then
39715     # The variable is not set by user, try to locate tool using the code snippet
39716     for ac_prog in cl CC g++
39717 do
39718   # Extract the first word of "$ac_prog", so it can be a program name with args.
39719 set dummy $ac_prog; ac_word=$2
39720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39721 $as_echo_n "checking for $ac_word... " >&6; }
39722 if ${ac_cv_path_BUILD_CXX+:} false; then :
39723   $as_echo_n "(cached) " >&6
39724 else
39725   case $BUILD_CXX in
39726   [\\/]* | ?:[\\/]*)
39727   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39728   ;;
39729   *)
39730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39731 for as_dir in $PATH
39732 do
39733   IFS=$as_save_IFS
39734   test -z "$as_dir" && as_dir=.
39735     for ac_exec_ext in '' $ac_executable_extensions; do
39736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39737     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39739     break 2
39740   fi
39741 done
39742   done
39743 IFS=$as_save_IFS
39744 
39745   ;;
39746 esac
39747 fi
39748 BUILD_CXX=$ac_cv_path_BUILD_CXX
39749 if test -n "$BUILD_CXX"; then
39750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39751 $as_echo "$BUILD_CXX" >&6; }
39752 else
39753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39754 $as_echo "no" >&6; }
39755 fi
39756 
39757 
39758   test -n "$BUILD_CXX" && break
39759 done
39760 
39761   else
39762     # The variable is set, but is it from the command line or the environment?
39763 
39764     # Try to remove the string !BUILD_CXX! from our list.
39765     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39766     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39767       # If it failed, the variable was not from the command line. Ignore it,
39768       # but warn the user (except for BASH, which is always set by the calling BASH).
39769       if test "xBUILD_CXX" != xBASH; then
39770         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39771 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39772       fi
39773       # Try to locate tool using the code snippet
39774       for ac_prog in cl CC g++
39775 do
39776   # Extract the first word of "$ac_prog", so it can be a program name with args.
39777 set dummy $ac_prog; ac_word=$2
39778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39779 $as_echo_n "checking for $ac_word... " >&6; }
39780 if ${ac_cv_path_BUILD_CXX+:} false; then :
39781   $as_echo_n "(cached) " >&6
39782 else
39783   case $BUILD_CXX in
39784   [\\/]* | ?:[\\/]*)
39785   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39786   ;;
39787   *)
39788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39789 for as_dir in $PATH
39790 do
39791   IFS=$as_save_IFS
39792   test -z "$as_dir" && as_dir=.
39793     for ac_exec_ext in '' $ac_executable_extensions; do
39794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39795     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39797     break 2
39798   fi
39799 done
39800   done
39801 IFS=$as_save_IFS
39802 
39803   ;;
39804 esac
39805 fi
39806 BUILD_CXX=$ac_cv_path_BUILD_CXX
39807 if test -n "$BUILD_CXX"; then
39808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39809 $as_echo "$BUILD_CXX" >&6; }
39810 else
39811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39812 $as_echo "no" >&6; }
39813 fi
39814 
39815 
39816   test -n "$BUILD_CXX" && break
39817 done
39818 
39819     else
39820       # If it succeeded, then it was overridden by the user. We will use it
39821       # for the tool.
39822 
39823       # First remove it from the list of overridden variables, so we can test
39824       # for unknown variables in the end.
39825       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39826 
39827       # Check if the provided tool contains a complete path.
39828       tool_specified="$BUILD_CXX"
39829       tool_basename="${tool_specified##*/}"
39830       if test "x$tool_basename" = "x$tool_specified"; then
39831         # A command without a complete path is provided, search $PATH.
39832         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39833 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39834         # Extract the first word of "$tool_basename", so it can be a program name with args.
39835 set dummy $tool_basename; ac_word=$2
39836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39837 $as_echo_n "checking for $ac_word... " >&6; }
39838 if ${ac_cv_path_BUILD_CXX+:} false; then :
39839   $as_echo_n "(cached) " >&6
39840 else
39841   case $BUILD_CXX in
39842   [\\/]* | ?:[\\/]*)
39843   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39844   ;;
39845   *)
39846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39847 for as_dir in $PATH
39848 do
39849   IFS=$as_save_IFS
39850   test -z "$as_dir" && as_dir=.
39851     for ac_exec_ext in '' $ac_executable_extensions; do
39852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39853     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39855     break 2
39856   fi
39857 done
39858   done
39859 IFS=$as_save_IFS
39860 
39861   ;;
39862 esac
39863 fi
39864 BUILD_CXX=$ac_cv_path_BUILD_CXX
39865 if test -n "$BUILD_CXX"; then
39866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39867 $as_echo "$BUILD_CXX" >&6; }
39868 else
39869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39870 $as_echo "no" >&6; }
39871 fi
39872 
39873 
39874         if test "x$BUILD_CXX" = x; then
39875           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39876         fi
39877       else
39878         # Otherwise we believe it is a complete path. Use it as it is.
39879         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39880 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39881         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39882 $as_echo_n "checking for BUILD_CXX... " >&6; }
39883         if test ! -x "$tool_specified"; then
39884           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39885 $as_echo "not found" >&6; }
39886           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39887         fi
39888         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39889 $as_echo "$tool_specified" >&6; }
39890       fi
39891     fi
39892   fi
39893 
39894 
39895 
39896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39897 
39898   # First separate the path from the arguments. This will split at the first
39899   # space.
39900   complete="$BUILD_CXX"
39901   path="${complete%% *}"
39902   tmp="$complete EOL"
39903   arguments="${tmp#* }"
39904 
39905   # Input might be given as Windows format, start by converting to
39906   # unix format.
39907   new_path=`$CYGPATH -u "$path"`
39908 
39909   # Now try to locate executable using which
39910   new_path=`$WHICH "$new_path" 2> /dev/null`
39911   # bat and cmd files are not always considered executable in cygwin causing which
39912   # to not find them
39913   if test "x$new_path" = x \
39914       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39915       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39916     new_path=`$CYGPATH -u "$path"`
39917   fi
39918   if test "x$new_path" = x; then
39919     # Oops. Which didn't find the executable.
39920     # The splitting of arguments from the executable at a space might have been incorrect,
39921     # since paths with space are more likely in Windows. Give it another try with the whole
39922     # argument.
39923     path="$complete"
39924     arguments="EOL"
39925     new_path=`$CYGPATH -u "$path"`
39926     new_path=`$WHICH "$new_path" 2> /dev/null`
39927     # bat and cmd files are not always considered executable in cygwin causing which
39928     # to not find them
39929     if test "x$new_path" = x \
39930         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39931         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39932       new_path=`$CYGPATH -u "$path"`
39933     fi
39934     if test "x$new_path" = x; then
39935       # It's still not found. Now this is an unrecoverable error.
39936       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39937 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39938       has_space=`$ECHO "$complete" | $GREP " "`
39939       if test "x$has_space" != x; then
39940         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39941 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39942       fi
39943       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39944     fi
39945   fi
39946 
39947   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39948   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39949   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39950   # "foo.exe" is OK but "foo" is an error.
39951   #
39952   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39953   # It is also a way to make sure we got the proper file name for the real test later on.
39954   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39955   if test "x$test_shortpath" = x; then
39956     # Short path failed, file does not exist as specified.
39957     # Try adding .exe or .cmd
39958     if test -f "${new_path}.exe"; then
39959       input_to_shortpath="${new_path}.exe"
39960     elif test -f "${new_path}.cmd"; then
39961       input_to_shortpath="${new_path}.cmd"
39962     else
39963       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39964 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39965       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39966 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39967       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39968     fi
39969   else
39970     input_to_shortpath="$new_path"
39971   fi
39972 
39973   # Call helper function which possibly converts this using DOS-style short mode.
39974   # If so, the updated path is stored in $new_path.
39975   new_path="$input_to_shortpath"
39976 
39977   input_path="$input_to_shortpath"
39978   # Check if we need to convert this using DOS-style short mode. If the path
39979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39980   # take no chances and rewrite it.
39981   # Note: m4 eats our [], so we need to use [ and ] instead.
39982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39983   if test "x$has_forbidden_chars" != x; then
39984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39988       # Going to short mode and back again did indeed matter. Since short mode is
39989       # case insensitive, let's make it lowercase to improve readability.
39990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39991       # Now convert it back to Unix-stile (cygpath)
39992       input_path=`$CYGPATH -u "$shortmode_path"`
39993       new_path="$input_path"
39994     fi
39995   fi
39996 
39997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39998   if test "x$test_cygdrive_prefix" = x; then
39999     # As a simple fix, exclude /usr/bin since it's not a real path.
40000     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40002       # a path prefixed by /cygdrive for fixpath to work.
40003       new_path="$CYGWIN_ROOT_PATH$input_path"
40004     fi
40005   fi
40006 
40007   # remove trailing .exe if any
40008   new_path="${new_path/%.exe/}"
40009 
40010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40011 
40012   # First separate the path from the arguments. This will split at the first
40013   # space.
40014   complete="$BUILD_CXX"
40015   path="${complete%% *}"
40016   tmp="$complete EOL"
40017   arguments="${tmp#* }"
40018 
40019   # Input might be given as Windows format, start by converting to
40020   # unix format.
40021   new_path="$path"
40022 
40023   windows_path="$new_path"
40024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40025     unix_path=`$CYGPATH -u "$windows_path"`
40026     new_path="$unix_path"
40027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40029     new_path="$unix_path"
40030   fi
40031 
40032 
40033   # Now try to locate executable using which
40034   new_path=`$WHICH "$new_path" 2> /dev/null`
40035 
40036   if test "x$new_path" = x; then
40037     # Oops. Which didn't find the executable.
40038     # The splitting of arguments from the executable at a space might have been incorrect,
40039     # since paths with space are more likely in Windows. Give it another try with the whole
40040     # argument.
40041     path="$complete"
40042     arguments="EOL"
40043     new_path="$path"
40044 
40045   windows_path="$new_path"
40046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40047     unix_path=`$CYGPATH -u "$windows_path"`
40048     new_path="$unix_path"
40049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40051     new_path="$unix_path"
40052   fi
40053 
40054 
40055     new_path=`$WHICH "$new_path" 2> /dev/null`
40056     # bat and cmd files are not always considered executable in MSYS causing which
40057     # to not find them
40058     if test "x$new_path" = x \
40059         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40060         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40061       new_path="$path"
40062 
40063   windows_path="$new_path"
40064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40065     unix_path=`$CYGPATH -u "$windows_path"`
40066     new_path="$unix_path"
40067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40069     new_path="$unix_path"
40070   fi
40071 
40072     fi
40073 
40074     if test "x$new_path" = x; then
40075       # It's still not found. Now this is an unrecoverable error.
40076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40077 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40078       has_space=`$ECHO "$complete" | $GREP " "`
40079       if test "x$has_space" != x; then
40080         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40082       fi
40083       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40084     fi
40085   fi
40086 
40087   # Now new_path has a complete unix path to the binary
40088   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40089     # Keep paths in /bin as-is, but remove trailing .exe if any
40090     new_path="${new_path/%.exe/}"
40091     # Do not save /bin paths to all_fixpath_prefixes!
40092   else
40093     # Not in mixed or Windows style, start by that.
40094     new_path=`cmd //c echo $new_path`
40095 
40096   input_path="$new_path"
40097   # Check if we need to convert this using DOS-style short mode. If the path
40098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40099   # take no chances and rewrite it.
40100   # Note: m4 eats our [], so we need to use [ and ] instead.
40101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40102   if test "x$has_forbidden_chars" != x; then
40103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40104     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40105   fi
40106 
40107     # Output is in $new_path
40108 
40109   windows_path="$new_path"
40110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40111     unix_path=`$CYGPATH -u "$windows_path"`
40112     new_path="$unix_path"
40113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40115     new_path="$unix_path"
40116   fi
40117 
40118     # remove trailing .exe if any
40119     new_path="${new_path/%.exe/}"
40120 
40121     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40122     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40123   fi
40124 
40125   else
40126     # We're on a unix platform. Hooray! :)
40127     # First separate the path from the arguments. This will split at the first
40128     # space.
40129     complete="$BUILD_CXX"
40130     path="${complete%% *}"
40131     tmp="$complete EOL"
40132     arguments="${tmp#* }"
40133 
40134     # Cannot rely on the command "which" here since it doesn't always work.
40135     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40136     if test -z "$is_absolute_path"; then
40137       # Path to executable is not absolute. Find it.
40138       IFS_save="$IFS"
40139       IFS=:
40140       for p in $PATH; do
40141         if test -f "$p/$path" && test -x "$p/$path"; then
40142           new_path="$p/$path"
40143           break
40144         fi
40145       done
40146       IFS="$IFS_save"
40147     else
40148       # This is an absolute path, we can use it without further modifications.
40149       new_path="$path"
40150     fi
40151 
40152     if test "x$new_path" = x; then
40153       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40154 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40155       has_space=`$ECHO "$complete" | $GREP " "`
40156       if test "x$has_space" != x; then
40157         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40158 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40159       fi
40160       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40161     fi
40162   fi
40163 
40164   # Now join together the path and the arguments once again
40165   if test "x$arguments" != xEOL; then
40166     new_complete="$new_path ${arguments% *}"
40167   else
40168     new_complete="$new_path"
40169   fi
40170 
40171   if test "x$complete" != "x$new_complete"; then
40172     BUILD_CXX="$new_complete"
40173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40174 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40175   fi
40176 
40177 
40178 
40179   # Publish this variable in the help.
40180 
40181 
40182   if test "x$BUILD_LD" = x; then
40183     # The variable is not set by user, try to locate tool using the code snippet
40184     for ac_prog in ld
40185 do
40186   # Extract the first word of "$ac_prog", so it can be a program name with args.
40187 set dummy $ac_prog; ac_word=$2
40188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40189 $as_echo_n "checking for $ac_word... " >&6; }
40190 if ${ac_cv_path_BUILD_LD+:} false; then :
40191   $as_echo_n "(cached) " >&6
40192 else
40193   case $BUILD_LD in
40194   [\\/]* | ?:[\\/]*)
40195   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40196   ;;
40197   *)
40198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40199 for as_dir in $PATH
40200 do
40201   IFS=$as_save_IFS
40202   test -z "$as_dir" && as_dir=.
40203     for ac_exec_ext in '' $ac_executable_extensions; do
40204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40205     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40207     break 2
40208   fi
40209 done
40210   done
40211 IFS=$as_save_IFS
40212 
40213   ;;
40214 esac
40215 fi
40216 BUILD_LD=$ac_cv_path_BUILD_LD
40217 if test -n "$BUILD_LD"; then
40218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40219 $as_echo "$BUILD_LD" >&6; }
40220 else
40221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40222 $as_echo "no" >&6; }
40223 fi
40224 
40225 
40226   test -n "$BUILD_LD" && break
40227 done
40228 
40229   else
40230     # The variable is set, but is it from the command line or the environment?
40231 
40232     # Try to remove the string !BUILD_LD! from our list.
40233     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40234     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40235       # If it failed, the variable was not from the command line. Ignore it,
40236       # but warn the user (except for BASH, which is always set by the calling BASH).
40237       if test "xBUILD_LD" != xBASH; then
40238         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40239 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40240       fi
40241       # Try to locate tool using the code snippet
40242       for ac_prog in ld
40243 do
40244   # Extract the first word of "$ac_prog", so it can be a program name with args.
40245 set dummy $ac_prog; ac_word=$2
40246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40247 $as_echo_n "checking for $ac_word... " >&6; }
40248 if ${ac_cv_path_BUILD_LD+:} false; then :
40249   $as_echo_n "(cached) " >&6
40250 else
40251   case $BUILD_LD in
40252   [\\/]* | ?:[\\/]*)
40253   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40254   ;;
40255   *)
40256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40257 for as_dir in $PATH
40258 do
40259   IFS=$as_save_IFS
40260   test -z "$as_dir" && as_dir=.
40261     for ac_exec_ext in '' $ac_executable_extensions; do
40262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40263     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40265     break 2
40266   fi
40267 done
40268   done
40269 IFS=$as_save_IFS
40270 
40271   ;;
40272 esac
40273 fi
40274 BUILD_LD=$ac_cv_path_BUILD_LD
40275 if test -n "$BUILD_LD"; then
40276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40277 $as_echo "$BUILD_LD" >&6; }
40278 else
40279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40280 $as_echo "no" >&6; }
40281 fi
40282 
40283 
40284   test -n "$BUILD_LD" && break
40285 done
40286 
40287     else
40288       # If it succeeded, then it was overridden by the user. We will use it
40289       # for the tool.
40290 
40291       # First remove it from the list of overridden variables, so we can test
40292       # for unknown variables in the end.
40293       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40294 
40295       # Check if the provided tool contains a complete path.
40296       tool_specified="$BUILD_LD"
40297       tool_basename="${tool_specified##*/}"
40298       if test "x$tool_basename" = "x$tool_specified"; then
40299         # A command without a complete path is provided, search $PATH.
40300         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40301 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40302         # Extract the first word of "$tool_basename", so it can be a program name with args.
40303 set dummy $tool_basename; ac_word=$2
40304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40305 $as_echo_n "checking for $ac_word... " >&6; }
40306 if ${ac_cv_path_BUILD_LD+:} false; then :
40307   $as_echo_n "(cached) " >&6
40308 else
40309   case $BUILD_LD in
40310   [\\/]* | ?:[\\/]*)
40311   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40312   ;;
40313   *)
40314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40315 for as_dir in $PATH
40316 do
40317   IFS=$as_save_IFS
40318   test -z "$as_dir" && as_dir=.
40319     for ac_exec_ext in '' $ac_executable_extensions; do
40320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40321     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40323     break 2
40324   fi
40325 done
40326   done
40327 IFS=$as_save_IFS
40328 
40329   ;;
40330 esac
40331 fi
40332 BUILD_LD=$ac_cv_path_BUILD_LD
40333 if test -n "$BUILD_LD"; then
40334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40335 $as_echo "$BUILD_LD" >&6; }
40336 else
40337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40338 $as_echo "no" >&6; }
40339 fi
40340 
40341 
40342         if test "x$BUILD_LD" = x; then
40343           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40344         fi
40345       else
40346         # Otherwise we believe it is a complete path. Use it as it is.
40347         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40348 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40349         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40350 $as_echo_n "checking for BUILD_LD... " >&6; }
40351         if test ! -x "$tool_specified"; then
40352           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40353 $as_echo "not found" >&6; }
40354           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40355         fi
40356         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40357 $as_echo "$tool_specified" >&6; }
40358       fi
40359     fi
40360   fi
40361 
40362 
40363 
40364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40365 
40366   # First separate the path from the arguments. This will split at the first
40367   # space.
40368   complete="$BUILD_LD"
40369   path="${complete%% *}"
40370   tmp="$complete EOL"
40371   arguments="${tmp#* }"
40372 
40373   # Input might be given as Windows format, start by converting to
40374   # unix format.
40375   new_path=`$CYGPATH -u "$path"`
40376 
40377   # Now try to locate executable using which
40378   new_path=`$WHICH "$new_path" 2> /dev/null`
40379   # bat and cmd files are not always considered executable in cygwin causing which
40380   # to not find them
40381   if test "x$new_path" = x \
40382       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40383       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40384     new_path=`$CYGPATH -u "$path"`
40385   fi
40386   if test "x$new_path" = x; then
40387     # Oops. Which didn't find the executable.
40388     # The splitting of arguments from the executable at a space might have been incorrect,
40389     # since paths with space are more likely in Windows. Give it another try with the whole
40390     # argument.
40391     path="$complete"
40392     arguments="EOL"
40393     new_path=`$CYGPATH -u "$path"`
40394     new_path=`$WHICH "$new_path" 2> /dev/null`
40395     # bat and cmd files are not always considered executable in cygwin causing which
40396     # to not find them
40397     if test "x$new_path" = x \
40398         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40399         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40400       new_path=`$CYGPATH -u "$path"`
40401     fi
40402     if test "x$new_path" = x; then
40403       # It's still not found. Now this is an unrecoverable error.
40404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40405 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40406       has_space=`$ECHO "$complete" | $GREP " "`
40407       if test "x$has_space" != x; then
40408         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40409 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40410       fi
40411       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40412     fi
40413   fi
40414 
40415   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40416   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40417   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40418   # "foo.exe" is OK but "foo" is an error.
40419   #
40420   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40421   # It is also a way to make sure we got the proper file name for the real test later on.
40422   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40423   if test "x$test_shortpath" = x; then
40424     # Short path failed, file does not exist as specified.
40425     # Try adding .exe or .cmd
40426     if test -f "${new_path}.exe"; then
40427       input_to_shortpath="${new_path}.exe"
40428     elif test -f "${new_path}.cmd"; then
40429       input_to_shortpath="${new_path}.cmd"
40430     else
40431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40432 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40433       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40434 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40435       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40436     fi
40437   else
40438     input_to_shortpath="$new_path"
40439   fi
40440 
40441   # Call helper function which possibly converts this using DOS-style short mode.
40442   # If so, the updated path is stored in $new_path.
40443   new_path="$input_to_shortpath"
40444 
40445   input_path="$input_to_shortpath"
40446   # Check if we need to convert this using DOS-style short mode. If the path
40447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40448   # take no chances and rewrite it.
40449   # Note: m4 eats our [], so we need to use [ and ] instead.
40450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40451   if test "x$has_forbidden_chars" != x; then
40452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40453     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40454     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40455     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40456       # Going to short mode and back again did indeed matter. Since short mode is
40457       # case insensitive, let's make it lowercase to improve readability.
40458       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40459       # Now convert it back to Unix-stile (cygpath)
40460       input_path=`$CYGPATH -u "$shortmode_path"`
40461       new_path="$input_path"
40462     fi
40463   fi
40464 
40465   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40466   if test "x$test_cygdrive_prefix" = x; then
40467     # As a simple fix, exclude /usr/bin since it's not a real path.
40468     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40469       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40470       # a path prefixed by /cygdrive for fixpath to work.
40471       new_path="$CYGWIN_ROOT_PATH$input_path"
40472     fi
40473   fi
40474 
40475   # remove trailing .exe if any
40476   new_path="${new_path/%.exe/}"
40477 
40478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40479 
40480   # First separate the path from the arguments. This will split at the first
40481   # space.
40482   complete="$BUILD_LD"
40483   path="${complete%% *}"
40484   tmp="$complete EOL"
40485   arguments="${tmp#* }"
40486 
40487   # Input might be given as Windows format, start by converting to
40488   # unix format.
40489   new_path="$path"
40490 
40491   windows_path="$new_path"
40492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40493     unix_path=`$CYGPATH -u "$windows_path"`
40494     new_path="$unix_path"
40495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40497     new_path="$unix_path"
40498   fi
40499 
40500 
40501   # Now try to locate executable using which
40502   new_path=`$WHICH "$new_path" 2> /dev/null`
40503 
40504   if test "x$new_path" = x; then
40505     # Oops. Which didn't find the executable.
40506     # The splitting of arguments from the executable at a space might have been incorrect,
40507     # since paths with space are more likely in Windows. Give it another try with the whole
40508     # argument.
40509     path="$complete"
40510     arguments="EOL"
40511     new_path="$path"
40512 
40513   windows_path="$new_path"
40514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40515     unix_path=`$CYGPATH -u "$windows_path"`
40516     new_path="$unix_path"
40517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40519     new_path="$unix_path"
40520   fi
40521 
40522 
40523     new_path=`$WHICH "$new_path" 2> /dev/null`
40524     # bat and cmd files are not always considered executable in MSYS causing which
40525     # to not find them
40526     if test "x$new_path" = x \
40527         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40528         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40529       new_path="$path"
40530 
40531   windows_path="$new_path"
40532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40533     unix_path=`$CYGPATH -u "$windows_path"`
40534     new_path="$unix_path"
40535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40537     new_path="$unix_path"
40538   fi
40539 
40540     fi
40541 
40542     if test "x$new_path" = x; then
40543       # It's still not found. Now this is an unrecoverable error.
40544       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40545 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40546       has_space=`$ECHO "$complete" | $GREP " "`
40547       if test "x$has_space" != x; then
40548         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40549 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40550       fi
40551       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40552     fi
40553   fi
40554 
40555   # Now new_path has a complete unix path to the binary
40556   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40557     # Keep paths in /bin as-is, but remove trailing .exe if any
40558     new_path="${new_path/%.exe/}"
40559     # Do not save /bin paths to all_fixpath_prefixes!
40560   else
40561     # Not in mixed or Windows style, start by that.
40562     new_path=`cmd //c echo $new_path`
40563 
40564   input_path="$new_path"
40565   # Check if we need to convert this using DOS-style short mode. If the path
40566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40567   # take no chances and rewrite it.
40568   # Note: m4 eats our [], so we need to use [ and ] instead.
40569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40570   if test "x$has_forbidden_chars" != x; then
40571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40572     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40573   fi
40574 
40575     # Output is in $new_path
40576 
40577   windows_path="$new_path"
40578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40579     unix_path=`$CYGPATH -u "$windows_path"`
40580     new_path="$unix_path"
40581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40583     new_path="$unix_path"
40584   fi
40585 
40586     # remove trailing .exe if any
40587     new_path="${new_path/%.exe/}"
40588 
40589     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40590     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40591   fi
40592 
40593   else
40594     # We're on a unix platform. Hooray! :)
40595     # First separate the path from the arguments. This will split at the first
40596     # space.
40597     complete="$BUILD_LD"
40598     path="${complete%% *}"
40599     tmp="$complete EOL"
40600     arguments="${tmp#* }"
40601 
40602     # Cannot rely on the command "which" here since it doesn't always work.
40603     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40604     if test -z "$is_absolute_path"; then
40605       # Path to executable is not absolute. Find it.
40606       IFS_save="$IFS"
40607       IFS=:
40608       for p in $PATH; do
40609         if test -f "$p/$path" && test -x "$p/$path"; then
40610           new_path="$p/$path"
40611           break
40612         fi
40613       done
40614       IFS="$IFS_save"
40615     else
40616       # This is an absolute path, we can use it without further modifications.
40617       new_path="$path"
40618     fi
40619 
40620     if test "x$new_path" = x; then
40621       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40622 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40623       has_space=`$ECHO "$complete" | $GREP " "`
40624       if test "x$has_space" != x; then
40625         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40626 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40627       fi
40628       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40629     fi
40630   fi
40631 
40632   # Now join together the path and the arguments once again
40633   if test "x$arguments" != xEOL; then
40634     new_complete="$new_path ${arguments% *}"
40635   else
40636     new_complete="$new_path"
40637   fi
40638 
40639   if test "x$complete" != "x$new_complete"; then
40640     BUILD_LD="$new_complete"
40641     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40642 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40643   fi
40644 
40645   else
40646     # If we are not cross compiling, use the normal target compilers for
40647     # building the build platform executables.
40648     BUILD_CC="$CC"
40649     BUILD_CXX="$CXX"
40650     BUILD_LD="$LD"
40651   fi
40652 
40653 
40654 
40655 
40656 
40657 
40658   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40659     # For hotspot, we need these in Windows mixed path,
40660     # so rewrite them all. Need added .exe suffix.
40661     HOTSPOT_CXX="$CXX.exe"
40662     HOTSPOT_LD="$LD.exe"
40663     HOTSPOT_MT="$MT.exe"
40664     HOTSPOT_RC="$RC.exe"
40665 
40666   unix_path="$HOTSPOT_CXX"
40667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40668     windows_path=`$CYGPATH -m "$unix_path"`
40669     HOTSPOT_CXX="$windows_path"
40670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40671     windows_path=`cmd //c echo $unix_path`
40672     HOTSPOT_CXX="$windows_path"
40673   fi
40674 
40675 
40676   unix_path="$HOTSPOT_LD"
40677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40678     windows_path=`$CYGPATH -m "$unix_path"`
40679     HOTSPOT_LD="$windows_path"
40680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40681     windows_path=`cmd //c echo $unix_path`
40682     HOTSPOT_LD="$windows_path"
40683   fi
40684 
40685 
40686   unix_path="$HOTSPOT_MT"
40687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40688     windows_path=`$CYGPATH -m "$unix_path"`
40689     HOTSPOT_MT="$windows_path"
40690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40691     windows_path=`cmd //c echo $unix_path`
40692     HOTSPOT_MT="$windows_path"
40693   fi
40694 
40695 
40696   unix_path="$HOTSPOT_RC"
40697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40698     windows_path=`$CYGPATH -m "$unix_path"`
40699     HOTSPOT_RC="$windows_path"
40700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40701     windows_path=`cmd //c echo $unix_path`
40702     HOTSPOT_RC="$windows_path"
40703   fi
40704 
40705 
40706 
40707   else
40708     HOTSPOT_CXX="$CXX"
40709     HOTSPOT_LD="$LD"
40710   fi
40711 
40712 
40713 
40714   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40715     USE_CLANG=true
40716   fi
40717 
40718 
40719   # LDEXE is the linker to use, when creating executables. Not really used.
40720   # FIXME: These should just be removed!
40721   LDEXE="$LD"
40722   LDEXECXX="$LDCXX"
40723 
40724 
40725 
40726 
40727 
40728 
40729   # The package path is used only on macosx?
40730   # FIXME: clean this up, and/or move it elsewhere.
40731   PACKAGE_PATH=/opt/local
40732 
40733 
40734   # Check for extra potential brokenness.
40735   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40736     # On Windows, double-check that we got the right compiler.
40737     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40738     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40739     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40740       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40741         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40742       fi
40743     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40744       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40745         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40746       fi
40747     fi
40748   fi
40749 
40750   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40751     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40752     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40753     # This is later checked when setting flags.
40754 
40755     # "-Og" suppported for GCC 4.8 and later
40756     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40757 
40758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40759 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40760   supports=yes
40761 
40762   saved_cflags="$CFLAGS"
40763   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40764   ac_ext=c
40765 ac_cpp='$CPP $CPPFLAGS'
40766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40769 
40770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40771 /* end confdefs.h.  */
40772 int i;
40773 _ACEOF
40774 if ac_fn_c_try_compile "$LINENO"; then :
40775 
40776 else
40777   supports=no
40778 fi
40779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40780   ac_ext=cpp
40781 ac_cpp='$CXXCPP $CPPFLAGS'
40782 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40783 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40784 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40785 
40786   CFLAGS="$saved_cflags"
40787 
40788   saved_cxxflags="$CXXFLAGS"
40789   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40790   ac_ext=cpp
40791 ac_cpp='$CXXCPP $CPPFLAGS'
40792 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40793 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40794 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40795 
40796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40797 /* end confdefs.h.  */
40798 int i;
40799 _ACEOF
40800 if ac_fn_cxx_try_compile "$LINENO"; then :
40801 
40802 else
40803   supports=no
40804 fi
40805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40806   ac_ext=cpp
40807 ac_cpp='$CXXCPP $CPPFLAGS'
40808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40811 
40812   CXXFLAGS="$saved_cxxflags"
40813 
40814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40815 $as_echo "$supports" >&6; }
40816   if test "x$supports" = "xyes" ; then
40817     HAS_CFLAG_OPTIMIZE_DEBUG=true
40818   else
40819     HAS_CFLAG_OPTIMIZE_DEBUG=false
40820   fi
40821 
40822 
40823     # "-z relro" supported in GNU binutils 2.17 and later
40824     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40825 
40826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40827 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40828   supports=yes
40829 
40830   saved_ldflags="$LDFLAGS"
40831   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40832   ac_ext=c
40833 ac_cpp='$CPP $CPPFLAGS'
40834 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40835 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40836 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40837 
40838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40839 /* end confdefs.h.  */
40840 
40841 int
40842 main ()
40843 {
40844 
40845   ;
40846   return 0;
40847 }
40848 _ACEOF
40849 if ac_fn_c_try_link "$LINENO"; then :
40850 
40851 else
40852   supports=no
40853 fi
40854 rm -f core conftest.err conftest.$ac_objext \
40855     conftest$ac_exeext conftest.$ac_ext
40856   ac_ext=cpp
40857 ac_cpp='$CXXCPP $CPPFLAGS'
40858 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40859 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40860 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40861 
40862   LDFLAGS="$saved_ldflags"
40863 
40864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40865 $as_echo "$supports" >&6; }
40866   if test "x$supports" = "xyes" ; then
40867     HAS_LINKER_RELRO=true
40868   else
40869     HAS_LINKER_RELRO=false
40870   fi
40871 
40872 
40873     # "-z now" supported in GNU binutils 2.11 and later
40874     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40875 
40876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40877 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40878   supports=yes
40879 
40880   saved_ldflags="$LDFLAGS"
40881   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40882   ac_ext=c
40883 ac_cpp='$CPP $CPPFLAGS'
40884 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40885 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40886 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40887 
40888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40889 /* end confdefs.h.  */
40890 
40891 int
40892 main ()
40893 {
40894 
40895   ;
40896   return 0;
40897 }
40898 _ACEOF
40899 if ac_fn_c_try_link "$LINENO"; then :
40900 
40901 else
40902   supports=no
40903 fi
40904 rm -f core conftest.err conftest.$ac_objext \
40905     conftest$ac_exeext conftest.$ac_ext
40906   ac_ext=cpp
40907 ac_cpp='$CXXCPP $CPPFLAGS'
40908 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40909 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40910 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40911 
40912   LDFLAGS="$saved_ldflags"
40913 
40914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40915 $as_echo "$supports" >&6; }
40916   if test "x$supports" = "xyes" ; then
40917     HAS_LINKER_NOW=true
40918   else
40919     HAS_LINKER_NOW=false
40920   fi
40921 
40922   fi
40923 
40924   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40925   # in executable.'
40926   USING_BROKEN_SUSE_LD=no
40927   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40929 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40930     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40931     $ECHO "int main() { }" > main.c
40932     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40933       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40934 $as_echo "no" >&6; }
40935       USING_BROKEN_SUSE_LD=no
40936     else
40937       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40938 $as_echo "yes" >&6; }
40939       USING_BROKEN_SUSE_LD=yes
40940     fi
40941     rm -rf version-script.map main.c a.out
40942   fi
40943 
40944 
40945 
40946 # Setup the JTReg Regression Test Harness.
40947 
40948 
40949 # Check whether --with-jtreg was given.
40950 if test "${with_jtreg+set}" = set; then :
40951   withval=$with_jtreg;
40952 else
40953   with_jtreg=no
40954 fi
40955 
40956 
40957   if test "x$with_jtreg" = xno; then
40958     # jtreg disabled
40959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40960 $as_echo_n "checking for jtreg... " >&6; }
40961     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40962 $as_echo "no" >&6; }
40963   else
40964     if test "x$with_jtreg" != xyes; then
40965       # with path specified.
40966       JT_HOME="$with_jtreg"
40967     fi
40968 
40969     if test "x$JT_HOME" != x; then
40970       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40971 $as_echo_n "checking for jtreg... " >&6; }
40972 
40973       # use JT_HOME enviroment var.
40974 
40975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40976 
40977   # Input might be given as Windows format, start by converting to
40978   # unix format.
40979   path="$JT_HOME"
40980   new_path=`$CYGPATH -u "$path"`
40981 
40982   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40983   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40984   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40985   # "foo.exe" is OK but "foo" is an error.
40986   #
40987   # This test is therefore slightly more accurate than "test -f" to check for file precense.
40988   # It is also a way to make sure we got the proper file name for the real test later on.
40989   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40990   if test "x$test_shortpath" = x; then
40991     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40992 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40993     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40994   fi
40995 
40996   # Call helper function which possibly converts this using DOS-style short mode.
40997   # If so, the updated path is stored in $new_path.
40998 
40999   input_path="$new_path"
41000   # Check if we need to convert this using DOS-style short mode. If the path
41001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41002   # take no chances and rewrite it.
41003   # Note: m4 eats our [], so we need to use [ and ] instead.
41004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41005   if test "x$has_forbidden_chars" != x; then
41006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41007     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41008     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41009     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41010       # Going to short mode and back again did indeed matter. Since short mode is
41011       # case insensitive, let's make it lowercase to improve readability.
41012       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41013       # Now convert it back to Unix-stile (cygpath)
41014       input_path=`$CYGPATH -u "$shortmode_path"`
41015       new_path="$input_path"
41016     fi
41017   fi
41018 
41019   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41020   if test "x$test_cygdrive_prefix" = x; then
41021     # As a simple fix, exclude /usr/bin since it's not a real path.
41022     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41023       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41024       # a path prefixed by /cygdrive for fixpath to work.
41025       new_path="$CYGWIN_ROOT_PATH$input_path"
41026     fi
41027   fi
41028 
41029 
41030   if test "x$path" != "x$new_path"; then
41031     JT_HOME="$new_path"
41032     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41033 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41034   fi
41035 
41036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41037 
41038   path="$JT_HOME"
41039   has_colon=`$ECHO $path | $GREP ^.:`
41040   new_path="$path"
41041   if test "x$has_colon" = x; then
41042     # Not in mixed or Windows style, start by that.
41043     new_path=`cmd //c echo $path`
41044   fi
41045 
41046 
41047   input_path="$new_path"
41048   # Check if we need to convert this using DOS-style short mode. If the path
41049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41050   # take no chances and rewrite it.
41051   # Note: m4 eats our [], so we need to use [ and ] instead.
41052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41053   if test "x$has_forbidden_chars" != x; then
41054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41055     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41056   fi
41057 
41058 
41059   windows_path="$new_path"
41060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41061     unix_path=`$CYGPATH -u "$windows_path"`
41062     new_path="$unix_path"
41063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41065     new_path="$unix_path"
41066   fi
41067 
41068   if test "x$path" != "x$new_path"; then
41069     JT_HOME="$new_path"
41070     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41071 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41072   fi
41073 
41074   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41075   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41076 
41077   else
41078     # We're on a unix platform. Hooray! :)
41079     path="$JT_HOME"
41080     has_space=`$ECHO "$path" | $GREP " "`
41081     if test "x$has_space" != x; then
41082       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41083 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41084       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41085     fi
41086 
41087     # Use eval to expand a potential ~
41088     eval path="$path"
41089     if test ! -f "$path" && test ! -d "$path"; then
41090       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41091     fi
41092 
41093     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41094   fi
41095 
41096 
41097       # jtreg win32 script works for everybody
41098       JTREGEXE="$JT_HOME/win32/bin/jtreg"
41099 
41100       if test ! -f "$JTREGEXE"; then
41101         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41102       fi
41103 
41104       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41105 $as_echo "$JTREGEXE" >&6; }
41106     else
41107       # try to find jtreg on path
41108 
41109 
41110 
41111   # Publish this variable in the help.
41112 
41113 
41114   if test "x$JTREGEXE" = x; then
41115     # The variable is not set by user, try to locate tool using the code snippet
41116     for ac_prog in jtreg
41117 do
41118   # Extract the first word of "$ac_prog", so it can be a program name with args.
41119 set dummy $ac_prog; ac_word=$2
41120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41121 $as_echo_n "checking for $ac_word... " >&6; }
41122 if ${ac_cv_path_JTREGEXE+:} false; then :
41123   $as_echo_n "(cached) " >&6
41124 else
41125   case $JTREGEXE in
41126   [\\/]* | ?:[\\/]*)
41127   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41128   ;;
41129   *)
41130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41131 for as_dir in $PATH
41132 do
41133   IFS=$as_save_IFS
41134   test -z "$as_dir" && as_dir=.
41135     for ac_exec_ext in '' $ac_executable_extensions; do
41136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41137     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41139     break 2
41140   fi
41141 done
41142   done
41143 IFS=$as_save_IFS
41144 
41145   ;;
41146 esac
41147 fi
41148 JTREGEXE=$ac_cv_path_JTREGEXE
41149 if test -n "$JTREGEXE"; then
41150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41151 $as_echo "$JTREGEXE" >&6; }
41152 else
41153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41154 $as_echo "no" >&6; }
41155 fi
41156 
41157 
41158   test -n "$JTREGEXE" && break
41159 done
41160 
41161   else
41162     # The variable is set, but is it from the command line or the environment?
41163 
41164     # Try to remove the string !JTREGEXE! from our list.
41165     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41166     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41167       # If it failed, the variable was not from the command line. Ignore it,
41168       # but warn the user (except for BASH, which is always set by the calling BASH).
41169       if test "xJTREGEXE" != xBASH; then
41170         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41171 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41172       fi
41173       # Try to locate tool using the code snippet
41174       for ac_prog in jtreg
41175 do
41176   # Extract the first word of "$ac_prog", so it can be a program name with args.
41177 set dummy $ac_prog; ac_word=$2
41178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41179 $as_echo_n "checking for $ac_word... " >&6; }
41180 if ${ac_cv_path_JTREGEXE+:} false; then :
41181   $as_echo_n "(cached) " >&6
41182 else
41183   case $JTREGEXE in
41184   [\\/]* | ?:[\\/]*)
41185   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41186   ;;
41187   *)
41188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41189 for as_dir in $PATH
41190 do
41191   IFS=$as_save_IFS
41192   test -z "$as_dir" && as_dir=.
41193     for ac_exec_ext in '' $ac_executable_extensions; do
41194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41195     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41197     break 2
41198   fi
41199 done
41200   done
41201 IFS=$as_save_IFS
41202 
41203   ;;
41204 esac
41205 fi
41206 JTREGEXE=$ac_cv_path_JTREGEXE
41207 if test -n "$JTREGEXE"; then
41208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41209 $as_echo "$JTREGEXE" >&6; }
41210 else
41211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41212 $as_echo "no" >&6; }
41213 fi
41214 
41215 
41216   test -n "$JTREGEXE" && break
41217 done
41218 
41219     else
41220       # If it succeeded, then it was overridden by the user. We will use it
41221       # for the tool.
41222 
41223       # First remove it from the list of overridden variables, so we can test
41224       # for unknown variables in the end.
41225       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41226 
41227       # Check if the provided tool contains a complete path.
41228       tool_specified="$JTREGEXE"
41229       tool_basename="${tool_specified##*/}"
41230       if test "x$tool_basename" = "x$tool_specified"; then
41231         # A command without a complete path is provided, search $PATH.
41232         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41233 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41234         # Extract the first word of "$tool_basename", so it can be a program name with args.
41235 set dummy $tool_basename; ac_word=$2
41236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41237 $as_echo_n "checking for $ac_word... " >&6; }
41238 if ${ac_cv_path_JTREGEXE+:} false; then :
41239   $as_echo_n "(cached) " >&6
41240 else
41241   case $JTREGEXE in
41242   [\\/]* | ?:[\\/]*)
41243   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41244   ;;
41245   *)
41246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41247 for as_dir in $PATH
41248 do
41249   IFS=$as_save_IFS
41250   test -z "$as_dir" && as_dir=.
41251     for ac_exec_ext in '' $ac_executable_extensions; do
41252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41253     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41255     break 2
41256   fi
41257 done
41258   done
41259 IFS=$as_save_IFS
41260 
41261   ;;
41262 esac
41263 fi
41264 JTREGEXE=$ac_cv_path_JTREGEXE
41265 if test -n "$JTREGEXE"; then
41266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41267 $as_echo "$JTREGEXE" >&6; }
41268 else
41269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41270 $as_echo "no" >&6; }
41271 fi
41272 
41273 
41274         if test "x$JTREGEXE" = x; then
41275           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41276         fi
41277       else
41278         # Otherwise we believe it is a complete path. Use it as it is.
41279         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41280 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41281         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41282 $as_echo_n "checking for JTREGEXE... " >&6; }
41283         if test ! -x "$tool_specified"; then
41284           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41285 $as_echo "not found" >&6; }
41286           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41287         fi
41288         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41289 $as_echo "$tool_specified" >&6; }
41290       fi
41291     fi
41292   fi
41293 
41294 
41295 
41296   if test "x$JTREGEXE" = x; then
41297     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41298   fi
41299 
41300 
41301       JT_HOME="`$DIRNAME $JTREGEXE`"
41302     fi
41303   fi
41304 
41305 
41306 
41307 
41308 
41309 
41310   # Option used to tell the compiler whether to create 32- or 64-bit executables
41311   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41312     COMPILER_TARGET_BITS_FLAG="-q"
41313   else
41314     COMPILER_TARGET_BITS_FLAG="-m"
41315   fi
41316 
41317 
41318   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41319   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41320     ARFLAGS="-r"
41321   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41322     ARFLAGS="-X64"
41323   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41324     # lib.exe is used as AR to create static libraries.
41325     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41326   else
41327     ARFLAGS=""
41328   fi
41329 
41330 
41331   ## Setup strip.
41332   # FIXME: should this really be per platform, or should it be per toolchain type?
41333   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41334   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41335   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41336     STRIPFLAGS="-g"
41337   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41338     STRIPFLAGS="-x"
41339   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41340     STRIPFLAGS="-S"
41341   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41342     STRIPFLAGS="-X32_64"
41343   fi
41344 
41345   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41346     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41347   fi
41348 
41349 
41350   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41351     # FIXME: break out into MCSFLAGS
41352     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41353   fi
41354 
41355 
41356   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41357     CC_OUT_OPTION=-Fo
41358     EXE_OUT_OPTION=-out:
41359     LD_OUT_OPTION=-out:
41360     AR_OUT_OPTION=-out:
41361   else
41362     # The option used to specify the target .o,.a or .so file.
41363     # When compiling, how to specify the to be created object file.
41364     CC_OUT_OPTION='-o$(SPACE)'
41365     # When linking, how to specify the to be created executable.
41366     EXE_OUT_OPTION='-o$(SPACE)'
41367     # When linking, how to specify the to be created dynamically linkable library.
41368     LD_OUT_OPTION='-o$(SPACE)'
41369     # When archiving, how to specify the to be create static archive for object files.
41370     AR_OUT_OPTION='rcs$(SPACE)'
41371   fi
41372 
41373 
41374 
41375 
41376 
41377   # On Windows, we need to set RC flags.
41378   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41379     RC_FLAGS="-nologo -l0x409"
41380     if test "x$VARIANT" = xOPT; then
41381       RC_FLAGS="$RC_FLAGS -DNDEBUG"
41382     fi
41383 
41384     # The version variables used to create RC_FLAGS may be overridden
41385     # in a custom configure script, or possibly the command line.
41386     # Let those variables be expanded at make time in spec.gmk.
41387     # The \$ are escaped to the shell, and the $(...) variables
41388     # are evaluated by make.
41389     RC_FLAGS="$RC_FLAGS \
41390         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41391         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41392         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41393         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41394         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41395         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41396         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41397   fi
41398 
41399 
41400   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41401     # silence copyright notice and other headers.
41402     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41403   fi
41404 
41405   if test "x$SYSROOT" != "x"; then
41406     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41407       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41408         # Solaris Studio does not have a concept of sysroot. Instead we must
41409         # make sure the default include and lib dirs are appended to each
41410         # compile and link command line.
41411         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41412         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41413             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41414             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41415       fi
41416     elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41417       # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41418       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41419       SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41420     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41421       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41422       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41423     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41424       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41425       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41426     fi
41427     # Propagate the sysroot args to hotspot
41428     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41429     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41430     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41431   fi
41432 
41433   # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41434   # set this here so it doesn't have to be peppered throughout the forest
41435   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41436     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41437     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41438   fi
41439 
41440 
41441 
41442 
41443 
41444 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41445 
41446 # Now we can test some aspects on the target using configure macros.
41447 
41448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41449 $as_echo_n "checking for ANSI C header files... " >&6; }
41450 if ${ac_cv_header_stdc+:} false; then :
41451   $as_echo_n "(cached) " >&6
41452 else
41453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41454 /* end confdefs.h.  */
41455 #include <stdlib.h>
41456 #include <stdarg.h>
41457 #include <string.h>
41458 #include <float.h>
41459 
41460 int
41461 main ()
41462 {
41463 
41464   ;
41465   return 0;
41466 }
41467 _ACEOF
41468 if ac_fn_cxx_try_compile "$LINENO"; then :
41469   ac_cv_header_stdc=yes
41470 else
41471   ac_cv_header_stdc=no
41472 fi
41473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41474 
41475 if test $ac_cv_header_stdc = yes; then
41476   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41478 /* end confdefs.h.  */
41479 #include <string.h>
41480 
41481 _ACEOF
41482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41483   $EGREP "memchr" >/dev/null 2>&1; then :
41484 
41485 else
41486   ac_cv_header_stdc=no
41487 fi
41488 rm -f conftest*
41489 
41490 fi
41491 
41492 if test $ac_cv_header_stdc = yes; then
41493   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41495 /* end confdefs.h.  */
41496 #include <stdlib.h>
41497 
41498 _ACEOF
41499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41500   $EGREP "free" >/dev/null 2>&1; then :
41501 
41502 else
41503   ac_cv_header_stdc=no
41504 fi
41505 rm -f conftest*
41506 
41507 fi
41508 
41509 if test $ac_cv_header_stdc = yes; then
41510   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41511   if test "$cross_compiling" = yes; then :
41512   :
41513 else
41514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41515 /* end confdefs.h.  */
41516 #include <ctype.h>
41517 #include <stdlib.h>
41518 #if ((' ' & 0x0FF) == 0x020)
41519 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41520 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41521 #else
41522 # define ISLOWER(c) \
41523                    (('a' <= (c) && (c) <= 'i') \
41524                      || ('j' <= (c) && (c) <= 'r') \
41525                      || ('s' <= (c) && (c) <= 'z'))
41526 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41527 #endif
41528 
41529 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41530 int
41531 main ()
41532 {
41533   int i;
41534   for (i = 0; i < 256; i++)
41535     if (XOR (islower (i), ISLOWER (i))
41536         || toupper (i) != TOUPPER (i))
41537       return 2;
41538   return 0;
41539 }
41540 _ACEOF
41541 if ac_fn_cxx_try_run "$LINENO"; then :
41542 
41543 else
41544   ac_cv_header_stdc=no
41545 fi
41546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41547   conftest.$ac_objext conftest.beam conftest.$ac_ext
41548 fi
41549 
41550 fi
41551 fi
41552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41553 $as_echo "$ac_cv_header_stdc" >&6; }
41554 if test $ac_cv_header_stdc = yes; then
41555 
41556 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41557 
41558 fi
41559 
41560 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41561 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41562                   inttypes.h stdint.h unistd.h
41563 do :
41564   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41565 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41566 "
41567 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41568   cat >>confdefs.h <<_ACEOF
41569 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41570 _ACEOF
41571 
41572 fi
41573 
41574 done
41575 
41576 
41577 
41578   ###############################################################################
41579   #
41580   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41581   # (The JVM can use 32 or 64 bit Java pointers but that decision
41582   # is made at runtime.)
41583   #
41584 
41585   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41586     # Always specify -m flag on Solaris
41587     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41588 
41589   # When we add flags to the "official" CFLAGS etc, we need to
41590   # keep track of these additions in ADDED_CFLAGS etc. These
41591   # will later be checked to make sure only controlled additions
41592   # have been made to CFLAGS etc.
41593   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41594   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41595   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41596 
41597   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41598   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41599   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41600 
41601   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41602   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41603   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41604 
41605   elif test "x$COMPILE_TYPE" = xreduced; then
41606     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41607       # Specify -m if running reduced on unix platforms
41608 
41609   # When we add flags to the "official" CFLAGS etc, we need to
41610   # keep track of these additions in ADDED_CFLAGS etc. These
41611   # will later be checked to make sure only controlled additions
41612   # have been made to CFLAGS etc.
41613   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41614   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41615   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41616 
41617   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41618   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41619   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41620 
41621   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41622   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41623   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41624 
41625     fi
41626   fi
41627 
41628   # Make compilation sanity check
41629   for ac_header in stdio.h
41630 do :
41631   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41632 if test "x$ac_cv_header_stdio_h" = xyes; then :
41633   cat >>confdefs.h <<_ACEOF
41634 #define HAVE_STDIO_H 1
41635 _ACEOF
41636 
41637 else
41638 
41639     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41640 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41641     if test "x$COMPILE_TYPE" = xreduced; then
41642       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41643 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41644     elif test "x$COMPILE_TYPE" = xcross; then
41645       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41646 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41647     fi
41648     as_fn_error $? "Cannot continue." "$LINENO" 5
41649 
41650 fi
41651 
41652 done
41653 
41654 
41655   # The cast to long int works around a bug in the HP C Compiler
41656 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41657 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41658 # This bug is HP SR number 8606223364.
41659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41660 $as_echo_n "checking size of int *... " >&6; }
41661 if ${ac_cv_sizeof_int_p+:} false; then :
41662   $as_echo_n "(cached) " >&6
41663 else
41664   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41665 
41666 else
41667   if test "$ac_cv_type_int_p" = yes; then
41668      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41669 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41670 as_fn_error 77 "cannot compute sizeof (int *)
41671 See \`config.log' for more details" "$LINENO" 5; }
41672    else
41673      ac_cv_sizeof_int_p=0
41674    fi
41675 fi
41676 
41677 fi
41678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41679 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41680 
41681 
41682 
41683 cat >>confdefs.h <<_ACEOF
41684 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41685 _ACEOF
41686 
41687 
41688 
41689   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41690   if test "x$ac_cv_sizeof_int_p" = x; then
41691     # The test failed, lets stick to the assumed value.
41692     { $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
41693 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41694   else
41695     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41696 
41697     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41698       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41699       # Let's try to implicitely set the compilers target architecture and retry the test
41700       { $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
41701 $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;}
41702       { $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
41703 $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;}
41704 
41705   # When we add flags to the "official" CFLAGS etc, we need to
41706   # keep track of these additions in ADDED_CFLAGS etc. These
41707   # will later be checked to make sure only controlled additions
41708   # have been made to CFLAGS etc.
41709   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41710   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41711   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41712 
41713   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41714   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41715   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41716 
41717   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41718   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41719   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41720 
41721 
41722       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41723       unset ac_cv_sizeof_int_p
41724       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41725       cat >>confdefs.h <<_ACEOF
41726 #undef SIZEOF_INT_P
41727 _ACEOF
41728 
41729       # The cast to long int works around a bug in the HP C Compiler
41730 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41731 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41732 # This bug is HP SR number 8606223364.
41733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41734 $as_echo_n "checking size of int *... " >&6; }
41735 if ${ac_cv_sizeof_int_p+:} false; then :
41736   $as_echo_n "(cached) " >&6
41737 else
41738   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41739 
41740 else
41741   if test "$ac_cv_type_int_p" = yes; then
41742      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41743 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41744 as_fn_error 77 "cannot compute sizeof (int *)
41745 See \`config.log' for more details" "$LINENO" 5; }
41746    else
41747      ac_cv_sizeof_int_p=0
41748    fi
41749 fi
41750 
41751 fi
41752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41753 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41754 
41755 
41756 
41757 cat >>confdefs.h <<_ACEOF
41758 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41759 _ACEOF
41760 
41761 
41762 
41763       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41764 
41765       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41766         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
41767       fi
41768     fi
41769   fi
41770 
41771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41772 $as_echo_n "checking for target address size... " >&6; }
41773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41774 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41775 
41776 
41777   ###############################################################################
41778   #
41779   # Is the target little of big endian?
41780   #
41781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41782 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41783 if ${ac_cv_c_bigendian+:} false; then :
41784   $as_echo_n "(cached) " >&6
41785 else
41786   ac_cv_c_bigendian=unknown
41787     # See if we're dealing with a universal compiler.
41788     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41789 /* end confdefs.h.  */
41790 #ifndef __APPLE_CC__
41791                not a universal capable compiler
41792              #endif
41793              typedef int dummy;
41794 
41795 _ACEOF
41796 if ac_fn_cxx_try_compile "$LINENO"; then :
41797 
41798         # Check for potential -arch flags.  It is not universal unless
41799         # there are at least two -arch flags with different values.
41800         ac_arch=
41801         ac_prev=
41802         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41803          if test -n "$ac_prev"; then
41804            case $ac_word in
41805              i?86 | x86_64 | ppc | ppc64)
41806                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41807                  ac_arch=$ac_word
41808                else
41809                  ac_cv_c_bigendian=universal
41810                  break
41811                fi
41812                ;;
41813            esac
41814            ac_prev=
41815          elif test "x$ac_word" = "x-arch"; then
41816            ac_prev=arch
41817          fi
41818        done
41819 fi
41820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41821     if test $ac_cv_c_bigendian = unknown; then
41822       # See if sys/param.h defines the BYTE_ORDER macro.
41823       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41824 /* end confdefs.h.  */
41825 #include <sys/types.h>
41826              #include <sys/param.h>
41827 
41828 int
41829 main ()
41830 {
41831 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41832                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41833                      && LITTLE_ENDIAN)
41834               bogus endian macros
41835              #endif
41836 
41837   ;
41838   return 0;
41839 }
41840 _ACEOF
41841 if ac_fn_cxx_try_compile "$LINENO"; then :
41842   # It does; now see whether it defined to BIG_ENDIAN or not.
41843          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41844 /* end confdefs.h.  */
41845 #include <sys/types.h>
41846                 #include <sys/param.h>
41847 
41848 int
41849 main ()
41850 {
41851 #if BYTE_ORDER != BIG_ENDIAN
41852                  not big endian
41853                 #endif
41854 
41855   ;
41856   return 0;
41857 }
41858 _ACEOF
41859 if ac_fn_cxx_try_compile "$LINENO"; then :
41860   ac_cv_c_bigendian=yes
41861 else
41862   ac_cv_c_bigendian=no
41863 fi
41864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41865 fi
41866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41867     fi
41868     if test $ac_cv_c_bigendian = unknown; then
41869       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41870       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41871 /* end confdefs.h.  */
41872 #include <limits.h>
41873 
41874 int
41875 main ()
41876 {
41877 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41878               bogus endian macros
41879              #endif
41880 
41881   ;
41882   return 0;
41883 }
41884 _ACEOF
41885 if ac_fn_cxx_try_compile "$LINENO"; then :
41886   # It does; now see whether it defined to _BIG_ENDIAN or not.
41887          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41888 /* end confdefs.h.  */
41889 #include <limits.h>
41890 
41891 int
41892 main ()
41893 {
41894 #ifndef _BIG_ENDIAN
41895                  not big endian
41896                 #endif
41897 
41898   ;
41899   return 0;
41900 }
41901 _ACEOF
41902 if ac_fn_cxx_try_compile "$LINENO"; then :
41903   ac_cv_c_bigendian=yes
41904 else
41905   ac_cv_c_bigendian=no
41906 fi
41907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41908 fi
41909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41910     fi
41911     if test $ac_cv_c_bigendian = unknown; then
41912       # Compile a test program.
41913       if test "$cross_compiling" = yes; then :
41914   # Try to guess by grepping values from an object file.
41915          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41916 /* end confdefs.h.  */
41917 short int ascii_mm[] =
41918                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41919                 short int ascii_ii[] =
41920                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41921                 int use_ascii (int i) {
41922                   return ascii_mm[i] + ascii_ii[i];
41923                 }
41924                 short int ebcdic_ii[] =
41925                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41926                 short int ebcdic_mm[] =
41927                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41928                 int use_ebcdic (int i) {
41929                   return ebcdic_mm[i] + ebcdic_ii[i];
41930                 }
41931                 extern int foo;
41932 
41933 int
41934 main ()
41935 {
41936 return use_ascii (foo) == use_ebcdic (foo);
41937   ;
41938   return 0;
41939 }
41940 _ACEOF
41941 if ac_fn_cxx_try_compile "$LINENO"; then :
41942   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41943               ac_cv_c_bigendian=yes
41944             fi
41945             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41946               if test "$ac_cv_c_bigendian" = unknown; then
41947                 ac_cv_c_bigendian=no
41948               else
41949                 # finding both strings is unlikely to happen, but who knows?
41950                 ac_cv_c_bigendian=unknown
41951               fi
41952             fi
41953 fi
41954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41955 else
41956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41957 /* end confdefs.h.  */
41958 $ac_includes_default
41959 int
41960 main ()
41961 {
41962 
41963              /* Are we little or big endian?  From Harbison&Steele.  */
41964              union
41965              {
41966                long int l;
41967                char c[sizeof (long int)];
41968              } u;
41969              u.l = 1;
41970              return u.c[sizeof (long int) - 1] == 1;
41971 
41972   ;
41973   return 0;
41974 }
41975 _ACEOF
41976 if ac_fn_cxx_try_run "$LINENO"; then :
41977   ac_cv_c_bigendian=no
41978 else
41979   ac_cv_c_bigendian=yes
41980 fi
41981 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41982   conftest.$ac_objext conftest.beam conftest.$ac_ext
41983 fi
41984 
41985     fi
41986 fi
41987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41988 $as_echo "$ac_cv_c_bigendian" >&6; }
41989  case $ac_cv_c_bigendian in #(
41990    yes)
41991      ENDIAN="big";; #(
41992    no)
41993      ENDIAN="little" ;; #(
41994    universal)
41995      ENDIAN="universal_endianness"
41996      ;; #(
41997    *)
41998      ENDIAN="unknown" ;;
41999  esac
42000 
42001 
42002   if test "x$ENDIAN" = xuniversal_endianness; then
42003     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42004   fi
42005   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42006     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
42007   fi
42008 
42009 
42010 # Configure flags for the tools
42011 
42012   ###############################################################################
42013   #
42014   # How to compile shared libraries.
42015   #
42016 
42017   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42018     PICFLAG="-fPIC"
42019     C_FLAG_REORDER=''
42020     CXX_FLAG_REORDER=''
42021 
42022     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42023       # Linking is different on MacOSX
42024       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42025       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42026       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42027       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42028       SET_SHARED_LIBRARY_MAPFILE=''
42029     else
42030       # Default works for linux, might work on other platforms as well.
42031       SHARED_LIBRARY_FLAGS='-shared'
42032       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42033       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42034       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42035       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42036     fi
42037   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42038     PICFLAG=''
42039     C_FLAG_REORDER=''
42040     CXX_FLAG_REORDER=''
42041 
42042     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42043       # Linking is different on MacOSX
42044       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42045       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42046       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42047       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42048       SET_SHARED_LIBRARY_MAPFILE=''
42049     else
42050       # Default works for linux, might work on other platforms as well.
42051       SHARED_LIBRARY_FLAGS='-shared'
42052       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42053       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42054       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42055       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42056     fi
42057   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42058     PICFLAG="-KPIC"
42059     C_FLAG_REORDER='-xF'
42060     CXX_FLAG_REORDER='-xF'
42061     SHARED_LIBRARY_FLAGS="-G"
42062     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42063     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42064     SET_SHARED_LIBRARY_NAME=''
42065     SET_SHARED_LIBRARY_MAPFILE='-M$1'
42066   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42067     PICFLAG="-qpic=large"
42068     C_FLAG_REORDER=''
42069     CXX_FLAG_REORDER=''
42070     SHARED_LIBRARY_FLAGS="-qmkshrobj"
42071     SET_EXECUTABLE_ORIGIN=""
42072     SET_SHARED_LIBRARY_ORIGIN=''
42073     SET_SHARED_LIBRARY_NAME=''
42074     SET_SHARED_LIBRARY_MAPFILE=''
42075   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42076     PICFLAG=""
42077     C_FLAG_REORDER=''
42078     CXX_FLAG_REORDER=''
42079     SHARED_LIBRARY_FLAGS="-LD"
42080     SET_EXECUTABLE_ORIGIN=''
42081     SET_SHARED_LIBRARY_ORIGIN=''
42082     SET_SHARED_LIBRARY_NAME=''
42083     SET_SHARED_LIBRARY_MAPFILE=''
42084   fi
42085 
42086 
42087 
42088 
42089 
42090 
42091 
42092 
42093 
42094   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42095     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42096     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42097     CFLAGS_JDKLIB_EXTRA='-xstrconst'
42098   fi
42099   # The (cross) compiler is now configured, we can now test capabilities
42100   # of the target platform.
42101 
42102 
42103 
42104   ###############################################################################
42105   #
42106   # Setup the opt flags for different compilers
42107   # and different operating systems.
42108   #
42109 
42110   # FIXME: this was indirectly the old default, but just inherited.
42111   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42112   #   C_FLAG_DEPS="-MMD -MF"
42113   # fi
42114 
42115   # Generate make dependency files
42116   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42117     C_FLAG_DEPS="-MMD -MF"
42118   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42119     C_FLAG_DEPS="-MMD -MF"
42120   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42121     C_FLAG_DEPS="-xMMD -xMF"
42122   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42123     C_FLAG_DEPS="-qmakedep=gcc -MF"
42124   fi
42125   CXX_FLAG_DEPS="$C_FLAG_DEPS"
42126 
42127 
42128 
42129   # Debug symbols
42130   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42131     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42132       # reduce from default "-g2" option to save space
42133       CFLAGS_DEBUG_SYMBOLS="-g1"
42134       CXXFLAGS_DEBUG_SYMBOLS="-g1"
42135     else
42136       CFLAGS_DEBUG_SYMBOLS="-g"
42137       CXXFLAGS_DEBUG_SYMBOLS="-g"
42138     fi
42139   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42140     CFLAGS_DEBUG_SYMBOLS="-g"
42141     CXXFLAGS_DEBUG_SYMBOLS="-g"
42142   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42143     CFLAGS_DEBUG_SYMBOLS="-g -xs"
42144     # FIXME: likely a bug, this disables debug symbols rather than enables them
42145     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42146   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42147     CFLAGS_DEBUG_SYMBOLS="-g"
42148     CXXFLAGS_DEBUG_SYMBOLS="-g"
42149   fi
42150 
42151 
42152 
42153   # bounds, memory and behavior checking options
42154   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42155     case $DEBUG_LEVEL in
42156     release )
42157       # no adjustment
42158       ;;
42159     fastdebug )
42160       # no adjustment
42161       ;;
42162     slowdebug )
42163       # Add runtime stack smashing and undefined behavior checks
42164       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42165       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42166       ;;
42167     esac
42168   fi
42169 
42170 
42171 
42172   # Optimization levels
42173   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42174     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42175 
42176     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42177       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42178       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42179       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42180       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42181       C_O_FLAG_DEBUG="-xregs=no%frameptr"
42182       C_O_FLAG_NONE="-xregs=no%frameptr"
42183       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42184       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42185       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42186       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42187       CXX_O_FLAG_NONE="-xregs=no%frameptr"
42188       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42189         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42190         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42191       fi
42192     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42193       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42194       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42195       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42196       C_O_FLAG_DEBUG=""
42197       C_O_FLAG_NONE=""
42198       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42199       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42200       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42201       C_O_FLAG_DEBUG=""
42202       CXX_O_FLAG_NONE=""
42203     fi
42204   else
42205     # The remaining toolchains share opt flags between CC and CXX;
42206     # setup for C and duplicate afterwards.
42207     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42208       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42209         # On MacOSX we optimize for size, something
42210         # we should do for all platforms?
42211         C_O_FLAG_HIGHEST="-Os"
42212         C_O_FLAG_HI="-Os"
42213         C_O_FLAG_NORM="-Os"
42214       else
42215         C_O_FLAG_HIGHEST="-O3"
42216         C_O_FLAG_HI="-O3"
42217         C_O_FLAG_NORM="-O2"
42218       fi
42219       C_O_FLAG_DEBUG="-O0"
42220       C_O_FLAG_NONE="-O0"
42221     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42222       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42223         # On MacOSX we optimize for size, something
42224         # we should do for all platforms?
42225         C_O_FLAG_HIGHEST="-Os"
42226         C_O_FLAG_HI="-Os"
42227         C_O_FLAG_NORM="-Os"
42228       else
42229         C_O_FLAG_HIGHEST="-O3"
42230         C_O_FLAG_HI="-O3"
42231         C_O_FLAG_NORM="-O2"
42232       fi
42233       C_O_FLAG_DEBUG="-O0"
42234       C_O_FLAG_NONE="-O0"
42235     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42236       C_O_FLAG_HIGHEST="-O3"
42237       C_O_FLAG_HI="-O3 -qstrict"
42238       C_O_FLAG_NORM="-O2"
42239       C_O_FLAG_DEBUG="-qnoopt"
42240       C_O_FLAG_NONE="-qnoop"
42241     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42242       C_O_FLAG_HIGHEST="-O2"
42243       C_O_FLAG_HI="-O1"
42244       C_O_FLAG_NORM="-O1"
42245       C_O_FLAG_DEBUG="-Od"
42246       C_O_FLAG_NONE="-Od"
42247     fi
42248     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42249     CXX_O_FLAG_HI="$C_O_FLAG_HI"
42250     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42251     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42252     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42253   fi
42254 
42255   # Adjust optimization flags according to debug level.
42256   case $DEBUG_LEVEL in
42257     release )
42258       # no adjustment
42259       ;;
42260     fastdebug )
42261       # Not quite so much optimization
42262       C_O_FLAG_HI="$C_O_FLAG_NORM"
42263       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42264       ;;
42265     slowdebug )
42266       # Disable optimization
42267       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42268       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42269       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42270       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42271       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42272       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42273       ;;
42274   esac
42275 
42276 
42277 
42278 
42279 
42280 
42281 
42282 
42283 
42284 
42285 
42286 
42287 
42288   # Special extras...
42289   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42290     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42291       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42292       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42293     fi
42294   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42295     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42296     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42297     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42298   fi
42299 
42300   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42301     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42302 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42303   fi
42304 
42305   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42306     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42307 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42308   fi
42309 
42310   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42311     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42312 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42313   fi
42314 
42315 
42316 # Check whether --with-extra-cflags was given.
42317 if test "${with_extra_cflags+set}" = set; then :
42318   withval=$with_extra_cflags;
42319 fi
42320 
42321 
42322 
42323 # Check whether --with-extra-cxxflags was given.
42324 if test "${with_extra_cxxflags+set}" = set; then :
42325   withval=$with_extra_cxxflags;
42326 fi
42327 
42328 
42329 
42330 # Check whether --with-extra-ldflags was given.
42331 if test "${with_extra_ldflags+set}" = set; then :
42332   withval=$with_extra_ldflags;
42333 fi
42334 
42335 
42336   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42337   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42338   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42339 
42340   # Hotspot needs these set in their legacy form
42341   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42342   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42343   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42344 
42345 
42346 
42347 
42348 
42349   ###############################################################################
42350   #
42351   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42352   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42353   #
42354 
42355   # Setup compiler/platform specific flags into
42356   #    CFLAGS_JDK    - C Compiler flags
42357   #    CXXFLAGS_JDK  - C++ Compiler flags
42358   #    COMMON_CCXXFLAGS_JDK - common to C and C++
42359   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42360     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42361         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42362     case $OPENJDK_TARGET_CPU_ARCH in
42363       arm )
42364         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42365         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42366         ;;
42367       ppc )
42368         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42369         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42370         ;;
42371       * )
42372         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42373         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42374         ;;
42375     esac
42376   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42377     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42378     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42379       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42380       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42381     fi
42382 
42383     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42384     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42385   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42386     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42387     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42388   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42389     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42390     -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42391     -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42392     -DWIN32 -DIAL"
42393     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42394       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42395     else
42396       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42397     fi
42398   fi
42399 
42400   ###############################################################################
42401 
42402   # Adjust flags according to debug level.
42403   case $DEBUG_LEVEL in
42404     fastdebug | slowdebug )
42405       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42406       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42407       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42408       ;;
42409     release )
42410       ;;
42411     * )
42412       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42413       ;;
42414   esac
42415 
42416   # Setup LP64
42417   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42418 
42419   # Set some common defines. These works for all compilers, but assume
42420   # -D is universally accepted.
42421 
42422   # Setup endianness
42423   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42424     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42425     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42426     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42427     #   Note: -Dmacro         is the same as    #define macro 1
42428     #         -Dmacro=        is the same as    #define macro
42429     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42430       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42431     else
42432       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42433     fi
42434   else
42435     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42436     # are defined in the system?
42437     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42438       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42439     else
42440       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42441     fi
42442   fi
42443 
42444   # Setup target OS define. Use OS target name but in upper case.
42445   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42446   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42447 
42448   # Setup target CPU
42449   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42450 
42451   # Setup debug/release defines
42452   if test "x$DEBUG_LEVEL" = xrelease; then
42453     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42454     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42455       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42456     fi
42457   else
42458     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42459   fi
42460 
42461   # Setup release name
42462   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42463 
42464 
42465   # Set some additional per-OS defines.
42466   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42467     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42468   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42469     # FIXME: PPC64 should not be here.
42470     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42471   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42472     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42473   fi
42474 
42475   # Additional macosx handling
42476   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42477     # Setting these parameters makes it an error to link to macosx APIs that are
42478     # newer than the given OS version and makes the linked binaries compatible
42479     # even if built on a newer version of the OS.
42480     # The expected format is X.Y.Z
42481     MACOSX_VERSION_MIN=10.7.0
42482 
42483 
42484     # The macro takes the version with no dots, ex: 1070
42485     # Let the flags variables get resolved in make for easier override on make
42486     # command line.
42487     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42488     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42489   fi
42490 
42491   # Setup some hard coded includes
42492   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42493       -I${JDK_TOPDIR}/src/java.base/share/native/include \
42494       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42495       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42496 
42497   # The shared libraries are compiled using the picflag.
42498   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42499   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42500 
42501   # Executable flags
42502   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42503   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42504 
42505 
42506 
42507 
42508 
42509 
42510   # Setup LDFLAGS et al.
42511   #
42512 
42513   # Now this is odd. The JDK native libraries have to link against libjvm.so
42514   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42515   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42516   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42517   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42518   # libraries will link to whatever is in memory. Yuck.
42519   #
42520   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42521   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42522     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42523     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42524       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42525     fi
42526     # TODO: make -debug optional "--disable-full-debug-symbols"
42527     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42528   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42529     # If this is a --hash-style=gnu system, use --hash-style=both, why?
42530     # We have previously set HAS_GNU_HASH if this is the case
42531     if test -n "$HAS_GNU_HASH"; then
42532       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42533     fi
42534     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42535       # And since we now know that the linker is gnu, then add -z defs, to forbid
42536       # undefined symbols in object files.
42537       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42538       case $DEBUG_LEVEL in
42539         release )
42540           # tell linker to optimize libraries.
42541           # Should this be supplied to the OSS linker as well?
42542           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42543           ;;
42544         slowdebug )
42545           if test "x$HAS_LINKER_NOW" = "xtrue"; then
42546             # do relocations at load
42547             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42548             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42549           fi
42550           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42551             # mark relocations read only
42552             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42553             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42554           fi
42555           ;;
42556         fastdebug )
42557           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42558             # mark relocations read only
42559             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42560             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42561           fi
42562           ;;
42563         * )
42564           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42565           ;;
42566         esac
42567     fi
42568   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42569     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42570     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42571   fi
42572 
42573   # Customize LDFLAGS for executables
42574 
42575   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42576 
42577   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42578     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42579       LDFLAGS_STACK_SIZE=1048576
42580     else
42581       LDFLAGS_STACK_SIZE=327680
42582     fi
42583     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42584   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42585     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42586   fi
42587 
42588   # Customize LDFLAGS for libs
42589   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42590 
42591   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42592     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42593     LDFLAGS_JDKLIB_SUFFIX=""
42594   else
42595     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42596         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42597 
42598     # On some platforms (mac) the linker warns about non existing -L dirs.
42599     # Add server first if available. Linking aginst client does not always produce the same results.
42600     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42601     # Default to server for other variants.
42602     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42603       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42604     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42605       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42606     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42607       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42608     else
42609       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42610     fi
42611 
42612     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42613     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42614       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42615     fi
42616   fi
42617 
42618 
42619 
42620 
42621 
42622 
42623 
42624 
42625   # Some Zero and Shark settings.
42626   # ZERO_ARCHFLAG tells the compiler which mode to build for
42627   case "${OPENJDK_TARGET_CPU}" in
42628     s390)
42629       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42630       ;;
42631     *)
42632       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42633   esac
42634 
42635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42636 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42637   supports=yes
42638 
42639   saved_cflags="$CFLAGS"
42640   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42641   ac_ext=c
42642 ac_cpp='$CPP $CPPFLAGS'
42643 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42644 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42645 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42646 
42647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42648 /* end confdefs.h.  */
42649 int i;
42650 _ACEOF
42651 if ac_fn_c_try_compile "$LINENO"; then :
42652 
42653 else
42654   supports=no
42655 fi
42656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42657   ac_ext=cpp
42658 ac_cpp='$CXXCPP $CPPFLAGS'
42659 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42660 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42661 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42662 
42663   CFLAGS="$saved_cflags"
42664 
42665   saved_cxxflags="$CXXFLAGS"
42666   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42667   ac_ext=cpp
42668 ac_cpp='$CXXCPP $CPPFLAGS'
42669 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42670 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42671 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42672 
42673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42674 /* end confdefs.h.  */
42675 int i;
42676 _ACEOF
42677 if ac_fn_cxx_try_compile "$LINENO"; then :
42678 
42679 else
42680   supports=no
42681 fi
42682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42683   ac_ext=cpp
42684 ac_cpp='$CXXCPP $CPPFLAGS'
42685 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42686 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42687 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42688 
42689   CXXFLAGS="$saved_cxxflags"
42690 
42691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42692 $as_echo "$supports" >&6; }
42693   if test "x$supports" = "xyes" ; then
42694     :
42695   else
42696     ZERO_ARCHFLAG=""
42697   fi
42698 
42699 
42700 
42701   # Check that the compiler supports -mX (or -qX on AIX) flags
42702   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42703 
42704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42705 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42706   supports=yes
42707 
42708   saved_cflags="$CFLAGS"
42709   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42710   ac_ext=c
42711 ac_cpp='$CPP $CPPFLAGS'
42712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42715 
42716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42717 /* end confdefs.h.  */
42718 int i;
42719 _ACEOF
42720 if ac_fn_c_try_compile "$LINENO"; then :
42721 
42722 else
42723   supports=no
42724 fi
42725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42726   ac_ext=cpp
42727 ac_cpp='$CXXCPP $CPPFLAGS'
42728 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42729 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42730 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42731 
42732   CFLAGS="$saved_cflags"
42733 
42734   saved_cxxflags="$CXXFLAGS"
42735   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42736   ac_ext=cpp
42737 ac_cpp='$CXXCPP $CPPFLAGS'
42738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42741 
42742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42743 /* end confdefs.h.  */
42744 int i;
42745 _ACEOF
42746 if ac_fn_cxx_try_compile "$LINENO"; then :
42747 
42748 else
42749   supports=no
42750 fi
42751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42752   ac_ext=cpp
42753 ac_cpp='$CXXCPP $CPPFLAGS'
42754 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42755 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42756 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42757 
42758   CXXFLAGS="$saved_cxxflags"
42759 
42760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42761 $as_echo "$supports" >&6; }
42762   if test "x$supports" = "xyes" ; then
42763     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42764   else
42765     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42766   fi
42767 
42768 
42769 
42770   case "${TOOLCHAIN_TYPE}" in
42771     microsoft)
42772       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42773       ;;
42774     solstudio)
42775       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42776       ;;
42777     gcc)
42778       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42779       ;;
42780     clang)
42781       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42782       ;;
42783   esac
42784 
42785 
42786 
42787 # Setup debug symbols (need objcopy from the toolchain for that)
42788 
42789   #
42790   # ENABLE_DEBUG_SYMBOLS
42791   # This must be done after the toolchain is setup, since we're looking at objcopy.
42792   #
42793   # Check whether --enable-debug-symbols was given.
42794 if test "${enable_debug_symbols+set}" = set; then :
42795   enableval=$enable_debug_symbols;
42796 fi
42797 
42798 
42799   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42800 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42801 
42802   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42803     # explicit enabling of enable-debug-symbols and can't find objcopy
42804     #   this is an error
42805     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42806   fi
42807 
42808   if test "x$enable_debug_symbols" = "xyes"; then
42809     ENABLE_DEBUG_SYMBOLS=true
42810   elif test "x$enable_debug_symbols" = "xno"; then
42811     ENABLE_DEBUG_SYMBOLS=false
42812   else
42813     # Default is on if objcopy is found
42814     if test "x$OBJCOPY" != x; then
42815       ENABLE_DEBUG_SYMBOLS=true
42816     # MacOS X and Windows don't use objcopy but default is on for those OSes
42817     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42818       ENABLE_DEBUG_SYMBOLS=true
42819     else
42820       ENABLE_DEBUG_SYMBOLS=false
42821     fi
42822   fi
42823 
42824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42825 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42826 
42827   #
42828   # ZIP_DEBUGINFO_FILES
42829   #
42830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42831 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42832   # Check whether --enable-zip-debug-info was given.
42833 if test "${enable_zip_debug_info+set}" = set; then :
42834   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42835 else
42836   enable_zip_debug_info="yes"
42837 fi
42838 
42839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42840 $as_echo "${enable_zip_debug_info}" >&6; }
42841 
42842   if test "x${enable_zip_debug_info}" = "xno"; then
42843     ZIP_DEBUGINFO_FILES=false
42844   else
42845     ZIP_DEBUGINFO_FILES=true
42846   fi
42847 
42848 
42849 
42850 
42851 
42852 ###############################################################################
42853 #
42854 # Check dependencies for external and internal libraries.
42855 #
42856 ###############################################################################
42857 
42858 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42859 
42860   # When using cygwin or msys, we need a wrapper binary that renames
42861   # /cygdrive/c/ arguments into c:/ arguments and peeks into
42862   # @files and rewrites these too! This wrapper binary is
42863   # called fixpath.
42864   FIXPATH=
42865   if test "x$OPENJDK_BUILD_OS" = xwindows; then
42866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42867 $as_echo_n "checking if fixpath can be created... " >&6; }
42868     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42869     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42870     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42871       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42872       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42873       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42874       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42875     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42876       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42877       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42878 
42879       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42880       # @ was chosen as separator to minimize risk of other tools messing around with it
42881       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42882       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42883 
42884       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42885     fi
42886     rm -f $OUTPUT_ROOT/fixpath*
42887     cd $OUTPUT_ROOT
42888     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42889     cd $CURDIR
42890 
42891     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42892       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42893 $as_echo "no" >&6; }
42894       cat $OUTPUT_ROOT/fixpath1.log
42895       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42896     fi
42897     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42898 $as_echo "yes" >&6; }
42899     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42900 $as_echo_n "checking if fixpath.exe works... " >&6; }
42901     cd $OUTPUT_ROOT
42902     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42903     cd $CURDIR
42904     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42905       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42906 $as_echo "no" >&6; }
42907       cat $OUTPUT_ROOT/fixpath2.log
42908       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42909     fi
42910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42911 $as_echo "yes" >&6; }
42912     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42913   fi
42914 
42915 
42916 
42917 
42918 
42919 
42920   ###############################################################################
42921   #
42922   # OS specific settings that we never will need to probe.
42923   #
42924   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42925     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42926 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42927     PULSE_NOT_NEEDED=yes
42928     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42929 $as_echo "pulse" >&6; }
42930   fi
42931 
42932   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42934 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42935     ALSA_NOT_NEEDED=yes
42936     PULSE_NOT_NEEDED=yes
42937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42938 $as_echo "alsa pulse" >&6; }
42939   fi
42940 
42941   if test "x$OPENJDK_TARGET_OS" = xaix; then
42942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42943 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42944     ALSA_NOT_NEEDED=yes
42945     PULSE_NOT_NEEDED=yes
42946     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42947 $as_echo "alsa pulse" >&6; }
42948   fi
42949 
42950 
42951   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42953 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42954     CUPS_NOT_NEEDED=yes
42955     ALSA_NOT_NEEDED=yes
42956     PULSE_NOT_NEEDED=yes
42957     X11_NOT_NEEDED=yes
42958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42959 $as_echo "alsa cups pulse x11" >&6; }
42960   fi
42961 
42962   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42963     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42964 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42965     ALSA_NOT_NEEDED=yes
42966     PULSE_NOT_NEEDED=yes
42967     X11_NOT_NEEDED=yes
42968     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42969 $as_echo "alsa pulse x11" >&6; }
42970   fi
42971 
42972   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42973     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42974 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42975     ALSA_NOT_NEEDED=yes
42976     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42977 $as_echo "alsa" >&6; }
42978   fi
42979 
42980   if test "x$OPENJDK" = "xfalse"; then
42981     FREETYPE_NOT_NEEDED=yes
42982   fi
42983 
42984   if test "x$SUPPORT_HEADFUL" = xno; then
42985     X11_NOT_NEEDED=yes
42986   fi
42987 
42988 
42989 
42990   ###############################################################################
42991   #
42992   # Check for X Windows
42993   #
42994 
42995   if test "x$X11_NOT_NEEDED" = xyes; then
42996     if test "x${with_x}" != x; then
42997       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42998 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42999     fi
43000     X_CFLAGS=
43001     X_LIBS=
43002   else
43003     # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43004     # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43005     # --x-libraries for the sysroot, if that seems to be correct.
43006     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43007       if test "x$SYSROOT" != "x"; then
43008         if test "x$x_includes" = xNONE; then
43009           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43010             x_includes="$SYSROOT/usr/X11R6/include"
43011           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43012             x_includes="$SYSROOT/usr/include"
43013           fi
43014         fi
43015         if test "x$x_libraries" = xNONE; then
43016           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43017             x_libraries="$SYSROOT/usr/X11R6/lib"
43018           elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43019             x_libraries="$SYSROOT/usr/lib64"
43020           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43021             x_libraries="$SYSROOT/usr/lib"
43022           fi
43023         fi
43024       fi
43025     fi
43026 
43027     # Now let autoconf do it's magic
43028     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43029 $as_echo_n "checking for X... " >&6; }
43030 
43031 
43032 # Check whether --with-x was given.
43033 if test "${with_x+set}" = set; then :
43034   withval=$with_x;
43035 fi
43036 
43037 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43038 if test "x$with_x" = xno; then
43039   # The user explicitly disabled X.
43040   have_x=disabled
43041 else
43042   case $x_includes,$x_libraries in #(
43043     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43044     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43045   $as_echo_n "(cached) " >&6
43046 else
43047   # One or both of the vars are not set, and there is no cached value.
43048 ac_x_includes=no ac_x_libraries=no
43049 rm -f -r conftest.dir
43050 if mkdir conftest.dir; then
43051   cd conftest.dir
43052   cat >Imakefile <<'_ACEOF'
43053 incroot:
43054         @echo incroot='${INCROOT}'
43055 usrlibdir:
43056         @echo usrlibdir='${USRLIBDIR}'
43057 libdir:
43058         @echo libdir='${LIBDIR}'
43059 _ACEOF
43060   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43061     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43062     for ac_var in incroot usrlibdir libdir; do
43063       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43064     done
43065     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43066     for ac_extension in a so sl dylib la dll; do
43067       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43068          test -f "$ac_im_libdir/libX11.$ac_extension"; then
43069         ac_im_usrlibdir=$ac_im_libdir; break
43070       fi
43071     done
43072     # Screen out bogus values from the imake configuration.  They are
43073     # bogus both because they are the default anyway, and because
43074     # using them would break gcc on systems where it needs fixed includes.
43075     case $ac_im_incroot in
43076         /usr/include) ac_x_includes= ;;
43077         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43078     esac
43079     case $ac_im_usrlibdir in
43080         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43081         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43082     esac
43083   fi
43084   cd ..
43085   rm -f -r conftest.dir
43086 fi
43087 
43088 # Standard set of common directories for X headers.
43089 # Check X11 before X11Rn because it is often a symlink to the current release.
43090 ac_x_header_dirs='
43091 /usr/X11/include
43092 /usr/X11R7/include
43093 /usr/X11R6/include
43094 /usr/X11R5/include
43095 /usr/X11R4/include
43096 
43097 /usr/include/X11
43098 /usr/include/X11R7
43099 /usr/include/X11R6
43100 /usr/include/X11R5
43101 /usr/include/X11R4
43102 
43103 /usr/local/X11/include
43104 /usr/local/X11R7/include
43105 /usr/local/X11R6/include
43106 /usr/local/X11R5/include
43107 /usr/local/X11R4/include
43108 
43109 /usr/local/include/X11
43110 /usr/local/include/X11R7
43111 /usr/local/include/X11R6
43112 /usr/local/include/X11R5
43113 /usr/local/include/X11R4
43114 
43115 /usr/X386/include
43116 /usr/x386/include
43117 /usr/XFree86/include/X11
43118 
43119 /usr/include
43120 /usr/local/include
43121 /usr/unsupported/include
43122 /usr/athena/include
43123 /usr/local/x11r5/include
43124 /usr/lpp/Xamples/include
43125 
43126 /usr/openwin/include
43127 /usr/openwin/share/include'
43128 
43129 if test "$ac_x_includes" = no; then
43130   # Guess where to find include files, by looking for Xlib.h.
43131   # First, try using that file with no special directory specified.
43132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43133 /* end confdefs.h.  */
43134 #include <X11/Xlib.h>
43135 _ACEOF
43136 if ac_fn_cxx_try_cpp "$LINENO"; then :
43137   # We can compile using X headers with no special include directory.
43138 ac_x_includes=
43139 else
43140   for ac_dir in $ac_x_header_dirs; do
43141   if test -r "$ac_dir/X11/Xlib.h"; then
43142     ac_x_includes=$ac_dir
43143     break
43144   fi
43145 done
43146 fi
43147 rm -f conftest.err conftest.i conftest.$ac_ext
43148 fi # $ac_x_includes = no
43149 
43150 if test "$ac_x_libraries" = no; then
43151   # Check for the libraries.
43152   # See if we find them without any special options.
43153   # Don't add to $LIBS permanently.
43154   ac_save_LIBS=$LIBS
43155   LIBS="-lX11 $LIBS"
43156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43157 /* end confdefs.h.  */
43158 #include <X11/Xlib.h>
43159 int
43160 main ()
43161 {
43162 XrmInitialize ()
43163   ;
43164   return 0;
43165 }
43166 _ACEOF
43167 if ac_fn_cxx_try_link "$LINENO"; then :
43168   LIBS=$ac_save_LIBS
43169 # We can link X programs with no special library path.
43170 ac_x_libraries=
43171 else
43172   LIBS=$ac_save_LIBS
43173 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43174 do
43175   # Don't even attempt the hair of trying to link an X program!
43176   for ac_extension in a so sl dylib la dll; do
43177     if test -r "$ac_dir/libX11.$ac_extension"; then
43178       ac_x_libraries=$ac_dir
43179       break 2
43180     fi
43181   done
43182 done
43183 fi
43184 rm -f core conftest.err conftest.$ac_objext \
43185     conftest$ac_exeext conftest.$ac_ext
43186 fi # $ac_x_libraries = no
43187 
43188 case $ac_x_includes,$ac_x_libraries in #(
43189   no,* | *,no | *\'*)
43190     # Didn't find X, or a directory has "'" in its name.
43191     ac_cv_have_x="have_x=no";; #(
43192   *)
43193     # Record where we found X for the cache.
43194     ac_cv_have_x="have_x=yes\
43195         ac_x_includes='$ac_x_includes'\
43196         ac_x_libraries='$ac_x_libraries'"
43197 esac
43198 fi
43199 ;; #(
43200     *) have_x=yes;;
43201   esac
43202   eval "$ac_cv_have_x"
43203 fi # $with_x != no
43204 
43205 if test "$have_x" != yes; then
43206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43207 $as_echo "$have_x" >&6; }
43208   no_x=yes
43209 else
43210   # If each of the values was on the command line, it overrides each guess.
43211   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43212   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43213   # Update the cache value to reflect the command line values.
43214   ac_cv_have_x="have_x=yes\
43215         ac_x_includes='$x_includes'\
43216         ac_x_libraries='$x_libraries'"
43217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43218 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43219 fi
43220 
43221     if test "$no_x" = yes; then
43222   # Not all programs may use this symbol, but it does not hurt to define it.
43223 
43224 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43225 
43226   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43227 else
43228   if test -n "$x_includes"; then
43229     X_CFLAGS="$X_CFLAGS -I$x_includes"
43230   fi
43231 
43232   # It would also be nice to do this for all -L options, not just this one.
43233   if test -n "$x_libraries"; then
43234     X_LIBS="$X_LIBS -L$x_libraries"
43235     # For Solaris; some versions of Sun CC require a space after -R and
43236     # others require no space.  Words are not sufficient . . . .
43237     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43238 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43239     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43240     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43241     ac_cxx_werror_flag=yes
43242     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43243 /* end confdefs.h.  */
43244 
43245 int
43246 main ()
43247 {
43248 
43249   ;
43250   return 0;
43251 }
43252 _ACEOF
43253 if ac_fn_cxx_try_link "$LINENO"; then :
43254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43255 $as_echo "no" >&6; }
43256        X_LIBS="$X_LIBS -R$x_libraries"
43257 else
43258   LIBS="$ac_xsave_LIBS -R $x_libraries"
43259        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43260 /* end confdefs.h.  */
43261 
43262 int
43263 main ()
43264 {
43265 
43266   ;
43267   return 0;
43268 }
43269 _ACEOF
43270 if ac_fn_cxx_try_link "$LINENO"; then :
43271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43272 $as_echo "yes" >&6; }
43273           X_LIBS="$X_LIBS -R $x_libraries"
43274 else
43275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43276 $as_echo "neither works" >&6; }
43277 fi
43278 rm -f core conftest.err conftest.$ac_objext \
43279     conftest$ac_exeext conftest.$ac_ext
43280 fi
43281 rm -f core conftest.err conftest.$ac_objext \
43282     conftest$ac_exeext conftest.$ac_ext
43283     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43284     LIBS=$ac_xsave_LIBS
43285   fi
43286 
43287   # Check for system-dependent libraries X programs must link with.
43288   # Do this before checking for the system-independent R6 libraries
43289   # (-lICE), since we may need -lsocket or whatever for X linking.
43290 
43291   if test "$ISC" = yes; then
43292     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43293   else
43294     # Martyn Johnson says this is needed for Ultrix, if the X
43295     # libraries were built with DECnet support.  And Karl Berry says
43296     # the Alpha needs dnet_stub (dnet does not exist).
43297     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43298     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43299 /* end confdefs.h.  */
43300 
43301 /* Override any GCC internal prototype to avoid an error.
43302    Use char because int might match the return type of a GCC
43303    builtin and then its argument prototype would still apply.  */
43304 #ifdef __cplusplus
43305 extern "C"
43306 #endif
43307 char XOpenDisplay ();
43308 int
43309 main ()
43310 {
43311 return XOpenDisplay ();
43312   ;
43313   return 0;
43314 }
43315 _ACEOF
43316 if ac_fn_cxx_try_link "$LINENO"; then :
43317 
43318 else
43319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43320 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43321 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43322   $as_echo_n "(cached) " >&6
43323 else
43324   ac_check_lib_save_LIBS=$LIBS
43325 LIBS="-ldnet  $LIBS"
43326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43327 /* end confdefs.h.  */
43328 
43329 /* Override any GCC internal prototype to avoid an error.
43330    Use char because int might match the return type of a GCC
43331    builtin and then its argument prototype would still apply.  */
43332 #ifdef __cplusplus
43333 extern "C"
43334 #endif
43335 char dnet_ntoa ();
43336 int
43337 main ()
43338 {
43339 return dnet_ntoa ();
43340   ;
43341   return 0;
43342 }
43343 _ACEOF
43344 if ac_fn_cxx_try_link "$LINENO"; then :
43345   ac_cv_lib_dnet_dnet_ntoa=yes
43346 else
43347   ac_cv_lib_dnet_dnet_ntoa=no
43348 fi
43349 rm -f core conftest.err conftest.$ac_objext \
43350     conftest$ac_exeext conftest.$ac_ext
43351 LIBS=$ac_check_lib_save_LIBS
43352 fi
43353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43354 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43355 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43356   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43357 fi
43358 
43359     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43360       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43361 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43362 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43363   $as_echo_n "(cached) " >&6
43364 else
43365   ac_check_lib_save_LIBS=$LIBS
43366 LIBS="-ldnet_stub  $LIBS"
43367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43368 /* end confdefs.h.  */
43369 
43370 /* Override any GCC internal prototype to avoid an error.
43371    Use char because int might match the return type of a GCC
43372    builtin and then its argument prototype would still apply.  */
43373 #ifdef __cplusplus
43374 extern "C"
43375 #endif
43376 char dnet_ntoa ();
43377 int
43378 main ()
43379 {
43380 return dnet_ntoa ();
43381   ;
43382   return 0;
43383 }
43384 _ACEOF
43385 if ac_fn_cxx_try_link "$LINENO"; then :
43386   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43387 else
43388   ac_cv_lib_dnet_stub_dnet_ntoa=no
43389 fi
43390 rm -f core conftest.err conftest.$ac_objext \
43391     conftest$ac_exeext conftest.$ac_ext
43392 LIBS=$ac_check_lib_save_LIBS
43393 fi
43394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43395 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43396 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43397   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43398 fi
43399 
43400     fi
43401 fi
43402 rm -f core conftest.err conftest.$ac_objext \
43403     conftest$ac_exeext conftest.$ac_ext
43404     LIBS="$ac_xsave_LIBS"
43405 
43406     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43407     # to get the SysV transport functions.
43408     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43409     # needs -lnsl.
43410     # The nsl library prevents programs from opening the X display
43411     # on Irix 5.2, according to T.E. Dickey.
43412     # The functions gethostbyname, getservbyname, and inet_addr are
43413     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43414     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43415 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43416 
43417 fi
43418 
43419     if test $ac_cv_func_gethostbyname = no; then
43420       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43421 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43422 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43423   $as_echo_n "(cached) " >&6
43424 else
43425   ac_check_lib_save_LIBS=$LIBS
43426 LIBS="-lnsl  $LIBS"
43427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43428 /* end confdefs.h.  */
43429 
43430 /* Override any GCC internal prototype to avoid an error.
43431    Use char because int might match the return type of a GCC
43432    builtin and then its argument prototype would still apply.  */
43433 #ifdef __cplusplus
43434 extern "C"
43435 #endif
43436 char gethostbyname ();
43437 int
43438 main ()
43439 {
43440 return gethostbyname ();
43441   ;
43442   return 0;
43443 }
43444 _ACEOF
43445 if ac_fn_cxx_try_link "$LINENO"; then :
43446   ac_cv_lib_nsl_gethostbyname=yes
43447 else
43448   ac_cv_lib_nsl_gethostbyname=no
43449 fi
43450 rm -f core conftest.err conftest.$ac_objext \
43451     conftest$ac_exeext conftest.$ac_ext
43452 LIBS=$ac_check_lib_save_LIBS
43453 fi
43454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43455 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43456 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43457   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43458 fi
43459 
43460       if test $ac_cv_lib_nsl_gethostbyname = no; then
43461         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43462 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43463 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43464   $as_echo_n "(cached) " >&6
43465 else
43466   ac_check_lib_save_LIBS=$LIBS
43467 LIBS="-lbsd  $LIBS"
43468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43469 /* end confdefs.h.  */
43470 
43471 /* Override any GCC internal prototype to avoid an error.
43472    Use char because int might match the return type of a GCC
43473    builtin and then its argument prototype would still apply.  */
43474 #ifdef __cplusplus
43475 extern "C"
43476 #endif
43477 char gethostbyname ();
43478 int
43479 main ()
43480 {
43481 return gethostbyname ();
43482   ;
43483   return 0;
43484 }
43485 _ACEOF
43486 if ac_fn_cxx_try_link "$LINENO"; then :
43487   ac_cv_lib_bsd_gethostbyname=yes
43488 else
43489   ac_cv_lib_bsd_gethostbyname=no
43490 fi
43491 rm -f core conftest.err conftest.$ac_objext \
43492     conftest$ac_exeext conftest.$ac_ext
43493 LIBS=$ac_check_lib_save_LIBS
43494 fi
43495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43496 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43497 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43498   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43499 fi
43500 
43501       fi
43502     fi
43503 
43504     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43505     # socket/setsockopt and other routines are undefined under SCO ODT
43506     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43507     # on later versions), says Simon Leinen: it contains gethostby*
43508     # variants that don't use the name server (or something).  -lsocket
43509     # must be given before -lnsl if both are needed.  We assume that
43510     # if connect needs -lnsl, so does gethostbyname.
43511     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43512 if test "x$ac_cv_func_connect" = xyes; then :
43513 
43514 fi
43515 
43516     if test $ac_cv_func_connect = no; then
43517       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43518 $as_echo_n "checking for connect in -lsocket... " >&6; }
43519 if ${ac_cv_lib_socket_connect+:} false; then :
43520   $as_echo_n "(cached) " >&6
43521 else
43522   ac_check_lib_save_LIBS=$LIBS
43523 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43525 /* end confdefs.h.  */
43526 
43527 /* Override any GCC internal prototype to avoid an error.
43528    Use char because int might match the return type of a GCC
43529    builtin and then its argument prototype would still apply.  */
43530 #ifdef __cplusplus
43531 extern "C"
43532 #endif
43533 char connect ();
43534 int
43535 main ()
43536 {
43537 return connect ();
43538   ;
43539   return 0;
43540 }
43541 _ACEOF
43542 if ac_fn_cxx_try_link "$LINENO"; then :
43543   ac_cv_lib_socket_connect=yes
43544 else
43545   ac_cv_lib_socket_connect=no
43546 fi
43547 rm -f core conftest.err conftest.$ac_objext \
43548     conftest$ac_exeext conftest.$ac_ext
43549 LIBS=$ac_check_lib_save_LIBS
43550 fi
43551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43552 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43553 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43554   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43555 fi
43556 
43557     fi
43558 
43559     # Guillermo Gomez says -lposix is necessary on A/UX.
43560     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43561 if test "x$ac_cv_func_remove" = xyes; then :
43562 
43563 fi
43564 
43565     if test $ac_cv_func_remove = no; then
43566       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43567 $as_echo_n "checking for remove in -lposix... " >&6; }
43568 if ${ac_cv_lib_posix_remove+:} false; then :
43569   $as_echo_n "(cached) " >&6
43570 else
43571   ac_check_lib_save_LIBS=$LIBS
43572 LIBS="-lposix  $LIBS"
43573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43574 /* end confdefs.h.  */
43575 
43576 /* Override any GCC internal prototype to avoid an error.
43577    Use char because int might match the return type of a GCC
43578    builtin and then its argument prototype would still apply.  */
43579 #ifdef __cplusplus
43580 extern "C"
43581 #endif
43582 char remove ();
43583 int
43584 main ()
43585 {
43586 return remove ();
43587   ;
43588   return 0;
43589 }
43590 _ACEOF
43591 if ac_fn_cxx_try_link "$LINENO"; then :
43592   ac_cv_lib_posix_remove=yes
43593 else
43594   ac_cv_lib_posix_remove=no
43595 fi
43596 rm -f core conftest.err conftest.$ac_objext \
43597     conftest$ac_exeext conftest.$ac_ext
43598 LIBS=$ac_check_lib_save_LIBS
43599 fi
43600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43601 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43602 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43603   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43604 fi
43605 
43606     fi
43607 
43608     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43609     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43610 if test "x$ac_cv_func_shmat" = xyes; then :
43611 
43612 fi
43613 
43614     if test $ac_cv_func_shmat = no; then
43615       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43616 $as_echo_n "checking for shmat in -lipc... " >&6; }
43617 if ${ac_cv_lib_ipc_shmat+:} false; then :
43618   $as_echo_n "(cached) " >&6
43619 else
43620   ac_check_lib_save_LIBS=$LIBS
43621 LIBS="-lipc  $LIBS"
43622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43623 /* end confdefs.h.  */
43624 
43625 /* Override any GCC internal prototype to avoid an error.
43626    Use char because int might match the return type of a GCC
43627    builtin and then its argument prototype would still apply.  */
43628 #ifdef __cplusplus
43629 extern "C"
43630 #endif
43631 char shmat ();
43632 int
43633 main ()
43634 {
43635 return shmat ();
43636   ;
43637   return 0;
43638 }
43639 _ACEOF
43640 if ac_fn_cxx_try_link "$LINENO"; then :
43641   ac_cv_lib_ipc_shmat=yes
43642 else
43643   ac_cv_lib_ipc_shmat=no
43644 fi
43645 rm -f core conftest.err conftest.$ac_objext \
43646     conftest$ac_exeext conftest.$ac_ext
43647 LIBS=$ac_check_lib_save_LIBS
43648 fi
43649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43650 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43651 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43652   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43653 fi
43654 
43655     fi
43656   fi
43657 
43658   # Check for libraries that X11R6 Xt/Xaw programs need.
43659   ac_save_LDFLAGS=$LDFLAGS
43660   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43661   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43662   # check for ICE first), but we must link in the order -lSM -lICE or
43663   # we get undefined symbols.  So assume we have SM if we have ICE.
43664   # These have to be linked with before -lX11, unlike the other
43665   # libraries we check for below, so use a different variable.
43666   # John Interrante, Karl Berry
43667   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43668 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43669 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43670   $as_echo_n "(cached) " >&6
43671 else
43672   ac_check_lib_save_LIBS=$LIBS
43673 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43675 /* end confdefs.h.  */
43676 
43677 /* Override any GCC internal prototype to avoid an error.
43678    Use char because int might match the return type of a GCC
43679    builtin and then its argument prototype would still apply.  */
43680 #ifdef __cplusplus
43681 extern "C"
43682 #endif
43683 char IceConnectionNumber ();
43684 int
43685 main ()
43686 {
43687 return IceConnectionNumber ();
43688   ;
43689   return 0;
43690 }
43691 _ACEOF
43692 if ac_fn_cxx_try_link "$LINENO"; then :
43693   ac_cv_lib_ICE_IceConnectionNumber=yes
43694 else
43695   ac_cv_lib_ICE_IceConnectionNumber=no
43696 fi
43697 rm -f core conftest.err conftest.$ac_objext \
43698     conftest$ac_exeext conftest.$ac_ext
43699 LIBS=$ac_check_lib_save_LIBS
43700 fi
43701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43702 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43703 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43704   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43705 fi
43706 
43707   LDFLAGS=$ac_save_LDFLAGS
43708 
43709 fi
43710 
43711 
43712     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43713     # this doesn't make sense so we remove it.
43714     if test "x$COMPILE_TYPE" = xcross; then
43715       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43716     fi
43717 
43718     if test "x$no_x" = xyes; then
43719 
43720   # Print a helpful message on how to acquire the necessary build dependency.
43721   # x11 is the help tag: freetype, cups, pulse, alsa etc
43722   MISSING_DEPENDENCY=x11
43723 
43724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43725     cygwin_help $MISSING_DEPENDENCY
43726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43727     msys_help $MISSING_DEPENDENCY
43728   else
43729     PKGHANDLER_COMMAND=
43730 
43731     case $PKGHANDLER in
43732       apt-get)
43733         apt_help     $MISSING_DEPENDENCY ;;
43734       yum)
43735         yum_help     $MISSING_DEPENDENCY ;;
43736       port)
43737         port_help    $MISSING_DEPENDENCY ;;
43738       pkgutil)
43739         pkgutil_help $MISSING_DEPENDENCY ;;
43740       pkgadd)
43741         pkgadd_help  $MISSING_DEPENDENCY ;;
43742     esac
43743 
43744     if test "x$PKGHANDLER_COMMAND" != x; then
43745       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43746     fi
43747   fi
43748 
43749       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43750     fi
43751 
43752     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43753       OPENWIN_HOME="/usr/openwin"
43754       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43755       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43756           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43757           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43758           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43759     fi
43760 
43761     ac_ext=c
43762 ac_cpp='$CPP $CPPFLAGS'
43763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43766 
43767     OLD_CFLAGS="$CFLAGS"
43768     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43769 
43770     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43771     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43772 do :
43773   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43774 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43775           # include <X11/Xlib.h>
43776           # include <X11/Xutil.h>
43777 
43778 
43779 "
43780 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43781   cat >>confdefs.h <<_ACEOF
43782 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43783 _ACEOF
43784  X11_HEADERS_OK=yes
43785 else
43786   X11_HEADERS_OK=no; break
43787 fi
43788 
43789 done
43790 
43791 
43792     if test "x$X11_HEADERS_OK" = xno; then
43793 
43794   # Print a helpful message on how to acquire the necessary build dependency.
43795   # x11 is the help tag: freetype, cups, pulse, alsa etc
43796   MISSING_DEPENDENCY=x11
43797 
43798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43799     cygwin_help $MISSING_DEPENDENCY
43800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43801     msys_help $MISSING_DEPENDENCY
43802   else
43803     PKGHANDLER_COMMAND=
43804 
43805     case $PKGHANDLER in
43806       apt-get)
43807         apt_help     $MISSING_DEPENDENCY ;;
43808       yum)
43809         yum_help     $MISSING_DEPENDENCY ;;
43810       port)
43811         port_help    $MISSING_DEPENDENCY ;;
43812       pkgutil)
43813         pkgutil_help $MISSING_DEPENDENCY ;;
43814       pkgadd)
43815         pkgadd_help  $MISSING_DEPENDENCY ;;
43816     esac
43817 
43818     if test "x$PKGHANDLER_COMMAND" != x; then
43819       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43820     fi
43821   fi
43822 
43823       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43824     fi
43825 
43826     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43827     # defined in libawt_xawt.
43828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43829 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43830     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43831 /* end confdefs.h.  */
43832 #include <X11/extensions/Xrender.h>
43833 int
43834 main ()
43835 {
43836 XLinearGradient x;
43837   ;
43838   return 0;
43839 }
43840 _ACEOF
43841 if ac_fn_c_try_compile "$LINENO"; then :
43842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43843 $as_echo "yes" >&6; }
43844 else
43845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43846 $as_echo "no" >&6; }
43847          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43848 fi
43849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43850 
43851     CFLAGS="$OLD_CFLAGS"
43852     ac_ext=cpp
43853 ac_cpp='$CXXCPP $CPPFLAGS'
43854 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43855 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43856 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43857 
43858   fi # X11_NOT_NEEDED
43859 
43860 
43861 
43862 
43863 
43864 
43865   ###############################################################################
43866   #
43867   # The common unix printing system cups is used to print from java.
43868   #
43869 
43870 # Check whether --with-cups was given.
43871 if test "${with_cups+set}" = set; then :
43872   withval=$with_cups;
43873 fi
43874 
43875 
43876 # Check whether --with-cups-include was given.
43877 if test "${with_cups_include+set}" = set; then :
43878   withval=$with_cups_include;
43879 fi
43880 
43881 
43882   if test "x$CUPS_NOT_NEEDED" = xyes; then
43883     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43884       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43885 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43886     fi
43887     CUPS_CFLAGS=
43888   else
43889     CUPS_FOUND=no
43890 
43891     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43892       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43893     fi
43894 
43895     if test "x${with_cups}" != x; then
43896       CUPS_CFLAGS="-I${with_cups}/include"
43897       CUPS_FOUND=yes
43898     fi
43899     if test "x${with_cups_include}" != x; then
43900       CUPS_CFLAGS="-I${with_cups_include}"
43901       CUPS_FOUND=yes
43902     fi
43903     if test "x$CUPS_FOUND" = xno; then
43904 
43905 
43906   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43907     # Source the builddeps file again, to make sure it uses the latest variables!
43908     . $builddepsfile
43909     # Look for a target and build machine specific resource!
43910     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43911     if test "x$resource" = x; then
43912       # Ok, lets instead look for a target specific resource
43913       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43914     fi
43915     if test "x$resource" = x; then
43916       # Ok, lets instead look for a build specific resource
43917       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43918     fi
43919     if test "x$resource" = x; then
43920       # Ok, lets instead look for a generic resource
43921       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43922       resource=${builddep_cups}
43923     fi
43924     if test "x$resource" != x; then
43925       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43926 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43927       # If the resource in the builddeps.conf file is an existing directory,
43928       # for example /java/linux/cups
43929       if test -d ${resource}; then
43930         depdir=${resource}
43931       else
43932 
43933   # cups is for example mymodule
43934   # $resource is for example libs/general/libmymod_1_2_3.zip
43935   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43936   # $with_builddeps_dir is for example /localhome/builddeps
43937   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43938   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43939   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43940   filename=`basename $resource`
43941   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43942   filebase=${filename%%.*}
43943   extension=${filename#*.}
43944   installdir=$with_builddeps_dir/$filebase
43945   if test ! -f $installdir/$filename.unpacked; then
43946     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43947 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43948     if test ! -d $installdir; then
43949       mkdir -p $installdir
43950     fi
43951     if test ! -d $installdir; then
43952       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43953     fi
43954     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43955     touch $tmpfile
43956     if test ! -f $tmpfile; then
43957       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43958     fi
43959 
43960   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43961   # $tmpfile is the local file name for the downloaded file.
43962   VALID_TOOL=no
43963   if test "x$BDEPS_FTP" = xwget; then
43964     VALID_TOOL=yes
43965     wget -O $tmpfile $with_builddeps_server/$resource
43966   fi
43967   if test "x$BDEPS_FTP" = xlftp; then
43968     VALID_TOOL=yes
43969     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43970   fi
43971   if test "x$BDEPS_FTP" = xftp; then
43972     VALID_TOOL=yes
43973     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43974     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43975     FTPUSERPWD=${FTPSERVER%%@*}
43976     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43977       FTPUSER=${userpwd%%:*}
43978       FTPPWD=${userpwd#*@}
43979       FTPSERVER=${FTPSERVER#*@}
43980     else
43981       FTPUSER=ftp
43982       FTPPWD=ftp
43983     fi
43984     # the "pass" command does not work on some
43985     # ftp clients (read ftp.exe) but if it works,
43986     # passive mode is better!
43987     ( \
43988         echo "user $FTPUSER $FTPPWD"        ; \
43989         echo "pass"                         ; \
43990         echo "bin"                          ; \
43991         echo "get $FTPPATH $tmpfile"              ; \
43992     ) | ftp -in $FTPSERVER
43993   fi
43994   if test "x$VALID_TOOL" != xyes; then
43995     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43996   fi
43997 
43998     mv $tmpfile $installdir/$filename
43999     if test ! -s $installdir/$filename; then
44000       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44001     fi
44002     case "$extension" in
44003       zip)  echo "Unzipping $installdir/$filename..."
44004         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44005         ;;
44006       tar.gz) echo "Untaring $installdir/$filename..."
44007         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44008         ;;
44009       tgz) echo "Untaring $installdir/$filename..."
44010         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44011         ;;
44012       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44013         ;;
44014     esac
44015   fi
44016   if test -f $installdir/$filename.unpacked; then
44017     depdir=$installdir
44018   fi
44019 
44020       fi
44021       # Source the builddeps file again, because in the previous command, the depdir
44022       # was updated to point at the current build dependency install directory.
44023       . $builddepsfile
44024       # Now extract variables from the builddeps.conf files.
44025       theroot=${builddep_cups_ROOT}
44026       thecflags=${builddep_cups_CFLAGS}
44027       thelibs=${builddep_cups_LIBS}
44028       if test "x$depdir" = x; then
44029         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44030       fi
44031       CUPS=$depdir
44032       if test "x$theroot" != x; then
44033         CUPS="$theroot"
44034       fi
44035       if test "x$thecflags" != x; then
44036         CUPS_CFLAGS="$thecflags"
44037       fi
44038       if test "x$thelibs" != x; then
44039         CUPS_LIBS="$thelibs"
44040       fi
44041       CUPS_FOUND=yes
44042 
44043     fi
44044 
44045   fi
44046 
44047     fi
44048     if test "x$CUPS_FOUND" = xno; then
44049       # Are the cups headers installed in the default /usr/include location?
44050       for ac_header in cups/cups.h cups/ppd.h
44051 do :
44052   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44053 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44054 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44055   cat >>confdefs.h <<_ACEOF
44056 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44057 _ACEOF
44058 
44059             CUPS_FOUND=yes
44060             CUPS_CFLAGS=
44061             DEFAULT_CUPS=yes
44062 
44063 
44064 fi
44065 
44066 done
44067 
44068     fi
44069     if test "x$CUPS_FOUND" = xno; then
44070       # Getting nervous now? Lets poke around for standard Solaris third-party
44071       # package installation locations.
44072       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44073 $as_echo_n "checking for cups headers... " >&6; }
44074       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44075         # An SFW package seems to be installed!
44076         CUPS_FOUND=yes
44077         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44078       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44079         # A CSW package seems to be installed!
44080         CUPS_FOUND=yes
44081         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44082       fi
44083       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44084 $as_echo "$CUPS_FOUND" >&6; }
44085     fi
44086     if test "x$CUPS_FOUND" = xno; then
44087 
44088   # Print a helpful message on how to acquire the necessary build dependency.
44089   # cups is the help tag: freetype, cups, pulse, alsa etc
44090   MISSING_DEPENDENCY=cups
44091 
44092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44093     cygwin_help $MISSING_DEPENDENCY
44094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44095     msys_help $MISSING_DEPENDENCY
44096   else
44097     PKGHANDLER_COMMAND=
44098 
44099     case $PKGHANDLER in
44100       apt-get)
44101         apt_help     $MISSING_DEPENDENCY ;;
44102       yum)
44103         yum_help     $MISSING_DEPENDENCY ;;
44104       port)
44105         port_help    $MISSING_DEPENDENCY ;;
44106       pkgutil)
44107         pkgutil_help $MISSING_DEPENDENCY ;;
44108       pkgadd)
44109         pkgadd_help  $MISSING_DEPENDENCY ;;
44110     esac
44111 
44112     if test "x$PKGHANDLER_COMMAND" != x; then
44113       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44114     fi
44115   fi
44116 
44117       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44118     fi
44119   fi
44120 
44121 
44122 
44123 
44124 
44125 
44126   ###############################################################################
44127   #
44128   # The ubiquitous freetype library is used to render fonts.
44129   #
44130 
44131 # Check whether --with-freetype was given.
44132 if test "${with_freetype+set}" = set; then :
44133   withval=$with_freetype;
44134 fi
44135 
44136 
44137 # Check whether --with-freetype-include was given.
44138 if test "${with_freetype_include+set}" = set; then :
44139   withval=$with_freetype_include;
44140 fi
44141 
44142 
44143 # Check whether --with-freetype-lib was given.
44144 if test "${with_freetype_lib+set}" = set; then :
44145   withval=$with_freetype_lib;
44146 fi
44147 
44148 
44149 # Check whether --with-freetype-src was given.
44150 if test "${with_freetype_src+set}" = set; then :
44151   withval=$with_freetype_src;
44152 fi
44153 
44154   # Check whether --enable-freetype-bundling was given.
44155 if test "${enable_freetype_bundling+set}" = set; then :
44156   enableval=$enable_freetype_bundling;
44157 fi
44158 
44159 
44160   # Need to specify explicitly since it needs to be overridden on some versions of macosx
44161   FREETYPE_BASE_NAME=freetype
44162   FREETYPE_CFLAGS=
44163   FREETYPE_LIBS=
44164   FREETYPE_BUNDLE_LIB_PATH=
44165 
44166   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44167     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
44168       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44169 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44170     fi
44171     if test "x$enable_freetype_bundling" != x; then
44172       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44173 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44174     fi
44175   else
44176     # freetype is needed to build; go get it!
44177 
44178     BUNDLE_FREETYPE="$enable_freetype_bundling"
44179 
44180     if  test "x$with_freetype_src" != x; then
44181       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44182         # Try to build freetype if --with-freetype-src was given on Windows
44183 
44184   FREETYPE_SRC_PATH="$with_freetype_src"
44185   BUILD_FREETYPE=yes
44186 
44187   # Check if the freetype sources are acessible..
44188   if ! test -d $FREETYPE_SRC_PATH; then
44189     { $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
44190 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44191     BUILD_FREETYPE=no
44192   fi
44193   # ..and contain a vc2010 project file
44194   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44195   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44196     { $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
44197 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44198     BUILD_FREETYPE=no
44199   fi
44200   # Now check if configure found a version of 'msbuild.exe'
44201   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44202     { $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
44203 $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;}
44204     BUILD_FREETYPE=no
44205   fi
44206 
44207   # Ready to go..
44208   if test "x$BUILD_FREETYPE" = xyes; then
44209 
44210     # msbuild requires trailing slashes for output directories
44211     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44212     freetype_lib_path_unix="$freetype_lib_path"
44213     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44214 
44215   unix_path="$vcxproj_path"
44216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44217     windows_path=`$CYGPATH -m "$unix_path"`
44218     vcxproj_path="$windows_path"
44219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44220     windows_path=`cmd //c echo $unix_path`
44221     vcxproj_path="$windows_path"
44222   fi
44223 
44224 
44225   unix_path="$freetype_lib_path"
44226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44227     windows_path=`$CYGPATH -m "$unix_path"`
44228     freetype_lib_path="$windows_path"
44229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44230     windows_path=`cmd //c echo $unix_path`
44231     freetype_lib_path="$windows_path"
44232   fi
44233 
44234 
44235   unix_path="$freetype_obj_path"
44236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44237     windows_path=`$CYGPATH -m "$unix_path"`
44238     freetype_obj_path="$windows_path"
44239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44240     windows_path=`cmd //c echo $unix_path`
44241     freetype_obj_path="$windows_path"
44242   fi
44243 
44244     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44245       freetype_platform=x64
44246     else
44247       freetype_platform=win32
44248     fi
44249 
44250     # The original freetype project file is for VS 2010 (i.e. 'v100'),
44251     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44252     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44253     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44254     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44255 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44256 
44257     # First we try to build the freetype.dll
44258     $ECHO -e "@echo off\n"\
44259              "$MSBUILD $vcxproj_path "\
44260                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44261                        "/p:Configuration=\"Release Multithreaded\" "\
44262                        "/p:Platform=$freetype_platform "\
44263                        "/p:ConfigurationType=DynamicLibrary "\
44264                        "/p:TargetName=freetype "\
44265                        "/p:OutDir=\"$freetype_lib_path\" "\
44266                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44267     cmd /c freetype.bat
44268 
44269     if test -s "$freetype_lib_path_unix/freetype.dll"; then
44270       # If that succeeds we also build freetype.lib
44271       $ECHO -e "@echo off\n"\
44272                "$MSBUILD $vcxproj_path "\
44273                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44274                          "/p:Configuration=\"Release Multithreaded\" "\
44275                          "/p:Platform=$freetype_platform "\
44276                          "/p:ConfigurationType=StaticLibrary "\
44277                          "/p:TargetName=freetype "\
44278                          "/p:OutDir=\"$freetype_lib_path\" "\
44279                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44280       cmd /c freetype.bat
44281 
44282       if test -s "$freetype_lib_path_unix/freetype.lib"; then
44283         # Once we build both, lib and dll, set freetype lib and include path appropriately
44284         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44285         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44286         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44287 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44288       else
44289         BUILD_FREETYPE=no
44290       fi
44291     else
44292       BUILD_FREETYPE=no
44293     fi
44294   fi
44295 
44296         if test "x$BUILD_FREETYPE" = xyes; then
44297           # Okay, we built it. Check that it works.
44298 
44299   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44300   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44301   METHOD="--with-freetype-src"
44302 
44303   # Let's start with an optimistic view of the world :-)
44304   FOUND_FREETYPE=yes
44305 
44306   # First look for the canonical freetype main include file ft2build.h.
44307   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44308     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44309     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44310     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44311       # Fail.
44312       FOUND_FREETYPE=no
44313     fi
44314   fi
44315 
44316   if test "x$FOUND_FREETYPE" = xyes; then
44317     # Include file found, let's continue the sanity check.
44318     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44319 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44320 
44321     # Reset to default value
44322     FREETYPE_BASE_NAME=freetype
44323     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44324     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44325       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44326           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44327         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44328         # for the .6 version explicitly.
44329         FREETYPE_BASE_NAME=freetype.6
44330         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44331         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44332 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44333       else
44334         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44335 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44336         FOUND_FREETYPE=no
44337       fi
44338     else
44339       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44340         # On Windows, we will need both .lib and .dll file.
44341         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44342           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44343 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44344           FOUND_FREETYPE=no
44345         fi
44346       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44347           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44348         # Found lib in isa dir, use that instead.
44349         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44350         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44351 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44352       fi
44353     fi
44354   fi
44355 
44356   if test "x$FOUND_FREETYPE" = xyes; then
44357 
44358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44359 
44360   # Input might be given as Windows format, start by converting to
44361   # unix format.
44362   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44363   new_path=`$CYGPATH -u "$path"`
44364 
44365   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44366   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44367   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44368   # "foo.exe" is OK but "foo" is an error.
44369   #
44370   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44371   # It is also a way to make sure we got the proper file name for the real test later on.
44372   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44373   if test "x$test_shortpath" = x; then
44374     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44375 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44376     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44377   fi
44378 
44379   # Call helper function which possibly converts this using DOS-style short mode.
44380   # If so, the updated path is stored in $new_path.
44381 
44382   input_path="$new_path"
44383   # Check if we need to convert this using DOS-style short mode. If the path
44384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44385   # take no chances and rewrite it.
44386   # Note: m4 eats our [], so we need to use [ and ] instead.
44387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44388   if test "x$has_forbidden_chars" != x; then
44389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44390     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44391     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44392     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44393       # Going to short mode and back again did indeed matter. Since short mode is
44394       # case insensitive, let's make it lowercase to improve readability.
44395       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44396       # Now convert it back to Unix-stile (cygpath)
44397       input_path=`$CYGPATH -u "$shortmode_path"`
44398       new_path="$input_path"
44399     fi
44400   fi
44401 
44402   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44403   if test "x$test_cygdrive_prefix" = x; then
44404     # As a simple fix, exclude /usr/bin since it's not a real path.
44405     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44406       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44407       # a path prefixed by /cygdrive for fixpath to work.
44408       new_path="$CYGWIN_ROOT_PATH$input_path"
44409     fi
44410   fi
44411 
44412 
44413   if test "x$path" != "x$new_path"; then
44414     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44416 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44417   fi
44418 
44419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44420 
44421   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44422   has_colon=`$ECHO $path | $GREP ^.:`
44423   new_path="$path"
44424   if test "x$has_colon" = x; then
44425     # Not in mixed or Windows style, start by that.
44426     new_path=`cmd //c echo $path`
44427   fi
44428 
44429 
44430   input_path="$new_path"
44431   # Check if we need to convert this using DOS-style short mode. If the path
44432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44433   # take no chances and rewrite it.
44434   # Note: m4 eats our [], so we need to use [ and ] instead.
44435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44436   if test "x$has_forbidden_chars" != x; then
44437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44438     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44439   fi
44440 
44441 
44442   windows_path="$new_path"
44443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44444     unix_path=`$CYGPATH -u "$windows_path"`
44445     new_path="$unix_path"
44446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44448     new_path="$unix_path"
44449   fi
44450 
44451   if test "x$path" != "x$new_path"; then
44452     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44453     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44454 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44455   fi
44456 
44457   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44458   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44459 
44460   else
44461     # We're on a unix platform. Hooray! :)
44462     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44463     has_space=`$ECHO "$path" | $GREP " "`
44464     if test "x$has_space" != x; then
44465       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44466 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44467       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44468     fi
44469 
44470     # Use eval to expand a potential ~
44471     eval path="$path"
44472     if test ! -f "$path" && test ! -d "$path"; then
44473       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44474     fi
44475 
44476     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44477   fi
44478 
44479 
44480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44481 
44482   # Input might be given as Windows format, start by converting to
44483   # unix format.
44484   path="$POTENTIAL_FREETYPE_LIB_PATH"
44485   new_path=`$CYGPATH -u "$path"`
44486 
44487   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44488   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44489   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44490   # "foo.exe" is OK but "foo" is an error.
44491   #
44492   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44493   # It is also a way to make sure we got the proper file name for the real test later on.
44494   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44495   if test "x$test_shortpath" = x; then
44496     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44497 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44498     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44499   fi
44500 
44501   # Call helper function which possibly converts this using DOS-style short mode.
44502   # If so, the updated path is stored in $new_path.
44503 
44504   input_path="$new_path"
44505   # Check if we need to convert this using DOS-style short mode. If the path
44506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44507   # take no chances and rewrite it.
44508   # Note: m4 eats our [], so we need to use [ and ] instead.
44509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44510   if test "x$has_forbidden_chars" != x; then
44511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44515       # Going to short mode and back again did indeed matter. Since short mode is
44516       # case insensitive, let's make it lowercase to improve readability.
44517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44518       # Now convert it back to Unix-stile (cygpath)
44519       input_path=`$CYGPATH -u "$shortmode_path"`
44520       new_path="$input_path"
44521     fi
44522   fi
44523 
44524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44525   if test "x$test_cygdrive_prefix" = x; then
44526     # As a simple fix, exclude /usr/bin since it's not a real path.
44527     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44529       # a path prefixed by /cygdrive for fixpath to work.
44530       new_path="$CYGWIN_ROOT_PATH$input_path"
44531     fi
44532   fi
44533 
44534 
44535   if test "x$path" != "x$new_path"; then
44536     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44538 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44539   fi
44540 
44541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44542 
44543   path="$POTENTIAL_FREETYPE_LIB_PATH"
44544   has_colon=`$ECHO $path | $GREP ^.:`
44545   new_path="$path"
44546   if test "x$has_colon" = x; then
44547     # Not in mixed or Windows style, start by that.
44548     new_path=`cmd //c echo $path`
44549   fi
44550 
44551 
44552   input_path="$new_path"
44553   # Check if we need to convert this using DOS-style short mode. If the path
44554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44555   # take no chances and rewrite it.
44556   # Note: m4 eats our [], so we need to use [ and ] instead.
44557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44558   if test "x$has_forbidden_chars" != x; then
44559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44560     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44561   fi
44562 
44563 
44564   windows_path="$new_path"
44565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44566     unix_path=`$CYGPATH -u "$windows_path"`
44567     new_path="$unix_path"
44568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44570     new_path="$unix_path"
44571   fi
44572 
44573   if test "x$path" != "x$new_path"; then
44574     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44575     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44576 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44577   fi
44578 
44579   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44580   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44581 
44582   else
44583     # We're on a unix platform. Hooray! :)
44584     path="$POTENTIAL_FREETYPE_LIB_PATH"
44585     has_space=`$ECHO "$path" | $GREP " "`
44586     if test "x$has_space" != x; then
44587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44588 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44589       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44590     fi
44591 
44592     # Use eval to expand a potential ~
44593     eval path="$path"
44594     if test ! -f "$path" && test ! -d "$path"; then
44595       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44596     fi
44597 
44598     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44599   fi
44600 
44601 
44602     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44604 $as_echo_n "checking for freetype includes... " >&6; }
44605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44606 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44607     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44609 $as_echo_n "checking for freetype libraries... " >&6; }
44610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44611 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44612   fi
44613 
44614           if test "x$FOUND_FREETYPE" != xyes; then
44615             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44616           fi
44617         else
44618           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44619 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44620           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44621         fi
44622       else
44623         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44624 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44625       fi
44626     fi
44627 
44628     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44629       # User has specified settings
44630 
44631       if test "x$BUNDLE_FREETYPE" = x; then
44632         # If not specified, default is to bundle freetype
44633         BUNDLE_FREETYPE=yes
44634       fi
44635 
44636       if test "x$with_freetype" != x; then
44637         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44638         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44639       fi
44640 
44641       # Allow --with-freetype-lib and --with-freetype-include to override
44642       if test "x$with_freetype_include" != x; then
44643         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44644       fi
44645       if test "x$with_freetype_lib" != x; then
44646         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44647       fi
44648 
44649       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44650         # Okay, we got it. Check that it works.
44651 
44652   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44653   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44654   METHOD="--with-freetype"
44655 
44656   # Let's start with an optimistic view of the world :-)
44657   FOUND_FREETYPE=yes
44658 
44659   # First look for the canonical freetype main include file ft2build.h.
44660   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44661     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44662     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44663     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44664       # Fail.
44665       FOUND_FREETYPE=no
44666     fi
44667   fi
44668 
44669   if test "x$FOUND_FREETYPE" = xyes; then
44670     # Include file found, let's continue the sanity check.
44671     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44672 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44673 
44674     # Reset to default value
44675     FREETYPE_BASE_NAME=freetype
44676     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44677     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44678       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44679           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44680         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44681         # for the .6 version explicitly.
44682         FREETYPE_BASE_NAME=freetype.6
44683         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44684         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44685 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44686       else
44687         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44688 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44689         FOUND_FREETYPE=no
44690       fi
44691     else
44692       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44693         # On Windows, we will need both .lib and .dll file.
44694         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44695           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44696 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44697           FOUND_FREETYPE=no
44698         fi
44699       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44700           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44701         # Found lib in isa dir, use that instead.
44702         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44703         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44704 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44705       fi
44706     fi
44707   fi
44708 
44709   if test "x$FOUND_FREETYPE" = xyes; then
44710 
44711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44712 
44713   # Input might be given as Windows format, start by converting to
44714   # unix format.
44715   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44716   new_path=`$CYGPATH -u "$path"`
44717 
44718   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44719   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44720   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44721   # "foo.exe" is OK but "foo" is an error.
44722   #
44723   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44724   # It is also a way to make sure we got the proper file name for the real test later on.
44725   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44726   if test "x$test_shortpath" = x; then
44727     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44728 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44729     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44730   fi
44731 
44732   # Call helper function which possibly converts this using DOS-style short mode.
44733   # If so, the updated path is stored in $new_path.
44734 
44735   input_path="$new_path"
44736   # Check if we need to convert this using DOS-style short mode. If the path
44737   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44738   # take no chances and rewrite it.
44739   # Note: m4 eats our [], so we need to use [ and ] instead.
44740   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44741   if test "x$has_forbidden_chars" != x; then
44742     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44743     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44744     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44745     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44746       # Going to short mode and back again did indeed matter. Since short mode is
44747       # case insensitive, let's make it lowercase to improve readability.
44748       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44749       # Now convert it back to Unix-stile (cygpath)
44750       input_path=`$CYGPATH -u "$shortmode_path"`
44751       new_path="$input_path"
44752     fi
44753   fi
44754 
44755   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44756   if test "x$test_cygdrive_prefix" = x; then
44757     # As a simple fix, exclude /usr/bin since it's not a real path.
44758     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44759       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44760       # a path prefixed by /cygdrive for fixpath to work.
44761       new_path="$CYGWIN_ROOT_PATH$input_path"
44762     fi
44763   fi
44764 
44765 
44766   if test "x$path" != "x$new_path"; then
44767     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44769 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44770   fi
44771 
44772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44773 
44774   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44775   has_colon=`$ECHO $path | $GREP ^.:`
44776   new_path="$path"
44777   if test "x$has_colon" = x; then
44778     # Not in mixed or Windows style, start by that.
44779     new_path=`cmd //c echo $path`
44780   fi
44781 
44782 
44783   input_path="$new_path"
44784   # Check if we need to convert this using DOS-style short mode. If the path
44785   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44786   # take no chances and rewrite it.
44787   # Note: m4 eats our [], so we need to use [ and ] instead.
44788   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44789   if test "x$has_forbidden_chars" != x; then
44790     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44791     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44792   fi
44793 
44794 
44795   windows_path="$new_path"
44796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44797     unix_path=`$CYGPATH -u "$windows_path"`
44798     new_path="$unix_path"
44799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44801     new_path="$unix_path"
44802   fi
44803 
44804   if test "x$path" != "x$new_path"; then
44805     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44806     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44807 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44808   fi
44809 
44810   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44811   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44812 
44813   else
44814     # We're on a unix platform. Hooray! :)
44815     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44816     has_space=`$ECHO "$path" | $GREP " "`
44817     if test "x$has_space" != x; then
44818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44819 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44820       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44821     fi
44822 
44823     # Use eval to expand a potential ~
44824     eval path="$path"
44825     if test ! -f "$path" && test ! -d "$path"; then
44826       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44827     fi
44828 
44829     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44830   fi
44831 
44832 
44833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44834 
44835   # Input might be given as Windows format, start by converting to
44836   # unix format.
44837   path="$POTENTIAL_FREETYPE_LIB_PATH"
44838   new_path=`$CYGPATH -u "$path"`
44839 
44840   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44841   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44842   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44843   # "foo.exe" is OK but "foo" is an error.
44844   #
44845   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44846   # It is also a way to make sure we got the proper file name for the real test later on.
44847   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44848   if test "x$test_shortpath" = x; then
44849     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44850 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44851     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44852   fi
44853 
44854   # Call helper function which possibly converts this using DOS-style short mode.
44855   # If so, the updated path is stored in $new_path.
44856 
44857   input_path="$new_path"
44858   # Check if we need to convert this using DOS-style short mode. If the path
44859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44860   # take no chances and rewrite it.
44861   # Note: m4 eats our [], so we need to use [ and ] instead.
44862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44863   if test "x$has_forbidden_chars" != x; then
44864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44865     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44866     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44867     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44868       # Going to short mode and back again did indeed matter. Since short mode is
44869       # case insensitive, let's make it lowercase to improve readability.
44870       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44871       # Now convert it back to Unix-stile (cygpath)
44872       input_path=`$CYGPATH -u "$shortmode_path"`
44873       new_path="$input_path"
44874     fi
44875   fi
44876 
44877   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44878   if test "x$test_cygdrive_prefix" = x; then
44879     # As a simple fix, exclude /usr/bin since it's not a real path.
44880     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44881       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44882       # a path prefixed by /cygdrive for fixpath to work.
44883       new_path="$CYGWIN_ROOT_PATH$input_path"
44884     fi
44885   fi
44886 
44887 
44888   if test "x$path" != "x$new_path"; then
44889     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44891 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44892   fi
44893 
44894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44895 
44896   path="$POTENTIAL_FREETYPE_LIB_PATH"
44897   has_colon=`$ECHO $path | $GREP ^.:`
44898   new_path="$path"
44899   if test "x$has_colon" = x; then
44900     # Not in mixed or Windows style, start by that.
44901     new_path=`cmd //c echo $path`
44902   fi
44903 
44904 
44905   input_path="$new_path"
44906   # Check if we need to convert this using DOS-style short mode. If the path
44907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44908   # take no chances and rewrite it.
44909   # Note: m4 eats our [], so we need to use [ and ] instead.
44910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44911   if test "x$has_forbidden_chars" != x; then
44912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44913     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44914   fi
44915 
44916 
44917   windows_path="$new_path"
44918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44919     unix_path=`$CYGPATH -u "$windows_path"`
44920     new_path="$unix_path"
44921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44923     new_path="$unix_path"
44924   fi
44925 
44926   if test "x$path" != "x$new_path"; then
44927     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44929 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44930   fi
44931 
44932   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44933   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44934 
44935   else
44936     # We're on a unix platform. Hooray! :)
44937     path="$POTENTIAL_FREETYPE_LIB_PATH"
44938     has_space=`$ECHO "$path" | $GREP " "`
44939     if test "x$has_space" != x; then
44940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44941 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44942       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44943     fi
44944 
44945     # Use eval to expand a potential ~
44946     eval path="$path"
44947     if test ! -f "$path" && test ! -d "$path"; then
44948       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44949     fi
44950 
44951     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44952   fi
44953 
44954 
44955     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44956     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44957 $as_echo_n "checking for freetype includes... " >&6; }
44958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44959 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44960     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44961     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44962 $as_echo_n "checking for freetype libraries... " >&6; }
44963     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44964 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44965   fi
44966 
44967         if test "x$FOUND_FREETYPE" != xyes; then
44968           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44969         fi
44970       else
44971         # User specified only one of lib or include. This is an error.
44972         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44973           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44974 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44975           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44976         else
44977           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44978 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44979           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44980         fi
44981       fi
44982     else
44983       # User did not specify settings, but we need freetype. Try to locate it.
44984 
44985       if test "x$BUNDLE_FREETYPE" = x; then
44986         # If not specified, default is to bundle freetype only on windows
44987         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44988           BUNDLE_FREETYPE=yes
44989         else
44990           BUNDLE_FREETYPE=no
44991         fi
44992       fi
44993 
44994       if test "x$FOUND_FREETYPE" != xyes; then
44995         # Check builddeps
44996 
44997 
44998   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44999     # Source the builddeps file again, to make sure it uses the latest variables!
45000     . $builddepsfile
45001     # Look for a target and build machine specific resource!
45002     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45003     if test "x$resource" = x; then
45004       # Ok, lets instead look for a target specific resource
45005       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45006     fi
45007     if test "x$resource" = x; then
45008       # Ok, lets instead look for a build specific resource
45009       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45010     fi
45011     if test "x$resource" = x; then
45012       # Ok, lets instead look for a generic resource
45013       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45014       resource=${builddep_freetype2}
45015     fi
45016     if test "x$resource" != x; then
45017       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45018 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45019       # If the resource in the builddeps.conf file is an existing directory,
45020       # for example /java/linux/cups
45021       if test -d ${resource}; then
45022         depdir=${resource}
45023       else
45024 
45025   # freetype2 is for example mymodule
45026   # $resource is for example libs/general/libmymod_1_2_3.zip
45027   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45028   # $with_builddeps_dir is for example /localhome/builddeps
45029   # depdir is the name of the variable into which we store the depdir, eg MYMOD
45030   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45031   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45032   filename=`basename $resource`
45033   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45034   filebase=${filename%%.*}
45035   extension=${filename#*.}
45036   installdir=$with_builddeps_dir/$filebase
45037   if test ! -f $installdir/$filename.unpacked; then
45038     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45039 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45040     if test ! -d $installdir; then
45041       mkdir -p $installdir
45042     fi
45043     if test ! -d $installdir; then
45044       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45045     fi
45046     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45047     touch $tmpfile
45048     if test ! -f $tmpfile; then
45049       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45050     fi
45051 
45052   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45053   # $tmpfile is the local file name for the downloaded file.
45054   VALID_TOOL=no
45055   if test "x$BDEPS_FTP" = xwget; then
45056     VALID_TOOL=yes
45057     wget -O $tmpfile $with_builddeps_server/$resource
45058   fi
45059   if test "x$BDEPS_FTP" = xlftp; then
45060     VALID_TOOL=yes
45061     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45062   fi
45063   if test "x$BDEPS_FTP" = xftp; then
45064     VALID_TOOL=yes
45065     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45066     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45067     FTPUSERPWD=${FTPSERVER%%@*}
45068     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45069       FTPUSER=${userpwd%%:*}
45070       FTPPWD=${userpwd#*@}
45071       FTPSERVER=${FTPSERVER#*@}
45072     else
45073       FTPUSER=ftp
45074       FTPPWD=ftp
45075     fi
45076     # the "pass" command does not work on some
45077     # ftp clients (read ftp.exe) but if it works,
45078     # passive mode is better!
45079     ( \
45080         echo "user $FTPUSER $FTPPWD"        ; \
45081         echo "pass"                         ; \
45082         echo "bin"                          ; \
45083         echo "get $FTPPATH $tmpfile"              ; \
45084     ) | ftp -in $FTPSERVER
45085   fi
45086   if test "x$VALID_TOOL" != xyes; then
45087     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45088   fi
45089 
45090     mv $tmpfile $installdir/$filename
45091     if test ! -s $installdir/$filename; then
45092       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45093     fi
45094     case "$extension" in
45095       zip)  echo "Unzipping $installdir/$filename..."
45096         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45097         ;;
45098       tar.gz) echo "Untaring $installdir/$filename..."
45099         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45100         ;;
45101       tgz) echo "Untaring $installdir/$filename..."
45102         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45103         ;;
45104       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45105         ;;
45106     esac
45107   fi
45108   if test -f $installdir/$filename.unpacked; then
45109     depdir=$installdir
45110   fi
45111 
45112       fi
45113       # Source the builddeps file again, because in the previous command, the depdir
45114       # was updated to point at the current build dependency install directory.
45115       . $builddepsfile
45116       # Now extract variables from the builddeps.conf files.
45117       theroot=${builddep_freetype2_ROOT}
45118       thecflags=${builddep_freetype2_CFLAGS}
45119       thelibs=${builddep_freetype2_LIBS}
45120       if test "x$depdir" = x; then
45121         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45122       fi
45123       FREETYPE=$depdir
45124       if test "x$theroot" != x; then
45125         FREETYPE="$theroot"
45126       fi
45127       if test "x$thecflags" != x; then
45128         FREETYPE_CFLAGS="$thecflags"
45129       fi
45130       if test "x$thelibs" != x; then
45131         FREETYPE_LIBS="$thelibs"
45132       fi
45133       FOUND_FREETYPE=yes
45134       else FOUND_FREETYPE=no
45135 
45136     fi
45137     else FOUND_FREETYPE=no
45138 
45139   fi
45140 
45141         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45142         if test "x$FOUND_FREETYPE" = xyes; then
45143           if test "x$BUNDLE_FREETYPE" = xyes; then
45144             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45145 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45146             FOUND_FREETYPE=no
45147           else
45148             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45149 $as_echo_n "checking for freetype... " >&6; }
45150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45151 $as_echo "yes (using builddeps)" >&6; }
45152           fi
45153         fi
45154       fi
45155 
45156       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45157       if test "x$SYSROOT" = x; then
45158         if test "x$FOUND_FREETYPE" != xyes; then
45159           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45160           if test "x$PKG_CONFIG" != x; then
45161 
45162 pkg_failed=no
45163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45164 $as_echo_n "checking for FREETYPE... " >&6; }
45165 
45166 if test -n "$FREETYPE_CFLAGS"; then
45167     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45168  elif test -n "$PKG_CONFIG"; then
45169     if test -n "$PKG_CONFIG" && \
45170     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45171   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45172   ac_status=$?
45173   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45174   test $ac_status = 0; }; then
45175   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45176 else
45177   pkg_failed=yes
45178 fi
45179  else
45180     pkg_failed=untried
45181 fi
45182 if test -n "$FREETYPE_LIBS"; then
45183     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45184  elif test -n "$PKG_CONFIG"; then
45185     if test -n "$PKG_CONFIG" && \
45186     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45187   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45188   ac_status=$?
45189   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45190   test $ac_status = 0; }; then
45191   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45192 else
45193   pkg_failed=yes
45194 fi
45195  else
45196     pkg_failed=untried
45197 fi
45198 
45199 
45200 
45201 if test $pkg_failed = yes; then
45202 
45203 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45204         _pkg_short_errors_supported=yes
45205 else
45206         _pkg_short_errors_supported=no
45207 fi
45208         if test $_pkg_short_errors_supported = yes; then
45209                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45210         else
45211                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45212         fi
45213         # Put the nasty error message in config.log where it belongs
45214         echo "$FREETYPE_PKG_ERRORS" >&5
45215 
45216         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45217 $as_echo "no" >&6; }
45218                 FOUND_FREETYPE=no
45219 elif test $pkg_failed = untried; then
45220         FOUND_FREETYPE=no
45221 else
45222         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45223         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45225 $as_echo "yes" >&6; }
45226         FOUND_FREETYPE=yes
45227 fi
45228             if test "x$FOUND_FREETYPE" = xyes; then
45229               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45230               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45231               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45232               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45233                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45234               fi
45235               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45236               if test "x$BUNDLE_FREETYPE" = xyes; then
45237                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45238 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45239                 FOUND_FREETYPE=no
45240               else
45241                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45242 $as_echo_n "checking for freetype... " >&6; }
45243                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45244 $as_echo "yes (using pkg-config)" >&6; }
45245               fi
45246             fi
45247           fi
45248         fi
45249       fi
45250 
45251       if test "x$FOUND_FREETYPE" != xyes; then
45252         # Check in well-known locations
45253         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45254           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45255 
45256   windows_path="$FREETYPE_BASE_DIR"
45257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45258     unix_path=`$CYGPATH -u "$windows_path"`
45259     FREETYPE_BASE_DIR="$unix_path"
45260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45261     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45262     FREETYPE_BASE_DIR="$unix_path"
45263   fi
45264 
45265 
45266   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45267   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45268   METHOD="well-known location"
45269 
45270   # Let's start with an optimistic view of the world :-)
45271   FOUND_FREETYPE=yes
45272 
45273   # First look for the canonical freetype main include file ft2build.h.
45274   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45275     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45276     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45277     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45278       # Fail.
45279       FOUND_FREETYPE=no
45280     fi
45281   fi
45282 
45283   if test "x$FOUND_FREETYPE" = xyes; then
45284     # Include file found, let's continue the sanity check.
45285     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45286 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45287 
45288     # Reset to default value
45289     FREETYPE_BASE_NAME=freetype
45290     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45291     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45292       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45293           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45294         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45295         # for the .6 version explicitly.
45296         FREETYPE_BASE_NAME=freetype.6
45297         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45298         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45299 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45300       else
45301         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45302 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45303         FOUND_FREETYPE=no
45304       fi
45305     else
45306       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45307         # On Windows, we will need both .lib and .dll file.
45308         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45309           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45310 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45311           FOUND_FREETYPE=no
45312         fi
45313       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45314           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45315         # Found lib in isa dir, use that instead.
45316         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45317         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45318 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45319       fi
45320     fi
45321   fi
45322 
45323   if test "x$FOUND_FREETYPE" = xyes; then
45324 
45325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45326 
45327   # Input might be given as Windows format, start by converting to
45328   # unix format.
45329   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45330   new_path=`$CYGPATH -u "$path"`
45331 
45332   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45333   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45334   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45335   # "foo.exe" is OK but "foo" is an error.
45336   #
45337   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45338   # It is also a way to make sure we got the proper file name for the real test later on.
45339   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45340   if test "x$test_shortpath" = x; then
45341     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45342 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45343     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45344   fi
45345 
45346   # Call helper function which possibly converts this using DOS-style short mode.
45347   # If so, the updated path is stored in $new_path.
45348 
45349   input_path="$new_path"
45350   # Check if we need to convert this using DOS-style short mode. If the path
45351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45352   # take no chances and rewrite it.
45353   # Note: m4 eats our [], so we need to use [ and ] instead.
45354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45355   if test "x$has_forbidden_chars" != x; then
45356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45357     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45358     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45359     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45360       # Going to short mode and back again did indeed matter. Since short mode is
45361       # case insensitive, let's make it lowercase to improve readability.
45362       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45363       # Now convert it back to Unix-stile (cygpath)
45364       input_path=`$CYGPATH -u "$shortmode_path"`
45365       new_path="$input_path"
45366     fi
45367   fi
45368 
45369   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45370   if test "x$test_cygdrive_prefix" = x; then
45371     # As a simple fix, exclude /usr/bin since it's not a real path.
45372     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45373       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45374       # a path prefixed by /cygdrive for fixpath to work.
45375       new_path="$CYGWIN_ROOT_PATH$input_path"
45376     fi
45377   fi
45378 
45379 
45380   if test "x$path" != "x$new_path"; then
45381     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45383 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45384   fi
45385 
45386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45387 
45388   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45389   has_colon=`$ECHO $path | $GREP ^.:`
45390   new_path="$path"
45391   if test "x$has_colon" = x; then
45392     # Not in mixed or Windows style, start by that.
45393     new_path=`cmd //c echo $path`
45394   fi
45395 
45396 
45397   input_path="$new_path"
45398   # Check if we need to convert this using DOS-style short mode. If the path
45399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45400   # take no chances and rewrite it.
45401   # Note: m4 eats our [], so we need to use [ and ] instead.
45402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45403   if test "x$has_forbidden_chars" != x; then
45404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45405     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45406   fi
45407 
45408 
45409   windows_path="$new_path"
45410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45411     unix_path=`$CYGPATH -u "$windows_path"`
45412     new_path="$unix_path"
45413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45415     new_path="$unix_path"
45416   fi
45417 
45418   if test "x$path" != "x$new_path"; then
45419     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45421 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45422   fi
45423 
45424   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45425   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45426 
45427   else
45428     # We're on a unix platform. Hooray! :)
45429     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45430     has_space=`$ECHO "$path" | $GREP " "`
45431     if test "x$has_space" != x; then
45432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45433 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45434       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45435     fi
45436 
45437     # Use eval to expand a potential ~
45438     eval path="$path"
45439     if test ! -f "$path" && test ! -d "$path"; then
45440       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45441     fi
45442 
45443     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45444   fi
45445 
45446 
45447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45448 
45449   # Input might be given as Windows format, start by converting to
45450   # unix format.
45451   path="$POTENTIAL_FREETYPE_LIB_PATH"
45452   new_path=`$CYGPATH -u "$path"`
45453 
45454   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45455   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45456   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45457   # "foo.exe" is OK but "foo" is an error.
45458   #
45459   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45460   # It is also a way to make sure we got the proper file name for the real test later on.
45461   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45462   if test "x$test_shortpath" = x; then
45463     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45464 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45465     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45466   fi
45467 
45468   # Call helper function which possibly converts this using DOS-style short mode.
45469   # If so, the updated path is stored in $new_path.
45470 
45471   input_path="$new_path"
45472   # Check if we need to convert this using DOS-style short mode. If the path
45473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45474   # take no chances and rewrite it.
45475   # Note: m4 eats our [], so we need to use [ and ] instead.
45476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45477   if test "x$has_forbidden_chars" != x; then
45478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45479     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45480     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45481     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45482       # Going to short mode and back again did indeed matter. Since short mode is
45483       # case insensitive, let's make it lowercase to improve readability.
45484       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45485       # Now convert it back to Unix-stile (cygpath)
45486       input_path=`$CYGPATH -u "$shortmode_path"`
45487       new_path="$input_path"
45488     fi
45489   fi
45490 
45491   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45492   if test "x$test_cygdrive_prefix" = x; then
45493     # As a simple fix, exclude /usr/bin since it's not a real path.
45494     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45495       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45496       # a path prefixed by /cygdrive for fixpath to work.
45497       new_path="$CYGWIN_ROOT_PATH$input_path"
45498     fi
45499   fi
45500 
45501 
45502   if test "x$path" != "x$new_path"; then
45503     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45504     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45505 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45506   fi
45507 
45508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45509 
45510   path="$POTENTIAL_FREETYPE_LIB_PATH"
45511   has_colon=`$ECHO $path | $GREP ^.:`
45512   new_path="$path"
45513   if test "x$has_colon" = x; then
45514     # Not in mixed or Windows style, start by that.
45515     new_path=`cmd //c echo $path`
45516   fi
45517 
45518 
45519   input_path="$new_path"
45520   # Check if we need to convert this using DOS-style short mode. If the path
45521   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45522   # take no chances and rewrite it.
45523   # Note: m4 eats our [], so we need to use [ and ] instead.
45524   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45525   if test "x$has_forbidden_chars" != x; then
45526     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45527     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45528   fi
45529 
45530 
45531   windows_path="$new_path"
45532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45533     unix_path=`$CYGPATH -u "$windows_path"`
45534     new_path="$unix_path"
45535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45537     new_path="$unix_path"
45538   fi
45539 
45540   if test "x$path" != "x$new_path"; then
45541     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45542     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45543 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45544   fi
45545 
45546   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45547   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45548 
45549   else
45550     # We're on a unix platform. Hooray! :)
45551     path="$POTENTIAL_FREETYPE_LIB_PATH"
45552     has_space=`$ECHO "$path" | $GREP " "`
45553     if test "x$has_space" != x; then
45554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45555 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45556       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45557     fi
45558 
45559     # Use eval to expand a potential ~
45560     eval path="$path"
45561     if test ! -f "$path" && test ! -d "$path"; then
45562       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45563     fi
45564 
45565     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45566   fi
45567 
45568 
45569     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45571 $as_echo_n "checking for freetype includes... " >&6; }
45572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45573 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45574     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45576 $as_echo_n "checking for freetype libraries... " >&6; }
45577     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45578 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45579   fi
45580 
45581           if test "x$FOUND_FREETYPE" != xyes; then
45582             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45583 
45584   windows_path="$FREETYPE_BASE_DIR"
45585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45586     unix_path=`$CYGPATH -u "$windows_path"`
45587     FREETYPE_BASE_DIR="$unix_path"
45588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45590     FREETYPE_BASE_DIR="$unix_path"
45591   fi
45592 
45593 
45594   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45595   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45596   METHOD="well-known location"
45597 
45598   # Let's start with an optimistic view of the world :-)
45599   FOUND_FREETYPE=yes
45600 
45601   # First look for the canonical freetype main include file ft2build.h.
45602   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45603     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45604     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45605     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45606       # Fail.
45607       FOUND_FREETYPE=no
45608     fi
45609   fi
45610 
45611   if test "x$FOUND_FREETYPE" = xyes; then
45612     # Include file found, let's continue the sanity check.
45613     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45614 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45615 
45616     # Reset to default value
45617     FREETYPE_BASE_NAME=freetype
45618     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45619     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45620       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45621           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45622         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45623         # for the .6 version explicitly.
45624         FREETYPE_BASE_NAME=freetype.6
45625         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45626         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45627 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45628       else
45629         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45630 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45631         FOUND_FREETYPE=no
45632       fi
45633     else
45634       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45635         # On Windows, we will need both .lib and .dll file.
45636         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45637           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45638 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45639           FOUND_FREETYPE=no
45640         fi
45641       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45642           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45643         # Found lib in isa dir, use that instead.
45644         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45645         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45646 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45647       fi
45648     fi
45649   fi
45650 
45651   if test "x$FOUND_FREETYPE" = xyes; then
45652 
45653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45654 
45655   # Input might be given as Windows format, start by converting to
45656   # unix format.
45657   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45658   new_path=`$CYGPATH -u "$path"`
45659 
45660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45663   # "foo.exe" is OK but "foo" is an error.
45664   #
45665   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45666   # It is also a way to make sure we got the proper file name for the real test later on.
45667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45668   if test "x$test_shortpath" = x; then
45669     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45670 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45671     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45672   fi
45673 
45674   # Call helper function which possibly converts this using DOS-style short mode.
45675   # If so, the updated path is stored in $new_path.
45676 
45677   input_path="$new_path"
45678   # Check if we need to convert this using DOS-style short mode. If the path
45679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45680   # take no chances and rewrite it.
45681   # Note: m4 eats our [], so we need to use [ and ] instead.
45682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45683   if test "x$has_forbidden_chars" != x; then
45684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45688       # Going to short mode and back again did indeed matter. Since short mode is
45689       # case insensitive, let's make it lowercase to improve readability.
45690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45691       # Now convert it back to Unix-stile (cygpath)
45692       input_path=`$CYGPATH -u "$shortmode_path"`
45693       new_path="$input_path"
45694     fi
45695   fi
45696 
45697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45698   if test "x$test_cygdrive_prefix" = x; then
45699     # As a simple fix, exclude /usr/bin since it's not a real path.
45700     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45702       # a path prefixed by /cygdrive for fixpath to work.
45703       new_path="$CYGWIN_ROOT_PATH$input_path"
45704     fi
45705   fi
45706 
45707 
45708   if test "x$path" != "x$new_path"; then
45709     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45711 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45712   fi
45713 
45714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45715 
45716   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45717   has_colon=`$ECHO $path | $GREP ^.:`
45718   new_path="$path"
45719   if test "x$has_colon" = x; then
45720     # Not in mixed or Windows style, start by that.
45721     new_path=`cmd //c echo $path`
45722   fi
45723 
45724 
45725   input_path="$new_path"
45726   # Check if we need to convert this using DOS-style short mode. If the path
45727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45728   # take no chances and rewrite it.
45729   # Note: m4 eats our [], so we need to use [ and ] instead.
45730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45731   if test "x$has_forbidden_chars" != x; then
45732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45733     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45734   fi
45735 
45736 
45737   windows_path="$new_path"
45738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45739     unix_path=`$CYGPATH -u "$windows_path"`
45740     new_path="$unix_path"
45741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45743     new_path="$unix_path"
45744   fi
45745 
45746   if test "x$path" != "x$new_path"; then
45747     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45749 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45750   fi
45751 
45752   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45753   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45754 
45755   else
45756     # We're on a unix platform. Hooray! :)
45757     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45758     has_space=`$ECHO "$path" | $GREP " "`
45759     if test "x$has_space" != x; then
45760       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45761 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45762       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45763     fi
45764 
45765     # Use eval to expand a potential ~
45766     eval path="$path"
45767     if test ! -f "$path" && test ! -d "$path"; then
45768       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45769     fi
45770 
45771     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45772   fi
45773 
45774 
45775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45776 
45777   # Input might be given as Windows format, start by converting to
45778   # unix format.
45779   path="$POTENTIAL_FREETYPE_LIB_PATH"
45780   new_path=`$CYGPATH -u "$path"`
45781 
45782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45785   # "foo.exe" is OK but "foo" is an error.
45786   #
45787   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45788   # It is also a way to make sure we got the proper file name for the real test later on.
45789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45790   if test "x$test_shortpath" = x; then
45791     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45792 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45793     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45794   fi
45795 
45796   # Call helper function which possibly converts this using DOS-style short mode.
45797   # If so, the updated path is stored in $new_path.
45798 
45799   input_path="$new_path"
45800   # Check if we need to convert this using DOS-style short mode. If the path
45801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45802   # take no chances and rewrite it.
45803   # Note: m4 eats our [], so we need to use [ and ] instead.
45804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45805   if test "x$has_forbidden_chars" != x; then
45806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45810       # Going to short mode and back again did indeed matter. Since short mode is
45811       # case insensitive, let's make it lowercase to improve readability.
45812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45813       # Now convert it back to Unix-stile (cygpath)
45814       input_path=`$CYGPATH -u "$shortmode_path"`
45815       new_path="$input_path"
45816     fi
45817   fi
45818 
45819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45820   if test "x$test_cygdrive_prefix" = x; then
45821     # As a simple fix, exclude /usr/bin since it's not a real path.
45822     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45824       # a path prefixed by /cygdrive for fixpath to work.
45825       new_path="$CYGWIN_ROOT_PATH$input_path"
45826     fi
45827   fi
45828 
45829 
45830   if test "x$path" != "x$new_path"; then
45831     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45833 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45834   fi
45835 
45836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45837 
45838   path="$POTENTIAL_FREETYPE_LIB_PATH"
45839   has_colon=`$ECHO $path | $GREP ^.:`
45840   new_path="$path"
45841   if test "x$has_colon" = x; then
45842     # Not in mixed or Windows style, start by that.
45843     new_path=`cmd //c echo $path`
45844   fi
45845 
45846 
45847   input_path="$new_path"
45848   # Check if we need to convert this using DOS-style short mode. If the path
45849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45850   # take no chances and rewrite it.
45851   # Note: m4 eats our [], so we need to use [ and ] instead.
45852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45853   if test "x$has_forbidden_chars" != x; then
45854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45856   fi
45857 
45858 
45859   windows_path="$new_path"
45860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45861     unix_path=`$CYGPATH -u "$windows_path"`
45862     new_path="$unix_path"
45863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45865     new_path="$unix_path"
45866   fi
45867 
45868   if test "x$path" != "x$new_path"; then
45869     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45871 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45872   fi
45873 
45874   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45875   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45876 
45877   else
45878     # We're on a unix platform. Hooray! :)
45879     path="$POTENTIAL_FREETYPE_LIB_PATH"
45880     has_space=`$ECHO "$path" | $GREP " "`
45881     if test "x$has_space" != x; then
45882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45883 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45884       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45885     fi
45886 
45887     # Use eval to expand a potential ~
45888     eval path="$path"
45889     if test ! -f "$path" && test ! -d "$path"; then
45890       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45891     fi
45892 
45893     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45894   fi
45895 
45896 
45897     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45899 $as_echo_n "checking for freetype includes... " >&6; }
45900     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45901 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45902     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45904 $as_echo_n "checking for freetype libraries... " >&6; }
45905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45906 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45907   fi
45908 
45909           fi
45910         else
45911           FREETYPE_BASE_DIR="$SYSROOT/usr"
45912 
45913   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45914   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45915   METHOD="well-known location"
45916 
45917   # Let's start with an optimistic view of the world :-)
45918   FOUND_FREETYPE=yes
45919 
45920   # First look for the canonical freetype main include file ft2build.h.
45921   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45922     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45923     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45924     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45925       # Fail.
45926       FOUND_FREETYPE=no
45927     fi
45928   fi
45929 
45930   if test "x$FOUND_FREETYPE" = xyes; then
45931     # Include file found, let's continue the sanity check.
45932     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45933 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45934 
45935     # Reset to default value
45936     FREETYPE_BASE_NAME=freetype
45937     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45938     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45939       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45940           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45941         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45942         # for the .6 version explicitly.
45943         FREETYPE_BASE_NAME=freetype.6
45944         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45945         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45946 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45947       else
45948         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45949 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45950         FOUND_FREETYPE=no
45951       fi
45952     else
45953       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45954         # On Windows, we will need both .lib and .dll file.
45955         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45956           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45957 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45958           FOUND_FREETYPE=no
45959         fi
45960       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45961           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45962         # Found lib in isa dir, use that instead.
45963         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45964         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45965 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45966       fi
45967     fi
45968   fi
45969 
45970   if test "x$FOUND_FREETYPE" = xyes; then
45971 
45972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45973 
45974   # Input might be given as Windows format, start by converting to
45975   # unix format.
45976   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45977   new_path=`$CYGPATH -u "$path"`
45978 
45979   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45980   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45981   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45982   # "foo.exe" is OK but "foo" is an error.
45983   #
45984   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45985   # It is also a way to make sure we got the proper file name for the real test later on.
45986   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45987   if test "x$test_shortpath" = x; then
45988     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45989 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45990     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45991   fi
45992 
45993   # Call helper function which possibly converts this using DOS-style short mode.
45994   # If so, the updated path is stored in $new_path.
45995 
45996   input_path="$new_path"
45997   # Check if we need to convert this using DOS-style short mode. If the path
45998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45999   # take no chances and rewrite it.
46000   # Note: m4 eats our [], so we need to use [ and ] instead.
46001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46002   if test "x$has_forbidden_chars" != x; then
46003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46004     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46005     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46006     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46007       # Going to short mode and back again did indeed matter. Since short mode is
46008       # case insensitive, let's make it lowercase to improve readability.
46009       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46010       # Now convert it back to Unix-stile (cygpath)
46011       input_path=`$CYGPATH -u "$shortmode_path"`
46012       new_path="$input_path"
46013     fi
46014   fi
46015 
46016   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46017   if test "x$test_cygdrive_prefix" = x; then
46018     # As a simple fix, exclude /usr/bin since it's not a real path.
46019     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46020       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46021       # a path prefixed by /cygdrive for fixpath to work.
46022       new_path="$CYGWIN_ROOT_PATH$input_path"
46023     fi
46024   fi
46025 
46026 
46027   if test "x$path" != "x$new_path"; then
46028     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46030 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46031   fi
46032 
46033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46034 
46035   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46036   has_colon=`$ECHO $path | $GREP ^.:`
46037   new_path="$path"
46038   if test "x$has_colon" = x; then
46039     # Not in mixed or Windows style, start by that.
46040     new_path=`cmd //c echo $path`
46041   fi
46042 
46043 
46044   input_path="$new_path"
46045   # Check if we need to convert this using DOS-style short mode. If the path
46046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46047   # take no chances and rewrite it.
46048   # Note: m4 eats our [], so we need to use [ and ] instead.
46049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46050   if test "x$has_forbidden_chars" != x; then
46051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46052     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46053   fi
46054 
46055 
46056   windows_path="$new_path"
46057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46058     unix_path=`$CYGPATH -u "$windows_path"`
46059     new_path="$unix_path"
46060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46062     new_path="$unix_path"
46063   fi
46064 
46065   if test "x$path" != "x$new_path"; then
46066     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46068 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46069   fi
46070 
46071   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46072   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46073 
46074   else
46075     # We're on a unix platform. Hooray! :)
46076     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46077     has_space=`$ECHO "$path" | $GREP " "`
46078     if test "x$has_space" != x; then
46079       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46080 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46081       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46082     fi
46083 
46084     # Use eval to expand a potential ~
46085     eval path="$path"
46086     if test ! -f "$path" && test ! -d "$path"; then
46087       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46088     fi
46089 
46090     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46091   fi
46092 
46093 
46094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46095 
46096   # Input might be given as Windows format, start by converting to
46097   # unix format.
46098   path="$POTENTIAL_FREETYPE_LIB_PATH"
46099   new_path=`$CYGPATH -u "$path"`
46100 
46101   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46102   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46103   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46104   # "foo.exe" is OK but "foo" is an error.
46105   #
46106   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46107   # It is also a way to make sure we got the proper file name for the real test later on.
46108   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46109   if test "x$test_shortpath" = x; then
46110     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46111 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46112     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46113   fi
46114 
46115   # Call helper function which possibly converts this using DOS-style short mode.
46116   # If so, the updated path is stored in $new_path.
46117 
46118   input_path="$new_path"
46119   # Check if we need to convert this using DOS-style short mode. If the path
46120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46121   # take no chances and rewrite it.
46122   # Note: m4 eats our [], so we need to use [ and ] instead.
46123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46124   if test "x$has_forbidden_chars" != x; then
46125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46126     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46127     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46128     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46129       # Going to short mode and back again did indeed matter. Since short mode is
46130       # case insensitive, let's make it lowercase to improve readability.
46131       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46132       # Now convert it back to Unix-stile (cygpath)
46133       input_path=`$CYGPATH -u "$shortmode_path"`
46134       new_path="$input_path"
46135     fi
46136   fi
46137 
46138   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46139   if test "x$test_cygdrive_prefix" = x; then
46140     # As a simple fix, exclude /usr/bin since it's not a real path.
46141     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46142       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46143       # a path prefixed by /cygdrive for fixpath to work.
46144       new_path="$CYGWIN_ROOT_PATH$input_path"
46145     fi
46146   fi
46147 
46148 
46149   if test "x$path" != "x$new_path"; then
46150     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46151     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46152 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46153   fi
46154 
46155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46156 
46157   path="$POTENTIAL_FREETYPE_LIB_PATH"
46158   has_colon=`$ECHO $path | $GREP ^.:`
46159   new_path="$path"
46160   if test "x$has_colon" = x; then
46161     # Not in mixed or Windows style, start by that.
46162     new_path=`cmd //c echo $path`
46163   fi
46164 
46165 
46166   input_path="$new_path"
46167   # Check if we need to convert this using DOS-style short mode. If the path
46168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46169   # take no chances and rewrite it.
46170   # Note: m4 eats our [], so we need to use [ and ] instead.
46171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46172   if test "x$has_forbidden_chars" != x; then
46173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46174     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46175   fi
46176 
46177 
46178   windows_path="$new_path"
46179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46180     unix_path=`$CYGPATH -u "$windows_path"`
46181     new_path="$unix_path"
46182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46183     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46184     new_path="$unix_path"
46185   fi
46186 
46187   if test "x$path" != "x$new_path"; then
46188     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46189     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46190 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46191   fi
46192 
46193   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46194   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46195 
46196   else
46197     # We're on a unix platform. Hooray! :)
46198     path="$POTENTIAL_FREETYPE_LIB_PATH"
46199     has_space=`$ECHO "$path" | $GREP " "`
46200     if test "x$has_space" != x; then
46201       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46202 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46203       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46204     fi
46205 
46206     # Use eval to expand a potential ~
46207     eval path="$path"
46208     if test ! -f "$path" && test ! -d "$path"; then
46209       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46210     fi
46211 
46212     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46213   fi
46214 
46215 
46216     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46218 $as_echo_n "checking for freetype includes... " >&6; }
46219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46220 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46221     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46222     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46223 $as_echo_n "checking for freetype libraries... " >&6; }
46224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46225 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46226   fi
46227 
46228 
46229           if test "x$FOUND_FREETYPE" != xyes; then
46230             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46231 
46232   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46233   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46234   METHOD="well-known location"
46235 
46236   # Let's start with an optimistic view of the world :-)
46237   FOUND_FREETYPE=yes
46238 
46239   # First look for the canonical freetype main include file ft2build.h.
46240   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46241     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46242     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46243     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46244       # Fail.
46245       FOUND_FREETYPE=no
46246     fi
46247   fi
46248 
46249   if test "x$FOUND_FREETYPE" = xyes; then
46250     # Include file found, let's continue the sanity check.
46251     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46252 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46253 
46254     # Reset to default value
46255     FREETYPE_BASE_NAME=freetype
46256     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46257     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46258       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46259           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46260         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46261         # for the .6 version explicitly.
46262         FREETYPE_BASE_NAME=freetype.6
46263         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46264         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46265 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46266       else
46267         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46268 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46269         FOUND_FREETYPE=no
46270       fi
46271     else
46272       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46273         # On Windows, we will need both .lib and .dll file.
46274         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46275           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46276 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46277           FOUND_FREETYPE=no
46278         fi
46279       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46280           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46281         # Found lib in isa dir, use that instead.
46282         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46283         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46284 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46285       fi
46286     fi
46287   fi
46288 
46289   if test "x$FOUND_FREETYPE" = xyes; then
46290 
46291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46292 
46293   # Input might be given as Windows format, start by converting to
46294   # unix format.
46295   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46296   new_path=`$CYGPATH -u "$path"`
46297 
46298   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46299   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46300   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46301   # "foo.exe" is OK but "foo" is an error.
46302   #
46303   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46304   # It is also a way to make sure we got the proper file name for the real test later on.
46305   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46306   if test "x$test_shortpath" = x; then
46307     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46308 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46309     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46310   fi
46311 
46312   # Call helper function which possibly converts this using DOS-style short mode.
46313   # If so, the updated path is stored in $new_path.
46314 
46315   input_path="$new_path"
46316   # Check if we need to convert this using DOS-style short mode. If the path
46317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46318   # take no chances and rewrite it.
46319   # Note: m4 eats our [], so we need to use [ and ] instead.
46320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46321   if test "x$has_forbidden_chars" != x; then
46322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46323     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46324     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46325     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46326       # Going to short mode and back again did indeed matter. Since short mode is
46327       # case insensitive, let's make it lowercase to improve readability.
46328       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46329       # Now convert it back to Unix-stile (cygpath)
46330       input_path=`$CYGPATH -u "$shortmode_path"`
46331       new_path="$input_path"
46332     fi
46333   fi
46334 
46335   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46336   if test "x$test_cygdrive_prefix" = x; then
46337     # As a simple fix, exclude /usr/bin since it's not a real path.
46338     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46339       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46340       # a path prefixed by /cygdrive for fixpath to work.
46341       new_path="$CYGWIN_ROOT_PATH$input_path"
46342     fi
46343   fi
46344 
46345 
46346   if test "x$path" != "x$new_path"; then
46347     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46349 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46350   fi
46351 
46352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46353 
46354   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46355   has_colon=`$ECHO $path | $GREP ^.:`
46356   new_path="$path"
46357   if test "x$has_colon" = x; then
46358     # Not in mixed or Windows style, start by that.
46359     new_path=`cmd //c echo $path`
46360   fi
46361 
46362 
46363   input_path="$new_path"
46364   # Check if we need to convert this using DOS-style short mode. If the path
46365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46366   # take no chances and rewrite it.
46367   # Note: m4 eats our [], so we need to use [ and ] instead.
46368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46369   if test "x$has_forbidden_chars" != x; then
46370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46372   fi
46373 
46374 
46375   windows_path="$new_path"
46376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46377     unix_path=`$CYGPATH -u "$windows_path"`
46378     new_path="$unix_path"
46379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46381     new_path="$unix_path"
46382   fi
46383 
46384   if test "x$path" != "x$new_path"; then
46385     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46387 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46388   fi
46389 
46390   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46391   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46392 
46393   else
46394     # We're on a unix platform. Hooray! :)
46395     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46396     has_space=`$ECHO "$path" | $GREP " "`
46397     if test "x$has_space" != x; then
46398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46399 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46400       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46401     fi
46402 
46403     # Use eval to expand a potential ~
46404     eval path="$path"
46405     if test ! -f "$path" && test ! -d "$path"; then
46406       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46407     fi
46408 
46409     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46410   fi
46411 
46412 
46413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46414 
46415   # Input might be given as Windows format, start by converting to
46416   # unix format.
46417   path="$POTENTIAL_FREETYPE_LIB_PATH"
46418   new_path=`$CYGPATH -u "$path"`
46419 
46420   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46421   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46422   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46423   # "foo.exe" is OK but "foo" is an error.
46424   #
46425   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46426   # It is also a way to make sure we got the proper file name for the real test later on.
46427   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46428   if test "x$test_shortpath" = x; then
46429     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46430 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46431     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46432   fi
46433 
46434   # Call helper function which possibly converts this using DOS-style short mode.
46435   # If so, the updated path is stored in $new_path.
46436 
46437   input_path="$new_path"
46438   # Check if we need to convert this using DOS-style short mode. If the path
46439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46440   # take no chances and rewrite it.
46441   # Note: m4 eats our [], so we need to use [ and ] instead.
46442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46443   if test "x$has_forbidden_chars" != x; then
46444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46445     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46446     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46447     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46448       # Going to short mode and back again did indeed matter. Since short mode is
46449       # case insensitive, let's make it lowercase to improve readability.
46450       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46451       # Now convert it back to Unix-stile (cygpath)
46452       input_path=`$CYGPATH -u "$shortmode_path"`
46453       new_path="$input_path"
46454     fi
46455   fi
46456 
46457   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46458   if test "x$test_cygdrive_prefix" = x; then
46459     # As a simple fix, exclude /usr/bin since it's not a real path.
46460     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46461       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46462       # a path prefixed by /cygdrive for fixpath to work.
46463       new_path="$CYGWIN_ROOT_PATH$input_path"
46464     fi
46465   fi
46466 
46467 
46468   if test "x$path" != "x$new_path"; then
46469     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46470     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46471 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46472   fi
46473 
46474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46475 
46476   path="$POTENTIAL_FREETYPE_LIB_PATH"
46477   has_colon=`$ECHO $path | $GREP ^.:`
46478   new_path="$path"
46479   if test "x$has_colon" = x; then
46480     # Not in mixed or Windows style, start by that.
46481     new_path=`cmd //c echo $path`
46482   fi
46483 
46484 
46485   input_path="$new_path"
46486   # Check if we need to convert this using DOS-style short mode. If the path
46487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46488   # take no chances and rewrite it.
46489   # Note: m4 eats our [], so we need to use [ and ] instead.
46490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46491   if test "x$has_forbidden_chars" != x; then
46492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46493     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46494   fi
46495 
46496 
46497   windows_path="$new_path"
46498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46499     unix_path=`$CYGPATH -u "$windows_path"`
46500     new_path="$unix_path"
46501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46503     new_path="$unix_path"
46504   fi
46505 
46506   if test "x$path" != "x$new_path"; then
46507     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46509 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46510   fi
46511 
46512   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46513   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46514 
46515   else
46516     # We're on a unix platform. Hooray! :)
46517     path="$POTENTIAL_FREETYPE_LIB_PATH"
46518     has_space=`$ECHO "$path" | $GREP " "`
46519     if test "x$has_space" != x; then
46520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46521 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46522       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46523     fi
46524 
46525     # Use eval to expand a potential ~
46526     eval path="$path"
46527     if test ! -f "$path" && test ! -d "$path"; then
46528       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46529     fi
46530 
46531     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46532   fi
46533 
46534 
46535     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46536     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46537 $as_echo_n "checking for freetype includes... " >&6; }
46538     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46539 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46540     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46541     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46542 $as_echo_n "checking for freetype libraries... " >&6; }
46543     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46544 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46545   fi
46546 
46547           fi
46548 
46549           if test "x$FOUND_FREETYPE" != xyes; then
46550             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46551 
46552   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46553   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46554   METHOD="well-known location"
46555 
46556   # Let's start with an optimistic view of the world :-)
46557   FOUND_FREETYPE=yes
46558 
46559   # First look for the canonical freetype main include file ft2build.h.
46560   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46561     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46562     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46563     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46564       # Fail.
46565       FOUND_FREETYPE=no
46566     fi
46567   fi
46568 
46569   if test "x$FOUND_FREETYPE" = xyes; then
46570     # Include file found, let's continue the sanity check.
46571     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46572 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46573 
46574     # Reset to default value
46575     FREETYPE_BASE_NAME=freetype
46576     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46577     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46578       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46579           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46580         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46581         # for the .6 version explicitly.
46582         FREETYPE_BASE_NAME=freetype.6
46583         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46584         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46585 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46586       else
46587         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46588 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46589         FOUND_FREETYPE=no
46590       fi
46591     else
46592       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46593         # On Windows, we will need both .lib and .dll file.
46594         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46595           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46596 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46597           FOUND_FREETYPE=no
46598         fi
46599       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46600           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46601         # Found lib in isa dir, use that instead.
46602         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46603         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46604 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46605       fi
46606     fi
46607   fi
46608 
46609   if test "x$FOUND_FREETYPE" = xyes; then
46610 
46611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46612 
46613   # Input might be given as Windows format, start by converting to
46614   # unix format.
46615   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46616   new_path=`$CYGPATH -u "$path"`
46617 
46618   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46619   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46620   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46621   # "foo.exe" is OK but "foo" is an error.
46622   #
46623   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46624   # It is also a way to make sure we got the proper file name for the real test later on.
46625   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46626   if test "x$test_shortpath" = x; then
46627     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46628 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46629     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46630   fi
46631 
46632   # Call helper function which possibly converts this using DOS-style short mode.
46633   # If so, the updated path is stored in $new_path.
46634 
46635   input_path="$new_path"
46636   # Check if we need to convert this using DOS-style short mode. If the path
46637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46638   # take no chances and rewrite it.
46639   # Note: m4 eats our [], so we need to use [ and ] instead.
46640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46641   if test "x$has_forbidden_chars" != x; then
46642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46643     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46644     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46645     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46646       # Going to short mode and back again did indeed matter. Since short mode is
46647       # case insensitive, let's make it lowercase to improve readability.
46648       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46649       # Now convert it back to Unix-stile (cygpath)
46650       input_path=`$CYGPATH -u "$shortmode_path"`
46651       new_path="$input_path"
46652     fi
46653   fi
46654 
46655   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46656   if test "x$test_cygdrive_prefix" = x; then
46657     # As a simple fix, exclude /usr/bin since it's not a real path.
46658     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46659       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46660       # a path prefixed by /cygdrive for fixpath to work.
46661       new_path="$CYGWIN_ROOT_PATH$input_path"
46662     fi
46663   fi
46664 
46665 
46666   if test "x$path" != "x$new_path"; then
46667     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46668     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46669 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46670   fi
46671 
46672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46673 
46674   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46675   has_colon=`$ECHO $path | $GREP ^.:`
46676   new_path="$path"
46677   if test "x$has_colon" = x; then
46678     # Not in mixed or Windows style, start by that.
46679     new_path=`cmd //c echo $path`
46680   fi
46681 
46682 
46683   input_path="$new_path"
46684   # Check if we need to convert this using DOS-style short mode. If the path
46685   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46686   # take no chances and rewrite it.
46687   # Note: m4 eats our [], so we need to use [ and ] instead.
46688   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46689   if test "x$has_forbidden_chars" != x; then
46690     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46691     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46692   fi
46693 
46694 
46695   windows_path="$new_path"
46696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46697     unix_path=`$CYGPATH -u "$windows_path"`
46698     new_path="$unix_path"
46699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46701     new_path="$unix_path"
46702   fi
46703 
46704   if test "x$path" != "x$new_path"; then
46705     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46706     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46707 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46708   fi
46709 
46710   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46711   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46712 
46713   else
46714     # We're on a unix platform. Hooray! :)
46715     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46716     has_space=`$ECHO "$path" | $GREP " "`
46717     if test "x$has_space" != x; then
46718       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46719 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46720       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46721     fi
46722 
46723     # Use eval to expand a potential ~
46724     eval path="$path"
46725     if test ! -f "$path" && test ! -d "$path"; then
46726       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46727     fi
46728 
46729     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46730   fi
46731 
46732 
46733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46734 
46735   # Input might be given as Windows format, start by converting to
46736   # unix format.
46737   path="$POTENTIAL_FREETYPE_LIB_PATH"
46738   new_path=`$CYGPATH -u "$path"`
46739 
46740   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46741   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46742   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46743   # "foo.exe" is OK but "foo" is an error.
46744   #
46745   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46746   # It is also a way to make sure we got the proper file name for the real test later on.
46747   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46748   if test "x$test_shortpath" = x; then
46749     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46750 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46751     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46752   fi
46753 
46754   # Call helper function which possibly converts this using DOS-style short mode.
46755   # If so, the updated path is stored in $new_path.
46756 
46757   input_path="$new_path"
46758   # Check if we need to convert this using DOS-style short mode. If the path
46759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46760   # take no chances and rewrite it.
46761   # Note: m4 eats our [], so we need to use [ and ] instead.
46762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46763   if test "x$has_forbidden_chars" != x; then
46764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46765     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46766     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46767     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46768       # Going to short mode and back again did indeed matter. Since short mode is
46769       # case insensitive, let's make it lowercase to improve readability.
46770       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46771       # Now convert it back to Unix-stile (cygpath)
46772       input_path=`$CYGPATH -u "$shortmode_path"`
46773       new_path="$input_path"
46774     fi
46775   fi
46776 
46777   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46778   if test "x$test_cygdrive_prefix" = x; then
46779     # As a simple fix, exclude /usr/bin since it's not a real path.
46780     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46781       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46782       # a path prefixed by /cygdrive for fixpath to work.
46783       new_path="$CYGWIN_ROOT_PATH$input_path"
46784     fi
46785   fi
46786 
46787 
46788   if test "x$path" != "x$new_path"; then
46789     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46791 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46792   fi
46793 
46794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46795 
46796   path="$POTENTIAL_FREETYPE_LIB_PATH"
46797   has_colon=`$ECHO $path | $GREP ^.:`
46798   new_path="$path"
46799   if test "x$has_colon" = x; then
46800     # Not in mixed or Windows style, start by that.
46801     new_path=`cmd //c echo $path`
46802   fi
46803 
46804 
46805   input_path="$new_path"
46806   # Check if we need to convert this using DOS-style short mode. If the path
46807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46808   # take no chances and rewrite it.
46809   # Note: m4 eats our [], so we need to use [ and ] instead.
46810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46811   if test "x$has_forbidden_chars" != x; then
46812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46813     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46814   fi
46815 
46816 
46817   windows_path="$new_path"
46818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46819     unix_path=`$CYGPATH -u "$windows_path"`
46820     new_path="$unix_path"
46821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46823     new_path="$unix_path"
46824   fi
46825 
46826   if test "x$path" != "x$new_path"; then
46827     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46829 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46830   fi
46831 
46832   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46833   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46834 
46835   else
46836     # We're on a unix platform. Hooray! :)
46837     path="$POTENTIAL_FREETYPE_LIB_PATH"
46838     has_space=`$ECHO "$path" | $GREP " "`
46839     if test "x$has_space" != x; then
46840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46841 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46842       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46843     fi
46844 
46845     # Use eval to expand a potential ~
46846     eval path="$path"
46847     if test ! -f "$path" && test ! -d "$path"; then
46848       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46849     fi
46850 
46851     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46852   fi
46853 
46854 
46855     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46857 $as_echo_n "checking for freetype includes... " >&6; }
46858     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46859 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46860     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46861     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46862 $as_echo_n "checking for freetype libraries... " >&6; }
46863     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46864 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46865   fi
46866 
46867           fi
46868 
46869           if test "x$FOUND_FREETYPE" != xyes; then
46870             FREETYPE_BASE_DIR="$SYSROOT/usr"
46871             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46872 
46873   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46874   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46875   METHOD="well-known location"
46876 
46877   # Let's start with an optimistic view of the world :-)
46878   FOUND_FREETYPE=yes
46879 
46880   # First look for the canonical freetype main include file ft2build.h.
46881   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46882     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46883     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46884     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46885       # Fail.
46886       FOUND_FREETYPE=no
46887     fi
46888   fi
46889 
46890   if test "x$FOUND_FREETYPE" = xyes; then
46891     # Include file found, let's continue the sanity check.
46892     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46893 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46894 
46895     # Reset to default value
46896     FREETYPE_BASE_NAME=freetype
46897     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46898     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46899       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46900           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46901         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46902         # for the .6 version explicitly.
46903         FREETYPE_BASE_NAME=freetype.6
46904         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46905         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46906 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46907       else
46908         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46909 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46910         FOUND_FREETYPE=no
46911       fi
46912     else
46913       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46914         # On Windows, we will need both .lib and .dll file.
46915         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46916           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46917 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46918           FOUND_FREETYPE=no
46919         fi
46920       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46921           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46922         # Found lib in isa dir, use that instead.
46923         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46924         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46925 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46926       fi
46927     fi
46928   fi
46929 
46930   if test "x$FOUND_FREETYPE" = xyes; then
46931 
46932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46933 
46934   # Input might be given as Windows format, start by converting to
46935   # unix format.
46936   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46937   new_path=`$CYGPATH -u "$path"`
46938 
46939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46942   # "foo.exe" is OK but "foo" is an error.
46943   #
46944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46945   # It is also a way to make sure we got the proper file name for the real test later on.
46946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46947   if test "x$test_shortpath" = x; then
46948     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46949 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46950     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46951   fi
46952 
46953   # Call helper function which possibly converts this using DOS-style short mode.
46954   # If so, the updated path is stored in $new_path.
46955 
46956   input_path="$new_path"
46957   # Check if we need to convert this using DOS-style short mode. If the path
46958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46959   # take no chances and rewrite it.
46960   # Note: m4 eats our [], so we need to use [ and ] instead.
46961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46962   if test "x$has_forbidden_chars" != x; then
46963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46967       # Going to short mode and back again did indeed matter. Since short mode is
46968       # case insensitive, let's make it lowercase to improve readability.
46969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46970       # Now convert it back to Unix-stile (cygpath)
46971       input_path=`$CYGPATH -u "$shortmode_path"`
46972       new_path="$input_path"
46973     fi
46974   fi
46975 
46976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46977   if test "x$test_cygdrive_prefix" = x; then
46978     # As a simple fix, exclude /usr/bin since it's not a real path.
46979     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46981       # a path prefixed by /cygdrive for fixpath to work.
46982       new_path="$CYGWIN_ROOT_PATH$input_path"
46983     fi
46984   fi
46985 
46986 
46987   if test "x$path" != "x$new_path"; then
46988     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46990 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46991   fi
46992 
46993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46994 
46995   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46996   has_colon=`$ECHO $path | $GREP ^.:`
46997   new_path="$path"
46998   if test "x$has_colon" = x; then
46999     # Not in mixed or Windows style, start by that.
47000     new_path=`cmd //c echo $path`
47001   fi
47002 
47003 
47004   input_path="$new_path"
47005   # Check if we need to convert this using DOS-style short mode. If the path
47006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47007   # take no chances and rewrite it.
47008   # Note: m4 eats our [], so we need to use [ and ] instead.
47009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47010   if test "x$has_forbidden_chars" != x; then
47011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47013   fi
47014 
47015 
47016   windows_path="$new_path"
47017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47018     unix_path=`$CYGPATH -u "$windows_path"`
47019     new_path="$unix_path"
47020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47022     new_path="$unix_path"
47023   fi
47024 
47025   if test "x$path" != "x$new_path"; then
47026     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47028 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47029   fi
47030 
47031   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47032   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47033 
47034   else
47035     # We're on a unix platform. Hooray! :)
47036     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47037     has_space=`$ECHO "$path" | $GREP " "`
47038     if test "x$has_space" != x; then
47039       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47040 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47041       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47042     fi
47043 
47044     # Use eval to expand a potential ~
47045     eval path="$path"
47046     if test ! -f "$path" && test ! -d "$path"; then
47047       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47048     fi
47049 
47050     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47051   fi
47052 
47053 
47054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47055 
47056   # Input might be given as Windows format, start by converting to
47057   # unix format.
47058   path="$POTENTIAL_FREETYPE_LIB_PATH"
47059   new_path=`$CYGPATH -u "$path"`
47060 
47061   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47062   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47063   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47064   # "foo.exe" is OK but "foo" is an error.
47065   #
47066   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47067   # It is also a way to make sure we got the proper file name for the real test later on.
47068   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47069   if test "x$test_shortpath" = x; then
47070     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47071 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47072     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47073   fi
47074 
47075   # Call helper function which possibly converts this using DOS-style short mode.
47076   # If so, the updated path is stored in $new_path.
47077 
47078   input_path="$new_path"
47079   # Check if we need to convert this using DOS-style short mode. If the path
47080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47081   # take no chances and rewrite it.
47082   # Note: m4 eats our [], so we need to use [ and ] instead.
47083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47084   if test "x$has_forbidden_chars" != x; then
47085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47086     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47087     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47088     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47089       # Going to short mode and back again did indeed matter. Since short mode is
47090       # case insensitive, let's make it lowercase to improve readability.
47091       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47092       # Now convert it back to Unix-stile (cygpath)
47093       input_path=`$CYGPATH -u "$shortmode_path"`
47094       new_path="$input_path"
47095     fi
47096   fi
47097 
47098   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47099   if test "x$test_cygdrive_prefix" = x; then
47100     # As a simple fix, exclude /usr/bin since it's not a real path.
47101     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47102       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47103       # a path prefixed by /cygdrive for fixpath to work.
47104       new_path="$CYGWIN_ROOT_PATH$input_path"
47105     fi
47106   fi
47107 
47108 
47109   if test "x$path" != "x$new_path"; then
47110     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47112 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47113   fi
47114 
47115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47116 
47117   path="$POTENTIAL_FREETYPE_LIB_PATH"
47118   has_colon=`$ECHO $path | $GREP ^.:`
47119   new_path="$path"
47120   if test "x$has_colon" = x; then
47121     # Not in mixed or Windows style, start by that.
47122     new_path=`cmd //c echo $path`
47123   fi
47124 
47125 
47126   input_path="$new_path"
47127   # Check if we need to convert this using DOS-style short mode. If the path
47128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47129   # take no chances and rewrite it.
47130   # Note: m4 eats our [], so we need to use [ and ] instead.
47131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47132   if test "x$has_forbidden_chars" != x; then
47133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47134     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47135   fi
47136 
47137 
47138   windows_path="$new_path"
47139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47140     unix_path=`$CYGPATH -u "$windows_path"`
47141     new_path="$unix_path"
47142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47144     new_path="$unix_path"
47145   fi
47146 
47147   if test "x$path" != "x$new_path"; then
47148     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47149     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47150 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47151   fi
47152 
47153   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47154   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47155 
47156   else
47157     # We're on a unix platform. Hooray! :)
47158     path="$POTENTIAL_FREETYPE_LIB_PATH"
47159     has_space=`$ECHO "$path" | $GREP " "`
47160     if test "x$has_space" != x; then
47161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47162 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47163       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47164     fi
47165 
47166     # Use eval to expand a potential ~
47167     eval path="$path"
47168     if test ! -f "$path" && test ! -d "$path"; then
47169       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47170     fi
47171 
47172     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47173   fi
47174 
47175 
47176     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47177     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47178 $as_echo_n "checking for freetype includes... " >&6; }
47179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47180 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47181     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47182     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47183 $as_echo_n "checking for freetype libraries... " >&6; }
47184     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47185 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47186   fi
47187 
47188             else
47189 
47190   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47191   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47192   METHOD="well-known location"
47193 
47194   # Let's start with an optimistic view of the world :-)
47195   FOUND_FREETYPE=yes
47196 
47197   # First look for the canonical freetype main include file ft2build.h.
47198   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47199     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47200     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47201     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47202       # Fail.
47203       FOUND_FREETYPE=no
47204     fi
47205   fi
47206 
47207   if test "x$FOUND_FREETYPE" = xyes; then
47208     # Include file found, let's continue the sanity check.
47209     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47210 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47211 
47212     # Reset to default value
47213     FREETYPE_BASE_NAME=freetype
47214     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47215     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47216       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47217           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47218         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47219         # for the .6 version explicitly.
47220         FREETYPE_BASE_NAME=freetype.6
47221         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47222         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47223 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47224       else
47225         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47226 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47227         FOUND_FREETYPE=no
47228       fi
47229     else
47230       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47231         # On Windows, we will need both .lib and .dll file.
47232         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47233           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47234 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47235           FOUND_FREETYPE=no
47236         fi
47237       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47238           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47239         # Found lib in isa dir, use that instead.
47240         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47241         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47242 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47243       fi
47244     fi
47245   fi
47246 
47247   if test "x$FOUND_FREETYPE" = xyes; then
47248 
47249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47250 
47251   # Input might be given as Windows format, start by converting to
47252   # unix format.
47253   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47254   new_path=`$CYGPATH -u "$path"`
47255 
47256   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47257   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47258   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47259   # "foo.exe" is OK but "foo" is an error.
47260   #
47261   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47262   # It is also a way to make sure we got the proper file name for the real test later on.
47263   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47264   if test "x$test_shortpath" = x; then
47265     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47266 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47267     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47268   fi
47269 
47270   # Call helper function which possibly converts this using DOS-style short mode.
47271   # If so, the updated path is stored in $new_path.
47272 
47273   input_path="$new_path"
47274   # Check if we need to convert this using DOS-style short mode. If the path
47275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47276   # take no chances and rewrite it.
47277   # Note: m4 eats our [], so we need to use [ and ] instead.
47278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47279   if test "x$has_forbidden_chars" != x; then
47280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47281     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47282     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47283     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47284       # Going to short mode and back again did indeed matter. Since short mode is
47285       # case insensitive, let's make it lowercase to improve readability.
47286       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47287       # Now convert it back to Unix-stile (cygpath)
47288       input_path=`$CYGPATH -u "$shortmode_path"`
47289       new_path="$input_path"
47290     fi
47291   fi
47292 
47293   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47294   if test "x$test_cygdrive_prefix" = x; then
47295     # As a simple fix, exclude /usr/bin since it's not a real path.
47296     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47297       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47298       # a path prefixed by /cygdrive for fixpath to work.
47299       new_path="$CYGWIN_ROOT_PATH$input_path"
47300     fi
47301   fi
47302 
47303 
47304   if test "x$path" != "x$new_path"; then
47305     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47307 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47308   fi
47309 
47310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47311 
47312   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47313   has_colon=`$ECHO $path | $GREP ^.:`
47314   new_path="$path"
47315   if test "x$has_colon" = x; then
47316     # Not in mixed or Windows style, start by that.
47317     new_path=`cmd //c echo $path`
47318   fi
47319 
47320 
47321   input_path="$new_path"
47322   # Check if we need to convert this using DOS-style short mode. If the path
47323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47324   # take no chances and rewrite it.
47325   # Note: m4 eats our [], so we need to use [ and ] instead.
47326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47327   if test "x$has_forbidden_chars" != x; then
47328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47330   fi
47331 
47332 
47333   windows_path="$new_path"
47334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47335     unix_path=`$CYGPATH -u "$windows_path"`
47336     new_path="$unix_path"
47337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47339     new_path="$unix_path"
47340   fi
47341 
47342   if test "x$path" != "x$new_path"; then
47343     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47345 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47346   fi
47347 
47348   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47349   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47350 
47351   else
47352     # We're on a unix platform. Hooray! :)
47353     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47354     has_space=`$ECHO "$path" | $GREP " "`
47355     if test "x$has_space" != x; then
47356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47357 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47358       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47359     fi
47360 
47361     # Use eval to expand a potential ~
47362     eval path="$path"
47363     if test ! -f "$path" && test ! -d "$path"; then
47364       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47365     fi
47366 
47367     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47368   fi
47369 
47370 
47371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47372 
47373   # Input might be given as Windows format, start by converting to
47374   # unix format.
47375   path="$POTENTIAL_FREETYPE_LIB_PATH"
47376   new_path=`$CYGPATH -u "$path"`
47377 
47378   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47379   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47380   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47381   # "foo.exe" is OK but "foo" is an error.
47382   #
47383   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47384   # It is also a way to make sure we got the proper file name for the real test later on.
47385   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47386   if test "x$test_shortpath" = x; then
47387     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47388 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47389     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47390   fi
47391 
47392   # Call helper function which possibly converts this using DOS-style short mode.
47393   # If so, the updated path is stored in $new_path.
47394 
47395   input_path="$new_path"
47396   # Check if we need to convert this using DOS-style short mode. If the path
47397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47398   # take no chances and rewrite it.
47399   # Note: m4 eats our [], so we need to use [ and ] instead.
47400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47401   if test "x$has_forbidden_chars" != x; then
47402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47403     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47404     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47405     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47406       # Going to short mode and back again did indeed matter. Since short mode is
47407       # case insensitive, let's make it lowercase to improve readability.
47408       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47409       # Now convert it back to Unix-stile (cygpath)
47410       input_path=`$CYGPATH -u "$shortmode_path"`
47411       new_path="$input_path"
47412     fi
47413   fi
47414 
47415   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47416   if test "x$test_cygdrive_prefix" = x; then
47417     # As a simple fix, exclude /usr/bin since it's not a real path.
47418     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47419       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47420       # a path prefixed by /cygdrive for fixpath to work.
47421       new_path="$CYGWIN_ROOT_PATH$input_path"
47422     fi
47423   fi
47424 
47425 
47426   if test "x$path" != "x$new_path"; then
47427     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47428     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47429 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47430   fi
47431 
47432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47433 
47434   path="$POTENTIAL_FREETYPE_LIB_PATH"
47435   has_colon=`$ECHO $path | $GREP ^.:`
47436   new_path="$path"
47437   if test "x$has_colon" = x; then
47438     # Not in mixed or Windows style, start by that.
47439     new_path=`cmd //c echo $path`
47440   fi
47441 
47442 
47443   input_path="$new_path"
47444   # Check if we need to convert this using DOS-style short mode. If the path
47445   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47446   # take no chances and rewrite it.
47447   # Note: m4 eats our [], so we need to use [ and ] instead.
47448   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47449   if test "x$has_forbidden_chars" != x; then
47450     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47451     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47452   fi
47453 
47454 
47455   windows_path="$new_path"
47456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47457     unix_path=`$CYGPATH -u "$windows_path"`
47458     new_path="$unix_path"
47459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47461     new_path="$unix_path"
47462   fi
47463 
47464   if test "x$path" != "x$new_path"; then
47465     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47466     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47467 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47468   fi
47469 
47470   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47471   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47472 
47473   else
47474     # We're on a unix platform. Hooray! :)
47475     path="$POTENTIAL_FREETYPE_LIB_PATH"
47476     has_space=`$ECHO "$path" | $GREP " "`
47477     if test "x$has_space" != x; then
47478       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47479 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47480       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47481     fi
47482 
47483     # Use eval to expand a potential ~
47484     eval path="$path"
47485     if test ! -f "$path" && test ! -d "$path"; then
47486       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47487     fi
47488 
47489     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47490   fi
47491 
47492 
47493     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47495 $as_echo_n "checking for freetype includes... " >&6; }
47496     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47497 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47498     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47499     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47500 $as_echo_n "checking for freetype libraries... " >&6; }
47501     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47502 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47503   fi
47504 
47505               if test "x$FOUND_FREETYPE" != xyes; then
47506 
47507   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47508   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47509   METHOD="well-known location"
47510 
47511   # Let's start with an optimistic view of the world :-)
47512   FOUND_FREETYPE=yes
47513 
47514   # First look for the canonical freetype main include file ft2build.h.
47515   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47516     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47517     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47518     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47519       # Fail.
47520       FOUND_FREETYPE=no
47521     fi
47522   fi
47523 
47524   if test "x$FOUND_FREETYPE" = xyes; then
47525     # Include file found, let's continue the sanity check.
47526     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47527 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47528 
47529     # Reset to default value
47530     FREETYPE_BASE_NAME=freetype
47531     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47532     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47533       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47534           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47535         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47536         # for the .6 version explicitly.
47537         FREETYPE_BASE_NAME=freetype.6
47538         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47539         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47540 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47541       else
47542         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47543 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47544         FOUND_FREETYPE=no
47545       fi
47546     else
47547       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47548         # On Windows, we will need both .lib and .dll file.
47549         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47550           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47551 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47552           FOUND_FREETYPE=no
47553         fi
47554       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47555           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47556         # Found lib in isa dir, use that instead.
47557         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47558         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47559 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47560       fi
47561     fi
47562   fi
47563 
47564   if test "x$FOUND_FREETYPE" = xyes; then
47565 
47566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47567 
47568   # Input might be given as Windows format, start by converting to
47569   # unix format.
47570   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47571   new_path=`$CYGPATH -u "$path"`
47572 
47573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47576   # "foo.exe" is OK but "foo" is an error.
47577   #
47578   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47579   # It is also a way to make sure we got the proper file name for the real test later on.
47580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47581   if test "x$test_shortpath" = x; then
47582     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47583 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47584     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47585   fi
47586 
47587   # Call helper function which possibly converts this using DOS-style short mode.
47588   # If so, the updated path is stored in $new_path.
47589 
47590   input_path="$new_path"
47591   # Check if we need to convert this using DOS-style short mode. If the path
47592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47593   # take no chances and rewrite it.
47594   # Note: m4 eats our [], so we need to use [ and ] instead.
47595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47596   if test "x$has_forbidden_chars" != x; then
47597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47601       # Going to short mode and back again did indeed matter. Since short mode is
47602       # case insensitive, let's make it lowercase to improve readability.
47603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47604       # Now convert it back to Unix-stile (cygpath)
47605       input_path=`$CYGPATH -u "$shortmode_path"`
47606       new_path="$input_path"
47607     fi
47608   fi
47609 
47610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47611   if test "x$test_cygdrive_prefix" = x; then
47612     # As a simple fix, exclude /usr/bin since it's not a real path.
47613     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47615       # a path prefixed by /cygdrive for fixpath to work.
47616       new_path="$CYGWIN_ROOT_PATH$input_path"
47617     fi
47618   fi
47619 
47620 
47621   if test "x$path" != "x$new_path"; then
47622     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47624 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47625   fi
47626 
47627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47628 
47629   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47630   has_colon=`$ECHO $path | $GREP ^.:`
47631   new_path="$path"
47632   if test "x$has_colon" = x; then
47633     # Not in mixed or Windows style, start by that.
47634     new_path=`cmd //c echo $path`
47635   fi
47636 
47637 
47638   input_path="$new_path"
47639   # Check if we need to convert this using DOS-style short mode. If the path
47640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47641   # take no chances and rewrite it.
47642   # Note: m4 eats our [], so we need to use [ and ] instead.
47643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47644   if test "x$has_forbidden_chars" != x; then
47645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47646     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47647   fi
47648 
47649 
47650   windows_path="$new_path"
47651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47652     unix_path=`$CYGPATH -u "$windows_path"`
47653     new_path="$unix_path"
47654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47656     new_path="$unix_path"
47657   fi
47658 
47659   if test "x$path" != "x$new_path"; then
47660     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47662 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47663   fi
47664 
47665   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47666   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47667 
47668   else
47669     # We're on a unix platform. Hooray! :)
47670     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47671     has_space=`$ECHO "$path" | $GREP " "`
47672     if test "x$has_space" != x; then
47673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47674 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47675       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47676     fi
47677 
47678     # Use eval to expand a potential ~
47679     eval path="$path"
47680     if test ! -f "$path" && test ! -d "$path"; then
47681       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47682     fi
47683 
47684     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47685   fi
47686 
47687 
47688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47689 
47690   # Input might be given as Windows format, start by converting to
47691   # unix format.
47692   path="$POTENTIAL_FREETYPE_LIB_PATH"
47693   new_path=`$CYGPATH -u "$path"`
47694 
47695   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47696   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47697   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47698   # "foo.exe" is OK but "foo" is an error.
47699   #
47700   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47701   # It is also a way to make sure we got the proper file name for the real test later on.
47702   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47703   if test "x$test_shortpath" = x; then
47704     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47705 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47706     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47707   fi
47708 
47709   # Call helper function which possibly converts this using DOS-style short mode.
47710   # If so, the updated path is stored in $new_path.
47711 
47712   input_path="$new_path"
47713   # Check if we need to convert this using DOS-style short mode. If the path
47714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47715   # take no chances and rewrite it.
47716   # Note: m4 eats our [], so we need to use [ and ] instead.
47717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47718   if test "x$has_forbidden_chars" != x; then
47719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47720     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47721     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47722     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47723       # Going to short mode and back again did indeed matter. Since short mode is
47724       # case insensitive, let's make it lowercase to improve readability.
47725       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47726       # Now convert it back to Unix-stile (cygpath)
47727       input_path=`$CYGPATH -u "$shortmode_path"`
47728       new_path="$input_path"
47729     fi
47730   fi
47731 
47732   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47733   if test "x$test_cygdrive_prefix" = x; then
47734     # As a simple fix, exclude /usr/bin since it's not a real path.
47735     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47736       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47737       # a path prefixed by /cygdrive for fixpath to work.
47738       new_path="$CYGWIN_ROOT_PATH$input_path"
47739     fi
47740   fi
47741 
47742 
47743   if test "x$path" != "x$new_path"; then
47744     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47745     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47746 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47747   fi
47748 
47749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47750 
47751   path="$POTENTIAL_FREETYPE_LIB_PATH"
47752   has_colon=`$ECHO $path | $GREP ^.:`
47753   new_path="$path"
47754   if test "x$has_colon" = x; then
47755     # Not in mixed or Windows style, start by that.
47756     new_path=`cmd //c echo $path`
47757   fi
47758 
47759 
47760   input_path="$new_path"
47761   # Check if we need to convert this using DOS-style short mode. If the path
47762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47763   # take no chances and rewrite it.
47764   # Note: m4 eats our [], so we need to use [ and ] instead.
47765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47766   if test "x$has_forbidden_chars" != x; then
47767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47768     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47769   fi
47770 
47771 
47772   windows_path="$new_path"
47773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47774     unix_path=`$CYGPATH -u "$windows_path"`
47775     new_path="$unix_path"
47776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47778     new_path="$unix_path"
47779   fi
47780 
47781   if test "x$path" != "x$new_path"; then
47782     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47784 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47785   fi
47786 
47787   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47788   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47789 
47790   else
47791     # We're on a unix platform. Hooray! :)
47792     path="$POTENTIAL_FREETYPE_LIB_PATH"
47793     has_space=`$ECHO "$path" | $GREP " "`
47794     if test "x$has_space" != x; then
47795       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47796 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47797       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47798     fi
47799 
47800     # Use eval to expand a potential ~
47801     eval path="$path"
47802     if test ! -f "$path" && test ! -d "$path"; then
47803       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47804     fi
47805 
47806     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47807   fi
47808 
47809 
47810     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47812 $as_echo_n "checking for freetype includes... " >&6; }
47813     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47814 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47815     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47816     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47817 $as_echo_n "checking for freetype libraries... " >&6; }
47818     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47819 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47820   fi
47821 
47822               fi
47823             fi
47824           fi
47825         fi
47826       fi # end check in well-known locations
47827 
47828       if test "x$FOUND_FREETYPE" != xyes; then
47829 
47830   # Print a helpful message on how to acquire the necessary build dependency.
47831   # freetype is the help tag: freetype, cups, pulse, alsa etc
47832   MISSING_DEPENDENCY=freetype
47833 
47834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47835     cygwin_help $MISSING_DEPENDENCY
47836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47837     msys_help $MISSING_DEPENDENCY
47838   else
47839     PKGHANDLER_COMMAND=
47840 
47841     case $PKGHANDLER in
47842       apt-get)
47843         apt_help     $MISSING_DEPENDENCY ;;
47844       yum)
47845         yum_help     $MISSING_DEPENDENCY ;;
47846       port)
47847         port_help    $MISSING_DEPENDENCY ;;
47848       pkgutil)
47849         pkgutil_help $MISSING_DEPENDENCY ;;
47850       pkgadd)
47851         pkgadd_help  $MISSING_DEPENDENCY ;;
47852     esac
47853 
47854     if test "x$PKGHANDLER_COMMAND" != x; then
47855       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47856     fi
47857   fi
47858 
47859         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47860       fi
47861     fi # end user specified settings
47862 
47863     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47864     if test "x$FREETYPE_CFLAGS" = x; then
47865 
47866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47867 
47868   # Input might be given as Windows format, start by converting to
47869   # unix format.
47870   path="$FREETYPE_INCLUDE_PATH"
47871   new_path=`$CYGPATH -u "$path"`
47872 
47873   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47874   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47875   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47876   # "foo.exe" is OK but "foo" is an error.
47877   #
47878   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47879   # It is also a way to make sure we got the proper file name for the real test later on.
47880   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47881   if test "x$test_shortpath" = x; then
47882     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47883 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47884     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47885   fi
47886 
47887   # Call helper function which possibly converts this using DOS-style short mode.
47888   # If so, the updated path is stored in $new_path.
47889 
47890   input_path="$new_path"
47891   # Check if we need to convert this using DOS-style short mode. If the path
47892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47893   # take no chances and rewrite it.
47894   # Note: m4 eats our [], so we need to use [ and ] instead.
47895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47896   if test "x$has_forbidden_chars" != x; then
47897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47898     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47899     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47900     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47901       # Going to short mode and back again did indeed matter. Since short mode is
47902       # case insensitive, let's make it lowercase to improve readability.
47903       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47904       # Now convert it back to Unix-stile (cygpath)
47905       input_path=`$CYGPATH -u "$shortmode_path"`
47906       new_path="$input_path"
47907     fi
47908   fi
47909 
47910   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47911   if test "x$test_cygdrive_prefix" = x; then
47912     # As a simple fix, exclude /usr/bin since it's not a real path.
47913     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47914       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47915       # a path prefixed by /cygdrive for fixpath to work.
47916       new_path="$CYGWIN_ROOT_PATH$input_path"
47917     fi
47918   fi
47919 
47920 
47921   if test "x$path" != "x$new_path"; then
47922     FREETYPE_INCLUDE_PATH="$new_path"
47923     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47924 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47925   fi
47926 
47927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47928 
47929   path="$FREETYPE_INCLUDE_PATH"
47930   has_colon=`$ECHO $path | $GREP ^.:`
47931   new_path="$path"
47932   if test "x$has_colon" = x; then
47933     # Not in mixed or Windows style, start by that.
47934     new_path=`cmd //c echo $path`
47935   fi
47936 
47937 
47938   input_path="$new_path"
47939   # Check if we need to convert this using DOS-style short mode. If the path
47940   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47941   # take no chances and rewrite it.
47942   # Note: m4 eats our [], so we need to use [ and ] instead.
47943   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47944   if test "x$has_forbidden_chars" != x; then
47945     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47946     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47947   fi
47948 
47949 
47950   windows_path="$new_path"
47951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47952     unix_path=`$CYGPATH -u "$windows_path"`
47953     new_path="$unix_path"
47954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47956     new_path="$unix_path"
47957   fi
47958 
47959   if test "x$path" != "x$new_path"; then
47960     FREETYPE_INCLUDE_PATH="$new_path"
47961     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47962 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47963   fi
47964 
47965   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47966   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47967 
47968   else
47969     # We're on a unix platform. Hooray! :)
47970     path="$FREETYPE_INCLUDE_PATH"
47971     has_space=`$ECHO "$path" | $GREP " "`
47972     if test "x$has_space" != x; then
47973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47974 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47975       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47976     fi
47977 
47978     # Use eval to expand a potential ~
47979     eval path="$path"
47980     if test ! -f "$path" && test ! -d "$path"; then
47981       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47982     fi
47983 
47984     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47985   fi
47986 
47987       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47988         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47989       else
47990         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47991       fi
47992     fi
47993 
47994     if test "x$FREETYPE_LIBS" = x; then
47995 
47996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47997 
47998   # Input might be given as Windows format, start by converting to
47999   # unix format.
48000   path="$FREETYPE_LIB_PATH"
48001   new_path=`$CYGPATH -u "$path"`
48002 
48003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48006   # "foo.exe" is OK but "foo" is an error.
48007   #
48008   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48009   # It is also a way to make sure we got the proper file name for the real test later on.
48010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48011   if test "x$test_shortpath" = x; then
48012     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48013 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48014     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48015   fi
48016 
48017   # Call helper function which possibly converts this using DOS-style short mode.
48018   # If so, the updated path is stored in $new_path.
48019 
48020   input_path="$new_path"
48021   # Check if we need to convert this using DOS-style short mode. If the path
48022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48023   # take no chances and rewrite it.
48024   # Note: m4 eats our [], so we need to use [ and ] instead.
48025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48026   if test "x$has_forbidden_chars" != x; then
48027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48028     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48029     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48030     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48031       # Going to short mode and back again did indeed matter. Since short mode is
48032       # case insensitive, let's make it lowercase to improve readability.
48033       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48034       # Now convert it back to Unix-stile (cygpath)
48035       input_path=`$CYGPATH -u "$shortmode_path"`
48036       new_path="$input_path"
48037     fi
48038   fi
48039 
48040   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48041   if test "x$test_cygdrive_prefix" = x; then
48042     # As a simple fix, exclude /usr/bin since it's not a real path.
48043     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48044       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48045       # a path prefixed by /cygdrive for fixpath to work.
48046       new_path="$CYGWIN_ROOT_PATH$input_path"
48047     fi
48048   fi
48049 
48050 
48051   if test "x$path" != "x$new_path"; then
48052     FREETYPE_LIB_PATH="$new_path"
48053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48054 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48055   fi
48056 
48057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48058 
48059   path="$FREETYPE_LIB_PATH"
48060   has_colon=`$ECHO $path | $GREP ^.:`
48061   new_path="$path"
48062   if test "x$has_colon" = x; then
48063     # Not in mixed or Windows style, start by that.
48064     new_path=`cmd //c echo $path`
48065   fi
48066 
48067 
48068   input_path="$new_path"
48069   # Check if we need to convert this using DOS-style short mode. If the path
48070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48071   # take no chances and rewrite it.
48072   # Note: m4 eats our [], so we need to use [ and ] instead.
48073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48074   if test "x$has_forbidden_chars" != x; then
48075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48076     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48077   fi
48078 
48079 
48080   windows_path="$new_path"
48081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48082     unix_path=`$CYGPATH -u "$windows_path"`
48083     new_path="$unix_path"
48084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48086     new_path="$unix_path"
48087   fi
48088 
48089   if test "x$path" != "x$new_path"; then
48090     FREETYPE_LIB_PATH="$new_path"
48091     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48092 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48093   fi
48094 
48095   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48096   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48097 
48098   else
48099     # We're on a unix platform. Hooray! :)
48100     path="$FREETYPE_LIB_PATH"
48101     has_space=`$ECHO "$path" | $GREP " "`
48102     if test "x$has_space" != x; then
48103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48104 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48105       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48106     fi
48107 
48108     # Use eval to expand a potential ~
48109     eval path="$path"
48110     if test ! -f "$path" && test ! -d "$path"; then
48111       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48112     fi
48113 
48114     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48115   fi
48116 
48117       if test "x$OPENJDK_TARGET_OS" = xwindows; then
48118         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48119       else
48120         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48121       fi
48122     fi
48123 
48124     # Try to compile it
48125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48126 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
48127     ac_ext=cpp
48128 ac_cpp='$CXXCPP $CPPFLAGS'
48129 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48130 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48131 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48132 
48133     PREV_CXXCFLAGS="$CXXFLAGS"
48134     PREV_LIBS="$LIBS"
48135     PREV_CXX="$CXX"
48136     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48137     LIBS="$LIBS $FREETYPE_LIBS"
48138     CXX="$FIXPATH $CXX"
48139     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48140 /* end confdefs.h.  */
48141 
48142           #include<ft2build.h>
48143           #include FT_FREETYPE_H
48144           int main () {
48145             FT_Init_FreeType(NULL);
48146             return 0;
48147           }
48148 
48149 _ACEOF
48150 if ac_fn_cxx_try_link "$LINENO"; then :
48151 
48152           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48153 $as_echo "yes" >&6; }
48154 
48155 else
48156 
48157           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48158 $as_echo "no" >&6; }
48159           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48160 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48161           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48162 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48163 
48164 
48165   # Print a helpful message on how to acquire the necessary build dependency.
48166   # freetype is the help tag: freetype, cups, pulse, alsa etc
48167   MISSING_DEPENDENCY=freetype
48168 
48169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48170     cygwin_help $MISSING_DEPENDENCY
48171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48172     msys_help $MISSING_DEPENDENCY
48173   else
48174     PKGHANDLER_COMMAND=
48175 
48176     case $PKGHANDLER in
48177       apt-get)
48178         apt_help     $MISSING_DEPENDENCY ;;
48179       yum)
48180         yum_help     $MISSING_DEPENDENCY ;;
48181       port)
48182         port_help    $MISSING_DEPENDENCY ;;
48183       pkgutil)
48184         pkgutil_help $MISSING_DEPENDENCY ;;
48185       pkgadd)
48186         pkgadd_help  $MISSING_DEPENDENCY ;;
48187     esac
48188 
48189     if test "x$PKGHANDLER_COMMAND" != x; then
48190       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48191     fi
48192   fi
48193 
48194 
48195           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48196 
48197 
48198 fi
48199 rm -f core conftest.err conftest.$ac_objext \
48200     conftest$ac_exeext conftest.$ac_ext
48201     CXXCFLAGS="$PREV_CXXFLAGS"
48202     LIBS="$PREV_LIBS"
48203     CXX="$PREV_CXX"
48204     ac_ext=cpp
48205 ac_cpp='$CXXCPP $CPPFLAGS'
48206 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48207 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48208 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48209 
48210 
48211     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48212 $as_echo_n "checking if we should bundle freetype... " >&6; }
48213     if test "x$BUNDLE_FREETYPE" = xyes; then
48214       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48215     fi
48216     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48217 $as_echo "$BUNDLE_FREETYPE" >&6; }
48218 
48219   fi # end freetype needed
48220 
48221 
48222 
48223 
48224 
48225 
48226 
48227   ###############################################################################
48228   #
48229   # Check for alsa headers and libraries. Used on Linux/GNU systems.
48230   #
48231 
48232 # Check whether --with-alsa was given.
48233 if test "${with_alsa+set}" = set; then :
48234   withval=$with_alsa;
48235 fi
48236 
48237 
48238 # Check whether --with-alsa-include was given.
48239 if test "${with_alsa_include+set}" = set; then :
48240   withval=$with_alsa_include;
48241 fi
48242 
48243 
48244 # Check whether --with-alsa-lib was given.
48245 if test "${with_alsa_lib+set}" = set; then :
48246   withval=$with_alsa_lib;
48247 fi
48248 
48249 
48250   if test "x$ALSA_NOT_NEEDED" = xyes; then
48251     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48252       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48253 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48254     fi
48255     ALSA_CFLAGS=
48256     ALSA_LIBS=
48257   else
48258     ALSA_FOUND=no
48259 
48260     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48261       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48262     fi
48263 
48264     if test "x${with_alsa}" != x; then
48265       ALSA_LIBS="-L${with_alsa}/lib -lasound"
48266       ALSA_CFLAGS="-I${with_alsa}/include"
48267       ALSA_FOUND=yes
48268     fi
48269     if test "x${with_alsa_include}" != x; then
48270       ALSA_CFLAGS="-I${with_alsa_include}"
48271       ALSA_FOUND=yes
48272     fi
48273     if test "x${with_alsa_lib}" != x; then
48274       ALSA_LIBS="-L${with_alsa_lib} -lasound"
48275       ALSA_FOUND=yes
48276     fi
48277     if test "x$ALSA_FOUND" = xno; then
48278 
48279 
48280   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48281     # Source the builddeps file again, to make sure it uses the latest variables!
48282     . $builddepsfile
48283     # Look for a target and build machine specific resource!
48284     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48285     if test "x$resource" = x; then
48286       # Ok, lets instead look for a target specific resource
48287       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48288     fi
48289     if test "x$resource" = x; then
48290       # Ok, lets instead look for a build specific resource
48291       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48292     fi
48293     if test "x$resource" = x; then
48294       # Ok, lets instead look for a generic resource
48295       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48296       resource=${builddep_alsa}
48297     fi
48298     if test "x$resource" != x; then
48299       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48300 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48301       # If the resource in the builddeps.conf file is an existing directory,
48302       # for example /java/linux/cups
48303       if test -d ${resource}; then
48304         depdir=${resource}
48305       else
48306 
48307   # alsa is for example mymodule
48308   # $resource is for example libs/general/libmymod_1_2_3.zip
48309   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48310   # $with_builddeps_dir is for example /localhome/builddeps
48311   # depdir is the name of the variable into which we store the depdir, eg MYMOD
48312   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48313   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48314   filename=`basename $resource`
48315   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48316   filebase=${filename%%.*}
48317   extension=${filename#*.}
48318   installdir=$with_builddeps_dir/$filebase
48319   if test ! -f $installdir/$filename.unpacked; then
48320     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48321 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48322     if test ! -d $installdir; then
48323       mkdir -p $installdir
48324     fi
48325     if test ! -d $installdir; then
48326       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48327     fi
48328     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48329     touch $tmpfile
48330     if test ! -f $tmpfile; then
48331       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48332     fi
48333 
48334   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48335   # $tmpfile is the local file name for the downloaded file.
48336   VALID_TOOL=no
48337   if test "x$BDEPS_FTP" = xwget; then
48338     VALID_TOOL=yes
48339     wget -O $tmpfile $with_builddeps_server/$resource
48340   fi
48341   if test "x$BDEPS_FTP" = xlftp; then
48342     VALID_TOOL=yes
48343     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48344   fi
48345   if test "x$BDEPS_FTP" = xftp; then
48346     VALID_TOOL=yes
48347     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48348     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48349     FTPUSERPWD=${FTPSERVER%%@*}
48350     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48351       FTPUSER=${userpwd%%:*}
48352       FTPPWD=${userpwd#*@}
48353       FTPSERVER=${FTPSERVER#*@}
48354     else
48355       FTPUSER=ftp
48356       FTPPWD=ftp
48357     fi
48358     # the "pass" command does not work on some
48359     # ftp clients (read ftp.exe) but if it works,
48360     # passive mode is better!
48361     ( \
48362         echo "user $FTPUSER $FTPPWD"        ; \
48363         echo "pass"                         ; \
48364         echo "bin"                          ; \
48365         echo "get $FTPPATH $tmpfile"              ; \
48366     ) | ftp -in $FTPSERVER
48367   fi
48368   if test "x$VALID_TOOL" != xyes; then
48369     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48370   fi
48371 
48372     mv $tmpfile $installdir/$filename
48373     if test ! -s $installdir/$filename; then
48374       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48375     fi
48376     case "$extension" in
48377       zip)  echo "Unzipping $installdir/$filename..."
48378         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48379         ;;
48380       tar.gz) echo "Untaring $installdir/$filename..."
48381         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48382         ;;
48383       tgz) echo "Untaring $installdir/$filename..."
48384         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48385         ;;
48386       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48387         ;;
48388     esac
48389   fi
48390   if test -f $installdir/$filename.unpacked; then
48391     depdir=$installdir
48392   fi
48393 
48394       fi
48395       # Source the builddeps file again, because in the previous command, the depdir
48396       # was updated to point at the current build dependency install directory.
48397       . $builddepsfile
48398       # Now extract variables from the builddeps.conf files.
48399       theroot=${builddep_alsa_ROOT}
48400       thecflags=${builddep_alsa_CFLAGS}
48401       thelibs=${builddep_alsa_LIBS}
48402       if test "x$depdir" = x; then
48403         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48404       fi
48405       ALSA=$depdir
48406       if test "x$theroot" != x; then
48407         ALSA="$theroot"
48408       fi
48409       if test "x$thecflags" != x; then
48410         ALSA_CFLAGS="$thecflags"
48411       fi
48412       if test "x$thelibs" != x; then
48413         ALSA_LIBS="$thelibs"
48414       fi
48415       ALSA_FOUND=yes
48416       else ALSA_FOUND=no
48417 
48418     fi
48419     else ALSA_FOUND=no
48420 
48421   fi
48422 
48423     fi
48424     # Do not try pkg-config if we have a sysroot set.
48425     if test "x$SYSROOT" = x; then
48426       if test "x$ALSA_FOUND" = xno; then
48427 
48428 pkg_failed=no
48429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48430 $as_echo_n "checking for ALSA... " >&6; }
48431 
48432 if test -n "$ALSA_CFLAGS"; then
48433     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48434  elif test -n "$PKG_CONFIG"; then
48435     if test -n "$PKG_CONFIG" && \
48436     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48437   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48438   ac_status=$?
48439   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48440   test $ac_status = 0; }; then
48441   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48442 else
48443   pkg_failed=yes
48444 fi
48445  else
48446     pkg_failed=untried
48447 fi
48448 if test -n "$ALSA_LIBS"; then
48449     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48450  elif test -n "$PKG_CONFIG"; then
48451     if test -n "$PKG_CONFIG" && \
48452     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48453   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48454   ac_status=$?
48455   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48456   test $ac_status = 0; }; then
48457   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48458 else
48459   pkg_failed=yes
48460 fi
48461  else
48462     pkg_failed=untried
48463 fi
48464 
48465 
48466 
48467 if test $pkg_failed = yes; then
48468 
48469 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48470         _pkg_short_errors_supported=yes
48471 else
48472         _pkg_short_errors_supported=no
48473 fi
48474         if test $_pkg_short_errors_supported = yes; then
48475                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48476         else
48477                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48478         fi
48479         # Put the nasty error message in config.log where it belongs
48480         echo "$ALSA_PKG_ERRORS" >&5
48481 
48482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48483 $as_echo "no" >&6; }
48484                 ALSA_FOUND=no
48485 elif test $pkg_failed = untried; then
48486         ALSA_FOUND=no
48487 else
48488         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48489         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48490         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48491 $as_echo "yes" >&6; }
48492         ALSA_FOUND=yes
48493 fi
48494       fi
48495     fi
48496     if test "x$ALSA_FOUND" = xno; then
48497       for ac_header in alsa/asoundlib.h
48498 do :
48499   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48500 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48501   cat >>confdefs.h <<_ACEOF
48502 #define HAVE_ALSA_ASOUNDLIB_H 1
48503 _ACEOF
48504 
48505             ALSA_FOUND=yes
48506             ALSA_CFLAGS=-Iignoreme
48507             ALSA_LIBS=-lasound
48508             DEFAULT_ALSA=yes
48509 
48510 else
48511   ALSA_FOUND=no
48512 fi
48513 
48514 done
48515 
48516     fi
48517     if test "x$ALSA_FOUND" = xno; then
48518 
48519   # Print a helpful message on how to acquire the necessary build dependency.
48520   # alsa is the help tag: freetype, cups, pulse, alsa etc
48521   MISSING_DEPENDENCY=alsa
48522 
48523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48524     cygwin_help $MISSING_DEPENDENCY
48525   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48526     msys_help $MISSING_DEPENDENCY
48527   else
48528     PKGHANDLER_COMMAND=
48529 
48530     case $PKGHANDLER in
48531       apt-get)
48532         apt_help     $MISSING_DEPENDENCY ;;
48533       yum)
48534         yum_help     $MISSING_DEPENDENCY ;;
48535       port)
48536         port_help    $MISSING_DEPENDENCY ;;
48537       pkgutil)
48538         pkgutil_help $MISSING_DEPENDENCY ;;
48539       pkgadd)
48540         pkgadd_help  $MISSING_DEPENDENCY ;;
48541     esac
48542 
48543     if test "x$PKGHANDLER_COMMAND" != x; then
48544       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48545     fi
48546   fi
48547 
48548       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48549     fi
48550   fi
48551 
48552 
48553 
48554 
48555 
48556 
48557   ###############################################################################
48558   #
48559   # Check for the jpeg library
48560   #
48561 
48562 
48563 # Check whether --with-libjpeg was given.
48564 if test "${with_libjpeg+set}" = set; then :
48565   withval=$with_libjpeg;
48566 fi
48567 
48568 
48569   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48570 $as_echo_n "checking for which libjpeg to use... " >&6; }
48571 
48572   # default is bundled
48573   DEFAULT_LIBJPEG=bundled
48574 
48575   #
48576   # if user didn't specify, use DEFAULT_LIBJPEG
48577   #
48578   if test "x${with_libjpeg}" = "x"; then
48579     with_libjpeg=${DEFAULT_LIBJPEG}
48580   fi
48581 
48582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48583 $as_echo "${with_libjpeg}" >&6; }
48584 
48585   if test "x${with_libjpeg}" = "xbundled"; then
48586     USE_EXTERNAL_LIBJPEG=false
48587   elif test "x${with_libjpeg}" = "xsystem"; then
48588     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48589 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48590 
48591 else
48592    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48593 fi
48594 
48595 
48596     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48597 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48598 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48599   $as_echo_n "(cached) " >&6
48600 else
48601   ac_check_lib_save_LIBS=$LIBS
48602 LIBS="-ljpeg  $LIBS"
48603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48604 /* end confdefs.h.  */
48605 
48606 /* Override any GCC internal prototype to avoid an error.
48607    Use char because int might match the return type of a GCC
48608    builtin and then its argument prototype would still apply.  */
48609 #ifdef __cplusplus
48610 extern "C"
48611 #endif
48612 char jpeg_CreateDecompress ();
48613 int
48614 main ()
48615 {
48616 return jpeg_CreateDecompress ();
48617   ;
48618   return 0;
48619 }
48620 _ACEOF
48621 if ac_fn_cxx_try_link "$LINENO"; then :
48622   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48623 else
48624   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48625 fi
48626 rm -f core conftest.err conftest.$ac_objext \
48627     conftest$ac_exeext conftest.$ac_ext
48628 LIBS=$ac_check_lib_save_LIBS
48629 fi
48630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48631 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48632 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48633   cat >>confdefs.h <<_ACEOF
48634 #define HAVE_LIBJPEG 1
48635 _ACEOF
48636 
48637   LIBS="-ljpeg $LIBS"
48638 
48639 else
48640    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48641 fi
48642 
48643 
48644     USE_EXTERNAL_LIBJPEG=true
48645   else
48646     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48647   fi
48648 
48649 
48650 
48651   ###############################################################################
48652   #
48653   # Check for the gif library
48654   #
48655 
48656 
48657 # Check whether --with-giflib was given.
48658 if test "${with_giflib+set}" = set; then :
48659   withval=$with_giflib;
48660 fi
48661 
48662 
48663 
48664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48665 $as_echo_n "checking for which giflib to use... " >&6; }
48666 
48667   # default is bundled
48668   DEFAULT_GIFLIB=bundled
48669 
48670   #
48671   # if user didn't specify, use DEFAULT_GIFLIB
48672   #
48673   if test "x${with_giflib}" = "x"; then
48674     with_giflib=${DEFAULT_GIFLIB}
48675   fi
48676 
48677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48678 $as_echo "${with_giflib}" >&6; }
48679 
48680   if test "x${with_giflib}" = "xbundled"; then
48681     USE_EXTERNAL_LIBGIF=false
48682   elif test "x${with_giflib}" = "xsystem"; then
48683     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48684 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48685 
48686 else
48687    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48688 fi
48689 
48690 
48691     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48692 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48693 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48694   $as_echo_n "(cached) " >&6
48695 else
48696   ac_check_lib_save_LIBS=$LIBS
48697 LIBS="-lgif  $LIBS"
48698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48699 /* end confdefs.h.  */
48700 
48701 /* Override any GCC internal prototype to avoid an error.
48702    Use char because int might match the return type of a GCC
48703    builtin and then its argument prototype would still apply.  */
48704 #ifdef __cplusplus
48705 extern "C"
48706 #endif
48707 char DGifGetCode ();
48708 int
48709 main ()
48710 {
48711 return DGifGetCode ();
48712   ;
48713   return 0;
48714 }
48715 _ACEOF
48716 if ac_fn_cxx_try_link "$LINENO"; then :
48717   ac_cv_lib_gif_DGifGetCode=yes
48718 else
48719   ac_cv_lib_gif_DGifGetCode=no
48720 fi
48721 rm -f core conftest.err conftest.$ac_objext \
48722     conftest$ac_exeext conftest.$ac_ext
48723 LIBS=$ac_check_lib_save_LIBS
48724 fi
48725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48726 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48727 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48728   cat >>confdefs.h <<_ACEOF
48729 #define HAVE_LIBGIF 1
48730 _ACEOF
48731 
48732   LIBS="-lgif $LIBS"
48733 
48734 else
48735    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48736 fi
48737 
48738 
48739     USE_EXTERNAL_LIBGIF=true
48740   else
48741     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48742   fi
48743 
48744 
48745   ###############################################################################
48746   #
48747   # Check for the lcms2 library
48748   #
48749 
48750 
48751 # Check whether --with-lcms was given.
48752 if test "${with_lcms+set}" = set; then :
48753   withval=$with_lcms;
48754 fi
48755 
48756 
48757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48758 $as_echo_n "checking for which lcms to use... " >&6; }
48759 
48760   DEFAULT_LCMS=bundled
48761 
48762   #
48763   # If user didn't specify, use DEFAULT_LCMS
48764   #
48765   if test "x${with_lcms}" = "x"; then
48766       with_lcms=${DEFAULT_LCMS}
48767   fi
48768 
48769   if test "x${with_lcms}" = "xbundled"; then
48770     USE_EXTERNAL_LCMS=false
48771     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48772 $as_echo "bundled" >&6; }
48773   elif test "x${with_lcms}" = "xsystem"; then
48774     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48775 $as_echo "system" >&6; }
48776 
48777 pkg_failed=no
48778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48779 $as_echo_n "checking for LCMS... " >&6; }
48780 
48781 if test -n "$LCMS_CFLAGS"; then
48782     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48783  elif test -n "$PKG_CONFIG"; then
48784     if test -n "$PKG_CONFIG" && \
48785     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48786   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48787   ac_status=$?
48788   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48789   test $ac_status = 0; }; then
48790   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48791 else
48792   pkg_failed=yes
48793 fi
48794  else
48795     pkg_failed=untried
48796 fi
48797 if test -n "$LCMS_LIBS"; then
48798     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48799  elif test -n "$PKG_CONFIG"; then
48800     if test -n "$PKG_CONFIG" && \
48801     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48802   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48803   ac_status=$?
48804   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48805   test $ac_status = 0; }; then
48806   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48807 else
48808   pkg_failed=yes
48809 fi
48810  else
48811     pkg_failed=untried
48812 fi
48813 
48814 
48815 
48816 if test $pkg_failed = yes; then
48817 
48818 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48819         _pkg_short_errors_supported=yes
48820 else
48821         _pkg_short_errors_supported=no
48822 fi
48823         if test $_pkg_short_errors_supported = yes; then
48824                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48825         else
48826                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48827         fi
48828         # Put the nasty error message in config.log where it belongs
48829         echo "$LCMS_PKG_ERRORS" >&5
48830 
48831         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48832 $as_echo "no" >&6; }
48833                 LCMS_FOUND=no
48834 elif test $pkg_failed = untried; then
48835         LCMS_FOUND=no
48836 else
48837         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48838         LCMS_LIBS=$pkg_cv_LCMS_LIBS
48839         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48840 $as_echo "yes" >&6; }
48841         LCMS_FOUND=yes
48842 fi
48843     if test "x${LCMS_FOUND}" = "xyes"; then
48844       USE_EXTERNAL_LCMS=true
48845     else
48846       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48847     fi
48848   else
48849     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48850   fi
48851 
48852 
48853 
48854   ###############################################################################
48855   #
48856   # Check for the png library
48857   #
48858 
48859 
48860 # Check whether --with-libpng was given.
48861 if test "${with_libpng+set}" = set; then :
48862   withval=$with_libpng;
48863 fi
48864 
48865 
48866 
48867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48868 $as_echo_n "checking for which libpng to use... " >&6; }
48869 
48870   # default is bundled
48871   DEFAULT_LIBPNG=bundled
48872 
48873   #
48874   # if user didn't specify, use DEFAULT_LIBPNG
48875   #
48876   if test "x${with_libpng}" = "x"; then
48877       with_libpng=${DEFAULT_LIBPNG}
48878   fi
48879 
48880   if test "x${with_libpng}" = "xbundled"; then
48881       USE_EXTERNAL_LIBPNG=false
48882       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48883 $as_echo "bundled" >&6; }
48884   elif test "x${with_libpng}" = "xsystem"; then
48885 
48886 pkg_failed=no
48887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48888 $as_echo_n "checking for PNG... " >&6; }
48889 
48890 if test -n "$PNG_CFLAGS"; then
48891     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48892  elif test -n "$PKG_CONFIG"; then
48893     if test -n "$PKG_CONFIG" && \
48894     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48895   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48896   ac_status=$?
48897   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48898   test $ac_status = 0; }; then
48899   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48900 else
48901   pkg_failed=yes
48902 fi
48903  else
48904     pkg_failed=untried
48905 fi
48906 if test -n "$PNG_LIBS"; then
48907     pkg_cv_PNG_LIBS="$PNG_LIBS"
48908  elif test -n "$PKG_CONFIG"; then
48909     if test -n "$PKG_CONFIG" && \
48910     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48911   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48912   ac_status=$?
48913   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48914   test $ac_status = 0; }; then
48915   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48916 else
48917   pkg_failed=yes
48918 fi
48919  else
48920     pkg_failed=untried
48921 fi
48922 
48923 
48924 
48925 if test $pkg_failed = yes; then
48926 
48927 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48928         _pkg_short_errors_supported=yes
48929 else
48930         _pkg_short_errors_supported=no
48931 fi
48932         if test $_pkg_short_errors_supported = yes; then
48933                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48934         else
48935                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48936         fi
48937         # Put the nasty error message in config.log where it belongs
48938         echo "$PNG_PKG_ERRORS" >&5
48939 
48940         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48941 $as_echo "no" >&6; }
48942                  LIBPNG_FOUND=no
48943 elif test $pkg_failed = untried; then
48944          LIBPNG_FOUND=no
48945 else
48946         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48947         PNG_LIBS=$pkg_cv_PNG_LIBS
48948         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48949 $as_echo "yes" >&6; }
48950          LIBPNG_FOUND=yes
48951 fi
48952       if test "x${LIBPNG_FOUND}" = "xyes"; then
48953           USE_EXTERNAL_LIBPNG=true
48954           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48955 $as_echo "system" >&6; }
48956       else
48957           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48958 $as_echo "system not found" >&6; }
48959           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48960       fi
48961   else
48962       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48963   fi
48964 
48965 
48966   ###############################################################################
48967   #
48968   # Check for the zlib library
48969   #
48970 
48971 
48972 # Check whether --with-zlib was given.
48973 if test "${with_zlib+set}" = set; then :
48974   withval=$with_zlib;
48975 fi
48976 
48977 
48978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48979 $as_echo_n "checking for compress in -lz... " >&6; }
48980 if ${ac_cv_lib_z_compress+:} false; then :
48981   $as_echo_n "(cached) " >&6
48982 else
48983   ac_check_lib_save_LIBS=$LIBS
48984 LIBS="-lz  $LIBS"
48985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48986 /* end confdefs.h.  */
48987 
48988 /* Override any GCC internal prototype to avoid an error.
48989    Use char because int might match the return type of a GCC
48990    builtin and then its argument prototype would still apply.  */
48991 #ifdef __cplusplus
48992 extern "C"
48993 #endif
48994 char compress ();
48995 int
48996 main ()
48997 {
48998 return compress ();
48999   ;
49000   return 0;
49001 }
49002 _ACEOF
49003 if ac_fn_cxx_try_link "$LINENO"; then :
49004   ac_cv_lib_z_compress=yes
49005 else
49006   ac_cv_lib_z_compress=no
49007 fi
49008 rm -f core conftest.err conftest.$ac_objext \
49009     conftest$ac_exeext conftest.$ac_ext
49010 LIBS=$ac_check_lib_save_LIBS
49011 fi
49012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49013 $as_echo "$ac_cv_lib_z_compress" >&6; }
49014 if test "x$ac_cv_lib_z_compress" = xyes; then :
49015    ZLIB_FOUND=yes
49016 else
49017    ZLIB_FOUND=no
49018 fi
49019 
49020 
49021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49022 $as_echo_n "checking for which zlib to use... " >&6; }
49023 
49024   DEFAULT_ZLIB=bundled
49025   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49026     #
49027     # On macosx default is system...on others default is
49028     #
49029     DEFAULT_ZLIB=system
49030   fi
49031 
49032   if test "x${ZLIB_FOUND}" != "xyes"; then
49033     #
49034     # If we don't find any system...set default to bundled
49035     #
49036     DEFAULT_ZLIB=bundled
49037   fi
49038 
49039   #
49040   # If user didn't specify, use DEFAULT_ZLIB
49041   #
49042   if test "x${with_zlib}" = "x"; then
49043     with_zlib=${DEFAULT_ZLIB}
49044   fi
49045 
49046   if test "x${with_zlib}" = "xbundled"; then
49047     USE_EXTERNAL_LIBZ=false
49048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49049 $as_echo "bundled" >&6; }
49050   elif test "x${with_zlib}" = "xsystem"; then
49051     if test "x${ZLIB_FOUND}" = "xyes"; then
49052       USE_EXTERNAL_LIBZ=true
49053       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49054 $as_echo "system" >&6; }
49055     else
49056       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49057 $as_echo "system not found" >&6; }
49058       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49059     fi
49060   else
49061     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49062   fi
49063 
49064 
49065 
49066   ###############################################################################
49067   LIBZIP_CAN_USE_MMAP=true
49068 
49069 
49070 
49071   ###############################################################################
49072   #
49073   # Check if altzone exists in time.h
49074   #
49075 
49076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49077 /* end confdefs.h.  */
49078 #include <time.h>
49079 int
49080 main ()
49081 {
49082 return (int)altzone;
49083   ;
49084   return 0;
49085 }
49086 _ACEOF
49087 if ac_fn_cxx_try_link "$LINENO"; then :
49088   has_altzone=yes
49089 else
49090   has_altzone=no
49091 fi
49092 rm -f core conftest.err conftest.$ac_objext \
49093     conftest$ac_exeext conftest.$ac_ext
49094   if test "x$has_altzone" = xyes; then
49095 
49096 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49097 
49098   fi
49099 
49100   ###############################################################################
49101   #
49102   # Check the maths library
49103   #
49104 
49105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49106 $as_echo_n "checking for cos in -lm... " >&6; }
49107 if ${ac_cv_lib_m_cos+:} false; then :
49108   $as_echo_n "(cached) " >&6
49109 else
49110   ac_check_lib_save_LIBS=$LIBS
49111 LIBS="-lm  $LIBS"
49112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49113 /* end confdefs.h.  */
49114 
49115 /* Override any GCC internal prototype to avoid an error.
49116    Use char because int might match the return type of a GCC
49117    builtin and then its argument prototype would still apply.  */
49118 #ifdef __cplusplus
49119 extern "C"
49120 #endif
49121 char cos ();
49122 int
49123 main ()
49124 {
49125 return cos ();
49126   ;
49127   return 0;
49128 }
49129 _ACEOF
49130 if ac_fn_cxx_try_link "$LINENO"; then :
49131   ac_cv_lib_m_cos=yes
49132 else
49133   ac_cv_lib_m_cos=no
49134 fi
49135 rm -f core conftest.err conftest.$ac_objext \
49136     conftest$ac_exeext conftest.$ac_ext
49137 LIBS=$ac_check_lib_save_LIBS
49138 fi
49139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49140 $as_echo "$ac_cv_lib_m_cos" >&6; }
49141 if test "x$ac_cv_lib_m_cos" = xyes; then :
49142   cat >>confdefs.h <<_ACEOF
49143 #define HAVE_LIBM 1
49144 _ACEOF
49145 
49146   LIBS="-lm $LIBS"
49147 
49148 else
49149 
49150         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49151 $as_echo "$as_me: Maths library was not found" >&6;}
49152 
49153 
49154 fi
49155 
49156 
49157 
49158   ###############################################################################
49159   #
49160   # Check for libdl.so
49161 
49162   save_LIBS="$LIBS"
49163   LIBS=""
49164   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49165 $as_echo_n "checking for dlopen in -ldl... " >&6; }
49166 if ${ac_cv_lib_dl_dlopen+:} false; then :
49167   $as_echo_n "(cached) " >&6
49168 else
49169   ac_check_lib_save_LIBS=$LIBS
49170 LIBS="-ldl  $LIBS"
49171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49172 /* end confdefs.h.  */
49173 
49174 /* Override any GCC internal prototype to avoid an error.
49175    Use char because int might match the return type of a GCC
49176    builtin and then its argument prototype would still apply.  */
49177 #ifdef __cplusplus
49178 extern "C"
49179 #endif
49180 char dlopen ();
49181 int
49182 main ()
49183 {
49184 return dlopen ();
49185   ;
49186   return 0;
49187 }
49188 _ACEOF
49189 if ac_fn_cxx_try_link "$LINENO"; then :
49190   ac_cv_lib_dl_dlopen=yes
49191 else
49192   ac_cv_lib_dl_dlopen=no
49193 fi
49194 rm -f core conftest.err conftest.$ac_objext \
49195     conftest$ac_exeext conftest.$ac_ext
49196 LIBS=$ac_check_lib_save_LIBS
49197 fi
49198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49199 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49200 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49201   cat >>confdefs.h <<_ACEOF
49202 #define HAVE_LIBDL 1
49203 _ACEOF
49204 
49205   LIBS="-ldl $LIBS"
49206 
49207 fi
49208 
49209   LIBDL="$LIBS"
49210 
49211   LIBS="$save_LIBS"
49212 
49213 
49214   ###############################################################################
49215   #
49216   # statically link libstdc++ before C++ ABI is stablized on Linux unless
49217   # dynamic build is configured on command line.
49218   #
49219 
49220 # Check whether --with-stdc++lib was given.
49221 if test "${with_stdc__lib+set}" = set; then :
49222   withval=$with_stdc__lib;
49223         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49224                 && test "x$with_stdc__lib" != xdefault; then
49225           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49226         fi
49227 
49228 else
49229   with_stdc__lib=default
49230 
49231 fi
49232 
49233 
49234   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49235     # Test if -lstdc++ works.
49236     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49237 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49238     ac_ext=cpp
49239 ac_cpp='$CXXCPP $CPPFLAGS'
49240 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49241 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49242 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49243 
49244     OLD_CXXFLAGS="$CXXFLAGS"
49245     CXXFLAGS="$CXXFLAGS -lstdc++"
49246     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49247 /* end confdefs.h.  */
49248 
49249 int
49250 main ()
49251 {
49252 return 0;
49253   ;
49254   return 0;
49255 }
49256 _ACEOF
49257 if ac_fn_cxx_try_link "$LINENO"; then :
49258   has_dynamic_libstdcxx=yes
49259 else
49260   has_dynamic_libstdcxx=no
49261 fi
49262 rm -f core conftest.err conftest.$ac_objext \
49263     conftest$ac_exeext conftest.$ac_ext
49264     CXXFLAGS="$OLD_CXXFLAGS"
49265     ac_ext=cpp
49266 ac_cpp='$CXXCPP $CPPFLAGS'
49267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49270 
49271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49272 $as_echo "$has_dynamic_libstdcxx" >&6; }
49273 
49274     # Test if stdc++ can be linked statically.
49275     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49276 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49277     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49278     ac_ext=cpp
49279 ac_cpp='$CXXCPP $CPPFLAGS'
49280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49281 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49283 
49284     OLD_LIBS="$LIBS"
49285     OLD_CXX="$CXX"
49286     LIBS="$STATIC_STDCXX_FLAGS"
49287     CXX="$CC"
49288     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49289 /* end confdefs.h.  */
49290 
49291 int
49292 main ()
49293 {
49294 return 0;
49295   ;
49296   return 0;
49297 }
49298 _ACEOF
49299 if ac_fn_cxx_try_link "$LINENO"; then :
49300   has_static_libstdcxx=yes
49301 else
49302   has_static_libstdcxx=no
49303 fi
49304 rm -f core conftest.err conftest.$ac_objext \
49305     conftest$ac_exeext conftest.$ac_ext
49306     LIBS="$OLD_LIBS"
49307     CXX="$OLD_CXX"
49308     ac_ext=cpp
49309 ac_cpp='$CXXCPP $CPPFLAGS'
49310 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49311 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49312 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49313 
49314     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49315 $as_echo "$has_static_libstdcxx" >&6; }
49316 
49317     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49318       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49319     fi
49320 
49321     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49322       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49323     fi
49324 
49325     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49326       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49327     fi
49328 
49329     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49330 $as_echo_n "checking how to link with libstdc++... " >&6; }
49331     # If dynamic was requested, it's available since it would fail above otherwise.
49332     # If dynamic wasn't requested, go with static unless it isn't available.
49333     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49334       LIBCXX="$LIBCXX -lstdc++"
49335       LDCXX="$CXX"
49336       STATIC_CXX_SETTING="STATIC_CXX=false"
49337       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49338 $as_echo "dynamic" >&6; }
49339     else
49340       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49341       LDCXX="$CC"
49342       STATIC_CXX_SETTING="STATIC_CXX=true"
49343       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49344 $as_echo "static" >&6; }
49345     fi
49346   fi
49347 
49348 
49349   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49350     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49351 
49352 pkg_failed=no
49353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49354 $as_echo_n "checking for LIBFFI... " >&6; }
49355 
49356 if test -n "$LIBFFI_CFLAGS"; then
49357     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49358  elif test -n "$PKG_CONFIG"; then
49359     if test -n "$PKG_CONFIG" && \
49360     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49361   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49362   ac_status=$?
49363   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49364   test $ac_status = 0; }; then
49365   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49366 else
49367   pkg_failed=yes
49368 fi
49369  else
49370     pkg_failed=untried
49371 fi
49372 if test -n "$LIBFFI_LIBS"; then
49373     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49374  elif test -n "$PKG_CONFIG"; then
49375     if test -n "$PKG_CONFIG" && \
49376     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49377   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49378   ac_status=$?
49379   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49380   test $ac_status = 0; }; then
49381   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49382 else
49383   pkg_failed=yes
49384 fi
49385  else
49386     pkg_failed=untried
49387 fi
49388 
49389 
49390 
49391 if test $pkg_failed = yes; then
49392 
49393 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49394         _pkg_short_errors_supported=yes
49395 else
49396         _pkg_short_errors_supported=no
49397 fi
49398         if test $_pkg_short_errors_supported = yes; then
49399                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49400         else
49401                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49402         fi
49403         # Put the nasty error message in config.log where it belongs
49404         echo "$LIBFFI_PKG_ERRORS" >&5
49405 
49406         as_fn_error $? "Package requirements (libffi) were not met:
49407 
49408 $LIBFFI_PKG_ERRORS
49409 
49410 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49411 installed software in a non-standard prefix.
49412 
49413 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49414 and LIBFFI_LIBS to avoid the need to call pkg-config.
49415 See the pkg-config man page for more details.
49416 " "$LINENO" 5
49417 elif test $pkg_failed = untried; then
49418         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49419 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49420 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49421 is in your PATH or set the PKG_CONFIG environment variable to the full
49422 path to pkg-config.
49423 
49424 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49425 and LIBFFI_LIBS to avoid the need to call pkg-config.
49426 See the pkg-config man page for more details.
49427 
49428 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49429 See \`config.log' for more details" "$LINENO" 5; }
49430 else
49431         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49432         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49433         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49434 $as_echo "yes" >&6; }
49435         :
49436 fi
49437 
49438   fi
49439 
49440   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49441     # Extract the first word of "llvm-config", so it can be a program name with args.
49442 set dummy llvm-config; ac_word=$2
49443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49444 $as_echo_n "checking for $ac_word... " >&6; }
49445 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49446   $as_echo_n "(cached) " >&6
49447 else
49448   if test -n "$LLVM_CONFIG"; then
49449   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49450 else
49451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49452 for as_dir in $PATH
49453 do
49454   IFS=$as_save_IFS
49455   test -z "$as_dir" && as_dir=.
49456     for ac_exec_ext in '' $ac_executable_extensions; do
49457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49458     ac_cv_prog_LLVM_CONFIG="llvm-config"
49459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49460     break 2
49461   fi
49462 done
49463   done
49464 IFS=$as_save_IFS
49465 
49466 fi
49467 fi
49468 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49469 if test -n "$LLVM_CONFIG"; then
49470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49471 $as_echo "$LLVM_CONFIG" >&6; }
49472 else
49473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49474 $as_echo "no" >&6; }
49475 fi
49476 
49477 
49478 
49479     if test "x$LLVM_CONFIG" != xllvm-config; then
49480       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49481     fi
49482 
49483     llvm_components="jit mcjit engine nativecodegen native"
49484     unset LLVM_CFLAGS
49485     for flag in $("$LLVM_CONFIG" --cxxflags); do
49486       if echo "${flag}" | grep -q '^-[ID]'; then
49487         if test "${flag}" != "-D_DEBUG" ; then
49488           if test "${LLVM_CFLAGS}" != "" ; then
49489             LLVM_CFLAGS="${LLVM_CFLAGS} "
49490           fi
49491           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49492         fi
49493       fi
49494     done
49495     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49496     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49497 
49498     unset LLVM_LDFLAGS
49499     for flag in $("${LLVM_CONFIG}" --ldflags); do
49500       if echo "${flag}" | grep -q '^-L'; then
49501         if test "${LLVM_LDFLAGS}" != ""; then
49502           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49503         fi
49504         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49505       fi
49506     done
49507 
49508     unset LLVM_LIBS
49509     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49510       if echo "${flag}" | grep -q '^-l'; then
49511         if test "${LLVM_LIBS}" != ""; then
49512           LLVM_LIBS="${LLVM_LIBS} "
49513         fi
49514         LLVM_LIBS="${LLVM_LIBS}${flag}"
49515       fi
49516     done
49517 
49518 
49519 
49520 
49521   fi
49522 
49523   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49524   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49525     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49526   fi
49527 
49528   # TODO better (platform agnostic) test
49529   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49530     LIBCXX="-lstdc++"
49531   fi
49532 
49533 
49534 
49535 
49536   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49537 
49538 
49539 # Check whether --with-msvcr-dll was given.
49540 if test "${with_msvcr_dll+set}" = set; then :
49541   withval=$with_msvcr_dll;
49542 fi
49543 
49544 
49545   if test "x$with_msvcr_dll" != x; then
49546     # If given explicitely by user, do not probe. If not present, fail directly.
49547 
49548   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49549   METHOD="--with-msvcr-dll"
49550   if test -e "$POSSIBLE_MSVCR_DLL"; then
49551     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49552 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49553 
49554     # Need to check if the found msvcr is correct architecture
49555     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49556 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49557     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49558     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49559       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49560       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49561       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49562         CORRECT_MSVCR_ARCH="PE32 executable"
49563       else
49564         CORRECT_MSVCR_ARCH="PE32+ executable"
49565       fi
49566     else
49567       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49568         CORRECT_MSVCR_ARCH=386
49569       else
49570         CORRECT_MSVCR_ARCH=x86-64
49571       fi
49572     fi
49573     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49574       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49575 $as_echo "ok" >&6; }
49576       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49577       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49578 $as_echo_n "checking for msvcr100.dll... " >&6; }
49579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49580 $as_echo "$MSVCR_DLL" >&6; }
49581     else
49582       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49583 $as_echo "incorrect, ignoring" >&6; }
49584       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49585 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49586     fi
49587   fi
49588 
49589     if test "x$MSVCR_DLL" = x; then
49590       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49591     fi
49592   fi
49593 
49594   if test "x$MSVCR_DLL" = x; then
49595     # Probe: Using well-known location from Visual Studio 10.0
49596     if test "x$VCINSTALLDIR" != x; then
49597       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49598 
49599   windows_path="$CYGWIN_VC_INSTALL_DIR"
49600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49601     unix_path=`$CYGPATH -u "$windows_path"`
49602     CYGWIN_VC_INSTALL_DIR="$unix_path"
49603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49605     CYGWIN_VC_INSTALL_DIR="$unix_path"
49606   fi
49607 
49608       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49609         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49610       else
49611         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49612       fi
49613 
49614   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49615   METHOD="well-known location in VCINSTALLDIR"
49616   if test -e "$POSSIBLE_MSVCR_DLL"; then
49617     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49618 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49619 
49620     # Need to check if the found msvcr is correct architecture
49621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49622 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49623     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49624     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49625       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49626       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49627       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49628         CORRECT_MSVCR_ARCH="PE32 executable"
49629       else
49630         CORRECT_MSVCR_ARCH="PE32+ executable"
49631       fi
49632     else
49633       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49634         CORRECT_MSVCR_ARCH=386
49635       else
49636         CORRECT_MSVCR_ARCH=x86-64
49637       fi
49638     fi
49639     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49640       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49641 $as_echo "ok" >&6; }
49642       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49643       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49644 $as_echo_n "checking for msvcr100.dll... " >&6; }
49645       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49646 $as_echo "$MSVCR_DLL" >&6; }
49647     else
49648       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49649 $as_echo "incorrect, ignoring" >&6; }
49650       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49651 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49652     fi
49653   fi
49654 
49655     fi
49656   fi
49657 
49658   if test "x$MSVCR_DLL" = x; then
49659     # Probe: Check in the Boot JDK directory.
49660     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49661 
49662   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49663   METHOD="well-known location in Boot JDK"
49664   if test -e "$POSSIBLE_MSVCR_DLL"; then
49665     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49666 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49667 
49668     # Need to check if the found msvcr is correct architecture
49669     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49670 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49671     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49672     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49673       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49674       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49675       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49676         CORRECT_MSVCR_ARCH="PE32 executable"
49677       else
49678         CORRECT_MSVCR_ARCH="PE32+ executable"
49679       fi
49680     else
49681       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49682         CORRECT_MSVCR_ARCH=386
49683       else
49684         CORRECT_MSVCR_ARCH=x86-64
49685       fi
49686     fi
49687     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49688       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49689 $as_echo "ok" >&6; }
49690       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49691       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49692 $as_echo_n "checking for msvcr100.dll... " >&6; }
49693       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49694 $as_echo "$MSVCR_DLL" >&6; }
49695     else
49696       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49697 $as_echo "incorrect, ignoring" >&6; }
49698       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49699 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49700     fi
49701   fi
49702 
49703   fi
49704 
49705   if test "x$MSVCR_DLL" = x; then
49706     # Probe: Look in the Windows system32 directory
49707     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49708 
49709   windows_path="$CYGWIN_SYSTEMROOT"
49710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49711     unix_path=`$CYGPATH -u "$windows_path"`
49712     CYGWIN_SYSTEMROOT="$unix_path"
49713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49715     CYGWIN_SYSTEMROOT="$unix_path"
49716   fi
49717 
49718     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49719 
49720   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49721   METHOD="well-known location in SYSTEMROOT"
49722   if test -e "$POSSIBLE_MSVCR_DLL"; then
49723     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49724 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49725 
49726     # Need to check if the found msvcr is correct architecture
49727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49728 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49729     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49730     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49731       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49732       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49733       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49734         CORRECT_MSVCR_ARCH="PE32 executable"
49735       else
49736         CORRECT_MSVCR_ARCH="PE32+ executable"
49737       fi
49738     else
49739       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49740         CORRECT_MSVCR_ARCH=386
49741       else
49742         CORRECT_MSVCR_ARCH=x86-64
49743       fi
49744     fi
49745     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49746       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49747 $as_echo "ok" >&6; }
49748       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49749       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49750 $as_echo_n "checking for msvcr100.dll... " >&6; }
49751       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49752 $as_echo "$MSVCR_DLL" >&6; }
49753     else
49754       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49755 $as_echo "incorrect, ignoring" >&6; }
49756       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49757 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49758     fi
49759   fi
49760 
49761   fi
49762 
49763   if test "x$MSVCR_DLL" = x; then
49764     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49765     if test "x$VS100COMNTOOLS" != x; then
49766       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49767 
49768   windows_path="$CYGWIN_VS_TOOLS_DIR"
49769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49770     unix_path=`$CYGPATH -u "$windows_path"`
49771     CYGWIN_VS_TOOLS_DIR="$unix_path"
49772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49774     CYGWIN_VS_TOOLS_DIR="$unix_path"
49775   fi
49776 
49777       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49778         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49779       else
49780         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49781       fi
49782 
49783   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49784   METHOD="search of VS100COMNTOOLS"
49785   if test -e "$POSSIBLE_MSVCR_DLL"; then
49786     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49787 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49788 
49789     # Need to check if the found msvcr is correct architecture
49790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49791 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49792     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49793     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49794       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49795       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49796       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49797         CORRECT_MSVCR_ARCH="PE32 executable"
49798       else
49799         CORRECT_MSVCR_ARCH="PE32+ executable"
49800       fi
49801     else
49802       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49803         CORRECT_MSVCR_ARCH=386
49804       else
49805         CORRECT_MSVCR_ARCH=x86-64
49806       fi
49807     fi
49808     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49809       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49810 $as_echo "ok" >&6; }
49811       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49812       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49813 $as_echo_n "checking for msvcr100.dll... " >&6; }
49814       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49815 $as_echo "$MSVCR_DLL" >&6; }
49816     else
49817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49818 $as_echo "incorrect, ignoring" >&6; }
49819       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49820 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49821     fi
49822   fi
49823 
49824     fi
49825   fi
49826 
49827   if test "x$MSVCR_DLL" = x; then
49828     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49829     # (This was the original behaviour; kept since it might turn up something)
49830     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49831       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49832         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49833       else
49834         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49835         if test "x$POSSIBLE_MSVCR_DLL" = x; then
49836           # We're grasping at straws now...
49837           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49838         fi
49839       fi
49840 
49841 
49842   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49843   METHOD="search of VCINSTALLDIR"
49844   if test -e "$POSSIBLE_MSVCR_DLL"; then
49845     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49846 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49847 
49848     # Need to check if the found msvcr is correct architecture
49849     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49850 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49851     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49852     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49853       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49854       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49855       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49856         CORRECT_MSVCR_ARCH="PE32 executable"
49857       else
49858         CORRECT_MSVCR_ARCH="PE32+ executable"
49859       fi
49860     else
49861       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49862         CORRECT_MSVCR_ARCH=386
49863       else
49864         CORRECT_MSVCR_ARCH=x86-64
49865       fi
49866     fi
49867     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49868       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49869 $as_echo "ok" >&6; }
49870       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49871       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49872 $as_echo_n "checking for msvcr100.dll... " >&6; }
49873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49874 $as_echo "$MSVCR_DLL" >&6; }
49875     else
49876       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49877 $as_echo "incorrect, ignoring" >&6; }
49878       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49879 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49880     fi
49881   fi
49882 
49883     fi
49884   fi
49885 
49886   if test "x$MSVCR_DLL" = x; then
49887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49888 $as_echo_n "checking for msvcr100.dll... " >&6; }
49889     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49890 $as_echo "no" >&6; }
49891     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49892   fi
49893 
49894 
49895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49896 
49897   # Input might be given as Windows format, start by converting to
49898   # unix format.
49899   path="$MSVCR_DLL"
49900   new_path=`$CYGPATH -u "$path"`
49901 
49902   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49903   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49904   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49905   # "foo.exe" is OK but "foo" is an error.
49906   #
49907   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49908   # It is also a way to make sure we got the proper file name for the real test later on.
49909   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49910   if test "x$test_shortpath" = x; then
49911     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49912 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49913     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49914   fi
49915 
49916   # Call helper function which possibly converts this using DOS-style short mode.
49917   # If so, the updated path is stored in $new_path.
49918 
49919   input_path="$new_path"
49920   # Check if we need to convert this using DOS-style short mode. If the path
49921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49922   # take no chances and rewrite it.
49923   # Note: m4 eats our [], so we need to use [ and ] instead.
49924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49925   if test "x$has_forbidden_chars" != x; then
49926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49927     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49928     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49929     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49930       # Going to short mode and back again did indeed matter. Since short mode is
49931       # case insensitive, let's make it lowercase to improve readability.
49932       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49933       # Now convert it back to Unix-stile (cygpath)
49934       input_path=`$CYGPATH -u "$shortmode_path"`
49935       new_path="$input_path"
49936     fi
49937   fi
49938 
49939   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49940   if test "x$test_cygdrive_prefix" = x; then
49941     # As a simple fix, exclude /usr/bin since it's not a real path.
49942     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49943       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49944       # a path prefixed by /cygdrive for fixpath to work.
49945       new_path="$CYGWIN_ROOT_PATH$input_path"
49946     fi
49947   fi
49948 
49949 
49950   if test "x$path" != "x$new_path"; then
49951     MSVCR_DLL="$new_path"
49952     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49953 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49954   fi
49955 
49956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49957 
49958   path="$MSVCR_DLL"
49959   has_colon=`$ECHO $path | $GREP ^.:`
49960   new_path="$path"
49961   if test "x$has_colon" = x; then
49962     # Not in mixed or Windows style, start by that.
49963     new_path=`cmd //c echo $path`
49964   fi
49965 
49966 
49967   input_path="$new_path"
49968   # Check if we need to convert this using DOS-style short mode. If the path
49969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49970   # take no chances and rewrite it.
49971   # Note: m4 eats our [], so we need to use [ and ] instead.
49972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49973   if test "x$has_forbidden_chars" != x; then
49974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49975     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49976   fi
49977 
49978 
49979   windows_path="$new_path"
49980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49981     unix_path=`$CYGPATH -u "$windows_path"`
49982     new_path="$unix_path"
49983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49985     new_path="$unix_path"
49986   fi
49987 
49988   if test "x$path" != "x$new_path"; then
49989     MSVCR_DLL="$new_path"
49990     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49991 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49992   fi
49993 
49994   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49995   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49996 
49997   else
49998     # We're on a unix platform. Hooray! :)
49999     path="$MSVCR_DLL"
50000     has_space=`$ECHO "$path" | $GREP " "`
50001     if test "x$has_space" != x; then
50002       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50003 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50004       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50005     fi
50006 
50007     # Use eval to expand a potential ~
50008     eval path="$path"
50009     if test ! -f "$path" && test ! -d "$path"; then
50010       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50011     fi
50012 
50013     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50014   fi
50015 
50016 
50017 
50018 
50019 # Check whether --with-dxsdk was given.
50020 if test "${with_dxsdk+set}" = set; then :
50021   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50022 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50023 fi
50024 
50025 
50026 
50027 
50028 # Check whether --with-dxsdk-lib was given.
50029 if test "${with_dxsdk_lib+set}" = set; then :
50030   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50031 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50032 fi
50033 
50034 
50035 
50036 
50037 # Check whether --with-dxsdk-include was given.
50038 if test "${with_dxsdk_include+set}" = set; then :
50039   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50040 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50041 fi
50042 
50043 
50044   fi
50045 
50046 
50047 
50048 ###############################################################################
50049 #
50050 # We need to do some final tweaking, when everything else is done.
50051 #
50052 ###############################################################################
50053 
50054 
50055   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50056 
50057 
50058   # The name of the Service Agent jar.
50059   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50060   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50061     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50062   fi
50063 
50064 
50065 
50066     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50067 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50068 
50069     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50070       ENABLE_INTREE_EC=yes
50071       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50072 $as_echo "yes" >&6; }
50073     else
50074       ENABLE_INTREE_EC=no
50075       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50076 $as_echo "no" >&6; }
50077     fi
50078 
50079 
50080 
50081 
50082 ###############################################################################
50083 #
50084 # Configure parts of the build that only affect the build performance,
50085 # not the result.
50086 #
50087 ###############################################################################
50088 
50089 
50090   # How many cores do we have on this build system?
50091 
50092 # Check whether --with-num-cores was given.
50093 if test "${with_num_cores+set}" = set; then :
50094   withval=$with_num_cores;
50095 fi
50096 
50097   if test "x$with_num_cores" = x; then
50098     # The number of cores were not specified, try to probe them.
50099 
50100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50101 $as_echo_n "checking for number of cores... " >&6; }
50102   NUM_CORES=1
50103   FOUND_CORES=no
50104 
50105   if test -f /proc/cpuinfo; then
50106     # Looks like a Linux (or cygwin) system
50107     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50108     FOUND_CORES=yes
50109   elif test -x /usr/sbin/psrinfo; then
50110     # Looks like a Solaris system
50111     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50112     FOUND_CORES=yes
50113   elif test -x /usr/sbin/system_profiler; then
50114     # Looks like a MacOSX system
50115     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50116     FOUND_CORES=yes
50117   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50118     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50119     FOUND_CORES=yes
50120   elif test -n "$NUMBER_OF_PROCESSORS"; then
50121     # On windows, look in the env
50122     NUM_CORES=$NUMBER_OF_PROCESSORS
50123     FOUND_CORES=yes
50124   fi
50125 
50126   if test "x$FOUND_CORES" = xyes; then
50127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50128 $as_echo "$NUM_CORES" >&6; }
50129   else
50130     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50131 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
50132     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50133 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50134   fi
50135 
50136   else
50137     NUM_CORES=$with_num_cores
50138   fi
50139 
50140 
50141 
50142   # How much memory do we have on this build system?
50143 
50144 # Check whether --with-memory-size was given.
50145 if test "${with_memory_size+set}" = set; then :
50146   withval=$with_memory_size;
50147 fi
50148 
50149   if test "x$with_memory_size" = x; then
50150     # The memory size was not specified, try to probe it.
50151 
50152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50153 $as_echo_n "checking for memory size... " >&6; }
50154   # Default to 1024 MB
50155   MEMORY_SIZE=1024
50156   FOUND_MEM=no
50157 
50158   if test -f /proc/meminfo; then
50159     # Looks like a Linux (or cygwin) system
50160     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50161     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50162     FOUND_MEM=yes
50163   elif test -x /usr/sbin/prtconf; then
50164     # Looks like a Solaris or AIX system
50165     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50166     FOUND_MEM=yes
50167   elif test -x /usr/sbin/system_profiler; then
50168     # Looks like a MacOSX system
50169     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50170     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50171     FOUND_MEM=yes
50172   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50173     # Windows, but without cygwin
50174     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50175     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50176     FOUND_MEM=yes
50177   fi
50178 
50179   if test "x$FOUND_MEM" = xyes; then
50180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50181 $as_echo "$MEMORY_SIZE MB" >&6; }
50182   else
50183     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50184 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50185     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50186 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50187   fi
50188 
50189   else
50190     MEMORY_SIZE=$with_memory_size
50191   fi
50192 
50193 
50194 
50195   # Provide a decent default number of parallel jobs for make depending on
50196   # number of cores, amount of memory and machine architecture.
50197 
50198 # Check whether --with-jobs was given.
50199 if test "${with_jobs+set}" = set; then :
50200   withval=$with_jobs;
50201 fi
50202 
50203   if test "x$with_jobs" = x; then
50204     # Number of jobs was not specified, calculate.
50205     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50206 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50207     # Approximate memory in GB.
50208     memory_gb=`expr $MEMORY_SIZE / 1024`
50209     # Pick the lowest of memory in gb and number of cores.
50210     if test "$memory_gb" -lt "$NUM_CORES"; then
50211       JOBS="$memory_gb"
50212     else
50213       JOBS="$NUM_CORES"
50214       # On bigger machines, leave some room for other processes to run
50215       if test "$JOBS" -gt "4"; then
50216         JOBS=`expr $JOBS '*' 90 / 100`
50217       fi
50218     fi
50219     # Cap number of jobs to 16
50220     if test "$JOBS" -gt "16"; then
50221       JOBS=16
50222     fi
50223     if test "$JOBS" -eq "0"; then
50224       JOBS=1
50225     fi
50226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50227 $as_echo "$JOBS" >&6; }
50228   else
50229     JOBS=$with_jobs
50230   fi
50231 
50232 
50233 
50234 # Setup arguments for the boot jdk (after cores and memory have been setup)
50235 
50236   ##############################################################################
50237   #
50238   # Specify jvm options for anything that is run with the Boot JDK.
50239   # Not all JVM:s accept the same arguments on the command line.
50240   #
50241 
50242 # Check whether --with-boot-jdk-jvmargs was given.
50243 if test "${with_boot_jdk_jvmargs+set}" = set; then :
50244   withval=$with_boot_jdk_jvmargs;
50245 fi
50246 
50247 
50248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50249 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
50250 
50251   # Disable special log output when a debug build is used as Boot JDK...
50252 
50253   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50254   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50255   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50256   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50257   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50258   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50259     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50260     JVM_ARG_OK=true
50261   else
50262     $ECHO "Arg failed:" >&5
50263     $ECHO "$OUTPUT" >&5
50264     JVM_ARG_OK=false
50265   fi
50266 
50267 
50268   # Apply user provided options.
50269 
50270   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50271   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50272   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50273   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50274   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50275   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50276     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50277     JVM_ARG_OK=true
50278   else
50279     $ECHO "Arg failed:" >&5
50280     $ECHO "$OUTPUT" >&5
50281     JVM_ARG_OK=false
50282   fi
50283 
50284 
50285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50286 $as_echo "$boot_jdk_jvmargs" >&6; }
50287 
50288   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50289   JAVA_FLAGS=$boot_jdk_jvmargs
50290 
50291 
50292 
50293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50294 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50295 
50296   # Starting amount of heap memory.
50297 
50298   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50299   $ECHO "Command: $JAVA -Xms64M -version" >&5
50300   OUTPUT=`$JAVA -Xms64M -version 2>&1`
50301   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50302   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50303   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50304     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50305     JVM_ARG_OK=true
50306   else
50307     $ECHO "Arg failed:" >&5
50308     $ECHO "$OUTPUT" >&5
50309     JVM_ARG_OK=false
50310   fi
50311 
50312 
50313   # Maximum amount of heap memory.
50314   # Maximum stack size.
50315   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50316   if test "x$BUILD_NUM_BITS" = x32; then
50317     if test "$JVM_MAX_HEAP" -gt "1100"; then
50318       JVM_MAX_HEAP=1100
50319     elif test "$JVM_MAX_HEAP" -lt "512"; then
50320       JVM_MAX_HEAP=512
50321     fi
50322     STACK_SIZE=768
50323   else
50324     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50325     # pointers are used. Apparently, we need to increase the heap and stack
50326     # space for the jvm. More specifically, when running javac to build huge
50327     # jdk batch
50328     if test "$JVM_MAX_HEAP" -gt "1600"; then
50329       JVM_MAX_HEAP=1600
50330     elif test "$JVM_MAX_HEAP" -lt "512"; then
50331       JVM_MAX_HEAP=512
50332     fi
50333     STACK_SIZE=1536
50334   fi
50335 
50336   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50337   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50338   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50339   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50340   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50341   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50342     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50343     JVM_ARG_OK=true
50344   else
50345     $ECHO "Arg failed:" >&5
50346     $ECHO "$OUTPUT" >&5
50347     JVM_ARG_OK=false
50348   fi
50349 
50350 
50351   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50352   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50353   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50354   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50355   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50356   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50357     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50358     JVM_ARG_OK=true
50359   else
50360     $ECHO "Arg failed:" >&5
50361     $ECHO "$OUTPUT" >&5
50362     JVM_ARG_OK=false
50363   fi
50364 
50365 
50366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50367 $as_echo "$boot_jdk_jvmargs_big" >&6; }
50368 
50369   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50370 
50371 
50372 
50373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50374 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50375 
50376   # Use serial gc for small short lived tools if possible
50377 
50378   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50379   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50380   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50381   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50382   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50383   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50384     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50385     JVM_ARG_OK=true
50386   else
50387     $ECHO "Arg failed:" >&5
50388     $ECHO "$OUTPUT" >&5
50389     JVM_ARG_OK=false
50390   fi
50391 
50392 
50393   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50394   $ECHO "Command: $JAVA -Xms32M -version" >&5
50395   OUTPUT=`$JAVA -Xms32M -version 2>&1`
50396   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50397   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50398   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50399     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50400     JVM_ARG_OK=true
50401   else
50402     $ECHO "Arg failed:" >&5
50403     $ECHO "$OUTPUT" >&5
50404     JVM_ARG_OK=false
50405   fi
50406 
50407 
50408   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50409   $ECHO "Command: $JAVA -Xmx512M -version" >&5
50410   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50411   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50412   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50413   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50414     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50415     JVM_ARG_OK=true
50416   else
50417     $ECHO "Arg failed:" >&5
50418     $ECHO "$OUTPUT" >&5
50419     JVM_ARG_OK=false
50420   fi
50421 
50422 
50423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50424 $as_echo "$boot_jdk_jvmargs_small" >&6; }
50425 
50426   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50427 
50428 
50429   JAVA_TOOL_FLAGS_SMALL=""
50430   for f in $JAVA_FLAGS_SMALL; do
50431     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50432   done
50433 
50434 
50435 
50436 # Setup smart javac (after cores and memory have been setup)
50437 
50438 
50439 # Check whether --with-sjavac-server-java was given.
50440 if test "${with_sjavac_server_java+set}" = set; then :
50441   withval=$with_sjavac_server_java;
50442 fi
50443 
50444 
50445   if test "x$with_sjavac_server_java" != x; then
50446     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50447     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50448     if test "x$FOUND_VERSION" = x; then
50449       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50450     fi
50451   else
50452     SJAVAC_SERVER_JAVA="$JAVA"
50453   fi
50454 
50455 
50456   if test "$MEMORY_SIZE" -gt "3000"; then
50457 
50458   $ECHO "Check if jvm arg is ok: -d64" >&5
50459   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50460   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50461   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50462   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50463   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50464     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50465     JVM_ARG_OK=true
50466   else
50467     $ECHO "Arg failed:" >&5
50468     $ECHO "$OUTPUT" >&5
50469     JVM_ARG_OK=false
50470   fi
50471 
50472     if test "$JVM_ARG_OK" = true; then
50473       JVM_64BIT=true
50474       JVM_ARG_OK=false
50475     fi
50476   fi
50477 
50478   MX_VALUE=`expr $MEMORY_SIZE / 2`
50479   if test "$JVM_64BIT" = true; then
50480     # Set ms lower than mx since more than one instance of the server might
50481     # get launched at the same time before they figure out which instance won.
50482     MS_VALUE=512
50483     if test "$MX_VALUE" -gt "2048"; then
50484       MX_VALUE=2048
50485     fi
50486   else
50487     MS_VALUE=256
50488     if test "$MX_VALUE" -gt "1500"; then
50489       MX_VALUE=1500
50490     fi
50491   fi
50492   if test "$MX_VALUE" -lt "512"; then
50493     MX_VALUE=512
50494   fi
50495 
50496   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50497   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50498   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50499   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50500   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50501   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50502     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50503     JVM_ARG_OK=true
50504   else
50505     $ECHO "Arg failed:" >&5
50506     $ECHO "$OUTPUT" >&5
50507     JVM_ARG_OK=false
50508   fi
50509 
50510 
50511 
50512   # Check whether --enable-sjavac was given.
50513 if test "${enable_sjavac+set}" = set; then :
50514   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50515 else
50516   ENABLE_SJAVAC='no'
50517 fi
50518 
50519   if test "x$JVM_ARG_OK" = "xfalse"; then
50520     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50521 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50522     ENABLE_SJAVAC=no;
50523   fi
50524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50525 $as_echo_n "checking whether to use sjavac... " >&6; }
50526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50527 $as_echo "$ENABLE_SJAVAC" >&6; }
50528 
50529 
50530   if test "x$ENABLE_SJAVAC" = xyes; then
50531     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50532   else
50533     SJAVAC_SERVER_DIR=
50534   fi
50535 
50536 
50537 
50538 # Can the C/C++ compiler use precompiled headers?
50539 
50540 
50541   ###############################################################################
50542   #
50543   # Can the C/C++ compiler use precompiled headers?
50544   #
50545   # Check whether --enable-precompiled-headers was given.
50546 if test "${enable_precompiled_headers+set}" = set; then :
50547   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50548 else
50549   ENABLE_PRECOMPH=yes
50550 fi
50551 
50552 
50553   USE_PRECOMPILED_HEADER=1
50554   if test "x$ENABLE_PRECOMPH" = xno; then
50555     USE_PRECOMPILED_HEADER=0
50556   fi
50557 
50558   if test "x$ENABLE_PRECOMPH" = xyes; then
50559     # Check that the compiler actually supports precomp headers.
50560     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50561       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50562 $as_echo_n "checking that precompiled headers work... " >&6; }
50563       echo "int alfa();" > conftest.h
50564       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50565       if test ! -f conftest.hpp.gch; then
50566         USE_PRECOMPILED_HEADER=0
50567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50568 $as_echo "no" >&6; }
50569       else
50570         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50571 $as_echo "yes" >&6; }
50572       fi
50573       rm -f conftest.h conftest.hpp.gch
50574     fi
50575   fi
50576 
50577 
50578 
50579 
50580 # Setup use of ccache, if available
50581 
50582   # Check whether --enable-ccache was given.
50583 if test "${enable_ccache+set}" = set; then :
50584   enableval=$enable_ccache;
50585 fi
50586 
50587 
50588   CCACHE=
50589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50590 $as_echo_n "checking is ccache enabled... " >&6; }
50591   ENABLE_CCACHE=$enable_ccache
50592   if test "x$enable_ccache" = xyes; then
50593     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50594 $as_echo "yes" >&6; }
50595     OLD_PATH="$PATH"
50596     if test "x$TOOLCHAIN_PATH" != x; then
50597       PATH=$TOOLCHAIN_PATH:$PATH
50598     fi
50599 
50600 
50601 
50602   # Publish this variable in the help.
50603 
50604 
50605   if test "x$CCACHE" = x; then
50606     # The variable is not set by user, try to locate tool using the code snippet
50607     for ac_prog in ccache
50608 do
50609   # Extract the first word of "$ac_prog", so it can be a program name with args.
50610 set dummy $ac_prog; ac_word=$2
50611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50612 $as_echo_n "checking for $ac_word... " >&6; }
50613 if ${ac_cv_path_CCACHE+:} false; then :
50614   $as_echo_n "(cached) " >&6
50615 else
50616   case $CCACHE in
50617   [\\/]* | ?:[\\/]*)
50618   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50619   ;;
50620   *)
50621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50622 for as_dir in $PATH
50623 do
50624   IFS=$as_save_IFS
50625   test -z "$as_dir" && as_dir=.
50626     for ac_exec_ext in '' $ac_executable_extensions; do
50627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50628     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50630     break 2
50631   fi
50632 done
50633   done
50634 IFS=$as_save_IFS
50635 
50636   ;;
50637 esac
50638 fi
50639 CCACHE=$ac_cv_path_CCACHE
50640 if test -n "$CCACHE"; then
50641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50642 $as_echo "$CCACHE" >&6; }
50643 else
50644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50645 $as_echo "no" >&6; }
50646 fi
50647 
50648 
50649   test -n "$CCACHE" && break
50650 done
50651 
50652   else
50653     # The variable is set, but is it from the command line or the environment?
50654 
50655     # Try to remove the string !CCACHE! from our list.
50656     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50657     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50658       # If it failed, the variable was not from the command line. Ignore it,
50659       # but warn the user (except for BASH, which is always set by the calling BASH).
50660       if test "xCCACHE" != xBASH; then
50661         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50662 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50663       fi
50664       # Try to locate tool using the code snippet
50665       for ac_prog in ccache
50666 do
50667   # Extract the first word of "$ac_prog", so it can be a program name with args.
50668 set dummy $ac_prog; ac_word=$2
50669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50670 $as_echo_n "checking for $ac_word... " >&6; }
50671 if ${ac_cv_path_CCACHE+:} false; then :
50672   $as_echo_n "(cached) " >&6
50673 else
50674   case $CCACHE in
50675   [\\/]* | ?:[\\/]*)
50676   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50677   ;;
50678   *)
50679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50680 for as_dir in $PATH
50681 do
50682   IFS=$as_save_IFS
50683   test -z "$as_dir" && as_dir=.
50684     for ac_exec_ext in '' $ac_executable_extensions; do
50685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50686     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50688     break 2
50689   fi
50690 done
50691   done
50692 IFS=$as_save_IFS
50693 
50694   ;;
50695 esac
50696 fi
50697 CCACHE=$ac_cv_path_CCACHE
50698 if test -n "$CCACHE"; then
50699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50700 $as_echo "$CCACHE" >&6; }
50701 else
50702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50703 $as_echo "no" >&6; }
50704 fi
50705 
50706 
50707   test -n "$CCACHE" && break
50708 done
50709 
50710     else
50711       # If it succeeded, then it was overridden by the user. We will use it
50712       # for the tool.
50713 
50714       # First remove it from the list of overridden variables, so we can test
50715       # for unknown variables in the end.
50716       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50717 
50718       # Check if the provided tool contains a complete path.
50719       tool_specified="$CCACHE"
50720       tool_basename="${tool_specified##*/}"
50721       if test "x$tool_basename" = "x$tool_specified"; then
50722         # A command without a complete path is provided, search $PATH.
50723         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50724 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50725         # Extract the first word of "$tool_basename", so it can be a program name with args.
50726 set dummy $tool_basename; ac_word=$2
50727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50728 $as_echo_n "checking for $ac_word... " >&6; }
50729 if ${ac_cv_path_CCACHE+:} false; then :
50730   $as_echo_n "(cached) " >&6
50731 else
50732   case $CCACHE in
50733   [\\/]* | ?:[\\/]*)
50734   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50735   ;;
50736   *)
50737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50738 for as_dir in $PATH
50739 do
50740   IFS=$as_save_IFS
50741   test -z "$as_dir" && as_dir=.
50742     for ac_exec_ext in '' $ac_executable_extensions; do
50743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50744     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50746     break 2
50747   fi
50748 done
50749   done
50750 IFS=$as_save_IFS
50751 
50752   ;;
50753 esac
50754 fi
50755 CCACHE=$ac_cv_path_CCACHE
50756 if test -n "$CCACHE"; then
50757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50758 $as_echo "$CCACHE" >&6; }
50759 else
50760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50761 $as_echo "no" >&6; }
50762 fi
50763 
50764 
50765         if test "x$CCACHE" = x; then
50766           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50767         fi
50768       else
50769         # Otherwise we believe it is a complete path. Use it as it is.
50770         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50771 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50772         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50773 $as_echo_n "checking for CCACHE... " >&6; }
50774         if test ! -x "$tool_specified"; then
50775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50776 $as_echo "not found" >&6; }
50777           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50778         fi
50779         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50780 $as_echo "$tool_specified" >&6; }
50781       fi
50782     fi
50783   fi
50784 
50785 
50786 
50787   if test "x$CCACHE" = x; then
50788     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50789   fi
50790 
50791 
50792     CCACHE_STATUS="enabled"
50793     PATH="$OLD_PATH"
50794   elif test "x$enable_ccache" = xno; then
50795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50796 $as_echo "no, explicitly disabled" >&6; }
50797   elif test "x$enable_ccache" = x; then
50798     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50799 $as_echo "no" >&6; }
50800   else
50801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50802 $as_echo "unknown" >&6; }
50803     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50804   fi
50805 
50806 
50807 
50808 # Check whether --with-ccache-dir was given.
50809 if test "${with_ccache_dir+set}" = set; then :
50810   withval=$with_ccache_dir;
50811 fi
50812 
50813 
50814   if test "x$with_ccache_dir" != x; then
50815     # When using a non home ccache directory, assume the use is to share ccache files
50816     # with other users. Thus change the umask.
50817     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50818     if test "x$CCACHE" = x; then
50819       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50820 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50821     fi
50822   fi
50823 
50824   if test "x$CCACHE" != x; then
50825 
50826   if test "x$CCACHE" != x; then
50827     # Only use ccache if it is 3.1.4 or later, which supports
50828     # precompiled headers.
50829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50830 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50831     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50832     if test "x$HAS_GOOD_CCACHE" = x; then
50833       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50834 $as_echo "no, disabling ccache" >&6; }
50835       CCACHE=
50836       CCACHE_STATUS="disabled"
50837     else
50838       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50839 $as_echo "yes" >&6; }
50840       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50841 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50842       PUSHED_FLAGS="$CXXFLAGS"
50843       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50844       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50845 /* end confdefs.h.  */
50846 
50847 int
50848 main ()
50849 {
50850 
50851   ;
50852   return 0;
50853 }
50854 _ACEOF
50855 if ac_fn_cxx_try_compile "$LINENO"; then :
50856   CC_KNOWS_CCACHE_TRICK=yes
50857 else
50858   CC_KNOWS_CCACHE_TRICK=no
50859 fi
50860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50861       CXXFLAGS="$PUSHED_FLAGS"
50862       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50863         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50864 $as_echo "yes" >&6; }
50865       else
50866         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50867 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
50868         CCACHE=
50869         CCACHE_STATUS="disabled"
50870       fi
50871     fi
50872   fi
50873 
50874   if test "x$CCACHE" != x; then
50875     CCACHE_SLOPPINESS=time_macros
50876     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50877     CCACHE_FLAGS=-fpch-preprocess
50878 
50879     if test "x$SET_CCACHE_DIR" != x; then
50880       mkdir -p $CCACHE_DIR > /dev/null 2>&1
50881       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50882     fi
50883   fi
50884 
50885   fi
50886 
50887 
50888 ###############################################################################
50889 #
50890 # And now the finish...
50891 #
50892 ###############################################################################
50893 
50894 # Check for some common pitfalls
50895 
50896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50897     file_to_test="$SRC_ROOT/LICENSE"
50898     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50899       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
50900     fi
50901   fi
50902 
50903 
50904   # Did user specify any unknown variables?
50905 
50906   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50907     # Replace the separating ! with spaces before presenting for end user.
50908     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50909     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50910 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50911   fi
50912 
50913 
50914   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50915 $as_echo_n "checking if build directory is on local disk... " >&6; }
50916 
50917   # df -l lists only local disks; if the given directory is not found then
50918   # a non-zero exit code is given
50919   if test "x$DF" = x; then
50920     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50921       # msys does not have df; use Windows "net use" instead.
50922       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50923       if test "x$IS_NETWORK_DISK" = x; then
50924         OUTPUT_DIR_IS_LOCAL="yes"
50925       else
50926         OUTPUT_DIR_IS_LOCAL="no"
50927       fi
50928     else
50929       # No df here, say it's local
50930       OUTPUT_DIR_IS_LOCAL="yes"
50931     fi
50932   else
50933     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50934       OUTPUT_DIR_IS_LOCAL="yes"
50935     else
50936       OUTPUT_DIR_IS_LOCAL="no"
50937     fi
50938   fi
50939 
50940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50941 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50942 
50943 
50944 
50945   # Check if the user has any old-style ALT_ variables set.
50946   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50947 
50948   # Before generating output files, test if they exist. If they do, this is a reconfigure.
50949   # Since we can't properly handle the dependencies for this, warn the user about the situation
50950   if test -e $OUTPUT_ROOT/spec.gmk; then
50951     IS_RECONFIGURE=yes
50952   else
50953     IS_RECONFIGURE=no
50954   fi
50955 
50956 
50957 # At the end, call the custom hook. (Dummy macro if no custom sources available)
50958 
50959 
50960 # We're messing a bit with internal autoconf variables to put the config.status
50961 # in the output directory instead of the current directory.
50962 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50963 
50964 # Create the actual output files. Now the main work of configure is done.
50965 cat >confcache <<\_ACEOF
50966 # This file is a shell script that caches the results of configure
50967 # tests run on this system so they can be shared between configure
50968 # scripts and configure runs, see configure's option --config-cache.
50969 # It is not useful on other systems.  If it contains results you don't
50970 # want to keep, you may remove or edit it.
50971 #
50972 # config.status only pays attention to the cache file if you give it
50973 # the --recheck option to rerun configure.
50974 #
50975 # `ac_cv_env_foo' variables (set or unset) will be overridden when
50976 # loading this file, other *unset* `ac_cv_foo' will be assigned the
50977 # following values.
50978 
50979 _ACEOF
50980 
50981 # The following way of writing the cache mishandles newlines in values,
50982 # but we know of no workaround that is simple, portable, and efficient.
50983 # So, we kill variables containing newlines.
50984 # Ultrix sh set writes to stderr and can't be redirected directly,
50985 # and sets the high bit in the cache file unless we assign to the vars.
50986 (
50987   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50988     eval ac_val=\$$ac_var
50989     case $ac_val in #(
50990     *${as_nl}*)
50991       case $ac_var in #(
50992       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50993 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50994       esac
50995       case $ac_var in #(
50996       _ | IFS | as_nl) ;; #(
50997       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50998       *) { eval $ac_var=; unset $ac_var;} ;;
50999       esac ;;
51000     esac
51001   done
51002 
51003   (set) 2>&1 |
51004     case $as_nl`(ac_space=' '; set) 2>&1` in #(
51005     *${as_nl}ac_space=\ *)
51006       # `set' does not quote correctly, so add quotes: double-quote
51007       # substitution turns \\\\ into \\, and sed turns \\ into \.
51008       sed -n \
51009         "s/'/'\\\\''/g;
51010           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51011       ;; #(
51012     *)
51013       # `set' quotes correctly as required by POSIX, so do not add quotes.
51014       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51015       ;;
51016     esac |
51017     sort
51018 ) |
51019   sed '
51020      /^ac_cv_env_/b end
51021      t clear
51022      :clear
51023      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51024      t end
51025      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51026      :end' >>confcache
51027 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51028   if test -w "$cache_file"; then
51029     if test "x$cache_file" != "x/dev/null"; then
51030       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51031 $as_echo "$as_me: updating cache $cache_file" >&6;}
51032       if test ! -f "$cache_file" || test -h "$cache_file"; then
51033         cat confcache >"$cache_file"
51034       else
51035         case $cache_file in #(
51036         */* | ?:*)
51037           mv -f confcache "$cache_file"$$ &&
51038           mv -f "$cache_file"$$ "$cache_file" ;; #(
51039         *)
51040           mv -f confcache "$cache_file" ;;
51041         esac
51042       fi
51043     fi
51044   else
51045     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51046 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51047   fi
51048 fi
51049 rm -f confcache
51050 
51051 test "x$prefix" = xNONE && prefix=$ac_default_prefix
51052 # Let make expand exec_prefix.
51053 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51054 
51055 # Transform confdefs.h into DEFS.
51056 # Protect against shell expansion while executing Makefile rules.
51057 # Protect against Makefile macro expansion.
51058 #
51059 # If the first sed substitution is executed (which looks for macros that
51060 # take arguments), then branch to the quote section.  Otherwise,
51061 # look for a macro that doesn't take arguments.
51062 ac_script='
51063 :mline
51064 /\\$/{
51065  N
51066  s,\\\n,,
51067  b mline
51068 }
51069 t clear
51070 :clear
51071 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
51072 t quote
51073 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
51074 t quote
51075 b any
51076 :quote
51077 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51078 s/\[/\\&/g
51079 s/\]/\\&/g
51080 s/\$/$$/g
51081 H
51082 :any
51083 ${
51084         g
51085         s/^\n//
51086         s/\n/ /g
51087         p
51088 }
51089 '
51090 DEFS=`sed -n "$ac_script" confdefs.h`
51091 
51092 
51093 ac_libobjs=
51094 ac_ltlibobjs=
51095 U=
51096 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51097   # 1. Remove the extension, and $U if already installed.
51098   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51099   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51100   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51101   #    will be set to the directory where LIBOBJS objects are built.
51102   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51103   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51104 done
51105 LIBOBJS=$ac_libobjs
51106 
51107 LTLIBOBJS=$ac_ltlibobjs
51108 
51109 
51110 
51111 : "${CONFIG_STATUS=./config.status}"
51112 ac_write_fail=0
51113 ac_clean_files_save=$ac_clean_files
51114 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51115 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51116 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51117 as_write_fail=0
51118 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51119 #! $SHELL
51120 # Generated by $as_me.
51121 # Run this file to recreate the current configuration.
51122 # Compiler output produced by configure, useful for debugging
51123 # configure, is in config.log if it exists.
51124 
51125 debug=false
51126 ac_cs_recheck=false
51127 ac_cs_silent=false
51128 
51129 SHELL=\${CONFIG_SHELL-$SHELL}
51130 export SHELL
51131 _ASEOF
51132 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51133 ## -------------------- ##
51134 ## M4sh Initialization. ##
51135 ## -------------------- ##
51136 
51137 # Be more Bourne compatible
51138 DUALCASE=1; export DUALCASE # for MKS sh
51139 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51140   emulate sh
51141   NULLCMD=:
51142   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51143   # is contrary to our usage.  Disable this feature.
51144   alias -g '${1+"$@"}'='"$@"'
51145   setopt NO_GLOB_SUBST
51146 else
51147   case `(set -o) 2>/dev/null` in #(
51148   *posix*) :
51149     set -o posix ;; #(
51150   *) :
51151      ;;
51152 esac
51153 fi
51154 
51155 
51156 as_nl='
51157 '
51158 export as_nl
51159 # Printing a long string crashes Solaris 7 /usr/bin/printf.
51160 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51161 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51162 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51163 # Prefer a ksh shell builtin over an external printf program on Solaris,
51164 # but without wasting forks for bash or zsh.
51165 if test -z "$BASH_VERSION$ZSH_VERSION" \
51166     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51167   as_echo='print -r --'
51168   as_echo_n='print -rn --'
51169 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51170   as_echo='printf %s\n'
51171   as_echo_n='printf %s'
51172 else
51173   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51174     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51175     as_echo_n='/usr/ucb/echo -n'
51176   else
51177     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51178     as_echo_n_body='eval
51179       arg=$1;
51180       case $arg in #(
51181       *"$as_nl"*)
51182         expr "X$arg" : "X\\(.*\\)$as_nl";
51183         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51184       esac;
51185       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51186     '
51187     export as_echo_n_body
51188     as_echo_n='sh -c $as_echo_n_body as_echo'
51189   fi
51190   export as_echo_body
51191   as_echo='sh -c $as_echo_body as_echo'
51192 fi
51193 
51194 # The user is always right.
51195 if test "${PATH_SEPARATOR+set}" != set; then
51196   PATH_SEPARATOR=:
51197   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51198     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51199       PATH_SEPARATOR=';'
51200   }
51201 fi
51202 
51203 
51204 # IFS
51205 # We need space, tab and new line, in precisely that order.  Quoting is
51206 # there to prevent editors from complaining about space-tab.
51207 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51208 # splitting by setting IFS to empty value.)
51209 IFS=" ""        $as_nl"
51210 
51211 # Find who we are.  Look in the path if we contain no directory separator.
51212 as_myself=
51213 case $0 in #((
51214   *[\\/]* ) as_myself=$0 ;;
51215   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51216 for as_dir in $PATH
51217 do
51218   IFS=$as_save_IFS
51219   test -z "$as_dir" && as_dir=.
51220     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51221   done
51222 IFS=$as_save_IFS
51223 
51224      ;;
51225 esac
51226 # We did not find ourselves, most probably we were run as `sh COMMAND'
51227 # in which case we are not to be found in the path.
51228 if test "x$as_myself" = x; then
51229   as_myself=$0
51230 fi
51231 if test ! -f "$as_myself"; then
51232   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51233   exit 1
51234 fi
51235 
51236 # Unset variables that we do not need and which cause bugs (e.g. in
51237 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51238 # suppresses any "Segmentation fault" message there.  '((' could
51239 # trigger a bug in pdksh 5.2.14.
51240 for as_var in BASH_ENV ENV MAIL MAILPATH
51241 do eval test x\${$as_var+set} = xset \
51242   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51243 done
51244 PS1='$ '
51245 PS2='> '
51246 PS4='+ '
51247 
51248 # NLS nuisances.
51249 LC_ALL=C
51250 export LC_ALL
51251 LANGUAGE=C
51252 export LANGUAGE
51253 
51254 # CDPATH.
51255 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51256 
51257 
51258 # as_fn_error STATUS ERROR [LINENO LOG_FD]
51259 # ----------------------------------------
51260 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51261 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51262 # script with STATUS, using 1 if that was 0.
51263 as_fn_error ()
51264 {
51265   as_status=$1; test $as_status -eq 0 && as_status=1
51266   if test "$4"; then
51267     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51268     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51269   fi
51270   $as_echo "$as_me: error: $2" >&2
51271   as_fn_exit $as_status
51272 } # as_fn_error
51273 
51274 
51275 # as_fn_set_status STATUS
51276 # -----------------------
51277 # Set $? to STATUS, without forking.
51278 as_fn_set_status ()
51279 {
51280   return $1
51281 } # as_fn_set_status
51282 
51283 # as_fn_exit STATUS
51284 # -----------------
51285 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51286 as_fn_exit ()
51287 {
51288   set +e
51289   as_fn_set_status $1
51290   exit $1
51291 } # as_fn_exit
51292 
51293 # as_fn_unset VAR
51294 # ---------------
51295 # Portably unset VAR.
51296 as_fn_unset ()
51297 {
51298   { eval $1=; unset $1;}
51299 }
51300 as_unset=as_fn_unset
51301 # as_fn_append VAR VALUE
51302 # ----------------------
51303 # Append the text in VALUE to the end of the definition contained in VAR. Take
51304 # advantage of any shell optimizations that allow amortized linear growth over
51305 # repeated appends, instead of the typical quadratic growth present in naive
51306 # implementations.
51307 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51308   eval 'as_fn_append ()
51309   {
51310     eval $1+=\$2
51311   }'
51312 else
51313   as_fn_append ()
51314   {
51315     eval $1=\$$1\$2
51316   }
51317 fi # as_fn_append
51318 
51319 # as_fn_arith ARG...
51320 # ------------------
51321 # Perform arithmetic evaluation on the ARGs, and store the result in the
51322 # global $as_val. Take advantage of shells that can avoid forks. The arguments
51323 # must be portable across $(()) and expr.
51324 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51325   eval 'as_fn_arith ()
51326   {
51327     as_val=$(( $* ))
51328   }'
51329 else
51330   as_fn_arith ()
51331   {
51332     as_val=`expr "$@" || test $? -eq 1`
51333   }
51334 fi # as_fn_arith
51335 
51336 
51337 if expr a : '\(a\)' >/dev/null 2>&1 &&
51338    test "X`expr 00001 : '.*\(...\)'`" = X001; then
51339   as_expr=expr
51340 else
51341   as_expr=false
51342 fi
51343 
51344 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51345   as_basename=basename
51346 else
51347   as_basename=false
51348 fi
51349 
51350 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51351   as_dirname=dirname
51352 else
51353   as_dirname=false
51354 fi
51355 
51356 as_me=`$as_basename -- "$0" ||
51357 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51358          X"$0" : 'X\(//\)$' \| \
51359          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51360 $as_echo X/"$0" |
51361     sed '/^.*\/\([^/][^/]*\)\/*$/{
51362             s//\1/
51363             q
51364           }
51365           /^X\/\(\/\/\)$/{
51366             s//\1/
51367             q
51368           }
51369           /^X\/\(\/\).*/{
51370             s//\1/
51371             q
51372           }
51373           s/.*/./; q'`
51374 
51375 # Avoid depending upon Character Ranges.
51376 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51377 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51378 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51379 as_cr_digits='0123456789'
51380 as_cr_alnum=$as_cr_Letters$as_cr_digits
51381 
51382 ECHO_C= ECHO_N= ECHO_T=
51383 case `echo -n x` in #(((((
51384 -n*)
51385   case `echo 'xy\c'` in
51386   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
51387   xy)  ECHO_C='\c';;
51388   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51389        ECHO_T=' ';;
51390   esac;;
51391 *)
51392   ECHO_N='-n';;
51393 esac
51394 
51395 rm -f conf$$ conf$$.exe conf$$.file
51396 if test -d conf$$.dir; then
51397   rm -f conf$$.dir/conf$$.file
51398 else
51399   rm -f conf$$.dir
51400   mkdir conf$$.dir 2>/dev/null
51401 fi
51402 if (echo >conf$$.file) 2>/dev/null; then
51403   if ln -s conf$$.file conf$$ 2>/dev/null; then
51404     as_ln_s='ln -s'
51405     # ... but there are two gotchas:
51406     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51407     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51408     # In both cases, we have to default to `cp -pR'.
51409     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51410       as_ln_s='cp -pR'
51411   elif ln conf$$.file conf$$ 2>/dev/null; then
51412     as_ln_s=ln
51413   else
51414     as_ln_s='cp -pR'
51415   fi
51416 else
51417   as_ln_s='cp -pR'
51418 fi
51419 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51420 rmdir conf$$.dir 2>/dev/null
51421 
51422 
51423 # as_fn_mkdir_p
51424 # -------------
51425 # Create "$as_dir" as a directory, including parents if necessary.
51426 as_fn_mkdir_p ()
51427 {
51428 
51429   case $as_dir in #(
51430   -*) as_dir=./$as_dir;;
51431   esac
51432   test -d "$as_dir" || eval $as_mkdir_p || {
51433     as_dirs=
51434     while :; do
51435       case $as_dir in #(
51436       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51437       *) as_qdir=$as_dir;;
51438       esac
51439       as_dirs="'$as_qdir' $as_dirs"
51440       as_dir=`$as_dirname -- "$as_dir" ||
51441 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51442          X"$as_dir" : 'X\(//\)[^/]' \| \
51443          X"$as_dir" : 'X\(//\)$' \| \
51444          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51445 $as_echo X"$as_dir" |
51446     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51447             s//\1/
51448             q
51449           }
51450           /^X\(\/\/\)[^/].*/{
51451             s//\1/
51452             q
51453           }
51454           /^X\(\/\/\)$/{
51455             s//\1/
51456             q
51457           }
51458           /^X\(\/\).*/{
51459             s//\1/
51460             q
51461           }
51462           s/.*/./; q'`
51463       test -d "$as_dir" && break
51464     done
51465     test -z "$as_dirs" || eval "mkdir $as_dirs"
51466   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51467 
51468 
51469 } # as_fn_mkdir_p
51470 if mkdir -p . 2>/dev/null; then
51471   as_mkdir_p='mkdir -p "$as_dir"'
51472 else
51473   test -d ./-p && rmdir ./-p
51474   as_mkdir_p=false
51475 fi
51476 
51477 
51478 # as_fn_executable_p FILE
51479 # -----------------------
51480 # Test if FILE is an executable regular file.
51481 as_fn_executable_p ()
51482 {
51483   test -f "$1" && test -x "$1"
51484 } # as_fn_executable_p
51485 as_test_x='test -x'
51486 as_executable_p=as_fn_executable_p
51487 
51488 # Sed expression to map a string onto a valid CPP name.
51489 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51490 
51491 # Sed expression to map a string onto a valid variable name.
51492 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51493 
51494 
51495 exec 6>&1
51496 ## ----------------------------------- ##
51497 ## Main body of $CONFIG_STATUS script. ##
51498 ## ----------------------------------- ##
51499 _ASEOF
51500 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51501 
51502 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51503 # Save the log message, to keep $0 and so on meaningful, and to
51504 # report actual input values of CONFIG_FILES etc. instead of their
51505 # values after options handling.
51506 ac_log="
51507 This file was extended by OpenJDK $as_me jdk9, which was
51508 generated by GNU Autoconf 2.69.  Invocation command line was
51509 
51510   CONFIG_FILES    = $CONFIG_FILES
51511   CONFIG_HEADERS  = $CONFIG_HEADERS
51512   CONFIG_LINKS    = $CONFIG_LINKS
51513   CONFIG_COMMANDS = $CONFIG_COMMANDS
51514   $ $0 $@
51515 
51516 on `(hostname || uname -n) 2>/dev/null | sed 1q`
51517 "
51518 
51519 _ACEOF
51520 
51521 case $ac_config_files in *"
51522 "*) set x $ac_config_files; shift; ac_config_files=$*;;
51523 esac
51524 
51525 
51526 
51527 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51528 # Files that config.status was made for.
51529 config_files="$ac_config_files"
51530 
51531 _ACEOF
51532 
51533 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51534 ac_cs_usage="\
51535 \`$as_me' instantiates files and other configuration actions
51536 from templates according to the current configuration.  Unless the files
51537 and actions are specified as TAGs, all are instantiated by default.
51538 
51539 Usage: $0 [OPTION]... [TAG]...
51540 
51541   -h, --help       print this help, then exit
51542   -V, --version    print version number and configuration settings, then exit
51543       --config     print configuration, then exit
51544   -q, --quiet, --silent
51545                    do not print progress messages
51546   -d, --debug      don't remove temporary files
51547       --recheck    update $as_me by reconfiguring in the same conditions
51548       --file=FILE[:TEMPLATE]
51549                    instantiate the configuration file FILE
51550 
51551 Configuration files:
51552 $config_files
51553 
51554 Report bugs to <build-dev@openjdk.java.net>.
51555 OpenJDK home page: <http://openjdk.java.net>."
51556 
51557 _ACEOF
51558 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51559 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51560 ac_cs_version="\\
51561 OpenJDK config.status jdk9
51562 configured by $0, generated by GNU Autoconf 2.69,
51563   with options \\"\$ac_cs_config\\"
51564 
51565 Copyright (C) 2012 Free Software Foundation, Inc.
51566 This config.status script is free software; the Free Software Foundation
51567 gives unlimited permission to copy, distribute and modify it."
51568 
51569 ac_pwd='$ac_pwd'
51570 srcdir='$srcdir'
51571 AWK='$AWK'
51572 test -n "\$AWK" || AWK=awk
51573 _ACEOF
51574 
51575 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51576 # The default lists apply if the user does not specify any file.
51577 ac_need_defaults=:
51578 while test $# != 0
51579 do
51580   case $1 in
51581   --*=?*)
51582     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51583     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51584     ac_shift=:
51585     ;;
51586   --*=)
51587     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51588     ac_optarg=
51589     ac_shift=:
51590     ;;
51591   *)
51592     ac_option=$1
51593     ac_optarg=$2
51594     ac_shift=shift
51595     ;;
51596   esac
51597 
51598   case $ac_option in
51599   # Handling of the options.
51600   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51601     ac_cs_recheck=: ;;
51602   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51603     $as_echo "$ac_cs_version"; exit ;;
51604   --config | --confi | --conf | --con | --co | --c )
51605     $as_echo "$ac_cs_config"; exit ;;
51606   --debug | --debu | --deb | --de | --d | -d )
51607     debug=: ;;
51608   --file | --fil | --fi | --f )
51609     $ac_shift
51610     case $ac_optarg in
51611     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51612     '') as_fn_error $? "missing file argument" ;;
51613     esac
51614     as_fn_append CONFIG_FILES " '$ac_optarg'"
51615     ac_need_defaults=false;;
51616   --he | --h |  --help | --hel | -h )
51617     $as_echo "$ac_cs_usage"; exit ;;
51618   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51619   | -silent | --silent | --silen | --sile | --sil | --si | --s)
51620     ac_cs_silent=: ;;
51621 
51622   # This is an error.
51623   -*) as_fn_error $? "unrecognized option: \`$1'
51624 Try \`$0 --help' for more information." ;;
51625 
51626   *) as_fn_append ac_config_targets " $1"
51627      ac_need_defaults=false ;;
51628 
51629   esac
51630   shift
51631 done
51632 
51633 ac_configure_extra_args=
51634 
51635 if $ac_cs_silent; then
51636   exec 6>/dev/null
51637   ac_configure_extra_args="$ac_configure_extra_args --silent"
51638 fi
51639 
51640 _ACEOF
51641 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51642 if \$ac_cs_recheck; then
51643   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51644   shift
51645   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51646   CONFIG_SHELL='$SHELL'
51647   export CONFIG_SHELL
51648   exec "\$@"
51649 fi
51650 
51651 _ACEOF
51652 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51653 exec 5>>config.log
51654 {
51655   echo
51656   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51657 ## Running $as_me. ##
51658 _ASBOX
51659   $as_echo "$ac_log"
51660 } >&5
51661 
51662 _ACEOF
51663 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51664 _ACEOF
51665 
51666 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51667 
51668 # Handling of arguments.
51669 for ac_config_target in $ac_config_targets
51670 do
51671   case $ac_config_target in
51672     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51673     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51674     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51675     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51676     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51677 
51678   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51679   esac
51680 done
51681 
51682 
51683 # If the user did not use the arguments to specify the items to instantiate,
51684 # then the envvar interface is used.  Set only those that are not.
51685 # We use the long form for the default assignment because of an extremely
51686 # bizarre bug on SunOS 4.1.3.
51687 if $ac_need_defaults; then
51688   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51689 fi
51690 
51691 # Have a temporary directory for convenience.  Make it in the build tree
51692 # simply because there is no reason against having it here, and in addition,
51693 # creating and moving files from /tmp can sometimes cause problems.
51694 # Hook for its removal unless debugging.
51695 # Note that there is a small window in which the directory will not be cleaned:
51696 # after its creation but before its name has been assigned to `$tmp'.
51697 $debug ||
51698 {
51699   tmp= ac_tmp=
51700   trap 'exit_status=$?
51701   : "${ac_tmp:=$tmp}"
51702   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51703 ' 0
51704   trap 'as_fn_exit 1' 1 2 13 15
51705 }
51706 # Create a (secure) tmp directory for tmp files.
51707 
51708 {
51709   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51710   test -d "$tmp"
51711 }  ||
51712 {
51713   tmp=./conf$$-$RANDOM
51714   (umask 077 && mkdir "$tmp")
51715 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51716 ac_tmp=$tmp
51717 
51718 # Set up the scripts for CONFIG_FILES section.
51719 # No need to generate them if there are no CONFIG_FILES.
51720 # This happens for instance with `./config.status config.h'.
51721 if test -n "$CONFIG_FILES"; then
51722 
51723 
51724 ac_cr=`echo X | tr X '\015'`
51725 # On cygwin, bash can eat \r inside `` if the user requested igncr.
51726 # But we know of no other shell where ac_cr would be empty at this
51727 # point, so we can use a bashism as a fallback.
51728 if test "x$ac_cr" = x; then
51729   eval ac_cr=\$\'\\r\'
51730 fi
51731 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51732 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51733   ac_cs_awk_cr='\\r'
51734 else
51735   ac_cs_awk_cr=$ac_cr
51736 fi
51737 
51738 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51739 _ACEOF
51740 
51741 
51742 {
51743   echo "cat >conf$$subs.awk <<_ACEOF" &&
51744   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51745   echo "_ACEOF"
51746 } >conf$$subs.sh ||
51747   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51748 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51749 ac_delim='%!_!# '
51750 for ac_last_try in false false false false false :; do
51751   . ./conf$$subs.sh ||
51752     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51753 
51754   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51755   if test $ac_delim_n = $ac_delim_num; then
51756     break
51757   elif $ac_last_try; then
51758     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51759   else
51760     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51761   fi
51762 done
51763 rm -f conf$$subs.sh
51764 
51765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51766 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51767 _ACEOF
51768 sed -n '
51769 h
51770 s/^/S["/; s/!.*/"]=/
51771 p
51772 g
51773 s/^[^!]*!//
51774 :repl
51775 t repl
51776 s/'"$ac_delim"'$//
51777 t delim
51778 :nl
51779 h
51780 s/\(.\{148\}\)..*/\1/
51781 t more1
51782 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51783 p
51784 n
51785 b repl
51786 :more1
51787 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51788 p
51789 g
51790 s/.\{148\}//
51791 t nl
51792 :delim
51793 h
51794 s/\(.\{148\}\)..*/\1/
51795 t more2
51796 s/["\\]/\\&/g; s/^/"/; s/$/"/
51797 p
51798 b
51799 :more2
51800 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51801 p
51802 g
51803 s/.\{148\}//
51804 t delim
51805 ' <conf$$subs.awk | sed '
51806 /^[^""]/{
51807   N
51808   s/\n//
51809 }
51810 ' >>$CONFIG_STATUS || ac_write_fail=1
51811 rm -f conf$$subs.awk
51812 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51813 _ACAWK
51814 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51815   for (key in S) S_is_set[key] = 1
51816   FS = ""
51817 
51818 }
51819 {
51820   line = $ 0
51821   nfields = split(line, field, "@")
51822   substed = 0
51823   len = length(field[1])
51824   for (i = 2; i < nfields; i++) {
51825     key = field[i]
51826     keylen = length(key)
51827     if (S_is_set[key]) {
51828       value = S[key]
51829       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51830       len += length(value) + length(field[++i])
51831       substed = 1
51832     } else
51833       len += 1 + keylen
51834   }
51835 
51836   print line
51837 }
51838 
51839 _ACAWK
51840 _ACEOF
51841 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51842 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51843   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51844 else
51845   cat
51846 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51847   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51848 _ACEOF
51849 
51850 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51851 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51852 # trailing colons and then remove the whole line if VPATH becomes empty
51853 # (actually we leave an empty line to preserve line numbers).
51854 if test "x$srcdir" = x.; then
51855   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
51856 h
51857 s///
51858 s/^/:/
51859 s/[      ]*$/:/
51860 s/:\$(srcdir):/:/g
51861 s/:\${srcdir}:/:/g
51862 s/:@srcdir@:/:/g
51863 s/^:*//
51864 s/:*$//
51865 x
51866 s/\(=[   ]*\).*/\1/
51867 G
51868 s/\n//
51869 s/^[^=]*=[       ]*$//
51870 }'
51871 fi
51872 
51873 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51874 fi # test -n "$CONFIG_FILES"
51875 
51876 
51877 eval set X "  :F $CONFIG_FILES      "
51878 shift
51879 for ac_tag
51880 do
51881   case $ac_tag in
51882   :[FHLC]) ac_mode=$ac_tag; continue;;
51883   esac
51884   case $ac_mode$ac_tag in
51885   :[FHL]*:*);;
51886   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51887   :[FH]-) ac_tag=-:-;;
51888   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51889   esac
51890   ac_save_IFS=$IFS
51891   IFS=:
51892   set x $ac_tag
51893   IFS=$ac_save_IFS
51894   shift
51895   ac_file=$1
51896   shift
51897 
51898   case $ac_mode in
51899   :L) ac_source=$1;;
51900   :[FH])
51901     ac_file_inputs=
51902     for ac_f
51903     do
51904       case $ac_f in
51905       -) ac_f="$ac_tmp/stdin";;
51906       *) # Look for the file first in the build tree, then in the source tree
51907          # (if the path is not absolute).  The absolute path cannot be DOS-style,
51908          # because $ac_f cannot contain `:'.
51909          test -f "$ac_f" ||
51910            case $ac_f in
51911            [\\/$]*) false;;
51912            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51913            esac ||
51914            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51915       esac
51916       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51917       as_fn_append ac_file_inputs " '$ac_f'"
51918     done
51919 
51920     # Let's still pretend it is `configure' which instantiates (i.e., don't
51921     # use $as_me), people would be surprised to read:
51922     #    /* config.h.  Generated by config.status.  */
51923     configure_input='Generated from '`
51924           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51925         `' by configure.'
51926     if test x"$ac_file" != x-; then
51927       configure_input="$ac_file.  $configure_input"
51928       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51929 $as_echo "$as_me: creating $ac_file" >&6;}
51930     fi
51931     # Neutralize special characters interpreted by sed in replacement strings.
51932     case $configure_input in #(
51933     *\&* | *\|* | *\\* )
51934        ac_sed_conf_input=`$as_echo "$configure_input" |
51935        sed 's/[\\\\&|]/\\\\&/g'`;; #(
51936     *) ac_sed_conf_input=$configure_input;;
51937     esac
51938 
51939     case $ac_tag in
51940     *:-:* | *:-) cat >"$ac_tmp/stdin" \
51941       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51942     esac
51943     ;;
51944   esac
51945 
51946   ac_dir=`$as_dirname -- "$ac_file" ||
51947 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51948          X"$ac_file" : 'X\(//\)[^/]' \| \
51949          X"$ac_file" : 'X\(//\)$' \| \
51950          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51951 $as_echo X"$ac_file" |
51952     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51953             s//\1/
51954             q
51955           }
51956           /^X\(\/\/\)[^/].*/{
51957             s//\1/
51958             q
51959           }
51960           /^X\(\/\/\)$/{
51961             s//\1/
51962             q
51963           }
51964           /^X\(\/\).*/{
51965             s//\1/
51966             q
51967           }
51968           s/.*/./; q'`
51969   as_dir="$ac_dir"; as_fn_mkdir_p
51970   ac_builddir=.
51971 
51972 case "$ac_dir" in
51973 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51974 *)
51975   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51976   # A ".." for each directory in $ac_dir_suffix.
51977   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51978   case $ac_top_builddir_sub in
51979   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51980   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51981   esac ;;
51982 esac
51983 ac_abs_top_builddir=$ac_pwd
51984 ac_abs_builddir=$ac_pwd$ac_dir_suffix
51985 # for backward compatibility:
51986 ac_top_builddir=$ac_top_build_prefix
51987 
51988 case $srcdir in
51989   .)  # We are building in place.
51990     ac_srcdir=.
51991     ac_top_srcdir=$ac_top_builddir_sub
51992     ac_abs_top_srcdir=$ac_pwd ;;
51993   [\\/]* | ?:[\\/]* )  # Absolute name.
51994     ac_srcdir=$srcdir$ac_dir_suffix;
51995     ac_top_srcdir=$srcdir
51996     ac_abs_top_srcdir=$srcdir ;;
51997   *) # Relative name.
51998     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51999     ac_top_srcdir=$ac_top_build_prefix$srcdir
52000     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52001 esac
52002 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52003 
52004 
52005   case $ac_mode in
52006   :F)
52007   #
52008   # CONFIG_FILE
52009   #
52010 
52011 _ACEOF
52012 
52013 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52014 # If the template does not know about datarootdir, expand it.
52015 # FIXME: This hack should be removed a few years after 2.60.
52016 ac_datarootdir_hack=; ac_datarootdir_seen=
52017 ac_sed_dataroot='
52018 /datarootdir/ {
52019   p
52020   q
52021 }
52022 /@datadir@/p
52023 /@docdir@/p
52024 /@infodir@/p
52025 /@localedir@/p
52026 /@mandir@/p'
52027 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52028 *datarootdir*) ac_datarootdir_seen=yes;;
52029 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52030   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52031 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52032 _ACEOF
52033 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52034   ac_datarootdir_hack='
52035   s&@datadir@&$datadir&g
52036   s&@docdir@&$docdir&g
52037   s&@infodir@&$infodir&g
52038   s&@localedir@&$localedir&g
52039   s&@mandir@&$mandir&g
52040   s&\\\${datarootdir}&$datarootdir&g' ;;
52041 esac
52042 _ACEOF
52043 
52044 # Neutralize VPATH when `$srcdir' = `.'.
52045 # Shell code in configure.ac might set extrasub.
52046 # FIXME: do we really want to maintain this feature?
52047 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52048 ac_sed_extra="$ac_vpsub
52049 $extrasub
52050 _ACEOF
52051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52052 :t
52053 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52054 s|@configure_input@|$ac_sed_conf_input|;t t
52055 s&@top_builddir@&$ac_top_builddir_sub&;t t
52056 s&@top_build_prefix@&$ac_top_build_prefix&;t t
52057 s&@srcdir@&$ac_srcdir&;t t
52058 s&@abs_srcdir@&$ac_abs_srcdir&;t t
52059 s&@top_srcdir@&$ac_top_srcdir&;t t
52060 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52061 s&@builddir@&$ac_builddir&;t t
52062 s&@abs_builddir@&$ac_abs_builddir&;t t
52063 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52064 $ac_datarootdir_hack
52065 "
52066 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52067   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52068 
52069 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52070   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52071   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
52072       "$ac_tmp/out"`; test -z "$ac_out"; } &&
52073   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52074 which seems to be undefined.  Please make sure it is defined" >&5
52075 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52076 which seems to be undefined.  Please make sure it is defined" >&2;}
52077 
52078   rm -f "$ac_tmp/stdin"
52079   case $ac_file in
52080   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52081   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52082   esac \
52083   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52084  ;;
52085 
52086 
52087 
52088   esac
52089 
52090 done # for ac_tag
52091 
52092 
52093 as_fn_exit 0
52094 _ACEOF
52095 ac_clean_files=$ac_clean_files_save
52096 
52097 test $ac_write_fail = 0 ||
52098   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52099 
52100 
52101 # configure is writing to config.log, and then calls config.status.
52102 # config.status does its own redirection, appending to config.log.
52103 # Unfortunately, on DOS this fails, as config.log is still kept open
52104 # by configure, so config.status won't be able to write to it; its
52105 # output is simply discarded.  So we exec the FD to /dev/null,
52106 # effectively closing config.log, so it can be properly (re)opened and
52107 # appended to by config.status.  When coming back to configure, we
52108 # need to make the FD available again.
52109 if test "$no_create" != yes; then
52110   ac_cs_success=:
52111   ac_config_status_args=
52112   test "$silent" = yes &&
52113     ac_config_status_args="$ac_config_status_args --quiet"
52114   exec 5>/dev/null
52115   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52116   exec 5>>config.log
52117   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52118   # would make configure fail if this is the last instruction.
52119   $ac_cs_success || as_fn_exit 1
52120 fi
52121 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52122   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52123 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52124 fi
52125 
52126 
52127 # Try to move the config.log file to the output directory.
52128 if test -e ./config.log; then
52129   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52130 fi
52131 
52132 # Make the compare script executable
52133 $CHMOD +x $OUTPUT_ROOT/compare.sh
52134 
52135 # Finally output some useful information to the user
52136 
52137   # Finally output some useful information to the user
52138 
52139   printf "\n"
52140   printf "====================================================\n"
52141   if test "x$no_create" != "xyes"; then
52142     if test "x$IS_RECONFIGURE" != "xyes"; then
52143       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52144     else
52145       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52146     fi
52147   else
52148     if test "x$IS_RECONFIGURE" != "xyes"; then
52149       printf "A configuration has been successfully checked but not created\n"
52150     else
52151       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52152     fi
52153   fi
52154   if test "x$CONFIGURE_COMMAND_LINE" != x; then
52155     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52156   else
52157     printf "using default settings.\n"
52158   fi
52159 
52160   printf "\n"
52161   printf "Configuration summary:\n"
52162   printf "* Debug level:    $DEBUG_LEVEL\n"
52163   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52164   printf "* JDK variant:    $JDK_VARIANT\n"
52165   printf "* JVM variants:   $with_jvm_variants\n"
52166   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52167 
52168   printf "\n"
52169   printf "Tools summary:\n"
52170   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52171     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52172   fi
52173   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52174   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52175   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52176   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52177 
52178   printf "\n"
52179   printf "Build performance summary:\n"
52180   printf "* Cores to use:   $JOBS\n"
52181   printf "* Memory limit:   $MEMORY_SIZE MB\n"
52182   if test "x$CCACHE_STATUS" != "x"; then
52183     printf "* ccache status:  $CCACHE_STATUS\n"
52184   fi
52185   printf "\n"
52186 
52187   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52188     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52189     printf "will result in longer build times.\n"
52190     printf "\n"
52191   fi
52192 
52193   if test "x$FOUND_ALT_VARIABLES" != "x"; then
52194     printf "WARNING: You have old-style ALT_ environment variables set.\n"
52195     printf "These are not respected, and will be ignored. It is recommended\n"
52196     printf "that you clean your environment. The following variables are set:\n"
52197     printf "$FOUND_ALT_VARIABLES\n"
52198     printf "\n"
52199   fi
52200 
52201   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52202     printf "WARNING: Your build output directory is not on a local disk.\n"
52203     printf "This will severely degrade build performance!\n"
52204     printf "It is recommended that you create an output directory on a local disk,\n"
52205     printf "and run the configure script again from that directory.\n"
52206     printf "\n"
52207   fi
52208 
52209   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52210     printf "WARNING: The result of this configuration has overridden an older\n"
52211     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52212     printf "proper build. Failure to do so might result in strange build problems.\n"
52213     printf "\n"
52214   fi
52215 
52216   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52217     printf "WARNING: The result of this configuration was not saved.\n"
52218     printf "You should run without '--no-create | -n' to create the configuration.\n"
52219     printf "\n"
52220   fi
52221 
52222 
52223 
52224 if test -e "$OUTPUT_ROOT/config.log"; then
52225   $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52226   if test $? -eq 0; then
52227     printf "The following warnings were produced. Repeated here for convenience:\n"
52228     # We must quote sed expression (using []) to stop m4 from eating the [].
52229     $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52230     printf "\n"
52231   fi
52232 fi
52233 
52234