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=1421334633
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" = "xmacosx"; then
18825 
18826 
18827 
18828   # Publish this variable in the help.
18829 
18830 
18831   if test "x$DSYMUTIL" = x; then
18832     # The variable is not set by user, try to locate tool using the code snippet
18833     for ac_prog in dsymutil
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_DSYMUTIL+:} false; then :
18840   $as_echo_n "(cached) " >&6
18841 else
18842   case $DSYMUTIL in
18843   [\\/]* | ?:[\\/]*)
18844   ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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 DSYMUTIL=$ac_cv_path_DSYMUTIL
18866 if test -n "$DSYMUTIL"; then
18867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18868 $as_echo "$DSYMUTIL" >&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 "$DSYMUTIL" && 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 !DSYMUTIL! from our list.
18882     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
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 "xDSYMUTIL" != xBASH; then
18887         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18888 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL 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 dsymutil
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_DSYMUTIL+:} false; then :
18898   $as_echo_n "(cached) " >&6
18899 else
18900   case $DSYMUTIL in
18901   [\\/]* | ?:[\\/]*)
18902   ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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 DSYMUTIL=$ac_cv_path_DSYMUTIL
18924 if test -n "$DSYMUTIL"; then
18925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18926 $as_echo "$DSYMUTIL" >&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 "$DSYMUTIL" && 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="$DSYMUTIL"
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 DSYMUTIL=$tool_basename" >&5
18950 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$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_DSYMUTIL+:} false; then :
18956   $as_echo_n "(cached) " >&6
18957 else
18958   case $DSYMUTIL in
18959   [\\/]* | ?:[\\/]*)
18960   ac_cv_path_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="$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 DSYMUTIL=$ac_cv_path_DSYMUTIL
18982 if test -n "$DSYMUTIL"; then
18983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18984 $as_echo "$DSYMUTIL" >&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$DSYMUTIL" = 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 DSYMUTIL=$tool_specified" >&5
18997 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18999 $as_echo_n "checking for DSYMUTIL... " >&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 DSYMUTIL=$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$DSYMUTIL" = x; then
19014     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19015   fi
19016 
19017 
19018 
19019 
19020 
19021   # Publish this variable in the help.
19022 
19023 
19024   if test "x$XATTR" = x; then
19025     # The variable is not set by user, try to locate tool using the code snippet
19026     for ac_prog in xattr
19027 do
19028   # Extract the first word of "$ac_prog", so it can be a program name with args.
19029 set dummy $ac_prog; ac_word=$2
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19031 $as_echo_n "checking for $ac_word... " >&6; }
19032 if ${ac_cv_path_XATTR+:} false; then :
19033   $as_echo_n "(cached) " >&6
19034 else
19035   case $XATTR in
19036   [\\/]* | ?:[\\/]*)
19037   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19038   ;;
19039   *)
19040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19041 for as_dir in $PATH
19042 do
19043   IFS=$as_save_IFS
19044   test -z "$as_dir" && as_dir=.
19045     for ac_exec_ext in '' $ac_executable_extensions; do
19046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19047     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19049     break 2
19050   fi
19051 done
19052   done
19053 IFS=$as_save_IFS
19054 
19055   ;;
19056 esac
19057 fi
19058 XATTR=$ac_cv_path_XATTR
19059 if test -n "$XATTR"; then
19060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19061 $as_echo "$XATTR" >&6; }
19062 else
19063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19064 $as_echo "no" >&6; }
19065 fi
19066 
19067 
19068   test -n "$XATTR" && break
19069 done
19070 
19071   else
19072     # The variable is set, but is it from the command line or the environment?
19073 
19074     # Try to remove the string !XATTR! from our list.
19075     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19076     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19077       # If it failed, the variable was not from the command line. Ignore it,
19078       # but warn the user (except for BASH, which is always set by the calling BASH).
19079       if test "xXATTR" != xBASH; then
19080         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19081 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19082       fi
19083       # Try to locate tool using the code snippet
19084       for ac_prog in xattr
19085 do
19086   # Extract the first word of "$ac_prog", so it can be a program name with args.
19087 set dummy $ac_prog; ac_word=$2
19088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19089 $as_echo_n "checking for $ac_word... " >&6; }
19090 if ${ac_cv_path_XATTR+:} false; then :
19091   $as_echo_n "(cached) " >&6
19092 else
19093   case $XATTR in
19094   [\\/]* | ?:[\\/]*)
19095   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19096   ;;
19097   *)
19098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19099 for as_dir in $PATH
19100 do
19101   IFS=$as_save_IFS
19102   test -z "$as_dir" && as_dir=.
19103     for ac_exec_ext in '' $ac_executable_extensions; do
19104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19105     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19107     break 2
19108   fi
19109 done
19110   done
19111 IFS=$as_save_IFS
19112 
19113   ;;
19114 esac
19115 fi
19116 XATTR=$ac_cv_path_XATTR
19117 if test -n "$XATTR"; then
19118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19119 $as_echo "$XATTR" >&6; }
19120 else
19121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19122 $as_echo "no" >&6; }
19123 fi
19124 
19125 
19126   test -n "$XATTR" && break
19127 done
19128 
19129     else
19130       # If it succeeded, then it was overridden by the user. We will use it
19131       # for the tool.
19132 
19133       # First remove it from the list of overridden variables, so we can test
19134       # for unknown variables in the end.
19135       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19136 
19137       # Check if the provided tool contains a complete path.
19138       tool_specified="$XATTR"
19139       tool_basename="${tool_specified##*/}"
19140       if test "x$tool_basename" = "x$tool_specified"; then
19141         # A command without a complete path is provided, search $PATH.
19142         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19143 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19144         # Extract the first word of "$tool_basename", so it can be a program name with args.
19145 set dummy $tool_basename; ac_word=$2
19146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19147 $as_echo_n "checking for $ac_word... " >&6; }
19148 if ${ac_cv_path_XATTR+:} false; then :
19149   $as_echo_n "(cached) " >&6
19150 else
19151   case $XATTR in
19152   [\\/]* | ?:[\\/]*)
19153   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19154   ;;
19155   *)
19156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19157 for as_dir in $PATH
19158 do
19159   IFS=$as_save_IFS
19160   test -z "$as_dir" && as_dir=.
19161     for ac_exec_ext in '' $ac_executable_extensions; do
19162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19163     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19165     break 2
19166   fi
19167 done
19168   done
19169 IFS=$as_save_IFS
19170 
19171   ;;
19172 esac
19173 fi
19174 XATTR=$ac_cv_path_XATTR
19175 if test -n "$XATTR"; then
19176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19177 $as_echo "$XATTR" >&6; }
19178 else
19179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19180 $as_echo "no" >&6; }
19181 fi
19182 
19183 
19184         if test "x$XATTR" = x; then
19185           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19186         fi
19187       else
19188         # Otherwise we believe it is a complete path. Use it as it is.
19189         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19190 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19191         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19192 $as_echo_n "checking for XATTR... " >&6; }
19193         if test ! -x "$tool_specified"; then
19194           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19195 $as_echo "not found" >&6; }
19196           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19197         fi
19198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19199 $as_echo "$tool_specified" >&6; }
19200       fi
19201     fi
19202   fi
19203 
19204 
19205 
19206   if test "x$XATTR" = x; then
19207     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19208   fi
19209 
19210 
19211 
19212 
19213   # Publish this variable in the help.
19214 
19215 
19216   if test "x$CODESIGN" = x; then
19217     # The variable is not set by user, try to locate tool using the code snippet
19218     for ac_prog in codesign
19219 do
19220   # Extract the first word of "$ac_prog", so it can be a program name with args.
19221 set dummy $ac_prog; ac_word=$2
19222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19223 $as_echo_n "checking for $ac_word... " >&6; }
19224 if ${ac_cv_path_CODESIGN+:} false; then :
19225   $as_echo_n "(cached) " >&6
19226 else
19227   case $CODESIGN in
19228   [\\/]* | ?:[\\/]*)
19229   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19230   ;;
19231   *)
19232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19233 for as_dir in $PATH
19234 do
19235   IFS=$as_save_IFS
19236   test -z "$as_dir" && as_dir=.
19237     for ac_exec_ext in '' $ac_executable_extensions; do
19238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19239     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19241     break 2
19242   fi
19243 done
19244   done
19245 IFS=$as_save_IFS
19246 
19247   ;;
19248 esac
19249 fi
19250 CODESIGN=$ac_cv_path_CODESIGN
19251 if test -n "$CODESIGN"; then
19252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19253 $as_echo "$CODESIGN" >&6; }
19254 else
19255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19256 $as_echo "no" >&6; }
19257 fi
19258 
19259 
19260   test -n "$CODESIGN" && break
19261 done
19262 
19263   else
19264     # The variable is set, but is it from the command line or the environment?
19265 
19266     # Try to remove the string !CODESIGN! from our list.
19267     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19268     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19269       # If it failed, the variable was not from the command line. Ignore it,
19270       # but warn the user (except for BASH, which is always set by the calling BASH).
19271       if test "xCODESIGN" != xBASH; then
19272         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19273 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19274       fi
19275       # Try to locate tool using the code snippet
19276       for ac_prog in codesign
19277 do
19278   # Extract the first word of "$ac_prog", so it can be a program name with args.
19279 set dummy $ac_prog; ac_word=$2
19280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19281 $as_echo_n "checking for $ac_word... " >&6; }
19282 if ${ac_cv_path_CODESIGN+:} false; then :
19283   $as_echo_n "(cached) " >&6
19284 else
19285   case $CODESIGN in
19286   [\\/]* | ?:[\\/]*)
19287   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19288   ;;
19289   *)
19290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19291 for as_dir in $PATH
19292 do
19293   IFS=$as_save_IFS
19294   test -z "$as_dir" && as_dir=.
19295     for ac_exec_ext in '' $ac_executable_extensions; do
19296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19297     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19299     break 2
19300   fi
19301 done
19302   done
19303 IFS=$as_save_IFS
19304 
19305   ;;
19306 esac
19307 fi
19308 CODESIGN=$ac_cv_path_CODESIGN
19309 if test -n "$CODESIGN"; then
19310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19311 $as_echo "$CODESIGN" >&6; }
19312 else
19313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19314 $as_echo "no" >&6; }
19315 fi
19316 
19317 
19318   test -n "$CODESIGN" && break
19319 done
19320 
19321     else
19322       # If it succeeded, then it was overridden by the user. We will use it
19323       # for the tool.
19324 
19325       # First remove it from the list of overridden variables, so we can test
19326       # for unknown variables in the end.
19327       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19328 
19329       # Check if the provided tool contains a complete path.
19330       tool_specified="$CODESIGN"
19331       tool_basename="${tool_specified##*/}"
19332       if test "x$tool_basename" = "x$tool_specified"; then
19333         # A command without a complete path is provided, search $PATH.
19334         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19335 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19336         # Extract the first word of "$tool_basename", so it can be a program name with args.
19337 set dummy $tool_basename; ac_word=$2
19338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339 $as_echo_n "checking for $ac_word... " >&6; }
19340 if ${ac_cv_path_CODESIGN+:} false; then :
19341   $as_echo_n "(cached) " >&6
19342 else
19343   case $CODESIGN in
19344   [\\/]* | ?:[\\/]*)
19345   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19346   ;;
19347   *)
19348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19349 for as_dir in $PATH
19350 do
19351   IFS=$as_save_IFS
19352   test -z "$as_dir" && as_dir=.
19353     for ac_exec_ext in '' $ac_executable_extensions; do
19354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19355     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19357     break 2
19358   fi
19359 done
19360   done
19361 IFS=$as_save_IFS
19362 
19363   ;;
19364 esac
19365 fi
19366 CODESIGN=$ac_cv_path_CODESIGN
19367 if test -n "$CODESIGN"; then
19368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19369 $as_echo "$CODESIGN" >&6; }
19370 else
19371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19372 $as_echo "no" >&6; }
19373 fi
19374 
19375 
19376         if test "x$CODESIGN" = x; then
19377           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19378         fi
19379       else
19380         # Otherwise we believe it is a complete path. Use it as it is.
19381         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19382 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19383         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19384 $as_echo_n "checking for CODESIGN... " >&6; }
19385         if test ! -x "$tool_specified"; then
19386           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19387 $as_echo "not found" >&6; }
19388           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19389         fi
19390         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19391 $as_echo "$tool_specified" >&6; }
19392       fi
19393     fi
19394   fi
19395 
19396 
19397     if test "x$CODESIGN" != "x"; then
19398       # Verify that the openjdk_codesign certificate is present
19399       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19400 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19401       rm -f codesign-testfile
19402       touch codesign-testfile
19403       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19404       rm -f codesign-testfile
19405       if test "x$CODESIGN" = x; then
19406         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19407 $as_echo "no" >&6; }
19408       else
19409         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19410 $as_echo "yes" >&6; }
19411       fi
19412     fi
19413   fi
19414 
19415 
19416 # Check if pkg-config is available.
19417 
19418 
19419 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19420         if test -n "$ac_tool_prefix"; then
19421   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19422 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19424 $as_echo_n "checking for $ac_word... " >&6; }
19425 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19426   $as_echo_n "(cached) " >&6
19427 else
19428   case $PKG_CONFIG in
19429   [\\/]* | ?:[\\/]*)
19430   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19431   ;;
19432   *)
19433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19434 for as_dir in $PATH
19435 do
19436   IFS=$as_save_IFS
19437   test -z "$as_dir" && as_dir=.
19438     for ac_exec_ext in '' $ac_executable_extensions; do
19439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19440     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19442     break 2
19443   fi
19444 done
19445   done
19446 IFS=$as_save_IFS
19447 
19448   ;;
19449 esac
19450 fi
19451 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19452 if test -n "$PKG_CONFIG"; then
19453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19454 $as_echo "$PKG_CONFIG" >&6; }
19455 else
19456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19457 $as_echo "no" >&6; }
19458 fi
19459 
19460 
19461 fi
19462 if test -z "$ac_cv_path_PKG_CONFIG"; then
19463   ac_pt_PKG_CONFIG=$PKG_CONFIG
19464   # Extract the first word of "pkg-config", so it can be a program name with args.
19465 set dummy pkg-config; ac_word=$2
19466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19467 $as_echo_n "checking for $ac_word... " >&6; }
19468 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19469   $as_echo_n "(cached) " >&6
19470 else
19471   case $ac_pt_PKG_CONFIG in
19472   [\\/]* | ?:[\\/]*)
19473   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19474   ;;
19475   *)
19476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19477 for as_dir in $PATH
19478 do
19479   IFS=$as_save_IFS
19480   test -z "$as_dir" && as_dir=.
19481     for ac_exec_ext in '' $ac_executable_extensions; do
19482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19483     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19485     break 2
19486   fi
19487 done
19488   done
19489 IFS=$as_save_IFS
19490 
19491   ;;
19492 esac
19493 fi
19494 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19495 if test -n "$ac_pt_PKG_CONFIG"; then
19496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19497 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19498 else
19499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19500 $as_echo "no" >&6; }
19501 fi
19502 
19503   if test "x$ac_pt_PKG_CONFIG" = x; then
19504     PKG_CONFIG=""
19505   else
19506     case $cross_compiling:$ac_tool_warned in
19507 yes:)
19508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19509 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19510 ac_tool_warned=yes ;;
19511 esac
19512     PKG_CONFIG=$ac_pt_PKG_CONFIG
19513   fi
19514 else
19515   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19516 fi
19517 
19518 fi
19519 if test -n "$PKG_CONFIG"; then
19520         _pkg_min_version=0.9.0
19521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19522 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19523         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19524                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19525 $as_echo "yes" >&6; }
19526         else
19527                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19528 $as_echo "no" >&6; }
19529                 PKG_CONFIG=""
19530         fi
19531 
19532 fi
19533 
19534 # After basic tools have been setup, we can check build os specific details.
19535 
19536   ###############################################################################
19537 
19538   # Note that this is the build platform OS version!
19539 
19540   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19541   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19542   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19543   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19544 
19545 
19546 
19547 
19548 
19549 # Setup builddeps, for automatic downloading of tools we need.
19550 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19551 # boot-jdk setup, but we need to have basic tools setup first.
19552 
19553 
19554 # Check whether --with-builddeps-conf was given.
19555 if test "${with_builddeps_conf+set}" = set; then :
19556   withval=$with_builddeps_conf;
19557 fi
19558 
19559 
19560 
19561 # Check whether --with-builddeps-server was given.
19562 if test "${with_builddeps_server+set}" = set; then :
19563   withval=$with_builddeps_server;
19564 fi
19565 
19566 
19567 
19568 # Check whether --with-builddeps-dir was given.
19569 if test "${with_builddeps_dir+set}" = set; then :
19570   withval=$with_builddeps_dir;
19571 else
19572   with_builddeps_dir=/localhome/builddeps
19573 fi
19574 
19575 
19576 
19577 # Check whether --with-builddeps-group was given.
19578 if test "${with_builddeps_group+set}" = set; then :
19579   withval=$with_builddeps_group;
19580 fi
19581 
19582 
19583 
19584 
19585   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19586     if test "x$with_builddeps_conf" != x; then
19587       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19588 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19589       builddepsfile=$with_builddeps_conf
19590       if test -s $builddepsfile; then
19591         . $builddepsfile
19592         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19593 $as_echo "loaded!" >&6; }
19594       else
19595         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19596       fi
19597     else
19598       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19599 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19600       builddepsfile=`mktemp`
19601       touch $builddepsfile
19602       # Put all found confs into a single file.
19603       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19604       # Source the file to acquire the variables
19605       if test -s $builddepsfile; then
19606         . $builddepsfile
19607         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19608 $as_echo "found at least one!" >&6; }
19609       else
19610         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19611       fi
19612     fi
19613     # Create build and target names that use _ instead of "-" and ".".
19614     # This is necessary to use them in variable names.
19615     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19616     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19617     # Extract rewrite information for build and target
19618     eval rewritten_build=\${REWRITE_${build_var}}
19619     if test "x$rewritten_build" = x; then
19620       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19621       echo Build stays the same $rewritten_build
19622     else
19623       echo Rewriting build for builddeps into $rewritten_build
19624     fi
19625     eval rewritten_target=\${REWRITE_${target_var}}
19626     if test "x$rewritten_target" = x; then
19627       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19628       echo Target stays the same $rewritten_target
19629     else
19630       echo Rewriting target for builddeps into $rewritten_target
19631     fi
19632     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19633     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19634   fi
19635   for ac_prog in 7z unzip
19636 do
19637   # Extract the first word of "$ac_prog", so it can be a program name with args.
19638 set dummy $ac_prog; ac_word=$2
19639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19640 $as_echo_n "checking for $ac_word... " >&6; }
19641 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19642   $as_echo_n "(cached) " >&6
19643 else
19644   if test -n "$BDEPS_UNZIP"; then
19645   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19646 else
19647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19648 for as_dir in $PATH
19649 do
19650   IFS=$as_save_IFS
19651   test -z "$as_dir" && as_dir=.
19652     for ac_exec_ext in '' $ac_executable_extensions; do
19653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19654     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19656     break 2
19657   fi
19658 done
19659   done
19660 IFS=$as_save_IFS
19661 
19662 fi
19663 fi
19664 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19665 if test -n "$BDEPS_UNZIP"; then
19666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19667 $as_echo "$BDEPS_UNZIP" >&6; }
19668 else
19669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19670 $as_echo "no" >&6; }
19671 fi
19672 
19673 
19674   test -n "$BDEPS_UNZIP" && break
19675 done
19676 
19677   if test "x$BDEPS_UNZIP" = x7z; then
19678     BDEPS_UNZIP="7z x"
19679   fi
19680 
19681   for ac_prog in wget lftp ftp
19682 do
19683   # Extract the first word of "$ac_prog", so it can be a program name with args.
19684 set dummy $ac_prog; ac_word=$2
19685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19686 $as_echo_n "checking for $ac_word... " >&6; }
19687 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19688   $as_echo_n "(cached) " >&6
19689 else
19690   if test -n "$BDEPS_FTP"; then
19691   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19692 else
19693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19694 for as_dir in $PATH
19695 do
19696   IFS=$as_save_IFS
19697   test -z "$as_dir" && as_dir=.
19698     for ac_exec_ext in '' $ac_executable_extensions; do
19699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19700     ac_cv_prog_BDEPS_FTP="$ac_prog"
19701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19702     break 2
19703   fi
19704 done
19705   done
19706 IFS=$as_save_IFS
19707 
19708 fi
19709 fi
19710 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19711 if test -n "$BDEPS_FTP"; then
19712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19713 $as_echo "$BDEPS_FTP" >&6; }
19714 else
19715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19716 $as_echo "no" >&6; }
19717 fi
19718 
19719 
19720   test -n "$BDEPS_FTP" && break
19721 done
19722 
19723 
19724 
19725 ###############################################################################
19726 #
19727 # Determine OpenJDK variants, options and version numbers.
19728 #
19729 ###############################################################################
19730 
19731 # We need build & target for this.
19732 
19733 
19734   ###############################################################################
19735   #
19736   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19737   # We always build headless support.
19738   #
19739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19740 $as_echo_n "checking headful support... " >&6; }
19741   # Check whether --enable-headful was given.
19742 if test "${enable_headful+set}" = set; then :
19743   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19744 else
19745   SUPPORT_HEADFUL=yes
19746 fi
19747 
19748 
19749   SUPPORT_HEADLESS=yes
19750   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19751 
19752   if test "x$SUPPORT_HEADFUL" = xyes; then
19753     # We are building both headful and headless.
19754     headful_msg="include support for both headful and headless"
19755   fi
19756 
19757   if test "x$SUPPORT_HEADFUL" = xno; then
19758     # Thus we are building headless only.
19759     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19760     headful_msg="headless only"
19761   fi
19762 
19763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19764 $as_echo "$headful_msg" >&6; }
19765 
19766 
19767 
19768 
19769 
19770   # Control wether Hotspot runs Queens test after build.
19771   # Check whether --enable-hotspot-test-in-build was given.
19772 if test "${enable_hotspot_test_in_build+set}" = set; then :
19773   enableval=$enable_hotspot_test_in_build;
19774 else
19775   enable_hotspot_test_in_build=no
19776 fi
19777 
19778   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19779     TEST_IN_BUILD=true
19780   else
19781     TEST_IN_BUILD=false
19782   fi
19783 
19784 
19785   ###############################################################################
19786   #
19787   # Choose cacerts source file
19788   #
19789 
19790 # Check whether --with-cacerts-file was given.
19791 if test "${with_cacerts_file+set}" = set; then :
19792   withval=$with_cacerts_file;
19793 fi
19794 
19795   if test "x$with_cacerts_file" != x; then
19796     CACERTS_FILE=$with_cacerts_file
19797   fi
19798 
19799 
19800   ###############################################################################
19801   #
19802   # Enable or disable unlimited crypto
19803   #
19804   # Check whether --enable-unlimited-crypto was given.
19805 if test "${enable_unlimited_crypto+set}" = set; then :
19806   enableval=$enable_unlimited_crypto;
19807 else
19808   enable_unlimited_crypto=no
19809 fi
19810 
19811   if test "x$enable_unlimited_crypto" = "xyes"; then
19812     UNLIMITED_CRYPTO=true
19813   else
19814     UNLIMITED_CRYPTO=false
19815   fi
19816 
19817 
19818   ###############################################################################
19819   #
19820   # Enable or disable the elliptic curve crypto implementation
19821   #
19822 
19823 
19824   ###############################################################################
19825   #
19826   # --enable-rmiconnector-iiop
19827   #
19828   # Check whether --enable-rmiconnector-iiop was given.
19829 if test "${enable_rmiconnector_iiop+set}" = set; then :
19830   enableval=$enable_rmiconnector_iiop;
19831 fi
19832 
19833   if test "x$enable_rmiconnector_iiop" = "xyes"; then
19834     RMICONNECTOR_IIOP=true
19835   else
19836     RMICONNECTOR_IIOP=false
19837   fi
19838 
19839 
19840   ###############################################################################
19841   #
19842   # Compress jars
19843   #
19844   COMPRESS_JARS=false
19845 
19846 
19847 
19848 
19849   # Source the version numbers
19850   . $AUTOCONF_DIR/version-numbers
19851 
19852   # Get the settings from parameters
19853 
19854 # Check whether --with-milestone was given.
19855 if test "${with_milestone+set}" = set; then :
19856   withval=$with_milestone;
19857 fi
19858 
19859   if test "x$with_milestone" = xyes; then
19860     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19861   elif test "x$with_milestone" != x; then
19862     MILESTONE="$with_milestone"
19863   fi
19864   if test "x$MILESTONE" = x; then
19865     MILESTONE=internal
19866   fi
19867 
19868 
19869 # Check whether --with-update-version was given.
19870 if test "${with_update_version+set}" = set; then :
19871   withval=$with_update_version;
19872 fi
19873 
19874   if test "x$with_update_version" = xyes; then
19875     as_fn_error $? "Update version must have a value" "$LINENO" 5
19876   elif test "x$with_update_version" != x; then
19877     JDK_UPDATE_VERSION="$with_update_version"
19878     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19879     # to a bug in expr (which reduces it to just X). To work around this, we
19880     # always add a 0 to one digit update versions.
19881     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19882       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19883     fi
19884   fi
19885 
19886 
19887 # Check whether --with-user-release-suffix was given.
19888 if test "${with_user_release_suffix+set}" = set; then :
19889   withval=$with_user_release_suffix;
19890 fi
19891 
19892   if test "x$with_user_release_suffix" = xyes; then
19893     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19894   elif test "x$with_user_release_suffix" != x; then
19895     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19896   fi
19897 
19898 
19899 # Check whether --with-build-number was given.
19900 if test "${with_build_number+set}" = set; then :
19901   withval=$with_build_number;
19902 fi
19903 
19904   if test "x$with_build_number" = xyes; then
19905     as_fn_error $? "Build number must have a value" "$LINENO" 5
19906   elif test "x$with_build_number" != x; then
19907     JDK_BUILD_NUMBER="$with_build_number"
19908   fi
19909   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19910   if test "x$JDK_BUILD_NUMBER" = x; then
19911     JDK_BUILD_NUMBER=b00
19912     if test "x$USER_RELEASE_SUFFIX" = x; then
19913       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19914       # Avoid [:alnum:] since it depends on the locale.
19915       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19916       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19917     fi
19918   fi
19919 
19920   # Now set the JDK version, milestone, build number etc.
19921 
19922 
19923 
19924 
19925 
19926 
19927 
19928 
19929 
19930 
19931 
19932 
19933 
19934 
19935 
19936 
19937 # Check whether --with-copyright-year was given.
19938 if test "${with_copyright_year+set}" = set; then :
19939   withval=$with_copyright_year;
19940 fi
19941 
19942   if test "x$with_copyright_year" = xyes; then
19943     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
19944   elif test "x$with_copyright_year" != x; then
19945     COPYRIGHT_YEAR="$with_copyright_year"
19946   else
19947     COPYRIGHT_YEAR=`date +'%Y'`
19948   fi
19949 
19950 
19951   if test "x$JDK_UPDATE_VERSION" != x; then
19952     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19953   else
19954     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19955   fi
19956 
19957 
19958   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19959 
19960 
19961 
19962 ###############################################################################
19963 #
19964 # Setup BootJDK, used to bootstrap the build.
19965 #
19966 ###############################################################################
19967 
19968 
19969   BOOT_JDK_FOUND=no
19970 
19971 # Check whether --with-boot-jdk was given.
19972 if test "${with_boot_jdk+set}" = set; then :
19973   withval=$with_boot_jdk;
19974 fi
19975 
19976 
19977   # We look for the Boot JDK through various means, going from more certain to
19978   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19979   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19980   # must check if this is indeed valid; otherwise we'll continue looking.
19981 
19982   # Test: Is bootjdk explicitely set by command line arguments?
19983 
19984   if test "x$BOOT_JDK_FOUND" = xno; then
19985     # Now execute the test
19986 
19987   if test "x$with_boot_jdk" != x; then
19988     BOOT_JDK=$with_boot_jdk
19989     BOOT_JDK_FOUND=maybe
19990     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19991 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19992   fi
19993 
19994 
19995     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19996     if test "x$BOOT_JDK_FOUND" = xmaybe; then
19997       # Do we have a bin/java?
19998       if test ! -x "$BOOT_JDK/bin/java"; then
19999         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20000 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20001         BOOT_JDK_FOUND=no
20002       else
20003         # Do we have a bin/javac?
20004         if test ! -x "$BOOT_JDK/bin/javac"; then
20005           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20007           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20008 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20009           BOOT_JDK_FOUND=no
20010         else
20011           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20012           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20013 
20014           # Extra M4 quote needed to protect [] in grep expression.
20015           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20016           if test "x$FOUND_CORRECT_VERSION" = x; then
20017             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20018 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20019             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20020 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20021             BOOT_JDK_FOUND=no
20022           else
20023             # We're done! :-)
20024             BOOT_JDK_FOUND=yes
20025 
20026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20027 
20028   # Input might be given as Windows format, start by converting to
20029   # unix format.
20030   path="$BOOT_JDK"
20031   new_path=`$CYGPATH -u "$path"`
20032 
20033   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20034   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20035   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20036   # "foo.exe" is OK but "foo" is an error.
20037   #
20038   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20039   # It is also a way to make sure we got the proper file name for the real test later on.
20040   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20041   if test "x$test_shortpath" = x; then
20042     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20043 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20044     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20045   fi
20046 
20047   # Call helper function which possibly converts this using DOS-style short mode.
20048   # If so, the updated path is stored in $new_path.
20049 
20050   input_path="$new_path"
20051   # Check if we need to convert this using DOS-style short mode. If the path
20052   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20053   # take no chances and rewrite it.
20054   # Note: m4 eats our [], so we need to use [ and ] instead.
20055   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20056   if test "x$has_forbidden_chars" != x; then
20057     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20058     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20059     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20060     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20061       # Going to short mode and back again did indeed matter. Since short mode is
20062       # case insensitive, let's make it lowercase to improve readability.
20063       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20064       # Now convert it back to Unix-stile (cygpath)
20065       input_path=`$CYGPATH -u "$shortmode_path"`
20066       new_path="$input_path"
20067     fi
20068   fi
20069 
20070   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20071   if test "x$test_cygdrive_prefix" = x; then
20072     # As a simple fix, exclude /usr/bin since it's not a real path.
20073     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20074       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20075       # a path prefixed by /cygdrive for fixpath to work.
20076       new_path="$CYGWIN_ROOT_PATH$input_path"
20077     fi
20078   fi
20079 
20080 
20081   if test "x$path" != "x$new_path"; then
20082     BOOT_JDK="$new_path"
20083     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20084 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20085   fi
20086 
20087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20088 
20089   path="$BOOT_JDK"
20090   has_colon=`$ECHO $path | $GREP ^.:`
20091   new_path="$path"
20092   if test "x$has_colon" = x; then
20093     # Not in mixed or Windows style, start by that.
20094     new_path=`cmd //c echo $path`
20095   fi
20096 
20097 
20098   input_path="$new_path"
20099   # Check if we need to convert this using DOS-style short mode. If the path
20100   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20101   # take no chances and rewrite it.
20102   # Note: m4 eats our [], so we need to use [ and ] instead.
20103   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20104   if test "x$has_forbidden_chars" != x; then
20105     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20106     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20107   fi
20108 
20109 
20110   windows_path="$new_path"
20111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20112     unix_path=`$CYGPATH -u "$windows_path"`
20113     new_path="$unix_path"
20114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20116     new_path="$unix_path"
20117   fi
20118 
20119   if test "x$path" != "x$new_path"; then
20120     BOOT_JDK="$new_path"
20121     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20122 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20123   fi
20124 
20125   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20126   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20127 
20128   else
20129     # We're on a unix platform. Hooray! :)
20130     path="$BOOT_JDK"
20131     has_space=`$ECHO "$path" | $GREP " "`
20132     if test "x$has_space" != x; then
20133       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20134 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20135       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20136     fi
20137 
20138     # Use eval to expand a potential ~
20139     eval path="$path"
20140     if test ! -f "$path" && test ! -d "$path"; then
20141       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20142     fi
20143 
20144     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20145   fi
20146 
20147             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20148 $as_echo_n "checking for Boot JDK... " >&6; }
20149             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20150 $as_echo "$BOOT_JDK" >&6; }
20151             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20152 $as_echo_n "checking Boot JDK version... " >&6; }
20153             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20154             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20155 $as_echo "$BOOT_JDK_VERSION" >&6; }
20156           fi # end check jdk version
20157         fi # end check javac
20158       fi # end check java
20159     fi # end check boot jdk found
20160   fi
20161 
20162   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20163     # Having specified an argument which is incorrect will produce an instant failure;
20164     # we should not go on looking
20165     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20166   fi
20167 
20168   # Test: Is bootjdk available from builddeps?
20169 
20170   if test "x$BOOT_JDK_FOUND" = xno; then
20171     # Now execute the test
20172 
20173 
20174 
20175   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20176     # Source the builddeps file again, to make sure it uses the latest variables!
20177     . $builddepsfile
20178     # Look for a target and build machine specific resource!
20179     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20180     if test "x$resource" = x; then
20181       # Ok, lets instead look for a target specific resource
20182       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20183     fi
20184     if test "x$resource" = x; then
20185       # Ok, lets instead look for a build specific resource
20186       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20187     fi
20188     if test "x$resource" = x; then
20189       # Ok, lets instead look for a generic resource
20190       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20191       resource=${builddep_bootjdk}
20192     fi
20193     if test "x$resource" != x; then
20194       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20195 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20196       # If the resource in the builddeps.conf file is an existing directory,
20197       # for example /java/linux/cups
20198       if test -d ${resource}; then
20199         depdir=${resource}
20200       else
20201 
20202   # bootjdk is for example mymodule
20203   # $resource is for example libs/general/libmymod_1_2_3.zip
20204   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20205   # $with_builddeps_dir is for example /localhome/builddeps
20206   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20207   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20208   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20209   filename=`basename $resource`
20210   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20211   filebase=${filename%%.*}
20212   extension=${filename#*.}
20213   installdir=$with_builddeps_dir/$filebase
20214   if test ! -f $installdir/$filename.unpacked; then
20215     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20216 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20217     if test ! -d $installdir; then
20218       mkdir -p $installdir
20219     fi
20220     if test ! -d $installdir; then
20221       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20222     fi
20223     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20224     touch $tmpfile
20225     if test ! -f $tmpfile; then
20226       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20227     fi
20228 
20229   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20230   # $tmpfile is the local file name for the downloaded file.
20231   VALID_TOOL=no
20232   if test "x$BDEPS_FTP" = xwget; then
20233     VALID_TOOL=yes
20234     wget -O $tmpfile $with_builddeps_server/$resource
20235   fi
20236   if test "x$BDEPS_FTP" = xlftp; then
20237     VALID_TOOL=yes
20238     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20239   fi
20240   if test "x$BDEPS_FTP" = xftp; then
20241     VALID_TOOL=yes
20242     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20243     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20244     FTPUSERPWD=${FTPSERVER%%@*}
20245     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20246       FTPUSER=${userpwd%%:*}
20247       FTPPWD=${userpwd#*@}
20248       FTPSERVER=${FTPSERVER#*@}
20249     else
20250       FTPUSER=ftp
20251       FTPPWD=ftp
20252     fi
20253     # the "pass" command does not work on some
20254     # ftp clients (read ftp.exe) but if it works,
20255     # passive mode is better!
20256     ( \
20257         echo "user $FTPUSER $FTPPWD"        ; \
20258         echo "pass"                         ; \
20259         echo "bin"                          ; \
20260         echo "get $FTPPATH $tmpfile"              ; \
20261     ) | ftp -in $FTPSERVER
20262   fi
20263   if test "x$VALID_TOOL" != xyes; then
20264     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20265   fi
20266 
20267     mv $tmpfile $installdir/$filename
20268     if test ! -s $installdir/$filename; then
20269       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20270     fi
20271     case "$extension" in
20272       zip)  echo "Unzipping $installdir/$filename..."
20273         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20274         ;;
20275       tar.gz) echo "Untaring $installdir/$filename..."
20276         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20277         ;;
20278       tgz) echo "Untaring $installdir/$filename..."
20279         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20280         ;;
20281       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20282         ;;
20283     esac
20284   fi
20285   if test -f $installdir/$filename.unpacked; then
20286     depdir=$installdir
20287   fi
20288 
20289       fi
20290       # Source the builddeps file again, because in the previous command, the depdir
20291       # was updated to point at the current build dependency install directory.
20292       . $builddepsfile
20293       # Now extract variables from the builddeps.conf files.
20294       theroot=${builddep_bootjdk_ROOT}
20295       thecflags=${builddep_bootjdk_CFLAGS}
20296       thelibs=${builddep_bootjdk_LIBS}
20297       if test "x$depdir" = x; then
20298         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20299       fi
20300       BOOT_JDK=$depdir
20301       if test "x$theroot" != x; then
20302         BOOT_JDK="$theroot"
20303       fi
20304       if test "x$thecflags" != x; then
20305         BOOT_JDK_CFLAGS="$thecflags"
20306       fi
20307       if test "x$thelibs" != x; then
20308         BOOT_JDK_LIBS="$thelibs"
20309       fi
20310       BOOT_JDK_FOUND=maybe
20311       else BOOT_JDK_FOUND=no
20312 
20313     fi
20314     else BOOT_JDK_FOUND=no
20315 
20316   fi
20317 
20318 
20319 
20320     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20321     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20322       # Do we have a bin/java?
20323       if test ! -x "$BOOT_JDK/bin/java"; then
20324         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20325 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20326         BOOT_JDK_FOUND=no
20327       else
20328         # Do we have a bin/javac?
20329         if test ! -x "$BOOT_JDK/bin/javac"; then
20330           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20332           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20333 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20334           BOOT_JDK_FOUND=no
20335         else
20336           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20337           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20338 
20339           # Extra M4 quote needed to protect [] in grep expression.
20340           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20341           if test "x$FOUND_CORRECT_VERSION" = x; then
20342             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20343 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20344             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20345 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20346             BOOT_JDK_FOUND=no
20347           else
20348             # We're done! :-)
20349             BOOT_JDK_FOUND=yes
20350 
20351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20352 
20353   # Input might be given as Windows format, start by converting to
20354   # unix format.
20355   path="$BOOT_JDK"
20356   new_path=`$CYGPATH -u "$path"`
20357 
20358   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20359   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20360   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20361   # "foo.exe" is OK but "foo" is an error.
20362   #
20363   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20364   # It is also a way to make sure we got the proper file name for the real test later on.
20365   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20366   if test "x$test_shortpath" = x; then
20367     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20368 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20369     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20370   fi
20371 
20372   # Call helper function which possibly converts this using DOS-style short mode.
20373   # If so, the updated path is stored in $new_path.
20374 
20375   input_path="$new_path"
20376   # Check if we need to convert this using DOS-style short mode. If the path
20377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20378   # take no chances and rewrite it.
20379   # Note: m4 eats our [], so we need to use [ and ] instead.
20380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20381   if test "x$has_forbidden_chars" != x; then
20382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20383     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20384     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20385     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20386       # Going to short mode and back again did indeed matter. Since short mode is
20387       # case insensitive, let's make it lowercase to improve readability.
20388       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20389       # Now convert it back to Unix-stile (cygpath)
20390       input_path=`$CYGPATH -u "$shortmode_path"`
20391       new_path="$input_path"
20392     fi
20393   fi
20394 
20395   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20396   if test "x$test_cygdrive_prefix" = x; then
20397     # As a simple fix, exclude /usr/bin since it's not a real path.
20398     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20399       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20400       # a path prefixed by /cygdrive for fixpath to work.
20401       new_path="$CYGWIN_ROOT_PATH$input_path"
20402     fi
20403   fi
20404 
20405 
20406   if test "x$path" != "x$new_path"; then
20407     BOOT_JDK="$new_path"
20408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20409 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20410   fi
20411 
20412   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20413 
20414   path="$BOOT_JDK"
20415   has_colon=`$ECHO $path | $GREP ^.:`
20416   new_path="$path"
20417   if test "x$has_colon" = x; then
20418     # Not in mixed or Windows style, start by that.
20419     new_path=`cmd //c echo $path`
20420   fi
20421 
20422 
20423   input_path="$new_path"
20424   # Check if we need to convert this using DOS-style short mode. If the path
20425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20426   # take no chances and rewrite it.
20427   # Note: m4 eats our [], so we need to use [ and ] instead.
20428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20429   if test "x$has_forbidden_chars" != x; then
20430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20432   fi
20433 
20434 
20435   windows_path="$new_path"
20436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20437     unix_path=`$CYGPATH -u "$windows_path"`
20438     new_path="$unix_path"
20439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20441     new_path="$unix_path"
20442   fi
20443 
20444   if test "x$path" != "x$new_path"; then
20445     BOOT_JDK="$new_path"
20446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20447 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20448   fi
20449 
20450   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20451   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20452 
20453   else
20454     # We're on a unix platform. Hooray! :)
20455     path="$BOOT_JDK"
20456     has_space=`$ECHO "$path" | $GREP " "`
20457     if test "x$has_space" != x; then
20458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20459 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20460       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20461     fi
20462 
20463     # Use eval to expand a potential ~
20464     eval path="$path"
20465     if test ! -f "$path" && test ! -d "$path"; then
20466       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20467     fi
20468 
20469     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20470   fi
20471 
20472             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20473 $as_echo_n "checking for Boot JDK... " >&6; }
20474             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20475 $as_echo "$BOOT_JDK" >&6; }
20476             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20477 $as_echo_n "checking Boot JDK version... " >&6; }
20478             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20480 $as_echo "$BOOT_JDK_VERSION" >&6; }
20481           fi # end check jdk version
20482         fi # end check javac
20483       fi # end check java
20484     fi # end check boot jdk found
20485   fi
20486 
20487 
20488   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20489 
20490   if test "x$BOOT_JDK_FOUND" = xno; then
20491     # Now execute the test
20492 
20493   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20494     # First check at user selected default
20495 
20496   if test "x$BOOT_JDK_FOUND" = xno; then
20497     # Now execute the test
20498 
20499   if test -x /usr/libexec/java_home; then
20500     BOOT_JDK=`/usr/libexec/java_home `
20501     BOOT_JDK_FOUND=maybe
20502     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20503 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20504   fi
20505 
20506 
20507     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20508     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20509       # Do we have a bin/java?
20510       if test ! -x "$BOOT_JDK/bin/java"; then
20511         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20512 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20513         BOOT_JDK_FOUND=no
20514       else
20515         # Do we have a bin/javac?
20516         if test ! -x "$BOOT_JDK/bin/javac"; then
20517           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20518 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20519           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20520 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20521           BOOT_JDK_FOUND=no
20522         else
20523           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20524           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20525 
20526           # Extra M4 quote needed to protect [] in grep expression.
20527           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20528           if test "x$FOUND_CORRECT_VERSION" = x; then
20529             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20530 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20531             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20532 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20533             BOOT_JDK_FOUND=no
20534           else
20535             # We're done! :-)
20536             BOOT_JDK_FOUND=yes
20537 
20538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539 
20540   # Input might be given as Windows format, start by converting to
20541   # unix format.
20542   path="$BOOT_JDK"
20543   new_path=`$CYGPATH -u "$path"`
20544 
20545   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20546   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20547   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20548   # "foo.exe" is OK but "foo" is an error.
20549   #
20550   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20551   # It is also a way to make sure we got the proper file name for the real test later on.
20552   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20553   if test "x$test_shortpath" = x; then
20554     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20555 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20556     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20557   fi
20558 
20559   # Call helper function which possibly converts this using DOS-style short mode.
20560   # If so, the updated path is stored in $new_path.
20561 
20562   input_path="$new_path"
20563   # Check if we need to convert this using DOS-style short mode. If the path
20564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20565   # take no chances and rewrite it.
20566   # Note: m4 eats our [], so we need to use [ and ] instead.
20567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20568   if test "x$has_forbidden_chars" != x; then
20569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20570     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20571     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20572     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20573       # Going to short mode and back again did indeed matter. Since short mode is
20574       # case insensitive, let's make it lowercase to improve readability.
20575       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20576       # Now convert it back to Unix-stile (cygpath)
20577       input_path=`$CYGPATH -u "$shortmode_path"`
20578       new_path="$input_path"
20579     fi
20580   fi
20581 
20582   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20583   if test "x$test_cygdrive_prefix" = x; then
20584     # As a simple fix, exclude /usr/bin since it's not a real path.
20585     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20586       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20587       # a path prefixed by /cygdrive for fixpath to work.
20588       new_path="$CYGWIN_ROOT_PATH$input_path"
20589     fi
20590   fi
20591 
20592 
20593   if test "x$path" != "x$new_path"; then
20594     BOOT_JDK="$new_path"
20595     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20596 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20597   fi
20598 
20599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20600 
20601   path="$BOOT_JDK"
20602   has_colon=`$ECHO $path | $GREP ^.:`
20603   new_path="$path"
20604   if test "x$has_colon" = x; then
20605     # Not in mixed or Windows style, start by that.
20606     new_path=`cmd //c echo $path`
20607   fi
20608 
20609 
20610   input_path="$new_path"
20611   # Check if we need to convert this using DOS-style short mode. If the path
20612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20613   # take no chances and rewrite it.
20614   # Note: m4 eats our [], so we need to use [ and ] instead.
20615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20616   if test "x$has_forbidden_chars" != x; then
20617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20618     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20619   fi
20620 
20621 
20622   windows_path="$new_path"
20623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20624     unix_path=`$CYGPATH -u "$windows_path"`
20625     new_path="$unix_path"
20626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20628     new_path="$unix_path"
20629   fi
20630 
20631   if test "x$path" != "x$new_path"; then
20632     BOOT_JDK="$new_path"
20633     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20634 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20635   fi
20636 
20637   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20638   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20639 
20640   else
20641     # We're on a unix platform. Hooray! :)
20642     path="$BOOT_JDK"
20643     has_space=`$ECHO "$path" | $GREP " "`
20644     if test "x$has_space" != x; then
20645       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20646 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20647       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20648     fi
20649 
20650     # Use eval to expand a potential ~
20651     eval path="$path"
20652     if test ! -f "$path" && test ! -d "$path"; then
20653       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20654     fi
20655 
20656     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20657   fi
20658 
20659             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20660 $as_echo_n "checking for Boot JDK... " >&6; }
20661             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20662 $as_echo "$BOOT_JDK" >&6; }
20663             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20664 $as_echo_n "checking Boot JDK version... " >&6; }
20665             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20666             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20667 $as_echo "$BOOT_JDK_VERSION" >&6; }
20668           fi # end check jdk version
20669         fi # end check javac
20670       fi # end check java
20671     fi # end check boot jdk found
20672   fi
20673 
20674     # If that did not work out (e.g. too old), try explicit versions instead
20675 
20676   if test "x$BOOT_JDK_FOUND" = xno; then
20677     # Now execute the test
20678 
20679   if test -x /usr/libexec/java_home; then
20680     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20681     BOOT_JDK_FOUND=maybe
20682     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20683 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20684   fi
20685 
20686 
20687     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20688     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20689       # Do we have a bin/java?
20690       if test ! -x "$BOOT_JDK/bin/java"; then
20691         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20692 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20693         BOOT_JDK_FOUND=no
20694       else
20695         # Do we have a bin/javac?
20696         if test ! -x "$BOOT_JDK/bin/javac"; then
20697           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20698 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20699           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20700 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20701           BOOT_JDK_FOUND=no
20702         else
20703           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20704           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20705 
20706           # Extra M4 quote needed to protect [] in grep expression.
20707           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20708           if test "x$FOUND_CORRECT_VERSION" = x; then
20709             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20710 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20711             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20712 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20713             BOOT_JDK_FOUND=no
20714           else
20715             # We're done! :-)
20716             BOOT_JDK_FOUND=yes
20717 
20718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20719 
20720   # Input might be given as Windows format, start by converting to
20721   # unix format.
20722   path="$BOOT_JDK"
20723   new_path=`$CYGPATH -u "$path"`
20724 
20725   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20726   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20727   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20728   # "foo.exe" is OK but "foo" is an error.
20729   #
20730   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20731   # It is also a way to make sure we got the proper file name for the real test later on.
20732   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20733   if test "x$test_shortpath" = x; then
20734     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20735 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20736     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20737   fi
20738 
20739   # Call helper function which possibly converts this using DOS-style short mode.
20740   # If so, the updated path is stored in $new_path.
20741 
20742   input_path="$new_path"
20743   # Check if we need to convert this using DOS-style short mode. If the path
20744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20745   # take no chances and rewrite it.
20746   # Note: m4 eats our [], so we need to use [ and ] instead.
20747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20748   if test "x$has_forbidden_chars" != x; then
20749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20750     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20751     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20752     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20753       # Going to short mode and back again did indeed matter. Since short mode is
20754       # case insensitive, let's make it lowercase to improve readability.
20755       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20756       # Now convert it back to Unix-stile (cygpath)
20757       input_path=`$CYGPATH -u "$shortmode_path"`
20758       new_path="$input_path"
20759     fi
20760   fi
20761 
20762   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20763   if test "x$test_cygdrive_prefix" = x; then
20764     # As a simple fix, exclude /usr/bin since it's not a real path.
20765     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20766       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20767       # a path prefixed by /cygdrive for fixpath to work.
20768       new_path="$CYGWIN_ROOT_PATH$input_path"
20769     fi
20770   fi
20771 
20772 
20773   if test "x$path" != "x$new_path"; then
20774     BOOT_JDK="$new_path"
20775     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20776 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20777   fi
20778 
20779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20780 
20781   path="$BOOT_JDK"
20782   has_colon=`$ECHO $path | $GREP ^.:`
20783   new_path="$path"
20784   if test "x$has_colon" = x; then
20785     # Not in mixed or Windows style, start by that.
20786     new_path=`cmd //c echo $path`
20787   fi
20788 
20789 
20790   input_path="$new_path"
20791   # Check if we need to convert this using DOS-style short mode. If the path
20792   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20793   # take no chances and rewrite it.
20794   # Note: m4 eats our [], so we need to use [ and ] instead.
20795   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20796   if test "x$has_forbidden_chars" != x; then
20797     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20798     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20799   fi
20800 
20801 
20802   windows_path="$new_path"
20803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20804     unix_path=`$CYGPATH -u "$windows_path"`
20805     new_path="$unix_path"
20806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20807     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20808     new_path="$unix_path"
20809   fi
20810 
20811   if test "x$path" != "x$new_path"; then
20812     BOOT_JDK="$new_path"
20813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20814 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20815   fi
20816 
20817   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20818   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20819 
20820   else
20821     # We're on a unix platform. Hooray! :)
20822     path="$BOOT_JDK"
20823     has_space=`$ECHO "$path" | $GREP " "`
20824     if test "x$has_space" != x; then
20825       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20826 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20827       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20828     fi
20829 
20830     # Use eval to expand a potential ~
20831     eval path="$path"
20832     if test ! -f "$path" && test ! -d "$path"; then
20833       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20834     fi
20835 
20836     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20837   fi
20838 
20839             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20840 $as_echo_n "checking for Boot JDK... " >&6; }
20841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20842 $as_echo "$BOOT_JDK" >&6; }
20843             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20844 $as_echo_n "checking Boot JDK version... " >&6; }
20845             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20846             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20847 $as_echo "$BOOT_JDK_VERSION" >&6; }
20848           fi # end check jdk version
20849         fi # end check javac
20850       fi # end check java
20851     fi # end check boot jdk found
20852   fi
20853 
20854 
20855   if test "x$BOOT_JDK_FOUND" = xno; then
20856     # Now execute the test
20857 
20858   if test -x /usr/libexec/java_home; then
20859     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20860     BOOT_JDK_FOUND=maybe
20861     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20862 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20863   fi
20864 
20865 
20866     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20867     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20868       # Do we have a bin/java?
20869       if test ! -x "$BOOT_JDK/bin/java"; then
20870         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20871 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20872         BOOT_JDK_FOUND=no
20873       else
20874         # Do we have a bin/javac?
20875         if test ! -x "$BOOT_JDK/bin/javac"; then
20876           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20877 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20878           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20879 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20880           BOOT_JDK_FOUND=no
20881         else
20882           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20883           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20884 
20885           # Extra M4 quote needed to protect [] in grep expression.
20886           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20887           if test "x$FOUND_CORRECT_VERSION" = x; then
20888             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20889 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20890             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20891 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20892             BOOT_JDK_FOUND=no
20893           else
20894             # We're done! :-)
20895             BOOT_JDK_FOUND=yes
20896 
20897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20898 
20899   # Input might be given as Windows format, start by converting to
20900   # unix format.
20901   path="$BOOT_JDK"
20902   new_path=`$CYGPATH -u "$path"`
20903 
20904   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20905   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20906   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20907   # "foo.exe" is OK but "foo" is an error.
20908   #
20909   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20910   # It is also a way to make sure we got the proper file name for the real test later on.
20911   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20912   if test "x$test_shortpath" = x; then
20913     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20914 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20915     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20916   fi
20917 
20918   # Call helper function which possibly converts this using DOS-style short mode.
20919   # If so, the updated path is stored in $new_path.
20920 
20921   input_path="$new_path"
20922   # Check if we need to convert this using DOS-style short mode. If the path
20923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20924   # take no chances and rewrite it.
20925   # Note: m4 eats our [], so we need to use [ and ] instead.
20926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20927   if test "x$has_forbidden_chars" != x; then
20928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20929     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20930     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20931     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20932       # Going to short mode and back again did indeed matter. Since short mode is
20933       # case insensitive, let's make it lowercase to improve readability.
20934       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20935       # Now convert it back to Unix-stile (cygpath)
20936       input_path=`$CYGPATH -u "$shortmode_path"`
20937       new_path="$input_path"
20938     fi
20939   fi
20940 
20941   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20942   if test "x$test_cygdrive_prefix" = x; then
20943     # As a simple fix, exclude /usr/bin since it's not a real path.
20944     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20945       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20946       # a path prefixed by /cygdrive for fixpath to work.
20947       new_path="$CYGWIN_ROOT_PATH$input_path"
20948     fi
20949   fi
20950 
20951 
20952   if test "x$path" != "x$new_path"; then
20953     BOOT_JDK="$new_path"
20954     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20955 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20956   fi
20957 
20958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20959 
20960   path="$BOOT_JDK"
20961   has_colon=`$ECHO $path | $GREP ^.:`
20962   new_path="$path"
20963   if test "x$has_colon" = x; then
20964     # Not in mixed or Windows style, start by that.
20965     new_path=`cmd //c echo $path`
20966   fi
20967 
20968 
20969   input_path="$new_path"
20970   # Check if we need to convert this using DOS-style short mode. If the path
20971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20972   # take no chances and rewrite it.
20973   # Note: m4 eats our [], so we need to use [ and ] instead.
20974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20975   if test "x$has_forbidden_chars" != x; then
20976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20977     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20978   fi
20979 
20980 
20981   windows_path="$new_path"
20982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20983     unix_path=`$CYGPATH -u "$windows_path"`
20984     new_path="$unix_path"
20985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20987     new_path="$unix_path"
20988   fi
20989 
20990   if test "x$path" != "x$new_path"; then
20991     BOOT_JDK="$new_path"
20992     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20993 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20994   fi
20995 
20996   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20997   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20998 
20999   else
21000     # We're on a unix platform. Hooray! :)
21001     path="$BOOT_JDK"
21002     has_space=`$ECHO "$path" | $GREP " "`
21003     if test "x$has_space" != x; then
21004       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21005 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21006       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21007     fi
21008 
21009     # Use eval to expand a potential ~
21010     eval path="$path"
21011     if test ! -f "$path" && test ! -d "$path"; then
21012       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21013     fi
21014 
21015     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21016   fi
21017 
21018             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21019 $as_echo_n "checking for Boot JDK... " >&6; }
21020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21021 $as_echo "$BOOT_JDK" >&6; }
21022             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21023 $as_echo_n "checking Boot JDK version... " >&6; }
21024             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21026 $as_echo "$BOOT_JDK_VERSION" >&6; }
21027           fi # end check jdk version
21028         fi # end check javac
21029       fi # end check java
21030     fi # end check boot jdk found
21031   fi
21032 
21033 
21034   if test "x$BOOT_JDK_FOUND" = xno; then
21035     # Now execute the test
21036 
21037   if test -x /usr/libexec/java_home; then
21038     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21039     BOOT_JDK_FOUND=maybe
21040     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21041 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21042   fi
21043 
21044 
21045     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21046     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21047       # Do we have a bin/java?
21048       if test ! -x "$BOOT_JDK/bin/java"; then
21049         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21050 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21051         BOOT_JDK_FOUND=no
21052       else
21053         # Do we have a bin/javac?
21054         if test ! -x "$BOOT_JDK/bin/javac"; then
21055           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21057           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21058 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21059           BOOT_JDK_FOUND=no
21060         else
21061           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21062           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21063 
21064           # Extra M4 quote needed to protect [] in grep expression.
21065           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21066           if test "x$FOUND_CORRECT_VERSION" = x; then
21067             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21068 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21069             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21070 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21071             BOOT_JDK_FOUND=no
21072           else
21073             # We're done! :-)
21074             BOOT_JDK_FOUND=yes
21075 
21076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21077 
21078   # Input might be given as Windows format, start by converting to
21079   # unix format.
21080   path="$BOOT_JDK"
21081   new_path=`$CYGPATH -u "$path"`
21082 
21083   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21084   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21085   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21086   # "foo.exe" is OK but "foo" is an error.
21087   #
21088   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21089   # It is also a way to make sure we got the proper file name for the real test later on.
21090   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21091   if test "x$test_shortpath" = x; then
21092     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21093 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21094     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21095   fi
21096 
21097   # Call helper function which possibly converts this using DOS-style short mode.
21098   # If so, the updated path is stored in $new_path.
21099 
21100   input_path="$new_path"
21101   # Check if we need to convert this using DOS-style short mode. If the path
21102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21103   # take no chances and rewrite it.
21104   # Note: m4 eats our [], so we need to use [ and ] instead.
21105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21106   if test "x$has_forbidden_chars" != x; then
21107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21111       # Going to short mode and back again did indeed matter. Since short mode is
21112       # case insensitive, let's make it lowercase to improve readability.
21113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21114       # Now convert it back to Unix-stile (cygpath)
21115       input_path=`$CYGPATH -u "$shortmode_path"`
21116       new_path="$input_path"
21117     fi
21118   fi
21119 
21120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21121   if test "x$test_cygdrive_prefix" = x; then
21122     # As a simple fix, exclude /usr/bin since it's not a real path.
21123     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21125       # a path prefixed by /cygdrive for fixpath to work.
21126       new_path="$CYGWIN_ROOT_PATH$input_path"
21127     fi
21128   fi
21129 
21130 
21131   if test "x$path" != "x$new_path"; then
21132     BOOT_JDK="$new_path"
21133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21134 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21135   fi
21136 
21137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21138 
21139   path="$BOOT_JDK"
21140   has_colon=`$ECHO $path | $GREP ^.:`
21141   new_path="$path"
21142   if test "x$has_colon" = x; then
21143     # Not in mixed or Windows style, start by that.
21144     new_path=`cmd //c echo $path`
21145   fi
21146 
21147 
21148   input_path="$new_path"
21149   # Check if we need to convert this using DOS-style short mode. If the path
21150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21151   # take no chances and rewrite it.
21152   # Note: m4 eats our [], so we need to use [ and ] instead.
21153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21154   if test "x$has_forbidden_chars" != x; then
21155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21156     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21157   fi
21158 
21159 
21160   windows_path="$new_path"
21161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21162     unix_path=`$CYGPATH -u "$windows_path"`
21163     new_path="$unix_path"
21164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21166     new_path="$unix_path"
21167   fi
21168 
21169   if test "x$path" != "x$new_path"; then
21170     BOOT_JDK="$new_path"
21171     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21172 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21173   fi
21174 
21175   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21176   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21177 
21178   else
21179     # We're on a unix platform. Hooray! :)
21180     path="$BOOT_JDK"
21181     has_space=`$ECHO "$path" | $GREP " "`
21182     if test "x$has_space" != x; then
21183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21184 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21185       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21186     fi
21187 
21188     # Use eval to expand a potential ~
21189     eval path="$path"
21190     if test ! -f "$path" && test ! -d "$path"; then
21191       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21192     fi
21193 
21194     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21195   fi
21196 
21197             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21198 $as_echo_n "checking for Boot JDK... " >&6; }
21199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21200 $as_echo "$BOOT_JDK" >&6; }
21201             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21202 $as_echo_n "checking Boot JDK version... " >&6; }
21203             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21204             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21205 $as_echo "$BOOT_JDK_VERSION" >&6; }
21206           fi # end check jdk version
21207         fi # end check javac
21208       fi # end check java
21209     fi # end check boot jdk found
21210   fi
21211 
21212   fi
21213 
21214 
21215     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21216     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21217       # Do we have a bin/java?
21218       if test ! -x "$BOOT_JDK/bin/java"; then
21219         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21220 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21221         BOOT_JDK_FOUND=no
21222       else
21223         # Do we have a bin/javac?
21224         if test ! -x "$BOOT_JDK/bin/javac"; then
21225           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21227           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21228 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21229           BOOT_JDK_FOUND=no
21230         else
21231           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21232           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21233 
21234           # Extra M4 quote needed to protect [] in grep expression.
21235           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21236           if test "x$FOUND_CORRECT_VERSION" = x; then
21237             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21238 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21239             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21240 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21241             BOOT_JDK_FOUND=no
21242           else
21243             # We're done! :-)
21244             BOOT_JDK_FOUND=yes
21245 
21246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21247 
21248   # Input might be given as Windows format, start by converting to
21249   # unix format.
21250   path="$BOOT_JDK"
21251   new_path=`$CYGPATH -u "$path"`
21252 
21253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21256   # "foo.exe" is OK but "foo" is an error.
21257   #
21258   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21259   # It is also a way to make sure we got the proper file name for the real test later on.
21260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21261   if test "x$test_shortpath" = x; then
21262     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21263 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21264     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21265   fi
21266 
21267   # Call helper function which possibly converts this using DOS-style short mode.
21268   # If so, the updated path is stored in $new_path.
21269 
21270   input_path="$new_path"
21271   # Check if we need to convert this using DOS-style short mode. If the path
21272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21273   # take no chances and rewrite it.
21274   # Note: m4 eats our [], so we need to use [ and ] instead.
21275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21276   if test "x$has_forbidden_chars" != x; then
21277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21281       # Going to short mode and back again did indeed matter. Since short mode is
21282       # case insensitive, let's make it lowercase to improve readability.
21283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21284       # Now convert it back to Unix-stile (cygpath)
21285       input_path=`$CYGPATH -u "$shortmode_path"`
21286       new_path="$input_path"
21287     fi
21288   fi
21289 
21290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21291   if test "x$test_cygdrive_prefix" = x; then
21292     # As a simple fix, exclude /usr/bin since it's not a real path.
21293     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21295       # a path prefixed by /cygdrive for fixpath to work.
21296       new_path="$CYGWIN_ROOT_PATH$input_path"
21297     fi
21298   fi
21299 
21300 
21301   if test "x$path" != "x$new_path"; then
21302     BOOT_JDK="$new_path"
21303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21305   fi
21306 
21307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21308 
21309   path="$BOOT_JDK"
21310   has_colon=`$ECHO $path | $GREP ^.:`
21311   new_path="$path"
21312   if test "x$has_colon" = x; then
21313     # Not in mixed or Windows style, start by that.
21314     new_path=`cmd //c echo $path`
21315   fi
21316 
21317 
21318   input_path="$new_path"
21319   # Check if we need to convert this using DOS-style short mode. If the path
21320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21321   # take no chances and rewrite it.
21322   # Note: m4 eats our [], so we need to use [ and ] instead.
21323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21324   if test "x$has_forbidden_chars" != x; then
21325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21326     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21327   fi
21328 
21329 
21330   windows_path="$new_path"
21331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21332     unix_path=`$CYGPATH -u "$windows_path"`
21333     new_path="$unix_path"
21334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21336     new_path="$unix_path"
21337   fi
21338 
21339   if test "x$path" != "x$new_path"; then
21340     BOOT_JDK="$new_path"
21341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21342 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21343   fi
21344 
21345   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21346   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21347 
21348   else
21349     # We're on a unix platform. Hooray! :)
21350     path="$BOOT_JDK"
21351     has_space=`$ECHO "$path" | $GREP " "`
21352     if test "x$has_space" != x; then
21353       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21354 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21355       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21356     fi
21357 
21358     # Use eval to expand a potential ~
21359     eval path="$path"
21360     if test ! -f "$path" && test ! -d "$path"; then
21361       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21362     fi
21363 
21364     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21365   fi
21366 
21367             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21368 $as_echo_n "checking for Boot JDK... " >&6; }
21369             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21370 $as_echo "$BOOT_JDK" >&6; }
21371             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21372 $as_echo_n "checking Boot JDK version... " >&6; }
21373             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21374             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21375 $as_echo "$BOOT_JDK_VERSION" >&6; }
21376           fi # end check jdk version
21377         fi # end check javac
21378       fi # end check java
21379     fi # end check boot jdk found
21380   fi
21381 
21382 
21383   # Test: Is $JAVA_HOME set?
21384 
21385   if test "x$BOOT_JDK_FOUND" = xno; then
21386     # Now execute the test
21387 
21388   if test "x$JAVA_HOME" != x; then
21389     JAVA_HOME_PROCESSED="$JAVA_HOME"
21390 
21391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21392 
21393   # Input might be given as Windows format, start by converting to
21394   # unix format.
21395   path="$JAVA_HOME_PROCESSED"
21396   new_path=`$CYGPATH -u "$path"`
21397 
21398   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21399   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21400   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21401   # "foo.exe" is OK but "foo" is an error.
21402   #
21403   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21404   # It is also a way to make sure we got the proper file name for the real test later on.
21405   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21406   if test "x$test_shortpath" = x; then
21407     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21408 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21409     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21410   fi
21411 
21412   # Call helper function which possibly converts this using DOS-style short mode.
21413   # If so, the updated path is stored in $new_path.
21414 
21415   input_path="$new_path"
21416   # Check if we need to convert this using DOS-style short mode. If the path
21417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21418   # take no chances and rewrite it.
21419   # Note: m4 eats our [], so we need to use [ and ] instead.
21420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21421   if test "x$has_forbidden_chars" != x; then
21422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21423     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21424     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21425     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21426       # Going to short mode and back again did indeed matter. Since short mode is
21427       # case insensitive, let's make it lowercase to improve readability.
21428       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21429       # Now convert it back to Unix-stile (cygpath)
21430       input_path=`$CYGPATH -u "$shortmode_path"`
21431       new_path="$input_path"
21432     fi
21433   fi
21434 
21435   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21436   if test "x$test_cygdrive_prefix" = x; then
21437     # As a simple fix, exclude /usr/bin since it's not a real path.
21438     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21439       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21440       # a path prefixed by /cygdrive for fixpath to work.
21441       new_path="$CYGWIN_ROOT_PATH$input_path"
21442     fi
21443   fi
21444 
21445 
21446   if test "x$path" != "x$new_path"; then
21447     JAVA_HOME_PROCESSED="$new_path"
21448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21449 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21450   fi
21451 
21452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21453 
21454   path="$JAVA_HOME_PROCESSED"
21455   has_colon=`$ECHO $path | $GREP ^.:`
21456   new_path="$path"
21457   if test "x$has_colon" = x; then
21458     # Not in mixed or Windows style, start by that.
21459     new_path=`cmd //c echo $path`
21460   fi
21461 
21462 
21463   input_path="$new_path"
21464   # Check if we need to convert this using DOS-style short mode. If the path
21465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21466   # take no chances and rewrite it.
21467   # Note: m4 eats our [], so we need to use [ and ] instead.
21468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21469   if test "x$has_forbidden_chars" != x; then
21470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21472   fi
21473 
21474 
21475   windows_path="$new_path"
21476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21477     unix_path=`$CYGPATH -u "$windows_path"`
21478     new_path="$unix_path"
21479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21481     new_path="$unix_path"
21482   fi
21483 
21484   if test "x$path" != "x$new_path"; then
21485     JAVA_HOME_PROCESSED="$new_path"
21486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21487 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21488   fi
21489 
21490   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21491   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21492 
21493   else
21494     # We're on a unix platform. Hooray! :)
21495     path="$JAVA_HOME_PROCESSED"
21496     has_space=`$ECHO "$path" | $GREP " "`
21497     if test "x$has_space" != x; then
21498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21499 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21500       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21501     fi
21502 
21503     # Use eval to expand a potential ~
21504     eval path="$path"
21505     if test ! -f "$path" && test ! -d "$path"; then
21506       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21507     fi
21508 
21509     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21510   fi
21511 
21512     if test ! -d "$JAVA_HOME_PROCESSED"; then
21513       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21514 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21515     else
21516       # Aha, the user has set a JAVA_HOME
21517       # let us use that as the Boot JDK.
21518       BOOT_JDK="$JAVA_HOME_PROCESSED"
21519       BOOT_JDK_FOUND=maybe
21520       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21521 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21522     fi
21523   fi
21524 
21525 
21526     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21527     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21528       # Do we have a bin/java?
21529       if test ! -x "$BOOT_JDK/bin/java"; then
21530         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21531 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21532         BOOT_JDK_FOUND=no
21533       else
21534         # Do we have a bin/javac?
21535         if test ! -x "$BOOT_JDK/bin/javac"; then
21536           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21537 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21538           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21539 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21540           BOOT_JDK_FOUND=no
21541         else
21542           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21543           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21544 
21545           # Extra M4 quote needed to protect [] in grep expression.
21546           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21547           if test "x$FOUND_CORRECT_VERSION" = x; then
21548             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21550             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21551 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21552             BOOT_JDK_FOUND=no
21553           else
21554             # We're done! :-)
21555             BOOT_JDK_FOUND=yes
21556 
21557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21558 
21559   # Input might be given as Windows format, start by converting to
21560   # unix format.
21561   path="$BOOT_JDK"
21562   new_path=`$CYGPATH -u "$path"`
21563 
21564   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21565   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21566   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21567   # "foo.exe" is OK but "foo" is an error.
21568   #
21569   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21570   # It is also a way to make sure we got the proper file name for the real test later on.
21571   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21572   if test "x$test_shortpath" = x; then
21573     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21574 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21575     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21576   fi
21577 
21578   # Call helper function which possibly converts this using DOS-style short mode.
21579   # If so, the updated path is stored in $new_path.
21580 
21581   input_path="$new_path"
21582   # Check if we need to convert this using DOS-style short mode. If the path
21583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21584   # take no chances and rewrite it.
21585   # Note: m4 eats our [], so we need to use [ and ] instead.
21586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21587   if test "x$has_forbidden_chars" != x; then
21588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21589     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21590     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21591     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21592       # Going to short mode and back again did indeed matter. Since short mode is
21593       # case insensitive, let's make it lowercase to improve readability.
21594       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21595       # Now convert it back to Unix-stile (cygpath)
21596       input_path=`$CYGPATH -u "$shortmode_path"`
21597       new_path="$input_path"
21598     fi
21599   fi
21600 
21601   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21602   if test "x$test_cygdrive_prefix" = x; then
21603     # As a simple fix, exclude /usr/bin since it's not a real path.
21604     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21605       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21606       # a path prefixed by /cygdrive for fixpath to work.
21607       new_path="$CYGWIN_ROOT_PATH$input_path"
21608     fi
21609   fi
21610 
21611 
21612   if test "x$path" != "x$new_path"; then
21613     BOOT_JDK="$new_path"
21614     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21615 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21616   fi
21617 
21618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21619 
21620   path="$BOOT_JDK"
21621   has_colon=`$ECHO $path | $GREP ^.:`
21622   new_path="$path"
21623   if test "x$has_colon" = x; then
21624     # Not in mixed or Windows style, start by that.
21625     new_path=`cmd //c echo $path`
21626   fi
21627 
21628 
21629   input_path="$new_path"
21630   # Check if we need to convert this using DOS-style short mode. If the path
21631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21632   # take no chances and rewrite it.
21633   # Note: m4 eats our [], so we need to use [ and ] instead.
21634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21635   if test "x$has_forbidden_chars" != x; then
21636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21637     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21638   fi
21639 
21640 
21641   windows_path="$new_path"
21642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21643     unix_path=`$CYGPATH -u "$windows_path"`
21644     new_path="$unix_path"
21645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21647     new_path="$unix_path"
21648   fi
21649 
21650   if test "x$path" != "x$new_path"; then
21651     BOOT_JDK="$new_path"
21652     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21653 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21654   fi
21655 
21656   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21657   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21658 
21659   else
21660     # We're on a unix platform. Hooray! :)
21661     path="$BOOT_JDK"
21662     has_space=`$ECHO "$path" | $GREP " "`
21663     if test "x$has_space" != x; then
21664       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21666       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21667     fi
21668 
21669     # Use eval to expand a potential ~
21670     eval path="$path"
21671     if test ! -f "$path" && test ! -d "$path"; then
21672       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21673     fi
21674 
21675     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21676   fi
21677 
21678             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21679 $as_echo_n "checking for Boot JDK... " >&6; }
21680             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21681 $as_echo "$BOOT_JDK" >&6; }
21682             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21683 $as_echo_n "checking Boot JDK version... " >&6; }
21684             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21685             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21686 $as_echo "$BOOT_JDK_VERSION" >&6; }
21687           fi # end check jdk version
21688         fi # end check javac
21689       fi # end check java
21690     fi # end check boot jdk found
21691   fi
21692 
21693 
21694   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21695 
21696   if test "x$BOOT_JDK_FOUND" = xno; then
21697     # Now execute the test
21698 
21699   # Extract the first word of "javac", so it can be a program name with args.
21700 set dummy javac; ac_word=$2
21701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21702 $as_echo_n "checking for $ac_word... " >&6; }
21703 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21704   $as_echo_n "(cached) " >&6
21705 else
21706   case $JAVAC_CHECK in
21707   [\\/]* | ?:[\\/]*)
21708   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21709   ;;
21710   *)
21711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21712 for as_dir in $PATH
21713 do
21714   IFS=$as_save_IFS
21715   test -z "$as_dir" && as_dir=.
21716     for ac_exec_ext in '' $ac_executable_extensions; do
21717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21718     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21720     break 2
21721   fi
21722 done
21723   done
21724 IFS=$as_save_IFS
21725 
21726   ;;
21727 esac
21728 fi
21729 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21730 if test -n "$JAVAC_CHECK"; then
21731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21732 $as_echo "$JAVAC_CHECK" >&6; }
21733 else
21734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21735 $as_echo "no" >&6; }
21736 fi
21737 
21738 
21739   # Extract the first word of "java", so it can be a program name with args.
21740 set dummy java; ac_word=$2
21741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21742 $as_echo_n "checking for $ac_word... " >&6; }
21743 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21744   $as_echo_n "(cached) " >&6
21745 else
21746   case $JAVA_CHECK in
21747   [\\/]* | ?:[\\/]*)
21748   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21749   ;;
21750   *)
21751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21752 for as_dir in $PATH
21753 do
21754   IFS=$as_save_IFS
21755   test -z "$as_dir" && as_dir=.
21756     for ac_exec_ext in '' $ac_executable_extensions; do
21757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21758     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21760     break 2
21761   fi
21762 done
21763   done
21764 IFS=$as_save_IFS
21765 
21766   ;;
21767 esac
21768 fi
21769 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21770 if test -n "$JAVA_CHECK"; then
21771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21772 $as_echo "$JAVA_CHECK" >&6; }
21773 else
21774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21775 $as_echo "no" >&6; }
21776 fi
21777 
21778 
21779   BINARY="$JAVAC_CHECK"
21780   if test "x$JAVAC_CHECK" = x; then
21781     BINARY="$JAVA_CHECK"
21782   fi
21783   if test "x$BINARY" != x; then
21784     # So there is a java(c) binary, it might be part of a JDK.
21785     # Lets find the JDK/JRE directory by following symbolic links.
21786     # Linux/GNU systems often have links from /usr/bin/java to
21787     # /etc/alternatives/java to the real JDK binary.
21788 
21789   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21790     # Follow a chain of symbolic links. Use readlink
21791     # where it exists, else fall back to horribly
21792     # complicated shell code.
21793     if test "x$READLINK_TESTED" != yes; then
21794       # On MacOSX there is a readlink tool with a different
21795       # purpose than the GNU readlink tool. Check the found readlink.
21796       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21797       if test "x$ISGNU" = x; then
21798         # A readlink that we do not know how to use.
21799         # Are there other non-GNU readlinks out there?
21800         READLINK_TESTED=yes
21801         READLINK=
21802       fi
21803     fi
21804 
21805     if test "x$READLINK" != x; then
21806       BINARY=`$READLINK -f $BINARY`
21807     else
21808       # Save the current directory for restoring afterwards
21809       STARTDIR=$PWD
21810       COUNTER=0
21811       sym_link_dir=`$DIRNAME $BINARY`
21812       sym_link_file=`$BASENAME $BINARY`
21813       cd $sym_link_dir
21814       # Use -P flag to resolve symlinks in directories.
21815       cd `$THEPWDCMD -P`
21816       sym_link_dir=`$THEPWDCMD -P`
21817       # Resolve file symlinks
21818       while test $COUNTER -lt 20; do
21819         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21820         if test "x$ISLINK" == x; then
21821           # This is not a symbolic link! We are done!
21822           break
21823         fi
21824         # Again resolve directory symlinks since the target of the just found
21825         # link could be in a different directory
21826         cd `$DIRNAME $ISLINK`
21827         sym_link_dir=`$THEPWDCMD -P`
21828         sym_link_file=`$BASENAME $ISLINK`
21829         let COUNTER=COUNTER+1
21830       done
21831       cd $STARTDIR
21832       BINARY=$sym_link_dir/$sym_link_file
21833     fi
21834   fi
21835 
21836     BOOT_JDK=`dirname "$BINARY"`
21837     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21838     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21839       # Looks like we found ourselves an JDK
21840       BOOT_JDK_FOUND=maybe
21841       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21842 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21843     fi
21844   fi
21845 
21846 
21847     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21848     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21849       # Do we have a bin/java?
21850       if test ! -x "$BOOT_JDK/bin/java"; then
21851         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21852 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21853         BOOT_JDK_FOUND=no
21854       else
21855         # Do we have a bin/javac?
21856         if test ! -x "$BOOT_JDK/bin/javac"; then
21857           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21858 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21859           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21860 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21861           BOOT_JDK_FOUND=no
21862         else
21863           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21864           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21865 
21866           # Extra M4 quote needed to protect [] in grep expression.
21867           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21868           if test "x$FOUND_CORRECT_VERSION" = x; then
21869             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21870 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21871             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21872 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21873             BOOT_JDK_FOUND=no
21874           else
21875             # We're done! :-)
21876             BOOT_JDK_FOUND=yes
21877 
21878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21879 
21880   # Input might be given as Windows format, start by converting to
21881   # unix format.
21882   path="$BOOT_JDK"
21883   new_path=`$CYGPATH -u "$path"`
21884 
21885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21888   # "foo.exe" is OK but "foo" is an error.
21889   #
21890   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21891   # It is also a way to make sure we got the proper file name for the real test later on.
21892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21893   if test "x$test_shortpath" = x; then
21894     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21895 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21896     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21897   fi
21898 
21899   # Call helper function which possibly converts this using DOS-style short mode.
21900   # If so, the updated path is stored in $new_path.
21901 
21902   input_path="$new_path"
21903   # Check if we need to convert this using DOS-style short mode. If the path
21904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21905   # take no chances and rewrite it.
21906   # Note: m4 eats our [], so we need to use [ and ] instead.
21907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21908   if test "x$has_forbidden_chars" != x; then
21909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21913       # Going to short mode and back again did indeed matter. Since short mode is
21914       # case insensitive, let's make it lowercase to improve readability.
21915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21916       # Now convert it back to Unix-stile (cygpath)
21917       input_path=`$CYGPATH -u "$shortmode_path"`
21918       new_path="$input_path"
21919     fi
21920   fi
21921 
21922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21923   if test "x$test_cygdrive_prefix" = x; then
21924     # As a simple fix, exclude /usr/bin since it's not a real path.
21925     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21927       # a path prefixed by /cygdrive for fixpath to work.
21928       new_path="$CYGWIN_ROOT_PATH$input_path"
21929     fi
21930   fi
21931 
21932 
21933   if test "x$path" != "x$new_path"; then
21934     BOOT_JDK="$new_path"
21935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21936 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21937   fi
21938 
21939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21940 
21941   path="$BOOT_JDK"
21942   has_colon=`$ECHO $path | $GREP ^.:`
21943   new_path="$path"
21944   if test "x$has_colon" = x; then
21945     # Not in mixed or Windows style, start by that.
21946     new_path=`cmd //c echo $path`
21947   fi
21948 
21949 
21950   input_path="$new_path"
21951   # Check if we need to convert this using DOS-style short mode. If the path
21952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21953   # take no chances and rewrite it.
21954   # Note: m4 eats our [], so we need to use [ and ] instead.
21955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21956   if test "x$has_forbidden_chars" != x; then
21957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21958     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21959   fi
21960 
21961 
21962   windows_path="$new_path"
21963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21964     unix_path=`$CYGPATH -u "$windows_path"`
21965     new_path="$unix_path"
21966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21968     new_path="$unix_path"
21969   fi
21970 
21971   if test "x$path" != "x$new_path"; then
21972     BOOT_JDK="$new_path"
21973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21974 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21975   fi
21976 
21977   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21978   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21979 
21980   else
21981     # We're on a unix platform. Hooray! :)
21982     path="$BOOT_JDK"
21983     has_space=`$ECHO "$path" | $GREP " "`
21984     if test "x$has_space" != x; then
21985       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21986 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21987       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21988     fi
21989 
21990     # Use eval to expand a potential ~
21991     eval path="$path"
21992     if test ! -f "$path" && test ! -d "$path"; then
21993       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21994     fi
21995 
21996     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21997   fi
21998 
21999             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22000 $as_echo_n "checking for Boot JDK... " >&6; }
22001             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22002 $as_echo "$BOOT_JDK" >&6; }
22003             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22004 $as_echo_n "checking Boot JDK version... " >&6; }
22005             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22007 $as_echo "$BOOT_JDK_VERSION" >&6; }
22008           fi # end check jdk version
22009         fi # end check javac
22010       fi # end check java
22011     fi # end check boot jdk found
22012   fi
22013 
22014 
22015   # Test: Is there a JDK installed in default, well-known locations?
22016 
22017   if test "x$BOOT_JDK_FOUND" = xno; then
22018     # Now execute the test
22019 
22020   if test "x$OPENJDK_TARGET_OS" = xwindows; then
22021 
22022   if test "x$BOOT_JDK_FOUND" = xno; then
22023     # Now execute the test
22024 
22025   if test "x$ProgramW6432" != x; then
22026     VIRTUAL_DIR="$ProgramW6432/Java"
22027 
22028   windows_path="$VIRTUAL_DIR"
22029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22030     unix_path=`$CYGPATH -u "$windows_path"`
22031     VIRTUAL_DIR="$unix_path"
22032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22034     VIRTUAL_DIR="$unix_path"
22035   fi
22036 
22037 
22038   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22039   BOOT_JDK_SUFFIX=""
22040   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22041   if test "x$ALL_JDKS_FOUND" != x; then
22042     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22043 
22044   if test "x$BOOT_JDK_FOUND" = xno; then
22045     # Now execute the test
22046 
22047         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22048         if test -d "$BOOT_JDK"; then
22049           BOOT_JDK_FOUND=maybe
22050           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22051 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22052         fi
22053 
22054 
22055     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22056     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22057       # Do we have a bin/java?
22058       if test ! -x "$BOOT_JDK/bin/java"; then
22059         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22060 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22061         BOOT_JDK_FOUND=no
22062       else
22063         # Do we have a bin/javac?
22064         if test ! -x "$BOOT_JDK/bin/javac"; then
22065           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22066 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22067           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22068 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22069           BOOT_JDK_FOUND=no
22070         else
22071           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22072           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22073 
22074           # Extra M4 quote needed to protect [] in grep expression.
22075           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22076           if test "x$FOUND_CORRECT_VERSION" = x; then
22077             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22079             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22080 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22081             BOOT_JDK_FOUND=no
22082           else
22083             # We're done! :-)
22084             BOOT_JDK_FOUND=yes
22085 
22086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22087 
22088   # Input might be given as Windows format, start by converting to
22089   # unix format.
22090   path="$BOOT_JDK"
22091   new_path=`$CYGPATH -u "$path"`
22092 
22093   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22094   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22095   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22096   # "foo.exe" is OK but "foo" is an error.
22097   #
22098   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22099   # It is also a way to make sure we got the proper file name for the real test later on.
22100   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22101   if test "x$test_shortpath" = x; then
22102     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22103 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22104     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22105   fi
22106 
22107   # Call helper function which possibly converts this using DOS-style short mode.
22108   # If so, the updated path is stored in $new_path.
22109 
22110   input_path="$new_path"
22111   # Check if we need to convert this using DOS-style short mode. If the path
22112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22113   # take no chances and rewrite it.
22114   # Note: m4 eats our [], so we need to use [ and ] instead.
22115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22116   if test "x$has_forbidden_chars" != x; then
22117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22118     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22119     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22120     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22121       # Going to short mode and back again did indeed matter. Since short mode is
22122       # case insensitive, let's make it lowercase to improve readability.
22123       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22124       # Now convert it back to Unix-stile (cygpath)
22125       input_path=`$CYGPATH -u "$shortmode_path"`
22126       new_path="$input_path"
22127     fi
22128   fi
22129 
22130   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22131   if test "x$test_cygdrive_prefix" = x; then
22132     # As a simple fix, exclude /usr/bin since it's not a real path.
22133     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22134       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22135       # a path prefixed by /cygdrive for fixpath to work.
22136       new_path="$CYGWIN_ROOT_PATH$input_path"
22137     fi
22138   fi
22139 
22140 
22141   if test "x$path" != "x$new_path"; then
22142     BOOT_JDK="$new_path"
22143     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22144 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22145   fi
22146 
22147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22148 
22149   path="$BOOT_JDK"
22150   has_colon=`$ECHO $path | $GREP ^.:`
22151   new_path="$path"
22152   if test "x$has_colon" = x; then
22153     # Not in mixed or Windows style, start by that.
22154     new_path=`cmd //c echo $path`
22155   fi
22156 
22157 
22158   input_path="$new_path"
22159   # Check if we need to convert this using DOS-style short mode. If the path
22160   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22161   # take no chances and rewrite it.
22162   # Note: m4 eats our [], so we need to use [ and ] instead.
22163   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22164   if test "x$has_forbidden_chars" != x; then
22165     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22166     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22167   fi
22168 
22169 
22170   windows_path="$new_path"
22171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22172     unix_path=`$CYGPATH -u "$windows_path"`
22173     new_path="$unix_path"
22174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22176     new_path="$unix_path"
22177   fi
22178 
22179   if test "x$path" != "x$new_path"; then
22180     BOOT_JDK="$new_path"
22181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22182 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22183   fi
22184 
22185   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22186   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22187 
22188   else
22189     # We're on a unix platform. Hooray! :)
22190     path="$BOOT_JDK"
22191     has_space=`$ECHO "$path" | $GREP " "`
22192     if test "x$has_space" != x; then
22193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22194 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22195       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22196     fi
22197 
22198     # Use eval to expand a potential ~
22199     eval path="$path"
22200     if test ! -f "$path" && test ! -d "$path"; then
22201       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22202     fi
22203 
22204     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22205   fi
22206 
22207             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22208 $as_echo_n "checking for Boot JDK... " >&6; }
22209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22210 $as_echo "$BOOT_JDK" >&6; }
22211             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22212 $as_echo_n "checking Boot JDK version... " >&6; }
22213             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22214             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22215 $as_echo "$BOOT_JDK_VERSION" >&6; }
22216           fi # end check jdk version
22217         fi # end check javac
22218       fi # end check java
22219     fi # end check boot jdk found
22220   fi
22221 
22222     done
22223   fi
22224 
22225   fi
22226 
22227 
22228     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22229     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22230       # Do we have a bin/java?
22231       if test ! -x "$BOOT_JDK/bin/java"; then
22232         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22233 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22234         BOOT_JDK_FOUND=no
22235       else
22236         # Do we have a bin/javac?
22237         if test ! -x "$BOOT_JDK/bin/javac"; then
22238           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22239 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22240           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22241 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22242           BOOT_JDK_FOUND=no
22243         else
22244           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22245           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22246 
22247           # Extra M4 quote needed to protect [] in grep expression.
22248           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22249           if test "x$FOUND_CORRECT_VERSION" = x; then
22250             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22252             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22253 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22254             BOOT_JDK_FOUND=no
22255           else
22256             # We're done! :-)
22257             BOOT_JDK_FOUND=yes
22258 
22259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22260 
22261   # Input might be given as Windows format, start by converting to
22262   # unix format.
22263   path="$BOOT_JDK"
22264   new_path=`$CYGPATH -u "$path"`
22265 
22266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22269   # "foo.exe" is OK but "foo" is an error.
22270   #
22271   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22272   # It is also a way to make sure we got the proper file name for the real test later on.
22273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22274   if test "x$test_shortpath" = x; then
22275     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22276 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22277     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22278   fi
22279 
22280   # Call helper function which possibly converts this using DOS-style short mode.
22281   # If so, the updated path is stored in $new_path.
22282 
22283   input_path="$new_path"
22284   # Check if we need to convert this using DOS-style short mode. If the path
22285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22286   # take no chances and rewrite it.
22287   # Note: m4 eats our [], so we need to use [ and ] instead.
22288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22289   if test "x$has_forbidden_chars" != x; then
22290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22294       # Going to short mode and back again did indeed matter. Since short mode is
22295       # case insensitive, let's make it lowercase to improve readability.
22296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22297       # Now convert it back to Unix-stile (cygpath)
22298       input_path=`$CYGPATH -u "$shortmode_path"`
22299       new_path="$input_path"
22300     fi
22301   fi
22302 
22303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22304   if test "x$test_cygdrive_prefix" = x; then
22305     # As a simple fix, exclude /usr/bin since it's not a real path.
22306     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22308       # a path prefixed by /cygdrive for fixpath to work.
22309       new_path="$CYGWIN_ROOT_PATH$input_path"
22310     fi
22311   fi
22312 
22313 
22314   if test "x$path" != "x$new_path"; then
22315     BOOT_JDK="$new_path"
22316     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22317 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22318   fi
22319 
22320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22321 
22322   path="$BOOT_JDK"
22323   has_colon=`$ECHO $path | $GREP ^.:`
22324   new_path="$path"
22325   if test "x$has_colon" = x; then
22326     # Not in mixed or Windows style, start by that.
22327     new_path=`cmd //c echo $path`
22328   fi
22329 
22330 
22331   input_path="$new_path"
22332   # Check if we need to convert this using DOS-style short mode. If the path
22333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22334   # take no chances and rewrite it.
22335   # Note: m4 eats our [], so we need to use [ and ] instead.
22336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22337   if test "x$has_forbidden_chars" != x; then
22338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22339     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22340   fi
22341 
22342 
22343   windows_path="$new_path"
22344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22345     unix_path=`$CYGPATH -u "$windows_path"`
22346     new_path="$unix_path"
22347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22349     new_path="$unix_path"
22350   fi
22351 
22352   if test "x$path" != "x$new_path"; then
22353     BOOT_JDK="$new_path"
22354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22355 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22356   fi
22357 
22358   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22359   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22360 
22361   else
22362     # We're on a unix platform. Hooray! :)
22363     path="$BOOT_JDK"
22364     has_space=`$ECHO "$path" | $GREP " "`
22365     if test "x$has_space" != x; then
22366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22367 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22368       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22369     fi
22370 
22371     # Use eval to expand a potential ~
22372     eval path="$path"
22373     if test ! -f "$path" && test ! -d "$path"; then
22374       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22375     fi
22376 
22377     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22378   fi
22379 
22380             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22381 $as_echo_n "checking for Boot JDK... " >&6; }
22382             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22383 $as_echo "$BOOT_JDK" >&6; }
22384             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22385 $as_echo_n "checking Boot JDK version... " >&6; }
22386             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22387             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22388 $as_echo "$BOOT_JDK_VERSION" >&6; }
22389           fi # end check jdk version
22390         fi # end check javac
22391       fi # end check java
22392     fi # end check boot jdk found
22393   fi
22394 
22395 
22396   if test "x$BOOT_JDK_FOUND" = xno; then
22397     # Now execute the test
22398 
22399   if test "x$PROGRAMW6432" != x; then
22400     VIRTUAL_DIR="$PROGRAMW6432/Java"
22401 
22402   windows_path="$VIRTUAL_DIR"
22403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22404     unix_path=`$CYGPATH -u "$windows_path"`
22405     VIRTUAL_DIR="$unix_path"
22406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22408     VIRTUAL_DIR="$unix_path"
22409   fi
22410 
22411 
22412   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22413   BOOT_JDK_SUFFIX=""
22414   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22415   if test "x$ALL_JDKS_FOUND" != x; then
22416     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22417 
22418   if test "x$BOOT_JDK_FOUND" = xno; then
22419     # Now execute the test
22420 
22421         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22422         if test -d "$BOOT_JDK"; then
22423           BOOT_JDK_FOUND=maybe
22424           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22425 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22426         fi
22427 
22428 
22429     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22430     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22431       # Do we have a bin/java?
22432       if test ! -x "$BOOT_JDK/bin/java"; then
22433         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22435         BOOT_JDK_FOUND=no
22436       else
22437         # Do we have a bin/javac?
22438         if test ! -x "$BOOT_JDK/bin/javac"; then
22439           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22440 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22441           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22442 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22443           BOOT_JDK_FOUND=no
22444         else
22445           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22446           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22447 
22448           # Extra M4 quote needed to protect [] in grep expression.
22449           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22450           if test "x$FOUND_CORRECT_VERSION" = x; then
22451             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22452 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22453             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22454 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22455             BOOT_JDK_FOUND=no
22456           else
22457             # We're done! :-)
22458             BOOT_JDK_FOUND=yes
22459 
22460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22461 
22462   # Input might be given as Windows format, start by converting to
22463   # unix format.
22464   path="$BOOT_JDK"
22465   new_path=`$CYGPATH -u "$path"`
22466 
22467   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22468   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22469   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22470   # "foo.exe" is OK but "foo" is an error.
22471   #
22472   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22473   # It is also a way to make sure we got the proper file name for the real test later on.
22474   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22475   if test "x$test_shortpath" = x; then
22476     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22477 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22478     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22479   fi
22480 
22481   # Call helper function which possibly converts this using DOS-style short mode.
22482   # If so, the updated path is stored in $new_path.
22483 
22484   input_path="$new_path"
22485   # Check if we need to convert this using DOS-style short mode. If the path
22486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22487   # take no chances and rewrite it.
22488   # Note: m4 eats our [], so we need to use [ and ] instead.
22489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22490   if test "x$has_forbidden_chars" != x; then
22491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22492     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22493     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22494     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22495       # Going to short mode and back again did indeed matter. Since short mode is
22496       # case insensitive, let's make it lowercase to improve readability.
22497       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22498       # Now convert it back to Unix-stile (cygpath)
22499       input_path=`$CYGPATH -u "$shortmode_path"`
22500       new_path="$input_path"
22501     fi
22502   fi
22503 
22504   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22505   if test "x$test_cygdrive_prefix" = x; then
22506     # As a simple fix, exclude /usr/bin since it's not a real path.
22507     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22508       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22509       # a path prefixed by /cygdrive for fixpath to work.
22510       new_path="$CYGWIN_ROOT_PATH$input_path"
22511     fi
22512   fi
22513 
22514 
22515   if test "x$path" != "x$new_path"; then
22516     BOOT_JDK="$new_path"
22517     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22518 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22519   fi
22520 
22521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22522 
22523   path="$BOOT_JDK"
22524   has_colon=`$ECHO $path | $GREP ^.:`
22525   new_path="$path"
22526   if test "x$has_colon" = x; then
22527     # Not in mixed or Windows style, start by that.
22528     new_path=`cmd //c echo $path`
22529   fi
22530 
22531 
22532   input_path="$new_path"
22533   # Check if we need to convert this using DOS-style short mode. If the path
22534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22535   # take no chances and rewrite it.
22536   # Note: m4 eats our [], so we need to use [ and ] instead.
22537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22538   if test "x$has_forbidden_chars" != x; then
22539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22540     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22541   fi
22542 
22543 
22544   windows_path="$new_path"
22545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22546     unix_path=`$CYGPATH -u "$windows_path"`
22547     new_path="$unix_path"
22548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22550     new_path="$unix_path"
22551   fi
22552 
22553   if test "x$path" != "x$new_path"; then
22554     BOOT_JDK="$new_path"
22555     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22556 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22557   fi
22558 
22559   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22560   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22561 
22562   else
22563     # We're on a unix platform. Hooray! :)
22564     path="$BOOT_JDK"
22565     has_space=`$ECHO "$path" | $GREP " "`
22566     if test "x$has_space" != x; then
22567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22568 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22569       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22570     fi
22571 
22572     # Use eval to expand a potential ~
22573     eval path="$path"
22574     if test ! -f "$path" && test ! -d "$path"; then
22575       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22576     fi
22577 
22578     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22579   fi
22580 
22581             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22582 $as_echo_n "checking for Boot JDK... " >&6; }
22583             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22584 $as_echo "$BOOT_JDK" >&6; }
22585             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22586 $as_echo_n "checking Boot JDK version... " >&6; }
22587             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22588             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22589 $as_echo "$BOOT_JDK_VERSION" >&6; }
22590           fi # end check jdk version
22591         fi # end check javac
22592       fi # end check java
22593     fi # end check boot jdk found
22594   fi
22595 
22596     done
22597   fi
22598 
22599   fi
22600 
22601 
22602     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22603     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22604       # Do we have a bin/java?
22605       if test ! -x "$BOOT_JDK/bin/java"; then
22606         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22608         BOOT_JDK_FOUND=no
22609       else
22610         # Do we have a bin/javac?
22611         if test ! -x "$BOOT_JDK/bin/javac"; then
22612           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22613 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22614           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22615 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22616           BOOT_JDK_FOUND=no
22617         else
22618           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22619           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22620 
22621           # Extra M4 quote needed to protect [] in grep expression.
22622           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22623           if test "x$FOUND_CORRECT_VERSION" = x; then
22624             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22625 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22626             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22627 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22628             BOOT_JDK_FOUND=no
22629           else
22630             # We're done! :-)
22631             BOOT_JDK_FOUND=yes
22632 
22633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22634 
22635   # Input might be given as Windows format, start by converting to
22636   # unix format.
22637   path="$BOOT_JDK"
22638   new_path=`$CYGPATH -u "$path"`
22639 
22640   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22641   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22642   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22643   # "foo.exe" is OK but "foo" is an error.
22644   #
22645   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22646   # It is also a way to make sure we got the proper file name for the real test later on.
22647   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22648   if test "x$test_shortpath" = x; then
22649     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22650 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22651     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22652   fi
22653 
22654   # Call helper function which possibly converts this using DOS-style short mode.
22655   # If so, the updated path is stored in $new_path.
22656 
22657   input_path="$new_path"
22658   # Check if we need to convert this using DOS-style short mode. If the path
22659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22660   # take no chances and rewrite it.
22661   # Note: m4 eats our [], so we need to use [ and ] instead.
22662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22663   if test "x$has_forbidden_chars" != x; then
22664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22665     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22666     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22667     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22668       # Going to short mode and back again did indeed matter. Since short mode is
22669       # case insensitive, let's make it lowercase to improve readability.
22670       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22671       # Now convert it back to Unix-stile (cygpath)
22672       input_path=`$CYGPATH -u "$shortmode_path"`
22673       new_path="$input_path"
22674     fi
22675   fi
22676 
22677   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22678   if test "x$test_cygdrive_prefix" = x; then
22679     # As a simple fix, exclude /usr/bin since it's not a real path.
22680     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22681       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22682       # a path prefixed by /cygdrive for fixpath to work.
22683       new_path="$CYGWIN_ROOT_PATH$input_path"
22684     fi
22685   fi
22686 
22687 
22688   if test "x$path" != "x$new_path"; then
22689     BOOT_JDK="$new_path"
22690     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22691 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22692   fi
22693 
22694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22695 
22696   path="$BOOT_JDK"
22697   has_colon=`$ECHO $path | $GREP ^.:`
22698   new_path="$path"
22699   if test "x$has_colon" = x; then
22700     # Not in mixed or Windows style, start by that.
22701     new_path=`cmd //c echo $path`
22702   fi
22703 
22704 
22705   input_path="$new_path"
22706   # Check if we need to convert this using DOS-style short mode. If the path
22707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22708   # take no chances and rewrite it.
22709   # Note: m4 eats our [], so we need to use [ and ] instead.
22710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22711   if test "x$has_forbidden_chars" != x; then
22712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22713     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22714   fi
22715 
22716 
22717   windows_path="$new_path"
22718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22719     unix_path=`$CYGPATH -u "$windows_path"`
22720     new_path="$unix_path"
22721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22723     new_path="$unix_path"
22724   fi
22725 
22726   if test "x$path" != "x$new_path"; then
22727     BOOT_JDK="$new_path"
22728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22729 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22730   fi
22731 
22732   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22733   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22734 
22735   else
22736     # We're on a unix platform. Hooray! :)
22737     path="$BOOT_JDK"
22738     has_space=`$ECHO "$path" | $GREP " "`
22739     if test "x$has_space" != x; then
22740       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22741 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22742       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22743     fi
22744 
22745     # Use eval to expand a potential ~
22746     eval path="$path"
22747     if test ! -f "$path" && test ! -d "$path"; then
22748       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22749     fi
22750 
22751     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22752   fi
22753 
22754             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22755 $as_echo_n "checking for Boot JDK... " >&6; }
22756             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22757 $as_echo "$BOOT_JDK" >&6; }
22758             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22759 $as_echo_n "checking Boot JDK version... " >&6; }
22760             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22762 $as_echo "$BOOT_JDK_VERSION" >&6; }
22763           fi # end check jdk version
22764         fi # end check javac
22765       fi # end check java
22766     fi # end check boot jdk found
22767   fi
22768 
22769 
22770   if test "x$BOOT_JDK_FOUND" = xno; then
22771     # Now execute the test
22772 
22773   if test "x$PROGRAMFILES" != x; then
22774     VIRTUAL_DIR="$PROGRAMFILES/Java"
22775 
22776   windows_path="$VIRTUAL_DIR"
22777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22778     unix_path=`$CYGPATH -u "$windows_path"`
22779     VIRTUAL_DIR="$unix_path"
22780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22782     VIRTUAL_DIR="$unix_path"
22783   fi
22784 
22785 
22786   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22787   BOOT_JDK_SUFFIX=""
22788   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22789   if test "x$ALL_JDKS_FOUND" != x; then
22790     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22791 
22792   if test "x$BOOT_JDK_FOUND" = xno; then
22793     # Now execute the test
22794 
22795         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22796         if test -d "$BOOT_JDK"; then
22797           BOOT_JDK_FOUND=maybe
22798           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22799 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22800         fi
22801 
22802 
22803     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22804     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22805       # Do we have a bin/java?
22806       if test ! -x "$BOOT_JDK/bin/java"; then
22807         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22809         BOOT_JDK_FOUND=no
22810       else
22811         # Do we have a bin/javac?
22812         if test ! -x "$BOOT_JDK/bin/javac"; then
22813           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22814 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22815           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22816 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22817           BOOT_JDK_FOUND=no
22818         else
22819           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22820           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22821 
22822           # Extra M4 quote needed to protect [] in grep expression.
22823           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22824           if test "x$FOUND_CORRECT_VERSION" = x; then
22825             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22827             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22828 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22829             BOOT_JDK_FOUND=no
22830           else
22831             # We're done! :-)
22832             BOOT_JDK_FOUND=yes
22833 
22834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22835 
22836   # Input might be given as Windows format, start by converting to
22837   # unix format.
22838   path="$BOOT_JDK"
22839   new_path=`$CYGPATH -u "$path"`
22840 
22841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22844   # "foo.exe" is OK but "foo" is an error.
22845   #
22846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22847   # It is also a way to make sure we got the proper file name for the real test later on.
22848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22849   if test "x$test_shortpath" = x; then
22850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22851 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22852     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22853   fi
22854 
22855   # Call helper function which possibly converts this using DOS-style short mode.
22856   # If so, the updated path is stored in $new_path.
22857 
22858   input_path="$new_path"
22859   # Check if we need to convert this using DOS-style short mode. If the path
22860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22861   # take no chances and rewrite it.
22862   # Note: m4 eats our [], so we need to use [ and ] instead.
22863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22864   if test "x$has_forbidden_chars" != x; then
22865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22869       # Going to short mode and back again did indeed matter. Since short mode is
22870       # case insensitive, let's make it lowercase to improve readability.
22871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22872       # Now convert it back to Unix-stile (cygpath)
22873       input_path=`$CYGPATH -u "$shortmode_path"`
22874       new_path="$input_path"
22875     fi
22876   fi
22877 
22878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22879   if test "x$test_cygdrive_prefix" = x; then
22880     # As a simple fix, exclude /usr/bin since it's not a real path.
22881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22883       # a path prefixed by /cygdrive for fixpath to work.
22884       new_path="$CYGWIN_ROOT_PATH$input_path"
22885     fi
22886   fi
22887 
22888 
22889   if test "x$path" != "x$new_path"; then
22890     BOOT_JDK="$new_path"
22891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22892 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22893   fi
22894 
22895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22896 
22897   path="$BOOT_JDK"
22898   has_colon=`$ECHO $path | $GREP ^.:`
22899   new_path="$path"
22900   if test "x$has_colon" = x; then
22901     # Not in mixed or Windows style, start by that.
22902     new_path=`cmd //c echo $path`
22903   fi
22904 
22905 
22906   input_path="$new_path"
22907   # Check if we need to convert this using DOS-style short mode. If the path
22908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22909   # take no chances and rewrite it.
22910   # Note: m4 eats our [], so we need to use [ and ] instead.
22911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22912   if test "x$has_forbidden_chars" != x; then
22913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22915   fi
22916 
22917 
22918   windows_path="$new_path"
22919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22920     unix_path=`$CYGPATH -u "$windows_path"`
22921     new_path="$unix_path"
22922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22924     new_path="$unix_path"
22925   fi
22926 
22927   if test "x$path" != "x$new_path"; then
22928     BOOT_JDK="$new_path"
22929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22930 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22931   fi
22932 
22933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22935 
22936   else
22937     # We're on a unix platform. Hooray! :)
22938     path="$BOOT_JDK"
22939     has_space=`$ECHO "$path" | $GREP " "`
22940     if test "x$has_space" != x; then
22941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22942 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22943       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22944     fi
22945 
22946     # Use eval to expand a potential ~
22947     eval path="$path"
22948     if test ! -f "$path" && test ! -d "$path"; then
22949       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22950     fi
22951 
22952     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22953   fi
22954 
22955             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22956 $as_echo_n "checking for Boot JDK... " >&6; }
22957             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22958 $as_echo "$BOOT_JDK" >&6; }
22959             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22960 $as_echo_n "checking Boot JDK version... " >&6; }
22961             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22962             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22963 $as_echo "$BOOT_JDK_VERSION" >&6; }
22964           fi # end check jdk version
22965         fi # end check javac
22966       fi # end check java
22967     fi # end check boot jdk found
22968   fi
22969 
22970     done
22971   fi
22972 
22973   fi
22974 
22975 
22976     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22977     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22978       # Do we have a bin/java?
22979       if test ! -x "$BOOT_JDK/bin/java"; then
22980         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22982         BOOT_JDK_FOUND=no
22983       else
22984         # Do we have a bin/javac?
22985         if test ! -x "$BOOT_JDK/bin/javac"; then
22986           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22987 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22988           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22989 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22990           BOOT_JDK_FOUND=no
22991         else
22992           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22993           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22994 
22995           # Extra M4 quote needed to protect [] in grep expression.
22996           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22997           if test "x$FOUND_CORRECT_VERSION" = x; then
22998             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22999 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23000             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23001 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23002             BOOT_JDK_FOUND=no
23003           else
23004             # We're done! :-)
23005             BOOT_JDK_FOUND=yes
23006 
23007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23008 
23009   # Input might be given as Windows format, start by converting to
23010   # unix format.
23011   path="$BOOT_JDK"
23012   new_path=`$CYGPATH -u "$path"`
23013 
23014   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23015   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23016   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23017   # "foo.exe" is OK but "foo" is an error.
23018   #
23019   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23020   # It is also a way to make sure we got the proper file name for the real test later on.
23021   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23022   if test "x$test_shortpath" = x; then
23023     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23024 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23025     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23026   fi
23027 
23028   # Call helper function which possibly converts this using DOS-style short mode.
23029   # If so, the updated path is stored in $new_path.
23030 
23031   input_path="$new_path"
23032   # Check if we need to convert this using DOS-style short mode. If the path
23033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23034   # take no chances and rewrite it.
23035   # Note: m4 eats our [], so we need to use [ and ] instead.
23036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23037   if test "x$has_forbidden_chars" != x; then
23038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23039     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23040     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23041     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23042       # Going to short mode and back again did indeed matter. Since short mode is
23043       # case insensitive, let's make it lowercase to improve readability.
23044       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23045       # Now convert it back to Unix-stile (cygpath)
23046       input_path=`$CYGPATH -u "$shortmode_path"`
23047       new_path="$input_path"
23048     fi
23049   fi
23050 
23051   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23052   if test "x$test_cygdrive_prefix" = x; then
23053     # As a simple fix, exclude /usr/bin since it's not a real path.
23054     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23055       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23056       # a path prefixed by /cygdrive for fixpath to work.
23057       new_path="$CYGWIN_ROOT_PATH$input_path"
23058     fi
23059   fi
23060 
23061 
23062   if test "x$path" != "x$new_path"; then
23063     BOOT_JDK="$new_path"
23064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23065 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23066   fi
23067 
23068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23069 
23070   path="$BOOT_JDK"
23071   has_colon=`$ECHO $path | $GREP ^.:`
23072   new_path="$path"
23073   if test "x$has_colon" = x; then
23074     # Not in mixed or Windows style, start by that.
23075     new_path=`cmd //c echo $path`
23076   fi
23077 
23078 
23079   input_path="$new_path"
23080   # Check if we need to convert this using DOS-style short mode. If the path
23081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23082   # take no chances and rewrite it.
23083   # Note: m4 eats our [], so we need to use [ and ] instead.
23084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23085   if test "x$has_forbidden_chars" != x; then
23086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23087     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23088   fi
23089 
23090 
23091   windows_path="$new_path"
23092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23093     unix_path=`$CYGPATH -u "$windows_path"`
23094     new_path="$unix_path"
23095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23097     new_path="$unix_path"
23098   fi
23099 
23100   if test "x$path" != "x$new_path"; then
23101     BOOT_JDK="$new_path"
23102     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23103 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23104   fi
23105 
23106   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23107   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23108 
23109   else
23110     # We're on a unix platform. Hooray! :)
23111     path="$BOOT_JDK"
23112     has_space=`$ECHO "$path" | $GREP " "`
23113     if test "x$has_space" != x; then
23114       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23115 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23116       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23117     fi
23118 
23119     # Use eval to expand a potential ~
23120     eval path="$path"
23121     if test ! -f "$path" && test ! -d "$path"; then
23122       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23123     fi
23124 
23125     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23126   fi
23127 
23128             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23129 $as_echo_n "checking for Boot JDK... " >&6; }
23130             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23131 $as_echo "$BOOT_JDK" >&6; }
23132             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23133 $as_echo_n "checking Boot JDK version... " >&6; }
23134             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23135             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23136 $as_echo "$BOOT_JDK_VERSION" >&6; }
23137           fi # end check jdk version
23138         fi # end check javac
23139       fi # end check java
23140     fi # end check boot jdk found
23141   fi
23142 
23143 
23144   if test "x$BOOT_JDK_FOUND" = xno; then
23145     # Now execute the test
23146 
23147   if test "x$ProgramFiles" != x; then
23148     VIRTUAL_DIR="$ProgramFiles/Java"
23149 
23150   windows_path="$VIRTUAL_DIR"
23151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23152     unix_path=`$CYGPATH -u "$windows_path"`
23153     VIRTUAL_DIR="$unix_path"
23154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23156     VIRTUAL_DIR="$unix_path"
23157   fi
23158 
23159 
23160   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23161   BOOT_JDK_SUFFIX=""
23162   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23163   if test "x$ALL_JDKS_FOUND" != x; then
23164     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23165 
23166   if test "x$BOOT_JDK_FOUND" = xno; then
23167     # Now execute the test
23168 
23169         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23170         if test -d "$BOOT_JDK"; then
23171           BOOT_JDK_FOUND=maybe
23172           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23173 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23174         fi
23175 
23176 
23177     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23178     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23179       # Do we have a bin/java?
23180       if test ! -x "$BOOT_JDK/bin/java"; then
23181         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23183         BOOT_JDK_FOUND=no
23184       else
23185         # Do we have a bin/javac?
23186         if test ! -x "$BOOT_JDK/bin/javac"; then
23187           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23188 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23189           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23190 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23191           BOOT_JDK_FOUND=no
23192         else
23193           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23194           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23195 
23196           # Extra M4 quote needed to protect [] in grep expression.
23197           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23198           if test "x$FOUND_CORRECT_VERSION" = x; then
23199             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23201             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23202 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23203             BOOT_JDK_FOUND=no
23204           else
23205             # We're done! :-)
23206             BOOT_JDK_FOUND=yes
23207 
23208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209 
23210   # Input might be given as Windows format, start by converting to
23211   # unix format.
23212   path="$BOOT_JDK"
23213   new_path=`$CYGPATH -u "$path"`
23214 
23215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23218   # "foo.exe" is OK but "foo" is an error.
23219   #
23220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23221   # It is also a way to make sure we got the proper file name for the real test later on.
23222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23223   if test "x$test_shortpath" = x; then
23224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23227   fi
23228 
23229   # Call helper function which possibly converts this using DOS-style short mode.
23230   # If so, the updated path is stored in $new_path.
23231 
23232   input_path="$new_path"
23233   # Check if we need to convert this using DOS-style short mode. If the path
23234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23235   # take no chances and rewrite it.
23236   # Note: m4 eats our [], so we need to use [ and ] instead.
23237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23238   if test "x$has_forbidden_chars" != x; then
23239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23243       # Going to short mode and back again did indeed matter. Since short mode is
23244       # case insensitive, let's make it lowercase to improve readability.
23245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23246       # Now convert it back to Unix-stile (cygpath)
23247       input_path=`$CYGPATH -u "$shortmode_path"`
23248       new_path="$input_path"
23249     fi
23250   fi
23251 
23252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23253   if test "x$test_cygdrive_prefix" = x; then
23254     # As a simple fix, exclude /usr/bin since it's not a real path.
23255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23257       # a path prefixed by /cygdrive for fixpath to work.
23258       new_path="$CYGWIN_ROOT_PATH$input_path"
23259     fi
23260   fi
23261 
23262 
23263   if test "x$path" != "x$new_path"; then
23264     BOOT_JDK="$new_path"
23265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267   fi
23268 
23269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23270 
23271   path="$BOOT_JDK"
23272   has_colon=`$ECHO $path | $GREP ^.:`
23273   new_path="$path"
23274   if test "x$has_colon" = x; then
23275     # Not in mixed or Windows style, start by that.
23276     new_path=`cmd //c echo $path`
23277   fi
23278 
23279 
23280   input_path="$new_path"
23281   # Check if we need to convert this using DOS-style short mode. If the path
23282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23283   # take no chances and rewrite it.
23284   # Note: m4 eats our [], so we need to use [ and ] instead.
23285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23286   if test "x$has_forbidden_chars" != x; then
23287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23289   fi
23290 
23291 
23292   windows_path="$new_path"
23293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23294     unix_path=`$CYGPATH -u "$windows_path"`
23295     new_path="$unix_path"
23296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23298     new_path="$unix_path"
23299   fi
23300 
23301   if test "x$path" != "x$new_path"; then
23302     BOOT_JDK="$new_path"
23303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23305   fi
23306 
23307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23309 
23310   else
23311     # We're on a unix platform. Hooray! :)
23312     path="$BOOT_JDK"
23313     has_space=`$ECHO "$path" | $GREP " "`
23314     if test "x$has_space" != x; then
23315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23317       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23318     fi
23319 
23320     # Use eval to expand a potential ~
23321     eval path="$path"
23322     if test ! -f "$path" && test ! -d "$path"; then
23323       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23324     fi
23325 
23326     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23327   fi
23328 
23329             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23330 $as_echo_n "checking for Boot JDK... " >&6; }
23331             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23332 $as_echo "$BOOT_JDK" >&6; }
23333             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23334 $as_echo_n "checking Boot JDK version... " >&6; }
23335             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23336             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23337 $as_echo "$BOOT_JDK_VERSION" >&6; }
23338           fi # end check jdk version
23339         fi # end check javac
23340       fi # end check java
23341     fi # end check boot jdk found
23342   fi
23343 
23344     done
23345   fi
23346 
23347   fi
23348 
23349 
23350     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23351     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23352       # Do we have a bin/java?
23353       if test ! -x "$BOOT_JDK/bin/java"; then
23354         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23356         BOOT_JDK_FOUND=no
23357       else
23358         # Do we have a bin/javac?
23359         if test ! -x "$BOOT_JDK/bin/javac"; then
23360           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23361 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23362           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23363 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23364           BOOT_JDK_FOUND=no
23365         else
23366           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23367           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23368 
23369           # Extra M4 quote needed to protect [] in grep expression.
23370           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23371           if test "x$FOUND_CORRECT_VERSION" = x; then
23372             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23373 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23374             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23375 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23376             BOOT_JDK_FOUND=no
23377           else
23378             # We're done! :-)
23379             BOOT_JDK_FOUND=yes
23380 
23381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23382 
23383   # Input might be given as Windows format, start by converting to
23384   # unix format.
23385   path="$BOOT_JDK"
23386   new_path=`$CYGPATH -u "$path"`
23387 
23388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23391   # "foo.exe" is OK but "foo" is an error.
23392   #
23393   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23394   # It is also a way to make sure we got the proper file name for the real test later on.
23395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23396   if test "x$test_shortpath" = x; then
23397     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23398 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23399     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23400   fi
23401 
23402   # Call helper function which possibly converts this using DOS-style short mode.
23403   # If so, the updated path is stored in $new_path.
23404 
23405   input_path="$new_path"
23406   # Check if we need to convert this using DOS-style short mode. If the path
23407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23408   # take no chances and rewrite it.
23409   # Note: m4 eats our [], so we need to use [ and ] instead.
23410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23411   if test "x$has_forbidden_chars" != x; then
23412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23413     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23414     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23415     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23416       # Going to short mode and back again did indeed matter. Since short mode is
23417       # case insensitive, let's make it lowercase to improve readability.
23418       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23419       # Now convert it back to Unix-stile (cygpath)
23420       input_path=`$CYGPATH -u "$shortmode_path"`
23421       new_path="$input_path"
23422     fi
23423   fi
23424 
23425   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23426   if test "x$test_cygdrive_prefix" = x; then
23427     # As a simple fix, exclude /usr/bin since it's not a real path.
23428     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23429       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23430       # a path prefixed by /cygdrive for fixpath to work.
23431       new_path="$CYGWIN_ROOT_PATH$input_path"
23432     fi
23433   fi
23434 
23435 
23436   if test "x$path" != "x$new_path"; then
23437     BOOT_JDK="$new_path"
23438     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23439 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23440   fi
23441 
23442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23443 
23444   path="$BOOT_JDK"
23445   has_colon=`$ECHO $path | $GREP ^.:`
23446   new_path="$path"
23447   if test "x$has_colon" = x; then
23448     # Not in mixed or Windows style, start by that.
23449     new_path=`cmd //c echo $path`
23450   fi
23451 
23452 
23453   input_path="$new_path"
23454   # Check if we need to convert this using DOS-style short mode. If the path
23455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23456   # take no chances and rewrite it.
23457   # Note: m4 eats our [], so we need to use [ and ] instead.
23458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23459   if test "x$has_forbidden_chars" != x; then
23460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23461     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23462   fi
23463 
23464 
23465   windows_path="$new_path"
23466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23467     unix_path=`$CYGPATH -u "$windows_path"`
23468     new_path="$unix_path"
23469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23471     new_path="$unix_path"
23472   fi
23473 
23474   if test "x$path" != "x$new_path"; then
23475     BOOT_JDK="$new_path"
23476     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23477 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23478   fi
23479 
23480   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23481   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23482 
23483   else
23484     # We're on a unix platform. Hooray! :)
23485     path="$BOOT_JDK"
23486     has_space=`$ECHO "$path" | $GREP " "`
23487     if test "x$has_space" != x; then
23488       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23489 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23490       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23491     fi
23492 
23493     # Use eval to expand a potential ~
23494     eval path="$path"
23495     if test ! -f "$path" && test ! -d "$path"; then
23496       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23497     fi
23498 
23499     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23500   fi
23501 
23502             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23503 $as_echo_n "checking for Boot JDK... " >&6; }
23504             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23505 $as_echo "$BOOT_JDK" >&6; }
23506             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23507 $as_echo_n "checking Boot JDK version... " >&6; }
23508             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23509             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23510 $as_echo "$BOOT_JDK_VERSION" >&6; }
23511           fi # end check jdk version
23512         fi # end check javac
23513       fi # end check java
23514     fi # end check boot jdk found
23515   fi
23516 
23517 
23518   if test "x$BOOT_JDK_FOUND" = xno; then
23519     # Now execute the test
23520 
23521   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23522   BOOT_JDK_SUFFIX=""
23523   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23524   if test "x$ALL_JDKS_FOUND" != x; then
23525     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23526 
23527   if test "x$BOOT_JDK_FOUND" = xno; then
23528     # Now execute the test
23529 
23530         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23531         if test -d "$BOOT_JDK"; then
23532           BOOT_JDK_FOUND=maybe
23533           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23534 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23535         fi
23536 
23537 
23538     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23539     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23540       # Do we have a bin/java?
23541       if test ! -x "$BOOT_JDK/bin/java"; then
23542         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23543 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23544         BOOT_JDK_FOUND=no
23545       else
23546         # Do we have a bin/javac?
23547         if test ! -x "$BOOT_JDK/bin/javac"; then
23548           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23550           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23551 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23552           BOOT_JDK_FOUND=no
23553         else
23554           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23555           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23556 
23557           # Extra M4 quote needed to protect [] in grep expression.
23558           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23559           if test "x$FOUND_CORRECT_VERSION" = x; then
23560             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23561 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23562             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23563 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23564             BOOT_JDK_FOUND=no
23565           else
23566             # We're done! :-)
23567             BOOT_JDK_FOUND=yes
23568 
23569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23570 
23571   # Input might be given as Windows format, start by converting to
23572   # unix format.
23573   path="$BOOT_JDK"
23574   new_path=`$CYGPATH -u "$path"`
23575 
23576   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23577   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23578   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23579   # "foo.exe" is OK but "foo" is an error.
23580   #
23581   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23582   # It is also a way to make sure we got the proper file name for the real test later on.
23583   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23584   if test "x$test_shortpath" = x; then
23585     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23586 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23587     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23588   fi
23589 
23590   # Call helper function which possibly converts this using DOS-style short mode.
23591   # If so, the updated path is stored in $new_path.
23592 
23593   input_path="$new_path"
23594   # Check if we need to convert this using DOS-style short mode. If the path
23595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23596   # take no chances and rewrite it.
23597   # Note: m4 eats our [], so we need to use [ and ] instead.
23598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23599   if test "x$has_forbidden_chars" != x; then
23600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23601     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23602     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23603     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23604       # Going to short mode and back again did indeed matter. Since short mode is
23605       # case insensitive, let's make it lowercase to improve readability.
23606       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23607       # Now convert it back to Unix-stile (cygpath)
23608       input_path=`$CYGPATH -u "$shortmode_path"`
23609       new_path="$input_path"
23610     fi
23611   fi
23612 
23613   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23614   if test "x$test_cygdrive_prefix" = x; then
23615     # As a simple fix, exclude /usr/bin since it's not a real path.
23616     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23617       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23618       # a path prefixed by /cygdrive for fixpath to work.
23619       new_path="$CYGWIN_ROOT_PATH$input_path"
23620     fi
23621   fi
23622 
23623 
23624   if test "x$path" != "x$new_path"; then
23625     BOOT_JDK="$new_path"
23626     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23627 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23628   fi
23629 
23630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23631 
23632   path="$BOOT_JDK"
23633   has_colon=`$ECHO $path | $GREP ^.:`
23634   new_path="$path"
23635   if test "x$has_colon" = x; then
23636     # Not in mixed or Windows style, start by that.
23637     new_path=`cmd //c echo $path`
23638   fi
23639 
23640 
23641   input_path="$new_path"
23642   # Check if we need to convert this using DOS-style short mode. If the path
23643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23644   # take no chances and rewrite it.
23645   # Note: m4 eats our [], so we need to use [ and ] instead.
23646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23647   if test "x$has_forbidden_chars" != x; then
23648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23649     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23650   fi
23651 
23652 
23653   windows_path="$new_path"
23654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23655     unix_path=`$CYGPATH -u "$windows_path"`
23656     new_path="$unix_path"
23657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23658     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23659     new_path="$unix_path"
23660   fi
23661 
23662   if test "x$path" != "x$new_path"; then
23663     BOOT_JDK="$new_path"
23664     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23665 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23666   fi
23667 
23668   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23669   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23670 
23671   else
23672     # We're on a unix platform. Hooray! :)
23673     path="$BOOT_JDK"
23674     has_space=`$ECHO "$path" | $GREP " "`
23675     if test "x$has_space" != x; then
23676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23677 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23678       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23679     fi
23680 
23681     # Use eval to expand a potential ~
23682     eval path="$path"
23683     if test ! -f "$path" && test ! -d "$path"; then
23684       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23685     fi
23686 
23687     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23688   fi
23689 
23690             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23691 $as_echo_n "checking for Boot JDK... " >&6; }
23692             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23693 $as_echo "$BOOT_JDK" >&6; }
23694             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23695 $as_echo_n "checking Boot JDK version... " >&6; }
23696             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23697             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23698 $as_echo "$BOOT_JDK_VERSION" >&6; }
23699           fi # end check jdk version
23700         fi # end check javac
23701       fi # end check java
23702     fi # end check boot jdk found
23703   fi
23704 
23705     done
23706   fi
23707 
23708 
23709     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23710     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23711       # Do we have a bin/java?
23712       if test ! -x "$BOOT_JDK/bin/java"; then
23713         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23714 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23715         BOOT_JDK_FOUND=no
23716       else
23717         # Do we have a bin/javac?
23718         if test ! -x "$BOOT_JDK/bin/javac"; then
23719           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23720 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23721           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23722 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23723           BOOT_JDK_FOUND=no
23724         else
23725           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23726           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23727 
23728           # Extra M4 quote needed to protect [] in grep expression.
23729           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23730           if test "x$FOUND_CORRECT_VERSION" = x; then
23731             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23733             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23734 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23735             BOOT_JDK_FOUND=no
23736           else
23737             # We're done! :-)
23738             BOOT_JDK_FOUND=yes
23739 
23740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23741 
23742   # Input might be given as Windows format, start by converting to
23743   # unix format.
23744   path="$BOOT_JDK"
23745   new_path=`$CYGPATH -u "$path"`
23746 
23747   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23748   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23749   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23750   # "foo.exe" is OK but "foo" is an error.
23751   #
23752   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23753   # It is also a way to make sure we got the proper file name for the real test later on.
23754   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23755   if test "x$test_shortpath" = x; then
23756     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23757 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23758     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23759   fi
23760 
23761   # Call helper function which possibly converts this using DOS-style short mode.
23762   # If so, the updated path is stored in $new_path.
23763 
23764   input_path="$new_path"
23765   # Check if we need to convert this using DOS-style short mode. If the path
23766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23767   # take no chances and rewrite it.
23768   # Note: m4 eats our [], so we need to use [ and ] instead.
23769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23770   if test "x$has_forbidden_chars" != x; then
23771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23772     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23773     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23774     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23775       # Going to short mode and back again did indeed matter. Since short mode is
23776       # case insensitive, let's make it lowercase to improve readability.
23777       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23778       # Now convert it back to Unix-stile (cygpath)
23779       input_path=`$CYGPATH -u "$shortmode_path"`
23780       new_path="$input_path"
23781     fi
23782   fi
23783 
23784   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23785   if test "x$test_cygdrive_prefix" = x; then
23786     # As a simple fix, exclude /usr/bin since it's not a real path.
23787     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23788       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23789       # a path prefixed by /cygdrive for fixpath to work.
23790       new_path="$CYGWIN_ROOT_PATH$input_path"
23791     fi
23792   fi
23793 
23794 
23795   if test "x$path" != "x$new_path"; then
23796     BOOT_JDK="$new_path"
23797     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23798 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23799   fi
23800 
23801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23802 
23803   path="$BOOT_JDK"
23804   has_colon=`$ECHO $path | $GREP ^.:`
23805   new_path="$path"
23806   if test "x$has_colon" = x; then
23807     # Not in mixed or Windows style, start by that.
23808     new_path=`cmd //c echo $path`
23809   fi
23810 
23811 
23812   input_path="$new_path"
23813   # Check if we need to convert this using DOS-style short mode. If the path
23814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23815   # take no chances and rewrite it.
23816   # Note: m4 eats our [], so we need to use [ and ] instead.
23817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23818   if test "x$has_forbidden_chars" != x; then
23819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23820     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23821   fi
23822 
23823 
23824   windows_path="$new_path"
23825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23826     unix_path=`$CYGPATH -u "$windows_path"`
23827     new_path="$unix_path"
23828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23830     new_path="$unix_path"
23831   fi
23832 
23833   if test "x$path" != "x$new_path"; then
23834     BOOT_JDK="$new_path"
23835     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23836 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23837   fi
23838 
23839   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23840   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23841 
23842   else
23843     # We're on a unix platform. Hooray! :)
23844     path="$BOOT_JDK"
23845     has_space=`$ECHO "$path" | $GREP " "`
23846     if test "x$has_space" != x; then
23847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23848 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23849       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23850     fi
23851 
23852     # Use eval to expand a potential ~
23853     eval path="$path"
23854     if test ! -f "$path" && test ! -d "$path"; then
23855       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23856     fi
23857 
23858     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23859   fi
23860 
23861             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23862 $as_echo_n "checking for Boot JDK... " >&6; }
23863             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23864 $as_echo "$BOOT_JDK" >&6; }
23865             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23866 $as_echo_n "checking Boot JDK version... " >&6; }
23867             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23868             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23869 $as_echo "$BOOT_JDK_VERSION" >&6; }
23870           fi # end check jdk version
23871         fi # end check javac
23872       fi # end check java
23873     fi # end check boot jdk found
23874   fi
23875 
23876   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23877 
23878   if test "x$BOOT_JDK_FOUND" = xno; then
23879     # Now execute the test
23880 
23881   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23882   BOOT_JDK_SUFFIX="/Contents/Home"
23883   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23884   if test "x$ALL_JDKS_FOUND" != x; then
23885     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23886 
23887   if test "x$BOOT_JDK_FOUND" = xno; then
23888     # Now execute the test
23889 
23890         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23891         if test -d "$BOOT_JDK"; then
23892           BOOT_JDK_FOUND=maybe
23893           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23894 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23895         fi
23896 
23897 
23898     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23899     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23900       # Do we have a bin/java?
23901       if test ! -x "$BOOT_JDK/bin/java"; then
23902         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23903 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23904         BOOT_JDK_FOUND=no
23905       else
23906         # Do we have a bin/javac?
23907         if test ! -x "$BOOT_JDK/bin/javac"; then
23908           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23910           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23911 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23912           BOOT_JDK_FOUND=no
23913         else
23914           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23915           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23916 
23917           # Extra M4 quote needed to protect [] in grep expression.
23918           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23919           if test "x$FOUND_CORRECT_VERSION" = x; then
23920             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23921 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23922             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23923 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23924             BOOT_JDK_FOUND=no
23925           else
23926             # We're done! :-)
23927             BOOT_JDK_FOUND=yes
23928 
23929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23930 
23931   # Input might be given as Windows format, start by converting to
23932   # unix format.
23933   path="$BOOT_JDK"
23934   new_path=`$CYGPATH -u "$path"`
23935 
23936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23939   # "foo.exe" is OK but "foo" is an error.
23940   #
23941   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23942   # It is also a way to make sure we got the proper file name for the real test later on.
23943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23944   if test "x$test_shortpath" = x; then
23945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23946 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23947     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23948   fi
23949 
23950   # Call helper function which possibly converts this using DOS-style short mode.
23951   # If so, the updated path is stored in $new_path.
23952 
23953   input_path="$new_path"
23954   # Check if we need to convert this using DOS-style short mode. If the path
23955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23956   # take no chances and rewrite it.
23957   # Note: m4 eats our [], so we need to use [ and ] instead.
23958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23959   if test "x$has_forbidden_chars" != x; then
23960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23961     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23962     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23963     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23964       # Going to short mode and back again did indeed matter. Since short mode is
23965       # case insensitive, let's make it lowercase to improve readability.
23966       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23967       # Now convert it back to Unix-stile (cygpath)
23968       input_path=`$CYGPATH -u "$shortmode_path"`
23969       new_path="$input_path"
23970     fi
23971   fi
23972 
23973   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23974   if test "x$test_cygdrive_prefix" = x; then
23975     # As a simple fix, exclude /usr/bin since it's not a real path.
23976     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23977       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23978       # a path prefixed by /cygdrive for fixpath to work.
23979       new_path="$CYGWIN_ROOT_PATH$input_path"
23980     fi
23981   fi
23982 
23983 
23984   if test "x$path" != "x$new_path"; then
23985     BOOT_JDK="$new_path"
23986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23987 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23988   fi
23989 
23990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23991 
23992   path="$BOOT_JDK"
23993   has_colon=`$ECHO $path | $GREP ^.:`
23994   new_path="$path"
23995   if test "x$has_colon" = x; then
23996     # Not in mixed or Windows style, start by that.
23997     new_path=`cmd //c echo $path`
23998   fi
23999 
24000 
24001   input_path="$new_path"
24002   # Check if we need to convert this using DOS-style short mode. If the path
24003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24004   # take no chances and rewrite it.
24005   # Note: m4 eats our [], so we need to use [ and ] instead.
24006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24007   if test "x$has_forbidden_chars" != x; then
24008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24010   fi
24011 
24012 
24013   windows_path="$new_path"
24014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24015     unix_path=`$CYGPATH -u "$windows_path"`
24016     new_path="$unix_path"
24017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24019     new_path="$unix_path"
24020   fi
24021 
24022   if test "x$path" != "x$new_path"; then
24023     BOOT_JDK="$new_path"
24024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24025 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24026   fi
24027 
24028   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24029   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24030 
24031   else
24032     # We're on a unix platform. Hooray! :)
24033     path="$BOOT_JDK"
24034     has_space=`$ECHO "$path" | $GREP " "`
24035     if test "x$has_space" != x; then
24036       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24037 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24038       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24039     fi
24040 
24041     # Use eval to expand a potential ~
24042     eval path="$path"
24043     if test ! -f "$path" && test ! -d "$path"; then
24044       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24045     fi
24046 
24047     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24048   fi
24049 
24050             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24051 $as_echo_n "checking for Boot JDK... " >&6; }
24052             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24053 $as_echo "$BOOT_JDK" >&6; }
24054             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24055 $as_echo_n "checking Boot JDK version... " >&6; }
24056             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24057             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24058 $as_echo "$BOOT_JDK_VERSION" >&6; }
24059           fi # end check jdk version
24060         fi # end check javac
24061       fi # end check java
24062     fi # end check boot jdk found
24063   fi
24064 
24065     done
24066   fi
24067 
24068 
24069     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24070     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24071       # Do we have a bin/java?
24072       if test ! -x "$BOOT_JDK/bin/java"; then
24073         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24074 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24075         BOOT_JDK_FOUND=no
24076       else
24077         # Do we have a bin/javac?
24078         if test ! -x "$BOOT_JDK/bin/javac"; then
24079           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24081           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24082 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24083           BOOT_JDK_FOUND=no
24084         else
24085           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24086           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24087 
24088           # Extra M4 quote needed to protect [] in grep expression.
24089           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24090           if test "x$FOUND_CORRECT_VERSION" = x; then
24091             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24093             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24094 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24095             BOOT_JDK_FOUND=no
24096           else
24097             # We're done! :-)
24098             BOOT_JDK_FOUND=yes
24099 
24100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24101 
24102   # Input might be given as Windows format, start by converting to
24103   # unix format.
24104   path="$BOOT_JDK"
24105   new_path=`$CYGPATH -u "$path"`
24106 
24107   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24108   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24109   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24110   # "foo.exe" is OK but "foo" is an error.
24111   #
24112   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24113   # It is also a way to make sure we got the proper file name for the real test later on.
24114   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24115   if test "x$test_shortpath" = x; then
24116     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24117 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24118     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24119   fi
24120 
24121   # Call helper function which possibly converts this using DOS-style short mode.
24122   # If so, the updated path is stored in $new_path.
24123 
24124   input_path="$new_path"
24125   # Check if we need to convert this using DOS-style short mode. If the path
24126   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24127   # take no chances and rewrite it.
24128   # Note: m4 eats our [], so we need to use [ and ] instead.
24129   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24130   if test "x$has_forbidden_chars" != x; then
24131     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24132     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24133     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24134     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24135       # Going to short mode and back again did indeed matter. Since short mode is
24136       # case insensitive, let's make it lowercase to improve readability.
24137       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24138       # Now convert it back to Unix-stile (cygpath)
24139       input_path=`$CYGPATH -u "$shortmode_path"`
24140       new_path="$input_path"
24141     fi
24142   fi
24143 
24144   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24145   if test "x$test_cygdrive_prefix" = x; then
24146     # As a simple fix, exclude /usr/bin since it's not a real path.
24147     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24148       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24149       # a path prefixed by /cygdrive for fixpath to work.
24150       new_path="$CYGWIN_ROOT_PATH$input_path"
24151     fi
24152   fi
24153 
24154 
24155   if test "x$path" != "x$new_path"; then
24156     BOOT_JDK="$new_path"
24157     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24158 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24159   fi
24160 
24161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24162 
24163   path="$BOOT_JDK"
24164   has_colon=`$ECHO $path | $GREP ^.:`
24165   new_path="$path"
24166   if test "x$has_colon" = x; then
24167     # Not in mixed or Windows style, start by that.
24168     new_path=`cmd //c echo $path`
24169   fi
24170 
24171 
24172   input_path="$new_path"
24173   # Check if we need to convert this using DOS-style short mode. If the path
24174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24175   # take no chances and rewrite it.
24176   # Note: m4 eats our [], so we need to use [ and ] instead.
24177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24178   if test "x$has_forbidden_chars" != x; then
24179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24180     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24181   fi
24182 
24183 
24184   windows_path="$new_path"
24185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24186     unix_path=`$CYGPATH -u "$windows_path"`
24187     new_path="$unix_path"
24188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24189     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24190     new_path="$unix_path"
24191   fi
24192 
24193   if test "x$path" != "x$new_path"; then
24194     BOOT_JDK="$new_path"
24195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24196 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24197   fi
24198 
24199   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24200   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24201 
24202   else
24203     # We're on a unix platform. Hooray! :)
24204     path="$BOOT_JDK"
24205     has_space=`$ECHO "$path" | $GREP " "`
24206     if test "x$has_space" != x; then
24207       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24208 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24209       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24210     fi
24211 
24212     # Use eval to expand a potential ~
24213     eval path="$path"
24214     if test ! -f "$path" && test ! -d "$path"; then
24215       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24216     fi
24217 
24218     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24219   fi
24220 
24221             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24222 $as_echo_n "checking for Boot JDK... " >&6; }
24223             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24224 $as_echo "$BOOT_JDK" >&6; }
24225             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24226 $as_echo_n "checking Boot JDK version... " >&6; }
24227             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24228             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24229 $as_echo "$BOOT_JDK_VERSION" >&6; }
24230           fi # end check jdk version
24231         fi # end check javac
24232       fi # end check java
24233     fi # end check boot jdk found
24234   fi
24235 
24236 
24237   if test "x$BOOT_JDK_FOUND" = xno; then
24238     # Now execute the test
24239 
24240   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24241   BOOT_JDK_SUFFIX="/Contents/Home"
24242   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24243   if test "x$ALL_JDKS_FOUND" != x; then
24244     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24245 
24246   if test "x$BOOT_JDK_FOUND" = xno; then
24247     # Now execute the test
24248 
24249         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24250         if test -d "$BOOT_JDK"; then
24251           BOOT_JDK_FOUND=maybe
24252           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24253 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24254         fi
24255 
24256 
24257     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24258     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24259       # Do we have a bin/java?
24260       if test ! -x "$BOOT_JDK/bin/java"; then
24261         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24263         BOOT_JDK_FOUND=no
24264       else
24265         # Do we have a bin/javac?
24266         if test ! -x "$BOOT_JDK/bin/javac"; then
24267           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24268 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24269           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24270 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24271           BOOT_JDK_FOUND=no
24272         else
24273           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24274           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24275 
24276           # Extra M4 quote needed to protect [] in grep expression.
24277           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24278           if test "x$FOUND_CORRECT_VERSION" = x; then
24279             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24280 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24281             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24282 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24283             BOOT_JDK_FOUND=no
24284           else
24285             # We're done! :-)
24286             BOOT_JDK_FOUND=yes
24287 
24288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24289 
24290   # Input might be given as Windows format, start by converting to
24291   # unix format.
24292   path="$BOOT_JDK"
24293   new_path=`$CYGPATH -u "$path"`
24294 
24295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24298   # "foo.exe" is OK but "foo" is an error.
24299   #
24300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24301   # It is also a way to make sure we got the proper file name for the real test later on.
24302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24303   if test "x$test_shortpath" = x; then
24304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24305 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24306     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24307   fi
24308 
24309   # Call helper function which possibly converts this using DOS-style short mode.
24310   # If so, the updated path is stored in $new_path.
24311 
24312   input_path="$new_path"
24313   # Check if we need to convert this using DOS-style short mode. If the path
24314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24315   # take no chances and rewrite it.
24316   # Note: m4 eats our [], so we need to use [ and ] instead.
24317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24318   if test "x$has_forbidden_chars" != x; then
24319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24323       # Going to short mode and back again did indeed matter. Since short mode is
24324       # case insensitive, let's make it lowercase to improve readability.
24325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24326       # Now convert it back to Unix-stile (cygpath)
24327       input_path=`$CYGPATH -u "$shortmode_path"`
24328       new_path="$input_path"
24329     fi
24330   fi
24331 
24332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24333   if test "x$test_cygdrive_prefix" = x; then
24334     # As a simple fix, exclude /usr/bin since it's not a real path.
24335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24337       # a path prefixed by /cygdrive for fixpath to work.
24338       new_path="$CYGWIN_ROOT_PATH$input_path"
24339     fi
24340   fi
24341 
24342 
24343   if test "x$path" != "x$new_path"; then
24344     BOOT_JDK="$new_path"
24345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24346 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24347   fi
24348 
24349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24350 
24351   path="$BOOT_JDK"
24352   has_colon=`$ECHO $path | $GREP ^.:`
24353   new_path="$path"
24354   if test "x$has_colon" = x; then
24355     # Not in mixed or Windows style, start by that.
24356     new_path=`cmd //c echo $path`
24357   fi
24358 
24359 
24360   input_path="$new_path"
24361   # Check if we need to convert this using DOS-style short mode. If the path
24362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24363   # take no chances and rewrite it.
24364   # Note: m4 eats our [], so we need to use [ and ] instead.
24365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24366   if test "x$has_forbidden_chars" != x; then
24367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24369   fi
24370 
24371 
24372   windows_path="$new_path"
24373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24374     unix_path=`$CYGPATH -u "$windows_path"`
24375     new_path="$unix_path"
24376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24378     new_path="$unix_path"
24379   fi
24380 
24381   if test "x$path" != "x$new_path"; then
24382     BOOT_JDK="$new_path"
24383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24385   fi
24386 
24387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24389 
24390   else
24391     # We're on a unix platform. Hooray! :)
24392     path="$BOOT_JDK"
24393     has_space=`$ECHO "$path" | $GREP " "`
24394     if test "x$has_space" != x; then
24395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24398     fi
24399 
24400     # Use eval to expand a potential ~
24401     eval path="$path"
24402     if test ! -f "$path" && test ! -d "$path"; then
24403       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24404     fi
24405 
24406     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24407   fi
24408 
24409             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24410 $as_echo_n "checking for Boot JDK... " >&6; }
24411             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24412 $as_echo "$BOOT_JDK" >&6; }
24413             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24414 $as_echo_n "checking Boot JDK version... " >&6; }
24415             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24416             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24417 $as_echo "$BOOT_JDK_VERSION" >&6; }
24418           fi # end check jdk version
24419         fi # end check javac
24420       fi # end check java
24421     fi # end check boot jdk found
24422   fi
24423 
24424     done
24425   fi
24426 
24427 
24428     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24429     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24430       # Do we have a bin/java?
24431       if test ! -x "$BOOT_JDK/bin/java"; then
24432         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24434         BOOT_JDK_FOUND=no
24435       else
24436         # Do we have a bin/javac?
24437         if test ! -x "$BOOT_JDK/bin/javac"; then
24438           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24439 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24440           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24441 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24442           BOOT_JDK_FOUND=no
24443         else
24444           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24445           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24446 
24447           # Extra M4 quote needed to protect [] in grep expression.
24448           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24449           if test "x$FOUND_CORRECT_VERSION" = x; then
24450             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24451 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24452             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24453 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24454             BOOT_JDK_FOUND=no
24455           else
24456             # We're done! :-)
24457             BOOT_JDK_FOUND=yes
24458 
24459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24460 
24461   # Input might be given as Windows format, start by converting to
24462   # unix format.
24463   path="$BOOT_JDK"
24464   new_path=`$CYGPATH -u "$path"`
24465 
24466   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24467   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24468   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24469   # "foo.exe" is OK but "foo" is an error.
24470   #
24471   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24472   # It is also a way to make sure we got the proper file name for the real test later on.
24473   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24474   if test "x$test_shortpath" = x; then
24475     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24476 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24477     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24478   fi
24479 
24480   # Call helper function which possibly converts this using DOS-style short mode.
24481   # If so, the updated path is stored in $new_path.
24482 
24483   input_path="$new_path"
24484   # Check if we need to convert this using DOS-style short mode. If the path
24485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24486   # take no chances and rewrite it.
24487   # Note: m4 eats our [], so we need to use [ and ] instead.
24488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24489   if test "x$has_forbidden_chars" != x; then
24490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24491     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24492     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24493     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24494       # Going to short mode and back again did indeed matter. Since short mode is
24495       # case insensitive, let's make it lowercase to improve readability.
24496       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24497       # Now convert it back to Unix-stile (cygpath)
24498       input_path=`$CYGPATH -u "$shortmode_path"`
24499       new_path="$input_path"
24500     fi
24501   fi
24502 
24503   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24504   if test "x$test_cygdrive_prefix" = x; then
24505     # As a simple fix, exclude /usr/bin since it's not a real path.
24506     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24507       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24508       # a path prefixed by /cygdrive for fixpath to work.
24509       new_path="$CYGWIN_ROOT_PATH$input_path"
24510     fi
24511   fi
24512 
24513 
24514   if test "x$path" != "x$new_path"; then
24515     BOOT_JDK="$new_path"
24516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24517 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24518   fi
24519 
24520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24521 
24522   path="$BOOT_JDK"
24523   has_colon=`$ECHO $path | $GREP ^.:`
24524   new_path="$path"
24525   if test "x$has_colon" = x; then
24526     # Not in mixed or Windows style, start by that.
24527     new_path=`cmd //c echo $path`
24528   fi
24529 
24530 
24531   input_path="$new_path"
24532   # Check if we need to convert this using DOS-style short mode. If the path
24533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24534   # take no chances and rewrite it.
24535   # Note: m4 eats our [], so we need to use [ and ] instead.
24536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24537   if test "x$has_forbidden_chars" != x; then
24538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24539     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24540   fi
24541 
24542 
24543   windows_path="$new_path"
24544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24545     unix_path=`$CYGPATH -u "$windows_path"`
24546     new_path="$unix_path"
24547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24549     new_path="$unix_path"
24550   fi
24551 
24552   if test "x$path" != "x$new_path"; then
24553     BOOT_JDK="$new_path"
24554     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24555 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24556   fi
24557 
24558   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24559   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24560 
24561   else
24562     # We're on a unix platform. Hooray! :)
24563     path="$BOOT_JDK"
24564     has_space=`$ECHO "$path" | $GREP " "`
24565     if test "x$has_space" != x; then
24566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24567 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24568       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24569     fi
24570 
24571     # Use eval to expand a potential ~
24572     eval path="$path"
24573     if test ! -f "$path" && test ! -d "$path"; then
24574       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24575     fi
24576 
24577     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24578   fi
24579 
24580             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24581 $as_echo_n "checking for Boot JDK... " >&6; }
24582             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24583 $as_echo "$BOOT_JDK" >&6; }
24584             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24585 $as_echo_n "checking Boot JDK version... " >&6; }
24586             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24587             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24588 $as_echo "$BOOT_JDK_VERSION" >&6; }
24589           fi # end check jdk version
24590         fi # end check javac
24591       fi # end check java
24592     fi # end check boot jdk found
24593   fi
24594 
24595   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24596 
24597   if test "x$BOOT_JDK_FOUND" = xno; then
24598     # Now execute the test
24599 
24600   BOOT_JDK_PREFIX="/usr/lib/jvm"
24601   BOOT_JDK_SUFFIX=""
24602   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24603   if test "x$ALL_JDKS_FOUND" != x; then
24604     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24605 
24606   if test "x$BOOT_JDK_FOUND" = xno; then
24607     # Now execute the test
24608 
24609         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24610         if test -d "$BOOT_JDK"; then
24611           BOOT_JDK_FOUND=maybe
24612           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24613 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24614         fi
24615 
24616 
24617     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24618     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24619       # Do we have a bin/java?
24620       if test ! -x "$BOOT_JDK/bin/java"; then
24621         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24623         BOOT_JDK_FOUND=no
24624       else
24625         # Do we have a bin/javac?
24626         if test ! -x "$BOOT_JDK/bin/javac"; then
24627           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24628 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24629           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24630 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24631           BOOT_JDK_FOUND=no
24632         else
24633           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24634           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24635 
24636           # Extra M4 quote needed to protect [] in grep expression.
24637           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24638           if test "x$FOUND_CORRECT_VERSION" = x; then
24639             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24641             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24642 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24643             BOOT_JDK_FOUND=no
24644           else
24645             # We're done! :-)
24646             BOOT_JDK_FOUND=yes
24647 
24648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24649 
24650   # Input might be given as Windows format, start by converting to
24651   # unix format.
24652   path="$BOOT_JDK"
24653   new_path=`$CYGPATH -u "$path"`
24654 
24655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24658   # "foo.exe" is OK but "foo" is an error.
24659   #
24660   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24661   # It is also a way to make sure we got the proper file name for the real test later on.
24662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24663   if test "x$test_shortpath" = x; then
24664     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24666     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24667   fi
24668 
24669   # Call helper function which possibly converts this using DOS-style short mode.
24670   # If so, the updated path is stored in $new_path.
24671 
24672   input_path="$new_path"
24673   # Check if we need to convert this using DOS-style short mode. If the path
24674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24675   # take no chances and rewrite it.
24676   # Note: m4 eats our [], so we need to use [ and ] instead.
24677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24678   if test "x$has_forbidden_chars" != x; then
24679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24683       # Going to short mode and back again did indeed matter. Since short mode is
24684       # case insensitive, let's make it lowercase to improve readability.
24685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24686       # Now convert it back to Unix-stile (cygpath)
24687       input_path=`$CYGPATH -u "$shortmode_path"`
24688       new_path="$input_path"
24689     fi
24690   fi
24691 
24692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24693   if test "x$test_cygdrive_prefix" = x; then
24694     # As a simple fix, exclude /usr/bin since it's not a real path.
24695     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24697       # a path prefixed by /cygdrive for fixpath to work.
24698       new_path="$CYGWIN_ROOT_PATH$input_path"
24699     fi
24700   fi
24701 
24702 
24703   if test "x$path" != "x$new_path"; then
24704     BOOT_JDK="$new_path"
24705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24706 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24707   fi
24708 
24709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24710 
24711   path="$BOOT_JDK"
24712   has_colon=`$ECHO $path | $GREP ^.:`
24713   new_path="$path"
24714   if test "x$has_colon" = x; then
24715     # Not in mixed or Windows style, start by that.
24716     new_path=`cmd //c echo $path`
24717   fi
24718 
24719 
24720   input_path="$new_path"
24721   # Check if we need to convert this using DOS-style short mode. If the path
24722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24723   # take no chances and rewrite it.
24724   # Note: m4 eats our [], so we need to use [ and ] instead.
24725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24726   if test "x$has_forbidden_chars" != x; then
24727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24729   fi
24730 
24731 
24732   windows_path="$new_path"
24733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24734     unix_path=`$CYGPATH -u "$windows_path"`
24735     new_path="$unix_path"
24736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24738     new_path="$unix_path"
24739   fi
24740 
24741   if test "x$path" != "x$new_path"; then
24742     BOOT_JDK="$new_path"
24743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24745   fi
24746 
24747   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24748   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24749 
24750   else
24751     # We're on a unix platform. Hooray! :)
24752     path="$BOOT_JDK"
24753     has_space=`$ECHO "$path" | $GREP " "`
24754     if test "x$has_space" != x; then
24755       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24756 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24757       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24758     fi
24759 
24760     # Use eval to expand a potential ~
24761     eval path="$path"
24762     if test ! -f "$path" && test ! -d "$path"; then
24763       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24764     fi
24765 
24766     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24767   fi
24768 
24769             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24770 $as_echo_n "checking for Boot JDK... " >&6; }
24771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24772 $as_echo "$BOOT_JDK" >&6; }
24773             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24774 $as_echo_n "checking Boot JDK version... " >&6; }
24775             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24776             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24777 $as_echo "$BOOT_JDK_VERSION" >&6; }
24778           fi # end check jdk version
24779         fi # end check javac
24780       fi # end check java
24781     fi # end check boot jdk found
24782   fi
24783 
24784     done
24785   fi
24786 
24787 
24788     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24789     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24790       # Do we have a bin/java?
24791       if test ! -x "$BOOT_JDK/bin/java"; then
24792         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24793 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24794         BOOT_JDK_FOUND=no
24795       else
24796         # Do we have a bin/javac?
24797         if test ! -x "$BOOT_JDK/bin/javac"; then
24798           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24799 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24800           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24801 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24802           BOOT_JDK_FOUND=no
24803         else
24804           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24805           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24806 
24807           # Extra M4 quote needed to protect [] in grep expression.
24808           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24809           if test "x$FOUND_CORRECT_VERSION" = x; then
24810             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24811 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24812             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24813 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24814             BOOT_JDK_FOUND=no
24815           else
24816             # We're done! :-)
24817             BOOT_JDK_FOUND=yes
24818 
24819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24820 
24821   # Input might be given as Windows format, start by converting to
24822   # unix format.
24823   path="$BOOT_JDK"
24824   new_path=`$CYGPATH -u "$path"`
24825 
24826   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24827   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24828   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24829   # "foo.exe" is OK but "foo" is an error.
24830   #
24831   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24832   # It is also a way to make sure we got the proper file name for the real test later on.
24833   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24834   if test "x$test_shortpath" = x; then
24835     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24836 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24837     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24838   fi
24839 
24840   # Call helper function which possibly converts this using DOS-style short mode.
24841   # If so, the updated path is stored in $new_path.
24842 
24843   input_path="$new_path"
24844   # Check if we need to convert this using DOS-style short mode. If the path
24845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24846   # take no chances and rewrite it.
24847   # Note: m4 eats our [], so we need to use [ and ] instead.
24848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24849   if test "x$has_forbidden_chars" != x; then
24850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24851     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24852     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24853     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24854       # Going to short mode and back again did indeed matter. Since short mode is
24855       # case insensitive, let's make it lowercase to improve readability.
24856       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24857       # Now convert it back to Unix-stile (cygpath)
24858       input_path=`$CYGPATH -u "$shortmode_path"`
24859       new_path="$input_path"
24860     fi
24861   fi
24862 
24863   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24864   if test "x$test_cygdrive_prefix" = x; then
24865     # As a simple fix, exclude /usr/bin since it's not a real path.
24866     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24867       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24868       # a path prefixed by /cygdrive for fixpath to work.
24869       new_path="$CYGWIN_ROOT_PATH$input_path"
24870     fi
24871   fi
24872 
24873 
24874   if test "x$path" != "x$new_path"; then
24875     BOOT_JDK="$new_path"
24876     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24877 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24878   fi
24879 
24880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24881 
24882   path="$BOOT_JDK"
24883   has_colon=`$ECHO $path | $GREP ^.:`
24884   new_path="$path"
24885   if test "x$has_colon" = x; then
24886     # Not in mixed or Windows style, start by that.
24887     new_path=`cmd //c echo $path`
24888   fi
24889 
24890 
24891   input_path="$new_path"
24892   # Check if we need to convert this using DOS-style short mode. If the path
24893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24894   # take no chances and rewrite it.
24895   # Note: m4 eats our [], so we need to use [ and ] instead.
24896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24897   if test "x$has_forbidden_chars" != x; then
24898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24899     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24900   fi
24901 
24902 
24903   windows_path="$new_path"
24904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24905     unix_path=`$CYGPATH -u "$windows_path"`
24906     new_path="$unix_path"
24907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24909     new_path="$unix_path"
24910   fi
24911 
24912   if test "x$path" != "x$new_path"; then
24913     BOOT_JDK="$new_path"
24914     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24915 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24916   fi
24917 
24918   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24919   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24920 
24921   else
24922     # We're on a unix platform. Hooray! :)
24923     path="$BOOT_JDK"
24924     has_space=`$ECHO "$path" | $GREP " "`
24925     if test "x$has_space" != x; then
24926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24927 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24928       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24929     fi
24930 
24931     # Use eval to expand a potential ~
24932     eval path="$path"
24933     if test ! -f "$path" && test ! -d "$path"; then
24934       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24935     fi
24936 
24937     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24938   fi
24939 
24940             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24941 $as_echo_n "checking for Boot JDK... " >&6; }
24942             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24943 $as_echo "$BOOT_JDK" >&6; }
24944             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24945 $as_echo_n "checking Boot JDK version... " >&6; }
24946             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24947             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24948 $as_echo "$BOOT_JDK_VERSION" >&6; }
24949           fi # end check jdk version
24950         fi # end check javac
24951       fi # end check java
24952     fi # end check boot jdk found
24953   fi
24954 
24955   fi
24956 
24957 
24958     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24959     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24960       # Do we have a bin/java?
24961       if test ! -x "$BOOT_JDK/bin/java"; then
24962         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24964         BOOT_JDK_FOUND=no
24965       else
24966         # Do we have a bin/javac?
24967         if test ! -x "$BOOT_JDK/bin/javac"; then
24968           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24969 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24970           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24971 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24972           BOOT_JDK_FOUND=no
24973         else
24974           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24975           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24976 
24977           # Extra M4 quote needed to protect [] in grep expression.
24978           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24979           if test "x$FOUND_CORRECT_VERSION" = x; then
24980             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24982             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24983 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24984             BOOT_JDK_FOUND=no
24985           else
24986             # We're done! :-)
24987             BOOT_JDK_FOUND=yes
24988 
24989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24990 
24991   # Input might be given as Windows format, start by converting to
24992   # unix format.
24993   path="$BOOT_JDK"
24994   new_path=`$CYGPATH -u "$path"`
24995 
24996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24999   # "foo.exe" is OK but "foo" is an error.
25000   #
25001   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25002   # It is also a way to make sure we got the proper file name for the real test later on.
25003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25004   if test "x$test_shortpath" = x; then
25005     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25007     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25008   fi
25009 
25010   # Call helper function which possibly converts this using DOS-style short mode.
25011   # If so, the updated path is stored in $new_path.
25012 
25013   input_path="$new_path"
25014   # Check if we need to convert this using DOS-style short mode. If the path
25015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25016   # take no chances and rewrite it.
25017   # Note: m4 eats our [], so we need to use [ and ] instead.
25018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25019   if test "x$has_forbidden_chars" != x; then
25020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25021     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25022     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25023     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25024       # Going to short mode and back again did indeed matter. Since short mode is
25025       # case insensitive, let's make it lowercase to improve readability.
25026       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25027       # Now convert it back to Unix-stile (cygpath)
25028       input_path=`$CYGPATH -u "$shortmode_path"`
25029       new_path="$input_path"
25030     fi
25031   fi
25032 
25033   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25034   if test "x$test_cygdrive_prefix" = x; then
25035     # As a simple fix, exclude /usr/bin since it's not a real path.
25036     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25037       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25038       # a path prefixed by /cygdrive for fixpath to work.
25039       new_path="$CYGWIN_ROOT_PATH$input_path"
25040     fi
25041   fi
25042 
25043 
25044   if test "x$path" != "x$new_path"; then
25045     BOOT_JDK="$new_path"
25046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25048   fi
25049 
25050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25051 
25052   path="$BOOT_JDK"
25053   has_colon=`$ECHO $path | $GREP ^.:`
25054   new_path="$path"
25055   if test "x$has_colon" = x; then
25056     # Not in mixed or Windows style, start by that.
25057     new_path=`cmd //c echo $path`
25058   fi
25059 
25060 
25061   input_path="$new_path"
25062   # Check if we need to convert this using DOS-style short mode. If the path
25063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25064   # take no chances and rewrite it.
25065   # Note: m4 eats our [], so we need to use [ and ] instead.
25066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25067   if test "x$has_forbidden_chars" != x; then
25068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25070   fi
25071 
25072 
25073   windows_path="$new_path"
25074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25075     unix_path=`$CYGPATH -u "$windows_path"`
25076     new_path="$unix_path"
25077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25079     new_path="$unix_path"
25080   fi
25081 
25082   if test "x$path" != "x$new_path"; then
25083     BOOT_JDK="$new_path"
25084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25086   fi
25087 
25088   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25089   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25090 
25091   else
25092     # We're on a unix platform. Hooray! :)
25093     path="$BOOT_JDK"
25094     has_space=`$ECHO "$path" | $GREP " "`
25095     if test "x$has_space" != x; then
25096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25098       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25099     fi
25100 
25101     # Use eval to expand a potential ~
25102     eval path="$path"
25103     if test ! -f "$path" && test ! -d "$path"; then
25104       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25105     fi
25106 
25107     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25108   fi
25109 
25110             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25111 $as_echo_n "checking for Boot JDK... " >&6; }
25112             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25113 $as_echo "$BOOT_JDK" >&6; }
25114             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25115 $as_echo_n "checking Boot JDK version... " >&6; }
25116             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25117             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25118 $as_echo "$BOOT_JDK_VERSION" >&6; }
25119           fi # end check jdk version
25120         fi # end check javac
25121       fi # end check java
25122     fi # end check boot jdk found
25123   fi
25124 
25125 
25126   # If we haven't found anything yet, we've truly lost. Give up.
25127   if test "x$BOOT_JDK_FOUND" = xno; then
25128 
25129   # Print a helpful message on how to acquire the necessary build dependency.
25130   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25131   MISSING_DEPENDENCY=openjdk
25132 
25133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25134     cygwin_help $MISSING_DEPENDENCY
25135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25136     msys_help $MISSING_DEPENDENCY
25137   else
25138     PKGHANDLER_COMMAND=
25139 
25140     case $PKGHANDLER in
25141       apt-get)
25142         apt_help     $MISSING_DEPENDENCY ;;
25143       yum)
25144         yum_help     $MISSING_DEPENDENCY ;;
25145       port)
25146         port_help    $MISSING_DEPENDENCY ;;
25147       pkgutil)
25148         pkgutil_help $MISSING_DEPENDENCY ;;
25149       pkgadd)
25150         pkgadd_help  $MISSING_DEPENDENCY ;;
25151     esac
25152 
25153     if test "x$PKGHANDLER_COMMAND" != x; then
25154       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25155     fi
25156   fi
25157 
25158     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25159 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25160     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25161 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25162     as_fn_error $? "Cannot continue" "$LINENO" 5
25163   fi
25164 
25165 
25166 
25167   # Setup tools from the Boot JDK.
25168 
25169   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25170 
25171   # Publish this variable in the help.
25172 
25173 
25174   if test "x$JAVA" = x; then
25175     # The variable is not set by user, try to locate tool using the code snippet
25176 
25177       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25178 $as_echo_n "checking for java in Boot JDK... " >&6; }
25179       JAVA=$BOOT_JDK/bin/java
25180       if test ! -x $JAVA; then
25181         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25182 $as_echo "not found" >&6; }
25183         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25184 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25185         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25186       fi
25187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25188 $as_echo "ok" >&6; }
25189 
25190 
25191   else
25192     # The variable is set, but is it from the command line or the environment?
25193 
25194     # Try to remove the string !JAVA! from our list.
25195     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25196     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25197       # If it failed, the variable was not from the command line. Ignore it,
25198       # but warn the user (except for BASH, which is always set by the calling BASH).
25199       if test "xJAVA" != xBASH; then
25200         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25201 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25202       fi
25203       # Try to locate tool using the code snippet
25204 
25205       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25206 $as_echo_n "checking for java in Boot JDK... " >&6; }
25207       JAVA=$BOOT_JDK/bin/java
25208       if test ! -x $JAVA; then
25209         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25210 $as_echo "not found" >&6; }
25211         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25212 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25213         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25214       fi
25215       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25216 $as_echo "ok" >&6; }
25217 
25218 
25219     else
25220       # If it succeeded, then it was overridden by the user. We will use it
25221       # for the tool.
25222 
25223       # First remove it from the list of overridden variables, so we can test
25224       # for unknown variables in the end.
25225       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25226 
25227       # Check if the provided tool contains a complete path.
25228       tool_specified="$JAVA"
25229       tool_basename="${tool_specified##*/}"
25230       if test "x$tool_basename" = "x$tool_specified"; then
25231         # A command without a complete path is provided, search $PATH.
25232         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25233 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25234         # Extract the first word of "$tool_basename", so it can be a program name with args.
25235 set dummy $tool_basename; ac_word=$2
25236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25237 $as_echo_n "checking for $ac_word... " >&6; }
25238 if ${ac_cv_path_JAVA+:} false; then :
25239   $as_echo_n "(cached) " >&6
25240 else
25241   case $JAVA in
25242   [\\/]* | ?:[\\/]*)
25243   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25244   ;;
25245   *)
25246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25247 for as_dir in $PATH
25248 do
25249   IFS=$as_save_IFS
25250   test -z "$as_dir" && as_dir=.
25251     for ac_exec_ext in '' $ac_executable_extensions; do
25252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25253     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25255     break 2
25256   fi
25257 done
25258   done
25259 IFS=$as_save_IFS
25260 
25261   ;;
25262 esac
25263 fi
25264 JAVA=$ac_cv_path_JAVA
25265 if test -n "$JAVA"; then
25266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25267 $as_echo "$JAVA" >&6; }
25268 else
25269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25270 $as_echo "no" >&6; }
25271 fi
25272 
25273 
25274         if test "x$JAVA" = x; then
25275           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25276         fi
25277       else
25278         # Otherwise we believe it is a complete path. Use it as it is.
25279         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25280 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25281         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25282 $as_echo_n "checking for JAVA... " >&6; }
25283         if test ! -x "$tool_specified"; then
25284           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25285 $as_echo "not found" >&6; }
25286           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25287         fi
25288         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25289 $as_echo "$tool_specified" >&6; }
25290       fi
25291     fi
25292   fi
25293 
25294 
25295 
25296   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25297 
25298   # Publish this variable in the help.
25299 
25300 
25301   if test "x$JAVAC" = x; then
25302     # The variable is not set by user, try to locate tool using the code snippet
25303 
25304       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25305 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25306       JAVAC=$BOOT_JDK/bin/javac
25307       if test ! -x $JAVAC; then
25308         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25309 $as_echo "not found" >&6; }
25310         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25311 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25312         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25313       fi
25314       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25315 $as_echo "ok" >&6; }
25316 
25317 
25318   else
25319     # The variable is set, but is it from the command line or the environment?
25320 
25321     # Try to remove the string !JAVAC! from our list.
25322     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25323     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25324       # If it failed, the variable was not from the command line. Ignore it,
25325       # but warn the user (except for BASH, which is always set by the calling BASH).
25326       if test "xJAVAC" != xBASH; then
25327         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25328 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25329       fi
25330       # Try to locate tool using the code snippet
25331 
25332       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25333 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25334       JAVAC=$BOOT_JDK/bin/javac
25335       if test ! -x $JAVAC; then
25336         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25337 $as_echo "not found" >&6; }
25338         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25339 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25340         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25341       fi
25342       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25343 $as_echo "ok" >&6; }
25344 
25345 
25346     else
25347       # If it succeeded, then it was overridden by the user. We will use it
25348       # for the tool.
25349 
25350       # First remove it from the list of overridden variables, so we can test
25351       # for unknown variables in the end.
25352       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25353 
25354       # Check if the provided tool contains a complete path.
25355       tool_specified="$JAVAC"
25356       tool_basename="${tool_specified##*/}"
25357       if test "x$tool_basename" = "x$tool_specified"; then
25358         # A command without a complete path is provided, search $PATH.
25359         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25360 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25361         # Extract the first word of "$tool_basename", so it can be a program name with args.
25362 set dummy $tool_basename; ac_word=$2
25363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25364 $as_echo_n "checking for $ac_word... " >&6; }
25365 if ${ac_cv_path_JAVAC+:} false; then :
25366   $as_echo_n "(cached) " >&6
25367 else
25368   case $JAVAC in
25369   [\\/]* | ?:[\\/]*)
25370   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25371   ;;
25372   *)
25373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25374 for as_dir in $PATH
25375 do
25376   IFS=$as_save_IFS
25377   test -z "$as_dir" && as_dir=.
25378     for ac_exec_ext in '' $ac_executable_extensions; do
25379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25380     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25381     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25382     break 2
25383   fi
25384 done
25385   done
25386 IFS=$as_save_IFS
25387 
25388   ;;
25389 esac
25390 fi
25391 JAVAC=$ac_cv_path_JAVAC
25392 if test -n "$JAVAC"; then
25393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25394 $as_echo "$JAVAC" >&6; }
25395 else
25396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25397 $as_echo "no" >&6; }
25398 fi
25399 
25400 
25401         if test "x$JAVAC" = x; then
25402           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25403         fi
25404       else
25405         # Otherwise we believe it is a complete path. Use it as it is.
25406         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25407 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25408         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25409 $as_echo_n "checking for JAVAC... " >&6; }
25410         if test ! -x "$tool_specified"; then
25411           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25412 $as_echo "not found" >&6; }
25413           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25414         fi
25415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25416 $as_echo "$tool_specified" >&6; }
25417       fi
25418     fi
25419   fi
25420 
25421 
25422 
25423   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25424 
25425   # Publish this variable in the help.
25426 
25427 
25428   if test "x$JAVAH" = x; then
25429     # The variable is not set by user, try to locate tool using the code snippet
25430 
25431       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25432 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25433       JAVAH=$BOOT_JDK/bin/javah
25434       if test ! -x $JAVAH; then
25435         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25436 $as_echo "not found" >&6; }
25437         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25438 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25439         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25440       fi
25441       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25442 $as_echo "ok" >&6; }
25443 
25444 
25445   else
25446     # The variable is set, but is it from the command line or the environment?
25447 
25448     # Try to remove the string !JAVAH! from our list.
25449     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25450     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25451       # If it failed, the variable was not from the command line. Ignore it,
25452       # but warn the user (except for BASH, which is always set by the calling BASH).
25453       if test "xJAVAH" != xBASH; then
25454         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25455 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25456       fi
25457       # Try to locate tool using the code snippet
25458 
25459       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25460 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25461       JAVAH=$BOOT_JDK/bin/javah
25462       if test ! -x $JAVAH; then
25463         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25464 $as_echo "not found" >&6; }
25465         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25466 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25467         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25468       fi
25469       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25470 $as_echo "ok" >&6; }
25471 
25472 
25473     else
25474       # If it succeeded, then it was overridden by the user. We will use it
25475       # for the tool.
25476 
25477       # First remove it from the list of overridden variables, so we can test
25478       # for unknown variables in the end.
25479       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25480 
25481       # Check if the provided tool contains a complete path.
25482       tool_specified="$JAVAH"
25483       tool_basename="${tool_specified##*/}"
25484       if test "x$tool_basename" = "x$tool_specified"; then
25485         # A command without a complete path is provided, search $PATH.
25486         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25487 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25488         # Extract the first word of "$tool_basename", so it can be a program name with args.
25489 set dummy $tool_basename; ac_word=$2
25490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25491 $as_echo_n "checking for $ac_word... " >&6; }
25492 if ${ac_cv_path_JAVAH+:} false; then :
25493   $as_echo_n "(cached) " >&6
25494 else
25495   case $JAVAH in
25496   [\\/]* | ?:[\\/]*)
25497   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25498   ;;
25499   *)
25500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25501 for as_dir in $PATH
25502 do
25503   IFS=$as_save_IFS
25504   test -z "$as_dir" && as_dir=.
25505     for ac_exec_ext in '' $ac_executable_extensions; do
25506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25507     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25509     break 2
25510   fi
25511 done
25512   done
25513 IFS=$as_save_IFS
25514 
25515   ;;
25516 esac
25517 fi
25518 JAVAH=$ac_cv_path_JAVAH
25519 if test -n "$JAVAH"; then
25520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25521 $as_echo "$JAVAH" >&6; }
25522 else
25523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25524 $as_echo "no" >&6; }
25525 fi
25526 
25527 
25528         if test "x$JAVAH" = x; then
25529           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25530         fi
25531       else
25532         # Otherwise we believe it is a complete path. Use it as it is.
25533         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25534 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25536 $as_echo_n "checking for JAVAH... " >&6; }
25537         if test ! -x "$tool_specified"; then
25538           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25539 $as_echo "not found" >&6; }
25540           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25541         fi
25542         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25543 $as_echo "$tool_specified" >&6; }
25544       fi
25545     fi
25546   fi
25547 
25548 
25549 
25550   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25551 
25552   # Publish this variable in the help.
25553 
25554 
25555   if test "x$JAR" = x; then
25556     # The variable is not set by user, try to locate tool using the code snippet
25557 
25558       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25559 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25560       JAR=$BOOT_JDK/bin/jar
25561       if test ! -x $JAR; then
25562         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25563 $as_echo "not found" >&6; }
25564         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25565 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25566         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25567       fi
25568       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25569 $as_echo "ok" >&6; }
25570 
25571 
25572   else
25573     # The variable is set, but is it from the command line or the environment?
25574 
25575     # Try to remove the string !JAR! from our list.
25576     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25577     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25578       # If it failed, the variable was not from the command line. Ignore it,
25579       # but warn the user (except for BASH, which is always set by the calling BASH).
25580       if test "xJAR" != xBASH; then
25581         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25582 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25583       fi
25584       # Try to locate tool using the code snippet
25585 
25586       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25587 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25588       JAR=$BOOT_JDK/bin/jar
25589       if test ! -x $JAR; then
25590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25591 $as_echo "not found" >&6; }
25592         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25593 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25594         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25595       fi
25596       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25597 $as_echo "ok" >&6; }
25598 
25599 
25600     else
25601       # If it succeeded, then it was overridden by the user. We will use it
25602       # for the tool.
25603 
25604       # First remove it from the list of overridden variables, so we can test
25605       # for unknown variables in the end.
25606       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25607 
25608       # Check if the provided tool contains a complete path.
25609       tool_specified="$JAR"
25610       tool_basename="${tool_specified##*/}"
25611       if test "x$tool_basename" = "x$tool_specified"; then
25612         # A command without a complete path is provided, search $PATH.
25613         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25614 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25615         # Extract the first word of "$tool_basename", so it can be a program name with args.
25616 set dummy $tool_basename; ac_word=$2
25617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25618 $as_echo_n "checking for $ac_word... " >&6; }
25619 if ${ac_cv_path_JAR+:} false; then :
25620   $as_echo_n "(cached) " >&6
25621 else
25622   case $JAR in
25623   [\\/]* | ?:[\\/]*)
25624   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25625   ;;
25626   *)
25627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25628 for as_dir in $PATH
25629 do
25630   IFS=$as_save_IFS
25631   test -z "$as_dir" && as_dir=.
25632     for ac_exec_ext in '' $ac_executable_extensions; do
25633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25634     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25636     break 2
25637   fi
25638 done
25639   done
25640 IFS=$as_save_IFS
25641 
25642   ;;
25643 esac
25644 fi
25645 JAR=$ac_cv_path_JAR
25646 if test -n "$JAR"; then
25647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25648 $as_echo "$JAR" >&6; }
25649 else
25650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25651 $as_echo "no" >&6; }
25652 fi
25653 
25654 
25655         if test "x$JAR" = x; then
25656           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25657         fi
25658       else
25659         # Otherwise we believe it is a complete path. Use it as it is.
25660         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25661 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25662         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25663 $as_echo_n "checking for JAR... " >&6; }
25664         if test ! -x "$tool_specified"; then
25665           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25666 $as_echo "not found" >&6; }
25667           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25668         fi
25669         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25670 $as_echo "$tool_specified" >&6; }
25671       fi
25672     fi
25673   fi
25674 
25675 
25676 
25677   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25678 
25679   # Publish this variable in the help.
25680 
25681 
25682   if test "x$NATIVE2ASCII" = x; then
25683     # The variable is not set by user, try to locate tool using the code snippet
25684 
25685       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25686 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25687       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25688       if test ! -x $NATIVE2ASCII; then
25689         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25690 $as_echo "not found" >&6; }
25691         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25692 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25693         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25694       fi
25695       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25696 $as_echo "ok" >&6; }
25697 
25698 
25699   else
25700     # The variable is set, but is it from the command line or the environment?
25701 
25702     # Try to remove the string !NATIVE2ASCII! from our list.
25703     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25704     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25705       # If it failed, the variable was not from the command line. Ignore it,
25706       # but warn the user (except for BASH, which is always set by the calling BASH).
25707       if test "xNATIVE2ASCII" != xBASH; then
25708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25709 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25710       fi
25711       # Try to locate tool using the code snippet
25712 
25713       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25714 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25715       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25716       if test ! -x $NATIVE2ASCII; then
25717         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25718 $as_echo "not found" >&6; }
25719         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25720 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25721         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25722       fi
25723       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25724 $as_echo "ok" >&6; }
25725 
25726 
25727     else
25728       # If it succeeded, then it was overridden by the user. We will use it
25729       # for the tool.
25730 
25731       # First remove it from the list of overridden variables, so we can test
25732       # for unknown variables in the end.
25733       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25734 
25735       # Check if the provided tool contains a complete path.
25736       tool_specified="$NATIVE2ASCII"
25737       tool_basename="${tool_specified##*/}"
25738       if test "x$tool_basename" = "x$tool_specified"; then
25739         # A command without a complete path is provided, search $PATH.
25740         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25741 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25742         # Extract the first word of "$tool_basename", so it can be a program name with args.
25743 set dummy $tool_basename; ac_word=$2
25744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25745 $as_echo_n "checking for $ac_word... " >&6; }
25746 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25747   $as_echo_n "(cached) " >&6
25748 else
25749   case $NATIVE2ASCII in
25750   [\\/]* | ?:[\\/]*)
25751   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25752   ;;
25753   *)
25754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25755 for as_dir in $PATH
25756 do
25757   IFS=$as_save_IFS
25758   test -z "$as_dir" && as_dir=.
25759     for ac_exec_ext in '' $ac_executable_extensions; do
25760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25761     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25763     break 2
25764   fi
25765 done
25766   done
25767 IFS=$as_save_IFS
25768 
25769   ;;
25770 esac
25771 fi
25772 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25773 if test -n "$NATIVE2ASCII"; then
25774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25775 $as_echo "$NATIVE2ASCII" >&6; }
25776 else
25777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25778 $as_echo "no" >&6; }
25779 fi
25780 
25781 
25782         if test "x$NATIVE2ASCII" = x; then
25783           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25784         fi
25785       else
25786         # Otherwise we believe it is a complete path. Use it as it is.
25787         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25788 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25789         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25790 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
25791         if test ! -x "$tool_specified"; then
25792           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25793 $as_echo "not found" >&6; }
25794           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25795         fi
25796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25797 $as_echo "$tool_specified" >&6; }
25798       fi
25799     fi
25800   fi
25801 
25802 
25803 
25804   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25805 
25806   # Publish this variable in the help.
25807 
25808 
25809   if test "x$JARSIGNER" = x; then
25810     # The variable is not set by user, try to locate tool using the code snippet
25811 
25812       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25813 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25814       JARSIGNER=$BOOT_JDK/bin/jarsigner
25815       if test ! -x $JARSIGNER; then
25816         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25817 $as_echo "not found" >&6; }
25818         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25819 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25820         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25821       fi
25822       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25823 $as_echo "ok" >&6; }
25824 
25825 
25826   else
25827     # The variable is set, but is it from the command line or the environment?
25828 
25829     # Try to remove the string !JARSIGNER! from our list.
25830     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25831     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25832       # If it failed, the variable was not from the command line. Ignore it,
25833       # but warn the user (except for BASH, which is always set by the calling BASH).
25834       if test "xJARSIGNER" != xBASH; then
25835         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25836 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25837       fi
25838       # Try to locate tool using the code snippet
25839 
25840       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25841 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25842       JARSIGNER=$BOOT_JDK/bin/jarsigner
25843       if test ! -x $JARSIGNER; then
25844         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25845 $as_echo "not found" >&6; }
25846         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25847 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25848         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25849       fi
25850       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25851 $as_echo "ok" >&6; }
25852 
25853 
25854     else
25855       # If it succeeded, then it was overridden by the user. We will use it
25856       # for the tool.
25857 
25858       # First remove it from the list of overridden variables, so we can test
25859       # for unknown variables in the end.
25860       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25861 
25862       # Check if the provided tool contains a complete path.
25863       tool_specified="$JARSIGNER"
25864       tool_basename="${tool_specified##*/}"
25865       if test "x$tool_basename" = "x$tool_specified"; then
25866         # A command without a complete path is provided, search $PATH.
25867         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25868 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25869         # Extract the first word of "$tool_basename", so it can be a program name with args.
25870 set dummy $tool_basename; ac_word=$2
25871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25872 $as_echo_n "checking for $ac_word... " >&6; }
25873 if ${ac_cv_path_JARSIGNER+:} false; then :
25874   $as_echo_n "(cached) " >&6
25875 else
25876   case $JARSIGNER in
25877   [\\/]* | ?:[\\/]*)
25878   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25879   ;;
25880   *)
25881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25882 for as_dir in $PATH
25883 do
25884   IFS=$as_save_IFS
25885   test -z "$as_dir" && as_dir=.
25886     for ac_exec_ext in '' $ac_executable_extensions; do
25887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25888     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25890     break 2
25891   fi
25892 done
25893   done
25894 IFS=$as_save_IFS
25895 
25896   ;;
25897 esac
25898 fi
25899 JARSIGNER=$ac_cv_path_JARSIGNER
25900 if test -n "$JARSIGNER"; then
25901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25902 $as_echo "$JARSIGNER" >&6; }
25903 else
25904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25905 $as_echo "no" >&6; }
25906 fi
25907 
25908 
25909         if test "x$JARSIGNER" = x; then
25910           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25911         fi
25912       else
25913         # Otherwise we believe it is a complete path. Use it as it is.
25914         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25915 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25916         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25917 $as_echo_n "checking for JARSIGNER... " >&6; }
25918         if test ! -x "$tool_specified"; then
25919           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25920 $as_echo "not found" >&6; }
25921           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25922         fi
25923         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25924 $as_echo "$tool_specified" >&6; }
25925       fi
25926     fi
25927   fi
25928 
25929 
25930 
25931   # Finally, set some other options...
25932 
25933   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
25934   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
25935 
25936 
25937 
25938 
25939 ###############################################################################
25940 #
25941 # Configure the sources to use. We can add or override individual directories.
25942 #
25943 ###############################################################################
25944 
25945 
25946   # Where are the sources. Any of these can be overridden
25947   # using --with-override-corba and the likes.
25948   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25949   CORBA_TOPDIR="$SRC_ROOT/corba"
25950   JAXP_TOPDIR="$SRC_ROOT/jaxp"
25951   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25952   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25953   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25954   JDK_TOPDIR="$SRC_ROOT/jdk"
25955 
25956 
25957 
25958 
25959 
25960 
25961 
25962 
25963 
25964 
25965   ###############################################################################
25966   #
25967   # Pickup additional source for a component from outside of the source root
25968   # or override source for a component.
25969   #
25970 
25971 # Check whether --with-add-source-root was given.
25972 if test "${with_add_source_root+set}" = set; then :
25973   withval=$with_add_source_root;
25974 fi
25975 
25976 
25977 
25978 # Check whether --with-override-source-root was given.
25979 if test "${with_override_source_root+set}" = set; then :
25980   withval=$with_override_source_root;
25981 fi
25982 
25983 
25984 
25985 # Check whether --with-adds-and-overrides was given.
25986 if test "${with_adds_and_overrides+set}" = set; then :
25987   withval=$with_adds_and_overrides;
25988 fi
25989 
25990 
25991   if test "x$with_adds_and_overrides" != x; then
25992     with_add_source_root="$with_adds_and_overrides/adds"
25993     with_override_source_root="$with_adds_and_overrides/overrides"
25994   fi
25995 
25996   if test "x$with_add_source_root" != x; then
25997     if ! test -d $with_add_source_root; then
25998       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25999     fi
26000     CURDIR="$PWD"
26001     cd "$with_add_source_root"
26002     ADD_SRC_ROOT="`pwd`"
26003     cd "$CURDIR"
26004     # Verify that the addon source root does not have any root makefiles.
26005     # If it does, then it is usually an error, prevent this.
26006     if test -f $with_add_source_root/langtools/make/Makefile; then
26007       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
26008     fi
26009     if test -f $with_add_source_root/corba/make/Makefile; then
26010       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
26011     fi
26012     if test -f $with_add_source_root/jaxp/make/Makefile; then
26013       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
26014     fi
26015     if test -f $with_add_source_root/jaxws/make/Makefile; then
26016       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
26017     fi
26018     if test -f $with_add_source_root/hotspot/make/Makefile; then
26019       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
26020     fi
26021     if test -f $with_add_source_root/nashorn/make/Makefile; then
26022       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
26023     fi
26024     if test -f $with_add_source_root/jdk/make/Makefile; then
26025       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
26026     fi
26027   fi
26028 
26029 
26030   if test "x$with_override_source_root" != x; then
26031     if ! test -d $with_override_source_root; then
26032       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26033     fi
26034     CURDIR="$PWD"
26035     cd "$with_override_source_root"
26036     OVERRIDE_SRC_ROOT="`pwd`"
26037     cd "$CURDIR"
26038     if test -f $with_override_source_root/langtools/make/Makefile; then
26039       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
26040     fi
26041     if test -f $with_override_source_root/corba/make/Makefile; then
26042       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
26043     fi
26044     if test -f $with_override_source_root/jaxp/make/Makefile; then
26045       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
26046     fi
26047     if test -f $with_override_source_root/jaxws/make/Makefile; then
26048       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
26049     fi
26050     if test -f $with_override_source_root/hotspot/make/Makefile; then
26051       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
26052     fi
26053     if test -f $with_override_source_root/nashorn/make/Makefile; then
26054       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
26055     fi
26056     if test -f $with_override_source_root/jdk/make/Makefile; then
26057       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
26058     fi
26059   fi
26060 
26061 
26062   ###############################################################################
26063   #
26064   # Override a repo completely, this is used for example when you have 3 small
26065   # development sandboxes of the langtools sources and want to avoid having 3 full
26066   # OpenJDK sources checked out on disk.
26067   #
26068   # Assuming that the 3 langtools sandboxes are located here:
26069   # /home/fredrik/sandbox1/langtools
26070   # /home/fredrik/sandbox2/langtools
26071   # /home/fredrik/sandbox3/langtools
26072   #
26073   # From the source root you create build subdirs manually:
26074   #     mkdir -p build1 build2 build3
26075   # in each build directory run:
26076   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26077   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26078   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26079   #
26080 
26081 
26082 # Check whether --with-override-langtools was given.
26083 if test "${with_override_langtools+set}" = set; then :
26084   withval=$with_override_langtools;
26085 fi
26086 
26087 
26088 
26089 # Check whether --with-override-corba was given.
26090 if test "${with_override_corba+set}" = set; then :
26091   withval=$with_override_corba;
26092 fi
26093 
26094 
26095 
26096 # Check whether --with-override-jaxp was given.
26097 if test "${with_override_jaxp+set}" = set; then :
26098   withval=$with_override_jaxp;
26099 fi
26100 
26101 
26102 
26103 # Check whether --with-override-jaxws was given.
26104 if test "${with_override_jaxws+set}" = set; then :
26105   withval=$with_override_jaxws;
26106 fi
26107 
26108 
26109 
26110 # Check whether --with-override-hotspot was given.
26111 if test "${with_override_hotspot+set}" = set; then :
26112   withval=$with_override_hotspot;
26113 fi
26114 
26115 
26116 
26117 # Check whether --with-override-nashorn was given.
26118 if test "${with_override_nashorn+set}" = set; then :
26119   withval=$with_override_nashorn;
26120 fi
26121 
26122 
26123 
26124 # Check whether --with-override-jdk was given.
26125 if test "${with_override_jdk+set}" = set; then :
26126   withval=$with_override_jdk;
26127 fi
26128 
26129 
26130   if test "x$with_override_langtools" != x; then
26131     CURDIR="$PWD"
26132     cd "$with_override_langtools"
26133     LANGTOOLS_TOPDIR="`pwd`"
26134     cd "$CURDIR"
26135     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26136       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26137     fi
26138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26139 $as_echo_n "checking if langtools should be overridden... " >&6; }
26140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26141 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26142   fi
26143   if test "x$with_override_corba" != x; then
26144     CURDIR="$PWD"
26145     cd "$with_override_corba"
26146     CORBA_TOPDIR="`pwd`"
26147     cd "$CURDIR"
26148     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26149       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26150     fi
26151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26152 $as_echo_n "checking if corba should be overridden... " >&6; }
26153     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26154 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26155   fi
26156   if test "x$with_override_jaxp" != x; then
26157     CURDIR="$PWD"
26158     cd "$with_override_jaxp"
26159     JAXP_TOPDIR="`pwd`"
26160     cd "$CURDIR"
26161     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26162       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26163     fi
26164     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26165 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26166     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26167 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26168   fi
26169   if test "x$with_override_jaxws" != x; then
26170     CURDIR="$PWD"
26171     cd "$with_override_jaxws"
26172     JAXWS_TOPDIR="`pwd`"
26173     cd "$CURDIR"
26174     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26175       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26176     fi
26177     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26178 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26180 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26181   fi
26182   if test "x$with_override_hotspot" != x; then
26183     CURDIR="$PWD"
26184     cd "$with_override_hotspot"
26185     HOTSPOT_TOPDIR="`pwd`"
26186     cd "$CURDIR"
26187     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26188       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26189     fi
26190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26191 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26193 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26194   fi
26195   if test "x$with_override_nashorn" != x; then
26196     CURDIR="$PWD"
26197     cd "$with_override_nashorn"
26198     NASHORN_TOPDIR="`pwd`"
26199     cd "$CURDIR"
26200     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26201       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26202     fi
26203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26204 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26205     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26206 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26207   fi
26208   if test "x$with_override_jdk" != x; then
26209     CURDIR="$PWD"
26210     cd "$with_override_jdk"
26211     JDK_TOPDIR="`pwd`"
26212     cd "$CURDIR"
26213     if ! test -f $JDK_TOPDIR/make/Makefile; then
26214       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26215     fi
26216     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26217 $as_echo_n "checking if JDK should be overridden... " >&6; }
26218     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26219 $as_echo "yes with $JDK_TOPDIR" >&6; }
26220   fi
26221 
26222 
26223   BUILD_OUTPUT="$OUTPUT_ROOT"
26224 
26225 
26226   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26227   BUILD_HOTSPOT=true
26228 
26229 
26230 
26231 # Check whether --with-import-hotspot was given.
26232 if test "${with_import_hotspot+set}" = set; then :
26233   withval=$with_import_hotspot;
26234 fi
26235 
26236   if test "x$with_import_hotspot" != x; then
26237     CURDIR="$PWD"
26238     cd "$with_import_hotspot"
26239     HOTSPOT_DIST="`pwd`"
26240     cd "$CURDIR"
26241     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26242       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26243     fi
26244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26245 $as_echo_n "checking if hotspot should be imported... " >&6; }
26246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26247 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26248     BUILD_HOTSPOT=false
26249   fi
26250 
26251   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26252 
26253 
26254 ###############################################################################
26255 #
26256 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26257 # native code.
26258 #
26259 ###############################################################################
26260 
26261 # First determine the toolchain type (compiler family)
26262 
26263 
26264 # Check whether --with-toolchain-type was given.
26265 if test "${with_toolchain_type+set}" = set; then :
26266   withval=$with_toolchain_type;
26267 fi
26268 
26269 
26270   # Use indirect variable referencing
26271   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26272   VALID_TOOLCHAINS=${!toolchain_var_name}
26273 
26274   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26275     if test -n "$XCODEBUILD"; then
26276       # On Mac OS X, default toolchain to clang after Xcode 5
26277       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26278       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26279       if test $? -ne 0; then
26280         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26281       fi
26282       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26283           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26284           $CUT -f 1 -d .`
26285       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26286 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26287       if test $XCODE_MAJOR_VERSION -ge 5; then
26288           DEFAULT_TOOLCHAIN="clang"
26289       else
26290           DEFAULT_TOOLCHAIN="gcc"
26291       fi
26292     else
26293       # If Xcode is not installed, but the command line tools are
26294       # then we can't run xcodebuild. On these systems we should
26295       # default to clang
26296       DEFAULT_TOOLCHAIN="clang"
26297     fi
26298   else
26299     # First toolchain type in the list is the default
26300     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26301   fi
26302 
26303   if test "x$with_toolchain_type" = xlist; then
26304     # List all toolchains
26305     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26306 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26307     for toolchain in $VALID_TOOLCHAINS; do
26308       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26309       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26310       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26311     done
26312 
26313     exit 0
26314   elif test "x$with_toolchain_type" != x; then
26315     # User override; check that it is valid
26316     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26317       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26318 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26319       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26320 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26321       as_fn_error $? "Cannot continue." "$LINENO" 5
26322     fi
26323     TOOLCHAIN_TYPE=$with_toolchain_type
26324   else
26325     # No flag given, use default
26326     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26327   fi
26328 
26329 
26330   TOOLCHAIN_CC_BINARY_clang="clang"
26331   TOOLCHAIN_CC_BINARY_gcc="gcc"
26332   TOOLCHAIN_CC_BINARY_microsoft="cl"
26333   TOOLCHAIN_CC_BINARY_solstudio="cc"
26334   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26335 
26336   TOOLCHAIN_CXX_BINARY_clang="clang++"
26337   TOOLCHAIN_CXX_BINARY_gcc="g++"
26338   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26339   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26340   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26341 
26342   # Use indirect variable referencing
26343   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26344   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26345   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26346   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26347   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26348   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26349 
26350 
26351   # Define filename patterns
26352   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26353     LIBRARY_PREFIX=
26354     SHARED_LIBRARY_SUFFIX='.dll'
26355     STATIC_LIBRARY_SUFFIX='.lib'
26356     SHARED_LIBRARY='$1.dll'
26357     STATIC_LIBRARY='$1.lib'
26358     OBJ_SUFFIX='.obj'
26359     EXE_SUFFIX='.exe'
26360   else
26361     LIBRARY_PREFIX=lib
26362     SHARED_LIBRARY_SUFFIX='.so'
26363     STATIC_LIBRARY_SUFFIX='.a'
26364     SHARED_LIBRARY='lib$1.so'
26365     STATIC_LIBRARY='lib$1.a'
26366     OBJ_SUFFIX='.o'
26367     EXE_SUFFIX=''
26368     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26369       SHARED_LIBRARY='lib$1.dylib'
26370       SHARED_LIBRARY_SUFFIX='.dylib'
26371     fi
26372   fi
26373 
26374 
26375 
26376 
26377 
26378 
26379 
26380 
26381 
26382 
26383   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26384     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26385 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26386   else
26387     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26388 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26389   fi
26390 
26391 
26392 # Then detect the actual binaries needed
26393 
26394   # FIXME: Is this needed?
26395   ac_ext=cpp
26396 ac_cpp='$CXXCPP $CPPFLAGS'
26397 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26398 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26399 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26400 
26401 
26402   # Store the CFLAGS etc passed to the configure script.
26403   ORG_CFLAGS="$CFLAGS"
26404   ORG_CXXFLAGS="$CXXFLAGS"
26405   ORG_OBJCFLAGS="$OBJCFLAGS"
26406 
26407   # On Windows, we need to detect the visual studio installation first.
26408   # This will change the PATH, but we need to keep that new PATH even
26409   # after toolchain detection is done, since the compiler (on x86) uses
26410   # it for DLL resolution in runtime.
26411   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26412 
26413   # Store path to cygwin link.exe to help excluding it when searching for
26414   # VS linker. This must be done before changing the PATH when looking for VS.
26415   # Extract the first word of "link", so it can be a program name with args.
26416 set dummy link; ac_word=$2
26417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26418 $as_echo_n "checking for $ac_word... " >&6; }
26419 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26420   $as_echo_n "(cached) " >&6
26421 else
26422   case $CYGWIN_LINK in
26423   [\\/]* | ?:[\\/]*)
26424   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26425   ;;
26426   *)
26427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26428 for as_dir in $PATH
26429 do
26430   IFS=$as_save_IFS
26431   test -z "$as_dir" && as_dir=.
26432     for ac_exec_ext in '' $ac_executable_extensions; do
26433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26434     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26436     break 2
26437   fi
26438 done
26439   done
26440 IFS=$as_save_IFS
26441 
26442   ;;
26443 esac
26444 fi
26445 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26446 if test -n "$CYGWIN_LINK"; then
26447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26448 $as_echo "$CYGWIN_LINK" >&6; }
26449 else
26450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26451 $as_echo "no" >&6; }
26452 fi
26453 
26454 
26455   if test "x$CYGWIN_LINK" != x; then
26456     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26457 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26458     "$CYGWIN_LINK" --version > /dev/null
26459     if test $? -eq 0 ; then
26460       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26461 $as_echo "yes" >&6; }
26462     else
26463       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26464 $as_echo "no" >&6; }
26465       # This might be the VS linker. Don't exclude it later on.
26466       CYGWIN_LINK=""
26467     fi
26468   fi
26469 
26470   # First-hand choice is to locate and run the vsvars bat file.
26471 
26472   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26473     VCVARSFILE="vc/bin/vcvars32.bat"
26474   else
26475     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26476   fi
26477 
26478   VS_ENV_CMD=""
26479   VS_ENV_ARGS=""
26480   if test "x$with_toolsdir" != x; then
26481 
26482   if test "x$VS_ENV_CMD" = x; then
26483     VS100BASE="$with_toolsdir/../.."
26484     METHOD="--with-tools-dir"
26485 
26486   windows_path="$VS100BASE"
26487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488     unix_path=`$CYGPATH -u "$windows_path"`
26489     VS100BASE="$unix_path"
26490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26492     VS100BASE="$unix_path"
26493   fi
26494 
26495     if test -d "$VS100BASE"; then
26496       if test -f "$VS100BASE/$VCVARSFILE"; then
26497         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26498 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26499         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26500         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26501         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26502         # TODO: improve detection for other versions of VS
26503         PLATFORM_TOOLSET="v100"
26504       else
26505         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26506 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26507         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26508 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26509       fi
26510     fi
26511   fi
26512 
26513   fi
26514 
26515   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26516     # Having specified an argument which is incorrect will produce an instant failure;
26517     # we should not go on looking
26518     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26519 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26520     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26521 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26522     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26523   fi
26524 
26525   if test "x$VS100COMNTOOLS" != x; then
26526 
26527   if test "x$VS_ENV_CMD" = x; then
26528     VS100BASE="$VS100COMNTOOLS/../.."
26529     METHOD="VS100COMNTOOLS variable"
26530 
26531   windows_path="$VS100BASE"
26532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26533     unix_path=`$CYGPATH -u "$windows_path"`
26534     VS100BASE="$unix_path"
26535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26537     VS100BASE="$unix_path"
26538   fi
26539 
26540     if test -d "$VS100BASE"; then
26541       if test -f "$VS100BASE/$VCVARSFILE"; then
26542         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26543 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26544         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26545         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26546         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26547         # TODO: improve detection for other versions of VS
26548         PLATFORM_TOOLSET="v100"
26549       else
26550         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26551 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26552         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26553 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26554       fi
26555     fi
26556   fi
26557 
26558   fi
26559   if test "x$PROGRAMFILES" != x; then
26560 
26561   if test "x$VS_ENV_CMD" = x; then
26562     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26563     METHOD="well-known name"
26564 
26565   windows_path="$VS100BASE"
26566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26567     unix_path=`$CYGPATH -u "$windows_path"`
26568     VS100BASE="$unix_path"
26569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26571     VS100BASE="$unix_path"
26572   fi
26573 
26574     if test -d "$VS100BASE"; then
26575       if test -f "$VS100BASE/$VCVARSFILE"; then
26576         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26577 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26578         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26579         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26580         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26581         # TODO: improve detection for other versions of VS
26582         PLATFORM_TOOLSET="v100"
26583       else
26584         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26585 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26586         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26587 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26588       fi
26589     fi
26590   fi
26591 
26592   fi
26593 
26594   if test "x$VS_ENV_CMD" = x; then
26595     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26596     METHOD="well-known name"
26597 
26598   windows_path="$VS100BASE"
26599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26600     unix_path=`$CYGPATH -u "$windows_path"`
26601     VS100BASE="$unix_path"
26602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26604     VS100BASE="$unix_path"
26605   fi
26606 
26607     if test -d "$VS100BASE"; then
26608       if test -f "$VS100BASE/$VCVARSFILE"; then
26609         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26610 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26611         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26612         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26613         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26614         # TODO: improve detection for other versions of VS
26615         PLATFORM_TOOLSET="v100"
26616       else
26617         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26618 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26619         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26620 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26621       fi
26622     fi
26623   fi
26624 
26625 
26626   if test "x$VS_ENV_CMD" = x; then
26627     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26628     METHOD="well-known name"
26629 
26630   windows_path="$VS100BASE"
26631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26632     unix_path=`$CYGPATH -u "$windows_path"`
26633     VS100BASE="$unix_path"
26634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26636     VS100BASE="$unix_path"
26637   fi
26638 
26639     if test -d "$VS100BASE"; then
26640       if test -f "$VS100BASE/$VCVARSFILE"; then
26641         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26642 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26643         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26644         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26645         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26646         # TODO: improve detection for other versions of VS
26647         PLATFORM_TOOLSET="v100"
26648       else
26649         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26650 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26651         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26652 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26653       fi
26654     fi
26655   fi
26656 
26657 
26658   if test "x$ProgramW6432" != x; then
26659 
26660   if test "x$VS_ENV_CMD" = x; then
26661     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26662     METHOD="well-known name"
26663 
26664   windows_path="$WIN_SDK_BASE"
26665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26666     unix_path=`$CYGPATH -u "$windows_path"`
26667     WIN_SDK_BASE="$unix_path"
26668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26669     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26670     WIN_SDK_BASE="$unix_path"
26671   fi
26672 
26673     if test -d "$WIN_SDK_BASE"; then
26674       # There have been cases of partial or broken SDK installations. A missing
26675       # lib dir is not going to work.
26676       if test ! -d "$WIN_SDK_BASE/../lib"; then
26677         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26678 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26679         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26680 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26681       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26682         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26683 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26684         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26685         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26686           VS_ENV_ARGS="/x86"
26687         else
26688           VS_ENV_ARGS="/x64"
26689         fi
26690         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26691         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26692         # TODO: improve detection for other versions of SDK
26693         PLATFORM_TOOLSET="Windows7.1SDK"
26694       else
26695         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26696 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26697         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26698 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26699       fi
26700     fi
26701   fi
26702 
26703   fi
26704   if test "x$PROGRAMW6432" != x; then
26705 
26706   if test "x$VS_ENV_CMD" = x; then
26707     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26708     METHOD="well-known name"
26709 
26710   windows_path="$WIN_SDK_BASE"
26711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26712     unix_path=`$CYGPATH -u "$windows_path"`
26713     WIN_SDK_BASE="$unix_path"
26714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26716     WIN_SDK_BASE="$unix_path"
26717   fi
26718 
26719     if test -d "$WIN_SDK_BASE"; then
26720       # There have been cases of partial or broken SDK installations. A missing
26721       # lib dir is not going to work.
26722       if test ! -d "$WIN_SDK_BASE/../lib"; then
26723         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26724 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26725         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26726 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26727       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26728         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26729 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26730         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26731         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26732           VS_ENV_ARGS="/x86"
26733         else
26734           VS_ENV_ARGS="/x64"
26735         fi
26736         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26737         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26738         # TODO: improve detection for other versions of SDK
26739         PLATFORM_TOOLSET="Windows7.1SDK"
26740       else
26741         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26742 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26743         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26744 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26745       fi
26746     fi
26747   fi
26748 
26749   fi
26750   if test "x$PROGRAMFILES" != x; then
26751 
26752   if test "x$VS_ENV_CMD" = x; then
26753     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26754     METHOD="well-known name"
26755 
26756   windows_path="$WIN_SDK_BASE"
26757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26758     unix_path=`$CYGPATH -u "$windows_path"`
26759     WIN_SDK_BASE="$unix_path"
26760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26762     WIN_SDK_BASE="$unix_path"
26763   fi
26764 
26765     if test -d "$WIN_SDK_BASE"; then
26766       # There have been cases of partial or broken SDK installations. A missing
26767       # lib dir is not going to work.
26768       if test ! -d "$WIN_SDK_BASE/../lib"; then
26769         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26770 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26771         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26772 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26773       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26774         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26775 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26776         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26777         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26778           VS_ENV_ARGS="/x86"
26779         else
26780           VS_ENV_ARGS="/x64"
26781         fi
26782         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26783         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26784         # TODO: improve detection for other versions of SDK
26785         PLATFORM_TOOLSET="Windows7.1SDK"
26786       else
26787         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26788 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26789         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26790 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26791       fi
26792     fi
26793   fi
26794 
26795   fi
26796 
26797   if test "x$VS_ENV_CMD" = x; then
26798     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26799     METHOD="well-known name"
26800 
26801   windows_path="$WIN_SDK_BASE"
26802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26803     unix_path=`$CYGPATH -u "$windows_path"`
26804     WIN_SDK_BASE="$unix_path"
26805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26807     WIN_SDK_BASE="$unix_path"
26808   fi
26809 
26810     if test -d "$WIN_SDK_BASE"; then
26811       # There have been cases of partial or broken SDK installations. A missing
26812       # lib dir is not going to work.
26813       if test ! -d "$WIN_SDK_BASE/../lib"; then
26814         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26815 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26816         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26817 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26818       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26819         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26820 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26821         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26822         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26823           VS_ENV_ARGS="/x86"
26824         else
26825           VS_ENV_ARGS="/x64"
26826         fi
26827         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26828         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26829         # TODO: improve detection for other versions of SDK
26830         PLATFORM_TOOLSET="Windows7.1SDK"
26831       else
26832         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26833 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26834         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26835 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26836       fi
26837     fi
26838   fi
26839 
26840 
26841   if test "x$VS_ENV_CMD" = x; then
26842     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26843     METHOD="well-known name"
26844 
26845   windows_path="$WIN_SDK_BASE"
26846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26847     unix_path=`$CYGPATH -u "$windows_path"`
26848     WIN_SDK_BASE="$unix_path"
26849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26851     WIN_SDK_BASE="$unix_path"
26852   fi
26853 
26854     if test -d "$WIN_SDK_BASE"; then
26855       # There have been cases of partial or broken SDK installations. A missing
26856       # lib dir is not going to work.
26857       if test ! -d "$WIN_SDK_BASE/../lib"; then
26858         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26859 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26860         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26861 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26862       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26863         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26864 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26865         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26866         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26867           VS_ENV_ARGS="/x86"
26868         else
26869           VS_ENV_ARGS="/x64"
26870         fi
26871         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26872         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26873         # TODO: improve detection for other versions of SDK
26874         PLATFORM_TOOLSET="Windows7.1SDK"
26875       else
26876         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26877 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26878         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26879 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26880       fi
26881     fi
26882   fi
26883 
26884 
26885   if test "x$VS_ENV_CMD" != x; then
26886     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26887 
26888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26889 
26890   # First separate the path from the arguments. This will split at the first
26891   # space.
26892   complete="$VS_ENV_CMD"
26893   path="${complete%% *}"
26894   tmp="$complete EOL"
26895   arguments="${tmp#* }"
26896 
26897   # Input might be given as Windows format, start by converting to
26898   # unix format.
26899   new_path=`$CYGPATH -u "$path"`
26900 
26901   # Now try to locate executable using which
26902   new_path=`$WHICH "$new_path" 2> /dev/null`
26903   # bat and cmd files are not always considered executable in cygwin causing which
26904   # to not find them
26905   if test "x$new_path" = x \
26906       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26907       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26908     new_path=`$CYGPATH -u "$path"`
26909   fi
26910   if test "x$new_path" = x; then
26911     # Oops. Which didn't find the executable.
26912     # The splitting of arguments from the executable at a space might have been incorrect,
26913     # since paths with space are more likely in Windows. Give it another try with the whole
26914     # argument.
26915     path="$complete"
26916     arguments="EOL"
26917     new_path=`$CYGPATH -u "$path"`
26918     new_path=`$WHICH "$new_path" 2> /dev/null`
26919     # bat and cmd files are not always considered executable in cygwin causing which
26920     # to not find them
26921     if test "x$new_path" = x \
26922         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26923         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26924       new_path=`$CYGPATH -u "$path"`
26925     fi
26926     if test "x$new_path" = x; then
26927       # It's still not found. Now this is an unrecoverable error.
26928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26929 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26930       has_space=`$ECHO "$complete" | $GREP " "`
26931       if test "x$has_space" != x; then
26932         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26933 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26934       fi
26935       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26936     fi
26937   fi
26938 
26939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26942   # "foo.exe" is OK but "foo" is an error.
26943   #
26944   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26945   # It is also a way to make sure we got the proper file name for the real test later on.
26946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26947   if test "x$test_shortpath" = x; then
26948     # Short path failed, file does not exist as specified.
26949     # Try adding .exe or .cmd
26950     if test -f "${new_path}.exe"; then
26951       input_to_shortpath="${new_path}.exe"
26952     elif test -f "${new_path}.cmd"; then
26953       input_to_shortpath="${new_path}.cmd"
26954     else
26955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26956 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26957       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26958 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26959       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26960     fi
26961   else
26962     input_to_shortpath="$new_path"
26963   fi
26964 
26965   # Call helper function which possibly converts this using DOS-style short mode.
26966   # If so, the updated path is stored in $new_path.
26967   new_path="$input_to_shortpath"
26968 
26969   input_path="$input_to_shortpath"
26970   # Check if we need to convert this using DOS-style short mode. If the path
26971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26972   # take no chances and rewrite it.
26973   # Note: m4 eats our [], so we need to use [ and ] instead.
26974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26975   if test "x$has_forbidden_chars" != x; then
26976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26980       # Going to short mode and back again did indeed matter. Since short mode is
26981       # case insensitive, let's make it lowercase to improve readability.
26982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26983       # Now convert it back to Unix-stile (cygpath)
26984       input_path=`$CYGPATH -u "$shortmode_path"`
26985       new_path="$input_path"
26986     fi
26987   fi
26988 
26989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26990   if test "x$test_cygdrive_prefix" = x; then
26991     # As a simple fix, exclude /usr/bin since it's not a real path.
26992     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26994       # a path prefixed by /cygdrive for fixpath to work.
26995       new_path="$CYGWIN_ROOT_PATH$input_path"
26996     fi
26997   fi
26998 
26999   # remove trailing .exe if any
27000   new_path="${new_path/%.exe/}"
27001 
27002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27003 
27004   # First separate the path from the arguments. This will split at the first
27005   # space.
27006   complete="$VS_ENV_CMD"
27007   path="${complete%% *}"
27008   tmp="$complete EOL"
27009   arguments="${tmp#* }"
27010 
27011   # Input might be given as Windows format, start by converting to
27012   # unix format.
27013   new_path="$path"
27014 
27015   windows_path="$new_path"
27016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27017     unix_path=`$CYGPATH -u "$windows_path"`
27018     new_path="$unix_path"
27019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27021     new_path="$unix_path"
27022   fi
27023 
27024 
27025   # Now try to locate executable using which
27026   new_path=`$WHICH "$new_path" 2> /dev/null`
27027 
27028   if test "x$new_path" = x; then
27029     # Oops. Which didn't find the executable.
27030     # The splitting of arguments from the executable at a space might have been incorrect,
27031     # since paths with space are more likely in Windows. Give it another try with the whole
27032     # argument.
27033     path="$complete"
27034     arguments="EOL"
27035     new_path="$path"
27036 
27037   windows_path="$new_path"
27038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27039     unix_path=`$CYGPATH -u "$windows_path"`
27040     new_path="$unix_path"
27041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27043     new_path="$unix_path"
27044   fi
27045 
27046 
27047     new_path=`$WHICH "$new_path" 2> /dev/null`
27048     # bat and cmd files are not always considered executable in MSYS causing which
27049     # to not find them
27050     if test "x$new_path" = x \
27051         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27052         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27053       new_path="$path"
27054 
27055   windows_path="$new_path"
27056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27057     unix_path=`$CYGPATH -u "$windows_path"`
27058     new_path="$unix_path"
27059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27061     new_path="$unix_path"
27062   fi
27063 
27064     fi
27065 
27066     if test "x$new_path" = x; then
27067       # It's still not found. Now this is an unrecoverable error.
27068       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27069 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27070       has_space=`$ECHO "$complete" | $GREP " "`
27071       if test "x$has_space" != x; then
27072         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27073 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27074       fi
27075       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27076     fi
27077   fi
27078 
27079   # Now new_path has a complete unix path to the binary
27080   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27081     # Keep paths in /bin as-is, but remove trailing .exe if any
27082     new_path="${new_path/%.exe/}"
27083     # Do not save /bin paths to all_fixpath_prefixes!
27084   else
27085     # Not in mixed or Windows style, start by that.
27086     new_path=`cmd //c echo $new_path`
27087 
27088   input_path="$new_path"
27089   # Check if we need to convert this using DOS-style short mode. If the path
27090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27091   # take no chances and rewrite it.
27092   # Note: m4 eats our [], so we need to use [ and ] instead.
27093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27094   if test "x$has_forbidden_chars" != x; then
27095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27097   fi
27098 
27099     # Output is in $new_path
27100 
27101   windows_path="$new_path"
27102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27103     unix_path=`$CYGPATH -u "$windows_path"`
27104     new_path="$unix_path"
27105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27107     new_path="$unix_path"
27108   fi
27109 
27110     # remove trailing .exe if any
27111     new_path="${new_path/%.exe/}"
27112 
27113     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27114     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27115   fi
27116 
27117   else
27118     # We're on a unix platform. Hooray! :)
27119     # First separate the path from the arguments. This will split at the first
27120     # space.
27121     complete="$VS_ENV_CMD"
27122     path="${complete%% *}"
27123     tmp="$complete EOL"
27124     arguments="${tmp#* }"
27125 
27126     # Cannot rely on the command "which" here since it doesn't always work.
27127     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27128     if test -z "$is_absolute_path"; then
27129       # Path to executable is not absolute. Find it.
27130       IFS_save="$IFS"
27131       IFS=:
27132       for p in $PATH; do
27133         if test -f "$p/$path" && test -x "$p/$path"; then
27134           new_path="$p/$path"
27135           break
27136         fi
27137       done
27138       IFS="$IFS_save"
27139     else
27140       # This is an absolute path, we can use it without further modifications.
27141       new_path="$path"
27142     fi
27143 
27144     if test "x$new_path" = x; then
27145       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27146 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27147       has_space=`$ECHO "$complete" | $GREP " "`
27148       if test "x$has_space" != x; then
27149         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27150 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27151       fi
27152       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27153     fi
27154   fi
27155 
27156   # Now join together the path and the arguments once again
27157   if test "x$arguments" != xEOL; then
27158     new_complete="$new_path ${arguments% *}"
27159   else
27160     new_complete="$new_path"
27161   fi
27162 
27163   if test "x$complete" != "x$new_complete"; then
27164     VS_ENV_CMD="$new_complete"
27165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27166 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27167   fi
27168 
27169 
27170     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27171     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27172 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27173 
27174     # We need to create a couple of temporary files.
27175     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27176     $MKDIR -p $VS_ENV_TMP_DIR
27177 
27178     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27179     # Instead create a shell script which will set the relevant variables when run.
27180     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27181 
27182   unix_path="$WINPATH_VS_ENV_CMD"
27183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27184     windows_path=`$CYGPATH -m "$unix_path"`
27185     WINPATH_VS_ENV_CMD="$windows_path"
27186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27187     windows_path=`cmd //c echo $unix_path`
27188     WINPATH_VS_ENV_CMD="$windows_path"
27189   fi
27190 
27191     WINPATH_BASH="$BASH"
27192 
27193   unix_path="$WINPATH_BASH"
27194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27195     windows_path=`$CYGPATH -m "$unix_path"`
27196     WINPATH_BASH="$windows_path"
27197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27198     windows_path=`cmd //c echo $unix_path`
27199     WINPATH_BASH="$windows_path"
27200   fi
27201 
27202 
27203     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27204     # script (executable by bash) that will setup the important variables.
27205     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27206     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27207     # This will end up something like:
27208     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27209     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27210     # These will end up something like:
27211     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27212     # The trailing space for everyone except PATH is no typo, but is needed due
27213     # to trailing \ in the Windows paths. These will be stripped later.
27214     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27215     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27216     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27217     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27218     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27219     $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27220 
27221     # Now execute the newly created bat file.
27222     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27223     # Change directory so we don't need to mess with Windows paths in redirects.
27224     cd $VS_ENV_TMP_DIR
27225     cmd /c extract-vs-env.bat | $CAT
27226     cd $CURDIR
27227 
27228     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27229       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27230 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27231       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27232 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27233       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27234 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27235       as_fn_error $? "Cannot continue" "$LINENO" 5
27236     fi
27237 
27238     # Now set all paths and other env variables. This will allow the rest of
27239     # the configure script to find and run the compiler in the proper way.
27240     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27241 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27242     . $VS_ENV_TMP_DIR/set-vs-env.sh
27243     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27244     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27245   else
27246     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27247     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27248 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27249   fi
27250 
27251   # At this point, we should have correct variables in the environment, or we can't continue.
27252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27253 $as_echo_n "checking for Visual Studio variables... " >&6; }
27254 
27255   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27256     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27257       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27258 $as_echo "present but broken" >&6; }
27259       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27260     else
27261       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27262 $as_echo "ok" >&6; }
27263       # Remove any trailing "\" and " " from the variables.
27264       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27265       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27266       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27267       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27268       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27269       # Remove any paths containing # (typically F#) as that messes up make. This
27270       # is needed if visual studio was installed with F# support.
27271       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27272 
27273 
27274 
27275 
27276     fi
27277   else
27278     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27279 $as_echo "not found" >&6; }
27280 
27281     if test "x$VS_ENV_CMD" = x; then
27282       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27283 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27284       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27285 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27286     else
27287       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27288 $as_echo "$as_me: Running the extraction script failed." >&6;}
27289     fi
27290     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27291 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27292     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27293 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27294     as_fn_error $? "Cannot continue" "$LINENO" 5
27295   fi
27296 
27297     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27298     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27299     PATH="$VS_PATH"
27300     # The microsoft toolchain also requires INCLUDE and LIB to be set.
27301     export INCLUDE="$VS_INCLUDE"
27302     export LIB="$VS_LIB"
27303   fi
27304 
27305   # autoconf magic only relies on PATH, so update it if tools dir is specified
27306   OLD_PATH="$PATH"
27307 
27308   # For solaris we really need solaris tools, and not the GNU equivalent.
27309   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27310   # so add that to path before starting to probe.
27311   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27312   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27313     PATH="/usr/ccs/bin:$PATH"
27314   fi
27315 
27316   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27317   # override all other locations.
27318   if test "x$TOOLCHAIN_PATH" != x; then
27319     PATH=$TOOLCHAIN_PATH:$PATH
27320   fi
27321 
27322 
27323   #
27324   # Setup the compilers (CC and CXX)
27325   #
27326 
27327   COMPILER_NAME=C
27328   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27329 
27330   if test "x$CC" != x; then
27331     # User has supplied compiler name already, always let that override.
27332     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27333 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27334     if test "x`basename $CC`" = "x$CC"; then
27335       # A command without a complete path is provided, search $PATH.
27336 
27337       for ac_prog in $CC
27338 do
27339   # Extract the first word of "$ac_prog", so it can be a program name with args.
27340 set dummy $ac_prog; ac_word=$2
27341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27342 $as_echo_n "checking for $ac_word... " >&6; }
27343 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27344   $as_echo_n "(cached) " >&6
27345 else
27346   case $POTENTIAL_CC in
27347   [\\/]* | ?:[\\/]*)
27348   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27349   ;;
27350   *)
27351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27352 for as_dir in $PATH
27353 do
27354   IFS=$as_save_IFS
27355   test -z "$as_dir" && as_dir=.
27356     for ac_exec_ext in '' $ac_executable_extensions; do
27357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27358     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27360     break 2
27361   fi
27362 done
27363   done
27364 IFS=$as_save_IFS
27365 
27366   ;;
27367 esac
27368 fi
27369 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27370 if test -n "$POTENTIAL_CC"; then
27371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27372 $as_echo "$POTENTIAL_CC" >&6; }
27373 else
27374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27375 $as_echo "no" >&6; }
27376 fi
27377 
27378 
27379   test -n "$POTENTIAL_CC" && break
27380 done
27381 
27382       if test "x$POTENTIAL_CC" != x; then
27383         CC=$POTENTIAL_CC
27384       else
27385         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27386       fi
27387     else
27388       # Otherwise it might already be a complete path
27389       if test ! -x "$CC"; then
27390         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27391       fi
27392     fi
27393   else
27394     # No user supplied value. Locate compiler ourselves.
27395 
27396     # If we are cross compiling, assume cross compilation tools follows the
27397     # cross compilation standard where they are prefixed with the autoconf
27398     # standard name for the target. For example the binary
27399     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27400     # If we are not cross compiling, then the default compiler name will be
27401     # used.
27402 
27403     CC=
27404     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27405     # before checking the rest of the PATH.
27406     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27407     # step, this should not be necessary.
27408     if test -n "$TOOLCHAIN_PATH"; then
27409       PATH_save="$PATH"
27410       PATH="$TOOLCHAIN_PATH"
27411       for ac_prog in $SEARCH_LIST
27412 do
27413   # Extract the first word of "$ac_prog", so it can be a program name with args.
27414 set dummy $ac_prog; ac_word=$2
27415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27416 $as_echo_n "checking for $ac_word... " >&6; }
27417 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27418   $as_echo_n "(cached) " >&6
27419 else
27420   case $TOOLCHAIN_PATH_CC in
27421   [\\/]* | ?:[\\/]*)
27422   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27423   ;;
27424   *)
27425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27426 for as_dir in $PATH
27427 do
27428   IFS=$as_save_IFS
27429   test -z "$as_dir" && as_dir=.
27430     for ac_exec_ext in '' $ac_executable_extensions; do
27431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27432     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27434     break 2
27435   fi
27436 done
27437   done
27438 IFS=$as_save_IFS
27439 
27440   ;;
27441 esac
27442 fi
27443 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27444 if test -n "$TOOLCHAIN_PATH_CC"; then
27445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27446 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27447 else
27448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27449 $as_echo "no" >&6; }
27450 fi
27451 
27452 
27453   test -n "$TOOLCHAIN_PATH_CC" && break
27454 done
27455 
27456       CC=$TOOLCHAIN_PATH_CC
27457       PATH="$PATH_save"
27458     fi
27459 
27460     # AC_PATH_PROGS can't be run multiple times with the same variable,
27461     # so create a new name for this run.
27462     if test "x$CC" = x; then
27463       for ac_prog in $SEARCH_LIST
27464 do
27465   # Extract the first word of "$ac_prog", so it can be a program name with args.
27466 set dummy $ac_prog; ac_word=$2
27467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27468 $as_echo_n "checking for $ac_word... " >&6; }
27469 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27470   $as_echo_n "(cached) " >&6
27471 else
27472   case $POTENTIAL_CC in
27473   [\\/]* | ?:[\\/]*)
27474   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27475   ;;
27476   *)
27477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27478 for as_dir in $PATH
27479 do
27480   IFS=$as_save_IFS
27481   test -z "$as_dir" && as_dir=.
27482     for ac_exec_ext in '' $ac_executable_extensions; do
27483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27484     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27486     break 2
27487   fi
27488 done
27489   done
27490 IFS=$as_save_IFS
27491 
27492   ;;
27493 esac
27494 fi
27495 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27496 if test -n "$POTENTIAL_CC"; then
27497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27498 $as_echo "$POTENTIAL_CC" >&6; }
27499 else
27500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27501 $as_echo "no" >&6; }
27502 fi
27503 
27504 
27505   test -n "$POTENTIAL_CC" && break
27506 done
27507 
27508       CC=$POTENTIAL_CC
27509     fi
27510 
27511     if test "x$CC" = x; then
27512 
27513   # Print a helpful message on how to acquire the necessary build dependency.
27514   # devkit is the help tag: freetype, cups, pulse, alsa etc
27515   MISSING_DEPENDENCY=devkit
27516 
27517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27518     cygwin_help $MISSING_DEPENDENCY
27519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27520     msys_help $MISSING_DEPENDENCY
27521   else
27522     PKGHANDLER_COMMAND=
27523 
27524     case $PKGHANDLER in
27525       apt-get)
27526         apt_help     $MISSING_DEPENDENCY ;;
27527       yum)
27528         yum_help     $MISSING_DEPENDENCY ;;
27529       port)
27530         port_help    $MISSING_DEPENDENCY ;;
27531       pkgutil)
27532         pkgutil_help $MISSING_DEPENDENCY ;;
27533       pkgadd)
27534         pkgadd_help  $MISSING_DEPENDENCY ;;
27535     esac
27536 
27537     if test "x$PKGHANDLER_COMMAND" != x; then
27538       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27539     fi
27540   fi
27541 
27542       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27543     fi
27544   fi
27545 
27546   # Now we have a compiler binary in CC. Make sure it's okay.
27547 
27548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27549 
27550   # First separate the path from the arguments. This will split at the first
27551   # space.
27552   complete="$CC"
27553   path="${complete%% *}"
27554   tmp="$complete EOL"
27555   arguments="${tmp#* }"
27556 
27557   # Input might be given as Windows format, start by converting to
27558   # unix format.
27559   new_path=`$CYGPATH -u "$path"`
27560 
27561   # Now try to locate executable using which
27562   new_path=`$WHICH "$new_path" 2> /dev/null`
27563   # bat and cmd files are not always considered executable in cygwin causing which
27564   # to not find them
27565   if test "x$new_path" = x \
27566       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27567       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27568     new_path=`$CYGPATH -u "$path"`
27569   fi
27570   if test "x$new_path" = x; then
27571     # Oops. Which didn't find the executable.
27572     # The splitting of arguments from the executable at a space might have been incorrect,
27573     # since paths with space are more likely in Windows. Give it another try with the whole
27574     # argument.
27575     path="$complete"
27576     arguments="EOL"
27577     new_path=`$CYGPATH -u "$path"`
27578     new_path=`$WHICH "$new_path" 2> /dev/null`
27579     # bat and cmd files are not always considered executable in cygwin causing which
27580     # to not find them
27581     if test "x$new_path" = x \
27582         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27583         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27584       new_path=`$CYGPATH -u "$path"`
27585     fi
27586     if test "x$new_path" = x; then
27587       # It's still not found. Now this is an unrecoverable error.
27588       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27589 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27590       has_space=`$ECHO "$complete" | $GREP " "`
27591       if test "x$has_space" != x; then
27592         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27593 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27594       fi
27595       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27596     fi
27597   fi
27598 
27599   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27600   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27601   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27602   # "foo.exe" is OK but "foo" is an error.
27603   #
27604   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27605   # It is also a way to make sure we got the proper file name for the real test later on.
27606   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27607   if test "x$test_shortpath" = x; then
27608     # Short path failed, file does not exist as specified.
27609     # Try adding .exe or .cmd
27610     if test -f "${new_path}.exe"; then
27611       input_to_shortpath="${new_path}.exe"
27612     elif test -f "${new_path}.cmd"; then
27613       input_to_shortpath="${new_path}.cmd"
27614     else
27615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27616 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27617       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27618 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27619       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27620     fi
27621   else
27622     input_to_shortpath="$new_path"
27623   fi
27624 
27625   # Call helper function which possibly converts this using DOS-style short mode.
27626   # If so, the updated path is stored in $new_path.
27627   new_path="$input_to_shortpath"
27628 
27629   input_path="$input_to_shortpath"
27630   # Check if we need to convert this using DOS-style short mode. If the path
27631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27632   # take no chances and rewrite it.
27633   # Note: m4 eats our [], so we need to use [ and ] instead.
27634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27635   if test "x$has_forbidden_chars" != x; then
27636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27637     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27638     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27639     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27640       # Going to short mode and back again did indeed matter. Since short mode is
27641       # case insensitive, let's make it lowercase to improve readability.
27642       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27643       # Now convert it back to Unix-stile (cygpath)
27644       input_path=`$CYGPATH -u "$shortmode_path"`
27645       new_path="$input_path"
27646     fi
27647   fi
27648 
27649   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27650   if test "x$test_cygdrive_prefix" = x; then
27651     # As a simple fix, exclude /usr/bin since it's not a real path.
27652     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27653       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27654       # a path prefixed by /cygdrive for fixpath to work.
27655       new_path="$CYGWIN_ROOT_PATH$input_path"
27656     fi
27657   fi
27658 
27659   # remove trailing .exe if any
27660   new_path="${new_path/%.exe/}"
27661 
27662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27663 
27664   # First separate the path from the arguments. This will split at the first
27665   # space.
27666   complete="$CC"
27667   path="${complete%% *}"
27668   tmp="$complete EOL"
27669   arguments="${tmp#* }"
27670 
27671   # Input might be given as Windows format, start by converting to
27672   # unix format.
27673   new_path="$path"
27674 
27675   windows_path="$new_path"
27676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27677     unix_path=`$CYGPATH -u "$windows_path"`
27678     new_path="$unix_path"
27679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27681     new_path="$unix_path"
27682   fi
27683 
27684 
27685   # Now try to locate executable using which
27686   new_path=`$WHICH "$new_path" 2> /dev/null`
27687 
27688   if test "x$new_path" = x; then
27689     # Oops. Which didn't find the executable.
27690     # The splitting of arguments from the executable at a space might have been incorrect,
27691     # since paths with space are more likely in Windows. Give it another try with the whole
27692     # argument.
27693     path="$complete"
27694     arguments="EOL"
27695     new_path="$path"
27696 
27697   windows_path="$new_path"
27698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27699     unix_path=`$CYGPATH -u "$windows_path"`
27700     new_path="$unix_path"
27701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27703     new_path="$unix_path"
27704   fi
27705 
27706 
27707     new_path=`$WHICH "$new_path" 2> /dev/null`
27708     # bat and cmd files are not always considered executable in MSYS causing which
27709     # to not find them
27710     if test "x$new_path" = x \
27711         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27712         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27713       new_path="$path"
27714 
27715   windows_path="$new_path"
27716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717     unix_path=`$CYGPATH -u "$windows_path"`
27718     new_path="$unix_path"
27719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27721     new_path="$unix_path"
27722   fi
27723 
27724     fi
27725 
27726     if test "x$new_path" = x; then
27727       # It's still not found. Now this is an unrecoverable error.
27728       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27729 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27730       has_space=`$ECHO "$complete" | $GREP " "`
27731       if test "x$has_space" != x; then
27732         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27733 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27734       fi
27735       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27736     fi
27737   fi
27738 
27739   # Now new_path has a complete unix path to the binary
27740   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27741     # Keep paths in /bin as-is, but remove trailing .exe if any
27742     new_path="${new_path/%.exe/}"
27743     # Do not save /bin paths to all_fixpath_prefixes!
27744   else
27745     # Not in mixed or Windows style, start by that.
27746     new_path=`cmd //c echo $new_path`
27747 
27748   input_path="$new_path"
27749   # Check if we need to convert this using DOS-style short mode. If the path
27750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27751   # take no chances and rewrite it.
27752   # Note: m4 eats our [], so we need to use [ and ] instead.
27753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27754   if test "x$has_forbidden_chars" != x; then
27755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27757   fi
27758 
27759     # Output is in $new_path
27760 
27761   windows_path="$new_path"
27762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27763     unix_path=`$CYGPATH -u "$windows_path"`
27764     new_path="$unix_path"
27765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27767     new_path="$unix_path"
27768   fi
27769 
27770     # remove trailing .exe if any
27771     new_path="${new_path/%.exe/}"
27772 
27773     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27774     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27775   fi
27776 
27777   else
27778     # We're on a unix platform. Hooray! :)
27779     # First separate the path from the arguments. This will split at the first
27780     # space.
27781     complete="$CC"
27782     path="${complete%% *}"
27783     tmp="$complete EOL"
27784     arguments="${tmp#* }"
27785 
27786     # Cannot rely on the command "which" here since it doesn't always work.
27787     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27788     if test -z "$is_absolute_path"; then
27789       # Path to executable is not absolute. Find it.
27790       IFS_save="$IFS"
27791       IFS=:
27792       for p in $PATH; do
27793         if test -f "$p/$path" && test -x "$p/$path"; then
27794           new_path="$p/$path"
27795           break
27796         fi
27797       done
27798       IFS="$IFS_save"
27799     else
27800       # This is an absolute path, we can use it without further modifications.
27801       new_path="$path"
27802     fi
27803 
27804     if test "x$new_path" = x; then
27805       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27806 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27807       has_space=`$ECHO "$complete" | $GREP " "`
27808       if test "x$has_space" != x; then
27809         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27810 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27811       fi
27812       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27813     fi
27814   fi
27815 
27816   # Now join together the path and the arguments once again
27817   if test "x$arguments" != xEOL; then
27818     new_complete="$new_path ${arguments% *}"
27819   else
27820     new_complete="$new_path"
27821   fi
27822 
27823   if test "x$complete" != "x$new_complete"; then
27824     CC="$new_complete"
27825     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27826 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27827   fi
27828 
27829   TEST_COMPILER="$CC"
27830   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27831   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27832   if test "x$OPENJDK_BUILD_OS" != xaix; then
27833     # FIXME: This test should not be needed anymore; we don't do that for any platform.
27834     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27835 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
27836 
27837   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27838     # Follow a chain of symbolic links. Use readlink
27839     # where it exists, else fall back to horribly
27840     # complicated shell code.
27841     if test "x$READLINK_TESTED" != yes; then
27842       # On MacOSX there is a readlink tool with a different
27843       # purpose than the GNU readlink tool. Check the found readlink.
27844       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27845       if test "x$ISGNU" = x; then
27846         # A readlink that we do not know how to use.
27847         # Are there other non-GNU readlinks out there?
27848         READLINK_TESTED=yes
27849         READLINK=
27850       fi
27851     fi
27852 
27853     if test "x$READLINK" != x; then
27854       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27855     else
27856       # Save the current directory for restoring afterwards
27857       STARTDIR=$PWD
27858       COUNTER=0
27859       sym_link_dir=`$DIRNAME $TEST_COMPILER`
27860       sym_link_file=`$BASENAME $TEST_COMPILER`
27861       cd $sym_link_dir
27862       # Use -P flag to resolve symlinks in directories.
27863       cd `$THEPWDCMD -P`
27864       sym_link_dir=`$THEPWDCMD -P`
27865       # Resolve file symlinks
27866       while test $COUNTER -lt 20; do
27867         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27868         if test "x$ISLINK" == x; then
27869           # This is not a symbolic link! We are done!
27870           break
27871         fi
27872         # Again resolve directory symlinks since the target of the just found
27873         # link could be in a different directory
27874         cd `$DIRNAME $ISLINK`
27875         sym_link_dir=`$THEPWDCMD -P`
27876         sym_link_file=`$BASENAME $ISLINK`
27877         let COUNTER=COUNTER+1
27878       done
27879       cd $STARTDIR
27880       TEST_COMPILER=$sym_link_dir/$sym_link_file
27881     fi
27882   fi
27883 
27884     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27885 $as_echo "$TEST_COMPILER" >&6; }
27886   fi
27887   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27888 $as_echo_n "checking if CC is disguised ccache... " >&6; }
27889 
27890   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27891   if test "x$COMPILER_BASENAME" = "xccache"; then
27892     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27893 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27894     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27895     # We want to control ccache invocation ourselves, so ignore this cc and try
27896     # searching again.
27897 
27898     # Remove the path to the fake ccache cc from the PATH
27899     RETRY_COMPILER_SAVED_PATH="$PATH"
27900     COMPILER_DIRNAME=`$DIRNAME $CC`
27901     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27902 
27903     # Try again looking for our compiler
27904     if test -n "$ac_tool_prefix"; then
27905   for ac_prog in $TOOLCHAIN_CC_BINARY
27906   do
27907     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27908 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27910 $as_echo_n "checking for $ac_word... " >&6; }
27911 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27912   $as_echo_n "(cached) " >&6
27913 else
27914   if test -n "$PROPER_COMPILER_CC"; then
27915   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27916 else
27917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27918 for as_dir in $PATH
27919 do
27920   IFS=$as_save_IFS
27921   test -z "$as_dir" && as_dir=.
27922     for ac_exec_ext in '' $ac_executable_extensions; do
27923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27924     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27926     break 2
27927   fi
27928 done
27929   done
27930 IFS=$as_save_IFS
27931 
27932 fi
27933 fi
27934 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27935 if test -n "$PROPER_COMPILER_CC"; then
27936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27937 $as_echo "$PROPER_COMPILER_CC" >&6; }
27938 else
27939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27940 $as_echo "no" >&6; }
27941 fi
27942 
27943 
27944     test -n "$PROPER_COMPILER_CC" && break
27945   done
27946 fi
27947 if test -z "$PROPER_COMPILER_CC"; then
27948   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27949   for ac_prog in $TOOLCHAIN_CC_BINARY
27950 do
27951   # Extract the first word of "$ac_prog", so it can be a program name with args.
27952 set dummy $ac_prog; ac_word=$2
27953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27954 $as_echo_n "checking for $ac_word... " >&6; }
27955 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
27956   $as_echo_n "(cached) " >&6
27957 else
27958   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27959   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
27960 else
27961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27962 for as_dir in $PATH
27963 do
27964   IFS=$as_save_IFS
27965   test -z "$as_dir" && as_dir=.
27966     for ac_exec_ext in '' $ac_executable_extensions; do
27967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27968     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
27969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27970     break 2
27971   fi
27972 done
27973   done
27974 IFS=$as_save_IFS
27975 
27976 fi
27977 fi
27978 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
27979 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
27981 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
27982 else
27983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27984 $as_echo "no" >&6; }
27985 fi
27986 
27987 
27988   test -n "$ac_ct_PROPER_COMPILER_CC" && break
27989 done
27990 
27991   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
27992     PROPER_COMPILER_CC=""
27993   else
27994     case $cross_compiling:$ac_tool_warned in
27995 yes:)
27996 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27997 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27998 ac_tool_warned=yes ;;
27999 esac
28000     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28001   fi
28002 fi
28003 
28004 
28005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28006 
28007   # First separate the path from the arguments. This will split at the first
28008   # space.
28009   complete="$PROPER_COMPILER_CC"
28010   path="${complete%% *}"
28011   tmp="$complete EOL"
28012   arguments="${tmp#* }"
28013 
28014   # Input might be given as Windows format, start by converting to
28015   # unix format.
28016   new_path=`$CYGPATH -u "$path"`
28017 
28018   # Now try to locate executable using which
28019   new_path=`$WHICH "$new_path" 2> /dev/null`
28020   # bat and cmd files are not always considered executable in cygwin causing which
28021   # to not find them
28022   if test "x$new_path" = x \
28023       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28024       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28025     new_path=`$CYGPATH -u "$path"`
28026   fi
28027   if test "x$new_path" = x; then
28028     # Oops. Which didn't find the executable.
28029     # The splitting of arguments from the executable at a space might have been incorrect,
28030     # since paths with space are more likely in Windows. Give it another try with the whole
28031     # argument.
28032     path="$complete"
28033     arguments="EOL"
28034     new_path=`$CYGPATH -u "$path"`
28035     new_path=`$WHICH "$new_path" 2> /dev/null`
28036     # bat and cmd files are not always considered executable in cygwin causing which
28037     # to not find them
28038     if test "x$new_path" = x \
28039         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28040         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28041       new_path=`$CYGPATH -u "$path"`
28042     fi
28043     if test "x$new_path" = x; then
28044       # It's still not found. Now this is an unrecoverable error.
28045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28046 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28047       has_space=`$ECHO "$complete" | $GREP " "`
28048       if test "x$has_space" != x; then
28049         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28050 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28051       fi
28052       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28053     fi
28054   fi
28055 
28056   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28057   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28058   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28059   # "foo.exe" is OK but "foo" is an error.
28060   #
28061   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28062   # It is also a way to make sure we got the proper file name for the real test later on.
28063   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28064   if test "x$test_shortpath" = x; then
28065     # Short path failed, file does not exist as specified.
28066     # Try adding .exe or .cmd
28067     if test -f "${new_path}.exe"; then
28068       input_to_shortpath="${new_path}.exe"
28069     elif test -f "${new_path}.cmd"; then
28070       input_to_shortpath="${new_path}.cmd"
28071     else
28072       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28073 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28074       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28075 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28076       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28077     fi
28078   else
28079     input_to_shortpath="$new_path"
28080   fi
28081 
28082   # Call helper function which possibly converts this using DOS-style short mode.
28083   # If so, the updated path is stored in $new_path.
28084   new_path="$input_to_shortpath"
28085 
28086   input_path="$input_to_shortpath"
28087   # Check if we need to convert this using DOS-style short mode. If the path
28088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28089   # take no chances and rewrite it.
28090   # Note: m4 eats our [], so we need to use [ and ] instead.
28091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28092   if test "x$has_forbidden_chars" != x; then
28093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28094     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28095     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28096     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28097       # Going to short mode and back again did indeed matter. Since short mode is
28098       # case insensitive, let's make it lowercase to improve readability.
28099       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28100       # Now convert it back to Unix-stile (cygpath)
28101       input_path=`$CYGPATH -u "$shortmode_path"`
28102       new_path="$input_path"
28103     fi
28104   fi
28105 
28106   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28107   if test "x$test_cygdrive_prefix" = x; then
28108     # As a simple fix, exclude /usr/bin since it's not a real path.
28109     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28110       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28111       # a path prefixed by /cygdrive for fixpath to work.
28112       new_path="$CYGWIN_ROOT_PATH$input_path"
28113     fi
28114   fi
28115 
28116   # remove trailing .exe if any
28117   new_path="${new_path/%.exe/}"
28118 
28119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28120 
28121   # First separate the path from the arguments. This will split at the first
28122   # space.
28123   complete="$PROPER_COMPILER_CC"
28124   path="${complete%% *}"
28125   tmp="$complete EOL"
28126   arguments="${tmp#* }"
28127 
28128   # Input might be given as Windows format, start by converting to
28129   # unix format.
28130   new_path="$path"
28131 
28132   windows_path="$new_path"
28133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28134     unix_path=`$CYGPATH -u "$windows_path"`
28135     new_path="$unix_path"
28136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28137     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28138     new_path="$unix_path"
28139   fi
28140 
28141 
28142   # Now try to locate executable using which
28143   new_path=`$WHICH "$new_path" 2> /dev/null`
28144 
28145   if test "x$new_path" = x; then
28146     # Oops. Which didn't find the executable.
28147     # The splitting of arguments from the executable at a space might have been incorrect,
28148     # since paths with space are more likely in Windows. Give it another try with the whole
28149     # argument.
28150     path="$complete"
28151     arguments="EOL"
28152     new_path="$path"
28153 
28154   windows_path="$new_path"
28155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28156     unix_path=`$CYGPATH -u "$windows_path"`
28157     new_path="$unix_path"
28158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28160     new_path="$unix_path"
28161   fi
28162 
28163 
28164     new_path=`$WHICH "$new_path" 2> /dev/null`
28165     # bat and cmd files are not always considered executable in MSYS causing which
28166     # to not find them
28167     if test "x$new_path" = x \
28168         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28169         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28170       new_path="$path"
28171 
28172   windows_path="$new_path"
28173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28174     unix_path=`$CYGPATH -u "$windows_path"`
28175     new_path="$unix_path"
28176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28178     new_path="$unix_path"
28179   fi
28180 
28181     fi
28182 
28183     if test "x$new_path" = x; then
28184       # It's still not found. Now this is an unrecoverable error.
28185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28186 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28187       has_space=`$ECHO "$complete" | $GREP " "`
28188       if test "x$has_space" != x; then
28189         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28190 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28191       fi
28192       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28193     fi
28194   fi
28195 
28196   # Now new_path has a complete unix path to the binary
28197   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28198     # Keep paths in /bin as-is, but remove trailing .exe if any
28199     new_path="${new_path/%.exe/}"
28200     # Do not save /bin paths to all_fixpath_prefixes!
28201   else
28202     # Not in mixed or Windows style, start by that.
28203     new_path=`cmd //c echo $new_path`
28204 
28205   input_path="$new_path"
28206   # Check if we need to convert this using DOS-style short mode. If the path
28207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28208   # take no chances and rewrite it.
28209   # Note: m4 eats our [], so we need to use [ and ] instead.
28210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28211   if test "x$has_forbidden_chars" != x; then
28212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28213     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28214   fi
28215 
28216     # Output is in $new_path
28217 
28218   windows_path="$new_path"
28219   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28220     unix_path=`$CYGPATH -u "$windows_path"`
28221     new_path="$unix_path"
28222   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28223     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28224     new_path="$unix_path"
28225   fi
28226 
28227     # remove trailing .exe if any
28228     new_path="${new_path/%.exe/}"
28229 
28230     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28231     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28232   fi
28233 
28234   else
28235     # We're on a unix platform. Hooray! :)
28236     # First separate the path from the arguments. This will split at the first
28237     # space.
28238     complete="$PROPER_COMPILER_CC"
28239     path="${complete%% *}"
28240     tmp="$complete EOL"
28241     arguments="${tmp#* }"
28242 
28243     # Cannot rely on the command "which" here since it doesn't always work.
28244     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28245     if test -z "$is_absolute_path"; then
28246       # Path to executable is not absolute. Find it.
28247       IFS_save="$IFS"
28248       IFS=:
28249       for p in $PATH; do
28250         if test -f "$p/$path" && test -x "$p/$path"; then
28251           new_path="$p/$path"
28252           break
28253         fi
28254       done
28255       IFS="$IFS_save"
28256     else
28257       # This is an absolute path, we can use it without further modifications.
28258       new_path="$path"
28259     fi
28260 
28261     if test "x$new_path" = x; then
28262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28263 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28264       has_space=`$ECHO "$complete" | $GREP " "`
28265       if test "x$has_space" != x; then
28266         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28267 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28268       fi
28269       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28270     fi
28271   fi
28272 
28273   # Now join together the path and the arguments once again
28274   if test "x$arguments" != xEOL; then
28275     new_complete="$new_path ${arguments% *}"
28276   else
28277     new_complete="$new_path"
28278   fi
28279 
28280   if test "x$complete" != "x$new_complete"; then
28281     PROPER_COMPILER_CC="$new_complete"
28282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28283 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28284   fi
28285 
28286     PATH="$RETRY_COMPILER_SAVED_PATH"
28287 
28288     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28289 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28290 
28291   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28292     # Follow a chain of symbolic links. Use readlink
28293     # where it exists, else fall back to horribly
28294     # complicated shell code.
28295     if test "x$READLINK_TESTED" != yes; then
28296       # On MacOSX there is a readlink tool with a different
28297       # purpose than the GNU readlink tool. Check the found readlink.
28298       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28299       if test "x$ISGNU" = x; then
28300         # A readlink that we do not know how to use.
28301         # Are there other non-GNU readlinks out there?
28302         READLINK_TESTED=yes
28303         READLINK=
28304       fi
28305     fi
28306 
28307     if test "x$READLINK" != x; then
28308       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28309     else
28310       # Save the current directory for restoring afterwards
28311       STARTDIR=$PWD
28312       COUNTER=0
28313       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28314       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28315       cd $sym_link_dir
28316       # Use -P flag to resolve symlinks in directories.
28317       cd `$THEPWDCMD -P`
28318       sym_link_dir=`$THEPWDCMD -P`
28319       # Resolve file symlinks
28320       while test $COUNTER -lt 20; do
28321         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28322         if test "x$ISLINK" == x; then
28323           # This is not a symbolic link! We are done!
28324           break
28325         fi
28326         # Again resolve directory symlinks since the target of the just found
28327         # link could be in a different directory
28328         cd `$DIRNAME $ISLINK`
28329         sym_link_dir=`$THEPWDCMD -P`
28330         sym_link_file=`$BASENAME $ISLINK`
28331         let COUNTER=COUNTER+1
28332       done
28333       cd $STARTDIR
28334       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28335     fi
28336   fi
28337 
28338     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28339 $as_echo "$PROPER_COMPILER_CC" >&6; }
28340     CC="$PROPER_COMPILER_CC"
28341   else
28342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28343 $as_echo "no, keeping CC" >&6; }
28344   fi
28345 
28346 
28347   COMPILER=$CC
28348   COMPILER_NAME=$COMPILER_NAME
28349 
28350   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28351     # cc -V output typically looks like
28352     #     cc: Sun C 5.12 Linux_i386 2011/11/16
28353     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28354     # Check that this is likely to be the Solaris Studio cc.
28355     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28356     if test $? -ne 0; then
28357       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28358       { $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
28359 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28360       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28361 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28362       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28363 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28364       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28365     fi
28366     # Remove usage instructions (if present), and
28367     # collapse compiler output into a single line
28368     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28369         $SED -e 's/ *[Uu]sage:.*//'`
28370     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28371         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28372   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28373     # xlc -qversion output typically looks like
28374     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28375     #     Version: 11.01.0000.0015
28376     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28377     # Check that this is likely to be the IBM XL C compiler.
28378     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28379     if test $? -ne 0; then
28380       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28381       { $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
28382 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28383       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28384 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28385       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28386 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28387       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28388     fi
28389     # Collapse compiler output into a single line
28390     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28391     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28392         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28393   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28394     # There is no specific version flag, but all output starts with a version string.
28395     # First line typically looks something like:
28396     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28397     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28398     # Check that this is likely to be Microsoft CL.EXE.
28399     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28400     if test $? -ne 0; then
28401       { $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
28402 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28403       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28404 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28405       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28406     fi
28407     # Collapse compiler output into a single line
28408     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28409     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28410         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28411   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28412     # gcc --version output typically looks like
28413     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28414     #     Copyright (C) 2013 Free Software Foundation, Inc.
28415     #     This is free software; see the source for copying conditions.  There is NO
28416     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28417     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28418     # Check that this is likely to be GCC.
28419     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28420     if test $? -ne 0; then
28421       { $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
28422 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28423       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28424 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28425       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28426     fi
28427     # Remove Copyright and legalese from version string, and
28428     # collapse into a single line
28429     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28430         $SED -e 's/ *Copyright .*//'`
28431     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28432         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28433   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28434     # clang --version output typically looks like
28435     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28436     #    clang version 3.3 (tags/RELEASE_33/final)
28437     # or
28438     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28439     #    Target: x86_64-pc-linux-gnu
28440     #    Thread model: posix
28441     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28442     # Check that this is likely to be clang
28443     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28444     if test $? -ne 0; then
28445       { $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
28446 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28447       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28448 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28449       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28450     fi
28451     # Collapse compiler output into a single line
28452     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28453     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28454         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28455   else
28456       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28457   fi
28458   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28459   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28460   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28461   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28462 
28463   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28464 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28465 
28466 
28467   # Now that we have resolved CC ourself, let autoconf have its go at it
28468   ac_ext=c
28469 ac_cpp='$CPP $CPPFLAGS'
28470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28473 if test -n "$ac_tool_prefix"; then
28474   for ac_prog in $CC
28475   do
28476     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28477 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28479 $as_echo_n "checking for $ac_word... " >&6; }
28480 if ${ac_cv_prog_CC+:} false; then :
28481   $as_echo_n "(cached) " >&6
28482 else
28483   if test -n "$CC"; then
28484   ac_cv_prog_CC="$CC" # Let the user override the test.
28485 else
28486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28487 for as_dir in $PATH
28488 do
28489   IFS=$as_save_IFS
28490   test -z "$as_dir" && as_dir=.
28491     for ac_exec_ext in '' $ac_executable_extensions; do
28492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28493     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28495     break 2
28496   fi
28497 done
28498   done
28499 IFS=$as_save_IFS
28500 
28501 fi
28502 fi
28503 CC=$ac_cv_prog_CC
28504 if test -n "$CC"; then
28505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28506 $as_echo "$CC" >&6; }
28507 else
28508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28509 $as_echo "no" >&6; }
28510 fi
28511 
28512 
28513     test -n "$CC" && break
28514   done
28515 fi
28516 if test -z "$CC"; then
28517   ac_ct_CC=$CC
28518   for ac_prog in $CC
28519 do
28520   # Extract the first word of "$ac_prog", so it can be a program name with args.
28521 set dummy $ac_prog; ac_word=$2
28522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28523 $as_echo_n "checking for $ac_word... " >&6; }
28524 if ${ac_cv_prog_ac_ct_CC+:} false; then :
28525   $as_echo_n "(cached) " >&6
28526 else
28527   if test -n "$ac_ct_CC"; then
28528   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28529 else
28530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28531 for as_dir in $PATH
28532 do
28533   IFS=$as_save_IFS
28534   test -z "$as_dir" && as_dir=.
28535     for ac_exec_ext in '' $ac_executable_extensions; do
28536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28537     ac_cv_prog_ac_ct_CC="$ac_prog"
28538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28539     break 2
28540   fi
28541 done
28542   done
28543 IFS=$as_save_IFS
28544 
28545 fi
28546 fi
28547 ac_ct_CC=$ac_cv_prog_ac_ct_CC
28548 if test -n "$ac_ct_CC"; then
28549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28550 $as_echo "$ac_ct_CC" >&6; }
28551 else
28552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28553 $as_echo "no" >&6; }
28554 fi
28555 
28556 
28557   test -n "$ac_ct_CC" && break
28558 done
28559 
28560   if test "x$ac_ct_CC" = x; then
28561     CC=""
28562   else
28563     case $cross_compiling:$ac_tool_warned in
28564 yes:)
28565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28566 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28567 ac_tool_warned=yes ;;
28568 esac
28569     CC=$ac_ct_CC
28570   fi
28571 fi
28572 
28573 
28574 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28575 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28576 as_fn_error $? "no acceptable C compiler found in \$PATH
28577 See \`config.log' for more details" "$LINENO" 5; }
28578 
28579 # Provide some information about the compiler.
28580 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28581 set X $ac_compile
28582 ac_compiler=$2
28583 for ac_option in --version -v -V -qversion; do
28584   { { ac_try="$ac_compiler $ac_option >&5"
28585 case "(($ac_try" in
28586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28587   *) ac_try_echo=$ac_try;;
28588 esac
28589 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28590 $as_echo "$ac_try_echo"; } >&5
28591   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28592   ac_status=$?
28593   if test -s conftest.err; then
28594     sed '10a\
28595 ... rest of stderr output deleted ...
28596          10q' conftest.err >conftest.er1
28597     cat conftest.er1 >&5
28598   fi
28599   rm -f conftest.er1 conftest.err
28600   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28601   test $ac_status = 0; }
28602 done
28603 
28604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28605 /* end confdefs.h.  */
28606 
28607 int
28608 main ()
28609 {
28610 
28611   ;
28612   return 0;
28613 }
28614 _ACEOF
28615 ac_clean_files_save=$ac_clean_files
28616 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28617 # Try to create an executable without -o first, disregard a.out.
28618 # It will help us diagnose broken compilers, and finding out an intuition
28619 # of exeext.
28620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28621 $as_echo_n "checking whether the C compiler works... " >&6; }
28622 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28623 
28624 # The possible output files:
28625 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28626 
28627 ac_rmfiles=
28628 for ac_file in $ac_files
28629 do
28630   case $ac_file in
28631     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28632     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28633   esac
28634 done
28635 rm -f $ac_rmfiles
28636 
28637 if { { ac_try="$ac_link_default"
28638 case "(($ac_try" in
28639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28640   *) ac_try_echo=$ac_try;;
28641 esac
28642 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28643 $as_echo "$ac_try_echo"; } >&5
28644   (eval "$ac_link_default") 2>&5
28645   ac_status=$?
28646   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28647   test $ac_status = 0; }; then :
28648   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28649 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28650 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
28651 # so that the user can short-circuit this test for compilers unknown to
28652 # Autoconf.
28653 for ac_file in $ac_files ''
28654 do
28655   test -f "$ac_file" || continue
28656   case $ac_file in
28657     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28658         ;;
28659     [ab].out )
28660         # We found the default executable, but exeext='' is most
28661         # certainly right.
28662         break;;
28663     *.* )
28664         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28665         then :; else
28666            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28667         fi
28668         # We set ac_cv_exeext here because the later test for it is not
28669         # safe: cross compilers may not add the suffix if given an `-o'
28670         # argument, so we may need to know it at that point already.
28671         # Even if this section looks crufty: it has the advantage of
28672         # actually working.
28673         break;;
28674     * )
28675         break;;
28676   esac
28677 done
28678 test "$ac_cv_exeext" = no && ac_cv_exeext=
28679 
28680 else
28681   ac_file=''
28682 fi
28683 if test -z "$ac_file"; then :
28684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28685 $as_echo "no" >&6; }
28686 $as_echo "$as_me: failed program was:" >&5
28687 sed 's/^/| /' conftest.$ac_ext >&5
28688 
28689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28690 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28691 as_fn_error 77 "C compiler cannot create executables
28692 See \`config.log' for more details" "$LINENO" 5; }
28693 else
28694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28695 $as_echo "yes" >&6; }
28696 fi
28697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28698 $as_echo_n "checking for C compiler default output file name... " >&6; }
28699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28700 $as_echo "$ac_file" >&6; }
28701 ac_exeext=$ac_cv_exeext
28702 
28703 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28704 ac_clean_files=$ac_clean_files_save
28705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28706 $as_echo_n "checking for suffix of executables... " >&6; }
28707 if { { ac_try="$ac_link"
28708 case "(($ac_try" in
28709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28710   *) ac_try_echo=$ac_try;;
28711 esac
28712 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28713 $as_echo "$ac_try_echo"; } >&5
28714   (eval "$ac_link") 2>&5
28715   ac_status=$?
28716   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28717   test $ac_status = 0; }; then :
28718   # If both `conftest.exe' and `conftest' are `present' (well, observable)
28719 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28720 # work properly (i.e., refer to `conftest.exe'), while it won't with
28721 # `rm'.
28722 for ac_file in conftest.exe conftest conftest.*; do
28723   test -f "$ac_file" || continue
28724   case $ac_file in
28725     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28726     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28727           break;;
28728     * ) break;;
28729   esac
28730 done
28731 else
28732   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28733 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28734 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28735 See \`config.log' for more details" "$LINENO" 5; }
28736 fi
28737 rm -f conftest conftest$ac_cv_exeext
28738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28739 $as_echo "$ac_cv_exeext" >&6; }
28740 
28741 rm -f conftest.$ac_ext
28742 EXEEXT=$ac_cv_exeext
28743 ac_exeext=$EXEEXT
28744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28745 /* end confdefs.h.  */
28746 #include <stdio.h>
28747 int
28748 main ()
28749 {
28750 FILE *f = fopen ("conftest.out", "w");
28751  return ferror (f) || fclose (f) != 0;
28752 
28753   ;
28754   return 0;
28755 }
28756 _ACEOF
28757 ac_clean_files="$ac_clean_files conftest.out"
28758 # Check that the compiler produces executables we can run.  If not, either
28759 # the compiler is broken, or we cross compile.
28760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28761 $as_echo_n "checking whether we are cross compiling... " >&6; }
28762 if test "$cross_compiling" != yes; then
28763   { { ac_try="$ac_link"
28764 case "(($ac_try" in
28765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28766   *) ac_try_echo=$ac_try;;
28767 esac
28768 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28769 $as_echo "$ac_try_echo"; } >&5
28770   (eval "$ac_link") 2>&5
28771   ac_status=$?
28772   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28773   test $ac_status = 0; }
28774   if { ac_try='./conftest$ac_cv_exeext'
28775   { { case "(($ac_try" in
28776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28777   *) ac_try_echo=$ac_try;;
28778 esac
28779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28780 $as_echo "$ac_try_echo"; } >&5
28781   (eval "$ac_try") 2>&5
28782   ac_status=$?
28783   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28784   test $ac_status = 0; }; }; then
28785     cross_compiling=no
28786   else
28787     if test "$cross_compiling" = maybe; then
28788         cross_compiling=yes
28789     else
28790         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28791 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28792 as_fn_error $? "cannot run C compiled programs.
28793 If you meant to cross compile, use \`--host'.
28794 See \`config.log' for more details" "$LINENO" 5; }
28795     fi
28796   fi
28797 fi
28798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28799 $as_echo "$cross_compiling" >&6; }
28800 
28801 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28802 ac_clean_files=$ac_clean_files_save
28803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28804 $as_echo_n "checking for suffix of object files... " >&6; }
28805 if ${ac_cv_objext+:} false; then :
28806   $as_echo_n "(cached) " >&6
28807 else
28808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28809 /* end confdefs.h.  */
28810 
28811 int
28812 main ()
28813 {
28814 
28815   ;
28816   return 0;
28817 }
28818 _ACEOF
28819 rm -f conftest.o conftest.obj
28820 if { { ac_try="$ac_compile"
28821 case "(($ac_try" in
28822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28823   *) ac_try_echo=$ac_try;;
28824 esac
28825 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28826 $as_echo "$ac_try_echo"; } >&5
28827   (eval "$ac_compile") 2>&5
28828   ac_status=$?
28829   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28830   test $ac_status = 0; }; then :
28831   for ac_file in conftest.o conftest.obj conftest.*; do
28832   test -f "$ac_file" || continue;
28833   case $ac_file in
28834     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28835     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28836        break;;
28837   esac
28838 done
28839 else
28840   $as_echo "$as_me: failed program was:" >&5
28841 sed 's/^/| /' conftest.$ac_ext >&5
28842 
28843 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28844 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28845 as_fn_error $? "cannot compute suffix of object files: cannot compile
28846 See \`config.log' for more details" "$LINENO" 5; }
28847 fi
28848 rm -f conftest.$ac_cv_objext conftest.$ac_ext
28849 fi
28850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28851 $as_echo "$ac_cv_objext" >&6; }
28852 OBJEXT=$ac_cv_objext
28853 ac_objext=$OBJEXT
28854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28855 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28856 if ${ac_cv_c_compiler_gnu+:} false; then :
28857   $as_echo_n "(cached) " >&6
28858 else
28859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28860 /* end confdefs.h.  */
28861 
28862 int
28863 main ()
28864 {
28865 #ifndef __GNUC__
28866        choke me
28867 #endif
28868 
28869   ;
28870   return 0;
28871 }
28872 _ACEOF
28873 if ac_fn_c_try_compile "$LINENO"; then :
28874   ac_compiler_gnu=yes
28875 else
28876   ac_compiler_gnu=no
28877 fi
28878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28879 ac_cv_c_compiler_gnu=$ac_compiler_gnu
28880 
28881 fi
28882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28883 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
28884 if test $ac_compiler_gnu = yes; then
28885   GCC=yes
28886 else
28887   GCC=
28888 fi
28889 ac_test_CFLAGS=${CFLAGS+set}
28890 ac_save_CFLAGS=$CFLAGS
28891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28892 $as_echo_n "checking whether $CC accepts -g... " >&6; }
28893 if ${ac_cv_prog_cc_g+:} false; then :
28894   $as_echo_n "(cached) " >&6
28895 else
28896   ac_save_c_werror_flag=$ac_c_werror_flag
28897    ac_c_werror_flag=yes
28898    ac_cv_prog_cc_g=no
28899    CFLAGS="-g"
28900    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28901 /* end confdefs.h.  */
28902 
28903 int
28904 main ()
28905 {
28906 
28907   ;
28908   return 0;
28909 }
28910 _ACEOF
28911 if ac_fn_c_try_compile "$LINENO"; then :
28912   ac_cv_prog_cc_g=yes
28913 else
28914   CFLAGS=""
28915       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28916 /* end confdefs.h.  */
28917 
28918 int
28919 main ()
28920 {
28921 
28922   ;
28923   return 0;
28924 }
28925 _ACEOF
28926 if ac_fn_c_try_compile "$LINENO"; then :
28927 
28928 else
28929   ac_c_werror_flag=$ac_save_c_werror_flag
28930          CFLAGS="-g"
28931          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28932 /* end confdefs.h.  */
28933 
28934 int
28935 main ()
28936 {
28937 
28938   ;
28939   return 0;
28940 }
28941 _ACEOF
28942 if ac_fn_c_try_compile "$LINENO"; then :
28943   ac_cv_prog_cc_g=yes
28944 fi
28945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28946 fi
28947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28948 fi
28949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28950    ac_c_werror_flag=$ac_save_c_werror_flag
28951 fi
28952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28953 $as_echo "$ac_cv_prog_cc_g" >&6; }
28954 if test "$ac_test_CFLAGS" = set; then
28955   CFLAGS=$ac_save_CFLAGS
28956 elif test $ac_cv_prog_cc_g = yes; then
28957   if test "$GCC" = yes; then
28958     CFLAGS="-g -O2"
28959   else
28960     CFLAGS="-g"
28961   fi
28962 else
28963   if test "$GCC" = yes; then
28964     CFLAGS="-O2"
28965   else
28966     CFLAGS=
28967   fi
28968 fi
28969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
28970 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
28971 if ${ac_cv_prog_cc_c89+:} false; then :
28972   $as_echo_n "(cached) " >&6
28973 else
28974   ac_cv_prog_cc_c89=no
28975 ac_save_CC=$CC
28976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28977 /* end confdefs.h.  */
28978 #include <stdarg.h>
28979 #include <stdio.h>
28980 struct stat;
28981 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
28982 struct buf { int x; };
28983 FILE * (*rcsopen) (struct buf *, struct stat *, int);
28984 static char *e (p, i)
28985      char **p;
28986      int i;
28987 {
28988   return p[i];
28989 }
28990 static char *f (char * (*g) (char **, int), char **p, ...)
28991 {
28992   char *s;
28993   va_list v;
28994   va_start (v,p);
28995   s = g (p, va_arg (v,int));
28996   va_end (v);
28997   return s;
28998 }
28999 
29000 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29001    function prototypes and stuff, but not '\xHH' hex character constants.
29002    These don't provoke an error unfortunately, instead are silently treated
29003    as 'x'.  The following induces an error, until -std is added to get
29004    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29005    array size at least.  It's necessary to write '\x00'==0 to get something
29006    that's true only with -std.  */
29007 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29008 
29009 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29010    inside strings and character constants.  */
29011 #define FOO(x) 'x'
29012 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29013 
29014 int test (int i, double x);
29015 struct s1 {int (*f) (int a);};
29016 struct s2 {int (*f) (double a);};
29017 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29018 int argc;
29019 char **argv;
29020 int
29021 main ()
29022 {
29023 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29024   ;
29025   return 0;
29026 }
29027 _ACEOF
29028 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29029         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29030 do
29031   CC="$ac_save_CC $ac_arg"
29032   if ac_fn_c_try_compile "$LINENO"; then :
29033   ac_cv_prog_cc_c89=$ac_arg
29034 fi
29035 rm -f core conftest.err conftest.$ac_objext
29036   test "x$ac_cv_prog_cc_c89" != "xno" && break
29037 done
29038 rm -f conftest.$ac_ext
29039 CC=$ac_save_CC
29040 
29041 fi
29042 # AC_CACHE_VAL
29043 case "x$ac_cv_prog_cc_c89" in
29044   x)
29045     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29046 $as_echo "none needed" >&6; } ;;
29047   xno)
29048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29049 $as_echo "unsupported" >&6; } ;;
29050   *)
29051     CC="$CC $ac_cv_prog_cc_c89"
29052     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29053 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29054 esac
29055 if test "x$ac_cv_prog_cc_c89" != xno; then :
29056 
29057 fi
29058 
29059 ac_ext=cpp
29060 ac_cpp='$CXXCPP $CPPFLAGS'
29061 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29062 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29063 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29064 
29065 
29066 
29067   COMPILER_NAME=C++
29068   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29069 
29070   if test "x$CXX" != x; then
29071     # User has supplied compiler name already, always let that override.
29072     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29073 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29074     if test "x`basename $CXX`" = "x$CXX"; then
29075       # A command without a complete path is provided, search $PATH.
29076 
29077       for ac_prog in $CXX
29078 do
29079   # Extract the first word of "$ac_prog", so it can be a program name with args.
29080 set dummy $ac_prog; ac_word=$2
29081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29082 $as_echo_n "checking for $ac_word... " >&6; }
29083 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29084   $as_echo_n "(cached) " >&6
29085 else
29086   case $POTENTIAL_CXX in
29087   [\\/]* | ?:[\\/]*)
29088   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29089   ;;
29090   *)
29091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29092 for as_dir in $PATH
29093 do
29094   IFS=$as_save_IFS
29095   test -z "$as_dir" && as_dir=.
29096     for ac_exec_ext in '' $ac_executable_extensions; do
29097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29098     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29100     break 2
29101   fi
29102 done
29103   done
29104 IFS=$as_save_IFS
29105 
29106   ;;
29107 esac
29108 fi
29109 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29110 if test -n "$POTENTIAL_CXX"; then
29111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29112 $as_echo "$POTENTIAL_CXX" >&6; }
29113 else
29114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29115 $as_echo "no" >&6; }
29116 fi
29117 
29118 
29119   test -n "$POTENTIAL_CXX" && break
29120 done
29121 
29122       if test "x$POTENTIAL_CXX" != x; then
29123         CXX=$POTENTIAL_CXX
29124       else
29125         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29126       fi
29127     else
29128       # Otherwise it might already be a complete path
29129       if test ! -x "$CXX"; then
29130         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29131       fi
29132     fi
29133   else
29134     # No user supplied value. Locate compiler ourselves.
29135 
29136     # If we are cross compiling, assume cross compilation tools follows the
29137     # cross compilation standard where they are prefixed with the autoconf
29138     # standard name for the target. For example the binary
29139     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29140     # If we are not cross compiling, then the default compiler name will be
29141     # used.
29142 
29143     CXX=
29144     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29145     # before checking the rest of the PATH.
29146     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29147     # step, this should not be necessary.
29148     if test -n "$TOOLCHAIN_PATH"; then
29149       PATH_save="$PATH"
29150       PATH="$TOOLCHAIN_PATH"
29151       for ac_prog in $SEARCH_LIST
29152 do
29153   # Extract the first word of "$ac_prog", so it can be a program name with args.
29154 set dummy $ac_prog; ac_word=$2
29155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29156 $as_echo_n "checking for $ac_word... " >&6; }
29157 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29158   $as_echo_n "(cached) " >&6
29159 else
29160   case $TOOLCHAIN_PATH_CXX in
29161   [\\/]* | ?:[\\/]*)
29162   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29163   ;;
29164   *)
29165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29166 for as_dir in $PATH
29167 do
29168   IFS=$as_save_IFS
29169   test -z "$as_dir" && as_dir=.
29170     for ac_exec_ext in '' $ac_executable_extensions; do
29171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29172     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29174     break 2
29175   fi
29176 done
29177   done
29178 IFS=$as_save_IFS
29179 
29180   ;;
29181 esac
29182 fi
29183 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29184 if test -n "$TOOLCHAIN_PATH_CXX"; then
29185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29186 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29187 else
29188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29189 $as_echo "no" >&6; }
29190 fi
29191 
29192 
29193   test -n "$TOOLCHAIN_PATH_CXX" && break
29194 done
29195 
29196       CXX=$TOOLCHAIN_PATH_CXX
29197       PATH="$PATH_save"
29198     fi
29199 
29200     # AC_PATH_PROGS can't be run multiple times with the same variable,
29201     # so create a new name for this run.
29202     if test "x$CXX" = x; then
29203       for ac_prog in $SEARCH_LIST
29204 do
29205   # Extract the first word of "$ac_prog", so it can be a program name with args.
29206 set dummy $ac_prog; ac_word=$2
29207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29208 $as_echo_n "checking for $ac_word... " >&6; }
29209 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29210   $as_echo_n "(cached) " >&6
29211 else
29212   case $POTENTIAL_CXX in
29213   [\\/]* | ?:[\\/]*)
29214   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29215   ;;
29216   *)
29217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29218 for as_dir in $PATH
29219 do
29220   IFS=$as_save_IFS
29221   test -z "$as_dir" && as_dir=.
29222     for ac_exec_ext in '' $ac_executable_extensions; do
29223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29224     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29226     break 2
29227   fi
29228 done
29229   done
29230 IFS=$as_save_IFS
29231 
29232   ;;
29233 esac
29234 fi
29235 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29236 if test -n "$POTENTIAL_CXX"; then
29237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29238 $as_echo "$POTENTIAL_CXX" >&6; }
29239 else
29240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29241 $as_echo "no" >&6; }
29242 fi
29243 
29244 
29245   test -n "$POTENTIAL_CXX" && break
29246 done
29247 
29248       CXX=$POTENTIAL_CXX
29249     fi
29250 
29251     if test "x$CXX" = x; then
29252 
29253   # Print a helpful message on how to acquire the necessary build dependency.
29254   # devkit is the help tag: freetype, cups, pulse, alsa etc
29255   MISSING_DEPENDENCY=devkit
29256 
29257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29258     cygwin_help $MISSING_DEPENDENCY
29259   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29260     msys_help $MISSING_DEPENDENCY
29261   else
29262     PKGHANDLER_COMMAND=
29263 
29264     case $PKGHANDLER in
29265       apt-get)
29266         apt_help     $MISSING_DEPENDENCY ;;
29267       yum)
29268         yum_help     $MISSING_DEPENDENCY ;;
29269       port)
29270         port_help    $MISSING_DEPENDENCY ;;
29271       pkgutil)
29272         pkgutil_help $MISSING_DEPENDENCY ;;
29273       pkgadd)
29274         pkgadd_help  $MISSING_DEPENDENCY ;;
29275     esac
29276 
29277     if test "x$PKGHANDLER_COMMAND" != x; then
29278       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29279     fi
29280   fi
29281 
29282       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29283     fi
29284   fi
29285 
29286   # Now we have a compiler binary in CXX. Make sure it's okay.
29287 
29288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29289 
29290   # First separate the path from the arguments. This will split at the first
29291   # space.
29292   complete="$CXX"
29293   path="${complete%% *}"
29294   tmp="$complete EOL"
29295   arguments="${tmp#* }"
29296 
29297   # Input might be given as Windows format, start by converting to
29298   # unix format.
29299   new_path=`$CYGPATH -u "$path"`
29300 
29301   # Now try to locate executable using which
29302   new_path=`$WHICH "$new_path" 2> /dev/null`
29303   # bat and cmd files are not always considered executable in cygwin causing which
29304   # to not find them
29305   if test "x$new_path" = x \
29306       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29307       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29308     new_path=`$CYGPATH -u "$path"`
29309   fi
29310   if test "x$new_path" = x; then
29311     # Oops. Which didn't find the executable.
29312     # The splitting of arguments from the executable at a space might have been incorrect,
29313     # since paths with space are more likely in Windows. Give it another try with the whole
29314     # argument.
29315     path="$complete"
29316     arguments="EOL"
29317     new_path=`$CYGPATH -u "$path"`
29318     new_path=`$WHICH "$new_path" 2> /dev/null`
29319     # bat and cmd files are not always considered executable in cygwin causing which
29320     # to not find them
29321     if test "x$new_path" = x \
29322         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29323         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29324       new_path=`$CYGPATH -u "$path"`
29325     fi
29326     if test "x$new_path" = x; then
29327       # It's still not found. Now this is an unrecoverable error.
29328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29329 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29330       has_space=`$ECHO "$complete" | $GREP " "`
29331       if test "x$has_space" != x; then
29332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29334       fi
29335       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29336     fi
29337   fi
29338 
29339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29342   # "foo.exe" is OK but "foo" is an error.
29343   #
29344   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29345   # It is also a way to make sure we got the proper file name for the real test later on.
29346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29347   if test "x$test_shortpath" = x; then
29348     # Short path failed, file does not exist as specified.
29349     # Try adding .exe or .cmd
29350     if test -f "${new_path}.exe"; then
29351       input_to_shortpath="${new_path}.exe"
29352     elif test -f "${new_path}.cmd"; then
29353       input_to_shortpath="${new_path}.cmd"
29354     else
29355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29356 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29357       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29358 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29359       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29360     fi
29361   else
29362     input_to_shortpath="$new_path"
29363   fi
29364 
29365   # Call helper function which possibly converts this using DOS-style short mode.
29366   # If so, the updated path is stored in $new_path.
29367   new_path="$input_to_shortpath"
29368 
29369   input_path="$input_to_shortpath"
29370   # Check if we need to convert this using DOS-style short mode. If the path
29371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29372   # take no chances and rewrite it.
29373   # Note: m4 eats our [], so we need to use [ and ] instead.
29374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29375   if test "x$has_forbidden_chars" != x; then
29376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29377     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29378     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29379     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29380       # Going to short mode and back again did indeed matter. Since short mode is
29381       # case insensitive, let's make it lowercase to improve readability.
29382       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29383       # Now convert it back to Unix-stile (cygpath)
29384       input_path=`$CYGPATH -u "$shortmode_path"`
29385       new_path="$input_path"
29386     fi
29387   fi
29388 
29389   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29390   if test "x$test_cygdrive_prefix" = x; then
29391     # As a simple fix, exclude /usr/bin since it's not a real path.
29392     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29393       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29394       # a path prefixed by /cygdrive for fixpath to work.
29395       new_path="$CYGWIN_ROOT_PATH$input_path"
29396     fi
29397   fi
29398 
29399   # remove trailing .exe if any
29400   new_path="${new_path/%.exe/}"
29401 
29402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29403 
29404   # First separate the path from the arguments. This will split at the first
29405   # space.
29406   complete="$CXX"
29407   path="${complete%% *}"
29408   tmp="$complete EOL"
29409   arguments="${tmp#* }"
29410 
29411   # Input might be given as Windows format, start by converting to
29412   # unix format.
29413   new_path="$path"
29414 
29415   windows_path="$new_path"
29416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29417     unix_path=`$CYGPATH -u "$windows_path"`
29418     new_path="$unix_path"
29419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29421     new_path="$unix_path"
29422   fi
29423 
29424 
29425   # Now try to locate executable using which
29426   new_path=`$WHICH "$new_path" 2> /dev/null`
29427 
29428   if test "x$new_path" = x; then
29429     # Oops. Which didn't find the executable.
29430     # The splitting of arguments from the executable at a space might have been incorrect,
29431     # since paths with space are more likely in Windows. Give it another try with the whole
29432     # argument.
29433     path="$complete"
29434     arguments="EOL"
29435     new_path="$path"
29436 
29437   windows_path="$new_path"
29438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29439     unix_path=`$CYGPATH -u "$windows_path"`
29440     new_path="$unix_path"
29441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29443     new_path="$unix_path"
29444   fi
29445 
29446 
29447     new_path=`$WHICH "$new_path" 2> /dev/null`
29448     # bat and cmd files are not always considered executable in MSYS causing which
29449     # to not find them
29450     if test "x$new_path" = x \
29451         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29452         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29453       new_path="$path"
29454 
29455   windows_path="$new_path"
29456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29457     unix_path=`$CYGPATH -u "$windows_path"`
29458     new_path="$unix_path"
29459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29461     new_path="$unix_path"
29462   fi
29463 
29464     fi
29465 
29466     if test "x$new_path" = x; then
29467       # It's still not found. Now this is an unrecoverable error.
29468       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29469 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29470       has_space=`$ECHO "$complete" | $GREP " "`
29471       if test "x$has_space" != x; then
29472         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29473 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29474       fi
29475       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29476     fi
29477   fi
29478 
29479   # Now new_path has a complete unix path to the binary
29480   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29481     # Keep paths in /bin as-is, but remove trailing .exe if any
29482     new_path="${new_path/%.exe/}"
29483     # Do not save /bin paths to all_fixpath_prefixes!
29484   else
29485     # Not in mixed or Windows style, start by that.
29486     new_path=`cmd //c echo $new_path`
29487 
29488   input_path="$new_path"
29489   # Check if we need to convert this using DOS-style short mode. If the path
29490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29491   # take no chances and rewrite it.
29492   # Note: m4 eats our [], so we need to use [ and ] instead.
29493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29494   if test "x$has_forbidden_chars" != x; then
29495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29496     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29497   fi
29498 
29499     # Output is in $new_path
29500 
29501   windows_path="$new_path"
29502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29503     unix_path=`$CYGPATH -u "$windows_path"`
29504     new_path="$unix_path"
29505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29507     new_path="$unix_path"
29508   fi
29509 
29510     # remove trailing .exe if any
29511     new_path="${new_path/%.exe/}"
29512 
29513     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29514     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29515   fi
29516 
29517   else
29518     # We're on a unix platform. Hooray! :)
29519     # First separate the path from the arguments. This will split at the first
29520     # space.
29521     complete="$CXX"
29522     path="${complete%% *}"
29523     tmp="$complete EOL"
29524     arguments="${tmp#* }"
29525 
29526     # Cannot rely on the command "which" here since it doesn't always work.
29527     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29528     if test -z "$is_absolute_path"; then
29529       # Path to executable is not absolute. Find it.
29530       IFS_save="$IFS"
29531       IFS=:
29532       for p in $PATH; do
29533         if test -f "$p/$path" && test -x "$p/$path"; then
29534           new_path="$p/$path"
29535           break
29536         fi
29537       done
29538       IFS="$IFS_save"
29539     else
29540       # This is an absolute path, we can use it without further modifications.
29541       new_path="$path"
29542     fi
29543 
29544     if test "x$new_path" = x; then
29545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29546 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29547       has_space=`$ECHO "$complete" | $GREP " "`
29548       if test "x$has_space" != x; then
29549         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29550 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29551       fi
29552       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29553     fi
29554   fi
29555 
29556   # Now join together the path and the arguments once again
29557   if test "x$arguments" != xEOL; then
29558     new_complete="$new_path ${arguments% *}"
29559   else
29560     new_complete="$new_path"
29561   fi
29562 
29563   if test "x$complete" != "x$new_complete"; then
29564     CXX="$new_complete"
29565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29566 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29567   fi
29568 
29569   TEST_COMPILER="$CXX"
29570   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29571   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29572   if test "x$OPENJDK_BUILD_OS" != xaix; then
29573     # FIXME: This test should not be needed anymore; we don't do that for any platform.
29574     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29575 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29576 
29577   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29578     # Follow a chain of symbolic links. Use readlink
29579     # where it exists, else fall back to horribly
29580     # complicated shell code.
29581     if test "x$READLINK_TESTED" != yes; then
29582       # On MacOSX there is a readlink tool with a different
29583       # purpose than the GNU readlink tool. Check the found readlink.
29584       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29585       if test "x$ISGNU" = x; then
29586         # A readlink that we do not know how to use.
29587         # Are there other non-GNU readlinks out there?
29588         READLINK_TESTED=yes
29589         READLINK=
29590       fi
29591     fi
29592 
29593     if test "x$READLINK" != x; then
29594       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29595     else
29596       # Save the current directory for restoring afterwards
29597       STARTDIR=$PWD
29598       COUNTER=0
29599       sym_link_dir=`$DIRNAME $TEST_COMPILER`
29600       sym_link_file=`$BASENAME $TEST_COMPILER`
29601       cd $sym_link_dir
29602       # Use -P flag to resolve symlinks in directories.
29603       cd `$THEPWDCMD -P`
29604       sym_link_dir=`$THEPWDCMD -P`
29605       # Resolve file symlinks
29606       while test $COUNTER -lt 20; do
29607         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29608         if test "x$ISLINK" == x; then
29609           # This is not a symbolic link! We are done!
29610           break
29611         fi
29612         # Again resolve directory symlinks since the target of the just found
29613         # link could be in a different directory
29614         cd `$DIRNAME $ISLINK`
29615         sym_link_dir=`$THEPWDCMD -P`
29616         sym_link_file=`$BASENAME $ISLINK`
29617         let COUNTER=COUNTER+1
29618       done
29619       cd $STARTDIR
29620       TEST_COMPILER=$sym_link_dir/$sym_link_file
29621     fi
29622   fi
29623 
29624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29625 $as_echo "$TEST_COMPILER" >&6; }
29626   fi
29627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29628 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
29629 
29630   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29631   if test "x$COMPILER_BASENAME" = "xccache"; then
29632     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29633 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29634     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29635     # We want to control ccache invocation ourselves, so ignore this cc and try
29636     # searching again.
29637 
29638     # Remove the path to the fake ccache cc from the PATH
29639     RETRY_COMPILER_SAVED_PATH="$PATH"
29640     COMPILER_DIRNAME=`$DIRNAME $CXX`
29641     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29642 
29643     # Try again looking for our compiler
29644     if test -n "$ac_tool_prefix"; then
29645   for ac_prog in $TOOLCHAIN_CXX_BINARY
29646   do
29647     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29648 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29650 $as_echo_n "checking for $ac_word... " >&6; }
29651 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29652   $as_echo_n "(cached) " >&6
29653 else
29654   if test -n "$PROPER_COMPILER_CXX"; then
29655   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29656 else
29657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29658 for as_dir in $PATH
29659 do
29660   IFS=$as_save_IFS
29661   test -z "$as_dir" && as_dir=.
29662     for ac_exec_ext in '' $ac_executable_extensions; do
29663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29664     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29666     break 2
29667   fi
29668 done
29669   done
29670 IFS=$as_save_IFS
29671 
29672 fi
29673 fi
29674 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29675 if test -n "$PROPER_COMPILER_CXX"; then
29676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29677 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29678 else
29679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29680 $as_echo "no" >&6; }
29681 fi
29682 
29683 
29684     test -n "$PROPER_COMPILER_CXX" && break
29685   done
29686 fi
29687 if test -z "$PROPER_COMPILER_CXX"; then
29688   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29689   for ac_prog in $TOOLCHAIN_CXX_BINARY
29690 do
29691   # Extract the first word of "$ac_prog", so it can be a program name with args.
29692 set dummy $ac_prog; ac_word=$2
29693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29694 $as_echo_n "checking for $ac_word... " >&6; }
29695 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29696   $as_echo_n "(cached) " >&6
29697 else
29698   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29699   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29700 else
29701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29702 for as_dir in $PATH
29703 do
29704   IFS=$as_save_IFS
29705   test -z "$as_dir" && as_dir=.
29706     for ac_exec_ext in '' $ac_executable_extensions; do
29707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29708     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29710     break 2
29711   fi
29712 done
29713   done
29714 IFS=$as_save_IFS
29715 
29716 fi
29717 fi
29718 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29719 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29721 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29722 else
29723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29724 $as_echo "no" >&6; }
29725 fi
29726 
29727 
29728   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29729 done
29730 
29731   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29732     PROPER_COMPILER_CXX=""
29733   else
29734     case $cross_compiling:$ac_tool_warned in
29735 yes:)
29736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29737 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29738 ac_tool_warned=yes ;;
29739 esac
29740     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29741   fi
29742 fi
29743 
29744 
29745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29746 
29747   # First separate the path from the arguments. This will split at the first
29748   # space.
29749   complete="$PROPER_COMPILER_CXX"
29750   path="${complete%% *}"
29751   tmp="$complete EOL"
29752   arguments="${tmp#* }"
29753 
29754   # Input might be given as Windows format, start by converting to
29755   # unix format.
29756   new_path=`$CYGPATH -u "$path"`
29757 
29758   # Now try to locate executable using which
29759   new_path=`$WHICH "$new_path" 2> /dev/null`
29760   # bat and cmd files are not always considered executable in cygwin causing which
29761   # to not find them
29762   if test "x$new_path" = x \
29763       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29764       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29765     new_path=`$CYGPATH -u "$path"`
29766   fi
29767   if test "x$new_path" = x; then
29768     # Oops. Which didn't find the executable.
29769     # The splitting of arguments from the executable at a space might have been incorrect,
29770     # since paths with space are more likely in Windows. Give it another try with the whole
29771     # argument.
29772     path="$complete"
29773     arguments="EOL"
29774     new_path=`$CYGPATH -u "$path"`
29775     new_path=`$WHICH "$new_path" 2> /dev/null`
29776     # bat and cmd files are not always considered executable in cygwin causing which
29777     # to not find them
29778     if test "x$new_path" = x \
29779         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29780         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29781       new_path=`$CYGPATH -u "$path"`
29782     fi
29783     if test "x$new_path" = x; then
29784       # It's still not found. Now this is an unrecoverable error.
29785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29786 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29787       has_space=`$ECHO "$complete" | $GREP " "`
29788       if test "x$has_space" != x; then
29789         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29791       fi
29792       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29793     fi
29794   fi
29795 
29796   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29797   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29798   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29799   # "foo.exe" is OK but "foo" is an error.
29800   #
29801   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29802   # It is also a way to make sure we got the proper file name for the real test later on.
29803   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29804   if test "x$test_shortpath" = x; then
29805     # Short path failed, file does not exist as specified.
29806     # Try adding .exe or .cmd
29807     if test -f "${new_path}.exe"; then
29808       input_to_shortpath="${new_path}.exe"
29809     elif test -f "${new_path}.cmd"; then
29810       input_to_shortpath="${new_path}.cmd"
29811     else
29812       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29813 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29814       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29815 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29816       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29817     fi
29818   else
29819     input_to_shortpath="$new_path"
29820   fi
29821 
29822   # Call helper function which possibly converts this using DOS-style short mode.
29823   # If so, the updated path is stored in $new_path.
29824   new_path="$input_to_shortpath"
29825 
29826   input_path="$input_to_shortpath"
29827   # Check if we need to convert this using DOS-style short mode. If the path
29828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29829   # take no chances and rewrite it.
29830   # Note: m4 eats our [], so we need to use [ and ] instead.
29831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29832   if test "x$has_forbidden_chars" != x; then
29833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29834     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29835     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29836     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29837       # Going to short mode and back again did indeed matter. Since short mode is
29838       # case insensitive, let's make it lowercase to improve readability.
29839       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29840       # Now convert it back to Unix-stile (cygpath)
29841       input_path=`$CYGPATH -u "$shortmode_path"`
29842       new_path="$input_path"
29843     fi
29844   fi
29845 
29846   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29847   if test "x$test_cygdrive_prefix" = x; then
29848     # As a simple fix, exclude /usr/bin since it's not a real path.
29849     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29850       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29851       # a path prefixed by /cygdrive for fixpath to work.
29852       new_path="$CYGWIN_ROOT_PATH$input_path"
29853     fi
29854   fi
29855 
29856   # remove trailing .exe if any
29857   new_path="${new_path/%.exe/}"
29858 
29859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29860 
29861   # First separate the path from the arguments. This will split at the first
29862   # space.
29863   complete="$PROPER_COMPILER_CXX"
29864   path="${complete%% *}"
29865   tmp="$complete EOL"
29866   arguments="${tmp#* }"
29867 
29868   # Input might be given as Windows format, start by converting to
29869   # unix format.
29870   new_path="$path"
29871 
29872   windows_path="$new_path"
29873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29874     unix_path=`$CYGPATH -u "$windows_path"`
29875     new_path="$unix_path"
29876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29878     new_path="$unix_path"
29879   fi
29880 
29881 
29882   # Now try to locate executable using which
29883   new_path=`$WHICH "$new_path" 2> /dev/null`
29884 
29885   if test "x$new_path" = x; then
29886     # Oops. Which didn't find the executable.
29887     # The splitting of arguments from the executable at a space might have been incorrect,
29888     # since paths with space are more likely in Windows. Give it another try with the whole
29889     # argument.
29890     path="$complete"
29891     arguments="EOL"
29892     new_path="$path"
29893 
29894   windows_path="$new_path"
29895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29896     unix_path=`$CYGPATH -u "$windows_path"`
29897     new_path="$unix_path"
29898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29900     new_path="$unix_path"
29901   fi
29902 
29903 
29904     new_path=`$WHICH "$new_path" 2> /dev/null`
29905     # bat and cmd files are not always considered executable in MSYS causing which
29906     # to not find them
29907     if test "x$new_path" = x \
29908         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29909         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29910       new_path="$path"
29911 
29912   windows_path="$new_path"
29913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29914     unix_path=`$CYGPATH -u "$windows_path"`
29915     new_path="$unix_path"
29916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29918     new_path="$unix_path"
29919   fi
29920 
29921     fi
29922 
29923     if test "x$new_path" = x; then
29924       # It's still not found. Now this is an unrecoverable error.
29925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29926 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29927       has_space=`$ECHO "$complete" | $GREP " "`
29928       if test "x$has_space" != x; then
29929         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29930 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29931       fi
29932       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29933     fi
29934   fi
29935 
29936   # Now new_path has a complete unix path to the binary
29937   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29938     # Keep paths in /bin as-is, but remove trailing .exe if any
29939     new_path="${new_path/%.exe/}"
29940     # Do not save /bin paths to all_fixpath_prefixes!
29941   else
29942     # Not in mixed or Windows style, start by that.
29943     new_path=`cmd //c echo $new_path`
29944 
29945   input_path="$new_path"
29946   # Check if we need to convert this using DOS-style short mode. If the path
29947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29948   # take no chances and rewrite it.
29949   # Note: m4 eats our [], so we need to use [ and ] instead.
29950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29951   if test "x$has_forbidden_chars" != x; then
29952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29954   fi
29955 
29956     # Output is in $new_path
29957 
29958   windows_path="$new_path"
29959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29960     unix_path=`$CYGPATH -u "$windows_path"`
29961     new_path="$unix_path"
29962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29964     new_path="$unix_path"
29965   fi
29966 
29967     # remove trailing .exe if any
29968     new_path="${new_path/%.exe/}"
29969 
29970     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29971     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29972   fi
29973 
29974   else
29975     # We're on a unix platform. Hooray! :)
29976     # First separate the path from the arguments. This will split at the first
29977     # space.
29978     complete="$PROPER_COMPILER_CXX"
29979     path="${complete%% *}"
29980     tmp="$complete EOL"
29981     arguments="${tmp#* }"
29982 
29983     # Cannot rely on the command "which" here since it doesn't always work.
29984     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29985     if test -z "$is_absolute_path"; then
29986       # Path to executable is not absolute. Find it.
29987       IFS_save="$IFS"
29988       IFS=:
29989       for p in $PATH; do
29990         if test -f "$p/$path" && test -x "$p/$path"; then
29991           new_path="$p/$path"
29992           break
29993         fi
29994       done
29995       IFS="$IFS_save"
29996     else
29997       # This is an absolute path, we can use it without further modifications.
29998       new_path="$path"
29999     fi
30000 
30001     if test "x$new_path" = x; then
30002       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30003 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30004       has_space=`$ECHO "$complete" | $GREP " "`
30005       if test "x$has_space" != x; then
30006         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30007 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30008       fi
30009       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30010     fi
30011   fi
30012 
30013   # Now join together the path and the arguments once again
30014   if test "x$arguments" != xEOL; then
30015     new_complete="$new_path ${arguments% *}"
30016   else
30017     new_complete="$new_path"
30018   fi
30019 
30020   if test "x$complete" != "x$new_complete"; then
30021     PROPER_COMPILER_CXX="$new_complete"
30022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30023 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30024   fi
30025 
30026     PATH="$RETRY_COMPILER_SAVED_PATH"
30027 
30028     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30029 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30030 
30031   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30032     # Follow a chain of symbolic links. Use readlink
30033     # where it exists, else fall back to horribly
30034     # complicated shell code.
30035     if test "x$READLINK_TESTED" != yes; then
30036       # On MacOSX there is a readlink tool with a different
30037       # purpose than the GNU readlink tool. Check the found readlink.
30038       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30039       if test "x$ISGNU" = x; then
30040         # A readlink that we do not know how to use.
30041         # Are there other non-GNU readlinks out there?
30042         READLINK_TESTED=yes
30043         READLINK=
30044       fi
30045     fi
30046 
30047     if test "x$READLINK" != x; then
30048       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30049     else
30050       # Save the current directory for restoring afterwards
30051       STARTDIR=$PWD
30052       COUNTER=0
30053       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30054       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30055       cd $sym_link_dir
30056       # Use -P flag to resolve symlinks in directories.
30057       cd `$THEPWDCMD -P`
30058       sym_link_dir=`$THEPWDCMD -P`
30059       # Resolve file symlinks
30060       while test $COUNTER -lt 20; do
30061         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30062         if test "x$ISLINK" == x; then
30063           # This is not a symbolic link! We are done!
30064           break
30065         fi
30066         # Again resolve directory symlinks since the target of the just found
30067         # link could be in a different directory
30068         cd `$DIRNAME $ISLINK`
30069         sym_link_dir=`$THEPWDCMD -P`
30070         sym_link_file=`$BASENAME $ISLINK`
30071         let COUNTER=COUNTER+1
30072       done
30073       cd $STARTDIR
30074       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30075     fi
30076   fi
30077 
30078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30079 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30080     CXX="$PROPER_COMPILER_CXX"
30081   else
30082     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30083 $as_echo "no, keeping CXX" >&6; }
30084   fi
30085 
30086 
30087   COMPILER=$CXX
30088   COMPILER_NAME=$COMPILER_NAME
30089 
30090   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30091     # cc -V output typically looks like
30092     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30093     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30094     # Check that this is likely to be the Solaris Studio cc.
30095     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30096     if test $? -ne 0; then
30097       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30098       { $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
30099 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30100       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30101 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30102       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30103 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30104       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30105     fi
30106     # Remove usage instructions (if present), and
30107     # collapse compiler output into a single line
30108     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30109         $SED -e 's/ *[Uu]sage:.*//'`
30110     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30111         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30112   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30113     # xlc -qversion output typically looks like
30114     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30115     #     Version: 11.01.0000.0015
30116     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30117     # Check that this is likely to be the IBM XL C compiler.
30118     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30119     if test $? -ne 0; then
30120       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30121       { $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
30122 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30123       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30124 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30125       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30126 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30127       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30128     fi
30129     # Collapse compiler output into a single line
30130     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30131     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30132         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30133   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30134     # There is no specific version flag, but all output starts with a version string.
30135     # First line typically looks something like:
30136     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30137     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30138     # Check that this is likely to be Microsoft CL.EXE.
30139     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30140     if test $? -ne 0; then
30141       { $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
30142 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30143       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30144 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30145       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30146     fi
30147     # Collapse compiler output into a single line
30148     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30149     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30150         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30151   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30152     # gcc --version output typically looks like
30153     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30154     #     Copyright (C) 2013 Free Software Foundation, Inc.
30155     #     This is free software; see the source for copying conditions.  There is NO
30156     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30157     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30158     # Check that this is likely to be GCC.
30159     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30160     if test $? -ne 0; then
30161       { $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
30162 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30163       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30164 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30165       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30166     fi
30167     # Remove Copyright and legalese from version string, and
30168     # collapse into a single line
30169     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30170         $SED -e 's/ *Copyright .*//'`
30171     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30172         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30173   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30174     # clang --version output typically looks like
30175     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30176     #    clang version 3.3 (tags/RELEASE_33/final)
30177     # or
30178     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30179     #    Target: x86_64-pc-linux-gnu
30180     #    Thread model: posix
30181     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30182     # Check that this is likely to be clang
30183     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30184     if test $? -ne 0; then
30185       { $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
30186 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30187       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30188 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30189       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30190     fi
30191     # Collapse compiler output into a single line
30192     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30193     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30194         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30195   else
30196       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30197   fi
30198   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30199   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30200   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30201   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30202 
30203   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30204 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30205 
30206 
30207   # Now that we have resolved CXX ourself, let autoconf have its go at it
30208   ac_ext=cpp
30209 ac_cpp='$CXXCPP $CPPFLAGS'
30210 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30211 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30212 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30213 if test -z "$CXX"; then
30214   if test -n "$CCC"; then
30215     CXX=$CCC
30216   else
30217     if test -n "$ac_tool_prefix"; then
30218   for ac_prog in $CXX
30219   do
30220     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30221 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30223 $as_echo_n "checking for $ac_word... " >&6; }
30224 if ${ac_cv_prog_CXX+:} false; then :
30225   $as_echo_n "(cached) " >&6
30226 else
30227   if test -n "$CXX"; then
30228   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30229 else
30230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30231 for as_dir in $PATH
30232 do
30233   IFS=$as_save_IFS
30234   test -z "$as_dir" && as_dir=.
30235     for ac_exec_ext in '' $ac_executable_extensions; do
30236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30237     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30239     break 2
30240   fi
30241 done
30242   done
30243 IFS=$as_save_IFS
30244 
30245 fi
30246 fi
30247 CXX=$ac_cv_prog_CXX
30248 if test -n "$CXX"; then
30249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30250 $as_echo "$CXX" >&6; }
30251 else
30252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30253 $as_echo "no" >&6; }
30254 fi
30255 
30256 
30257     test -n "$CXX" && break
30258   done
30259 fi
30260 if test -z "$CXX"; then
30261   ac_ct_CXX=$CXX
30262   for ac_prog in $CXX
30263 do
30264   # Extract the first word of "$ac_prog", so it can be a program name with args.
30265 set dummy $ac_prog; ac_word=$2
30266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30267 $as_echo_n "checking for $ac_word... " >&6; }
30268 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30269   $as_echo_n "(cached) " >&6
30270 else
30271   if test -n "$ac_ct_CXX"; then
30272   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30273 else
30274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30275 for as_dir in $PATH
30276 do
30277   IFS=$as_save_IFS
30278   test -z "$as_dir" && as_dir=.
30279     for ac_exec_ext in '' $ac_executable_extensions; do
30280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30281     ac_cv_prog_ac_ct_CXX="$ac_prog"
30282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30283     break 2
30284   fi
30285 done
30286   done
30287 IFS=$as_save_IFS
30288 
30289 fi
30290 fi
30291 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30292 if test -n "$ac_ct_CXX"; then
30293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30294 $as_echo "$ac_ct_CXX" >&6; }
30295 else
30296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30297 $as_echo "no" >&6; }
30298 fi
30299 
30300 
30301   test -n "$ac_ct_CXX" && break
30302 done
30303 
30304   if test "x$ac_ct_CXX" = x; then
30305     CXX="g++"
30306   else
30307     case $cross_compiling:$ac_tool_warned in
30308 yes:)
30309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30310 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30311 ac_tool_warned=yes ;;
30312 esac
30313     CXX=$ac_ct_CXX
30314   fi
30315 fi
30316 
30317   fi
30318 fi
30319 # Provide some information about the compiler.
30320 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30321 set X $ac_compile
30322 ac_compiler=$2
30323 for ac_option in --version -v -V -qversion; do
30324   { { ac_try="$ac_compiler $ac_option >&5"
30325 case "(($ac_try" in
30326   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30327   *) ac_try_echo=$ac_try;;
30328 esac
30329 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30330 $as_echo "$ac_try_echo"; } >&5
30331   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30332   ac_status=$?
30333   if test -s conftest.err; then
30334     sed '10a\
30335 ... rest of stderr output deleted ...
30336          10q' conftest.err >conftest.er1
30337     cat conftest.er1 >&5
30338   fi
30339   rm -f conftest.er1 conftest.err
30340   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30341   test $ac_status = 0; }
30342 done
30343 
30344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30345 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30346 if ${ac_cv_cxx_compiler_gnu+:} false; then :
30347   $as_echo_n "(cached) " >&6
30348 else
30349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30350 /* end confdefs.h.  */
30351 
30352 int
30353 main ()
30354 {
30355 #ifndef __GNUC__
30356        choke me
30357 #endif
30358 
30359   ;
30360   return 0;
30361 }
30362 _ACEOF
30363 if ac_fn_cxx_try_compile "$LINENO"; then :
30364   ac_compiler_gnu=yes
30365 else
30366   ac_compiler_gnu=no
30367 fi
30368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30369 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30370 
30371 fi
30372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30373 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30374 if test $ac_compiler_gnu = yes; then
30375   GXX=yes
30376 else
30377   GXX=
30378 fi
30379 ac_test_CXXFLAGS=${CXXFLAGS+set}
30380 ac_save_CXXFLAGS=$CXXFLAGS
30381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30382 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
30383 if ${ac_cv_prog_cxx_g+:} false; then :
30384   $as_echo_n "(cached) " >&6
30385 else
30386   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30387    ac_cxx_werror_flag=yes
30388    ac_cv_prog_cxx_g=no
30389    CXXFLAGS="-g"
30390    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30391 /* end confdefs.h.  */
30392 
30393 int
30394 main ()
30395 {
30396 
30397   ;
30398   return 0;
30399 }
30400 _ACEOF
30401 if ac_fn_cxx_try_compile "$LINENO"; then :
30402   ac_cv_prog_cxx_g=yes
30403 else
30404   CXXFLAGS=""
30405       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30406 /* end confdefs.h.  */
30407 
30408 int
30409 main ()
30410 {
30411 
30412   ;
30413   return 0;
30414 }
30415 _ACEOF
30416 if ac_fn_cxx_try_compile "$LINENO"; then :
30417 
30418 else
30419   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30420          CXXFLAGS="-g"
30421          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30422 /* end confdefs.h.  */
30423 
30424 int
30425 main ()
30426 {
30427 
30428   ;
30429   return 0;
30430 }
30431 _ACEOF
30432 if ac_fn_cxx_try_compile "$LINENO"; then :
30433   ac_cv_prog_cxx_g=yes
30434 fi
30435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30436 fi
30437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30438 fi
30439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30440    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30441 fi
30442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30443 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30444 if test "$ac_test_CXXFLAGS" = set; then
30445   CXXFLAGS=$ac_save_CXXFLAGS
30446 elif test $ac_cv_prog_cxx_g = yes; then
30447   if test "$GXX" = yes; then
30448     CXXFLAGS="-g -O2"
30449   else
30450     CXXFLAGS="-g"
30451   fi
30452 else
30453   if test "$GXX" = yes; then
30454     CXXFLAGS="-O2"
30455   else
30456     CXXFLAGS=
30457   fi
30458 fi
30459 ac_ext=cpp
30460 ac_cpp='$CXXCPP $CPPFLAGS'
30461 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30462 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30463 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30464 
30465 
30466   #
30467   # Setup the preprocessor (CPP and CXXCPP)
30468   #
30469   ac_ext=c
30470 ac_cpp='$CPP $CPPFLAGS'
30471 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30472 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30473 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30475 $as_echo_n "checking how to run the C preprocessor... " >&6; }
30476 # On Suns, sometimes $CPP names a directory.
30477 if test -n "$CPP" && test -d "$CPP"; then
30478   CPP=
30479 fi
30480 if test -z "$CPP"; then
30481   if ${ac_cv_prog_CPP+:} false; then :
30482   $as_echo_n "(cached) " >&6
30483 else
30484       # Double quotes because CPP needs to be expanded
30485     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30486     do
30487       ac_preproc_ok=false
30488 for ac_c_preproc_warn_flag in '' yes
30489 do
30490   # Use a header file that comes with gcc, so configuring glibc
30491   # with a fresh cross-compiler works.
30492   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30493   # <limits.h> exists even on freestanding compilers.
30494   # On the NeXT, cc -E runs the code through the compiler's parser,
30495   # not just through cpp. "Syntax error" is here to catch this case.
30496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30497 /* end confdefs.h.  */
30498 #ifdef __STDC__
30499 # include <limits.h>
30500 #else
30501 # include <assert.h>
30502 #endif
30503                      Syntax error
30504 _ACEOF
30505 if ac_fn_c_try_cpp "$LINENO"; then :
30506 
30507 else
30508   # Broken: fails on valid input.
30509 continue
30510 fi
30511 rm -f conftest.err conftest.i conftest.$ac_ext
30512 
30513   # OK, works on sane cases.  Now check whether nonexistent headers
30514   # can be detected and how.
30515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30516 /* end confdefs.h.  */
30517 #include <ac_nonexistent.h>
30518 _ACEOF
30519 if ac_fn_c_try_cpp "$LINENO"; then :
30520   # Broken: success on invalid input.
30521 continue
30522 else
30523   # Passes both tests.
30524 ac_preproc_ok=:
30525 break
30526 fi
30527 rm -f conftest.err conftest.i conftest.$ac_ext
30528 
30529 done
30530 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30531 rm -f conftest.i conftest.err conftest.$ac_ext
30532 if $ac_preproc_ok; then :
30533   break
30534 fi
30535 
30536     done
30537     ac_cv_prog_CPP=$CPP
30538 
30539 fi
30540   CPP=$ac_cv_prog_CPP
30541 else
30542   ac_cv_prog_CPP=$CPP
30543 fi
30544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30545 $as_echo "$CPP" >&6; }
30546 ac_preproc_ok=false
30547 for ac_c_preproc_warn_flag in '' yes
30548 do
30549   # Use a header file that comes with gcc, so configuring glibc
30550   # with a fresh cross-compiler works.
30551   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30552   # <limits.h> exists even on freestanding compilers.
30553   # On the NeXT, cc -E runs the code through the compiler's parser,
30554   # not just through cpp. "Syntax error" is here to catch this case.
30555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30556 /* end confdefs.h.  */
30557 #ifdef __STDC__
30558 # include <limits.h>
30559 #else
30560 # include <assert.h>
30561 #endif
30562                      Syntax error
30563 _ACEOF
30564 if ac_fn_c_try_cpp "$LINENO"; then :
30565 
30566 else
30567   # Broken: fails on valid input.
30568 continue
30569 fi
30570 rm -f conftest.err conftest.i conftest.$ac_ext
30571 
30572   # OK, works on sane cases.  Now check whether nonexistent headers
30573   # can be detected and how.
30574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30575 /* end confdefs.h.  */
30576 #include <ac_nonexistent.h>
30577 _ACEOF
30578 if ac_fn_c_try_cpp "$LINENO"; then :
30579   # Broken: success on invalid input.
30580 continue
30581 else
30582   # Passes both tests.
30583 ac_preproc_ok=:
30584 break
30585 fi
30586 rm -f conftest.err conftest.i conftest.$ac_ext
30587 
30588 done
30589 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30590 rm -f conftest.i conftest.err conftest.$ac_ext
30591 if $ac_preproc_ok; then :
30592 
30593 else
30594   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30595 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30596 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30597 See \`config.log' for more details" "$LINENO" 5; }
30598 fi
30599 
30600 ac_ext=cpp
30601 ac_cpp='$CXXCPP $CPPFLAGS'
30602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30603 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30605 
30606 
30607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30608 
30609   # First separate the path from the arguments. This will split at the first
30610   # space.
30611   complete="$CPP"
30612   path="${complete%% *}"
30613   tmp="$complete EOL"
30614   arguments="${tmp#* }"
30615 
30616   # Input might be given as Windows format, start by converting to
30617   # unix format.
30618   new_path=`$CYGPATH -u "$path"`
30619 
30620   # Now try to locate executable using which
30621   new_path=`$WHICH "$new_path" 2> /dev/null`
30622   # bat and cmd files are not always considered executable in cygwin causing which
30623   # to not find them
30624   if test "x$new_path" = x \
30625       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30626       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30627     new_path=`$CYGPATH -u "$path"`
30628   fi
30629   if test "x$new_path" = x; then
30630     # Oops. Which didn't find the executable.
30631     # The splitting of arguments from the executable at a space might have been incorrect,
30632     # since paths with space are more likely in Windows. Give it another try with the whole
30633     # argument.
30634     path="$complete"
30635     arguments="EOL"
30636     new_path=`$CYGPATH -u "$path"`
30637     new_path=`$WHICH "$new_path" 2> /dev/null`
30638     # bat and cmd files are not always considered executable in cygwin causing which
30639     # to not find them
30640     if test "x$new_path" = x \
30641         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30642         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30643       new_path=`$CYGPATH -u "$path"`
30644     fi
30645     if test "x$new_path" = x; then
30646       # It's still not found. Now this is an unrecoverable error.
30647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30648 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30649       has_space=`$ECHO "$complete" | $GREP " "`
30650       if test "x$has_space" != x; then
30651         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30652 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30653       fi
30654       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30655     fi
30656   fi
30657 
30658   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30659   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30660   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30661   # "foo.exe" is OK but "foo" is an error.
30662   #
30663   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30664   # It is also a way to make sure we got the proper file name for the real test later on.
30665   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30666   if test "x$test_shortpath" = x; then
30667     # Short path failed, file does not exist as specified.
30668     # Try adding .exe or .cmd
30669     if test -f "${new_path}.exe"; then
30670       input_to_shortpath="${new_path}.exe"
30671     elif test -f "${new_path}.cmd"; then
30672       input_to_shortpath="${new_path}.cmd"
30673     else
30674       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30675 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30676       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30677 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30678       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30679     fi
30680   else
30681     input_to_shortpath="$new_path"
30682   fi
30683 
30684   # Call helper function which possibly converts this using DOS-style short mode.
30685   # If so, the updated path is stored in $new_path.
30686   new_path="$input_to_shortpath"
30687 
30688   input_path="$input_to_shortpath"
30689   # Check if we need to convert this using DOS-style short mode. If the path
30690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30691   # take no chances and rewrite it.
30692   # Note: m4 eats our [], so we need to use [ and ] instead.
30693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30694   if test "x$has_forbidden_chars" != x; then
30695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30696     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30697     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30698     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30699       # Going to short mode and back again did indeed matter. Since short mode is
30700       # case insensitive, let's make it lowercase to improve readability.
30701       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30702       # Now convert it back to Unix-stile (cygpath)
30703       input_path=`$CYGPATH -u "$shortmode_path"`
30704       new_path="$input_path"
30705     fi
30706   fi
30707 
30708   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30709   if test "x$test_cygdrive_prefix" = x; then
30710     # As a simple fix, exclude /usr/bin since it's not a real path.
30711     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30712       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30713       # a path prefixed by /cygdrive for fixpath to work.
30714       new_path="$CYGWIN_ROOT_PATH$input_path"
30715     fi
30716   fi
30717 
30718   # remove trailing .exe if any
30719   new_path="${new_path/%.exe/}"
30720 
30721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30722 
30723   # First separate the path from the arguments. This will split at the first
30724   # space.
30725   complete="$CPP"
30726   path="${complete%% *}"
30727   tmp="$complete EOL"
30728   arguments="${tmp#* }"
30729 
30730   # Input might be given as Windows format, start by converting to
30731   # unix format.
30732   new_path="$path"
30733 
30734   windows_path="$new_path"
30735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30736     unix_path=`$CYGPATH -u "$windows_path"`
30737     new_path="$unix_path"
30738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30740     new_path="$unix_path"
30741   fi
30742 
30743 
30744   # Now try to locate executable using which
30745   new_path=`$WHICH "$new_path" 2> /dev/null`
30746 
30747   if test "x$new_path" = x; then
30748     # Oops. Which didn't find the executable.
30749     # The splitting of arguments from the executable at a space might have been incorrect,
30750     # since paths with space are more likely in Windows. Give it another try with the whole
30751     # argument.
30752     path="$complete"
30753     arguments="EOL"
30754     new_path="$path"
30755 
30756   windows_path="$new_path"
30757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30758     unix_path=`$CYGPATH -u "$windows_path"`
30759     new_path="$unix_path"
30760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30762     new_path="$unix_path"
30763   fi
30764 
30765 
30766     new_path=`$WHICH "$new_path" 2> /dev/null`
30767     # bat and cmd files are not always considered executable in MSYS causing which
30768     # to not find them
30769     if test "x$new_path" = x \
30770         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30771         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30772       new_path="$path"
30773 
30774   windows_path="$new_path"
30775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30776     unix_path=`$CYGPATH -u "$windows_path"`
30777     new_path="$unix_path"
30778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30780     new_path="$unix_path"
30781   fi
30782 
30783     fi
30784 
30785     if test "x$new_path" = x; then
30786       # It's still not found. Now this is an unrecoverable error.
30787       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30788 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30789       has_space=`$ECHO "$complete" | $GREP " "`
30790       if test "x$has_space" != x; then
30791         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30792 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30793       fi
30794       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30795     fi
30796   fi
30797 
30798   # Now new_path has a complete unix path to the binary
30799   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30800     # Keep paths in /bin as-is, but remove trailing .exe if any
30801     new_path="${new_path/%.exe/}"
30802     # Do not save /bin paths to all_fixpath_prefixes!
30803   else
30804     # Not in mixed or Windows style, start by that.
30805     new_path=`cmd //c echo $new_path`
30806 
30807   input_path="$new_path"
30808   # Check if we need to convert this using DOS-style short mode. If the path
30809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30810   # take no chances and rewrite it.
30811   # Note: m4 eats our [], so we need to use [ and ] instead.
30812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30813   if test "x$has_forbidden_chars" != x; then
30814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30816   fi
30817 
30818     # Output is in $new_path
30819 
30820   windows_path="$new_path"
30821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30822     unix_path=`$CYGPATH -u "$windows_path"`
30823     new_path="$unix_path"
30824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30826     new_path="$unix_path"
30827   fi
30828 
30829     # remove trailing .exe if any
30830     new_path="${new_path/%.exe/}"
30831 
30832     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30833     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30834   fi
30835 
30836   else
30837     # We're on a unix platform. Hooray! :)
30838     # First separate the path from the arguments. This will split at the first
30839     # space.
30840     complete="$CPP"
30841     path="${complete%% *}"
30842     tmp="$complete EOL"
30843     arguments="${tmp#* }"
30844 
30845     # Cannot rely on the command "which" here since it doesn't always work.
30846     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30847     if test -z "$is_absolute_path"; then
30848       # Path to executable is not absolute. Find it.
30849       IFS_save="$IFS"
30850       IFS=:
30851       for p in $PATH; do
30852         if test -f "$p/$path" && test -x "$p/$path"; then
30853           new_path="$p/$path"
30854           break
30855         fi
30856       done
30857       IFS="$IFS_save"
30858     else
30859       # This is an absolute path, we can use it without further modifications.
30860       new_path="$path"
30861     fi
30862 
30863     if test "x$new_path" = x; then
30864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30865 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30866       has_space=`$ECHO "$complete" | $GREP " "`
30867       if test "x$has_space" != x; then
30868         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30869 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30870       fi
30871       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30872     fi
30873   fi
30874 
30875   # Now join together the path and the arguments once again
30876   if test "x$arguments" != xEOL; then
30877     new_complete="$new_path ${arguments% *}"
30878   else
30879     new_complete="$new_path"
30880   fi
30881 
30882   if test "x$complete" != "x$new_complete"; then
30883     CPP="$new_complete"
30884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30885 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30886   fi
30887 
30888   ac_ext=cpp
30889 ac_cpp='$CXXCPP $CPPFLAGS'
30890 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30891 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30892 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30894 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30895 if test -z "$CXXCPP"; then
30896   if ${ac_cv_prog_CXXCPP+:} false; then :
30897   $as_echo_n "(cached) " >&6
30898 else
30899       # Double quotes because CXXCPP needs to be expanded
30900     for CXXCPP in "$CXX -E" "/lib/cpp"
30901     do
30902       ac_preproc_ok=false
30903 for ac_cxx_preproc_warn_flag in '' yes
30904 do
30905   # Use a header file that comes with gcc, so configuring glibc
30906   # with a fresh cross-compiler works.
30907   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30908   # <limits.h> exists even on freestanding compilers.
30909   # On the NeXT, cc -E runs the code through the compiler's parser,
30910   # not just through cpp. "Syntax error" is here to catch this case.
30911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30912 /* end confdefs.h.  */
30913 #ifdef __STDC__
30914 # include <limits.h>
30915 #else
30916 # include <assert.h>
30917 #endif
30918                      Syntax error
30919 _ACEOF
30920 if ac_fn_cxx_try_cpp "$LINENO"; then :
30921 
30922 else
30923   # Broken: fails on valid input.
30924 continue
30925 fi
30926 rm -f conftest.err conftest.i conftest.$ac_ext
30927 
30928   # OK, works on sane cases.  Now check whether nonexistent headers
30929   # can be detected and how.
30930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30931 /* end confdefs.h.  */
30932 #include <ac_nonexistent.h>
30933 _ACEOF
30934 if ac_fn_cxx_try_cpp "$LINENO"; then :
30935   # Broken: success on invalid input.
30936 continue
30937 else
30938   # Passes both tests.
30939 ac_preproc_ok=:
30940 break
30941 fi
30942 rm -f conftest.err conftest.i conftest.$ac_ext
30943 
30944 done
30945 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30946 rm -f conftest.i conftest.err conftest.$ac_ext
30947 if $ac_preproc_ok; then :
30948   break
30949 fi
30950 
30951     done
30952     ac_cv_prog_CXXCPP=$CXXCPP
30953 
30954 fi
30955   CXXCPP=$ac_cv_prog_CXXCPP
30956 else
30957   ac_cv_prog_CXXCPP=$CXXCPP
30958 fi
30959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30960 $as_echo "$CXXCPP" >&6; }
30961 ac_preproc_ok=false
30962 for ac_cxx_preproc_warn_flag in '' yes
30963 do
30964   # Use a header file that comes with gcc, so configuring glibc
30965   # with a fresh cross-compiler works.
30966   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30967   # <limits.h> exists even on freestanding compilers.
30968   # On the NeXT, cc -E runs the code through the compiler's parser,
30969   # not just through cpp. "Syntax error" is here to catch this case.
30970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30971 /* end confdefs.h.  */
30972 #ifdef __STDC__
30973 # include <limits.h>
30974 #else
30975 # include <assert.h>
30976 #endif
30977                      Syntax error
30978 _ACEOF
30979 if ac_fn_cxx_try_cpp "$LINENO"; then :
30980 
30981 else
30982   # Broken: fails on valid input.
30983 continue
30984 fi
30985 rm -f conftest.err conftest.i conftest.$ac_ext
30986 
30987   # OK, works on sane cases.  Now check whether nonexistent headers
30988   # can be detected and how.
30989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30990 /* end confdefs.h.  */
30991 #include <ac_nonexistent.h>
30992 _ACEOF
30993 if ac_fn_cxx_try_cpp "$LINENO"; then :
30994   # Broken: success on invalid input.
30995 continue
30996 else
30997   # Passes both tests.
30998 ac_preproc_ok=:
30999 break
31000 fi
31001 rm -f conftest.err conftest.i conftest.$ac_ext
31002 
31003 done
31004 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31005 rm -f conftest.i conftest.err conftest.$ac_ext
31006 if $ac_preproc_ok; then :
31007 
31008 else
31009   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31010 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31011 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31012 See \`config.log' for more details" "$LINENO" 5; }
31013 fi
31014 
31015 ac_ext=cpp
31016 ac_cpp='$CXXCPP $CPPFLAGS'
31017 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31018 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31019 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31020 
31021 
31022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31023 
31024   # First separate the path from the arguments. This will split at the first
31025   # space.
31026   complete="$CXXCPP"
31027   path="${complete%% *}"
31028   tmp="$complete EOL"
31029   arguments="${tmp#* }"
31030 
31031   # Input might be given as Windows format, start by converting to
31032   # unix format.
31033   new_path=`$CYGPATH -u "$path"`
31034 
31035   # Now try to locate executable using which
31036   new_path=`$WHICH "$new_path" 2> /dev/null`
31037   # bat and cmd files are not always considered executable in cygwin causing which
31038   # to not find them
31039   if test "x$new_path" = x \
31040       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31041       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31042     new_path=`$CYGPATH -u "$path"`
31043   fi
31044   if test "x$new_path" = x; then
31045     # Oops. Which didn't find the executable.
31046     # The splitting of arguments from the executable at a space might have been incorrect,
31047     # since paths with space are more likely in Windows. Give it another try with the whole
31048     # argument.
31049     path="$complete"
31050     arguments="EOL"
31051     new_path=`$CYGPATH -u "$path"`
31052     new_path=`$WHICH "$new_path" 2> /dev/null`
31053     # bat and cmd files are not always considered executable in cygwin causing which
31054     # to not find them
31055     if test "x$new_path" = x \
31056         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31057         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31058       new_path=`$CYGPATH -u "$path"`
31059     fi
31060     if test "x$new_path" = x; then
31061       # It's still not found. Now this is an unrecoverable error.
31062       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31063 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31064       has_space=`$ECHO "$complete" | $GREP " "`
31065       if test "x$has_space" != x; then
31066         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31067 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31068       fi
31069       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31070     fi
31071   fi
31072 
31073   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31074   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31075   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31076   # "foo.exe" is OK but "foo" is an error.
31077   #
31078   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31079   # It is also a way to make sure we got the proper file name for the real test later on.
31080   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31081   if test "x$test_shortpath" = x; then
31082     # Short path failed, file does not exist as specified.
31083     # Try adding .exe or .cmd
31084     if test -f "${new_path}.exe"; then
31085       input_to_shortpath="${new_path}.exe"
31086     elif test -f "${new_path}.cmd"; then
31087       input_to_shortpath="${new_path}.cmd"
31088     else
31089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31090 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31091       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31092 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31093       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31094     fi
31095   else
31096     input_to_shortpath="$new_path"
31097   fi
31098 
31099   # Call helper function which possibly converts this using DOS-style short mode.
31100   # If so, the updated path is stored in $new_path.
31101   new_path="$input_to_shortpath"
31102 
31103   input_path="$input_to_shortpath"
31104   # Check if we need to convert this using DOS-style short mode. If the path
31105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31106   # take no chances and rewrite it.
31107   # Note: m4 eats our [], so we need to use [ and ] instead.
31108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31109   if test "x$has_forbidden_chars" != x; then
31110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31114       # Going to short mode and back again did indeed matter. Since short mode is
31115       # case insensitive, let's make it lowercase to improve readability.
31116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31117       # Now convert it back to Unix-stile (cygpath)
31118       input_path=`$CYGPATH -u "$shortmode_path"`
31119       new_path="$input_path"
31120     fi
31121   fi
31122 
31123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31124   if test "x$test_cygdrive_prefix" = x; then
31125     # As a simple fix, exclude /usr/bin since it's not a real path.
31126     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31128       # a path prefixed by /cygdrive for fixpath to work.
31129       new_path="$CYGWIN_ROOT_PATH$input_path"
31130     fi
31131   fi
31132 
31133   # remove trailing .exe if any
31134   new_path="${new_path/%.exe/}"
31135 
31136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31137 
31138   # First separate the path from the arguments. This will split at the first
31139   # space.
31140   complete="$CXXCPP"
31141   path="${complete%% *}"
31142   tmp="$complete EOL"
31143   arguments="${tmp#* }"
31144 
31145   # Input might be given as Windows format, start by converting to
31146   # unix format.
31147   new_path="$path"
31148 
31149   windows_path="$new_path"
31150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31151     unix_path=`$CYGPATH -u "$windows_path"`
31152     new_path="$unix_path"
31153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31154     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31155     new_path="$unix_path"
31156   fi
31157 
31158 
31159   # Now try to locate executable using which
31160   new_path=`$WHICH "$new_path" 2> /dev/null`
31161 
31162   if test "x$new_path" = x; then
31163     # Oops. Which didn't find the executable.
31164     # The splitting of arguments from the executable at a space might have been incorrect,
31165     # since paths with space are more likely in Windows. Give it another try with the whole
31166     # argument.
31167     path="$complete"
31168     arguments="EOL"
31169     new_path="$path"
31170 
31171   windows_path="$new_path"
31172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31173     unix_path=`$CYGPATH -u "$windows_path"`
31174     new_path="$unix_path"
31175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31177     new_path="$unix_path"
31178   fi
31179 
31180 
31181     new_path=`$WHICH "$new_path" 2> /dev/null`
31182     # bat and cmd files are not always considered executable in MSYS causing which
31183     # to not find them
31184     if test "x$new_path" = x \
31185         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31186         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31187       new_path="$path"
31188 
31189   windows_path="$new_path"
31190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31191     unix_path=`$CYGPATH -u "$windows_path"`
31192     new_path="$unix_path"
31193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31195     new_path="$unix_path"
31196   fi
31197 
31198     fi
31199 
31200     if test "x$new_path" = x; then
31201       # It's still not found. Now this is an unrecoverable error.
31202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31203 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31204       has_space=`$ECHO "$complete" | $GREP " "`
31205       if test "x$has_space" != x; then
31206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31208       fi
31209       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31210     fi
31211   fi
31212 
31213   # Now new_path has a complete unix path to the binary
31214   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31215     # Keep paths in /bin as-is, but remove trailing .exe if any
31216     new_path="${new_path/%.exe/}"
31217     # Do not save /bin paths to all_fixpath_prefixes!
31218   else
31219     # Not in mixed or Windows style, start by that.
31220     new_path=`cmd //c echo $new_path`
31221 
31222   input_path="$new_path"
31223   # Check if we need to convert this using DOS-style short mode. If the path
31224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31225   # take no chances and rewrite it.
31226   # Note: m4 eats our [], so we need to use [ and ] instead.
31227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31228   if test "x$has_forbidden_chars" != x; then
31229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31231   fi
31232 
31233     # Output is in $new_path
31234 
31235   windows_path="$new_path"
31236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31237     unix_path=`$CYGPATH -u "$windows_path"`
31238     new_path="$unix_path"
31239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31241     new_path="$unix_path"
31242   fi
31243 
31244     # remove trailing .exe if any
31245     new_path="${new_path/%.exe/}"
31246 
31247     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31248     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31249   fi
31250 
31251   else
31252     # We're on a unix platform. Hooray! :)
31253     # First separate the path from the arguments. This will split at the first
31254     # space.
31255     complete="$CXXCPP"
31256     path="${complete%% *}"
31257     tmp="$complete EOL"
31258     arguments="${tmp#* }"
31259 
31260     # Cannot rely on the command "which" here since it doesn't always work.
31261     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31262     if test -z "$is_absolute_path"; then
31263       # Path to executable is not absolute. Find it.
31264       IFS_save="$IFS"
31265       IFS=:
31266       for p in $PATH; do
31267         if test -f "$p/$path" && test -x "$p/$path"; then
31268           new_path="$p/$path"
31269           break
31270         fi
31271       done
31272       IFS="$IFS_save"
31273     else
31274       # This is an absolute path, we can use it without further modifications.
31275       new_path="$path"
31276     fi
31277 
31278     if test "x$new_path" = x; then
31279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31280 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31281       has_space=`$ECHO "$complete" | $GREP " "`
31282       if test "x$has_space" != x; then
31283         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31284 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31285       fi
31286       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31287     fi
31288   fi
31289 
31290   # Now join together the path and the arguments once again
31291   if test "x$arguments" != xEOL; then
31292     new_complete="$new_path ${arguments% *}"
31293   else
31294     new_complete="$new_path"
31295   fi
31296 
31297   if test "x$complete" != "x$new_complete"; then
31298     CXXCPP="$new_complete"
31299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31300 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31301   fi
31302 
31303 
31304   #
31305   # Setup the linker (LD)
31306   #
31307   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31308     # In the Microsoft toolchain we have a separate LD command "link".
31309     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31310     # a cygwin program for something completely different.
31311     # Extract the first word of "link", so it can be a program name with args.
31312 set dummy link; ac_word=$2
31313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31314 $as_echo_n "checking for $ac_word... " >&6; }
31315 if ${ac_cv_prog_LD+:} false; then :
31316   $as_echo_n "(cached) " >&6
31317 else
31318   if test -n "$LD"; then
31319   ac_cv_prog_LD="$LD" # Let the user override the test.
31320 else
31321   ac_prog_rejected=no
31322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31323 for as_dir in $PATH
31324 do
31325   IFS=$as_save_IFS
31326   test -z "$as_dir" && as_dir=.
31327     for ac_exec_ext in '' $ac_executable_extensions; do
31328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31329     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31330        ac_prog_rejected=yes
31331        continue
31332      fi
31333     ac_cv_prog_LD="link"
31334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31335     break 2
31336   fi
31337 done
31338   done
31339 IFS=$as_save_IFS
31340 
31341 if test $ac_prog_rejected = yes; then
31342   # We found a bogon in the path, so make sure we never use it.
31343   set dummy $ac_cv_prog_LD
31344   shift
31345   if test $# != 0; then
31346     # We chose a different compiler from the bogus one.
31347     # However, it has the same basename, so the bogon will be chosen
31348     # first if we set LD to just the basename; use the full file name.
31349     shift
31350     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31351   fi
31352 fi
31353 fi
31354 fi
31355 LD=$ac_cv_prog_LD
31356 if test -n "$LD"; then
31357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31358 $as_echo "$LD" >&6; }
31359 else
31360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31361 $as_echo "no" >&6; }
31362 fi
31363 
31364 
31365 
31366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31367 
31368   # First separate the path from the arguments. This will split at the first
31369   # space.
31370   complete="$LD"
31371   path="${complete%% *}"
31372   tmp="$complete EOL"
31373   arguments="${tmp#* }"
31374 
31375   # Input might be given as Windows format, start by converting to
31376   # unix format.
31377   new_path=`$CYGPATH -u "$path"`
31378 
31379   # Now try to locate executable using which
31380   new_path=`$WHICH "$new_path" 2> /dev/null`
31381   # bat and cmd files are not always considered executable in cygwin causing which
31382   # to not find them
31383   if test "x$new_path" = x \
31384       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31385       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31386     new_path=`$CYGPATH -u "$path"`
31387   fi
31388   if test "x$new_path" = x; then
31389     # Oops. Which didn't find the executable.
31390     # The splitting of arguments from the executable at a space might have been incorrect,
31391     # since paths with space are more likely in Windows. Give it another try with the whole
31392     # argument.
31393     path="$complete"
31394     arguments="EOL"
31395     new_path=`$CYGPATH -u "$path"`
31396     new_path=`$WHICH "$new_path" 2> /dev/null`
31397     # bat and cmd files are not always considered executable in cygwin causing which
31398     # to not find them
31399     if test "x$new_path" = x \
31400         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31401         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31402       new_path=`$CYGPATH -u "$path"`
31403     fi
31404     if test "x$new_path" = x; then
31405       # It's still not found. Now this is an unrecoverable error.
31406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31407 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31408       has_space=`$ECHO "$complete" | $GREP " "`
31409       if test "x$has_space" != x; then
31410         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31411 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31412       fi
31413       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31414     fi
31415   fi
31416 
31417   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31418   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31419   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31420   # "foo.exe" is OK but "foo" is an error.
31421   #
31422   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31423   # It is also a way to make sure we got the proper file name for the real test later on.
31424   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31425   if test "x$test_shortpath" = x; then
31426     # Short path failed, file does not exist as specified.
31427     # Try adding .exe or .cmd
31428     if test -f "${new_path}.exe"; then
31429       input_to_shortpath="${new_path}.exe"
31430     elif test -f "${new_path}.cmd"; then
31431       input_to_shortpath="${new_path}.cmd"
31432     else
31433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31434 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31435       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31436 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31437       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31438     fi
31439   else
31440     input_to_shortpath="$new_path"
31441   fi
31442 
31443   # Call helper function which possibly converts this using DOS-style short mode.
31444   # If so, the updated path is stored in $new_path.
31445   new_path="$input_to_shortpath"
31446 
31447   input_path="$input_to_shortpath"
31448   # Check if we need to convert this using DOS-style short mode. If the path
31449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31450   # take no chances and rewrite it.
31451   # Note: m4 eats our [], so we need to use [ and ] instead.
31452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31453   if test "x$has_forbidden_chars" != x; then
31454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31455     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31456     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31457     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31458       # Going to short mode and back again did indeed matter. Since short mode is
31459       # case insensitive, let's make it lowercase to improve readability.
31460       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31461       # Now convert it back to Unix-stile (cygpath)
31462       input_path=`$CYGPATH -u "$shortmode_path"`
31463       new_path="$input_path"
31464     fi
31465   fi
31466 
31467   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31468   if test "x$test_cygdrive_prefix" = x; then
31469     # As a simple fix, exclude /usr/bin since it's not a real path.
31470     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31471       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31472       # a path prefixed by /cygdrive for fixpath to work.
31473       new_path="$CYGWIN_ROOT_PATH$input_path"
31474     fi
31475   fi
31476 
31477   # remove trailing .exe if any
31478   new_path="${new_path/%.exe/}"
31479 
31480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31481 
31482   # First separate the path from the arguments. This will split at the first
31483   # space.
31484   complete="$LD"
31485   path="${complete%% *}"
31486   tmp="$complete EOL"
31487   arguments="${tmp#* }"
31488 
31489   # Input might be given as Windows format, start by converting to
31490   # unix format.
31491   new_path="$path"
31492 
31493   windows_path="$new_path"
31494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31495     unix_path=`$CYGPATH -u "$windows_path"`
31496     new_path="$unix_path"
31497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31499     new_path="$unix_path"
31500   fi
31501 
31502 
31503   # Now try to locate executable using which
31504   new_path=`$WHICH "$new_path" 2> /dev/null`
31505 
31506   if test "x$new_path" = x; then
31507     # Oops. Which didn't find the executable.
31508     # The splitting of arguments from the executable at a space might have been incorrect,
31509     # since paths with space are more likely in Windows. Give it another try with the whole
31510     # argument.
31511     path="$complete"
31512     arguments="EOL"
31513     new_path="$path"
31514 
31515   windows_path="$new_path"
31516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31517     unix_path=`$CYGPATH -u "$windows_path"`
31518     new_path="$unix_path"
31519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31521     new_path="$unix_path"
31522   fi
31523 
31524 
31525     new_path=`$WHICH "$new_path" 2> /dev/null`
31526     # bat and cmd files are not always considered executable in MSYS causing which
31527     # to not find them
31528     if test "x$new_path" = x \
31529         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31530         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31531       new_path="$path"
31532 
31533   windows_path="$new_path"
31534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31535     unix_path=`$CYGPATH -u "$windows_path"`
31536     new_path="$unix_path"
31537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31539     new_path="$unix_path"
31540   fi
31541 
31542     fi
31543 
31544     if test "x$new_path" = x; then
31545       # It's still not found. Now this is an unrecoverable error.
31546       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31547 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31548       has_space=`$ECHO "$complete" | $GREP " "`
31549       if test "x$has_space" != x; then
31550         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31551 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31552       fi
31553       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31554     fi
31555   fi
31556 
31557   # Now new_path has a complete unix path to the binary
31558   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31559     # Keep paths in /bin as-is, but remove trailing .exe if any
31560     new_path="${new_path/%.exe/}"
31561     # Do not save /bin paths to all_fixpath_prefixes!
31562   else
31563     # Not in mixed or Windows style, start by that.
31564     new_path=`cmd //c echo $new_path`
31565 
31566   input_path="$new_path"
31567   # Check if we need to convert this using DOS-style short mode. If the path
31568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31569   # take no chances and rewrite it.
31570   # Note: m4 eats our [], so we need to use [ and ] instead.
31571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31572   if test "x$has_forbidden_chars" != x; then
31573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31575   fi
31576 
31577     # Output is in $new_path
31578 
31579   windows_path="$new_path"
31580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31581     unix_path=`$CYGPATH -u "$windows_path"`
31582     new_path="$unix_path"
31583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31585     new_path="$unix_path"
31586   fi
31587 
31588     # remove trailing .exe if any
31589     new_path="${new_path/%.exe/}"
31590 
31591     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31592     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31593   fi
31594 
31595   else
31596     # We're on a unix platform. Hooray! :)
31597     # First separate the path from the arguments. This will split at the first
31598     # space.
31599     complete="$LD"
31600     path="${complete%% *}"
31601     tmp="$complete EOL"
31602     arguments="${tmp#* }"
31603 
31604     # Cannot rely on the command "which" here since it doesn't always work.
31605     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31606     if test -z "$is_absolute_path"; then
31607       # Path to executable is not absolute. Find it.
31608       IFS_save="$IFS"
31609       IFS=:
31610       for p in $PATH; do
31611         if test -f "$p/$path" && test -x "$p/$path"; then
31612           new_path="$p/$path"
31613           break
31614         fi
31615       done
31616       IFS="$IFS_save"
31617     else
31618       # This is an absolute path, we can use it without further modifications.
31619       new_path="$path"
31620     fi
31621 
31622     if test "x$new_path" = x; then
31623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31624 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31625       has_space=`$ECHO "$complete" | $GREP " "`
31626       if test "x$has_space" != x; then
31627         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31628 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31629       fi
31630       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31631     fi
31632   fi
31633 
31634   # Now join together the path and the arguments once again
31635   if test "x$arguments" != xEOL; then
31636     new_complete="$new_path ${arguments% *}"
31637   else
31638     new_complete="$new_path"
31639   fi
31640 
31641   if test "x$complete" != "x$new_complete"; then
31642     LD="$new_complete"
31643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31644 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31645   fi
31646 
31647     # Verify that we indeed succeeded with this trick.
31648     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31649 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31650     "$LD" --version > /dev/null
31651     if test $? -eq 0 ; then
31652       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31653 $as_echo "no" >&6; }
31654       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31655     else
31656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31657 $as_echo "yes" >&6; }
31658     fi
31659     LDCXX="$LD"
31660   else
31661     # All other toolchains use the compiler to link.
31662     LD="$CC"
31663     LDCXX="$CXX"
31664   fi
31665 
31666   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31667 
31668 
31669   #
31670   # Setup the assembler (AS)
31671   #
31672   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31673     # FIXME: should this really be solaris, or solstudio?
31674 
31675 
31676   # Publish this variable in the help.
31677 
31678 
31679   if test "x$AS" = x; then
31680     # The variable is not set by user, try to locate tool using the code snippet
31681     for ac_prog in as
31682 do
31683   # Extract the first word of "$ac_prog", so it can be a program name with args.
31684 set dummy $ac_prog; ac_word=$2
31685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31686 $as_echo_n "checking for $ac_word... " >&6; }
31687 if ${ac_cv_path_AS+:} false; then :
31688   $as_echo_n "(cached) " >&6
31689 else
31690   case $AS in
31691   [\\/]* | ?:[\\/]*)
31692   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31693   ;;
31694   *)
31695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31696 for as_dir in $PATH
31697 do
31698   IFS=$as_save_IFS
31699   test -z "$as_dir" && as_dir=.
31700     for ac_exec_ext in '' $ac_executable_extensions; do
31701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31702     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31704     break 2
31705   fi
31706 done
31707   done
31708 IFS=$as_save_IFS
31709 
31710   ;;
31711 esac
31712 fi
31713 AS=$ac_cv_path_AS
31714 if test -n "$AS"; then
31715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31716 $as_echo "$AS" >&6; }
31717 else
31718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31719 $as_echo "no" >&6; }
31720 fi
31721 
31722 
31723   test -n "$AS" && break
31724 done
31725 
31726   else
31727     # The variable is set, but is it from the command line or the environment?
31728 
31729     # Try to remove the string !AS! from our list.
31730     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31731     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31732       # If it failed, the variable was not from the command line. Ignore it,
31733       # but warn the user (except for BASH, which is always set by the calling BASH).
31734       if test "xAS" != xBASH; then
31735         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31736 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31737       fi
31738       # Try to locate tool using the code snippet
31739       for ac_prog in as
31740 do
31741   # Extract the first word of "$ac_prog", so it can be a program name with args.
31742 set dummy $ac_prog; ac_word=$2
31743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31744 $as_echo_n "checking for $ac_word... " >&6; }
31745 if ${ac_cv_path_AS+:} false; then :
31746   $as_echo_n "(cached) " >&6
31747 else
31748   case $AS in
31749   [\\/]* | ?:[\\/]*)
31750   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31751   ;;
31752   *)
31753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31754 for as_dir in $PATH
31755 do
31756   IFS=$as_save_IFS
31757   test -z "$as_dir" && as_dir=.
31758     for ac_exec_ext in '' $ac_executable_extensions; do
31759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31760     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31762     break 2
31763   fi
31764 done
31765   done
31766 IFS=$as_save_IFS
31767 
31768   ;;
31769 esac
31770 fi
31771 AS=$ac_cv_path_AS
31772 if test -n "$AS"; then
31773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31774 $as_echo "$AS" >&6; }
31775 else
31776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31777 $as_echo "no" >&6; }
31778 fi
31779 
31780 
31781   test -n "$AS" && break
31782 done
31783 
31784     else
31785       # If it succeeded, then it was overridden by the user. We will use it
31786       # for the tool.
31787 
31788       # First remove it from the list of overridden variables, so we can test
31789       # for unknown variables in the end.
31790       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31791 
31792       # Check if the provided tool contains a complete path.
31793       tool_specified="$AS"
31794       tool_basename="${tool_specified##*/}"
31795       if test "x$tool_basename" = "x$tool_specified"; then
31796         # A command without a complete path is provided, search $PATH.
31797         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31798 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31799         # Extract the first word of "$tool_basename", so it can be a program name with args.
31800 set dummy $tool_basename; ac_word=$2
31801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31802 $as_echo_n "checking for $ac_word... " >&6; }
31803 if ${ac_cv_path_AS+:} false; then :
31804   $as_echo_n "(cached) " >&6
31805 else
31806   case $AS in
31807   [\\/]* | ?:[\\/]*)
31808   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31809   ;;
31810   *)
31811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31812 for as_dir in $PATH
31813 do
31814   IFS=$as_save_IFS
31815   test -z "$as_dir" && as_dir=.
31816     for ac_exec_ext in '' $ac_executable_extensions; do
31817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31818     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31820     break 2
31821   fi
31822 done
31823   done
31824 IFS=$as_save_IFS
31825 
31826   ;;
31827 esac
31828 fi
31829 AS=$ac_cv_path_AS
31830 if test -n "$AS"; then
31831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31832 $as_echo "$AS" >&6; }
31833 else
31834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31835 $as_echo "no" >&6; }
31836 fi
31837 
31838 
31839         if test "x$AS" = x; then
31840           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31841         fi
31842       else
31843         # Otherwise we believe it is a complete path. Use it as it is.
31844         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31845 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31846         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31847 $as_echo_n "checking for AS... " >&6; }
31848         if test ! -x "$tool_specified"; then
31849           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31850 $as_echo "not found" >&6; }
31851           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31852         fi
31853         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31854 $as_echo "$tool_specified" >&6; }
31855       fi
31856     fi
31857   fi
31858 
31859 
31860 
31861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31862 
31863   # First separate the path from the arguments. This will split at the first
31864   # space.
31865   complete="$AS"
31866   path="${complete%% *}"
31867   tmp="$complete EOL"
31868   arguments="${tmp#* }"
31869 
31870   # Input might be given as Windows format, start by converting to
31871   # unix format.
31872   new_path=`$CYGPATH -u "$path"`
31873 
31874   # Now try to locate executable using which
31875   new_path=`$WHICH "$new_path" 2> /dev/null`
31876   # bat and cmd files are not always considered executable in cygwin causing which
31877   # to not find them
31878   if test "x$new_path" = x \
31879       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31880       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31881     new_path=`$CYGPATH -u "$path"`
31882   fi
31883   if test "x$new_path" = x; then
31884     # Oops. Which didn't find the executable.
31885     # The splitting of arguments from the executable at a space might have been incorrect,
31886     # since paths with space are more likely in Windows. Give it another try with the whole
31887     # argument.
31888     path="$complete"
31889     arguments="EOL"
31890     new_path=`$CYGPATH -u "$path"`
31891     new_path=`$WHICH "$new_path" 2> /dev/null`
31892     # bat and cmd files are not always considered executable in cygwin causing which
31893     # to not find them
31894     if test "x$new_path" = x \
31895         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31896         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31897       new_path=`$CYGPATH -u "$path"`
31898     fi
31899     if test "x$new_path" = x; then
31900       # It's still not found. Now this is an unrecoverable error.
31901       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31902 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31903       has_space=`$ECHO "$complete" | $GREP " "`
31904       if test "x$has_space" != x; then
31905         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31906 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31907       fi
31908       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31909     fi
31910   fi
31911 
31912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31915   # "foo.exe" is OK but "foo" is an error.
31916   #
31917   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31918   # It is also a way to make sure we got the proper file name for the real test later on.
31919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31920   if test "x$test_shortpath" = x; then
31921     # Short path failed, file does not exist as specified.
31922     # Try adding .exe or .cmd
31923     if test -f "${new_path}.exe"; then
31924       input_to_shortpath="${new_path}.exe"
31925     elif test -f "${new_path}.cmd"; then
31926       input_to_shortpath="${new_path}.cmd"
31927     else
31928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31929 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31930       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31931 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31932       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31933     fi
31934   else
31935     input_to_shortpath="$new_path"
31936   fi
31937 
31938   # Call helper function which possibly converts this using DOS-style short mode.
31939   # If so, the updated path is stored in $new_path.
31940   new_path="$input_to_shortpath"
31941 
31942   input_path="$input_to_shortpath"
31943   # Check if we need to convert this using DOS-style short mode. If the path
31944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31945   # take no chances and rewrite it.
31946   # Note: m4 eats our [], so we need to use [ and ] instead.
31947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31948   if test "x$has_forbidden_chars" != x; then
31949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31950     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31951     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31952     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31953       # Going to short mode and back again did indeed matter. Since short mode is
31954       # case insensitive, let's make it lowercase to improve readability.
31955       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31956       # Now convert it back to Unix-stile (cygpath)
31957       input_path=`$CYGPATH -u "$shortmode_path"`
31958       new_path="$input_path"
31959     fi
31960   fi
31961 
31962   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31963   if test "x$test_cygdrive_prefix" = x; then
31964     # As a simple fix, exclude /usr/bin since it's not a real path.
31965     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31966       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31967       # a path prefixed by /cygdrive for fixpath to work.
31968       new_path="$CYGWIN_ROOT_PATH$input_path"
31969     fi
31970   fi
31971 
31972   # remove trailing .exe if any
31973   new_path="${new_path/%.exe/}"
31974 
31975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31976 
31977   # First separate the path from the arguments. This will split at the first
31978   # space.
31979   complete="$AS"
31980   path="${complete%% *}"
31981   tmp="$complete EOL"
31982   arguments="${tmp#* }"
31983 
31984   # Input might be given as Windows format, start by converting to
31985   # unix format.
31986   new_path="$path"
31987 
31988   windows_path="$new_path"
31989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31990     unix_path=`$CYGPATH -u "$windows_path"`
31991     new_path="$unix_path"
31992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31994     new_path="$unix_path"
31995   fi
31996 
31997 
31998   # Now try to locate executable using which
31999   new_path=`$WHICH "$new_path" 2> /dev/null`
32000 
32001   if test "x$new_path" = x; then
32002     # Oops. Which didn't find the executable.
32003     # The splitting of arguments from the executable at a space might have been incorrect,
32004     # since paths with space are more likely in Windows. Give it another try with the whole
32005     # argument.
32006     path="$complete"
32007     arguments="EOL"
32008     new_path="$path"
32009 
32010   windows_path="$new_path"
32011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32012     unix_path=`$CYGPATH -u "$windows_path"`
32013     new_path="$unix_path"
32014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32015     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32016     new_path="$unix_path"
32017   fi
32018 
32019 
32020     new_path=`$WHICH "$new_path" 2> /dev/null`
32021     # bat and cmd files are not always considered executable in MSYS causing which
32022     # to not find them
32023     if test "x$new_path" = x \
32024         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32025         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32026       new_path="$path"
32027 
32028   windows_path="$new_path"
32029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32030     unix_path=`$CYGPATH -u "$windows_path"`
32031     new_path="$unix_path"
32032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32034     new_path="$unix_path"
32035   fi
32036 
32037     fi
32038 
32039     if test "x$new_path" = x; then
32040       # It's still not found. Now this is an unrecoverable error.
32041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32042 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32043       has_space=`$ECHO "$complete" | $GREP " "`
32044       if test "x$has_space" != x; then
32045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32047       fi
32048       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32049     fi
32050   fi
32051 
32052   # Now new_path has a complete unix path to the binary
32053   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32054     # Keep paths in /bin as-is, but remove trailing .exe if any
32055     new_path="${new_path/%.exe/}"
32056     # Do not save /bin paths to all_fixpath_prefixes!
32057   else
32058     # Not in mixed or Windows style, start by that.
32059     new_path=`cmd //c echo $new_path`
32060 
32061   input_path="$new_path"
32062   # Check if we need to convert this using DOS-style short mode. If the path
32063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32064   # take no chances and rewrite it.
32065   # Note: m4 eats our [], so we need to use [ and ] instead.
32066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32067   if test "x$has_forbidden_chars" != x; then
32068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32070   fi
32071 
32072     # Output is in $new_path
32073 
32074   windows_path="$new_path"
32075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32076     unix_path=`$CYGPATH -u "$windows_path"`
32077     new_path="$unix_path"
32078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32080     new_path="$unix_path"
32081   fi
32082 
32083     # remove trailing .exe if any
32084     new_path="${new_path/%.exe/}"
32085 
32086     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32087     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32088   fi
32089 
32090   else
32091     # We're on a unix platform. Hooray! :)
32092     # First separate the path from the arguments. This will split at the first
32093     # space.
32094     complete="$AS"
32095     path="${complete%% *}"
32096     tmp="$complete EOL"
32097     arguments="${tmp#* }"
32098 
32099     # Cannot rely on the command "which" here since it doesn't always work.
32100     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32101     if test -z "$is_absolute_path"; then
32102       # Path to executable is not absolute. Find it.
32103       IFS_save="$IFS"
32104       IFS=:
32105       for p in $PATH; do
32106         if test -f "$p/$path" && test -x "$p/$path"; then
32107           new_path="$p/$path"
32108           break
32109         fi
32110       done
32111       IFS="$IFS_save"
32112     else
32113       # This is an absolute path, we can use it without further modifications.
32114       new_path="$path"
32115     fi
32116 
32117     if test "x$new_path" = x; then
32118       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32119 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32120       has_space=`$ECHO "$complete" | $GREP " "`
32121       if test "x$has_space" != x; then
32122         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32123 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32124       fi
32125       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32126     fi
32127   fi
32128 
32129   # Now join together the path and the arguments once again
32130   if test "x$arguments" != xEOL; then
32131     new_complete="$new_path ${arguments% *}"
32132   else
32133     new_complete="$new_path"
32134   fi
32135 
32136   if test "x$complete" != "x$new_complete"; then
32137     AS="$new_complete"
32138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32139 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32140   fi
32141 
32142   else
32143     # FIXME: is this correct for microsoft?
32144     AS="$CC -c"
32145   fi
32146 
32147 
32148   #
32149   # Setup the archiver (AR)
32150   #
32151   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32152     # The corresponding ar tool is lib.exe (used to create static libraries)
32153     # Extract the first word of "lib", so it can be a program name with args.
32154 set dummy lib; ac_word=$2
32155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32156 $as_echo_n "checking for $ac_word... " >&6; }
32157 if ${ac_cv_prog_AR+:} false; then :
32158   $as_echo_n "(cached) " >&6
32159 else
32160   if test -n "$AR"; then
32161   ac_cv_prog_AR="$AR" # Let the user override the test.
32162 else
32163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32164 for as_dir in $PATH
32165 do
32166   IFS=$as_save_IFS
32167   test -z "$as_dir" && as_dir=.
32168     for ac_exec_ext in '' $ac_executable_extensions; do
32169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32170     ac_cv_prog_AR="lib"
32171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32172     break 2
32173   fi
32174 done
32175   done
32176 IFS=$as_save_IFS
32177 
32178 fi
32179 fi
32180 AR=$ac_cv_prog_AR
32181 if test -n "$AR"; then
32182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32183 $as_echo "$AR" >&6; }
32184 else
32185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32186 $as_echo "no" >&6; }
32187 fi
32188 
32189 
32190   else
32191 
32192 
32193   # Publish this variable in the help.
32194 
32195 
32196   if test "x$AR" = x; then
32197     # The variable is not set by user, try to locate tool using the code snippet
32198     if test -n "$ac_tool_prefix"; then
32199   for ac_prog in ar
32200   do
32201     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32202 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32204 $as_echo_n "checking for $ac_word... " >&6; }
32205 if ${ac_cv_prog_AR+:} false; then :
32206   $as_echo_n "(cached) " >&6
32207 else
32208   if test -n "$AR"; then
32209   ac_cv_prog_AR="$AR" # Let the user override the test.
32210 else
32211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32212 for as_dir in $PATH
32213 do
32214   IFS=$as_save_IFS
32215   test -z "$as_dir" && as_dir=.
32216     for ac_exec_ext in '' $ac_executable_extensions; do
32217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32218     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32220     break 2
32221   fi
32222 done
32223   done
32224 IFS=$as_save_IFS
32225 
32226 fi
32227 fi
32228 AR=$ac_cv_prog_AR
32229 if test -n "$AR"; then
32230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32231 $as_echo "$AR" >&6; }
32232 else
32233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32234 $as_echo "no" >&6; }
32235 fi
32236 
32237 
32238     test -n "$AR" && break
32239   done
32240 fi
32241 if test -z "$AR"; then
32242   ac_ct_AR=$AR
32243   for ac_prog in ar
32244 do
32245   # Extract the first word of "$ac_prog", so it can be a program name with args.
32246 set dummy $ac_prog; ac_word=$2
32247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32248 $as_echo_n "checking for $ac_word... " >&6; }
32249 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32250   $as_echo_n "(cached) " >&6
32251 else
32252   if test -n "$ac_ct_AR"; then
32253   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32254 else
32255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32256 for as_dir in $PATH
32257 do
32258   IFS=$as_save_IFS
32259   test -z "$as_dir" && as_dir=.
32260     for ac_exec_ext in '' $ac_executable_extensions; do
32261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32262     ac_cv_prog_ac_ct_AR="$ac_prog"
32263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32264     break 2
32265   fi
32266 done
32267   done
32268 IFS=$as_save_IFS
32269 
32270 fi
32271 fi
32272 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32273 if test -n "$ac_ct_AR"; then
32274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32275 $as_echo "$ac_ct_AR" >&6; }
32276 else
32277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32278 $as_echo "no" >&6; }
32279 fi
32280 
32281 
32282   test -n "$ac_ct_AR" && break
32283 done
32284 
32285   if test "x$ac_ct_AR" = x; then
32286     AR=""
32287   else
32288     case $cross_compiling:$ac_tool_warned in
32289 yes:)
32290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32291 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32292 ac_tool_warned=yes ;;
32293 esac
32294     AR=$ac_ct_AR
32295   fi
32296 fi
32297 
32298   else
32299     # The variable is set, but is it from the command line or the environment?
32300 
32301     # Try to remove the string !AR! from our list.
32302     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32303     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32304       # If it failed, the variable was not from the command line. Ignore it,
32305       # but warn the user (except for BASH, which is always set by the calling BASH).
32306       if test "xAR" != xBASH; then
32307         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32308 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32309       fi
32310       # Try to locate tool using the code snippet
32311       if test -n "$ac_tool_prefix"; then
32312   for ac_prog in ar
32313   do
32314     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32315 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32317 $as_echo_n "checking for $ac_word... " >&6; }
32318 if ${ac_cv_prog_AR+:} false; then :
32319   $as_echo_n "(cached) " >&6
32320 else
32321   if test -n "$AR"; then
32322   ac_cv_prog_AR="$AR" # Let the user override the test.
32323 else
32324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32325 for as_dir in $PATH
32326 do
32327   IFS=$as_save_IFS
32328   test -z "$as_dir" && as_dir=.
32329     for ac_exec_ext in '' $ac_executable_extensions; do
32330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32331     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32333     break 2
32334   fi
32335 done
32336   done
32337 IFS=$as_save_IFS
32338 
32339 fi
32340 fi
32341 AR=$ac_cv_prog_AR
32342 if test -n "$AR"; then
32343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32344 $as_echo "$AR" >&6; }
32345 else
32346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32347 $as_echo "no" >&6; }
32348 fi
32349 
32350 
32351     test -n "$AR" && break
32352   done
32353 fi
32354 if test -z "$AR"; then
32355   ac_ct_AR=$AR
32356   for ac_prog in ar
32357 do
32358   # Extract the first word of "$ac_prog", so it can be a program name with args.
32359 set dummy $ac_prog; ac_word=$2
32360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32361 $as_echo_n "checking for $ac_word... " >&6; }
32362 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32363   $as_echo_n "(cached) " >&6
32364 else
32365   if test -n "$ac_ct_AR"; then
32366   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32367 else
32368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32369 for as_dir in $PATH
32370 do
32371   IFS=$as_save_IFS
32372   test -z "$as_dir" && as_dir=.
32373     for ac_exec_ext in '' $ac_executable_extensions; do
32374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32375     ac_cv_prog_ac_ct_AR="$ac_prog"
32376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32377     break 2
32378   fi
32379 done
32380   done
32381 IFS=$as_save_IFS
32382 
32383 fi
32384 fi
32385 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32386 if test -n "$ac_ct_AR"; then
32387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32388 $as_echo "$ac_ct_AR" >&6; }
32389 else
32390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32391 $as_echo "no" >&6; }
32392 fi
32393 
32394 
32395   test -n "$ac_ct_AR" && break
32396 done
32397 
32398   if test "x$ac_ct_AR" = x; then
32399     AR=""
32400   else
32401     case $cross_compiling:$ac_tool_warned in
32402 yes:)
32403 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32404 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32405 ac_tool_warned=yes ;;
32406 esac
32407     AR=$ac_ct_AR
32408   fi
32409 fi
32410 
32411     else
32412       # If it succeeded, then it was overridden by the user. We will use it
32413       # for the tool.
32414 
32415       # First remove it from the list of overridden variables, so we can test
32416       # for unknown variables in the end.
32417       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32418 
32419       # Check if the provided tool contains a complete path.
32420       tool_specified="$AR"
32421       tool_basename="${tool_specified##*/}"
32422       if test "x$tool_basename" = "x$tool_specified"; then
32423         # A command without a complete path is provided, search $PATH.
32424         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32425 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32426         # Extract the first word of "$tool_basename", so it can be a program name with args.
32427 set dummy $tool_basename; ac_word=$2
32428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32429 $as_echo_n "checking for $ac_word... " >&6; }
32430 if ${ac_cv_path_AR+:} false; then :
32431   $as_echo_n "(cached) " >&6
32432 else
32433   case $AR in
32434   [\\/]* | ?:[\\/]*)
32435   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32436   ;;
32437   *)
32438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32439 for as_dir in $PATH
32440 do
32441   IFS=$as_save_IFS
32442   test -z "$as_dir" && as_dir=.
32443     for ac_exec_ext in '' $ac_executable_extensions; do
32444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32445     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32447     break 2
32448   fi
32449 done
32450   done
32451 IFS=$as_save_IFS
32452 
32453   ;;
32454 esac
32455 fi
32456 AR=$ac_cv_path_AR
32457 if test -n "$AR"; then
32458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32459 $as_echo "$AR" >&6; }
32460 else
32461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32462 $as_echo "no" >&6; }
32463 fi
32464 
32465 
32466         if test "x$AR" = x; then
32467           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32468         fi
32469       else
32470         # Otherwise we believe it is a complete path. Use it as it is.
32471         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32472 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32473         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32474 $as_echo_n "checking for AR... " >&6; }
32475         if test ! -x "$tool_specified"; then
32476           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32477 $as_echo "not found" >&6; }
32478           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32479         fi
32480         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32481 $as_echo "$tool_specified" >&6; }
32482       fi
32483     fi
32484   fi
32485 
32486 
32487   fi
32488 
32489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32490 
32491   # First separate the path from the arguments. This will split at the first
32492   # space.
32493   complete="$AR"
32494   path="${complete%% *}"
32495   tmp="$complete EOL"
32496   arguments="${tmp#* }"
32497 
32498   # Input might be given as Windows format, start by converting to
32499   # unix format.
32500   new_path=`$CYGPATH -u "$path"`
32501 
32502   # Now try to locate executable using which
32503   new_path=`$WHICH "$new_path" 2> /dev/null`
32504   # bat and cmd files are not always considered executable in cygwin causing which
32505   # to not find them
32506   if test "x$new_path" = x \
32507       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32508       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32509     new_path=`$CYGPATH -u "$path"`
32510   fi
32511   if test "x$new_path" = x; then
32512     # Oops. Which didn't find the executable.
32513     # The splitting of arguments from the executable at a space might have been incorrect,
32514     # since paths with space are more likely in Windows. Give it another try with the whole
32515     # argument.
32516     path="$complete"
32517     arguments="EOL"
32518     new_path=`$CYGPATH -u "$path"`
32519     new_path=`$WHICH "$new_path" 2> /dev/null`
32520     # bat and cmd files are not always considered executable in cygwin causing which
32521     # to not find them
32522     if test "x$new_path" = x \
32523         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32524         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32525       new_path=`$CYGPATH -u "$path"`
32526     fi
32527     if test "x$new_path" = x; then
32528       # It's still not found. Now this is an unrecoverable error.
32529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32530 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32531       has_space=`$ECHO "$complete" | $GREP " "`
32532       if test "x$has_space" != x; then
32533         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32534 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32535       fi
32536       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32537     fi
32538   fi
32539 
32540   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32541   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32542   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32543   # "foo.exe" is OK but "foo" is an error.
32544   #
32545   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32546   # It is also a way to make sure we got the proper file name for the real test later on.
32547   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32548   if test "x$test_shortpath" = x; then
32549     # Short path failed, file does not exist as specified.
32550     # Try adding .exe or .cmd
32551     if test -f "${new_path}.exe"; then
32552       input_to_shortpath="${new_path}.exe"
32553     elif test -f "${new_path}.cmd"; then
32554       input_to_shortpath="${new_path}.cmd"
32555     else
32556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32557 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32558       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32559 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32560       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32561     fi
32562   else
32563     input_to_shortpath="$new_path"
32564   fi
32565 
32566   # Call helper function which possibly converts this using DOS-style short mode.
32567   # If so, the updated path is stored in $new_path.
32568   new_path="$input_to_shortpath"
32569 
32570   input_path="$input_to_shortpath"
32571   # Check if we need to convert this using DOS-style short mode. If the path
32572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32573   # take no chances and rewrite it.
32574   # Note: m4 eats our [], so we need to use [ and ] instead.
32575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32576   if test "x$has_forbidden_chars" != x; then
32577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32578     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32579     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32580     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32581       # Going to short mode and back again did indeed matter. Since short mode is
32582       # case insensitive, let's make it lowercase to improve readability.
32583       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32584       # Now convert it back to Unix-stile (cygpath)
32585       input_path=`$CYGPATH -u "$shortmode_path"`
32586       new_path="$input_path"
32587     fi
32588   fi
32589 
32590   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32591   if test "x$test_cygdrive_prefix" = x; then
32592     # As a simple fix, exclude /usr/bin since it's not a real path.
32593     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32594       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32595       # a path prefixed by /cygdrive for fixpath to work.
32596       new_path="$CYGWIN_ROOT_PATH$input_path"
32597     fi
32598   fi
32599 
32600   # remove trailing .exe if any
32601   new_path="${new_path/%.exe/}"
32602 
32603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32604 
32605   # First separate the path from the arguments. This will split at the first
32606   # space.
32607   complete="$AR"
32608   path="${complete%% *}"
32609   tmp="$complete EOL"
32610   arguments="${tmp#* }"
32611 
32612   # Input might be given as Windows format, start by converting to
32613   # unix format.
32614   new_path="$path"
32615 
32616   windows_path="$new_path"
32617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32618     unix_path=`$CYGPATH -u "$windows_path"`
32619     new_path="$unix_path"
32620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32622     new_path="$unix_path"
32623   fi
32624 
32625 
32626   # Now try to locate executable using which
32627   new_path=`$WHICH "$new_path" 2> /dev/null`
32628 
32629   if test "x$new_path" = x; then
32630     # Oops. Which didn't find the executable.
32631     # The splitting of arguments from the executable at a space might have been incorrect,
32632     # since paths with space are more likely in Windows. Give it another try with the whole
32633     # argument.
32634     path="$complete"
32635     arguments="EOL"
32636     new_path="$path"
32637 
32638   windows_path="$new_path"
32639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32640     unix_path=`$CYGPATH -u "$windows_path"`
32641     new_path="$unix_path"
32642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32644     new_path="$unix_path"
32645   fi
32646 
32647 
32648     new_path=`$WHICH "$new_path" 2> /dev/null`
32649     # bat and cmd files are not always considered executable in MSYS causing which
32650     # to not find them
32651     if test "x$new_path" = x \
32652         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32653         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32654       new_path="$path"
32655 
32656   windows_path="$new_path"
32657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32658     unix_path=`$CYGPATH -u "$windows_path"`
32659     new_path="$unix_path"
32660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32662     new_path="$unix_path"
32663   fi
32664 
32665     fi
32666 
32667     if test "x$new_path" = x; then
32668       # It's still not found. Now this is an unrecoverable error.
32669       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32670 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32671       has_space=`$ECHO "$complete" | $GREP " "`
32672       if test "x$has_space" != x; then
32673         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32674 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32675       fi
32676       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32677     fi
32678   fi
32679 
32680   # Now new_path has a complete unix path to the binary
32681   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32682     # Keep paths in /bin as-is, but remove trailing .exe if any
32683     new_path="${new_path/%.exe/}"
32684     # Do not save /bin paths to all_fixpath_prefixes!
32685   else
32686     # Not in mixed or Windows style, start by that.
32687     new_path=`cmd //c echo $new_path`
32688 
32689   input_path="$new_path"
32690   # Check if we need to convert this using DOS-style short mode. If the path
32691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32692   # take no chances and rewrite it.
32693   # Note: m4 eats our [], so we need to use [ and ] instead.
32694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32695   if test "x$has_forbidden_chars" != x; then
32696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32697     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32698   fi
32699 
32700     # Output is in $new_path
32701 
32702   windows_path="$new_path"
32703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32704     unix_path=`$CYGPATH -u "$windows_path"`
32705     new_path="$unix_path"
32706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32708     new_path="$unix_path"
32709   fi
32710 
32711     # remove trailing .exe if any
32712     new_path="${new_path/%.exe/}"
32713 
32714     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32715     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32716   fi
32717 
32718   else
32719     # We're on a unix platform. Hooray! :)
32720     # First separate the path from the arguments. This will split at the first
32721     # space.
32722     complete="$AR"
32723     path="${complete%% *}"
32724     tmp="$complete EOL"
32725     arguments="${tmp#* }"
32726 
32727     # Cannot rely on the command "which" here since it doesn't always work.
32728     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32729     if test -z "$is_absolute_path"; then
32730       # Path to executable is not absolute. Find it.
32731       IFS_save="$IFS"
32732       IFS=:
32733       for p in $PATH; do
32734         if test -f "$p/$path" && test -x "$p/$path"; then
32735           new_path="$p/$path"
32736           break
32737         fi
32738       done
32739       IFS="$IFS_save"
32740     else
32741       # This is an absolute path, we can use it without further modifications.
32742       new_path="$path"
32743     fi
32744 
32745     if test "x$new_path" = x; then
32746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32747 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32748       has_space=`$ECHO "$complete" | $GREP " "`
32749       if test "x$has_space" != x; then
32750         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32751 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32752       fi
32753       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32754     fi
32755   fi
32756 
32757   # Now join together the path and the arguments once again
32758   if test "x$arguments" != xEOL; then
32759     new_complete="$new_path ${arguments% *}"
32760   else
32761     new_complete="$new_path"
32762   fi
32763 
32764   if test "x$complete" != "x$new_complete"; then
32765     AR="$new_complete"
32766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32767 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32768   fi
32769 
32770 
32771 
32772   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32773     ac_ext=m
32774 ac_cpp='$OBJCPP $CPPFLAGS'
32775 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32776 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32777 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32778 if test -n "$ac_tool_prefix"; then
32779   for ac_prog in gcc objcc objc cc CC
32780   do
32781     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32782 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32784 $as_echo_n "checking for $ac_word... " >&6; }
32785 if ${ac_cv_prog_OBJC+:} false; then :
32786   $as_echo_n "(cached) " >&6
32787 else
32788   if test -n "$OBJC"; then
32789   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32790 else
32791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32792 for as_dir in $PATH
32793 do
32794   IFS=$as_save_IFS
32795   test -z "$as_dir" && as_dir=.
32796     for ac_exec_ext in '' $ac_executable_extensions; do
32797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32798     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32800     break 2
32801   fi
32802 done
32803   done
32804 IFS=$as_save_IFS
32805 
32806 fi
32807 fi
32808 OBJC=$ac_cv_prog_OBJC
32809 if test -n "$OBJC"; then
32810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32811 $as_echo "$OBJC" >&6; }
32812 else
32813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32814 $as_echo "no" >&6; }
32815 fi
32816 
32817 
32818     test -n "$OBJC" && break
32819   done
32820 fi
32821 if test -z "$OBJC"; then
32822   ac_ct_OBJC=$OBJC
32823   for ac_prog in gcc objcc objc cc CC
32824 do
32825   # Extract the first word of "$ac_prog", so it can be a program name with args.
32826 set dummy $ac_prog; ac_word=$2
32827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32828 $as_echo_n "checking for $ac_word... " >&6; }
32829 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32830   $as_echo_n "(cached) " >&6
32831 else
32832   if test -n "$ac_ct_OBJC"; then
32833   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32834 else
32835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32836 for as_dir in $PATH
32837 do
32838   IFS=$as_save_IFS
32839   test -z "$as_dir" && as_dir=.
32840     for ac_exec_ext in '' $ac_executable_extensions; do
32841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32842     ac_cv_prog_ac_ct_OBJC="$ac_prog"
32843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32844     break 2
32845   fi
32846 done
32847   done
32848 IFS=$as_save_IFS
32849 
32850 fi
32851 fi
32852 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32853 if test -n "$ac_ct_OBJC"; then
32854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32855 $as_echo "$ac_ct_OBJC" >&6; }
32856 else
32857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32858 $as_echo "no" >&6; }
32859 fi
32860 
32861 
32862   test -n "$ac_ct_OBJC" && break
32863 done
32864 
32865   if test "x$ac_ct_OBJC" = x; then
32866     OBJC="gcc"
32867   else
32868     case $cross_compiling:$ac_tool_warned in
32869 yes:)
32870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32871 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32872 ac_tool_warned=yes ;;
32873 esac
32874     OBJC=$ac_ct_OBJC
32875   fi
32876 fi
32877 
32878 # Provide some information about the compiler.
32879 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32880 set X $ac_compile
32881 ac_compiler=$2
32882 for ac_option in --version -v -V -qversion; do
32883   { { ac_try="$ac_compiler $ac_option >&5"
32884 case "(($ac_try" in
32885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32886   *) ac_try_echo=$ac_try;;
32887 esac
32888 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32889 $as_echo "$ac_try_echo"; } >&5
32890   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32891   ac_status=$?
32892   if test -s conftest.err; then
32893     sed '10a\
32894 ... rest of stderr output deleted ...
32895          10q' conftest.err >conftest.er1
32896     cat conftest.er1 >&5
32897   fi
32898   rm -f conftest.er1 conftest.err
32899   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32900   test $ac_status = 0; }
32901 done
32902 
32903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32904 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32905 if ${ac_cv_objc_compiler_gnu+:} false; then :
32906   $as_echo_n "(cached) " >&6
32907 else
32908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32909 /* end confdefs.h.  */
32910 
32911 int
32912 main ()
32913 {
32914 #ifndef __GNUC__
32915        choke me
32916 #endif
32917 
32918   ;
32919   return 0;
32920 }
32921 _ACEOF
32922 if ac_fn_objc_try_compile "$LINENO"; then :
32923   ac_compiler_gnu=yes
32924 else
32925   ac_compiler_gnu=no
32926 fi
32927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32928 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32929 
32930 fi
32931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32932 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32933 if test $ac_compiler_gnu = yes; then
32934   GOBJC=yes
32935 else
32936   GOBJC=
32937 fi
32938 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32939 ac_save_OBJCFLAGS=$OBJCFLAGS
32940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32941 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32942 if ${ac_cv_prog_objc_g+:} false; then :
32943   $as_echo_n "(cached) " >&6
32944 else
32945   ac_save_objc_werror_flag=$ac_objc_werror_flag
32946    ac_objc_werror_flag=yes
32947    ac_cv_prog_objc_g=no
32948    OBJCFLAGS="-g"
32949    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32950 /* end confdefs.h.  */
32951 
32952 int
32953 main ()
32954 {
32955 
32956   ;
32957   return 0;
32958 }
32959 _ACEOF
32960 if ac_fn_objc_try_compile "$LINENO"; then :
32961   ac_cv_prog_objc_g=yes
32962 else
32963   OBJCFLAGS=""
32964       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32965 /* end confdefs.h.  */
32966 
32967 int
32968 main ()
32969 {
32970 
32971   ;
32972   return 0;
32973 }
32974 _ACEOF
32975 if ac_fn_objc_try_compile "$LINENO"; then :
32976 
32977 else
32978   ac_objc_werror_flag=$ac_save_objc_werror_flag
32979          OBJCFLAGS="-g"
32980          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32981 /* end confdefs.h.  */
32982 
32983 int
32984 main ()
32985 {
32986 
32987   ;
32988   return 0;
32989 }
32990 _ACEOF
32991 if ac_fn_objc_try_compile "$LINENO"; then :
32992   ac_cv_prog_objc_g=yes
32993 fi
32994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32995 fi
32996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32997 fi
32998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32999    ac_objc_werror_flag=$ac_save_objc_werror_flag
33000 fi
33001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33002 $as_echo "$ac_cv_prog_objc_g" >&6; }
33003 if test "$ac_test_OBJCFLAGS" = set; then
33004   OBJCFLAGS=$ac_save_OBJCFLAGS
33005 elif test $ac_cv_prog_objc_g = yes; then
33006   if test "$GOBJC" = yes; then
33007     OBJCFLAGS="-g -O2"
33008   else
33009     OBJCFLAGS="-g"
33010   fi
33011 else
33012   if test "$GOBJC" = yes; then
33013     OBJCFLAGS="-O2"
33014   else
33015     OBJCFLAGS=
33016   fi
33017 fi
33018 ac_ext=cpp
33019 ac_cpp='$CXXCPP $CPPFLAGS'
33020 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33021 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33022 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33023 
33024 
33025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33026 
33027   # First separate the path from the arguments. This will split at the first
33028   # space.
33029   complete="$OBJC"
33030   path="${complete%% *}"
33031   tmp="$complete EOL"
33032   arguments="${tmp#* }"
33033 
33034   # Input might be given as Windows format, start by converting to
33035   # unix format.
33036   new_path=`$CYGPATH -u "$path"`
33037 
33038   # Now try to locate executable using which
33039   new_path=`$WHICH "$new_path" 2> /dev/null`
33040   # bat and cmd files are not always considered executable in cygwin causing which
33041   # to not find them
33042   if test "x$new_path" = x \
33043       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33044       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33045     new_path=`$CYGPATH -u "$path"`
33046   fi
33047   if test "x$new_path" = x; then
33048     # Oops. Which didn't find the executable.
33049     # The splitting of arguments from the executable at a space might have been incorrect,
33050     # since paths with space are more likely in Windows. Give it another try with the whole
33051     # argument.
33052     path="$complete"
33053     arguments="EOL"
33054     new_path=`$CYGPATH -u "$path"`
33055     new_path=`$WHICH "$new_path" 2> /dev/null`
33056     # bat and cmd files are not always considered executable in cygwin causing which
33057     # to not find them
33058     if test "x$new_path" = x \
33059         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33060         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33061       new_path=`$CYGPATH -u "$path"`
33062     fi
33063     if test "x$new_path" = x; then
33064       # It's still not found. Now this is an unrecoverable error.
33065       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33066 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33067       has_space=`$ECHO "$complete" | $GREP " "`
33068       if test "x$has_space" != x; then
33069         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33070 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33071       fi
33072       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33073     fi
33074   fi
33075 
33076   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33077   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33078   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33079   # "foo.exe" is OK but "foo" is an error.
33080   #
33081   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33082   # It is also a way to make sure we got the proper file name for the real test later on.
33083   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33084   if test "x$test_shortpath" = x; then
33085     # Short path failed, file does not exist as specified.
33086     # Try adding .exe or .cmd
33087     if test -f "${new_path}.exe"; then
33088       input_to_shortpath="${new_path}.exe"
33089     elif test -f "${new_path}.cmd"; then
33090       input_to_shortpath="${new_path}.cmd"
33091     else
33092       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33093 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33094       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33095 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33096       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33097     fi
33098   else
33099     input_to_shortpath="$new_path"
33100   fi
33101 
33102   # Call helper function which possibly converts this using DOS-style short mode.
33103   # If so, the updated path is stored in $new_path.
33104   new_path="$input_to_shortpath"
33105 
33106   input_path="$input_to_shortpath"
33107   # Check if we need to convert this using DOS-style short mode. If the path
33108   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33109   # take no chances and rewrite it.
33110   # Note: m4 eats our [], so we need to use [ and ] instead.
33111   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33112   if test "x$has_forbidden_chars" != x; then
33113     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33114     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33115     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33116     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33117       # Going to short mode and back again did indeed matter. Since short mode is
33118       # case insensitive, let's make it lowercase to improve readability.
33119       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33120       # Now convert it back to Unix-stile (cygpath)
33121       input_path=`$CYGPATH -u "$shortmode_path"`
33122       new_path="$input_path"
33123     fi
33124   fi
33125 
33126   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33127   if test "x$test_cygdrive_prefix" = x; then
33128     # As a simple fix, exclude /usr/bin since it's not a real path.
33129     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33130       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33131       # a path prefixed by /cygdrive for fixpath to work.
33132       new_path="$CYGWIN_ROOT_PATH$input_path"
33133     fi
33134   fi
33135 
33136   # remove trailing .exe if any
33137   new_path="${new_path/%.exe/}"
33138 
33139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33140 
33141   # First separate the path from the arguments. This will split at the first
33142   # space.
33143   complete="$OBJC"
33144   path="${complete%% *}"
33145   tmp="$complete EOL"
33146   arguments="${tmp#* }"
33147 
33148   # Input might be given as Windows format, start by converting to
33149   # unix format.
33150   new_path="$path"
33151 
33152   windows_path="$new_path"
33153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33154     unix_path=`$CYGPATH -u "$windows_path"`
33155     new_path="$unix_path"
33156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33157     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33158     new_path="$unix_path"
33159   fi
33160 
33161 
33162   # Now try to locate executable using which
33163   new_path=`$WHICH "$new_path" 2> /dev/null`
33164 
33165   if test "x$new_path" = x; then
33166     # Oops. Which didn't find the executable.
33167     # The splitting of arguments from the executable at a space might have been incorrect,
33168     # since paths with space are more likely in Windows. Give it another try with the whole
33169     # argument.
33170     path="$complete"
33171     arguments="EOL"
33172     new_path="$path"
33173 
33174   windows_path="$new_path"
33175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33176     unix_path=`$CYGPATH -u "$windows_path"`
33177     new_path="$unix_path"
33178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33180     new_path="$unix_path"
33181   fi
33182 
33183 
33184     new_path=`$WHICH "$new_path" 2> /dev/null`
33185     # bat and cmd files are not always considered executable in MSYS causing which
33186     # to not find them
33187     if test "x$new_path" = x \
33188         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33189         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33190       new_path="$path"
33191 
33192   windows_path="$new_path"
33193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33194     unix_path=`$CYGPATH -u "$windows_path"`
33195     new_path="$unix_path"
33196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33198     new_path="$unix_path"
33199   fi
33200 
33201     fi
33202 
33203     if test "x$new_path" = x; then
33204       # It's still not found. Now this is an unrecoverable error.
33205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33206 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33207       has_space=`$ECHO "$complete" | $GREP " "`
33208       if test "x$has_space" != x; then
33209         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33210 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33211       fi
33212       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33213     fi
33214   fi
33215 
33216   # Now new_path has a complete unix path to the binary
33217   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33218     # Keep paths in /bin as-is, but remove trailing .exe if any
33219     new_path="${new_path/%.exe/}"
33220     # Do not save /bin paths to all_fixpath_prefixes!
33221   else
33222     # Not in mixed or Windows style, start by that.
33223     new_path=`cmd //c echo $new_path`
33224 
33225   input_path="$new_path"
33226   # Check if we need to convert this using DOS-style short mode. If the path
33227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33228   # take no chances and rewrite it.
33229   # Note: m4 eats our [], so we need to use [ and ] instead.
33230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33231   if test "x$has_forbidden_chars" != x; then
33232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33233     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33234   fi
33235 
33236     # Output is in $new_path
33237 
33238   windows_path="$new_path"
33239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33240     unix_path=`$CYGPATH -u "$windows_path"`
33241     new_path="$unix_path"
33242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33244     new_path="$unix_path"
33245   fi
33246 
33247     # remove trailing .exe if any
33248     new_path="${new_path/%.exe/}"
33249 
33250     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33251     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33252   fi
33253 
33254   else
33255     # We're on a unix platform. Hooray! :)
33256     # First separate the path from the arguments. This will split at the first
33257     # space.
33258     complete="$OBJC"
33259     path="${complete%% *}"
33260     tmp="$complete EOL"
33261     arguments="${tmp#* }"
33262 
33263     # Cannot rely on the command "which" here since it doesn't always work.
33264     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33265     if test -z "$is_absolute_path"; then
33266       # Path to executable is not absolute. Find it.
33267       IFS_save="$IFS"
33268       IFS=:
33269       for p in $PATH; do
33270         if test -f "$p/$path" && test -x "$p/$path"; then
33271           new_path="$p/$path"
33272           break
33273         fi
33274       done
33275       IFS="$IFS_save"
33276     else
33277       # This is an absolute path, we can use it without further modifications.
33278       new_path="$path"
33279     fi
33280 
33281     if test "x$new_path" = x; then
33282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33283 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33284       has_space=`$ECHO "$complete" | $GREP " "`
33285       if test "x$has_space" != x; then
33286         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33287 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33288       fi
33289       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33290     fi
33291   fi
33292 
33293   # Now join together the path and the arguments once again
33294   if test "x$arguments" != xEOL; then
33295     new_complete="$new_path ${arguments% *}"
33296   else
33297     new_complete="$new_path"
33298   fi
33299 
33300   if test "x$complete" != "x$new_complete"; then
33301     OBJC="$new_complete"
33302     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33303 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33304   fi
33305 
33306 
33307 
33308   # Publish this variable in the help.
33309 
33310 
33311   if test "x$LIPO" = x; then
33312     # The variable is not set by user, try to locate tool using the code snippet
33313     for ac_prog in lipo
33314 do
33315   # Extract the first word of "$ac_prog", so it can be a program name with args.
33316 set dummy $ac_prog; ac_word=$2
33317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33318 $as_echo_n "checking for $ac_word... " >&6; }
33319 if ${ac_cv_path_LIPO+:} false; then :
33320   $as_echo_n "(cached) " >&6
33321 else
33322   case $LIPO in
33323   [\\/]* | ?:[\\/]*)
33324   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33325   ;;
33326   *)
33327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33328 for as_dir in $PATH
33329 do
33330   IFS=$as_save_IFS
33331   test -z "$as_dir" && as_dir=.
33332     for ac_exec_ext in '' $ac_executable_extensions; do
33333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33334     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33336     break 2
33337   fi
33338 done
33339   done
33340 IFS=$as_save_IFS
33341 
33342   ;;
33343 esac
33344 fi
33345 LIPO=$ac_cv_path_LIPO
33346 if test -n "$LIPO"; then
33347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33348 $as_echo "$LIPO" >&6; }
33349 else
33350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33351 $as_echo "no" >&6; }
33352 fi
33353 
33354 
33355   test -n "$LIPO" && break
33356 done
33357 
33358   else
33359     # The variable is set, but is it from the command line or the environment?
33360 
33361     # Try to remove the string !LIPO! from our list.
33362     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33363     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33364       # If it failed, the variable was not from the command line. Ignore it,
33365       # but warn the user (except for BASH, which is always set by the calling BASH).
33366       if test "xLIPO" != xBASH; then
33367         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33368 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33369       fi
33370       # Try to locate tool using the code snippet
33371       for ac_prog in lipo
33372 do
33373   # Extract the first word of "$ac_prog", so it can be a program name with args.
33374 set dummy $ac_prog; ac_word=$2
33375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33376 $as_echo_n "checking for $ac_word... " >&6; }
33377 if ${ac_cv_path_LIPO+:} false; then :
33378   $as_echo_n "(cached) " >&6
33379 else
33380   case $LIPO in
33381   [\\/]* | ?:[\\/]*)
33382   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33383   ;;
33384   *)
33385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33386 for as_dir in $PATH
33387 do
33388   IFS=$as_save_IFS
33389   test -z "$as_dir" && as_dir=.
33390     for ac_exec_ext in '' $ac_executable_extensions; do
33391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33392     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33394     break 2
33395   fi
33396 done
33397   done
33398 IFS=$as_save_IFS
33399 
33400   ;;
33401 esac
33402 fi
33403 LIPO=$ac_cv_path_LIPO
33404 if test -n "$LIPO"; then
33405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33406 $as_echo "$LIPO" >&6; }
33407 else
33408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33409 $as_echo "no" >&6; }
33410 fi
33411 
33412 
33413   test -n "$LIPO" && break
33414 done
33415 
33416     else
33417       # If it succeeded, then it was overridden by the user. We will use it
33418       # for the tool.
33419 
33420       # First remove it from the list of overridden variables, so we can test
33421       # for unknown variables in the end.
33422       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33423 
33424       # Check if the provided tool contains a complete path.
33425       tool_specified="$LIPO"
33426       tool_basename="${tool_specified##*/}"
33427       if test "x$tool_basename" = "x$tool_specified"; then
33428         # A command without a complete path is provided, search $PATH.
33429         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33430 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33431         # Extract the first word of "$tool_basename", so it can be a program name with args.
33432 set dummy $tool_basename; ac_word=$2
33433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33434 $as_echo_n "checking for $ac_word... " >&6; }
33435 if ${ac_cv_path_LIPO+:} false; then :
33436   $as_echo_n "(cached) " >&6
33437 else
33438   case $LIPO in
33439   [\\/]* | ?:[\\/]*)
33440   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33441   ;;
33442   *)
33443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33444 for as_dir in $PATH
33445 do
33446   IFS=$as_save_IFS
33447   test -z "$as_dir" && as_dir=.
33448     for ac_exec_ext in '' $ac_executable_extensions; do
33449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33450     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33452     break 2
33453   fi
33454 done
33455   done
33456 IFS=$as_save_IFS
33457 
33458   ;;
33459 esac
33460 fi
33461 LIPO=$ac_cv_path_LIPO
33462 if test -n "$LIPO"; then
33463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33464 $as_echo "$LIPO" >&6; }
33465 else
33466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33467 $as_echo "no" >&6; }
33468 fi
33469 
33470 
33471         if test "x$LIPO" = x; then
33472           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33473         fi
33474       else
33475         # Otherwise we believe it is a complete path. Use it as it is.
33476         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33477 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33478         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33479 $as_echo_n "checking for LIPO... " >&6; }
33480         if test ! -x "$tool_specified"; then
33481           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33482 $as_echo "not found" >&6; }
33483           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33484         fi
33485         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33486 $as_echo "$tool_specified" >&6; }
33487       fi
33488     fi
33489   fi
33490 
33491 
33492 
33493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33494 
33495   # First separate the path from the arguments. This will split at the first
33496   # space.
33497   complete="$LIPO"
33498   path="${complete%% *}"
33499   tmp="$complete EOL"
33500   arguments="${tmp#* }"
33501 
33502   # Input might be given as Windows format, start by converting to
33503   # unix format.
33504   new_path=`$CYGPATH -u "$path"`
33505 
33506   # Now try to locate executable using which
33507   new_path=`$WHICH "$new_path" 2> /dev/null`
33508   # bat and cmd files are not always considered executable in cygwin causing which
33509   # to not find them
33510   if test "x$new_path" = x \
33511       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33512       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33513     new_path=`$CYGPATH -u "$path"`
33514   fi
33515   if test "x$new_path" = x; then
33516     # Oops. Which didn't find the executable.
33517     # The splitting of arguments from the executable at a space might have been incorrect,
33518     # since paths with space are more likely in Windows. Give it another try with the whole
33519     # argument.
33520     path="$complete"
33521     arguments="EOL"
33522     new_path=`$CYGPATH -u "$path"`
33523     new_path=`$WHICH "$new_path" 2> /dev/null`
33524     # bat and cmd files are not always considered executable in cygwin causing which
33525     # to not find them
33526     if test "x$new_path" = x \
33527         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33528         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33529       new_path=`$CYGPATH -u "$path"`
33530     fi
33531     if test "x$new_path" = x; then
33532       # It's still not found. Now this is an unrecoverable error.
33533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33534 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33535       has_space=`$ECHO "$complete" | $GREP " "`
33536       if test "x$has_space" != x; then
33537         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33538 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33539       fi
33540       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33541     fi
33542   fi
33543 
33544   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33545   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33546   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33547   # "foo.exe" is OK but "foo" is an error.
33548   #
33549   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33550   # It is also a way to make sure we got the proper file name for the real test later on.
33551   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33552   if test "x$test_shortpath" = x; then
33553     # Short path failed, file does not exist as specified.
33554     # Try adding .exe or .cmd
33555     if test -f "${new_path}.exe"; then
33556       input_to_shortpath="${new_path}.exe"
33557     elif test -f "${new_path}.cmd"; then
33558       input_to_shortpath="${new_path}.cmd"
33559     else
33560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33561 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33562       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33563 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33564       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33565     fi
33566   else
33567     input_to_shortpath="$new_path"
33568   fi
33569 
33570   # Call helper function which possibly converts this using DOS-style short mode.
33571   # If so, the updated path is stored in $new_path.
33572   new_path="$input_to_shortpath"
33573 
33574   input_path="$input_to_shortpath"
33575   # Check if we need to convert this using DOS-style short mode. If the path
33576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33577   # take no chances and rewrite it.
33578   # Note: m4 eats our [], so we need to use [ and ] instead.
33579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33580   if test "x$has_forbidden_chars" != x; then
33581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33585       # Going to short mode and back again did indeed matter. Since short mode is
33586       # case insensitive, let's make it lowercase to improve readability.
33587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33588       # Now convert it back to Unix-stile (cygpath)
33589       input_path=`$CYGPATH -u "$shortmode_path"`
33590       new_path="$input_path"
33591     fi
33592   fi
33593 
33594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33595   if test "x$test_cygdrive_prefix" = x; then
33596     # As a simple fix, exclude /usr/bin since it's not a real path.
33597     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33599       # a path prefixed by /cygdrive for fixpath to work.
33600       new_path="$CYGWIN_ROOT_PATH$input_path"
33601     fi
33602   fi
33603 
33604   # remove trailing .exe if any
33605   new_path="${new_path/%.exe/}"
33606 
33607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33608 
33609   # First separate the path from the arguments. This will split at the first
33610   # space.
33611   complete="$LIPO"
33612   path="${complete%% *}"
33613   tmp="$complete EOL"
33614   arguments="${tmp#* }"
33615 
33616   # Input might be given as Windows format, start by converting to
33617   # unix format.
33618   new_path="$path"
33619 
33620   windows_path="$new_path"
33621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33622     unix_path=`$CYGPATH -u "$windows_path"`
33623     new_path="$unix_path"
33624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33626     new_path="$unix_path"
33627   fi
33628 
33629 
33630   # Now try to locate executable using which
33631   new_path=`$WHICH "$new_path" 2> /dev/null`
33632 
33633   if test "x$new_path" = x; then
33634     # Oops. Which didn't find the executable.
33635     # The splitting of arguments from the executable at a space might have been incorrect,
33636     # since paths with space are more likely in Windows. Give it another try with the whole
33637     # argument.
33638     path="$complete"
33639     arguments="EOL"
33640     new_path="$path"
33641 
33642   windows_path="$new_path"
33643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33644     unix_path=`$CYGPATH -u "$windows_path"`
33645     new_path="$unix_path"
33646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33648     new_path="$unix_path"
33649   fi
33650 
33651 
33652     new_path=`$WHICH "$new_path" 2> /dev/null`
33653     # bat and cmd files are not always considered executable in MSYS causing which
33654     # to not find them
33655     if test "x$new_path" = x \
33656         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33657         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33658       new_path="$path"
33659 
33660   windows_path="$new_path"
33661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33662     unix_path=`$CYGPATH -u "$windows_path"`
33663     new_path="$unix_path"
33664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33666     new_path="$unix_path"
33667   fi
33668 
33669     fi
33670 
33671     if test "x$new_path" = x; then
33672       # It's still not found. Now this is an unrecoverable error.
33673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33674 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33675       has_space=`$ECHO "$complete" | $GREP " "`
33676       if test "x$has_space" != x; then
33677         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33678 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33679       fi
33680       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33681     fi
33682   fi
33683 
33684   # Now new_path has a complete unix path to the binary
33685   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33686     # Keep paths in /bin as-is, but remove trailing .exe if any
33687     new_path="${new_path/%.exe/}"
33688     # Do not save /bin paths to all_fixpath_prefixes!
33689   else
33690     # Not in mixed or Windows style, start by that.
33691     new_path=`cmd //c echo $new_path`
33692 
33693   input_path="$new_path"
33694   # Check if we need to convert this using DOS-style short mode. If the path
33695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33696   # take no chances and rewrite it.
33697   # Note: m4 eats our [], so we need to use [ and ] instead.
33698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33699   if test "x$has_forbidden_chars" != x; then
33700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33701     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33702   fi
33703 
33704     # Output is in $new_path
33705 
33706   windows_path="$new_path"
33707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33708     unix_path=`$CYGPATH -u "$windows_path"`
33709     new_path="$unix_path"
33710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33712     new_path="$unix_path"
33713   fi
33714 
33715     # remove trailing .exe if any
33716     new_path="${new_path/%.exe/}"
33717 
33718     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33719     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33720   fi
33721 
33722   else
33723     # We're on a unix platform. Hooray! :)
33724     # First separate the path from the arguments. This will split at the first
33725     # space.
33726     complete="$LIPO"
33727     path="${complete%% *}"
33728     tmp="$complete EOL"
33729     arguments="${tmp#* }"
33730 
33731     # Cannot rely on the command "which" here since it doesn't always work.
33732     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33733     if test -z "$is_absolute_path"; then
33734       # Path to executable is not absolute. Find it.
33735       IFS_save="$IFS"
33736       IFS=:
33737       for p in $PATH; do
33738         if test -f "$p/$path" && test -x "$p/$path"; then
33739           new_path="$p/$path"
33740           break
33741         fi
33742       done
33743       IFS="$IFS_save"
33744     else
33745       # This is an absolute path, we can use it without further modifications.
33746       new_path="$path"
33747     fi
33748 
33749     if test "x$new_path" = x; then
33750       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33751 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33752       has_space=`$ECHO "$complete" | $GREP " "`
33753       if test "x$has_space" != x; then
33754         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33755 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33756       fi
33757       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33758     fi
33759   fi
33760 
33761   # Now join together the path and the arguments once again
33762   if test "x$arguments" != xEOL; then
33763     new_complete="$new_path ${arguments% *}"
33764   else
33765     new_complete="$new_path"
33766   fi
33767 
33768   if test "x$complete" != "x$new_complete"; then
33769     LIPO="$new_complete"
33770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33771 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33772   fi
33773 
33774   else
33775     OBJC=
33776   fi
33777 
33778   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33779     # Extract the first word of "mt", so it can be a program name with args.
33780 set dummy mt; ac_word=$2
33781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33782 $as_echo_n "checking for $ac_word... " >&6; }
33783 if ${ac_cv_prog_MT+:} false; then :
33784   $as_echo_n "(cached) " >&6
33785 else
33786   if test -n "$MT"; then
33787   ac_cv_prog_MT="$MT" # Let the user override the test.
33788 else
33789   ac_prog_rejected=no
33790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33791 for as_dir in $PATH
33792 do
33793   IFS=$as_save_IFS
33794   test -z "$as_dir" && as_dir=.
33795     for ac_exec_ext in '' $ac_executable_extensions; do
33796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33797     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33798        ac_prog_rejected=yes
33799        continue
33800      fi
33801     ac_cv_prog_MT="mt"
33802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33803     break 2
33804   fi
33805 done
33806   done
33807 IFS=$as_save_IFS
33808 
33809 if test $ac_prog_rejected = yes; then
33810   # We found a bogon in the path, so make sure we never use it.
33811   set dummy $ac_cv_prog_MT
33812   shift
33813   if test $# != 0; then
33814     # We chose a different compiler from the bogus one.
33815     # However, it has the same basename, so the bogon will be chosen
33816     # first if we set MT to just the basename; use the full file name.
33817     shift
33818     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33819   fi
33820 fi
33821 fi
33822 fi
33823 MT=$ac_cv_prog_MT
33824 if test -n "$MT"; then
33825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33826 $as_echo "$MT" >&6; }
33827 else
33828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33829 $as_echo "no" >&6; }
33830 fi
33831 
33832 
33833 
33834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33835 
33836   # First separate the path from the arguments. This will split at the first
33837   # space.
33838   complete="$MT"
33839   path="${complete%% *}"
33840   tmp="$complete EOL"
33841   arguments="${tmp#* }"
33842 
33843   # Input might be given as Windows format, start by converting to
33844   # unix format.
33845   new_path=`$CYGPATH -u "$path"`
33846 
33847   # Now try to locate executable using which
33848   new_path=`$WHICH "$new_path" 2> /dev/null`
33849   # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
33855   fi
33856   if test "x$new_path" = x; then
33857     # Oops. Which didn't find the executable.
33858     # The splitting of arguments from the executable at a space might have been incorrect,
33859     # since paths with space are more likely in Windows. Give it another try with the whole
33860     # argument.
33861     path="$complete"
33862     arguments="EOL"
33863     new_path=`$CYGPATH -u "$path"`
33864     new_path=`$WHICH "$new_path" 2> /dev/null`
33865     # bat and cmd files are not always considered executable in cygwin causing which
33866     # to not find them
33867     if test "x$new_path" = x \
33868         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33869         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33870       new_path=`$CYGPATH -u "$path"`
33871     fi
33872     if test "x$new_path" = x; then
33873       # It's still not found. Now this is an unrecoverable error.
33874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33875 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33876       has_space=`$ECHO "$complete" | $GREP " "`
33877       if test "x$has_space" != x; then
33878         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33880       fi
33881       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33882     fi
33883   fi
33884 
33885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33888   # "foo.exe" is OK but "foo" is an error.
33889   #
33890   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33891   # It is also a way to make sure we got the proper file name for the real test later on.
33892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33893   if test "x$test_shortpath" = x; then
33894     # Short path failed, file does not exist as specified.
33895     # Try adding .exe or .cmd
33896     if test -f "${new_path}.exe"; then
33897       input_to_shortpath="${new_path}.exe"
33898     elif test -f "${new_path}.cmd"; then
33899       input_to_shortpath="${new_path}.cmd"
33900     else
33901       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33902 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33903       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33904 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33905       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33906     fi
33907   else
33908     input_to_shortpath="$new_path"
33909   fi
33910 
33911   # Call helper function which possibly converts this using DOS-style short mode.
33912   # If so, the updated path is stored in $new_path.
33913   new_path="$input_to_shortpath"
33914 
33915   input_path="$input_to_shortpath"
33916   # Check if we need to convert this using DOS-style short mode. If the path
33917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33918   # take no chances and rewrite it.
33919   # Note: m4 eats our [], so we need to use [ and ] instead.
33920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33921   if test "x$has_forbidden_chars" != x; then
33922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33923     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33924     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33925     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33926       # Going to short mode and back again did indeed matter. Since short mode is
33927       # case insensitive, let's make it lowercase to improve readability.
33928       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33929       # Now convert it back to Unix-stile (cygpath)
33930       input_path=`$CYGPATH -u "$shortmode_path"`
33931       new_path="$input_path"
33932     fi
33933   fi
33934 
33935   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33936   if test "x$test_cygdrive_prefix" = x; then
33937     # As a simple fix, exclude /usr/bin since it's not a real path.
33938     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33939       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33940       # a path prefixed by /cygdrive for fixpath to work.
33941       new_path="$CYGWIN_ROOT_PATH$input_path"
33942     fi
33943   fi
33944 
33945   # remove trailing .exe if any
33946   new_path="${new_path/%.exe/}"
33947 
33948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33949 
33950   # First separate the path from the arguments. This will split at the first
33951   # space.
33952   complete="$MT"
33953   path="${complete%% *}"
33954   tmp="$complete EOL"
33955   arguments="${tmp#* }"
33956 
33957   # Input might be given as Windows format, start by converting to
33958   # unix format.
33959   new_path="$path"
33960 
33961   windows_path="$new_path"
33962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33963     unix_path=`$CYGPATH -u "$windows_path"`
33964     new_path="$unix_path"
33965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33967     new_path="$unix_path"
33968   fi
33969 
33970 
33971   # Now try to locate executable using which
33972   new_path=`$WHICH "$new_path" 2> /dev/null`
33973 
33974   if test "x$new_path" = x; then
33975     # Oops. Which didn't find the executable.
33976     # The splitting of arguments from the executable at a space might have been incorrect,
33977     # since paths with space are more likely in Windows. Give it another try with the whole
33978     # argument.
33979     path="$complete"
33980     arguments="EOL"
33981     new_path="$path"
33982 
33983   windows_path="$new_path"
33984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33985     unix_path=`$CYGPATH -u "$windows_path"`
33986     new_path="$unix_path"
33987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33989     new_path="$unix_path"
33990   fi
33991 
33992 
33993     new_path=`$WHICH "$new_path" 2> /dev/null`
33994     # bat and cmd files are not always considered executable in MSYS causing which
33995     # to not find them
33996     if test "x$new_path" = x \
33997         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33998         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33999       new_path="$path"
34000 
34001   windows_path="$new_path"
34002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34003     unix_path=`$CYGPATH -u "$windows_path"`
34004     new_path="$unix_path"
34005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34007     new_path="$unix_path"
34008   fi
34009 
34010     fi
34011 
34012     if test "x$new_path" = x; then
34013       # It's still not found. Now this is an unrecoverable error.
34014       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34015 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34016       has_space=`$ECHO "$complete" | $GREP " "`
34017       if test "x$has_space" != x; then
34018         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34019 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34020       fi
34021       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34022     fi
34023   fi
34024 
34025   # Now new_path has a complete unix path to the binary
34026   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34027     # Keep paths in /bin as-is, but remove trailing .exe if any
34028     new_path="${new_path/%.exe/}"
34029     # Do not save /bin paths to all_fixpath_prefixes!
34030   else
34031     # Not in mixed or Windows style, start by that.
34032     new_path=`cmd //c echo $new_path`
34033 
34034   input_path="$new_path"
34035   # Check if we need to convert this using DOS-style short mode. If the path
34036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34037   # take no chances and rewrite it.
34038   # Note: m4 eats our [], so we need to use [ and ] instead.
34039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34040   if test "x$has_forbidden_chars" != x; then
34041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34043   fi
34044 
34045     # Output is in $new_path
34046 
34047   windows_path="$new_path"
34048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34049     unix_path=`$CYGPATH -u "$windows_path"`
34050     new_path="$unix_path"
34051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34053     new_path="$unix_path"
34054   fi
34055 
34056     # remove trailing .exe if any
34057     new_path="${new_path/%.exe/}"
34058 
34059     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34060     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34061   fi
34062 
34063   else
34064     # We're on a unix platform. Hooray! :)
34065     # First separate the path from the arguments. This will split at the first
34066     # space.
34067     complete="$MT"
34068     path="${complete%% *}"
34069     tmp="$complete EOL"
34070     arguments="${tmp#* }"
34071 
34072     # Cannot rely on the command "which" here since it doesn't always work.
34073     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34074     if test -z "$is_absolute_path"; then
34075       # Path to executable is not absolute. Find it.
34076       IFS_save="$IFS"
34077       IFS=:
34078       for p in $PATH; do
34079         if test -f "$p/$path" && test -x "$p/$path"; then
34080           new_path="$p/$path"
34081           break
34082         fi
34083       done
34084       IFS="$IFS_save"
34085     else
34086       # This is an absolute path, we can use it without further modifications.
34087       new_path="$path"
34088     fi
34089 
34090     if test "x$new_path" = x; then
34091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34092 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34093       has_space=`$ECHO "$complete" | $GREP " "`
34094       if test "x$has_space" != x; then
34095         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34096 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34097       fi
34098       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34099     fi
34100   fi
34101 
34102   # Now join together the path and the arguments once again
34103   if test "x$arguments" != xEOL; then
34104     new_complete="$new_path ${arguments% *}"
34105   else
34106     new_complete="$new_path"
34107   fi
34108 
34109   if test "x$complete" != "x$new_complete"; then
34110     MT="$new_complete"
34111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34112 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34113   fi
34114 
34115     # Setup the resource compiler (RC)
34116     # Extract the first word of "rc", so it can be a program name with args.
34117 set dummy rc; ac_word=$2
34118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34119 $as_echo_n "checking for $ac_word... " >&6; }
34120 if ${ac_cv_prog_RC+:} false; then :
34121   $as_echo_n "(cached) " >&6
34122 else
34123   if test -n "$RC"; then
34124   ac_cv_prog_RC="$RC" # Let the user override the test.
34125 else
34126   ac_prog_rejected=no
34127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34128 for as_dir in $PATH
34129 do
34130   IFS=$as_save_IFS
34131   test -z "$as_dir" && as_dir=.
34132     for ac_exec_ext in '' $ac_executable_extensions; do
34133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34134     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34135        ac_prog_rejected=yes
34136        continue
34137      fi
34138     ac_cv_prog_RC="rc"
34139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34140     break 2
34141   fi
34142 done
34143   done
34144 IFS=$as_save_IFS
34145 
34146 if test $ac_prog_rejected = yes; then
34147   # We found a bogon in the path, so make sure we never use it.
34148   set dummy $ac_cv_prog_RC
34149   shift
34150   if test $# != 0; then
34151     # We chose a different compiler from the bogus one.
34152     # However, it has the same basename, so the bogon will be chosen
34153     # first if we set RC to just the basename; use the full file name.
34154     shift
34155     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34156   fi
34157 fi
34158 fi
34159 fi
34160 RC=$ac_cv_prog_RC
34161 if test -n "$RC"; then
34162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34163 $as_echo "$RC" >&6; }
34164 else
34165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34166 $as_echo "no" >&6; }
34167 fi
34168 
34169 
34170 
34171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34172 
34173   # First separate the path from the arguments. This will split at the first
34174   # space.
34175   complete="$RC"
34176   path="${complete%% *}"
34177   tmp="$complete EOL"
34178   arguments="${tmp#* }"
34179 
34180   # Input might be given as Windows format, start by converting to
34181   # unix format.
34182   new_path=`$CYGPATH -u "$path"`
34183 
34184   # Now try to locate executable using which
34185   new_path=`$WHICH "$new_path" 2> /dev/null`
34186   # bat and cmd files are not always considered executable in cygwin causing which
34187   # to not find them
34188   if test "x$new_path" = x \
34189       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34190       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34191     new_path=`$CYGPATH -u "$path"`
34192   fi
34193   if test "x$new_path" = x; then
34194     # Oops. Which didn't find the executable.
34195     # The splitting of arguments from the executable at a space might have been incorrect,
34196     # since paths with space are more likely in Windows. Give it another try with the whole
34197     # argument.
34198     path="$complete"
34199     arguments="EOL"
34200     new_path=`$CYGPATH -u "$path"`
34201     new_path=`$WHICH "$new_path" 2> /dev/null`
34202     # bat and cmd files are not always considered executable in cygwin causing which
34203     # to not find them
34204     if test "x$new_path" = x \
34205         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34206         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34207       new_path=`$CYGPATH -u "$path"`
34208     fi
34209     if test "x$new_path" = x; then
34210       # It's still not found. Now this is an unrecoverable error.
34211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34212 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34213       has_space=`$ECHO "$complete" | $GREP " "`
34214       if test "x$has_space" != x; then
34215         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34216 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34217       fi
34218       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34219     fi
34220   fi
34221 
34222   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34223   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34224   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34225   # "foo.exe" is OK but "foo" is an error.
34226   #
34227   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34228   # It is also a way to make sure we got the proper file name for the real test later on.
34229   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34230   if test "x$test_shortpath" = x; then
34231     # Short path failed, file does not exist as specified.
34232     # Try adding .exe or .cmd
34233     if test -f "${new_path}.exe"; then
34234       input_to_shortpath="${new_path}.exe"
34235     elif test -f "${new_path}.cmd"; then
34236       input_to_shortpath="${new_path}.cmd"
34237     else
34238       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34239 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34240       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34241 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34242       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34243     fi
34244   else
34245     input_to_shortpath="$new_path"
34246   fi
34247 
34248   # Call helper function which possibly converts this using DOS-style short mode.
34249   # If so, the updated path is stored in $new_path.
34250   new_path="$input_to_shortpath"
34251 
34252   input_path="$input_to_shortpath"
34253   # Check if we need to convert this using DOS-style short mode. If the path
34254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34255   # take no chances and rewrite it.
34256   # Note: m4 eats our [], so we need to use [ and ] instead.
34257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34258   if test "x$has_forbidden_chars" != x; then
34259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34260     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34261     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34262     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34263       # Going to short mode and back again did indeed matter. Since short mode is
34264       # case insensitive, let's make it lowercase to improve readability.
34265       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34266       # Now convert it back to Unix-stile (cygpath)
34267       input_path=`$CYGPATH -u "$shortmode_path"`
34268       new_path="$input_path"
34269     fi
34270   fi
34271 
34272   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34273   if test "x$test_cygdrive_prefix" = x; then
34274     # As a simple fix, exclude /usr/bin since it's not a real path.
34275     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34276       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34277       # a path prefixed by /cygdrive for fixpath to work.
34278       new_path="$CYGWIN_ROOT_PATH$input_path"
34279     fi
34280   fi
34281 
34282   # remove trailing .exe if any
34283   new_path="${new_path/%.exe/}"
34284 
34285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34286 
34287   # First separate the path from the arguments. This will split at the first
34288   # space.
34289   complete="$RC"
34290   path="${complete%% *}"
34291   tmp="$complete EOL"
34292   arguments="${tmp#* }"
34293 
34294   # Input might be given as Windows format, start by converting to
34295   # unix format.
34296   new_path="$path"
34297 
34298   windows_path="$new_path"
34299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34300     unix_path=`$CYGPATH -u "$windows_path"`
34301     new_path="$unix_path"
34302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34304     new_path="$unix_path"
34305   fi
34306 
34307 
34308   # Now try to locate executable using which
34309   new_path=`$WHICH "$new_path" 2> /dev/null`
34310 
34311   if test "x$new_path" = x; then
34312     # Oops. Which didn't find the executable.
34313     # The splitting of arguments from the executable at a space might have been incorrect,
34314     # since paths with space are more likely in Windows. Give it another try with the whole
34315     # argument.
34316     path="$complete"
34317     arguments="EOL"
34318     new_path="$path"
34319 
34320   windows_path="$new_path"
34321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34322     unix_path=`$CYGPATH -u "$windows_path"`
34323     new_path="$unix_path"
34324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34326     new_path="$unix_path"
34327   fi
34328 
34329 
34330     new_path=`$WHICH "$new_path" 2> /dev/null`
34331     # bat and cmd files are not always considered executable in MSYS causing which
34332     # to not find them
34333     if test "x$new_path" = x \
34334         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34335         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34336       new_path="$path"
34337 
34338   windows_path="$new_path"
34339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34340     unix_path=`$CYGPATH -u "$windows_path"`
34341     new_path="$unix_path"
34342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34344     new_path="$unix_path"
34345   fi
34346 
34347     fi
34348 
34349     if test "x$new_path" = x; then
34350       # It's still not found. Now this is an unrecoverable error.
34351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34352 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34353       has_space=`$ECHO "$complete" | $GREP " "`
34354       if test "x$has_space" != x; then
34355         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34356 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34357       fi
34358       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34359     fi
34360   fi
34361 
34362   # Now new_path has a complete unix path to the binary
34363   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34364     # Keep paths in /bin as-is, but remove trailing .exe if any
34365     new_path="${new_path/%.exe/}"
34366     # Do not save /bin paths to all_fixpath_prefixes!
34367   else
34368     # Not in mixed or Windows style, start by that.
34369     new_path=`cmd //c echo $new_path`
34370 
34371   input_path="$new_path"
34372   # Check if we need to convert this using DOS-style short mode. If the path
34373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34374   # take no chances and rewrite it.
34375   # Note: m4 eats our [], so we need to use [ and ] instead.
34376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34377   if test "x$has_forbidden_chars" != x; then
34378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34379     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34380   fi
34381 
34382     # Output is in $new_path
34383 
34384   windows_path="$new_path"
34385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34386     unix_path=`$CYGPATH -u "$windows_path"`
34387     new_path="$unix_path"
34388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34390     new_path="$unix_path"
34391   fi
34392 
34393     # remove trailing .exe if any
34394     new_path="${new_path/%.exe/}"
34395 
34396     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34397     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34398   fi
34399 
34400   else
34401     # We're on a unix platform. Hooray! :)
34402     # First separate the path from the arguments. This will split at the first
34403     # space.
34404     complete="$RC"
34405     path="${complete%% *}"
34406     tmp="$complete EOL"
34407     arguments="${tmp#* }"
34408 
34409     # Cannot rely on the command "which" here since it doesn't always work.
34410     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34411     if test -z "$is_absolute_path"; then
34412       # Path to executable is not absolute. Find it.
34413       IFS_save="$IFS"
34414       IFS=:
34415       for p in $PATH; do
34416         if test -f "$p/$path" && test -x "$p/$path"; then
34417           new_path="$p/$path"
34418           break
34419         fi
34420       done
34421       IFS="$IFS_save"
34422     else
34423       # This is an absolute path, we can use it without further modifications.
34424       new_path="$path"
34425     fi
34426 
34427     if test "x$new_path" = x; then
34428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34429 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34430       has_space=`$ECHO "$complete" | $GREP " "`
34431       if test "x$has_space" != x; then
34432         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34433 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34434       fi
34435       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34436     fi
34437   fi
34438 
34439   # Now join together the path and the arguments once again
34440   if test "x$arguments" != xEOL; then
34441     new_complete="$new_path ${arguments% *}"
34442   else
34443     new_complete="$new_path"
34444   fi
34445 
34446   if test "x$complete" != "x$new_complete"; then
34447     RC="$new_complete"
34448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34449 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34450   fi
34451 
34452     # Extract the first word of "dumpbin", so it can be a program name with args.
34453 set dummy dumpbin; ac_word=$2
34454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34455 $as_echo_n "checking for $ac_word... " >&6; }
34456 if ${ac_cv_prog_DUMPBIN+:} false; then :
34457   $as_echo_n "(cached) " >&6
34458 else
34459   if test -n "$DUMPBIN"; then
34460   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34461 else
34462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34463 for as_dir in $PATH
34464 do
34465   IFS=$as_save_IFS
34466   test -z "$as_dir" && as_dir=.
34467     for ac_exec_ext in '' $ac_executable_extensions; do
34468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34469     ac_cv_prog_DUMPBIN="dumpbin"
34470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34471     break 2
34472   fi
34473 done
34474   done
34475 IFS=$as_save_IFS
34476 
34477 fi
34478 fi
34479 DUMPBIN=$ac_cv_prog_DUMPBIN
34480 if test -n "$DUMPBIN"; then
34481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34482 $as_echo "$DUMPBIN" >&6; }
34483 else
34484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34485 $as_echo "no" >&6; }
34486 fi
34487 
34488 
34489 
34490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34491 
34492   # First separate the path from the arguments. This will split at the first
34493   # space.
34494   complete="$DUMPBIN"
34495   path="${complete%% *}"
34496   tmp="$complete EOL"
34497   arguments="${tmp#* }"
34498 
34499   # Input might be given as Windows format, start by converting to
34500   # unix format.
34501   new_path=`$CYGPATH -u "$path"`
34502 
34503   # Now try to locate executable using which
34504   new_path=`$WHICH "$new_path" 2> /dev/null`
34505   # bat and cmd files are not always considered executable in cygwin causing which
34506   # to not find them
34507   if test "x$new_path" = x \
34508       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34509       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34510     new_path=`$CYGPATH -u "$path"`
34511   fi
34512   if test "x$new_path" = x; then
34513     # Oops. Which didn't find the executable.
34514     # The splitting of arguments from the executable at a space might have been incorrect,
34515     # since paths with space are more likely in Windows. Give it another try with the whole
34516     # argument.
34517     path="$complete"
34518     arguments="EOL"
34519     new_path=`$CYGPATH -u "$path"`
34520     new_path=`$WHICH "$new_path" 2> /dev/null`
34521     # bat and cmd files are not always considered executable in cygwin causing which
34522     # to not find them
34523     if test "x$new_path" = x \
34524         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34525         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34526       new_path=`$CYGPATH -u "$path"`
34527     fi
34528     if test "x$new_path" = x; then
34529       # It's still not found. Now this is an unrecoverable error.
34530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34531 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34532       has_space=`$ECHO "$complete" | $GREP " "`
34533       if test "x$has_space" != x; then
34534         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34535 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34536       fi
34537       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34538     fi
34539   fi
34540 
34541   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34542   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34543   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34544   # "foo.exe" is OK but "foo" is an error.
34545   #
34546   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34547   # It is also a way to make sure we got the proper file name for the real test later on.
34548   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34549   if test "x$test_shortpath" = x; then
34550     # Short path failed, file does not exist as specified.
34551     # Try adding .exe or .cmd
34552     if test -f "${new_path}.exe"; then
34553       input_to_shortpath="${new_path}.exe"
34554     elif test -f "${new_path}.cmd"; then
34555       input_to_shortpath="${new_path}.cmd"
34556     else
34557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34558 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34559       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34560 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34561       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34562     fi
34563   else
34564     input_to_shortpath="$new_path"
34565   fi
34566 
34567   # Call helper function which possibly converts this using DOS-style short mode.
34568   # If so, the updated path is stored in $new_path.
34569   new_path="$input_to_shortpath"
34570 
34571   input_path="$input_to_shortpath"
34572   # Check if we need to convert this using DOS-style short mode. If the path
34573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34574   # take no chances and rewrite it.
34575   # Note: m4 eats our [], so we need to use [ and ] instead.
34576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34577   if test "x$has_forbidden_chars" != x; then
34578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34579     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34580     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34581     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34582       # Going to short mode and back again did indeed matter. Since short mode is
34583       # case insensitive, let's make it lowercase to improve readability.
34584       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34585       # Now convert it back to Unix-stile (cygpath)
34586       input_path=`$CYGPATH -u "$shortmode_path"`
34587       new_path="$input_path"
34588     fi
34589   fi
34590 
34591   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34592   if test "x$test_cygdrive_prefix" = x; then
34593     # As a simple fix, exclude /usr/bin since it's not a real path.
34594     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34595       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34596       # a path prefixed by /cygdrive for fixpath to work.
34597       new_path="$CYGWIN_ROOT_PATH$input_path"
34598     fi
34599   fi
34600 
34601   # remove trailing .exe if any
34602   new_path="${new_path/%.exe/}"
34603 
34604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34605 
34606   # First separate the path from the arguments. This will split at the first
34607   # space.
34608   complete="$DUMPBIN"
34609   path="${complete%% *}"
34610   tmp="$complete EOL"
34611   arguments="${tmp#* }"
34612 
34613   # Input might be given as Windows format, start by converting to
34614   # unix format.
34615   new_path="$path"
34616 
34617   windows_path="$new_path"
34618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34619     unix_path=`$CYGPATH -u "$windows_path"`
34620     new_path="$unix_path"
34621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34623     new_path="$unix_path"
34624   fi
34625 
34626 
34627   # Now try to locate executable using which
34628   new_path=`$WHICH "$new_path" 2> /dev/null`
34629 
34630   if test "x$new_path" = x; then
34631     # Oops. Which didn't find the executable.
34632     # The splitting of arguments from the executable at a space might have been incorrect,
34633     # since paths with space are more likely in Windows. Give it another try with the whole
34634     # argument.
34635     path="$complete"
34636     arguments="EOL"
34637     new_path="$path"
34638 
34639   windows_path="$new_path"
34640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34641     unix_path=`$CYGPATH -u "$windows_path"`
34642     new_path="$unix_path"
34643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34645     new_path="$unix_path"
34646   fi
34647 
34648 
34649     new_path=`$WHICH "$new_path" 2> /dev/null`
34650     # bat and cmd files are not always considered executable in MSYS causing which
34651     # to not find them
34652     if test "x$new_path" = x \
34653         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34654         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34655       new_path="$path"
34656 
34657   windows_path="$new_path"
34658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34659     unix_path=`$CYGPATH -u "$windows_path"`
34660     new_path="$unix_path"
34661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34663     new_path="$unix_path"
34664   fi
34665 
34666     fi
34667 
34668     if test "x$new_path" = x; then
34669       # It's still not found. Now this is an unrecoverable error.
34670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34671 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34672       has_space=`$ECHO "$complete" | $GREP " "`
34673       if test "x$has_space" != x; then
34674         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34675 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34676       fi
34677       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34678     fi
34679   fi
34680 
34681   # Now new_path has a complete unix path to the binary
34682   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34683     # Keep paths in /bin as-is, but remove trailing .exe if any
34684     new_path="${new_path/%.exe/}"
34685     # Do not save /bin paths to all_fixpath_prefixes!
34686   else
34687     # Not in mixed or Windows style, start by that.
34688     new_path=`cmd //c echo $new_path`
34689 
34690   input_path="$new_path"
34691   # Check if we need to convert this using DOS-style short mode. If the path
34692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34693   # take no chances and rewrite it.
34694   # Note: m4 eats our [], so we need to use [ and ] instead.
34695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34696   if test "x$has_forbidden_chars" != x; then
34697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34698     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34699   fi
34700 
34701     # Output is in $new_path
34702 
34703   windows_path="$new_path"
34704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34705     unix_path=`$CYGPATH -u "$windows_path"`
34706     new_path="$unix_path"
34707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34709     new_path="$unix_path"
34710   fi
34711 
34712     # remove trailing .exe if any
34713     new_path="${new_path/%.exe/}"
34714 
34715     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34716     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34717   fi
34718 
34719   else
34720     # We're on a unix platform. Hooray! :)
34721     # First separate the path from the arguments. This will split at the first
34722     # space.
34723     complete="$DUMPBIN"
34724     path="${complete%% *}"
34725     tmp="$complete EOL"
34726     arguments="${tmp#* }"
34727 
34728     # Cannot rely on the command "which" here since it doesn't always work.
34729     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34730     if test -z "$is_absolute_path"; then
34731       # Path to executable is not absolute. Find it.
34732       IFS_save="$IFS"
34733       IFS=:
34734       for p in $PATH; do
34735         if test -f "$p/$path" && test -x "$p/$path"; then
34736           new_path="$p/$path"
34737           break
34738         fi
34739       done
34740       IFS="$IFS_save"
34741     else
34742       # This is an absolute path, we can use it without further modifications.
34743       new_path="$path"
34744     fi
34745 
34746     if test "x$new_path" = x; then
34747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34748 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34749       has_space=`$ECHO "$complete" | $GREP " "`
34750       if test "x$has_space" != x; then
34751         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34752 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34753       fi
34754       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34755     fi
34756   fi
34757 
34758   # Now join together the path and the arguments once again
34759   if test "x$arguments" != xEOL; then
34760     new_complete="$new_path ${arguments% *}"
34761   else
34762     new_complete="$new_path"
34763   fi
34764 
34765   if test "x$complete" != "x$new_complete"; then
34766     DUMPBIN="$new_complete"
34767     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34768 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34769   fi
34770 
34771     # We need to check for 'msbuild.exe' because at the place where we expect to
34772     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34773     # won't find the 'msbuild.exe' executable in that case (and the
34774     # 'ac_executable_extensions' is unusable due to performance reasons).
34775     # Notice that we intentionally don't fix up the path to MSBUILD because we
34776     # will call it in a DOS shell during freetype detection on Windows (see
34777     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34778     # Extract the first word of "msbuild.exe", so it can be a program name with args.
34779 set dummy msbuild.exe; ac_word=$2
34780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34781 $as_echo_n "checking for $ac_word... " >&6; }
34782 if ${ac_cv_prog_MSBUILD+:} false; then :
34783   $as_echo_n "(cached) " >&6
34784 else
34785   if test -n "$MSBUILD"; then
34786   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34787 else
34788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34789 for as_dir in $PATH
34790 do
34791   IFS=$as_save_IFS
34792   test -z "$as_dir" && as_dir=.
34793     for ac_exec_ext in '' $ac_executable_extensions; do
34794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34795     ac_cv_prog_MSBUILD="msbuild.exe"
34796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34797     break 2
34798   fi
34799 done
34800   done
34801 IFS=$as_save_IFS
34802 
34803 fi
34804 fi
34805 MSBUILD=$ac_cv_prog_MSBUILD
34806 if test -n "$MSBUILD"; then
34807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
34808 $as_echo "$MSBUILD" >&6; }
34809 else
34810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34811 $as_echo "no" >&6; }
34812 fi
34813 
34814 
34815   fi
34816 
34817   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34818 
34819 
34820   # Publish this variable in the help.
34821 
34822 
34823   if test "x$STRIP" = x; then
34824     # The variable is not set by user, try to locate tool using the code snippet
34825     for ac_prog in strip
34826 do
34827   # Extract the first word of "$ac_prog", so it can be a program name with args.
34828 set dummy $ac_prog; ac_word=$2
34829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34830 $as_echo_n "checking for $ac_word... " >&6; }
34831 if ${ac_cv_path_STRIP+:} false; then :
34832   $as_echo_n "(cached) " >&6
34833 else
34834   case $STRIP in
34835   [\\/]* | ?:[\\/]*)
34836   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34837   ;;
34838   *)
34839   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34840 for as_dir in $PATH
34841 do
34842   IFS=$as_save_IFS
34843   test -z "$as_dir" && as_dir=.
34844     for ac_exec_ext in '' $ac_executable_extensions; do
34845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34846     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34848     break 2
34849   fi
34850 done
34851   done
34852 IFS=$as_save_IFS
34853 
34854   ;;
34855 esac
34856 fi
34857 STRIP=$ac_cv_path_STRIP
34858 if test -n "$STRIP"; then
34859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34860 $as_echo "$STRIP" >&6; }
34861 else
34862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34863 $as_echo "no" >&6; }
34864 fi
34865 
34866 
34867   test -n "$STRIP" && break
34868 done
34869 
34870   else
34871     # The variable is set, but is it from the command line or the environment?
34872 
34873     # Try to remove the string !STRIP! from our list.
34874     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34875     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34876       # If it failed, the variable was not from the command line. Ignore it,
34877       # but warn the user (except for BASH, which is always set by the calling BASH).
34878       if test "xSTRIP" != xBASH; then
34879         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34880 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34881       fi
34882       # Try to locate tool using the code snippet
34883       for ac_prog in strip
34884 do
34885   # Extract the first word of "$ac_prog", so it can be a program name with args.
34886 set dummy $ac_prog; ac_word=$2
34887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34888 $as_echo_n "checking for $ac_word... " >&6; }
34889 if ${ac_cv_path_STRIP+:} false; then :
34890   $as_echo_n "(cached) " >&6
34891 else
34892   case $STRIP in
34893   [\\/]* | ?:[\\/]*)
34894   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34895   ;;
34896   *)
34897   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34898 for as_dir in $PATH
34899 do
34900   IFS=$as_save_IFS
34901   test -z "$as_dir" && as_dir=.
34902     for ac_exec_ext in '' $ac_executable_extensions; do
34903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34904     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34906     break 2
34907   fi
34908 done
34909   done
34910 IFS=$as_save_IFS
34911 
34912   ;;
34913 esac
34914 fi
34915 STRIP=$ac_cv_path_STRIP
34916 if test -n "$STRIP"; then
34917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34918 $as_echo "$STRIP" >&6; }
34919 else
34920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34921 $as_echo "no" >&6; }
34922 fi
34923 
34924 
34925   test -n "$STRIP" && break
34926 done
34927 
34928     else
34929       # If it succeeded, then it was overridden by the user. We will use it
34930       # for the tool.
34931 
34932       # First remove it from the list of overridden variables, so we can test
34933       # for unknown variables in the end.
34934       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34935 
34936       # Check if the provided tool contains a complete path.
34937       tool_specified="$STRIP"
34938       tool_basename="${tool_specified##*/}"
34939       if test "x$tool_basename" = "x$tool_specified"; then
34940         # A command without a complete path is provided, search $PATH.
34941         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34942 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34943         # Extract the first word of "$tool_basename", so it can be a program name with args.
34944 set dummy $tool_basename; ac_word=$2
34945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34946 $as_echo_n "checking for $ac_word... " >&6; }
34947 if ${ac_cv_path_STRIP+:} false; then :
34948   $as_echo_n "(cached) " >&6
34949 else
34950   case $STRIP in
34951   [\\/]* | ?:[\\/]*)
34952   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34953   ;;
34954   *)
34955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34956 for as_dir in $PATH
34957 do
34958   IFS=$as_save_IFS
34959   test -z "$as_dir" && as_dir=.
34960     for ac_exec_ext in '' $ac_executable_extensions; do
34961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34962     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34964     break 2
34965   fi
34966 done
34967   done
34968 IFS=$as_save_IFS
34969 
34970   ;;
34971 esac
34972 fi
34973 STRIP=$ac_cv_path_STRIP
34974 if test -n "$STRIP"; then
34975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34976 $as_echo "$STRIP" >&6; }
34977 else
34978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34979 $as_echo "no" >&6; }
34980 fi
34981 
34982 
34983         if test "x$STRIP" = x; then
34984           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34985         fi
34986       else
34987         # Otherwise we believe it is a complete path. Use it as it is.
34988         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34989 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34991 $as_echo_n "checking for STRIP... " >&6; }
34992         if test ! -x "$tool_specified"; then
34993           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34994 $as_echo "not found" >&6; }
34995           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34996         fi
34997         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34998 $as_echo "$tool_specified" >&6; }
34999       fi
35000     fi
35001   fi
35002 
35003 
35004 
35005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35006 
35007   # First separate the path from the arguments. This will split at the first
35008   # space.
35009   complete="$STRIP"
35010   path="${complete%% *}"
35011   tmp="$complete EOL"
35012   arguments="${tmp#* }"
35013 
35014   # Input might be given as Windows format, start by converting to
35015   # unix format.
35016   new_path=`$CYGPATH -u "$path"`
35017 
35018   # Now try to locate executable using which
35019   new_path=`$WHICH "$new_path" 2> /dev/null`
35020   # bat and cmd files are not always considered executable in cygwin causing which
35021   # to not find them
35022   if test "x$new_path" = x \
35023       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35024       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35025     new_path=`$CYGPATH -u "$path"`
35026   fi
35027   if test "x$new_path" = x; then
35028     # Oops. Which didn't find the executable.
35029     # The splitting of arguments from the executable at a space might have been incorrect,
35030     # since paths with space are more likely in Windows. Give it another try with the whole
35031     # argument.
35032     path="$complete"
35033     arguments="EOL"
35034     new_path=`$CYGPATH -u "$path"`
35035     new_path=`$WHICH "$new_path" 2> /dev/null`
35036     # bat and cmd files are not always considered executable in cygwin causing which
35037     # to not find them
35038     if test "x$new_path" = x \
35039         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35040         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35041       new_path=`$CYGPATH -u "$path"`
35042     fi
35043     if test "x$new_path" = x; then
35044       # It's still not found. Now this is an unrecoverable error.
35045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35046 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35047       has_space=`$ECHO "$complete" | $GREP " "`
35048       if test "x$has_space" != x; then
35049         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35050 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35051       fi
35052       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35053     fi
35054   fi
35055 
35056   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35057   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35058   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35059   # "foo.exe" is OK but "foo" is an error.
35060   #
35061   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35062   # It is also a way to make sure we got the proper file name for the real test later on.
35063   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35064   if test "x$test_shortpath" = x; then
35065     # Short path failed, file does not exist as specified.
35066     # Try adding .exe or .cmd
35067     if test -f "${new_path}.exe"; then
35068       input_to_shortpath="${new_path}.exe"
35069     elif test -f "${new_path}.cmd"; then
35070       input_to_shortpath="${new_path}.cmd"
35071     else
35072       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35073 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35074       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35075 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35076       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35077     fi
35078   else
35079     input_to_shortpath="$new_path"
35080   fi
35081 
35082   # Call helper function which possibly converts this using DOS-style short mode.
35083   # If so, the updated path is stored in $new_path.
35084   new_path="$input_to_shortpath"
35085 
35086   input_path="$input_to_shortpath"
35087   # Check if we need to convert this using DOS-style short mode. If the path
35088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35089   # take no chances and rewrite it.
35090   # Note: m4 eats our [], so we need to use [ and ] instead.
35091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35092   if test "x$has_forbidden_chars" != x; then
35093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35094     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35095     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35096     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35097       # Going to short mode and back again did indeed matter. Since short mode is
35098       # case insensitive, let's make it lowercase to improve readability.
35099       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35100       # Now convert it back to Unix-stile (cygpath)
35101       input_path=`$CYGPATH -u "$shortmode_path"`
35102       new_path="$input_path"
35103     fi
35104   fi
35105 
35106   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35107   if test "x$test_cygdrive_prefix" = x; then
35108     # As a simple fix, exclude /usr/bin since it's not a real path.
35109     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35110       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35111       # a path prefixed by /cygdrive for fixpath to work.
35112       new_path="$CYGWIN_ROOT_PATH$input_path"
35113     fi
35114   fi
35115 
35116   # remove trailing .exe if any
35117   new_path="${new_path/%.exe/}"
35118 
35119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35120 
35121   # First separate the path from the arguments. This will split at the first
35122   # space.
35123   complete="$STRIP"
35124   path="${complete%% *}"
35125   tmp="$complete EOL"
35126   arguments="${tmp#* }"
35127 
35128   # Input might be given as Windows format, start by converting to
35129   # unix format.
35130   new_path="$path"
35131 
35132   windows_path="$new_path"
35133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35134     unix_path=`$CYGPATH -u "$windows_path"`
35135     new_path="$unix_path"
35136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35138     new_path="$unix_path"
35139   fi
35140 
35141 
35142   # Now try to locate executable using which
35143   new_path=`$WHICH "$new_path" 2> /dev/null`
35144 
35145   if test "x$new_path" = x; then
35146     # Oops. Which didn't find the executable.
35147     # The splitting of arguments from the executable at a space might have been incorrect,
35148     # since paths with space are more likely in Windows. Give it another try with the whole
35149     # argument.
35150     path="$complete"
35151     arguments="EOL"
35152     new_path="$path"
35153 
35154   windows_path="$new_path"
35155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35156     unix_path=`$CYGPATH -u "$windows_path"`
35157     new_path="$unix_path"
35158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35160     new_path="$unix_path"
35161   fi
35162 
35163 
35164     new_path=`$WHICH "$new_path" 2> /dev/null`
35165     # bat and cmd files are not always considered executable in MSYS causing which
35166     # to not find them
35167     if test "x$new_path" = x \
35168         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35169         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35170       new_path="$path"
35171 
35172   windows_path="$new_path"
35173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35174     unix_path=`$CYGPATH -u "$windows_path"`
35175     new_path="$unix_path"
35176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35178     new_path="$unix_path"
35179   fi
35180 
35181     fi
35182 
35183     if test "x$new_path" = x; then
35184       # It's still not found. Now this is an unrecoverable error.
35185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35186 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35187       has_space=`$ECHO "$complete" | $GREP " "`
35188       if test "x$has_space" != x; then
35189         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35190 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35191       fi
35192       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35193     fi
35194   fi
35195 
35196   # Now new_path has a complete unix path to the binary
35197   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35198     # Keep paths in /bin as-is, but remove trailing .exe if any
35199     new_path="${new_path/%.exe/}"
35200     # Do not save /bin paths to all_fixpath_prefixes!
35201   else
35202     # Not in mixed or Windows style, start by that.
35203     new_path=`cmd //c echo $new_path`
35204 
35205   input_path="$new_path"
35206   # Check if we need to convert this using DOS-style short mode. If the path
35207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35208   # take no chances and rewrite it.
35209   # Note: m4 eats our [], so we need to use [ and ] instead.
35210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35211   if test "x$has_forbidden_chars" != x; then
35212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35213     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35214   fi
35215 
35216     # Output is in $new_path
35217 
35218   windows_path="$new_path"
35219   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35220     unix_path=`$CYGPATH -u "$windows_path"`
35221     new_path="$unix_path"
35222   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35223     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35224     new_path="$unix_path"
35225   fi
35226 
35227     # remove trailing .exe if any
35228     new_path="${new_path/%.exe/}"
35229 
35230     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35231     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35232   fi
35233 
35234   else
35235     # We're on a unix platform. Hooray! :)
35236     # First separate the path from the arguments. This will split at the first
35237     # space.
35238     complete="$STRIP"
35239     path="${complete%% *}"
35240     tmp="$complete EOL"
35241     arguments="${tmp#* }"
35242 
35243     # Cannot rely on the command "which" here since it doesn't always work.
35244     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35245     if test -z "$is_absolute_path"; then
35246       # Path to executable is not absolute. Find it.
35247       IFS_save="$IFS"
35248       IFS=:
35249       for p in $PATH; do
35250         if test -f "$p/$path" && test -x "$p/$path"; then
35251           new_path="$p/$path"
35252           break
35253         fi
35254       done
35255       IFS="$IFS_save"
35256     else
35257       # This is an absolute path, we can use it without further modifications.
35258       new_path="$path"
35259     fi
35260 
35261     if test "x$new_path" = x; then
35262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35263 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35264       has_space=`$ECHO "$complete" | $GREP " "`
35265       if test "x$has_space" != x; then
35266         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35267 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35268       fi
35269       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35270     fi
35271   fi
35272 
35273   # Now join together the path and the arguments once again
35274   if test "x$arguments" != xEOL; then
35275     new_complete="$new_path ${arguments% *}"
35276   else
35277     new_complete="$new_path"
35278   fi
35279 
35280   if test "x$complete" != "x$new_complete"; then
35281     STRIP="$new_complete"
35282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35283 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35284   fi
35285 
35286 
35287 
35288   # Publish this variable in the help.
35289 
35290 
35291   if test "x$NM" = x; then
35292     # The variable is not set by user, try to locate tool using the code snippet
35293     for ac_prog in nm
35294 do
35295   # Extract the first word of "$ac_prog", so it can be a program name with args.
35296 set dummy $ac_prog; ac_word=$2
35297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35298 $as_echo_n "checking for $ac_word... " >&6; }
35299 if ${ac_cv_path_NM+:} false; then :
35300   $as_echo_n "(cached) " >&6
35301 else
35302   case $NM in
35303   [\\/]* | ?:[\\/]*)
35304   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35305   ;;
35306   *)
35307   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35308 for as_dir in $PATH
35309 do
35310   IFS=$as_save_IFS
35311   test -z "$as_dir" && as_dir=.
35312     for ac_exec_ext in '' $ac_executable_extensions; do
35313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35314     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35316     break 2
35317   fi
35318 done
35319   done
35320 IFS=$as_save_IFS
35321 
35322   ;;
35323 esac
35324 fi
35325 NM=$ac_cv_path_NM
35326 if test -n "$NM"; then
35327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35328 $as_echo "$NM" >&6; }
35329 else
35330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35331 $as_echo "no" >&6; }
35332 fi
35333 
35334 
35335   test -n "$NM" && break
35336 done
35337 
35338   else
35339     # The variable is set, but is it from the command line or the environment?
35340 
35341     # Try to remove the string !NM! from our list.
35342     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35343     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35344       # If it failed, the variable was not from the command line. Ignore it,
35345       # but warn the user (except for BASH, which is always set by the calling BASH).
35346       if test "xNM" != xBASH; then
35347         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35348 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35349       fi
35350       # Try to locate tool using the code snippet
35351       for ac_prog in nm
35352 do
35353   # Extract the first word of "$ac_prog", so it can be a program name with args.
35354 set dummy $ac_prog; ac_word=$2
35355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35356 $as_echo_n "checking for $ac_word... " >&6; }
35357 if ${ac_cv_path_NM+:} false; then :
35358   $as_echo_n "(cached) " >&6
35359 else
35360   case $NM in
35361   [\\/]* | ?:[\\/]*)
35362   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35363   ;;
35364   *)
35365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35366 for as_dir in $PATH
35367 do
35368   IFS=$as_save_IFS
35369   test -z "$as_dir" && as_dir=.
35370     for ac_exec_ext in '' $ac_executable_extensions; do
35371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35372     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35374     break 2
35375   fi
35376 done
35377   done
35378 IFS=$as_save_IFS
35379 
35380   ;;
35381 esac
35382 fi
35383 NM=$ac_cv_path_NM
35384 if test -n "$NM"; then
35385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35386 $as_echo "$NM" >&6; }
35387 else
35388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35389 $as_echo "no" >&6; }
35390 fi
35391 
35392 
35393   test -n "$NM" && break
35394 done
35395 
35396     else
35397       # If it succeeded, then it was overridden by the user. We will use it
35398       # for the tool.
35399 
35400       # First remove it from the list of overridden variables, so we can test
35401       # for unknown variables in the end.
35402       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35403 
35404       # Check if the provided tool contains a complete path.
35405       tool_specified="$NM"
35406       tool_basename="${tool_specified##*/}"
35407       if test "x$tool_basename" = "x$tool_specified"; then
35408         # A command without a complete path is provided, search $PATH.
35409         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35410 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35411         # Extract the first word of "$tool_basename", so it can be a program name with args.
35412 set dummy $tool_basename; ac_word=$2
35413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35414 $as_echo_n "checking for $ac_word... " >&6; }
35415 if ${ac_cv_path_NM+:} false; then :
35416   $as_echo_n "(cached) " >&6
35417 else
35418   case $NM in
35419   [\\/]* | ?:[\\/]*)
35420   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35421   ;;
35422   *)
35423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35424 for as_dir in $PATH
35425 do
35426   IFS=$as_save_IFS
35427   test -z "$as_dir" && as_dir=.
35428     for ac_exec_ext in '' $ac_executable_extensions; do
35429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35430     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35432     break 2
35433   fi
35434 done
35435   done
35436 IFS=$as_save_IFS
35437 
35438   ;;
35439 esac
35440 fi
35441 NM=$ac_cv_path_NM
35442 if test -n "$NM"; then
35443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35444 $as_echo "$NM" >&6; }
35445 else
35446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35447 $as_echo "no" >&6; }
35448 fi
35449 
35450 
35451         if test "x$NM" = x; then
35452           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35453         fi
35454       else
35455         # Otherwise we believe it is a complete path. Use it as it is.
35456         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35457 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35458         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35459 $as_echo_n "checking for NM... " >&6; }
35460         if test ! -x "$tool_specified"; then
35461           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35462 $as_echo "not found" >&6; }
35463           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35464         fi
35465         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35466 $as_echo "$tool_specified" >&6; }
35467       fi
35468     fi
35469   fi
35470 
35471 
35472 
35473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35474 
35475   # First separate the path from the arguments. This will split at the first
35476   # space.
35477   complete="$NM"
35478   path="${complete%% *}"
35479   tmp="$complete EOL"
35480   arguments="${tmp#* }"
35481 
35482   # Input might be given as Windows format, start by converting to
35483   # unix format.
35484   new_path=`$CYGPATH -u "$path"`
35485 
35486   # Now try to locate executable using which
35487   new_path=`$WHICH "$new_path" 2> /dev/null`
35488   # bat and cmd files are not always considered executable in cygwin causing which
35489   # to not find them
35490   if test "x$new_path" = x \
35491       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35492       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35493     new_path=`$CYGPATH -u "$path"`
35494   fi
35495   if test "x$new_path" = x; then
35496     # Oops. Which didn't find the executable.
35497     # The splitting of arguments from the executable at a space might have been incorrect,
35498     # since paths with space are more likely in Windows. Give it another try with the whole
35499     # argument.
35500     path="$complete"
35501     arguments="EOL"
35502     new_path=`$CYGPATH -u "$path"`
35503     new_path=`$WHICH "$new_path" 2> /dev/null`
35504     # bat and cmd files are not always considered executable in cygwin causing which
35505     # to not find them
35506     if test "x$new_path" = x \
35507         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35508         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35509       new_path=`$CYGPATH -u "$path"`
35510     fi
35511     if test "x$new_path" = x; then
35512       # It's still not found. Now this is an unrecoverable error.
35513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35514 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35515       has_space=`$ECHO "$complete" | $GREP " "`
35516       if test "x$has_space" != x; then
35517         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35518 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35519       fi
35520       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35521     fi
35522   fi
35523 
35524   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35525   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35526   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35527   # "foo.exe" is OK but "foo" is an error.
35528   #
35529   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35530   # It is also a way to make sure we got the proper file name for the real test later on.
35531   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35532   if test "x$test_shortpath" = x; then
35533     # Short path failed, file does not exist as specified.
35534     # Try adding .exe or .cmd
35535     if test -f "${new_path}.exe"; then
35536       input_to_shortpath="${new_path}.exe"
35537     elif test -f "${new_path}.cmd"; then
35538       input_to_shortpath="${new_path}.cmd"
35539     else
35540       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35541 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35542       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35543 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35544       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35545     fi
35546   else
35547     input_to_shortpath="$new_path"
35548   fi
35549 
35550   # Call helper function which possibly converts this using DOS-style short mode.
35551   # If so, the updated path is stored in $new_path.
35552   new_path="$input_to_shortpath"
35553 
35554   input_path="$input_to_shortpath"
35555   # Check if we need to convert this using DOS-style short mode. If the path
35556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35557   # take no chances and rewrite it.
35558   # Note: m4 eats our [], so we need to use [ and ] instead.
35559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35560   if test "x$has_forbidden_chars" != x; then
35561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35562     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35563     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35564     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35565       # Going to short mode and back again did indeed matter. Since short mode is
35566       # case insensitive, let's make it lowercase to improve readability.
35567       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35568       # Now convert it back to Unix-stile (cygpath)
35569       input_path=`$CYGPATH -u "$shortmode_path"`
35570       new_path="$input_path"
35571     fi
35572   fi
35573 
35574   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35575   if test "x$test_cygdrive_prefix" = x; then
35576     # As a simple fix, exclude /usr/bin since it's not a real path.
35577     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35578       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35579       # a path prefixed by /cygdrive for fixpath to work.
35580       new_path="$CYGWIN_ROOT_PATH$input_path"
35581     fi
35582   fi
35583 
35584   # remove trailing .exe if any
35585   new_path="${new_path/%.exe/}"
35586 
35587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35588 
35589   # First separate the path from the arguments. This will split at the first
35590   # space.
35591   complete="$NM"
35592   path="${complete%% *}"
35593   tmp="$complete EOL"
35594   arguments="${tmp#* }"
35595 
35596   # Input might be given as Windows format, start by converting to
35597   # unix format.
35598   new_path="$path"
35599 
35600   windows_path="$new_path"
35601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35602     unix_path=`$CYGPATH -u "$windows_path"`
35603     new_path="$unix_path"
35604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35606     new_path="$unix_path"
35607   fi
35608 
35609 
35610   # Now try to locate executable using which
35611   new_path=`$WHICH "$new_path" 2> /dev/null`
35612 
35613   if test "x$new_path" = x; then
35614     # Oops. Which didn't find the executable.
35615     # The splitting of arguments from the executable at a space might have been incorrect,
35616     # since paths with space are more likely in Windows. Give it another try with the whole
35617     # argument.
35618     path="$complete"
35619     arguments="EOL"
35620     new_path="$path"
35621 
35622   windows_path="$new_path"
35623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35624     unix_path=`$CYGPATH -u "$windows_path"`
35625     new_path="$unix_path"
35626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35628     new_path="$unix_path"
35629   fi
35630 
35631 
35632     new_path=`$WHICH "$new_path" 2> /dev/null`
35633     # bat and cmd files are not always considered executable in MSYS causing which
35634     # to not find them
35635     if test "x$new_path" = x \
35636         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35637         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35638       new_path="$path"
35639 
35640   windows_path="$new_path"
35641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35642     unix_path=`$CYGPATH -u "$windows_path"`
35643     new_path="$unix_path"
35644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35646     new_path="$unix_path"
35647   fi
35648 
35649     fi
35650 
35651     if test "x$new_path" = x; then
35652       # It's still not found. Now this is an unrecoverable error.
35653       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35654 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35655       has_space=`$ECHO "$complete" | $GREP " "`
35656       if test "x$has_space" != x; then
35657         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35658 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35659       fi
35660       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35661     fi
35662   fi
35663 
35664   # Now new_path has a complete unix path to the binary
35665   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35666     # Keep paths in /bin as-is, but remove trailing .exe if any
35667     new_path="${new_path/%.exe/}"
35668     # Do not save /bin paths to all_fixpath_prefixes!
35669   else
35670     # Not in mixed or Windows style, start by that.
35671     new_path=`cmd //c echo $new_path`
35672 
35673   input_path="$new_path"
35674   # Check if we need to convert this using DOS-style short mode. If the path
35675   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35676   # take no chances and rewrite it.
35677   # Note: m4 eats our [], so we need to use [ and ] instead.
35678   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35679   if test "x$has_forbidden_chars" != x; then
35680     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35681     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35682   fi
35683 
35684     # Output is in $new_path
35685 
35686   windows_path="$new_path"
35687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35688     unix_path=`$CYGPATH -u "$windows_path"`
35689     new_path="$unix_path"
35690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35692     new_path="$unix_path"
35693   fi
35694 
35695     # remove trailing .exe if any
35696     new_path="${new_path/%.exe/}"
35697 
35698     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35699     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35700   fi
35701 
35702   else
35703     # We're on a unix platform. Hooray! :)
35704     # First separate the path from the arguments. This will split at the first
35705     # space.
35706     complete="$NM"
35707     path="${complete%% *}"
35708     tmp="$complete EOL"
35709     arguments="${tmp#* }"
35710 
35711     # Cannot rely on the command "which" here since it doesn't always work.
35712     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35713     if test -z "$is_absolute_path"; then
35714       # Path to executable is not absolute. Find it.
35715       IFS_save="$IFS"
35716       IFS=:
35717       for p in $PATH; do
35718         if test -f "$p/$path" && test -x "$p/$path"; then
35719           new_path="$p/$path"
35720           break
35721         fi
35722       done
35723       IFS="$IFS_save"
35724     else
35725       # This is an absolute path, we can use it without further modifications.
35726       new_path="$path"
35727     fi
35728 
35729     if test "x$new_path" = x; then
35730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35731 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35732       has_space=`$ECHO "$complete" | $GREP " "`
35733       if test "x$has_space" != x; then
35734         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35735 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35736       fi
35737       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35738     fi
35739   fi
35740 
35741   # Now join together the path and the arguments once again
35742   if test "x$arguments" != xEOL; then
35743     new_complete="$new_path ${arguments% *}"
35744   else
35745     new_complete="$new_path"
35746   fi
35747 
35748   if test "x$complete" != "x$new_complete"; then
35749     NM="$new_complete"
35750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35751 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35752   fi
35753 
35754 
35755 
35756   # Publish this variable in the help.
35757 
35758 
35759   if test "x$GNM" = x; then
35760     # The variable is not set by user, try to locate tool using the code snippet
35761     for ac_prog in gnm
35762 do
35763   # Extract the first word of "$ac_prog", so it can be a program name with args.
35764 set dummy $ac_prog; ac_word=$2
35765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35766 $as_echo_n "checking for $ac_word... " >&6; }
35767 if ${ac_cv_path_GNM+:} false; then :
35768   $as_echo_n "(cached) " >&6
35769 else
35770   case $GNM in
35771   [\\/]* | ?:[\\/]*)
35772   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35773   ;;
35774   *)
35775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35776 for as_dir in $PATH
35777 do
35778   IFS=$as_save_IFS
35779   test -z "$as_dir" && as_dir=.
35780     for ac_exec_ext in '' $ac_executable_extensions; do
35781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35782     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35784     break 2
35785   fi
35786 done
35787   done
35788 IFS=$as_save_IFS
35789 
35790   ;;
35791 esac
35792 fi
35793 GNM=$ac_cv_path_GNM
35794 if test -n "$GNM"; then
35795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35796 $as_echo "$GNM" >&6; }
35797 else
35798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35799 $as_echo "no" >&6; }
35800 fi
35801 
35802 
35803   test -n "$GNM" && break
35804 done
35805 
35806   else
35807     # The variable is set, but is it from the command line or the environment?
35808 
35809     # Try to remove the string !GNM! from our list.
35810     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35811     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35812       # If it failed, the variable was not from the command line. Ignore it,
35813       # but warn the user (except for BASH, which is always set by the calling BASH).
35814       if test "xGNM" != xBASH; then
35815         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35816 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35817       fi
35818       # Try to locate tool using the code snippet
35819       for ac_prog in gnm
35820 do
35821   # Extract the first word of "$ac_prog", so it can be a program name with args.
35822 set dummy $ac_prog; ac_word=$2
35823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35824 $as_echo_n "checking for $ac_word... " >&6; }
35825 if ${ac_cv_path_GNM+:} false; then :
35826   $as_echo_n "(cached) " >&6
35827 else
35828   case $GNM in
35829   [\\/]* | ?:[\\/]*)
35830   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35831   ;;
35832   *)
35833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35834 for as_dir in $PATH
35835 do
35836   IFS=$as_save_IFS
35837   test -z "$as_dir" && as_dir=.
35838     for ac_exec_ext in '' $ac_executable_extensions; do
35839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35840     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35842     break 2
35843   fi
35844 done
35845   done
35846 IFS=$as_save_IFS
35847 
35848   ;;
35849 esac
35850 fi
35851 GNM=$ac_cv_path_GNM
35852 if test -n "$GNM"; then
35853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35854 $as_echo "$GNM" >&6; }
35855 else
35856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35857 $as_echo "no" >&6; }
35858 fi
35859 
35860 
35861   test -n "$GNM" && break
35862 done
35863 
35864     else
35865       # If it succeeded, then it was overridden by the user. We will use it
35866       # for the tool.
35867 
35868       # First remove it from the list of overridden variables, so we can test
35869       # for unknown variables in the end.
35870       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35871 
35872       # Check if the provided tool contains a complete path.
35873       tool_specified="$GNM"
35874       tool_basename="${tool_specified##*/}"
35875       if test "x$tool_basename" = "x$tool_specified"; then
35876         # A command without a complete path is provided, search $PATH.
35877         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35878 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35879         # Extract the first word of "$tool_basename", so it can be a program name with args.
35880 set dummy $tool_basename; ac_word=$2
35881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35882 $as_echo_n "checking for $ac_word... " >&6; }
35883 if ${ac_cv_path_GNM+:} false; then :
35884   $as_echo_n "(cached) " >&6
35885 else
35886   case $GNM in
35887   [\\/]* | ?:[\\/]*)
35888   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35889   ;;
35890   *)
35891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35892 for as_dir in $PATH
35893 do
35894   IFS=$as_save_IFS
35895   test -z "$as_dir" && as_dir=.
35896     for ac_exec_ext in '' $ac_executable_extensions; do
35897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35898     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35900     break 2
35901   fi
35902 done
35903   done
35904 IFS=$as_save_IFS
35905 
35906   ;;
35907 esac
35908 fi
35909 GNM=$ac_cv_path_GNM
35910 if test -n "$GNM"; then
35911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35912 $as_echo "$GNM" >&6; }
35913 else
35914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35915 $as_echo "no" >&6; }
35916 fi
35917 
35918 
35919         if test "x$GNM" = x; then
35920           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35921         fi
35922       else
35923         # Otherwise we believe it is a complete path. Use it as it is.
35924         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35925 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35926         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35927 $as_echo_n "checking for GNM... " >&6; }
35928         if test ! -x "$tool_specified"; then
35929           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35930 $as_echo "not found" >&6; }
35931           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35932         fi
35933         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35934 $as_echo "$tool_specified" >&6; }
35935       fi
35936     fi
35937   fi
35938 
35939 
35940 
35941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35942 
35943   # First separate the path from the arguments. This will split at the first
35944   # space.
35945   complete="$GNM"
35946   path="${complete%% *}"
35947   tmp="$complete EOL"
35948   arguments="${tmp#* }"
35949 
35950   # Input might be given as Windows format, start by converting to
35951   # unix format.
35952   new_path=`$CYGPATH -u "$path"`
35953 
35954   # Now try to locate executable using which
35955   new_path=`$WHICH "$new_path" 2> /dev/null`
35956   # bat and cmd files are not always considered executable in cygwin causing which
35957   # to not find them
35958   if test "x$new_path" = x \
35959       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35960       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35961     new_path=`$CYGPATH -u "$path"`
35962   fi
35963   if test "x$new_path" = x; then
35964     # Oops. Which didn't find the executable.
35965     # The splitting of arguments from the executable at a space might have been incorrect,
35966     # since paths with space are more likely in Windows. Give it another try with the whole
35967     # argument.
35968     path="$complete"
35969     arguments="EOL"
35970     new_path=`$CYGPATH -u "$path"`
35971     new_path=`$WHICH "$new_path" 2> /dev/null`
35972     # bat and cmd files are not always considered executable in cygwin causing which
35973     # to not find them
35974     if test "x$new_path" = x \
35975         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35976         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35977       new_path=`$CYGPATH -u "$path"`
35978     fi
35979     if test "x$new_path" = x; then
35980       # It's still not found. Now this is an unrecoverable error.
35981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35982 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35983       has_space=`$ECHO "$complete" | $GREP " "`
35984       if test "x$has_space" != x; then
35985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35987       fi
35988       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35989     fi
35990   fi
35991 
35992   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35993   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35994   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35995   # "foo.exe" is OK but "foo" is an error.
35996   #
35997   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35998   # It is also a way to make sure we got the proper file name for the real test later on.
35999   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36000   if test "x$test_shortpath" = x; then
36001     # Short path failed, file does not exist as specified.
36002     # Try adding .exe or .cmd
36003     if test -f "${new_path}.exe"; then
36004       input_to_shortpath="${new_path}.exe"
36005     elif test -f "${new_path}.cmd"; then
36006       input_to_shortpath="${new_path}.cmd"
36007     else
36008       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36009 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36010       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36011 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36012       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36013     fi
36014   else
36015     input_to_shortpath="$new_path"
36016   fi
36017 
36018   # Call helper function which possibly converts this using DOS-style short mode.
36019   # If so, the updated path is stored in $new_path.
36020   new_path="$input_to_shortpath"
36021 
36022   input_path="$input_to_shortpath"
36023   # Check if we need to convert this using DOS-style short mode. If the path
36024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36025   # take no chances and rewrite it.
36026   # Note: m4 eats our [], so we need to use [ and ] instead.
36027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36028   if test "x$has_forbidden_chars" != x; then
36029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36030     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36031     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36032     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36033       # Going to short mode and back again did indeed matter. Since short mode is
36034       # case insensitive, let's make it lowercase to improve readability.
36035       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36036       # Now convert it back to Unix-stile (cygpath)
36037       input_path=`$CYGPATH -u "$shortmode_path"`
36038       new_path="$input_path"
36039     fi
36040   fi
36041 
36042   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36043   if test "x$test_cygdrive_prefix" = x; then
36044     # As a simple fix, exclude /usr/bin since it's not a real path.
36045     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36046       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36047       # a path prefixed by /cygdrive for fixpath to work.
36048       new_path="$CYGWIN_ROOT_PATH$input_path"
36049     fi
36050   fi
36051 
36052   # remove trailing .exe if any
36053   new_path="${new_path/%.exe/}"
36054 
36055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36056 
36057   # First separate the path from the arguments. This will split at the first
36058   # space.
36059   complete="$GNM"
36060   path="${complete%% *}"
36061   tmp="$complete EOL"
36062   arguments="${tmp#* }"
36063 
36064   # Input might be given as Windows format, start by converting to
36065   # unix format.
36066   new_path="$path"
36067 
36068   windows_path="$new_path"
36069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36070     unix_path=`$CYGPATH -u "$windows_path"`
36071     new_path="$unix_path"
36072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36074     new_path="$unix_path"
36075   fi
36076 
36077 
36078   # Now try to locate executable using which
36079   new_path=`$WHICH "$new_path" 2> /dev/null`
36080 
36081   if test "x$new_path" = x; then
36082     # Oops. Which didn't find the executable.
36083     # The splitting of arguments from the executable at a space might have been incorrect,
36084     # since paths with space are more likely in Windows. Give it another try with the whole
36085     # argument.
36086     path="$complete"
36087     arguments="EOL"
36088     new_path="$path"
36089 
36090   windows_path="$new_path"
36091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36092     unix_path=`$CYGPATH -u "$windows_path"`
36093     new_path="$unix_path"
36094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36096     new_path="$unix_path"
36097   fi
36098 
36099 
36100     new_path=`$WHICH "$new_path" 2> /dev/null`
36101     # bat and cmd files are not always considered executable in MSYS causing which
36102     # to not find them
36103     if test "x$new_path" = x \
36104         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36105         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36106       new_path="$path"
36107 
36108   windows_path="$new_path"
36109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36110     unix_path=`$CYGPATH -u "$windows_path"`
36111     new_path="$unix_path"
36112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36114     new_path="$unix_path"
36115   fi
36116 
36117     fi
36118 
36119     if test "x$new_path" = x; then
36120       # It's still not found. Now this is an unrecoverable error.
36121       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36122 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36123       has_space=`$ECHO "$complete" | $GREP " "`
36124       if test "x$has_space" != x; then
36125         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36126 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36127       fi
36128       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36129     fi
36130   fi
36131 
36132   # Now new_path has a complete unix path to the binary
36133   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36134     # Keep paths in /bin as-is, but remove trailing .exe if any
36135     new_path="${new_path/%.exe/}"
36136     # Do not save /bin paths to all_fixpath_prefixes!
36137   else
36138     # Not in mixed or Windows style, start by that.
36139     new_path=`cmd //c echo $new_path`
36140 
36141   input_path="$new_path"
36142   # Check if we need to convert this using DOS-style short mode. If the path
36143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36144   # take no chances and rewrite it.
36145   # Note: m4 eats our [], so we need to use [ and ] instead.
36146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36147   if test "x$has_forbidden_chars" != x; then
36148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36149     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36150   fi
36151 
36152     # Output is in $new_path
36153 
36154   windows_path="$new_path"
36155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36156     unix_path=`$CYGPATH -u "$windows_path"`
36157     new_path="$unix_path"
36158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36160     new_path="$unix_path"
36161   fi
36162 
36163     # remove trailing .exe if any
36164     new_path="${new_path/%.exe/}"
36165 
36166     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36167     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36168   fi
36169 
36170   else
36171     # We're on a unix platform. Hooray! :)
36172     # First separate the path from the arguments. This will split at the first
36173     # space.
36174     complete="$GNM"
36175     path="${complete%% *}"
36176     tmp="$complete EOL"
36177     arguments="${tmp#* }"
36178 
36179     # Cannot rely on the command "which" here since it doesn't always work.
36180     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36181     if test -z "$is_absolute_path"; then
36182       # Path to executable is not absolute. Find it.
36183       IFS_save="$IFS"
36184       IFS=:
36185       for p in $PATH; do
36186         if test -f "$p/$path" && test -x "$p/$path"; then
36187           new_path="$p/$path"
36188           break
36189         fi
36190       done
36191       IFS="$IFS_save"
36192     else
36193       # This is an absolute path, we can use it without further modifications.
36194       new_path="$path"
36195     fi
36196 
36197     if test "x$new_path" = x; then
36198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36199 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36200       has_space=`$ECHO "$complete" | $GREP " "`
36201       if test "x$has_space" != x; then
36202         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36203 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36204       fi
36205       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36206     fi
36207   fi
36208 
36209   # Now join together the path and the arguments once again
36210   if test "x$arguments" != xEOL; then
36211     new_complete="$new_path ${arguments% *}"
36212   else
36213     new_complete="$new_path"
36214   fi
36215 
36216   if test "x$complete" != "x$new_complete"; then
36217     GNM="$new_complete"
36218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36219 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36220   fi
36221 
36222 
36223 
36224 
36225   # Publish this variable in the help.
36226 
36227 
36228   if test "x$MCS" = x; then
36229     # The variable is not set by user, try to locate tool using the code snippet
36230     for ac_prog in mcs
36231 do
36232   # Extract the first word of "$ac_prog", so it can be a program name with args.
36233 set dummy $ac_prog; ac_word=$2
36234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36235 $as_echo_n "checking for $ac_word... " >&6; }
36236 if ${ac_cv_path_MCS+:} false; then :
36237   $as_echo_n "(cached) " >&6
36238 else
36239   case $MCS in
36240   [\\/]* | ?:[\\/]*)
36241   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36242   ;;
36243   *)
36244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36245 for as_dir in $PATH
36246 do
36247   IFS=$as_save_IFS
36248   test -z "$as_dir" && as_dir=.
36249     for ac_exec_ext in '' $ac_executable_extensions; do
36250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36251     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36253     break 2
36254   fi
36255 done
36256   done
36257 IFS=$as_save_IFS
36258 
36259   ;;
36260 esac
36261 fi
36262 MCS=$ac_cv_path_MCS
36263 if test -n "$MCS"; then
36264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36265 $as_echo "$MCS" >&6; }
36266 else
36267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36268 $as_echo "no" >&6; }
36269 fi
36270 
36271 
36272   test -n "$MCS" && break
36273 done
36274 
36275   else
36276     # The variable is set, but is it from the command line or the environment?
36277 
36278     # Try to remove the string !MCS! from our list.
36279     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36280     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36281       # If it failed, the variable was not from the command line. Ignore it,
36282       # but warn the user (except for BASH, which is always set by the calling BASH).
36283       if test "xMCS" != xBASH; then
36284         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36285 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36286       fi
36287       # Try to locate tool using the code snippet
36288       for ac_prog in mcs
36289 do
36290   # Extract the first word of "$ac_prog", so it can be a program name with args.
36291 set dummy $ac_prog; ac_word=$2
36292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36293 $as_echo_n "checking for $ac_word... " >&6; }
36294 if ${ac_cv_path_MCS+:} false; then :
36295   $as_echo_n "(cached) " >&6
36296 else
36297   case $MCS in
36298   [\\/]* | ?:[\\/]*)
36299   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36300   ;;
36301   *)
36302   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36303 for as_dir in $PATH
36304 do
36305   IFS=$as_save_IFS
36306   test -z "$as_dir" && as_dir=.
36307     for ac_exec_ext in '' $ac_executable_extensions; do
36308   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36309     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36310     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36311     break 2
36312   fi
36313 done
36314   done
36315 IFS=$as_save_IFS
36316 
36317   ;;
36318 esac
36319 fi
36320 MCS=$ac_cv_path_MCS
36321 if test -n "$MCS"; then
36322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36323 $as_echo "$MCS" >&6; }
36324 else
36325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36326 $as_echo "no" >&6; }
36327 fi
36328 
36329 
36330   test -n "$MCS" && break
36331 done
36332 
36333     else
36334       # If it succeeded, then it was overridden by the user. We will use it
36335       # for the tool.
36336 
36337       # First remove it from the list of overridden variables, so we can test
36338       # for unknown variables in the end.
36339       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36340 
36341       # Check if the provided tool contains a complete path.
36342       tool_specified="$MCS"
36343       tool_basename="${tool_specified##*/}"
36344       if test "x$tool_basename" = "x$tool_specified"; then
36345         # A command without a complete path is provided, search $PATH.
36346         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36347 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36348         # Extract the first word of "$tool_basename", so it can be a program name with args.
36349 set dummy $tool_basename; ac_word=$2
36350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36351 $as_echo_n "checking for $ac_word... " >&6; }
36352 if ${ac_cv_path_MCS+:} false; then :
36353   $as_echo_n "(cached) " >&6
36354 else
36355   case $MCS in
36356   [\\/]* | ?:[\\/]*)
36357   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36358   ;;
36359   *)
36360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36361 for as_dir in $PATH
36362 do
36363   IFS=$as_save_IFS
36364   test -z "$as_dir" && as_dir=.
36365     for ac_exec_ext in '' $ac_executable_extensions; do
36366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36367     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36369     break 2
36370   fi
36371 done
36372   done
36373 IFS=$as_save_IFS
36374 
36375   ;;
36376 esac
36377 fi
36378 MCS=$ac_cv_path_MCS
36379 if test -n "$MCS"; then
36380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36381 $as_echo "$MCS" >&6; }
36382 else
36383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36384 $as_echo "no" >&6; }
36385 fi
36386 
36387 
36388         if test "x$MCS" = x; then
36389           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36390         fi
36391       else
36392         # Otherwise we believe it is a complete path. Use it as it is.
36393         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36394 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36395         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36396 $as_echo_n "checking for MCS... " >&6; }
36397         if test ! -x "$tool_specified"; then
36398           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36399 $as_echo "not found" >&6; }
36400           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36401         fi
36402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36403 $as_echo "$tool_specified" >&6; }
36404       fi
36405     fi
36406   fi
36407 
36408 
36409 
36410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36411 
36412   # First separate the path from the arguments. This will split at the first
36413   # space.
36414   complete="$MCS"
36415   path="${complete%% *}"
36416   tmp="$complete EOL"
36417   arguments="${tmp#* }"
36418 
36419   # Input might be given as Windows format, start by converting to
36420   # unix format.
36421   new_path=`$CYGPATH -u "$path"`
36422 
36423   # Now try to locate executable using which
36424   new_path=`$WHICH "$new_path" 2> /dev/null`
36425   # bat and cmd files are not always considered executable in cygwin causing which
36426   # to not find them
36427   if test "x$new_path" = x \
36428       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36429       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36430     new_path=`$CYGPATH -u "$path"`
36431   fi
36432   if test "x$new_path" = x; then
36433     # Oops. Which didn't find the executable.
36434     # The splitting of arguments from the executable at a space might have been incorrect,
36435     # since paths with space are more likely in Windows. Give it another try with the whole
36436     # argument.
36437     path="$complete"
36438     arguments="EOL"
36439     new_path=`$CYGPATH -u "$path"`
36440     new_path=`$WHICH "$new_path" 2> /dev/null`
36441     # bat and cmd files are not always considered executable in cygwin causing which
36442     # to not find them
36443     if test "x$new_path" = x \
36444         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36445         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36446       new_path=`$CYGPATH -u "$path"`
36447     fi
36448     if test "x$new_path" = x; then
36449       # It's still not found. Now this is an unrecoverable error.
36450       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36451 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36452       has_space=`$ECHO "$complete" | $GREP " "`
36453       if test "x$has_space" != x; then
36454         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36455 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36456       fi
36457       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36458     fi
36459   fi
36460 
36461   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36462   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36463   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36464   # "foo.exe" is OK but "foo" is an error.
36465   #
36466   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36467   # It is also a way to make sure we got the proper file name for the real test later on.
36468   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36469   if test "x$test_shortpath" = x; then
36470     # Short path failed, file does not exist as specified.
36471     # Try adding .exe or .cmd
36472     if test -f "${new_path}.exe"; then
36473       input_to_shortpath="${new_path}.exe"
36474     elif test -f "${new_path}.cmd"; then
36475       input_to_shortpath="${new_path}.cmd"
36476     else
36477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36478 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36479       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36480 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36481       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36482     fi
36483   else
36484     input_to_shortpath="$new_path"
36485   fi
36486 
36487   # Call helper function which possibly converts this using DOS-style short mode.
36488   # If so, the updated path is stored in $new_path.
36489   new_path="$input_to_shortpath"
36490 
36491   input_path="$input_to_shortpath"
36492   # Check if we need to convert this using DOS-style short mode. If the path
36493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36494   # take no chances and rewrite it.
36495   # Note: m4 eats our [], so we need to use [ and ] instead.
36496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36497   if test "x$has_forbidden_chars" != x; then
36498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36502       # Going to short mode and back again did indeed matter. Since short mode is
36503       # case insensitive, let's make it lowercase to improve readability.
36504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36505       # Now convert it back to Unix-stile (cygpath)
36506       input_path=`$CYGPATH -u "$shortmode_path"`
36507       new_path="$input_path"
36508     fi
36509   fi
36510 
36511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36512   if test "x$test_cygdrive_prefix" = x; then
36513     # As a simple fix, exclude /usr/bin since it's not a real path.
36514     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36516       # a path prefixed by /cygdrive for fixpath to work.
36517       new_path="$CYGWIN_ROOT_PATH$input_path"
36518     fi
36519   fi
36520 
36521   # remove trailing .exe if any
36522   new_path="${new_path/%.exe/}"
36523 
36524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36525 
36526   # First separate the path from the arguments. This will split at the first
36527   # space.
36528   complete="$MCS"
36529   path="${complete%% *}"
36530   tmp="$complete EOL"
36531   arguments="${tmp#* }"
36532 
36533   # Input might be given as Windows format, start by converting to
36534   # unix format.
36535   new_path="$path"
36536 
36537   windows_path="$new_path"
36538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36539     unix_path=`$CYGPATH -u "$windows_path"`
36540     new_path="$unix_path"
36541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36543     new_path="$unix_path"
36544   fi
36545 
36546 
36547   # Now try to locate executable using which
36548   new_path=`$WHICH "$new_path" 2> /dev/null`
36549 
36550   if test "x$new_path" = x; then
36551     # Oops. Which didn't find the executable.
36552     # The splitting of arguments from the executable at a space might have been incorrect,
36553     # since paths with space are more likely in Windows. Give it another try with the whole
36554     # argument.
36555     path="$complete"
36556     arguments="EOL"
36557     new_path="$path"
36558 
36559   windows_path="$new_path"
36560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36561     unix_path=`$CYGPATH -u "$windows_path"`
36562     new_path="$unix_path"
36563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36565     new_path="$unix_path"
36566   fi
36567 
36568 
36569     new_path=`$WHICH "$new_path" 2> /dev/null`
36570     # bat and cmd files are not always considered executable in MSYS causing which
36571     # to not find them
36572     if test "x$new_path" = x \
36573         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36574         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36575       new_path="$path"
36576 
36577   windows_path="$new_path"
36578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36579     unix_path=`$CYGPATH -u "$windows_path"`
36580     new_path="$unix_path"
36581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36583     new_path="$unix_path"
36584   fi
36585 
36586     fi
36587 
36588     if test "x$new_path" = x; then
36589       # It's still not found. Now this is an unrecoverable error.
36590       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36591 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36592       has_space=`$ECHO "$complete" | $GREP " "`
36593       if test "x$has_space" != x; then
36594         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36595 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36596       fi
36597       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36598     fi
36599   fi
36600 
36601   # Now new_path has a complete unix path to the binary
36602   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36603     # Keep paths in /bin as-is, but remove trailing .exe if any
36604     new_path="${new_path/%.exe/}"
36605     # Do not save /bin paths to all_fixpath_prefixes!
36606   else
36607     # Not in mixed or Windows style, start by that.
36608     new_path=`cmd //c echo $new_path`
36609 
36610   input_path="$new_path"
36611   # Check if we need to convert this using DOS-style short mode. If the path
36612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36613   # take no chances and rewrite it.
36614   # Note: m4 eats our [], so we need to use [ and ] instead.
36615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36616   if test "x$has_forbidden_chars" != x; then
36617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36618     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36619   fi
36620 
36621     # Output is in $new_path
36622 
36623   windows_path="$new_path"
36624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36625     unix_path=`$CYGPATH -u "$windows_path"`
36626     new_path="$unix_path"
36627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36629     new_path="$unix_path"
36630   fi
36631 
36632     # remove trailing .exe if any
36633     new_path="${new_path/%.exe/}"
36634 
36635     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36636     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36637   fi
36638 
36639   else
36640     # We're on a unix platform. Hooray! :)
36641     # First separate the path from the arguments. This will split at the first
36642     # space.
36643     complete="$MCS"
36644     path="${complete%% *}"
36645     tmp="$complete EOL"
36646     arguments="${tmp#* }"
36647 
36648     # Cannot rely on the command "which" here since it doesn't always work.
36649     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36650     if test -z "$is_absolute_path"; then
36651       # Path to executable is not absolute. Find it.
36652       IFS_save="$IFS"
36653       IFS=:
36654       for p in $PATH; do
36655         if test -f "$p/$path" && test -x "$p/$path"; then
36656           new_path="$p/$path"
36657           break
36658         fi
36659       done
36660       IFS="$IFS_save"
36661     else
36662       # This is an absolute path, we can use it without further modifications.
36663       new_path="$path"
36664     fi
36665 
36666     if test "x$new_path" = x; then
36667       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36668 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36669       has_space=`$ECHO "$complete" | $GREP " "`
36670       if test "x$has_space" != x; then
36671         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36672 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36673       fi
36674       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36675     fi
36676   fi
36677 
36678   # Now join together the path and the arguments once again
36679   if test "x$arguments" != xEOL; then
36680     new_complete="$new_path ${arguments% *}"
36681   else
36682     new_complete="$new_path"
36683   fi
36684 
36685   if test "x$complete" != "x$new_complete"; then
36686     MCS="$new_complete"
36687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36688 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36689   fi
36690 
36691   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36692     # FIXME: we should unify this with the solaris case above.
36693 
36694 
36695   # Publish this variable in the help.
36696 
36697 
36698   if test "x$STRIP" = x; then
36699     # The variable is not set by user, try to locate tool using the code snippet
36700     if test -n "$ac_tool_prefix"; then
36701   for ac_prog in strip
36702   do
36703     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36704 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36706 $as_echo_n "checking for $ac_word... " >&6; }
36707 if ${ac_cv_prog_STRIP+:} false; then :
36708   $as_echo_n "(cached) " >&6
36709 else
36710   if test -n "$STRIP"; then
36711   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36712 else
36713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36714 for as_dir in $PATH
36715 do
36716   IFS=$as_save_IFS
36717   test -z "$as_dir" && as_dir=.
36718     for ac_exec_ext in '' $ac_executable_extensions; do
36719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36720     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36722     break 2
36723   fi
36724 done
36725   done
36726 IFS=$as_save_IFS
36727 
36728 fi
36729 fi
36730 STRIP=$ac_cv_prog_STRIP
36731 if test -n "$STRIP"; then
36732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36733 $as_echo "$STRIP" >&6; }
36734 else
36735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36736 $as_echo "no" >&6; }
36737 fi
36738 
36739 
36740     test -n "$STRIP" && break
36741   done
36742 fi
36743 if test -z "$STRIP"; then
36744   ac_ct_STRIP=$STRIP
36745   for ac_prog in strip
36746 do
36747   # Extract the first word of "$ac_prog", so it can be a program name with args.
36748 set dummy $ac_prog; ac_word=$2
36749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36750 $as_echo_n "checking for $ac_word... " >&6; }
36751 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36752   $as_echo_n "(cached) " >&6
36753 else
36754   if test -n "$ac_ct_STRIP"; then
36755   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36756 else
36757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36758 for as_dir in $PATH
36759 do
36760   IFS=$as_save_IFS
36761   test -z "$as_dir" && as_dir=.
36762     for ac_exec_ext in '' $ac_executable_extensions; do
36763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36764     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36766     break 2
36767   fi
36768 done
36769   done
36770 IFS=$as_save_IFS
36771 
36772 fi
36773 fi
36774 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36775 if test -n "$ac_ct_STRIP"; then
36776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36777 $as_echo "$ac_ct_STRIP" >&6; }
36778 else
36779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36780 $as_echo "no" >&6; }
36781 fi
36782 
36783 
36784   test -n "$ac_ct_STRIP" && break
36785 done
36786 
36787   if test "x$ac_ct_STRIP" = x; then
36788     STRIP=""
36789   else
36790     case $cross_compiling:$ac_tool_warned in
36791 yes:)
36792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36793 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36794 ac_tool_warned=yes ;;
36795 esac
36796     STRIP=$ac_ct_STRIP
36797   fi
36798 fi
36799 
36800   else
36801     # The variable is set, but is it from the command line or the environment?
36802 
36803     # Try to remove the string !STRIP! from our list.
36804     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36805     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36806       # If it failed, the variable was not from the command line. Ignore it,
36807       # but warn the user (except for BASH, which is always set by the calling BASH).
36808       if test "xSTRIP" != xBASH; then
36809         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36810 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36811       fi
36812       # Try to locate tool using the code snippet
36813       if test -n "$ac_tool_prefix"; then
36814   for ac_prog in strip
36815   do
36816     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36817 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36819 $as_echo_n "checking for $ac_word... " >&6; }
36820 if ${ac_cv_prog_STRIP+:} false; then :
36821   $as_echo_n "(cached) " >&6
36822 else
36823   if test -n "$STRIP"; then
36824   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36825 else
36826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36827 for as_dir in $PATH
36828 do
36829   IFS=$as_save_IFS
36830   test -z "$as_dir" && as_dir=.
36831     for ac_exec_ext in '' $ac_executable_extensions; do
36832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36833     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36835     break 2
36836   fi
36837 done
36838   done
36839 IFS=$as_save_IFS
36840 
36841 fi
36842 fi
36843 STRIP=$ac_cv_prog_STRIP
36844 if test -n "$STRIP"; then
36845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36846 $as_echo "$STRIP" >&6; }
36847 else
36848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36849 $as_echo "no" >&6; }
36850 fi
36851 
36852 
36853     test -n "$STRIP" && break
36854   done
36855 fi
36856 if test -z "$STRIP"; then
36857   ac_ct_STRIP=$STRIP
36858   for ac_prog in strip
36859 do
36860   # Extract the first word of "$ac_prog", so it can be a program name with args.
36861 set dummy $ac_prog; ac_word=$2
36862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36863 $as_echo_n "checking for $ac_word... " >&6; }
36864 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36865   $as_echo_n "(cached) " >&6
36866 else
36867   if test -n "$ac_ct_STRIP"; then
36868   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36869 else
36870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36871 for as_dir in $PATH
36872 do
36873   IFS=$as_save_IFS
36874   test -z "$as_dir" && as_dir=.
36875     for ac_exec_ext in '' $ac_executable_extensions; do
36876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36877     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36879     break 2
36880   fi
36881 done
36882   done
36883 IFS=$as_save_IFS
36884 
36885 fi
36886 fi
36887 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36888 if test -n "$ac_ct_STRIP"; then
36889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36890 $as_echo "$ac_ct_STRIP" >&6; }
36891 else
36892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36893 $as_echo "no" >&6; }
36894 fi
36895 
36896 
36897   test -n "$ac_ct_STRIP" && break
36898 done
36899 
36900   if test "x$ac_ct_STRIP" = x; then
36901     STRIP=""
36902   else
36903     case $cross_compiling:$ac_tool_warned in
36904 yes:)
36905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36906 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36907 ac_tool_warned=yes ;;
36908 esac
36909     STRIP=$ac_ct_STRIP
36910   fi
36911 fi
36912 
36913     else
36914       # If it succeeded, then it was overridden by the user. We will use it
36915       # for the tool.
36916 
36917       # First remove it from the list of overridden variables, so we can test
36918       # for unknown variables in the end.
36919       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36920 
36921       # Check if the provided tool contains a complete path.
36922       tool_specified="$STRIP"
36923       tool_basename="${tool_specified##*/}"
36924       if test "x$tool_basename" = "x$tool_specified"; then
36925         # A command without a complete path is provided, search $PATH.
36926         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36927 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36928         # Extract the first word of "$tool_basename", so it can be a program name with args.
36929 set dummy $tool_basename; ac_word=$2
36930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36931 $as_echo_n "checking for $ac_word... " >&6; }
36932 if ${ac_cv_path_STRIP+:} false; then :
36933   $as_echo_n "(cached) " >&6
36934 else
36935   case $STRIP in
36936   [\\/]* | ?:[\\/]*)
36937   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36938   ;;
36939   *)
36940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36941 for as_dir in $PATH
36942 do
36943   IFS=$as_save_IFS
36944   test -z "$as_dir" && as_dir=.
36945     for ac_exec_ext in '' $ac_executable_extensions; do
36946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36947     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36949     break 2
36950   fi
36951 done
36952   done
36953 IFS=$as_save_IFS
36954 
36955   ;;
36956 esac
36957 fi
36958 STRIP=$ac_cv_path_STRIP
36959 if test -n "$STRIP"; then
36960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36961 $as_echo "$STRIP" >&6; }
36962 else
36963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36964 $as_echo "no" >&6; }
36965 fi
36966 
36967 
36968         if test "x$STRIP" = x; then
36969           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36970         fi
36971       else
36972         # Otherwise we believe it is a complete path. Use it as it is.
36973         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36974 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36975         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36976 $as_echo_n "checking for STRIP... " >&6; }
36977         if test ! -x "$tool_specified"; then
36978           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36979 $as_echo "not found" >&6; }
36980           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36981         fi
36982         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36983 $as_echo "$tool_specified" >&6; }
36984       fi
36985     fi
36986   fi
36987 
36988 
36989 
36990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36991 
36992   # First separate the path from the arguments. This will split at the first
36993   # space.
36994   complete="$STRIP"
36995   path="${complete%% *}"
36996   tmp="$complete EOL"
36997   arguments="${tmp#* }"
36998 
36999   # Input might be given as Windows format, start by converting to
37000   # unix format.
37001   new_path=`$CYGPATH -u "$path"`
37002 
37003   # Now try to locate executable using which
37004   new_path=`$WHICH "$new_path" 2> /dev/null`
37005   # bat and cmd files are not always considered executable in cygwin causing which
37006   # to not find them
37007   if test "x$new_path" = x \
37008       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37009       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37010     new_path=`$CYGPATH -u "$path"`
37011   fi
37012   if test "x$new_path" = x; then
37013     # Oops. Which didn't find the executable.
37014     # The splitting of arguments from the executable at a space might have been incorrect,
37015     # since paths with space are more likely in Windows. Give it another try with the whole
37016     # argument.
37017     path="$complete"
37018     arguments="EOL"
37019     new_path=`$CYGPATH -u "$path"`
37020     new_path=`$WHICH "$new_path" 2> /dev/null`
37021     # bat and cmd files are not always considered executable in cygwin causing which
37022     # to not find them
37023     if test "x$new_path" = x \
37024         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37025         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37026       new_path=`$CYGPATH -u "$path"`
37027     fi
37028     if test "x$new_path" = x; then
37029       # It's still not found. Now this is an unrecoverable error.
37030       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37031 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37032       has_space=`$ECHO "$complete" | $GREP " "`
37033       if test "x$has_space" != x; then
37034         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37035 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37036       fi
37037       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37038     fi
37039   fi
37040 
37041   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37042   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37043   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37044   # "foo.exe" is OK but "foo" is an error.
37045   #
37046   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37047   # It is also a way to make sure we got the proper file name for the real test later on.
37048   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37049   if test "x$test_shortpath" = x; then
37050     # Short path failed, file does not exist as specified.
37051     # Try adding .exe or .cmd
37052     if test -f "${new_path}.exe"; then
37053       input_to_shortpath="${new_path}.exe"
37054     elif test -f "${new_path}.cmd"; then
37055       input_to_shortpath="${new_path}.cmd"
37056     else
37057       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37058 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37059       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37060 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37061       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37062     fi
37063   else
37064     input_to_shortpath="$new_path"
37065   fi
37066 
37067   # Call helper function which possibly converts this using DOS-style short mode.
37068   # If so, the updated path is stored in $new_path.
37069   new_path="$input_to_shortpath"
37070 
37071   input_path="$input_to_shortpath"
37072   # Check if we need to convert this using DOS-style short mode. If the path
37073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37074   # take no chances and rewrite it.
37075   # Note: m4 eats our [], so we need to use [ and ] instead.
37076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37077   if test "x$has_forbidden_chars" != x; then
37078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37079     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37080     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37081     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37082       # Going to short mode and back again did indeed matter. Since short mode is
37083       # case insensitive, let's make it lowercase to improve readability.
37084       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37085       # Now convert it back to Unix-stile (cygpath)
37086       input_path=`$CYGPATH -u "$shortmode_path"`
37087       new_path="$input_path"
37088     fi
37089   fi
37090 
37091   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37092   if test "x$test_cygdrive_prefix" = x; then
37093     # As a simple fix, exclude /usr/bin since it's not a real path.
37094     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37095       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37096       # a path prefixed by /cygdrive for fixpath to work.
37097       new_path="$CYGWIN_ROOT_PATH$input_path"
37098     fi
37099   fi
37100 
37101   # remove trailing .exe if any
37102   new_path="${new_path/%.exe/}"
37103 
37104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37105 
37106   # First separate the path from the arguments. This will split at the first
37107   # space.
37108   complete="$STRIP"
37109   path="${complete%% *}"
37110   tmp="$complete EOL"
37111   arguments="${tmp#* }"
37112 
37113   # Input might be given as Windows format, start by converting to
37114   # unix format.
37115   new_path="$path"
37116 
37117   windows_path="$new_path"
37118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37119     unix_path=`$CYGPATH -u "$windows_path"`
37120     new_path="$unix_path"
37121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37123     new_path="$unix_path"
37124   fi
37125 
37126 
37127   # Now try to locate executable using which
37128   new_path=`$WHICH "$new_path" 2> /dev/null`
37129 
37130   if test "x$new_path" = x; then
37131     # Oops. Which didn't find the executable.
37132     # The splitting of arguments from the executable at a space might have been incorrect,
37133     # since paths with space are more likely in Windows. Give it another try with the whole
37134     # argument.
37135     path="$complete"
37136     arguments="EOL"
37137     new_path="$path"
37138 
37139   windows_path="$new_path"
37140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37141     unix_path=`$CYGPATH -u "$windows_path"`
37142     new_path="$unix_path"
37143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37145     new_path="$unix_path"
37146   fi
37147 
37148 
37149     new_path=`$WHICH "$new_path" 2> /dev/null`
37150     # bat and cmd files are not always considered executable in MSYS causing which
37151     # to not find them
37152     if test "x$new_path" = x \
37153         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37154         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37155       new_path="$path"
37156 
37157   windows_path="$new_path"
37158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37159     unix_path=`$CYGPATH -u "$windows_path"`
37160     new_path="$unix_path"
37161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37163     new_path="$unix_path"
37164   fi
37165 
37166     fi
37167 
37168     if test "x$new_path" = x; then
37169       # It's still not found. Now this is an unrecoverable error.
37170       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37171 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37172       has_space=`$ECHO "$complete" | $GREP " "`
37173       if test "x$has_space" != x; then
37174         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37175 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37176       fi
37177       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37178     fi
37179   fi
37180 
37181   # Now new_path has a complete unix path to the binary
37182   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37183     # Keep paths in /bin as-is, but remove trailing .exe if any
37184     new_path="${new_path/%.exe/}"
37185     # Do not save /bin paths to all_fixpath_prefixes!
37186   else
37187     # Not in mixed or Windows style, start by that.
37188     new_path=`cmd //c echo $new_path`
37189 
37190   input_path="$new_path"
37191   # Check if we need to convert this using DOS-style short mode. If the path
37192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37193   # take no chances and rewrite it.
37194   # Note: m4 eats our [], so we need to use [ and ] instead.
37195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37196   if test "x$has_forbidden_chars" != x; then
37197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37199   fi
37200 
37201     # Output is in $new_path
37202 
37203   windows_path="$new_path"
37204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37205     unix_path=`$CYGPATH -u "$windows_path"`
37206     new_path="$unix_path"
37207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37209     new_path="$unix_path"
37210   fi
37211 
37212     # remove trailing .exe if any
37213     new_path="${new_path/%.exe/}"
37214 
37215     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37216     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37217   fi
37218 
37219   else
37220     # We're on a unix platform. Hooray! :)
37221     # First separate the path from the arguments. This will split at the first
37222     # space.
37223     complete="$STRIP"
37224     path="${complete%% *}"
37225     tmp="$complete EOL"
37226     arguments="${tmp#* }"
37227 
37228     # Cannot rely on the command "which" here since it doesn't always work.
37229     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37230     if test -z "$is_absolute_path"; then
37231       # Path to executable is not absolute. Find it.
37232       IFS_save="$IFS"
37233       IFS=:
37234       for p in $PATH; do
37235         if test -f "$p/$path" && test -x "$p/$path"; then
37236           new_path="$p/$path"
37237           break
37238         fi
37239       done
37240       IFS="$IFS_save"
37241     else
37242       # This is an absolute path, we can use it without further modifications.
37243       new_path="$path"
37244     fi
37245 
37246     if test "x$new_path" = x; then
37247       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37248 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37249       has_space=`$ECHO "$complete" | $GREP " "`
37250       if test "x$has_space" != x; then
37251         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37252 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37253       fi
37254       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37255     fi
37256   fi
37257 
37258   # Now join together the path and the arguments once again
37259   if test "x$arguments" != xEOL; then
37260     new_complete="$new_path ${arguments% *}"
37261   else
37262     new_complete="$new_path"
37263   fi
37264 
37265   if test "x$complete" != "x$new_complete"; then
37266     STRIP="$new_complete"
37267     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37268 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37269   fi
37270 
37271 
37272 
37273   # Publish this variable in the help.
37274 
37275 
37276   if test "x$NM" = x; then
37277     # The variable is not set by user, try to locate tool using the code snippet
37278     if test -n "$ac_tool_prefix"; then
37279   for ac_prog in nm
37280   do
37281     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37282 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37284 $as_echo_n "checking for $ac_word... " >&6; }
37285 if ${ac_cv_prog_NM+:} false; then :
37286   $as_echo_n "(cached) " >&6
37287 else
37288   if test -n "$NM"; then
37289   ac_cv_prog_NM="$NM" # Let the user override the test.
37290 else
37291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37292 for as_dir in $PATH
37293 do
37294   IFS=$as_save_IFS
37295   test -z "$as_dir" && as_dir=.
37296     for ac_exec_ext in '' $ac_executable_extensions; do
37297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37298     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37300     break 2
37301   fi
37302 done
37303   done
37304 IFS=$as_save_IFS
37305 
37306 fi
37307 fi
37308 NM=$ac_cv_prog_NM
37309 if test -n "$NM"; then
37310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37311 $as_echo "$NM" >&6; }
37312 else
37313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37314 $as_echo "no" >&6; }
37315 fi
37316 
37317 
37318     test -n "$NM" && break
37319   done
37320 fi
37321 if test -z "$NM"; then
37322   ac_ct_NM=$NM
37323   for ac_prog in nm
37324 do
37325   # Extract the first word of "$ac_prog", so it can be a program name with args.
37326 set dummy $ac_prog; ac_word=$2
37327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37328 $as_echo_n "checking for $ac_word... " >&6; }
37329 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37330   $as_echo_n "(cached) " >&6
37331 else
37332   if test -n "$ac_ct_NM"; then
37333   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37334 else
37335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37336 for as_dir in $PATH
37337 do
37338   IFS=$as_save_IFS
37339   test -z "$as_dir" && as_dir=.
37340     for ac_exec_ext in '' $ac_executable_extensions; do
37341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37342     ac_cv_prog_ac_ct_NM="$ac_prog"
37343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37344     break 2
37345   fi
37346 done
37347   done
37348 IFS=$as_save_IFS
37349 
37350 fi
37351 fi
37352 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37353 if test -n "$ac_ct_NM"; then
37354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37355 $as_echo "$ac_ct_NM" >&6; }
37356 else
37357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37358 $as_echo "no" >&6; }
37359 fi
37360 
37361 
37362   test -n "$ac_ct_NM" && break
37363 done
37364 
37365   if test "x$ac_ct_NM" = x; then
37366     NM=""
37367   else
37368     case $cross_compiling:$ac_tool_warned in
37369 yes:)
37370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37371 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37372 ac_tool_warned=yes ;;
37373 esac
37374     NM=$ac_ct_NM
37375   fi
37376 fi
37377 
37378   else
37379     # The variable is set, but is it from the command line or the environment?
37380 
37381     # Try to remove the string !NM! from our list.
37382     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37383     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37384       # If it failed, the variable was not from the command line. Ignore it,
37385       # but warn the user (except for BASH, which is always set by the calling BASH).
37386       if test "xNM" != xBASH; then
37387         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37388 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37389       fi
37390       # Try to locate tool using the code snippet
37391       if test -n "$ac_tool_prefix"; then
37392   for ac_prog in nm
37393   do
37394     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37395 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37397 $as_echo_n "checking for $ac_word... " >&6; }
37398 if ${ac_cv_prog_NM+:} false; then :
37399   $as_echo_n "(cached) " >&6
37400 else
37401   if test -n "$NM"; then
37402   ac_cv_prog_NM="$NM" # Let the user override the test.
37403 else
37404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37405 for as_dir in $PATH
37406 do
37407   IFS=$as_save_IFS
37408   test -z "$as_dir" && as_dir=.
37409     for ac_exec_ext in '' $ac_executable_extensions; do
37410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37411     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37413     break 2
37414   fi
37415 done
37416   done
37417 IFS=$as_save_IFS
37418 
37419 fi
37420 fi
37421 NM=$ac_cv_prog_NM
37422 if test -n "$NM"; then
37423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37424 $as_echo "$NM" >&6; }
37425 else
37426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37427 $as_echo "no" >&6; }
37428 fi
37429 
37430 
37431     test -n "$NM" && break
37432   done
37433 fi
37434 if test -z "$NM"; then
37435   ac_ct_NM=$NM
37436   for ac_prog in nm
37437 do
37438   # Extract the first word of "$ac_prog", so it can be a program name with args.
37439 set dummy $ac_prog; ac_word=$2
37440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37441 $as_echo_n "checking for $ac_word... " >&6; }
37442 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37443   $as_echo_n "(cached) " >&6
37444 else
37445   if test -n "$ac_ct_NM"; then
37446   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37447 else
37448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37449 for as_dir in $PATH
37450 do
37451   IFS=$as_save_IFS
37452   test -z "$as_dir" && as_dir=.
37453     for ac_exec_ext in '' $ac_executable_extensions; do
37454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37455     ac_cv_prog_ac_ct_NM="$ac_prog"
37456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37457     break 2
37458   fi
37459 done
37460   done
37461 IFS=$as_save_IFS
37462 
37463 fi
37464 fi
37465 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37466 if test -n "$ac_ct_NM"; then
37467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37468 $as_echo "$ac_ct_NM" >&6; }
37469 else
37470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37471 $as_echo "no" >&6; }
37472 fi
37473 
37474 
37475   test -n "$ac_ct_NM" && break
37476 done
37477 
37478   if test "x$ac_ct_NM" = x; then
37479     NM=""
37480   else
37481     case $cross_compiling:$ac_tool_warned in
37482 yes:)
37483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37484 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37485 ac_tool_warned=yes ;;
37486 esac
37487     NM=$ac_ct_NM
37488   fi
37489 fi
37490 
37491     else
37492       # If it succeeded, then it was overridden by the user. We will use it
37493       # for the tool.
37494 
37495       # First remove it from the list of overridden variables, so we can test
37496       # for unknown variables in the end.
37497       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37498 
37499       # Check if the provided tool contains a complete path.
37500       tool_specified="$NM"
37501       tool_basename="${tool_specified##*/}"
37502       if test "x$tool_basename" = "x$tool_specified"; then
37503         # A command without a complete path is provided, search $PATH.
37504         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37505 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37506         # Extract the first word of "$tool_basename", so it can be a program name with args.
37507 set dummy $tool_basename; ac_word=$2
37508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37509 $as_echo_n "checking for $ac_word... " >&6; }
37510 if ${ac_cv_path_NM+:} false; then :
37511   $as_echo_n "(cached) " >&6
37512 else
37513   case $NM in
37514   [\\/]* | ?:[\\/]*)
37515   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37516   ;;
37517   *)
37518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37519 for as_dir in $PATH
37520 do
37521   IFS=$as_save_IFS
37522   test -z "$as_dir" && as_dir=.
37523     for ac_exec_ext in '' $ac_executable_extensions; do
37524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37525     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37527     break 2
37528   fi
37529 done
37530   done
37531 IFS=$as_save_IFS
37532 
37533   ;;
37534 esac
37535 fi
37536 NM=$ac_cv_path_NM
37537 if test -n "$NM"; then
37538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37539 $as_echo "$NM" >&6; }
37540 else
37541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37542 $as_echo "no" >&6; }
37543 fi
37544 
37545 
37546         if test "x$NM" = x; then
37547           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37548         fi
37549       else
37550         # Otherwise we believe it is a complete path. Use it as it is.
37551         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37552 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37553         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37554 $as_echo_n "checking for NM... " >&6; }
37555         if test ! -x "$tool_specified"; then
37556           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37557 $as_echo "not found" >&6; }
37558           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37559         fi
37560         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37561 $as_echo "$tool_specified" >&6; }
37562       fi
37563     fi
37564   fi
37565 
37566 
37567 
37568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37569 
37570   # First separate the path from the arguments. This will split at the first
37571   # space.
37572   complete="$NM"
37573   path="${complete%% *}"
37574   tmp="$complete EOL"
37575   arguments="${tmp#* }"
37576 
37577   # Input might be given as Windows format, start by converting to
37578   # unix format.
37579   new_path=`$CYGPATH -u "$path"`
37580 
37581   # Now try to locate executable using which
37582   new_path=`$WHICH "$new_path" 2> /dev/null`
37583   # bat and cmd files are not always considered executable in cygwin causing which
37584   # to not find them
37585   if test "x$new_path" = x \
37586       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37587       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37588     new_path=`$CYGPATH -u "$path"`
37589   fi
37590   if test "x$new_path" = x; then
37591     # Oops. Which didn't find the executable.
37592     # The splitting of arguments from the executable at a space might have been incorrect,
37593     # since paths with space are more likely in Windows. Give it another try with the whole
37594     # argument.
37595     path="$complete"
37596     arguments="EOL"
37597     new_path=`$CYGPATH -u "$path"`
37598     new_path=`$WHICH "$new_path" 2> /dev/null`
37599     # bat and cmd files are not always considered executable in cygwin causing which
37600     # to not find them
37601     if test "x$new_path" = x \
37602         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37603         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37604       new_path=`$CYGPATH -u "$path"`
37605     fi
37606     if test "x$new_path" = x; then
37607       # It's still not found. Now this is an unrecoverable error.
37608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37609 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37610       has_space=`$ECHO "$complete" | $GREP " "`
37611       if test "x$has_space" != x; then
37612         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37614       fi
37615       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37616     fi
37617   fi
37618 
37619   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37620   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37621   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37622   # "foo.exe" is OK but "foo" is an error.
37623   #
37624   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37625   # It is also a way to make sure we got the proper file name for the real test later on.
37626   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37627   if test "x$test_shortpath" = x; then
37628     # Short path failed, file does not exist as specified.
37629     # Try adding .exe or .cmd
37630     if test -f "${new_path}.exe"; then
37631       input_to_shortpath="${new_path}.exe"
37632     elif test -f "${new_path}.cmd"; then
37633       input_to_shortpath="${new_path}.cmd"
37634     else
37635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37636 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37637       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37638 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37639       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37640     fi
37641   else
37642     input_to_shortpath="$new_path"
37643   fi
37644 
37645   # Call helper function which possibly converts this using DOS-style short mode.
37646   # If so, the updated path is stored in $new_path.
37647   new_path="$input_to_shortpath"
37648 
37649   input_path="$input_to_shortpath"
37650   # Check if we need to convert this using DOS-style short mode. If the path
37651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37652   # take no chances and rewrite it.
37653   # Note: m4 eats our [], so we need to use [ and ] instead.
37654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37655   if test "x$has_forbidden_chars" != x; then
37656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37657     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37658     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37659     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37660       # Going to short mode and back again did indeed matter. Since short mode is
37661       # case insensitive, let's make it lowercase to improve readability.
37662       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37663       # Now convert it back to Unix-stile (cygpath)
37664       input_path=`$CYGPATH -u "$shortmode_path"`
37665       new_path="$input_path"
37666     fi
37667   fi
37668 
37669   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37670   if test "x$test_cygdrive_prefix" = x; then
37671     # As a simple fix, exclude /usr/bin since it's not a real path.
37672     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37673       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37674       # a path prefixed by /cygdrive for fixpath to work.
37675       new_path="$CYGWIN_ROOT_PATH$input_path"
37676     fi
37677   fi
37678 
37679   # remove trailing .exe if any
37680   new_path="${new_path/%.exe/}"
37681 
37682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37683 
37684   # First separate the path from the arguments. This will split at the first
37685   # space.
37686   complete="$NM"
37687   path="${complete%% *}"
37688   tmp="$complete EOL"
37689   arguments="${tmp#* }"
37690 
37691   # Input might be given as Windows format, start by converting to
37692   # unix format.
37693   new_path="$path"
37694 
37695   windows_path="$new_path"
37696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37697     unix_path=`$CYGPATH -u "$windows_path"`
37698     new_path="$unix_path"
37699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37701     new_path="$unix_path"
37702   fi
37703 
37704 
37705   # Now try to locate executable using which
37706   new_path=`$WHICH "$new_path" 2> /dev/null`
37707 
37708   if test "x$new_path" = x; then
37709     # Oops. Which didn't find the executable.
37710     # The splitting of arguments from the executable at a space might have been incorrect,
37711     # since paths with space are more likely in Windows. Give it another try with the whole
37712     # argument.
37713     path="$complete"
37714     arguments="EOL"
37715     new_path="$path"
37716 
37717   windows_path="$new_path"
37718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37719     unix_path=`$CYGPATH -u "$windows_path"`
37720     new_path="$unix_path"
37721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37723     new_path="$unix_path"
37724   fi
37725 
37726 
37727     new_path=`$WHICH "$new_path" 2> /dev/null`
37728     # bat and cmd files are not always considered executable in MSYS causing which
37729     # to not find them
37730     if test "x$new_path" = x \
37731         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37732         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37733       new_path="$path"
37734 
37735   windows_path="$new_path"
37736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37737     unix_path=`$CYGPATH -u "$windows_path"`
37738     new_path="$unix_path"
37739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37741     new_path="$unix_path"
37742   fi
37743 
37744     fi
37745 
37746     if test "x$new_path" = x; then
37747       # It's still not found. Now this is an unrecoverable error.
37748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37749 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37750       has_space=`$ECHO "$complete" | $GREP " "`
37751       if test "x$has_space" != x; then
37752         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37753 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37754       fi
37755       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37756     fi
37757   fi
37758 
37759   # Now new_path has a complete unix path to the binary
37760   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37761     # Keep paths in /bin as-is, but remove trailing .exe if any
37762     new_path="${new_path/%.exe/}"
37763     # Do not save /bin paths to all_fixpath_prefixes!
37764   else
37765     # Not in mixed or Windows style, start by that.
37766     new_path=`cmd //c echo $new_path`
37767 
37768   input_path="$new_path"
37769   # Check if we need to convert this using DOS-style short mode. If the path
37770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37771   # take no chances and rewrite it.
37772   # Note: m4 eats our [], so we need to use [ and ] instead.
37773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37774   if test "x$has_forbidden_chars" != x; then
37775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37776     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37777   fi
37778 
37779     # Output is in $new_path
37780 
37781   windows_path="$new_path"
37782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37783     unix_path=`$CYGPATH -u "$windows_path"`
37784     new_path="$unix_path"
37785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37787     new_path="$unix_path"
37788   fi
37789 
37790     # remove trailing .exe if any
37791     new_path="${new_path/%.exe/}"
37792 
37793     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37794     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37795   fi
37796 
37797   else
37798     # We're on a unix platform. Hooray! :)
37799     # First separate the path from the arguments. This will split at the first
37800     # space.
37801     complete="$NM"
37802     path="${complete%% *}"
37803     tmp="$complete EOL"
37804     arguments="${tmp#* }"
37805 
37806     # Cannot rely on the command "which" here since it doesn't always work.
37807     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37808     if test -z "$is_absolute_path"; then
37809       # Path to executable is not absolute. Find it.
37810       IFS_save="$IFS"
37811       IFS=:
37812       for p in $PATH; do
37813         if test -f "$p/$path" && test -x "$p/$path"; then
37814           new_path="$p/$path"
37815           break
37816         fi
37817       done
37818       IFS="$IFS_save"
37819     else
37820       # This is an absolute path, we can use it without further modifications.
37821       new_path="$path"
37822     fi
37823 
37824     if test "x$new_path" = x; then
37825       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37826 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37827       has_space=`$ECHO "$complete" | $GREP " "`
37828       if test "x$has_space" != x; then
37829         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37830 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37831       fi
37832       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37833     fi
37834   fi
37835 
37836   # Now join together the path and the arguments once again
37837   if test "x$arguments" != xEOL; then
37838     new_complete="$new_path ${arguments% *}"
37839   else
37840     new_complete="$new_path"
37841   fi
37842 
37843   if test "x$complete" != "x$new_complete"; then
37844     NM="$new_complete"
37845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37846 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37847   fi
37848 
37849     GNM="$NM"
37850 
37851   fi
37852 
37853   # objcopy is used for moving debug symbols to separate files when
37854   # full debug symbols are enabled.
37855   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37856 
37857 
37858   # Publish this variable in the help.
37859 
37860 
37861   if test "x$OBJCOPY" = x; then
37862     # The variable is not set by user, try to locate tool using the code snippet
37863     if test -n "$ac_tool_prefix"; then
37864   for ac_prog in gobjcopy objcopy
37865   do
37866     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37867 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37869 $as_echo_n "checking for $ac_word... " >&6; }
37870 if ${ac_cv_prog_OBJCOPY+:} false; then :
37871   $as_echo_n "(cached) " >&6
37872 else
37873   if test -n "$OBJCOPY"; then
37874   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37875 else
37876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37877 for as_dir in $PATH
37878 do
37879   IFS=$as_save_IFS
37880   test -z "$as_dir" && as_dir=.
37881     for ac_exec_ext in '' $ac_executable_extensions; do
37882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37883     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37885     break 2
37886   fi
37887 done
37888   done
37889 IFS=$as_save_IFS
37890 
37891 fi
37892 fi
37893 OBJCOPY=$ac_cv_prog_OBJCOPY
37894 if test -n "$OBJCOPY"; then
37895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37896 $as_echo "$OBJCOPY" >&6; }
37897 else
37898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37899 $as_echo "no" >&6; }
37900 fi
37901 
37902 
37903     test -n "$OBJCOPY" && break
37904   done
37905 fi
37906 if test -z "$OBJCOPY"; then
37907   ac_ct_OBJCOPY=$OBJCOPY
37908   for ac_prog in gobjcopy objcopy
37909 do
37910   # Extract the first word of "$ac_prog", so it can be a program name with args.
37911 set dummy $ac_prog; ac_word=$2
37912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37913 $as_echo_n "checking for $ac_word... " >&6; }
37914 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37915   $as_echo_n "(cached) " >&6
37916 else
37917   if test -n "$ac_ct_OBJCOPY"; then
37918   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37919 else
37920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37921 for as_dir in $PATH
37922 do
37923   IFS=$as_save_IFS
37924   test -z "$as_dir" && as_dir=.
37925     for ac_exec_ext in '' $ac_executable_extensions; do
37926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37927     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37929     break 2
37930   fi
37931 done
37932   done
37933 IFS=$as_save_IFS
37934 
37935 fi
37936 fi
37937 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37938 if test -n "$ac_ct_OBJCOPY"; then
37939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37940 $as_echo "$ac_ct_OBJCOPY" >&6; }
37941 else
37942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37943 $as_echo "no" >&6; }
37944 fi
37945 
37946 
37947   test -n "$ac_ct_OBJCOPY" && break
37948 done
37949 
37950   if test "x$ac_ct_OBJCOPY" = x; then
37951     OBJCOPY=""
37952   else
37953     case $cross_compiling:$ac_tool_warned in
37954 yes:)
37955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37956 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37957 ac_tool_warned=yes ;;
37958 esac
37959     OBJCOPY=$ac_ct_OBJCOPY
37960   fi
37961 fi
37962 
37963   else
37964     # The variable is set, but is it from the command line or the environment?
37965 
37966     # Try to remove the string !OBJCOPY! from our list.
37967     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37968     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37969       # If it failed, the variable was not from the command line. Ignore it,
37970       # but warn the user (except for BASH, which is always set by the calling BASH).
37971       if test "xOBJCOPY" != xBASH; then
37972         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37973 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37974       fi
37975       # Try to locate tool using the code snippet
37976       if test -n "$ac_tool_prefix"; then
37977   for ac_prog in gobjcopy objcopy
37978   do
37979     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37980 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37982 $as_echo_n "checking for $ac_word... " >&6; }
37983 if ${ac_cv_prog_OBJCOPY+:} false; then :
37984   $as_echo_n "(cached) " >&6
37985 else
37986   if test -n "$OBJCOPY"; then
37987   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37988 else
37989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37990 for as_dir in $PATH
37991 do
37992   IFS=$as_save_IFS
37993   test -z "$as_dir" && as_dir=.
37994     for ac_exec_ext in '' $ac_executable_extensions; do
37995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37996     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37998     break 2
37999   fi
38000 done
38001   done
38002 IFS=$as_save_IFS
38003 
38004 fi
38005 fi
38006 OBJCOPY=$ac_cv_prog_OBJCOPY
38007 if test -n "$OBJCOPY"; then
38008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38009 $as_echo "$OBJCOPY" >&6; }
38010 else
38011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38012 $as_echo "no" >&6; }
38013 fi
38014 
38015 
38016     test -n "$OBJCOPY" && break
38017   done
38018 fi
38019 if test -z "$OBJCOPY"; then
38020   ac_ct_OBJCOPY=$OBJCOPY
38021   for ac_prog in gobjcopy objcopy
38022 do
38023   # Extract the first word of "$ac_prog", so it can be a program name with args.
38024 set dummy $ac_prog; ac_word=$2
38025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38026 $as_echo_n "checking for $ac_word... " >&6; }
38027 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38028   $as_echo_n "(cached) " >&6
38029 else
38030   if test -n "$ac_ct_OBJCOPY"; then
38031   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38032 else
38033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38034 for as_dir in $PATH
38035 do
38036   IFS=$as_save_IFS
38037   test -z "$as_dir" && as_dir=.
38038     for ac_exec_ext in '' $ac_executable_extensions; do
38039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38040     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38042     break 2
38043   fi
38044 done
38045   done
38046 IFS=$as_save_IFS
38047 
38048 fi
38049 fi
38050 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38051 if test -n "$ac_ct_OBJCOPY"; then
38052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38053 $as_echo "$ac_ct_OBJCOPY" >&6; }
38054 else
38055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38056 $as_echo "no" >&6; }
38057 fi
38058 
38059 
38060   test -n "$ac_ct_OBJCOPY" && break
38061 done
38062 
38063   if test "x$ac_ct_OBJCOPY" = x; then
38064     OBJCOPY=""
38065   else
38066     case $cross_compiling:$ac_tool_warned in
38067 yes:)
38068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38069 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38070 ac_tool_warned=yes ;;
38071 esac
38072     OBJCOPY=$ac_ct_OBJCOPY
38073   fi
38074 fi
38075 
38076     else
38077       # If it succeeded, then it was overridden by the user. We will use it
38078       # for the tool.
38079 
38080       # First remove it from the list of overridden variables, so we can test
38081       # for unknown variables in the end.
38082       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38083 
38084       # Check if the provided tool contains a complete path.
38085       tool_specified="$OBJCOPY"
38086       tool_basename="${tool_specified##*/}"
38087       if test "x$tool_basename" = "x$tool_specified"; then
38088         # A command without a complete path is provided, search $PATH.
38089         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38090 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38091         # Extract the first word of "$tool_basename", so it can be a program name with args.
38092 set dummy $tool_basename; ac_word=$2
38093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38094 $as_echo_n "checking for $ac_word... " >&6; }
38095 if ${ac_cv_path_OBJCOPY+:} false; then :
38096   $as_echo_n "(cached) " >&6
38097 else
38098   case $OBJCOPY in
38099   [\\/]* | ?:[\\/]*)
38100   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38101   ;;
38102   *)
38103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38104 for as_dir in $PATH
38105 do
38106   IFS=$as_save_IFS
38107   test -z "$as_dir" && as_dir=.
38108     for ac_exec_ext in '' $ac_executable_extensions; do
38109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38110     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38112     break 2
38113   fi
38114 done
38115   done
38116 IFS=$as_save_IFS
38117 
38118   ;;
38119 esac
38120 fi
38121 OBJCOPY=$ac_cv_path_OBJCOPY
38122 if test -n "$OBJCOPY"; then
38123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38124 $as_echo "$OBJCOPY" >&6; }
38125 else
38126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38127 $as_echo "no" >&6; }
38128 fi
38129 
38130 
38131         if test "x$OBJCOPY" = x; then
38132           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38133         fi
38134       else
38135         # Otherwise we believe it is a complete path. Use it as it is.
38136         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38137 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38138         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38139 $as_echo_n "checking for OBJCOPY... " >&6; }
38140         if test ! -x "$tool_specified"; then
38141           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38142 $as_echo "not found" >&6; }
38143           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38144         fi
38145         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38146 $as_echo "$tool_specified" >&6; }
38147       fi
38148     fi
38149   fi
38150 
38151 
38152     # Only call fixup if objcopy was found.
38153     if test -n "$OBJCOPY"; then
38154 
38155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38156 
38157   # First separate the path from the arguments. This will split at the first
38158   # space.
38159   complete="$OBJCOPY"
38160   path="${complete%% *}"
38161   tmp="$complete EOL"
38162   arguments="${tmp#* }"
38163 
38164   # Input might be given as Windows format, start by converting to
38165   # unix format.
38166   new_path=`$CYGPATH -u "$path"`
38167 
38168   # Now try to locate executable using which
38169   new_path=`$WHICH "$new_path" 2> /dev/null`
38170   # bat and cmd files are not always considered executable in cygwin causing which
38171   # to not find them
38172   if test "x$new_path" = x \
38173       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38174       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38175     new_path=`$CYGPATH -u "$path"`
38176   fi
38177   if test "x$new_path" = x; then
38178     # Oops. Which didn't find the executable.
38179     # The splitting of arguments from the executable at a space might have been incorrect,
38180     # since paths with space are more likely in Windows. Give it another try with the whole
38181     # argument.
38182     path="$complete"
38183     arguments="EOL"
38184     new_path=`$CYGPATH -u "$path"`
38185     new_path=`$WHICH "$new_path" 2> /dev/null`
38186     # bat and cmd files are not always considered executable in cygwin causing which
38187     # to not find them
38188     if test "x$new_path" = x \
38189         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38190         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38191       new_path=`$CYGPATH -u "$path"`
38192     fi
38193     if test "x$new_path" = x; then
38194       # It's still not found. Now this is an unrecoverable error.
38195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38196 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38197       has_space=`$ECHO "$complete" | $GREP " "`
38198       if test "x$has_space" != x; then
38199         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38200 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38201       fi
38202       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38203     fi
38204   fi
38205 
38206   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38207   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38208   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38209   # "foo.exe" is OK but "foo" is an error.
38210   #
38211   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38212   # It is also a way to make sure we got the proper file name for the real test later on.
38213   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38214   if test "x$test_shortpath" = x; then
38215     # Short path failed, file does not exist as specified.
38216     # Try adding .exe or .cmd
38217     if test -f "${new_path}.exe"; then
38218       input_to_shortpath="${new_path}.exe"
38219     elif test -f "${new_path}.cmd"; then
38220       input_to_shortpath="${new_path}.cmd"
38221     else
38222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38223 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38224       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38225 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38226       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38227     fi
38228   else
38229     input_to_shortpath="$new_path"
38230   fi
38231 
38232   # Call helper function which possibly converts this using DOS-style short mode.
38233   # If so, the updated path is stored in $new_path.
38234   new_path="$input_to_shortpath"
38235 
38236   input_path="$input_to_shortpath"
38237   # Check if we need to convert this using DOS-style short mode. If the path
38238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38239   # take no chances and rewrite it.
38240   # Note: m4 eats our [], so we need to use [ and ] instead.
38241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38242   if test "x$has_forbidden_chars" != x; then
38243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38244     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38245     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38246     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38247       # Going to short mode and back again did indeed matter. Since short mode is
38248       # case insensitive, let's make it lowercase to improve readability.
38249       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38250       # Now convert it back to Unix-stile (cygpath)
38251       input_path=`$CYGPATH -u "$shortmode_path"`
38252       new_path="$input_path"
38253     fi
38254   fi
38255 
38256   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38257   if test "x$test_cygdrive_prefix" = x; then
38258     # As a simple fix, exclude /usr/bin since it's not a real path.
38259     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38260       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38261       # a path prefixed by /cygdrive for fixpath to work.
38262       new_path="$CYGWIN_ROOT_PATH$input_path"
38263     fi
38264   fi
38265 
38266   # remove trailing .exe if any
38267   new_path="${new_path/%.exe/}"
38268 
38269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38270 
38271   # First separate the path from the arguments. This will split at the first
38272   # space.
38273   complete="$OBJCOPY"
38274   path="${complete%% *}"
38275   tmp="$complete EOL"
38276   arguments="${tmp#* }"
38277 
38278   # Input might be given as Windows format, start by converting to
38279   # unix format.
38280   new_path="$path"
38281 
38282   windows_path="$new_path"
38283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38284     unix_path=`$CYGPATH -u "$windows_path"`
38285     new_path="$unix_path"
38286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38288     new_path="$unix_path"
38289   fi
38290 
38291 
38292   # Now try to locate executable using which
38293   new_path=`$WHICH "$new_path" 2> /dev/null`
38294 
38295   if test "x$new_path" = x; then
38296     # Oops. Which didn't find the executable.
38297     # The splitting of arguments from the executable at a space might have been incorrect,
38298     # since paths with space are more likely in Windows. Give it another try with the whole
38299     # argument.
38300     path="$complete"
38301     arguments="EOL"
38302     new_path="$path"
38303 
38304   windows_path="$new_path"
38305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38306     unix_path=`$CYGPATH -u "$windows_path"`
38307     new_path="$unix_path"
38308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38310     new_path="$unix_path"
38311   fi
38312 
38313 
38314     new_path=`$WHICH "$new_path" 2> /dev/null`
38315     # bat and cmd files are not always considered executable in MSYS causing which
38316     # to not find them
38317     if test "x$new_path" = x \
38318         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38319         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38320       new_path="$path"
38321 
38322   windows_path="$new_path"
38323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38324     unix_path=`$CYGPATH -u "$windows_path"`
38325     new_path="$unix_path"
38326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38328     new_path="$unix_path"
38329   fi
38330 
38331     fi
38332 
38333     if test "x$new_path" = x; then
38334       # It's still not found. Now this is an unrecoverable error.
38335       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38336 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38337       has_space=`$ECHO "$complete" | $GREP " "`
38338       if test "x$has_space" != x; then
38339         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38340 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38341       fi
38342       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38343     fi
38344   fi
38345 
38346   # Now new_path has a complete unix path to the binary
38347   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38348     # Keep paths in /bin as-is, but remove trailing .exe if any
38349     new_path="${new_path/%.exe/}"
38350     # Do not save /bin paths to all_fixpath_prefixes!
38351   else
38352     # Not in mixed or Windows style, start by that.
38353     new_path=`cmd //c echo $new_path`
38354 
38355   input_path="$new_path"
38356   # Check if we need to convert this using DOS-style short mode. If the path
38357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38358   # take no chances and rewrite it.
38359   # Note: m4 eats our [], so we need to use [ and ] instead.
38360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38361   if test "x$has_forbidden_chars" != x; then
38362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38364   fi
38365 
38366     # Output is in $new_path
38367 
38368   windows_path="$new_path"
38369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38370     unix_path=`$CYGPATH -u "$windows_path"`
38371     new_path="$unix_path"
38372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38374     new_path="$unix_path"
38375   fi
38376 
38377     # remove trailing .exe if any
38378     new_path="${new_path/%.exe/}"
38379 
38380     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38381     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38382   fi
38383 
38384   else
38385     # We're on a unix platform. Hooray! :)
38386     # First separate the path from the arguments. This will split at the first
38387     # space.
38388     complete="$OBJCOPY"
38389     path="${complete%% *}"
38390     tmp="$complete EOL"
38391     arguments="${tmp#* }"
38392 
38393     # Cannot rely on the command "which" here since it doesn't always work.
38394     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38395     if test -z "$is_absolute_path"; then
38396       # Path to executable is not absolute. Find it.
38397       IFS_save="$IFS"
38398       IFS=:
38399       for p in $PATH; do
38400         if test -f "$p/$path" && test -x "$p/$path"; then
38401           new_path="$p/$path"
38402           break
38403         fi
38404       done
38405       IFS="$IFS_save"
38406     else
38407       # This is an absolute path, we can use it without further modifications.
38408       new_path="$path"
38409     fi
38410 
38411     if test "x$new_path" = x; then
38412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38413 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38414       has_space=`$ECHO "$complete" | $GREP " "`
38415       if test "x$has_space" != x; then
38416         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38417 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38418       fi
38419       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38420     fi
38421   fi
38422 
38423   # Now join together the path and the arguments once again
38424   if test "x$arguments" != xEOL; then
38425     new_complete="$new_path ${arguments% *}"
38426   else
38427     new_complete="$new_path"
38428   fi
38429 
38430   if test "x$complete" != "x$new_complete"; then
38431     OBJCOPY="$new_complete"
38432     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38433 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38434   fi
38435 
38436     fi
38437   fi
38438 
38439 
38440 
38441   # Publish this variable in the help.
38442 
38443 
38444   if test "x$OBJDUMP" = x; then
38445     # The variable is not set by user, try to locate tool using the code snippet
38446     if test -n "$ac_tool_prefix"; then
38447   for ac_prog in gobjdump objdump
38448   do
38449     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38450 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38452 $as_echo_n "checking for $ac_word... " >&6; }
38453 if ${ac_cv_prog_OBJDUMP+:} false; then :
38454   $as_echo_n "(cached) " >&6
38455 else
38456   if test -n "$OBJDUMP"; then
38457   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38458 else
38459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38460 for as_dir in $PATH
38461 do
38462   IFS=$as_save_IFS
38463   test -z "$as_dir" && as_dir=.
38464     for ac_exec_ext in '' $ac_executable_extensions; do
38465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38466     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38468     break 2
38469   fi
38470 done
38471   done
38472 IFS=$as_save_IFS
38473 
38474 fi
38475 fi
38476 OBJDUMP=$ac_cv_prog_OBJDUMP
38477 if test -n "$OBJDUMP"; then
38478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38479 $as_echo "$OBJDUMP" >&6; }
38480 else
38481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38482 $as_echo "no" >&6; }
38483 fi
38484 
38485 
38486     test -n "$OBJDUMP" && break
38487   done
38488 fi
38489 if test -z "$OBJDUMP"; then
38490   ac_ct_OBJDUMP=$OBJDUMP
38491   for ac_prog in gobjdump objdump
38492 do
38493   # Extract the first word of "$ac_prog", so it can be a program name with args.
38494 set dummy $ac_prog; ac_word=$2
38495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38496 $as_echo_n "checking for $ac_word... " >&6; }
38497 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38498   $as_echo_n "(cached) " >&6
38499 else
38500   if test -n "$ac_ct_OBJDUMP"; then
38501   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38502 else
38503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38504 for as_dir in $PATH
38505 do
38506   IFS=$as_save_IFS
38507   test -z "$as_dir" && as_dir=.
38508     for ac_exec_ext in '' $ac_executable_extensions; do
38509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38510     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38512     break 2
38513   fi
38514 done
38515   done
38516 IFS=$as_save_IFS
38517 
38518 fi
38519 fi
38520 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38521 if test -n "$ac_ct_OBJDUMP"; then
38522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38523 $as_echo "$ac_ct_OBJDUMP" >&6; }
38524 else
38525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38526 $as_echo "no" >&6; }
38527 fi
38528 
38529 
38530   test -n "$ac_ct_OBJDUMP" && break
38531 done
38532 
38533   if test "x$ac_ct_OBJDUMP" = x; then
38534     OBJDUMP=""
38535   else
38536     case $cross_compiling:$ac_tool_warned in
38537 yes:)
38538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38539 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38540 ac_tool_warned=yes ;;
38541 esac
38542     OBJDUMP=$ac_ct_OBJDUMP
38543   fi
38544 fi
38545 
38546   else
38547     # The variable is set, but is it from the command line or the environment?
38548 
38549     # Try to remove the string !OBJDUMP! from our list.
38550     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38551     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38552       # If it failed, the variable was not from the command line. Ignore it,
38553       # but warn the user (except for BASH, which is always set by the calling BASH).
38554       if test "xOBJDUMP" != xBASH; then
38555         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38556 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38557       fi
38558       # Try to locate tool using the code snippet
38559       if test -n "$ac_tool_prefix"; then
38560   for ac_prog in gobjdump objdump
38561   do
38562     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38563 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38565 $as_echo_n "checking for $ac_word... " >&6; }
38566 if ${ac_cv_prog_OBJDUMP+:} false; then :
38567   $as_echo_n "(cached) " >&6
38568 else
38569   if test -n "$OBJDUMP"; then
38570   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38571 else
38572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38573 for as_dir in $PATH
38574 do
38575   IFS=$as_save_IFS
38576   test -z "$as_dir" && as_dir=.
38577     for ac_exec_ext in '' $ac_executable_extensions; do
38578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38579     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38581     break 2
38582   fi
38583 done
38584   done
38585 IFS=$as_save_IFS
38586 
38587 fi
38588 fi
38589 OBJDUMP=$ac_cv_prog_OBJDUMP
38590 if test -n "$OBJDUMP"; then
38591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38592 $as_echo "$OBJDUMP" >&6; }
38593 else
38594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38595 $as_echo "no" >&6; }
38596 fi
38597 
38598 
38599     test -n "$OBJDUMP" && break
38600   done
38601 fi
38602 if test -z "$OBJDUMP"; then
38603   ac_ct_OBJDUMP=$OBJDUMP
38604   for ac_prog in gobjdump objdump
38605 do
38606   # Extract the first word of "$ac_prog", so it can be a program name with args.
38607 set dummy $ac_prog; ac_word=$2
38608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38609 $as_echo_n "checking for $ac_word... " >&6; }
38610 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38611   $as_echo_n "(cached) " >&6
38612 else
38613   if test -n "$ac_ct_OBJDUMP"; then
38614   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38615 else
38616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38617 for as_dir in $PATH
38618 do
38619   IFS=$as_save_IFS
38620   test -z "$as_dir" && as_dir=.
38621     for ac_exec_ext in '' $ac_executable_extensions; do
38622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38623     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38625     break 2
38626   fi
38627 done
38628   done
38629 IFS=$as_save_IFS
38630 
38631 fi
38632 fi
38633 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38634 if test -n "$ac_ct_OBJDUMP"; then
38635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38636 $as_echo "$ac_ct_OBJDUMP" >&6; }
38637 else
38638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38639 $as_echo "no" >&6; }
38640 fi
38641 
38642 
38643   test -n "$ac_ct_OBJDUMP" && break
38644 done
38645 
38646   if test "x$ac_ct_OBJDUMP" = x; then
38647     OBJDUMP=""
38648   else
38649     case $cross_compiling:$ac_tool_warned in
38650 yes:)
38651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38652 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38653 ac_tool_warned=yes ;;
38654 esac
38655     OBJDUMP=$ac_ct_OBJDUMP
38656   fi
38657 fi
38658 
38659     else
38660       # If it succeeded, then it was overridden by the user. We will use it
38661       # for the tool.
38662 
38663       # First remove it from the list of overridden variables, so we can test
38664       # for unknown variables in the end.
38665       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38666 
38667       # Check if the provided tool contains a complete path.
38668       tool_specified="$OBJDUMP"
38669       tool_basename="${tool_specified##*/}"
38670       if test "x$tool_basename" = "x$tool_specified"; then
38671         # A command without a complete path is provided, search $PATH.
38672         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38673 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38674         # Extract the first word of "$tool_basename", so it can be a program name with args.
38675 set dummy $tool_basename; ac_word=$2
38676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38677 $as_echo_n "checking for $ac_word... " >&6; }
38678 if ${ac_cv_path_OBJDUMP+:} false; then :
38679   $as_echo_n "(cached) " >&6
38680 else
38681   case $OBJDUMP in
38682   [\\/]* | ?:[\\/]*)
38683   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38684   ;;
38685   *)
38686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38687 for as_dir in $PATH
38688 do
38689   IFS=$as_save_IFS
38690   test -z "$as_dir" && as_dir=.
38691     for ac_exec_ext in '' $ac_executable_extensions; do
38692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38693     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38695     break 2
38696   fi
38697 done
38698   done
38699 IFS=$as_save_IFS
38700 
38701   ;;
38702 esac
38703 fi
38704 OBJDUMP=$ac_cv_path_OBJDUMP
38705 if test -n "$OBJDUMP"; then
38706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38707 $as_echo "$OBJDUMP" >&6; }
38708 else
38709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38710 $as_echo "no" >&6; }
38711 fi
38712 
38713 
38714         if test "x$OBJDUMP" = x; then
38715           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38716         fi
38717       else
38718         # Otherwise we believe it is a complete path. Use it as it is.
38719         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38720 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38721         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38722 $as_echo_n "checking for OBJDUMP... " >&6; }
38723         if test ! -x "$tool_specified"; then
38724           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38725 $as_echo "not found" >&6; }
38726           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38727         fi
38728         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38729 $as_echo "$tool_specified" >&6; }
38730       fi
38731     fi
38732   fi
38733 
38734 
38735   if test "x$OBJDUMP" != x; then
38736     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38737     # bails if argument is missing.
38738 
38739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38740 
38741   # First separate the path from the arguments. This will split at the first
38742   # space.
38743   complete="$OBJDUMP"
38744   path="${complete%% *}"
38745   tmp="$complete EOL"
38746   arguments="${tmp#* }"
38747 
38748   # Input might be given as Windows format, start by converting to
38749   # unix format.
38750   new_path=`$CYGPATH -u "$path"`
38751 
38752   # Now try to locate executable using which
38753   new_path=`$WHICH "$new_path" 2> /dev/null`
38754   # bat and cmd files are not always considered executable in cygwin causing which
38755   # to not find them
38756   if test "x$new_path" = x \
38757       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38758       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38759     new_path=`$CYGPATH -u "$path"`
38760   fi
38761   if test "x$new_path" = x; then
38762     # Oops. Which didn't find the executable.
38763     # The splitting of arguments from the executable at a space might have been incorrect,
38764     # since paths with space are more likely in Windows. Give it another try with the whole
38765     # argument.
38766     path="$complete"
38767     arguments="EOL"
38768     new_path=`$CYGPATH -u "$path"`
38769     new_path=`$WHICH "$new_path" 2> /dev/null`
38770     # bat and cmd files are not always considered executable in cygwin causing which
38771     # to not find them
38772     if test "x$new_path" = x \
38773         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38774         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38775       new_path=`$CYGPATH -u "$path"`
38776     fi
38777     if test "x$new_path" = x; then
38778       # It's still not found. Now this is an unrecoverable error.
38779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38780 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38781       has_space=`$ECHO "$complete" | $GREP " "`
38782       if test "x$has_space" != x; then
38783         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38784 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38785       fi
38786       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38787     fi
38788   fi
38789 
38790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38793   # "foo.exe" is OK but "foo" is an error.
38794   #
38795   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38796   # It is also a way to make sure we got the proper file name for the real test later on.
38797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38798   if test "x$test_shortpath" = x; then
38799     # Short path failed, file does not exist as specified.
38800     # Try adding .exe or .cmd
38801     if test -f "${new_path}.exe"; then
38802       input_to_shortpath="${new_path}.exe"
38803     elif test -f "${new_path}.cmd"; then
38804       input_to_shortpath="${new_path}.cmd"
38805     else
38806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38807 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38808       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38809 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38810       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38811     fi
38812   else
38813     input_to_shortpath="$new_path"
38814   fi
38815 
38816   # Call helper function which possibly converts this using DOS-style short mode.
38817   # If so, the updated path is stored in $new_path.
38818   new_path="$input_to_shortpath"
38819 
38820   input_path="$input_to_shortpath"
38821   # Check if we need to convert this using DOS-style short mode. If the path
38822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38823   # take no chances and rewrite it.
38824   # Note: m4 eats our [], so we need to use [ and ] instead.
38825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38826   if test "x$has_forbidden_chars" != x; then
38827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38828     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38829     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38830     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38831       # Going to short mode and back again did indeed matter. Since short mode is
38832       # case insensitive, let's make it lowercase to improve readability.
38833       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38834       # Now convert it back to Unix-stile (cygpath)
38835       input_path=`$CYGPATH -u "$shortmode_path"`
38836       new_path="$input_path"
38837     fi
38838   fi
38839 
38840   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38841   if test "x$test_cygdrive_prefix" = x; then
38842     # As a simple fix, exclude /usr/bin since it's not a real path.
38843     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38844       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38845       # a path prefixed by /cygdrive for fixpath to work.
38846       new_path="$CYGWIN_ROOT_PATH$input_path"
38847     fi
38848   fi
38849 
38850   # remove trailing .exe if any
38851   new_path="${new_path/%.exe/}"
38852 
38853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38854 
38855   # First separate the path from the arguments. This will split at the first
38856   # space.
38857   complete="$OBJDUMP"
38858   path="${complete%% *}"
38859   tmp="$complete EOL"
38860   arguments="${tmp#* }"
38861 
38862   # Input might be given as Windows format, start by converting to
38863   # unix format.
38864   new_path="$path"
38865 
38866   windows_path="$new_path"
38867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38868     unix_path=`$CYGPATH -u "$windows_path"`
38869     new_path="$unix_path"
38870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38872     new_path="$unix_path"
38873   fi
38874 
38875 
38876   # Now try to locate executable using which
38877   new_path=`$WHICH "$new_path" 2> /dev/null`
38878 
38879   if test "x$new_path" = x; then
38880     # Oops. Which didn't find the executable.
38881     # The splitting of arguments from the executable at a space might have been incorrect,
38882     # since paths with space are more likely in Windows. Give it another try with the whole
38883     # argument.
38884     path="$complete"
38885     arguments="EOL"
38886     new_path="$path"
38887 
38888   windows_path="$new_path"
38889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38890     unix_path=`$CYGPATH -u "$windows_path"`
38891     new_path="$unix_path"
38892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38894     new_path="$unix_path"
38895   fi
38896 
38897 
38898     new_path=`$WHICH "$new_path" 2> /dev/null`
38899     # bat and cmd files are not always considered executable in MSYS causing which
38900     # to not find them
38901     if test "x$new_path" = x \
38902         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38903         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38904       new_path="$path"
38905 
38906   windows_path="$new_path"
38907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38908     unix_path=`$CYGPATH -u "$windows_path"`
38909     new_path="$unix_path"
38910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38912     new_path="$unix_path"
38913   fi
38914 
38915     fi
38916 
38917     if test "x$new_path" = x; then
38918       # It's still not found. Now this is an unrecoverable error.
38919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38920 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38921       has_space=`$ECHO "$complete" | $GREP " "`
38922       if test "x$has_space" != x; then
38923         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38924 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38925       fi
38926       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38927     fi
38928   fi
38929 
38930   # Now new_path has a complete unix path to the binary
38931   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38932     # Keep paths in /bin as-is, but remove trailing .exe if any
38933     new_path="${new_path/%.exe/}"
38934     # Do not save /bin paths to all_fixpath_prefixes!
38935   else
38936     # Not in mixed or Windows style, start by that.
38937     new_path=`cmd //c echo $new_path`
38938 
38939   input_path="$new_path"
38940   # Check if we need to convert this using DOS-style short mode. If the path
38941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38942   # take no chances and rewrite it.
38943   # Note: m4 eats our [], so we need to use [ and ] instead.
38944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38945   if test "x$has_forbidden_chars" != x; then
38946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38948   fi
38949 
38950     # Output is in $new_path
38951 
38952   windows_path="$new_path"
38953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38954     unix_path=`$CYGPATH -u "$windows_path"`
38955     new_path="$unix_path"
38956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38958     new_path="$unix_path"
38959   fi
38960 
38961     # remove trailing .exe if any
38962     new_path="${new_path/%.exe/}"
38963 
38964     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38965     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38966   fi
38967 
38968   else
38969     # We're on a unix platform. Hooray! :)
38970     # First separate the path from the arguments. This will split at the first
38971     # space.
38972     complete="$OBJDUMP"
38973     path="${complete%% *}"
38974     tmp="$complete EOL"
38975     arguments="${tmp#* }"
38976 
38977     # Cannot rely on the command "which" here since it doesn't always work.
38978     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38979     if test -z "$is_absolute_path"; then
38980       # Path to executable is not absolute. Find it.
38981       IFS_save="$IFS"
38982       IFS=:
38983       for p in $PATH; do
38984         if test -f "$p/$path" && test -x "$p/$path"; then
38985           new_path="$p/$path"
38986           break
38987         fi
38988       done
38989       IFS="$IFS_save"
38990     else
38991       # This is an absolute path, we can use it without further modifications.
38992       new_path="$path"
38993     fi
38994 
38995     if test "x$new_path" = x; then
38996       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38997 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38998       has_space=`$ECHO "$complete" | $GREP " "`
38999       if test "x$has_space" != x; then
39000         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39001 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39002       fi
39003       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39004     fi
39005   fi
39006 
39007   # Now join together the path and the arguments once again
39008   if test "x$arguments" != xEOL; then
39009     new_complete="$new_path ${arguments% *}"
39010   else
39011     new_complete="$new_path"
39012   fi
39013 
39014   if test "x$complete" != "x$new_complete"; then
39015     OBJDUMP="$new_complete"
39016     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39017 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39018   fi
39019 
39020   fi
39021 
39022 
39023   # Restore old path.
39024   PATH="$OLD_PATH"
39025 
39026   # Restore the flags to the user specified values.
39027   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39028   CFLAGS="$ORG_CFLAGS"
39029   CXXFLAGS="$ORG_CXXFLAGS"
39030   OBJCFLAGS="$ORG_OBJCFLAGS"
39031 
39032 
39033 # Finally do some processing after the detection phase
39034 
39035   if test "x$COMPILE_TYPE" = "xcross"; then
39036     # Now we need to find a C/C++ compiler that can build executables for the
39037     # build platform. We can't use the AC_PROG_CC macro, since it can only be
39038     # used once. Also, we need to do this without adding a tools dir to the
39039     # path, otherwise we might pick up cross-compilers which don't use standard
39040     # naming.
39041 
39042     # FIXME: we should list the discovered compilers as an exclude pattern!
39043     # If we do that, we can do this detection before POST_DETECTION, and still
39044     # find the build compilers in the tools dir, if needed.
39045 
39046 
39047   # Publish this variable in the help.
39048 
39049 
39050   if test "x$BUILD_CC" = x; then
39051     # The variable is not set by user, try to locate tool using the code snippet
39052     for ac_prog in cl cc gcc
39053 do
39054   # Extract the first word of "$ac_prog", so it can be a program name with args.
39055 set dummy $ac_prog; ac_word=$2
39056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39057 $as_echo_n "checking for $ac_word... " >&6; }
39058 if ${ac_cv_path_BUILD_CC+:} false; then :
39059   $as_echo_n "(cached) " >&6
39060 else
39061   case $BUILD_CC in
39062   [\\/]* | ?:[\\/]*)
39063   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39064   ;;
39065   *)
39066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39067 for as_dir in $PATH
39068 do
39069   IFS=$as_save_IFS
39070   test -z "$as_dir" && as_dir=.
39071     for ac_exec_ext in '' $ac_executable_extensions; do
39072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39073     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39075     break 2
39076   fi
39077 done
39078   done
39079 IFS=$as_save_IFS
39080 
39081   ;;
39082 esac
39083 fi
39084 BUILD_CC=$ac_cv_path_BUILD_CC
39085 if test -n "$BUILD_CC"; then
39086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39087 $as_echo "$BUILD_CC" >&6; }
39088 else
39089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39090 $as_echo "no" >&6; }
39091 fi
39092 
39093 
39094   test -n "$BUILD_CC" && break
39095 done
39096 
39097   else
39098     # The variable is set, but is it from the command line or the environment?
39099 
39100     # Try to remove the string !BUILD_CC! from our list.
39101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39103       # If it failed, the variable was not from the command line. Ignore it,
39104       # but warn the user (except for BASH, which is always set by the calling BASH).
39105       if test "xBUILD_CC" != xBASH; then
39106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39107 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39108       fi
39109       # Try to locate tool using the code snippet
39110       for ac_prog in cl cc gcc
39111 do
39112   # Extract the first word of "$ac_prog", so it can be a program name with args.
39113 set dummy $ac_prog; ac_word=$2
39114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39115 $as_echo_n "checking for $ac_word... " >&6; }
39116 if ${ac_cv_path_BUILD_CC+:} false; then :
39117   $as_echo_n "(cached) " >&6
39118 else
39119   case $BUILD_CC in
39120   [\\/]* | ?:[\\/]*)
39121   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39122   ;;
39123   *)
39124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39125 for as_dir in $PATH
39126 do
39127   IFS=$as_save_IFS
39128   test -z "$as_dir" && as_dir=.
39129     for ac_exec_ext in '' $ac_executable_extensions; do
39130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39131     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39133     break 2
39134   fi
39135 done
39136   done
39137 IFS=$as_save_IFS
39138 
39139   ;;
39140 esac
39141 fi
39142 BUILD_CC=$ac_cv_path_BUILD_CC
39143 if test -n "$BUILD_CC"; then
39144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39145 $as_echo "$BUILD_CC" >&6; }
39146 else
39147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39148 $as_echo "no" >&6; }
39149 fi
39150 
39151 
39152   test -n "$BUILD_CC" && break
39153 done
39154 
39155     else
39156       # If it succeeded, then it was overridden by the user. We will use it
39157       # for the tool.
39158 
39159       # First remove it from the list of overridden variables, so we can test
39160       # for unknown variables in the end.
39161       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39162 
39163       # Check if the provided tool contains a complete path.
39164       tool_specified="$BUILD_CC"
39165       tool_basename="${tool_specified##*/}"
39166       if test "x$tool_basename" = "x$tool_specified"; then
39167         # A command without a complete path is provided, search $PATH.
39168         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39169 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39170         # Extract the first word of "$tool_basename", so it can be a program name with args.
39171 set dummy $tool_basename; ac_word=$2
39172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39173 $as_echo_n "checking for $ac_word... " >&6; }
39174 if ${ac_cv_path_BUILD_CC+:} false; then :
39175   $as_echo_n "(cached) " >&6
39176 else
39177   case $BUILD_CC in
39178   [\\/]* | ?:[\\/]*)
39179   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39180   ;;
39181   *)
39182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39183 for as_dir in $PATH
39184 do
39185   IFS=$as_save_IFS
39186   test -z "$as_dir" && as_dir=.
39187     for ac_exec_ext in '' $ac_executable_extensions; do
39188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39189     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39191     break 2
39192   fi
39193 done
39194   done
39195 IFS=$as_save_IFS
39196 
39197   ;;
39198 esac
39199 fi
39200 BUILD_CC=$ac_cv_path_BUILD_CC
39201 if test -n "$BUILD_CC"; then
39202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39203 $as_echo "$BUILD_CC" >&6; }
39204 else
39205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39206 $as_echo "no" >&6; }
39207 fi
39208 
39209 
39210         if test "x$BUILD_CC" = x; then
39211           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39212         fi
39213       else
39214         # Otherwise we believe it is a complete path. Use it as it is.
39215         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39216 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39218 $as_echo_n "checking for BUILD_CC... " >&6; }
39219         if test ! -x "$tool_specified"; then
39220           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39221 $as_echo "not found" >&6; }
39222           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39223         fi
39224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39225 $as_echo "$tool_specified" >&6; }
39226       fi
39227     fi
39228   fi
39229 
39230 
39231 
39232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39233 
39234   # First separate the path from the arguments. This will split at the first
39235   # space.
39236   complete="$BUILD_CC"
39237   path="${complete%% *}"
39238   tmp="$complete EOL"
39239   arguments="${tmp#* }"
39240 
39241   # Input might be given as Windows format, start by converting to
39242   # unix format.
39243   new_path=`$CYGPATH -u "$path"`
39244 
39245   # Now try to locate executable using which
39246   new_path=`$WHICH "$new_path" 2> /dev/null`
39247   # bat and cmd files are not always considered executable in cygwin causing which
39248   # to not find them
39249   if test "x$new_path" = x \
39250       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39251       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39252     new_path=`$CYGPATH -u "$path"`
39253   fi
39254   if test "x$new_path" = x; then
39255     # Oops. Which didn't find the executable.
39256     # The splitting of arguments from the executable at a space might have been incorrect,
39257     # since paths with space are more likely in Windows. Give it another try with the whole
39258     # argument.
39259     path="$complete"
39260     arguments="EOL"
39261     new_path=`$CYGPATH -u "$path"`
39262     new_path=`$WHICH "$new_path" 2> /dev/null`
39263     # bat and cmd files are not always considered executable in cygwin causing which
39264     # to not find them
39265     if test "x$new_path" = x \
39266         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39267         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39268       new_path=`$CYGPATH -u "$path"`
39269     fi
39270     if test "x$new_path" = x; then
39271       # It's still not found. Now this is an unrecoverable error.
39272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39273 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39274       has_space=`$ECHO "$complete" | $GREP " "`
39275       if test "x$has_space" != x; then
39276         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39277 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39278       fi
39279       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39280     fi
39281   fi
39282 
39283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39286   # "foo.exe" is OK but "foo" is an error.
39287   #
39288   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39289   # It is also a way to make sure we got the proper file name for the real test later on.
39290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39291   if test "x$test_shortpath" = x; then
39292     # Short path failed, file does not exist as specified.
39293     # Try adding .exe or .cmd
39294     if test -f "${new_path}.exe"; then
39295       input_to_shortpath="${new_path}.exe"
39296     elif test -f "${new_path}.cmd"; then
39297       input_to_shortpath="${new_path}.cmd"
39298     else
39299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39300 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39301       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39302 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39303       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39304     fi
39305   else
39306     input_to_shortpath="$new_path"
39307   fi
39308 
39309   # Call helper function which possibly converts this using DOS-style short mode.
39310   # If so, the updated path is stored in $new_path.
39311   new_path="$input_to_shortpath"
39312 
39313   input_path="$input_to_shortpath"
39314   # Check if we need to convert this using DOS-style short mode. If the path
39315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39316   # take no chances and rewrite it.
39317   # Note: m4 eats our [], so we need to use [ and ] instead.
39318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39319   if test "x$has_forbidden_chars" != x; then
39320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39324       # Going to short mode and back again did indeed matter. Since short mode is
39325       # case insensitive, let's make it lowercase to improve readability.
39326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39327       # Now convert it back to Unix-stile (cygpath)
39328       input_path=`$CYGPATH -u "$shortmode_path"`
39329       new_path="$input_path"
39330     fi
39331   fi
39332 
39333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39334   if test "x$test_cygdrive_prefix" = x; then
39335     # As a simple fix, exclude /usr/bin since it's not a real path.
39336     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39338       # a path prefixed by /cygdrive for fixpath to work.
39339       new_path="$CYGWIN_ROOT_PATH$input_path"
39340     fi
39341   fi
39342 
39343   # remove trailing .exe if any
39344   new_path="${new_path/%.exe/}"
39345 
39346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39347 
39348   # First separate the path from the arguments. This will split at the first
39349   # space.
39350   complete="$BUILD_CC"
39351   path="${complete%% *}"
39352   tmp="$complete EOL"
39353   arguments="${tmp#* }"
39354 
39355   # Input might be given as Windows format, start by converting to
39356   # unix format.
39357   new_path="$path"
39358 
39359   windows_path="$new_path"
39360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39361     unix_path=`$CYGPATH -u "$windows_path"`
39362     new_path="$unix_path"
39363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39365     new_path="$unix_path"
39366   fi
39367 
39368 
39369   # Now try to locate executable using which
39370   new_path=`$WHICH "$new_path" 2> /dev/null`
39371 
39372   if test "x$new_path" = x; then
39373     # Oops. Which didn't find the executable.
39374     # The splitting of arguments from the executable at a space might have been incorrect,
39375     # since paths with space are more likely in Windows. Give it another try with the whole
39376     # argument.
39377     path="$complete"
39378     arguments="EOL"
39379     new_path="$path"
39380 
39381   windows_path="$new_path"
39382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39383     unix_path=`$CYGPATH -u "$windows_path"`
39384     new_path="$unix_path"
39385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39387     new_path="$unix_path"
39388   fi
39389 
39390 
39391     new_path=`$WHICH "$new_path" 2> /dev/null`
39392     # bat and cmd files are not always considered executable in MSYS causing which
39393     # to not find them
39394     if test "x$new_path" = x \
39395         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39396         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39397       new_path="$path"
39398 
39399   windows_path="$new_path"
39400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39401     unix_path=`$CYGPATH -u "$windows_path"`
39402     new_path="$unix_path"
39403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39405     new_path="$unix_path"
39406   fi
39407 
39408     fi
39409 
39410     if test "x$new_path" = x; then
39411       # It's still not found. Now this is an unrecoverable error.
39412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39413 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39414       has_space=`$ECHO "$complete" | $GREP " "`
39415       if test "x$has_space" != x; then
39416         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39417 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39418       fi
39419       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39420     fi
39421   fi
39422 
39423   # Now new_path has a complete unix path to the binary
39424   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39425     # Keep paths in /bin as-is, but remove trailing .exe if any
39426     new_path="${new_path/%.exe/}"
39427     # Do not save /bin paths to all_fixpath_prefixes!
39428   else
39429     # Not in mixed or Windows style, start by that.
39430     new_path=`cmd //c echo $new_path`
39431 
39432   input_path="$new_path"
39433   # Check if we need to convert this using DOS-style short mode. If the path
39434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39435   # take no chances and rewrite it.
39436   # Note: m4 eats our [], so we need to use [ and ] instead.
39437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39438   if test "x$has_forbidden_chars" != x; then
39439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39441   fi
39442 
39443     # Output is in $new_path
39444 
39445   windows_path="$new_path"
39446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39447     unix_path=`$CYGPATH -u "$windows_path"`
39448     new_path="$unix_path"
39449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39451     new_path="$unix_path"
39452   fi
39453 
39454     # remove trailing .exe if any
39455     new_path="${new_path/%.exe/}"
39456 
39457     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39458     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39459   fi
39460 
39461   else
39462     # We're on a unix platform. Hooray! :)
39463     # First separate the path from the arguments. This will split at the first
39464     # space.
39465     complete="$BUILD_CC"
39466     path="${complete%% *}"
39467     tmp="$complete EOL"
39468     arguments="${tmp#* }"
39469 
39470     # Cannot rely on the command "which" here since it doesn't always work.
39471     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39472     if test -z "$is_absolute_path"; then
39473       # Path to executable is not absolute. Find it.
39474       IFS_save="$IFS"
39475       IFS=:
39476       for p in $PATH; do
39477         if test -f "$p/$path" && test -x "$p/$path"; then
39478           new_path="$p/$path"
39479           break
39480         fi
39481       done
39482       IFS="$IFS_save"
39483     else
39484       # This is an absolute path, we can use it without further modifications.
39485       new_path="$path"
39486     fi
39487 
39488     if test "x$new_path" = x; then
39489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39490 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39491       has_space=`$ECHO "$complete" | $GREP " "`
39492       if test "x$has_space" != x; then
39493         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39495       fi
39496       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39497     fi
39498   fi
39499 
39500   # Now join together the path and the arguments once again
39501   if test "x$arguments" != xEOL; then
39502     new_complete="$new_path ${arguments% *}"
39503   else
39504     new_complete="$new_path"
39505   fi
39506 
39507   if test "x$complete" != "x$new_complete"; then
39508     BUILD_CC="$new_complete"
39509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39510 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39511   fi
39512 
39513 
39514 
39515   # Publish this variable in the help.
39516 
39517 
39518   if test "x$BUILD_CXX" = x; then
39519     # The variable is not set by user, try to locate tool using the code snippet
39520     for ac_prog in cl CC g++
39521 do
39522   # Extract the first word of "$ac_prog", so it can be a program name with args.
39523 set dummy $ac_prog; ac_word=$2
39524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39525 $as_echo_n "checking for $ac_word... " >&6; }
39526 if ${ac_cv_path_BUILD_CXX+:} false; then :
39527   $as_echo_n "(cached) " >&6
39528 else
39529   case $BUILD_CXX in
39530   [\\/]* | ?:[\\/]*)
39531   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39532   ;;
39533   *)
39534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39535 for as_dir in $PATH
39536 do
39537   IFS=$as_save_IFS
39538   test -z "$as_dir" && as_dir=.
39539     for ac_exec_ext in '' $ac_executable_extensions; do
39540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39541     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39543     break 2
39544   fi
39545 done
39546   done
39547 IFS=$as_save_IFS
39548 
39549   ;;
39550 esac
39551 fi
39552 BUILD_CXX=$ac_cv_path_BUILD_CXX
39553 if test -n "$BUILD_CXX"; then
39554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39555 $as_echo "$BUILD_CXX" >&6; }
39556 else
39557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39558 $as_echo "no" >&6; }
39559 fi
39560 
39561 
39562   test -n "$BUILD_CXX" && break
39563 done
39564 
39565   else
39566     # The variable is set, but is it from the command line or the environment?
39567 
39568     # Try to remove the string !BUILD_CXX! from our list.
39569     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39570     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39571       # If it failed, the variable was not from the command line. Ignore it,
39572       # but warn the user (except for BASH, which is always set by the calling BASH).
39573       if test "xBUILD_CXX" != xBASH; then
39574         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39575 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39576       fi
39577       # Try to locate tool using the code snippet
39578       for ac_prog in cl CC g++
39579 do
39580   # Extract the first word of "$ac_prog", so it can be a program name with args.
39581 set dummy $ac_prog; ac_word=$2
39582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39583 $as_echo_n "checking for $ac_word... " >&6; }
39584 if ${ac_cv_path_BUILD_CXX+:} false; then :
39585   $as_echo_n "(cached) " >&6
39586 else
39587   case $BUILD_CXX in
39588   [\\/]* | ?:[\\/]*)
39589   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39590   ;;
39591   *)
39592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39593 for as_dir in $PATH
39594 do
39595   IFS=$as_save_IFS
39596   test -z "$as_dir" && as_dir=.
39597     for ac_exec_ext in '' $ac_executable_extensions; do
39598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39599     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39601     break 2
39602   fi
39603 done
39604   done
39605 IFS=$as_save_IFS
39606 
39607   ;;
39608 esac
39609 fi
39610 BUILD_CXX=$ac_cv_path_BUILD_CXX
39611 if test -n "$BUILD_CXX"; then
39612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39613 $as_echo "$BUILD_CXX" >&6; }
39614 else
39615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39616 $as_echo "no" >&6; }
39617 fi
39618 
39619 
39620   test -n "$BUILD_CXX" && break
39621 done
39622 
39623     else
39624       # If it succeeded, then it was overridden by the user. We will use it
39625       # for the tool.
39626 
39627       # First remove it from the list of overridden variables, so we can test
39628       # for unknown variables in the end.
39629       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39630 
39631       # Check if the provided tool contains a complete path.
39632       tool_specified="$BUILD_CXX"
39633       tool_basename="${tool_specified##*/}"
39634       if test "x$tool_basename" = "x$tool_specified"; then
39635         # A command without a complete path is provided, search $PATH.
39636         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39637 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39638         # Extract the first word of "$tool_basename", so it can be a program name with args.
39639 set dummy $tool_basename; ac_word=$2
39640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39641 $as_echo_n "checking for $ac_word... " >&6; }
39642 if ${ac_cv_path_BUILD_CXX+:} false; then :
39643   $as_echo_n "(cached) " >&6
39644 else
39645   case $BUILD_CXX in
39646   [\\/]* | ?:[\\/]*)
39647   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39648   ;;
39649   *)
39650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39651 for as_dir in $PATH
39652 do
39653   IFS=$as_save_IFS
39654   test -z "$as_dir" && as_dir=.
39655     for ac_exec_ext in '' $ac_executable_extensions; do
39656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39657     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39659     break 2
39660   fi
39661 done
39662   done
39663 IFS=$as_save_IFS
39664 
39665   ;;
39666 esac
39667 fi
39668 BUILD_CXX=$ac_cv_path_BUILD_CXX
39669 if test -n "$BUILD_CXX"; then
39670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39671 $as_echo "$BUILD_CXX" >&6; }
39672 else
39673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39674 $as_echo "no" >&6; }
39675 fi
39676 
39677 
39678         if test "x$BUILD_CXX" = x; then
39679           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39680         fi
39681       else
39682         # Otherwise we believe it is a complete path. Use it as it is.
39683         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39684 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39685         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39686 $as_echo_n "checking for BUILD_CXX... " >&6; }
39687         if test ! -x "$tool_specified"; then
39688           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39689 $as_echo "not found" >&6; }
39690           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39691         fi
39692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39693 $as_echo "$tool_specified" >&6; }
39694       fi
39695     fi
39696   fi
39697 
39698 
39699 
39700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39701 
39702   # First separate the path from the arguments. This will split at the first
39703   # space.
39704   complete="$BUILD_CXX"
39705   path="${complete%% *}"
39706   tmp="$complete EOL"
39707   arguments="${tmp#* }"
39708 
39709   # Input might be given as Windows format, start by converting to
39710   # unix format.
39711   new_path=`$CYGPATH -u "$path"`
39712 
39713   # Now try to locate executable using which
39714   new_path=`$WHICH "$new_path" 2> /dev/null`
39715   # bat and cmd files are not always considered executable in cygwin causing which
39716   # to not find them
39717   if test "x$new_path" = x \
39718       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39719       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39720     new_path=`$CYGPATH -u "$path"`
39721   fi
39722   if test "x$new_path" = x; then
39723     # Oops. Which didn't find the executable.
39724     # The splitting of arguments from the executable at a space might have been incorrect,
39725     # since paths with space are more likely in Windows. Give it another try with the whole
39726     # argument.
39727     path="$complete"
39728     arguments="EOL"
39729     new_path=`$CYGPATH -u "$path"`
39730     new_path=`$WHICH "$new_path" 2> /dev/null`
39731     # bat and cmd files are not always considered executable in cygwin causing which
39732     # to not find them
39733     if test "x$new_path" = x \
39734         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39735         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39736       new_path=`$CYGPATH -u "$path"`
39737     fi
39738     if test "x$new_path" = x; then
39739       # It's still not found. Now this is an unrecoverable error.
39740       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39741 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39742       has_space=`$ECHO "$complete" | $GREP " "`
39743       if test "x$has_space" != x; then
39744         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39745 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39746       fi
39747       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39748     fi
39749   fi
39750 
39751   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39752   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39753   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39754   # "foo.exe" is OK but "foo" is an error.
39755   #
39756   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39757   # It is also a way to make sure we got the proper file name for the real test later on.
39758   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39759   if test "x$test_shortpath" = x; then
39760     # Short path failed, file does not exist as specified.
39761     # Try adding .exe or .cmd
39762     if test -f "${new_path}.exe"; then
39763       input_to_shortpath="${new_path}.exe"
39764     elif test -f "${new_path}.cmd"; then
39765       input_to_shortpath="${new_path}.cmd"
39766     else
39767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39768 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39769       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39770 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39771       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39772     fi
39773   else
39774     input_to_shortpath="$new_path"
39775   fi
39776 
39777   # Call helper function which possibly converts this using DOS-style short mode.
39778   # If so, the updated path is stored in $new_path.
39779   new_path="$input_to_shortpath"
39780 
39781   input_path="$input_to_shortpath"
39782   # Check if we need to convert this using DOS-style short mode. If the path
39783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39784   # take no chances and rewrite it.
39785   # Note: m4 eats our [], so we need to use [ and ] instead.
39786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39787   if test "x$has_forbidden_chars" != x; then
39788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39789     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39790     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39791     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39792       # Going to short mode and back again did indeed matter. Since short mode is
39793       # case insensitive, let's make it lowercase to improve readability.
39794       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39795       # Now convert it back to Unix-stile (cygpath)
39796       input_path=`$CYGPATH -u "$shortmode_path"`
39797       new_path="$input_path"
39798     fi
39799   fi
39800 
39801   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39802   if test "x$test_cygdrive_prefix" = x; then
39803     # As a simple fix, exclude /usr/bin since it's not a real path.
39804     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39805       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39806       # a path prefixed by /cygdrive for fixpath to work.
39807       new_path="$CYGWIN_ROOT_PATH$input_path"
39808     fi
39809   fi
39810 
39811   # remove trailing .exe if any
39812   new_path="${new_path/%.exe/}"
39813 
39814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39815 
39816   # First separate the path from the arguments. This will split at the first
39817   # space.
39818   complete="$BUILD_CXX"
39819   path="${complete%% *}"
39820   tmp="$complete EOL"
39821   arguments="${tmp#* }"
39822 
39823   # Input might be given as Windows format, start by converting to
39824   # unix format.
39825   new_path="$path"
39826 
39827   windows_path="$new_path"
39828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39829     unix_path=`$CYGPATH -u "$windows_path"`
39830     new_path="$unix_path"
39831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39833     new_path="$unix_path"
39834   fi
39835 
39836 
39837   # Now try to locate executable using which
39838   new_path=`$WHICH "$new_path" 2> /dev/null`
39839 
39840   if test "x$new_path" = x; then
39841     # Oops. Which didn't find the executable.
39842     # The splitting of arguments from the executable at a space might have been incorrect,
39843     # since paths with space are more likely in Windows. Give it another try with the whole
39844     # argument.
39845     path="$complete"
39846     arguments="EOL"
39847     new_path="$path"
39848 
39849   windows_path="$new_path"
39850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39851     unix_path=`$CYGPATH -u "$windows_path"`
39852     new_path="$unix_path"
39853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39855     new_path="$unix_path"
39856   fi
39857 
39858 
39859     new_path=`$WHICH "$new_path" 2> /dev/null`
39860     # bat and cmd files are not always considered executable in MSYS causing which
39861     # to not find them
39862     if test "x$new_path" = x \
39863         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39864         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39865       new_path="$path"
39866 
39867   windows_path="$new_path"
39868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39869     unix_path=`$CYGPATH -u "$windows_path"`
39870     new_path="$unix_path"
39871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39873     new_path="$unix_path"
39874   fi
39875 
39876     fi
39877 
39878     if test "x$new_path" = x; then
39879       # It's still not found. Now this is an unrecoverable error.
39880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39881 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39882       has_space=`$ECHO "$complete" | $GREP " "`
39883       if test "x$has_space" != x; then
39884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39886       fi
39887       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39888     fi
39889   fi
39890 
39891   # Now new_path has a complete unix path to the binary
39892   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39893     # Keep paths in /bin as-is, but remove trailing .exe if any
39894     new_path="${new_path/%.exe/}"
39895     # Do not save /bin paths to all_fixpath_prefixes!
39896   else
39897     # Not in mixed or Windows style, start by that.
39898     new_path=`cmd //c echo $new_path`
39899 
39900   input_path="$new_path"
39901   # Check if we need to convert this using DOS-style short mode. If the path
39902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39903   # take no chances and rewrite it.
39904   # Note: m4 eats our [], so we need to use [ and ] instead.
39905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39906   if test "x$has_forbidden_chars" != x; then
39907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39908     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39909   fi
39910 
39911     # Output is in $new_path
39912 
39913   windows_path="$new_path"
39914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39915     unix_path=`$CYGPATH -u "$windows_path"`
39916     new_path="$unix_path"
39917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39919     new_path="$unix_path"
39920   fi
39921 
39922     # remove trailing .exe if any
39923     new_path="${new_path/%.exe/}"
39924 
39925     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39926     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39927   fi
39928 
39929   else
39930     # We're on a unix platform. Hooray! :)
39931     # First separate the path from the arguments. This will split at the first
39932     # space.
39933     complete="$BUILD_CXX"
39934     path="${complete%% *}"
39935     tmp="$complete EOL"
39936     arguments="${tmp#* }"
39937 
39938     # Cannot rely on the command "which" here since it doesn't always work.
39939     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39940     if test -z "$is_absolute_path"; then
39941       # Path to executable is not absolute. Find it.
39942       IFS_save="$IFS"
39943       IFS=:
39944       for p in $PATH; do
39945         if test -f "$p/$path" && test -x "$p/$path"; then
39946           new_path="$p/$path"
39947           break
39948         fi
39949       done
39950       IFS="$IFS_save"
39951     else
39952       # This is an absolute path, we can use it without further modifications.
39953       new_path="$path"
39954     fi
39955 
39956     if test "x$new_path" = x; then
39957       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39958 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39959       has_space=`$ECHO "$complete" | $GREP " "`
39960       if test "x$has_space" != x; then
39961         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39962 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39963       fi
39964       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39965     fi
39966   fi
39967 
39968   # Now join together the path and the arguments once again
39969   if test "x$arguments" != xEOL; then
39970     new_complete="$new_path ${arguments% *}"
39971   else
39972     new_complete="$new_path"
39973   fi
39974 
39975   if test "x$complete" != "x$new_complete"; then
39976     BUILD_CXX="$new_complete"
39977     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39978 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39979   fi
39980 
39981 
39982 
39983   # Publish this variable in the help.
39984 
39985 
39986   if test "x$BUILD_LD" = x; then
39987     # The variable is not set by user, try to locate tool using the code snippet
39988     for ac_prog in ld
39989 do
39990   # Extract the first word of "$ac_prog", so it can be a program name with args.
39991 set dummy $ac_prog; ac_word=$2
39992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39993 $as_echo_n "checking for $ac_word... " >&6; }
39994 if ${ac_cv_path_BUILD_LD+:} false; then :
39995   $as_echo_n "(cached) " >&6
39996 else
39997   case $BUILD_LD in
39998   [\\/]* | ?:[\\/]*)
39999   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40000   ;;
40001   *)
40002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40003 for as_dir in $PATH
40004 do
40005   IFS=$as_save_IFS
40006   test -z "$as_dir" && as_dir=.
40007     for ac_exec_ext in '' $ac_executable_extensions; do
40008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40009     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40011     break 2
40012   fi
40013 done
40014   done
40015 IFS=$as_save_IFS
40016 
40017   ;;
40018 esac
40019 fi
40020 BUILD_LD=$ac_cv_path_BUILD_LD
40021 if test -n "$BUILD_LD"; then
40022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40023 $as_echo "$BUILD_LD" >&6; }
40024 else
40025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40026 $as_echo "no" >&6; }
40027 fi
40028 
40029 
40030   test -n "$BUILD_LD" && break
40031 done
40032 
40033   else
40034     # The variable is set, but is it from the command line or the environment?
40035 
40036     # Try to remove the string !BUILD_LD! from our list.
40037     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40038     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40039       # If it failed, the variable was not from the command line. Ignore it,
40040       # but warn the user (except for BASH, which is always set by the calling BASH).
40041       if test "xBUILD_LD" != xBASH; then
40042         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40043 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40044       fi
40045       # Try to locate tool using the code snippet
40046       for ac_prog in ld
40047 do
40048   # Extract the first word of "$ac_prog", so it can be a program name with args.
40049 set dummy $ac_prog; ac_word=$2
40050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40051 $as_echo_n "checking for $ac_word... " >&6; }
40052 if ${ac_cv_path_BUILD_LD+:} false; then :
40053   $as_echo_n "(cached) " >&6
40054 else
40055   case $BUILD_LD in
40056   [\\/]* | ?:[\\/]*)
40057   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40058   ;;
40059   *)
40060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40061 for as_dir in $PATH
40062 do
40063   IFS=$as_save_IFS
40064   test -z "$as_dir" && as_dir=.
40065     for ac_exec_ext in '' $ac_executable_extensions; do
40066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40067     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40069     break 2
40070   fi
40071 done
40072   done
40073 IFS=$as_save_IFS
40074 
40075   ;;
40076 esac
40077 fi
40078 BUILD_LD=$ac_cv_path_BUILD_LD
40079 if test -n "$BUILD_LD"; then
40080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40081 $as_echo "$BUILD_LD" >&6; }
40082 else
40083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40084 $as_echo "no" >&6; }
40085 fi
40086 
40087 
40088   test -n "$BUILD_LD" && break
40089 done
40090 
40091     else
40092       # If it succeeded, then it was overridden by the user. We will use it
40093       # for the tool.
40094 
40095       # First remove it from the list of overridden variables, so we can test
40096       # for unknown variables in the end.
40097       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40098 
40099       # Check if the provided tool contains a complete path.
40100       tool_specified="$BUILD_LD"
40101       tool_basename="${tool_specified##*/}"
40102       if test "x$tool_basename" = "x$tool_specified"; then
40103         # A command without a complete path is provided, search $PATH.
40104         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40105 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40106         # Extract the first word of "$tool_basename", so it can be a program name with args.
40107 set dummy $tool_basename; ac_word=$2
40108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40109 $as_echo_n "checking for $ac_word... " >&6; }
40110 if ${ac_cv_path_BUILD_LD+:} false; then :
40111   $as_echo_n "(cached) " >&6
40112 else
40113   case $BUILD_LD in
40114   [\\/]* | ?:[\\/]*)
40115   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40116   ;;
40117   *)
40118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40119 for as_dir in $PATH
40120 do
40121   IFS=$as_save_IFS
40122   test -z "$as_dir" && as_dir=.
40123     for ac_exec_ext in '' $ac_executable_extensions; do
40124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40125     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40127     break 2
40128   fi
40129 done
40130   done
40131 IFS=$as_save_IFS
40132 
40133   ;;
40134 esac
40135 fi
40136 BUILD_LD=$ac_cv_path_BUILD_LD
40137 if test -n "$BUILD_LD"; then
40138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40139 $as_echo "$BUILD_LD" >&6; }
40140 else
40141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40142 $as_echo "no" >&6; }
40143 fi
40144 
40145 
40146         if test "x$BUILD_LD" = x; then
40147           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40148         fi
40149       else
40150         # Otherwise we believe it is a complete path. Use it as it is.
40151         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40152 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40154 $as_echo_n "checking for BUILD_LD... " >&6; }
40155         if test ! -x "$tool_specified"; then
40156           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40157 $as_echo "not found" >&6; }
40158           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40159         fi
40160         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40161 $as_echo "$tool_specified" >&6; }
40162       fi
40163     fi
40164   fi
40165 
40166 
40167 
40168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40169 
40170   # First separate the path from the arguments. This will split at the first
40171   # space.
40172   complete="$BUILD_LD"
40173   path="${complete%% *}"
40174   tmp="$complete EOL"
40175   arguments="${tmp#* }"
40176 
40177   # Input might be given as Windows format, start by converting to
40178   # unix format.
40179   new_path=`$CYGPATH -u "$path"`
40180 
40181   # Now try to locate executable using which
40182   new_path=`$WHICH "$new_path" 2> /dev/null`
40183   # bat and cmd files are not always considered executable in cygwin causing which
40184   # to not find them
40185   if test "x$new_path" = x \
40186       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40187       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40188     new_path=`$CYGPATH -u "$path"`
40189   fi
40190   if test "x$new_path" = x; then
40191     # Oops. Which didn't find the executable.
40192     # The splitting of arguments from the executable at a space might have been incorrect,
40193     # since paths with space are more likely in Windows. Give it another try with the whole
40194     # argument.
40195     path="$complete"
40196     arguments="EOL"
40197     new_path=`$CYGPATH -u "$path"`
40198     new_path=`$WHICH "$new_path" 2> /dev/null`
40199     # bat and cmd files are not always considered executable in cygwin causing which
40200     # to not find them
40201     if test "x$new_path" = x \
40202         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40203         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40204       new_path=`$CYGPATH -u "$path"`
40205     fi
40206     if test "x$new_path" = x; then
40207       # It's still not found. Now this is an unrecoverable error.
40208       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40209 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40210       has_space=`$ECHO "$complete" | $GREP " "`
40211       if test "x$has_space" != x; then
40212         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40213 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40214       fi
40215       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40216     fi
40217   fi
40218 
40219   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40220   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40221   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40222   # "foo.exe" is OK but "foo" is an error.
40223   #
40224   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40225   # It is also a way to make sure we got the proper file name for the real test later on.
40226   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40227   if test "x$test_shortpath" = x; then
40228     # Short path failed, file does not exist as specified.
40229     # Try adding .exe or .cmd
40230     if test -f "${new_path}.exe"; then
40231       input_to_shortpath="${new_path}.exe"
40232     elif test -f "${new_path}.cmd"; then
40233       input_to_shortpath="${new_path}.cmd"
40234     else
40235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40236 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40237       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40238 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40239       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40240     fi
40241   else
40242     input_to_shortpath="$new_path"
40243   fi
40244 
40245   # Call helper function which possibly converts this using DOS-style short mode.
40246   # If so, the updated path is stored in $new_path.
40247   new_path="$input_to_shortpath"
40248 
40249   input_path="$input_to_shortpath"
40250   # Check if we need to convert this using DOS-style short mode. If the path
40251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40252   # take no chances and rewrite it.
40253   # Note: m4 eats our [], so we need to use [ and ] instead.
40254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40255   if test "x$has_forbidden_chars" != x; then
40256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40257     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40258     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40259     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40260       # Going to short mode and back again did indeed matter. Since short mode is
40261       # case insensitive, let's make it lowercase to improve readability.
40262       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40263       # Now convert it back to Unix-stile (cygpath)
40264       input_path=`$CYGPATH -u "$shortmode_path"`
40265       new_path="$input_path"
40266     fi
40267   fi
40268 
40269   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40270   if test "x$test_cygdrive_prefix" = x; then
40271     # As a simple fix, exclude /usr/bin since it's not a real path.
40272     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40273       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40274       # a path prefixed by /cygdrive for fixpath to work.
40275       new_path="$CYGWIN_ROOT_PATH$input_path"
40276     fi
40277   fi
40278 
40279   # remove trailing .exe if any
40280   new_path="${new_path/%.exe/}"
40281 
40282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40283 
40284   # First separate the path from the arguments. This will split at the first
40285   # space.
40286   complete="$BUILD_LD"
40287   path="${complete%% *}"
40288   tmp="$complete EOL"
40289   arguments="${tmp#* }"
40290 
40291   # Input might be given as Windows format, start by converting to
40292   # unix format.
40293   new_path="$path"
40294 
40295   windows_path="$new_path"
40296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40297     unix_path=`$CYGPATH -u "$windows_path"`
40298     new_path="$unix_path"
40299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40301     new_path="$unix_path"
40302   fi
40303 
40304 
40305   # Now try to locate executable using which
40306   new_path=`$WHICH "$new_path" 2> /dev/null`
40307 
40308   if test "x$new_path" = x; then
40309     # Oops. Which didn't find the executable.
40310     # The splitting of arguments from the executable at a space might have been incorrect,
40311     # since paths with space are more likely in Windows. Give it another try with the whole
40312     # argument.
40313     path="$complete"
40314     arguments="EOL"
40315     new_path="$path"
40316 
40317   windows_path="$new_path"
40318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40319     unix_path=`$CYGPATH -u "$windows_path"`
40320     new_path="$unix_path"
40321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40323     new_path="$unix_path"
40324   fi
40325 
40326 
40327     new_path=`$WHICH "$new_path" 2> /dev/null`
40328     # bat and cmd files are not always considered executable in MSYS causing which
40329     # to not find them
40330     if test "x$new_path" = x \
40331         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40332         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40333       new_path="$path"
40334 
40335   windows_path="$new_path"
40336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40337     unix_path=`$CYGPATH -u "$windows_path"`
40338     new_path="$unix_path"
40339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40341     new_path="$unix_path"
40342   fi
40343 
40344     fi
40345 
40346     if test "x$new_path" = x; then
40347       # It's still not found. Now this is an unrecoverable error.
40348       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40349 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40350       has_space=`$ECHO "$complete" | $GREP " "`
40351       if test "x$has_space" != x; then
40352         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40353 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40354       fi
40355       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40356     fi
40357   fi
40358 
40359   # Now new_path has a complete unix path to the binary
40360   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40361     # Keep paths in /bin as-is, but remove trailing .exe if any
40362     new_path="${new_path/%.exe/}"
40363     # Do not save /bin paths to all_fixpath_prefixes!
40364   else
40365     # Not in mixed or Windows style, start by that.
40366     new_path=`cmd //c echo $new_path`
40367 
40368   input_path="$new_path"
40369   # Check if we need to convert this using DOS-style short mode. If the path
40370   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40371   # take no chances and rewrite it.
40372   # Note: m4 eats our [], so we need to use [ and ] instead.
40373   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40374   if test "x$has_forbidden_chars" != x; then
40375     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40376     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40377   fi
40378 
40379     # Output is in $new_path
40380 
40381   windows_path="$new_path"
40382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40383     unix_path=`$CYGPATH -u "$windows_path"`
40384     new_path="$unix_path"
40385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40387     new_path="$unix_path"
40388   fi
40389 
40390     # remove trailing .exe if any
40391     new_path="${new_path/%.exe/}"
40392 
40393     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40394     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40395   fi
40396 
40397   else
40398     # We're on a unix platform. Hooray! :)
40399     # First separate the path from the arguments. This will split at the first
40400     # space.
40401     complete="$BUILD_LD"
40402     path="${complete%% *}"
40403     tmp="$complete EOL"
40404     arguments="${tmp#* }"
40405 
40406     # Cannot rely on the command "which" here since it doesn't always work.
40407     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40408     if test -z "$is_absolute_path"; then
40409       # Path to executable is not absolute. Find it.
40410       IFS_save="$IFS"
40411       IFS=:
40412       for p in $PATH; do
40413         if test -f "$p/$path" && test -x "$p/$path"; then
40414           new_path="$p/$path"
40415           break
40416         fi
40417       done
40418       IFS="$IFS_save"
40419     else
40420       # This is an absolute path, we can use it without further modifications.
40421       new_path="$path"
40422     fi
40423 
40424     if test "x$new_path" = x; then
40425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40426 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40427       has_space=`$ECHO "$complete" | $GREP " "`
40428       if test "x$has_space" != x; then
40429         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40430 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40431       fi
40432       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40433     fi
40434   fi
40435 
40436   # Now join together the path and the arguments once again
40437   if test "x$arguments" != xEOL; then
40438     new_complete="$new_path ${arguments% *}"
40439   else
40440     new_complete="$new_path"
40441   fi
40442 
40443   if test "x$complete" != "x$new_complete"; then
40444     BUILD_LD="$new_complete"
40445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40446 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40447   fi
40448 
40449   else
40450     # If we are not cross compiling, use the normal target compilers for
40451     # building the build platform executables.
40452     BUILD_CC="$CC"
40453     BUILD_CXX="$CXX"
40454     BUILD_LD="$LD"
40455   fi
40456 
40457 
40458 
40459 
40460 
40461 
40462   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40463     # For hotspot, we need these in Windows mixed path,
40464     # so rewrite them all. Need added .exe suffix.
40465     HOTSPOT_CXX="$CXX.exe"
40466     HOTSPOT_LD="$LD.exe"
40467     HOTSPOT_MT="$MT.exe"
40468     HOTSPOT_RC="$RC.exe"
40469 
40470   unix_path="$HOTSPOT_CXX"
40471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40472     windows_path=`$CYGPATH -m "$unix_path"`
40473     HOTSPOT_CXX="$windows_path"
40474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40475     windows_path=`cmd //c echo $unix_path`
40476     HOTSPOT_CXX="$windows_path"
40477   fi
40478 
40479 
40480   unix_path="$HOTSPOT_LD"
40481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40482     windows_path=`$CYGPATH -m "$unix_path"`
40483     HOTSPOT_LD="$windows_path"
40484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40485     windows_path=`cmd //c echo $unix_path`
40486     HOTSPOT_LD="$windows_path"
40487   fi
40488 
40489 
40490   unix_path="$HOTSPOT_MT"
40491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40492     windows_path=`$CYGPATH -m "$unix_path"`
40493     HOTSPOT_MT="$windows_path"
40494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40495     windows_path=`cmd //c echo $unix_path`
40496     HOTSPOT_MT="$windows_path"
40497   fi
40498 
40499 
40500   unix_path="$HOTSPOT_RC"
40501   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40502     windows_path=`$CYGPATH -m "$unix_path"`
40503     HOTSPOT_RC="$windows_path"
40504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40505     windows_path=`cmd //c echo $unix_path`
40506     HOTSPOT_RC="$windows_path"
40507   fi
40508 
40509 
40510 
40511   else
40512     HOTSPOT_CXX="$CXX"
40513     HOTSPOT_LD="$LD"
40514   fi
40515 
40516 
40517 
40518   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40519     USE_CLANG=true
40520   fi
40521 
40522 
40523   # LDEXE is the linker to use, when creating executables. Not really used.
40524   # FIXME: These should just be removed!
40525   LDEXE="$LD"
40526   LDEXECXX="$LDCXX"
40527 
40528 
40529 
40530 
40531 
40532 
40533   # The package path is used only on macosx?
40534   # FIXME: clean this up, and/or move it elsewhere.
40535   PACKAGE_PATH=/opt/local
40536 
40537 
40538   # Check for extra potential brokenness.
40539   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40540     # On Windows, double-check that we got the right compiler.
40541     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40542     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40543     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40544       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40545         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40546       fi
40547     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40548       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40549         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40550       fi
40551     fi
40552   fi
40553 
40554   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40555     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40556     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40557     # This is later checked when setting flags.
40558 
40559     # "-Og" suppported for GCC 4.8 and later
40560     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40561 
40562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40563 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40564   supports=yes
40565 
40566   saved_cflags="$CFLAGS"
40567   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40568   ac_ext=c
40569 ac_cpp='$CPP $CPPFLAGS'
40570 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40571 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40573 
40574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40575 /* end confdefs.h.  */
40576 int i;
40577 _ACEOF
40578 if ac_fn_c_try_compile "$LINENO"; then :
40579 
40580 else
40581   supports=no
40582 fi
40583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40584   ac_ext=cpp
40585 ac_cpp='$CXXCPP $CPPFLAGS'
40586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40589 
40590   CFLAGS="$saved_cflags"
40591 
40592   saved_cxxflags="$CXXFLAGS"
40593   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40594   ac_ext=cpp
40595 ac_cpp='$CXXCPP $CPPFLAGS'
40596 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40597 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40598 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40599 
40600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40601 /* end confdefs.h.  */
40602 int i;
40603 _ACEOF
40604 if ac_fn_cxx_try_compile "$LINENO"; then :
40605 
40606 else
40607   supports=no
40608 fi
40609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40610   ac_ext=cpp
40611 ac_cpp='$CXXCPP $CPPFLAGS'
40612 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40613 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40614 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40615 
40616   CXXFLAGS="$saved_cxxflags"
40617 
40618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40619 $as_echo "$supports" >&6; }
40620   if test "x$supports" = "xyes" ; then
40621     HAS_CFLAG_OPTIMIZE_DEBUG=true
40622   else
40623     HAS_CFLAG_OPTIMIZE_DEBUG=false
40624   fi
40625 
40626 
40627     # "-z relro" supported in GNU binutils 2.17 and later
40628     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40629 
40630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40631 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40632   supports=yes
40633 
40634   saved_ldflags="$LDFLAGS"
40635   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40636   ac_ext=c
40637 ac_cpp='$CPP $CPPFLAGS'
40638 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40639 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40640 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40641 
40642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40643 /* end confdefs.h.  */
40644 
40645 int
40646 main ()
40647 {
40648 
40649   ;
40650   return 0;
40651 }
40652 _ACEOF
40653 if ac_fn_c_try_link "$LINENO"; then :
40654 
40655 else
40656   supports=no
40657 fi
40658 rm -f core conftest.err conftest.$ac_objext \
40659     conftest$ac_exeext conftest.$ac_ext
40660   ac_ext=cpp
40661 ac_cpp='$CXXCPP $CPPFLAGS'
40662 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40663 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40664 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40665 
40666   LDFLAGS="$saved_ldflags"
40667 
40668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40669 $as_echo "$supports" >&6; }
40670   if test "x$supports" = "xyes" ; then
40671     HAS_LINKER_RELRO=true
40672   else
40673     HAS_LINKER_RELRO=false
40674   fi
40675 
40676 
40677     # "-z now" supported in GNU binutils 2.11 and later
40678     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40679 
40680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40681 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40682   supports=yes
40683 
40684   saved_ldflags="$LDFLAGS"
40685   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40686   ac_ext=c
40687 ac_cpp='$CPP $CPPFLAGS'
40688 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40689 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40690 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40691 
40692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40693 /* end confdefs.h.  */
40694 
40695 int
40696 main ()
40697 {
40698 
40699   ;
40700   return 0;
40701 }
40702 _ACEOF
40703 if ac_fn_c_try_link "$LINENO"; then :
40704 
40705 else
40706   supports=no
40707 fi
40708 rm -f core conftest.err conftest.$ac_objext \
40709     conftest$ac_exeext conftest.$ac_ext
40710   ac_ext=cpp
40711 ac_cpp='$CXXCPP $CPPFLAGS'
40712 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40713 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40714 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40715 
40716   LDFLAGS="$saved_ldflags"
40717 
40718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40719 $as_echo "$supports" >&6; }
40720   if test "x$supports" = "xyes" ; then
40721     HAS_LINKER_NOW=true
40722   else
40723     HAS_LINKER_NOW=false
40724   fi
40725 
40726   fi
40727 
40728   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40729   # in executable.'
40730   USING_BROKEN_SUSE_LD=no
40731   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40732     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40733 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40734     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40735     $ECHO "int main() { }" > main.c
40736     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40737       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40738 $as_echo "no" >&6; }
40739       USING_BROKEN_SUSE_LD=no
40740     else
40741       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40742 $as_echo "yes" >&6; }
40743       USING_BROKEN_SUSE_LD=yes
40744     fi
40745     rm -rf version-script.map main.c a.out
40746   fi
40747 
40748 
40749 
40750 # Setup the JTReg Regression Test Harness.
40751 
40752 
40753 # Check whether --with-jtreg was given.
40754 if test "${with_jtreg+set}" = set; then :
40755   withval=$with_jtreg;
40756 else
40757   with_jtreg=no
40758 fi
40759 
40760 
40761   if test "x$with_jtreg" = xno; then
40762     # jtreg disabled
40763     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40764 $as_echo_n "checking for jtreg... " >&6; }
40765     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40766 $as_echo "no" >&6; }
40767   else
40768     if test "x$with_jtreg" != xyes; then
40769       # with path specified.
40770       JT_HOME="$with_jtreg"
40771     fi
40772 
40773     if test "x$JT_HOME" != x; then
40774       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40775 $as_echo_n "checking for jtreg... " >&6; }
40776 
40777       # use JT_HOME enviroment var.
40778 
40779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40780 
40781   # Input might be given as Windows format, start by converting to
40782   # unix format.
40783   path="$JT_HOME"
40784   new_path=`$CYGPATH -u "$path"`
40785 
40786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40789   # "foo.exe" is OK but "foo" is an error.
40790   #
40791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
40792   # It is also a way to make sure we got the proper file name for the real test later on.
40793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40794   if test "x$test_shortpath" = x; then
40795     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40796 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40797     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40798   fi
40799 
40800   # Call helper function which possibly converts this using DOS-style short mode.
40801   # If so, the updated path is stored in $new_path.
40802 
40803   input_path="$new_path"
40804   # Check if we need to convert this using DOS-style short mode. If the path
40805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40806   # take no chances and rewrite it.
40807   # Note: m4 eats our [], so we need to use [ and ] instead.
40808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40809   if test "x$has_forbidden_chars" != x; then
40810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40814       # Going to short mode and back again did indeed matter. Since short mode is
40815       # case insensitive, let's make it lowercase to improve readability.
40816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40817       # Now convert it back to Unix-stile (cygpath)
40818       input_path=`$CYGPATH -u "$shortmode_path"`
40819       new_path="$input_path"
40820     fi
40821   fi
40822 
40823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40824   if test "x$test_cygdrive_prefix" = x; then
40825     # As a simple fix, exclude /usr/bin since it's not a real path.
40826     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40828       # a path prefixed by /cygdrive for fixpath to work.
40829       new_path="$CYGWIN_ROOT_PATH$input_path"
40830     fi
40831   fi
40832 
40833 
40834   if test "x$path" != "x$new_path"; then
40835     JT_HOME="$new_path"
40836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40837 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40838   fi
40839 
40840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40841 
40842   path="$JT_HOME"
40843   has_colon=`$ECHO $path | $GREP ^.:`
40844   new_path="$path"
40845   if test "x$has_colon" = x; then
40846     # Not in mixed or Windows style, start by that.
40847     new_path=`cmd //c echo $path`
40848   fi
40849 
40850 
40851   input_path="$new_path"
40852   # Check if we need to convert this using DOS-style short mode. If the path
40853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40854   # take no chances and rewrite it.
40855   # Note: m4 eats our [], so we need to use [ and ] instead.
40856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40857   if test "x$has_forbidden_chars" != x; then
40858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40859     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40860   fi
40861 
40862 
40863   windows_path="$new_path"
40864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40865     unix_path=`$CYGPATH -u "$windows_path"`
40866     new_path="$unix_path"
40867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40869     new_path="$unix_path"
40870   fi
40871 
40872   if test "x$path" != "x$new_path"; then
40873     JT_HOME="$new_path"
40874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40875 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40876   fi
40877 
40878   # Save the first 10 bytes of this path to the storage, so fixpath can work.
40879   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40880 
40881   else
40882     # We're on a unix platform. Hooray! :)
40883     path="$JT_HOME"
40884     has_space=`$ECHO "$path" | $GREP " "`
40885     if test "x$has_space" != x; then
40886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40887 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40888       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40889     fi
40890 
40891     # Use eval to expand a potential ~
40892     eval path="$path"
40893     if test ! -f "$path" && test ! -d "$path"; then
40894       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40895     fi
40896 
40897     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40898   fi
40899 
40900 
40901       # jtreg win32 script works for everybody
40902       JTREGEXE="$JT_HOME/win32/bin/jtreg"
40903 
40904       if test ! -f "$JTREGEXE"; then
40905         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40906       fi
40907 
40908       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40909 $as_echo "$JTREGEXE" >&6; }
40910     else
40911       # try to find jtreg on path
40912 
40913 
40914 
40915   # Publish this variable in the help.
40916 
40917 
40918   if test "x$JTREGEXE" = x; then
40919     # The variable is not set by user, try to locate tool using the code snippet
40920     for ac_prog in jtreg
40921 do
40922   # Extract the first word of "$ac_prog", so it can be a program name with args.
40923 set dummy $ac_prog; ac_word=$2
40924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40925 $as_echo_n "checking for $ac_word... " >&6; }
40926 if ${ac_cv_path_JTREGEXE+:} false; then :
40927   $as_echo_n "(cached) " >&6
40928 else
40929   case $JTREGEXE in
40930   [\\/]* | ?:[\\/]*)
40931   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40932   ;;
40933   *)
40934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40935 for as_dir in $PATH
40936 do
40937   IFS=$as_save_IFS
40938   test -z "$as_dir" && as_dir=.
40939     for ac_exec_ext in '' $ac_executable_extensions; do
40940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40941     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40943     break 2
40944   fi
40945 done
40946   done
40947 IFS=$as_save_IFS
40948 
40949   ;;
40950 esac
40951 fi
40952 JTREGEXE=$ac_cv_path_JTREGEXE
40953 if test -n "$JTREGEXE"; then
40954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40955 $as_echo "$JTREGEXE" >&6; }
40956 else
40957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40958 $as_echo "no" >&6; }
40959 fi
40960 
40961 
40962   test -n "$JTREGEXE" && break
40963 done
40964 
40965   else
40966     # The variable is set, but is it from the command line or the environment?
40967 
40968     # Try to remove the string !JTREGEXE! from our list.
40969     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40970     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40971       # If it failed, the variable was not from the command line. Ignore it,
40972       # but warn the user (except for BASH, which is always set by the calling BASH).
40973       if test "xJTREGEXE" != xBASH; then
40974         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40975 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40976       fi
40977       # Try to locate tool using the code snippet
40978       for ac_prog in jtreg
40979 do
40980   # Extract the first word of "$ac_prog", so it can be a program name with args.
40981 set dummy $ac_prog; ac_word=$2
40982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40983 $as_echo_n "checking for $ac_word... " >&6; }
40984 if ${ac_cv_path_JTREGEXE+:} false; then :
40985   $as_echo_n "(cached) " >&6
40986 else
40987   case $JTREGEXE in
40988   [\\/]* | ?:[\\/]*)
40989   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40990   ;;
40991   *)
40992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40993 for as_dir in $PATH
40994 do
40995   IFS=$as_save_IFS
40996   test -z "$as_dir" && as_dir=.
40997     for ac_exec_ext in '' $ac_executable_extensions; do
40998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40999     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41001     break 2
41002   fi
41003 done
41004   done
41005 IFS=$as_save_IFS
41006 
41007   ;;
41008 esac
41009 fi
41010 JTREGEXE=$ac_cv_path_JTREGEXE
41011 if test -n "$JTREGEXE"; then
41012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41013 $as_echo "$JTREGEXE" >&6; }
41014 else
41015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41016 $as_echo "no" >&6; }
41017 fi
41018 
41019 
41020   test -n "$JTREGEXE" && break
41021 done
41022 
41023     else
41024       # If it succeeded, then it was overridden by the user. We will use it
41025       # for the tool.
41026 
41027       # First remove it from the list of overridden variables, so we can test
41028       # for unknown variables in the end.
41029       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41030 
41031       # Check if the provided tool contains a complete path.
41032       tool_specified="$JTREGEXE"
41033       tool_basename="${tool_specified##*/}"
41034       if test "x$tool_basename" = "x$tool_specified"; then
41035         # A command without a complete path is provided, search $PATH.
41036         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41037 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41038         # Extract the first word of "$tool_basename", so it can be a program name with args.
41039 set dummy $tool_basename; ac_word=$2
41040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41041 $as_echo_n "checking for $ac_word... " >&6; }
41042 if ${ac_cv_path_JTREGEXE+:} false; then :
41043   $as_echo_n "(cached) " >&6
41044 else
41045   case $JTREGEXE in
41046   [\\/]* | ?:[\\/]*)
41047   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41048   ;;
41049   *)
41050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41051 for as_dir in $PATH
41052 do
41053   IFS=$as_save_IFS
41054   test -z "$as_dir" && as_dir=.
41055     for ac_exec_ext in '' $ac_executable_extensions; do
41056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41057     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41059     break 2
41060   fi
41061 done
41062   done
41063 IFS=$as_save_IFS
41064 
41065   ;;
41066 esac
41067 fi
41068 JTREGEXE=$ac_cv_path_JTREGEXE
41069 if test -n "$JTREGEXE"; then
41070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41071 $as_echo "$JTREGEXE" >&6; }
41072 else
41073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41074 $as_echo "no" >&6; }
41075 fi
41076 
41077 
41078         if test "x$JTREGEXE" = x; then
41079           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41080         fi
41081       else
41082         # Otherwise we believe it is a complete path. Use it as it is.
41083         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41084 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41086 $as_echo_n "checking for JTREGEXE... " >&6; }
41087         if test ! -x "$tool_specified"; then
41088           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41089 $as_echo "not found" >&6; }
41090           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41091         fi
41092         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41093 $as_echo "$tool_specified" >&6; }
41094       fi
41095     fi
41096   fi
41097 
41098 
41099 
41100   if test "x$JTREGEXE" = x; then
41101     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41102   fi
41103 
41104 
41105       JT_HOME="`$DIRNAME $JTREGEXE`"
41106     fi
41107   fi
41108 
41109 
41110 
41111 
41112 
41113 
41114   # Option used to tell the compiler whether to create 32- or 64-bit executables
41115   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41116     COMPILER_TARGET_BITS_FLAG="-q"
41117   else
41118     COMPILER_TARGET_BITS_FLAG="-m"
41119   fi
41120 
41121 
41122   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41123   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41124     ARFLAGS="-r"
41125   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41126     ARFLAGS="-X64"
41127   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41128     # lib.exe is used as AR to create static libraries.
41129     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41130   else
41131     ARFLAGS=""
41132   fi
41133 
41134 
41135   ## Setup strip.
41136   # FIXME: should this really be per platform, or should it be per toolchain type?
41137   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41138   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41139   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41140     STRIPFLAGS="-g"
41141   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41142     STRIPFLAGS="-x"
41143   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41144     STRIPFLAGS="-S"
41145   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41146     STRIPFLAGS="-X32_64"
41147   fi
41148 
41149   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41150     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41151   fi
41152 
41153 
41154   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41155     # FIXME: break out into MCSFLAGS
41156     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41157   fi
41158 
41159 
41160   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41161     CC_OUT_OPTION=-Fo
41162     EXE_OUT_OPTION=-out:
41163     LD_OUT_OPTION=-out:
41164     AR_OUT_OPTION=-out:
41165   else
41166     # The option used to specify the target .o,.a or .so file.
41167     # When compiling, how to specify the to be created object file.
41168     CC_OUT_OPTION='-o$(SPACE)'
41169     # When linking, how to specify the to be created executable.
41170     EXE_OUT_OPTION='-o$(SPACE)'
41171     # When linking, how to specify the to be created dynamically linkable library.
41172     LD_OUT_OPTION='-o$(SPACE)'
41173     # When archiving, how to specify the to be create static archive for object files.
41174     AR_OUT_OPTION='rcs$(SPACE)'
41175   fi
41176 
41177 
41178 
41179 
41180 
41181   # On Windows, we need to set RC flags.
41182   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41183     RC_FLAGS="-nologo -l0x409"
41184     if test "x$VARIANT" = xOPT; then
41185       RC_FLAGS="$RC_FLAGS -DNDEBUG"
41186     fi
41187 
41188     # The version variables used to create RC_FLAGS may be overridden
41189     # in a custom configure script, or possibly the command line.
41190     # Let those variables be expanded at make time in spec.gmk.
41191     # The \$ are escaped to the shell, and the $(...) variables
41192     # are evaluated by make.
41193     RC_FLAGS="$RC_FLAGS \
41194         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41195         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41196         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41197         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41198         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41199         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41200         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41201   fi
41202 
41203 
41204   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41205     # silence copyright notice and other headers.
41206     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41207   fi
41208 
41209   if test "x$SYSROOT" != "x"; then
41210     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41211       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41212         # Solaris Studio does not have a concept of sysroot. Instead we must
41213         # make sure the default include and lib dirs are appended to each
41214         # compile and link command line.
41215         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41216         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41217             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41218             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41219       fi
41220     elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41221       # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41222       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41223       SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41224     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41225       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41226       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41227     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41228       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41229       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41230     fi
41231     # Propagate the sysroot args to hotspot
41232     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41233     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41234     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41235   fi
41236 
41237   # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41238   # set this here so it doesn't have to be peppered throughout the forest
41239   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41240     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41241     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41242   fi
41243 
41244 
41245 
41246 
41247 
41248 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41249 
41250 # Now we can test some aspects on the target using configure macros.
41251 
41252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41253 $as_echo_n "checking for ANSI C header files... " >&6; }
41254 if ${ac_cv_header_stdc+:} false; then :
41255   $as_echo_n "(cached) " >&6
41256 else
41257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41258 /* end confdefs.h.  */
41259 #include <stdlib.h>
41260 #include <stdarg.h>
41261 #include <string.h>
41262 #include <float.h>
41263 
41264 int
41265 main ()
41266 {
41267 
41268   ;
41269   return 0;
41270 }
41271 _ACEOF
41272 if ac_fn_cxx_try_compile "$LINENO"; then :
41273   ac_cv_header_stdc=yes
41274 else
41275   ac_cv_header_stdc=no
41276 fi
41277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41278 
41279 if test $ac_cv_header_stdc = yes; then
41280   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41282 /* end confdefs.h.  */
41283 #include <string.h>
41284 
41285 _ACEOF
41286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41287   $EGREP "memchr" >/dev/null 2>&1; then :
41288 
41289 else
41290   ac_cv_header_stdc=no
41291 fi
41292 rm -f conftest*
41293 
41294 fi
41295 
41296 if test $ac_cv_header_stdc = yes; then
41297   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41298   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41299 /* end confdefs.h.  */
41300 #include <stdlib.h>
41301 
41302 _ACEOF
41303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41304   $EGREP "free" >/dev/null 2>&1; then :
41305 
41306 else
41307   ac_cv_header_stdc=no
41308 fi
41309 rm -f conftest*
41310 
41311 fi
41312 
41313 if test $ac_cv_header_stdc = yes; then
41314   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41315   if test "$cross_compiling" = yes; then :
41316   :
41317 else
41318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41319 /* end confdefs.h.  */
41320 #include <ctype.h>
41321 #include <stdlib.h>
41322 #if ((' ' & 0x0FF) == 0x020)
41323 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41324 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41325 #else
41326 # define ISLOWER(c) \
41327                    (('a' <= (c) && (c) <= 'i') \
41328                      || ('j' <= (c) && (c) <= 'r') \
41329                      || ('s' <= (c) && (c) <= 'z'))
41330 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41331 #endif
41332 
41333 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41334 int
41335 main ()
41336 {
41337   int i;
41338   for (i = 0; i < 256; i++)
41339     if (XOR (islower (i), ISLOWER (i))
41340         || toupper (i) != TOUPPER (i))
41341       return 2;
41342   return 0;
41343 }
41344 _ACEOF
41345 if ac_fn_cxx_try_run "$LINENO"; then :
41346 
41347 else
41348   ac_cv_header_stdc=no
41349 fi
41350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41351   conftest.$ac_objext conftest.beam conftest.$ac_ext
41352 fi
41353 
41354 fi
41355 fi
41356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41357 $as_echo "$ac_cv_header_stdc" >&6; }
41358 if test $ac_cv_header_stdc = yes; then
41359 
41360 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41361 
41362 fi
41363 
41364 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41365 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41366                   inttypes.h stdint.h unistd.h
41367 do :
41368   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41369 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41370 "
41371 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41372   cat >>confdefs.h <<_ACEOF
41373 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41374 _ACEOF
41375 
41376 fi
41377 
41378 done
41379 
41380 
41381 
41382   ###############################################################################
41383   #
41384   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41385   # (The JVM can use 32 or 64 bit Java pointers but that decision
41386   # is made at runtime.)
41387   #
41388 
41389   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41390     # Always specify -m flag on Solaris
41391     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41392 
41393   # When we add flags to the "official" CFLAGS etc, we need to
41394   # keep track of these additions in ADDED_CFLAGS etc. These
41395   # will later be checked to make sure only controlled additions
41396   # have been made to CFLAGS etc.
41397   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41398   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41399   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41400 
41401   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41402   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41403   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41404 
41405   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41406   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41407   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41408 
41409   elif test "x$COMPILE_TYPE" = xreduced; then
41410     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41411       # Specify -m if running reduced on unix platforms
41412 
41413   # When we add flags to the "official" CFLAGS etc, we need to
41414   # keep track of these additions in ADDED_CFLAGS etc. These
41415   # will later be checked to make sure only controlled additions
41416   # have been made to CFLAGS etc.
41417   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41418   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41419   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41420 
41421   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41422   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41423   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41424 
41425   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41426   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41427   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41428 
41429     fi
41430   fi
41431 
41432   # Make compilation sanity check
41433   for ac_header in stdio.h
41434 do :
41435   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41436 if test "x$ac_cv_header_stdio_h" = xyes; then :
41437   cat >>confdefs.h <<_ACEOF
41438 #define HAVE_STDIO_H 1
41439 _ACEOF
41440 
41441 else
41442 
41443     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41444 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41445     if test "x$COMPILE_TYPE" = xreduced; then
41446       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41447 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41448     elif test "x$COMPILE_TYPE" = xcross; then
41449       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41450 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41451     fi
41452     as_fn_error $? "Cannot continue." "$LINENO" 5
41453 
41454 fi
41455 
41456 done
41457 
41458 
41459   # The cast to long int works around a bug in the HP C Compiler
41460 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41461 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41462 # This bug is HP SR number 8606223364.
41463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41464 $as_echo_n "checking size of int *... " >&6; }
41465 if ${ac_cv_sizeof_int_p+:} false; then :
41466   $as_echo_n "(cached) " >&6
41467 else
41468   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41469 
41470 else
41471   if test "$ac_cv_type_int_p" = yes; then
41472      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41473 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41474 as_fn_error 77 "cannot compute sizeof (int *)
41475 See \`config.log' for more details" "$LINENO" 5; }
41476    else
41477      ac_cv_sizeof_int_p=0
41478    fi
41479 fi
41480 
41481 fi
41482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41483 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41484 
41485 
41486 
41487 cat >>confdefs.h <<_ACEOF
41488 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41489 _ACEOF
41490 
41491 
41492 
41493   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41494   if test "x$ac_cv_sizeof_int_p" = x; then
41495     # The test failed, lets stick to the assumed value.
41496     { $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
41497 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41498   else
41499     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41500 
41501     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41502       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41503       # Let's try to implicitely set the compilers target architecture and retry the test
41504       { $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
41505 $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;}
41506       { $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
41507 $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;}
41508 
41509   # When we add flags to the "official" CFLAGS etc, we need to
41510   # keep track of these additions in ADDED_CFLAGS etc. These
41511   # will later be checked to make sure only controlled additions
41512   # have been made to CFLAGS etc.
41513   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41514   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41515   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41516 
41517   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41518   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41519   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41520 
41521   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41522   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41523   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41524 
41525 
41526       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41527       unset ac_cv_sizeof_int_p
41528       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41529       cat >>confdefs.h <<_ACEOF
41530 #undef SIZEOF_INT_P
41531 _ACEOF
41532 
41533       # The cast to long int works around a bug in the HP C Compiler
41534 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41535 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41536 # This bug is HP SR number 8606223364.
41537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41538 $as_echo_n "checking size of int *... " >&6; }
41539 if ${ac_cv_sizeof_int_p+:} false; then :
41540   $as_echo_n "(cached) " >&6
41541 else
41542   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41543 
41544 else
41545   if test "$ac_cv_type_int_p" = yes; then
41546      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41547 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41548 as_fn_error 77 "cannot compute sizeof (int *)
41549 See \`config.log' for more details" "$LINENO" 5; }
41550    else
41551      ac_cv_sizeof_int_p=0
41552    fi
41553 fi
41554 
41555 fi
41556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41557 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41558 
41559 
41560 
41561 cat >>confdefs.h <<_ACEOF
41562 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41563 _ACEOF
41564 
41565 
41566 
41567       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41568 
41569       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41570         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
41571       fi
41572     fi
41573   fi
41574 
41575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41576 $as_echo_n "checking for target address size... " >&6; }
41577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41578 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41579 
41580 
41581   ###############################################################################
41582   #
41583   # Is the target little of big endian?
41584   #
41585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41586 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41587 if ${ac_cv_c_bigendian+:} false; then :
41588   $as_echo_n "(cached) " >&6
41589 else
41590   ac_cv_c_bigendian=unknown
41591     # See if we're dealing with a universal compiler.
41592     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41593 /* end confdefs.h.  */
41594 #ifndef __APPLE_CC__
41595                not a universal capable compiler
41596              #endif
41597              typedef int dummy;
41598 
41599 _ACEOF
41600 if ac_fn_cxx_try_compile "$LINENO"; then :
41601 
41602         # Check for potential -arch flags.  It is not universal unless
41603         # there are at least two -arch flags with different values.
41604         ac_arch=
41605         ac_prev=
41606         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41607          if test -n "$ac_prev"; then
41608            case $ac_word in
41609              i?86 | x86_64 | ppc | ppc64)
41610                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41611                  ac_arch=$ac_word
41612                else
41613                  ac_cv_c_bigendian=universal
41614                  break
41615                fi
41616                ;;
41617            esac
41618            ac_prev=
41619          elif test "x$ac_word" = "x-arch"; then
41620            ac_prev=arch
41621          fi
41622        done
41623 fi
41624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41625     if test $ac_cv_c_bigendian = unknown; then
41626       # See if sys/param.h defines the BYTE_ORDER macro.
41627       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41628 /* end confdefs.h.  */
41629 #include <sys/types.h>
41630              #include <sys/param.h>
41631 
41632 int
41633 main ()
41634 {
41635 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41636                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41637                      && LITTLE_ENDIAN)
41638               bogus endian macros
41639              #endif
41640 
41641   ;
41642   return 0;
41643 }
41644 _ACEOF
41645 if ac_fn_cxx_try_compile "$LINENO"; then :
41646   # It does; now see whether it defined to BIG_ENDIAN or not.
41647          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41648 /* end confdefs.h.  */
41649 #include <sys/types.h>
41650                 #include <sys/param.h>
41651 
41652 int
41653 main ()
41654 {
41655 #if BYTE_ORDER != BIG_ENDIAN
41656                  not big endian
41657                 #endif
41658 
41659   ;
41660   return 0;
41661 }
41662 _ACEOF
41663 if ac_fn_cxx_try_compile "$LINENO"; then :
41664   ac_cv_c_bigendian=yes
41665 else
41666   ac_cv_c_bigendian=no
41667 fi
41668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41669 fi
41670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41671     fi
41672     if test $ac_cv_c_bigendian = unknown; then
41673       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41674       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41675 /* end confdefs.h.  */
41676 #include <limits.h>
41677 
41678 int
41679 main ()
41680 {
41681 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41682               bogus endian macros
41683              #endif
41684 
41685   ;
41686   return 0;
41687 }
41688 _ACEOF
41689 if ac_fn_cxx_try_compile "$LINENO"; then :
41690   # It does; now see whether it defined to _BIG_ENDIAN or not.
41691          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41692 /* end confdefs.h.  */
41693 #include <limits.h>
41694 
41695 int
41696 main ()
41697 {
41698 #ifndef _BIG_ENDIAN
41699                  not big endian
41700                 #endif
41701 
41702   ;
41703   return 0;
41704 }
41705 _ACEOF
41706 if ac_fn_cxx_try_compile "$LINENO"; then :
41707   ac_cv_c_bigendian=yes
41708 else
41709   ac_cv_c_bigendian=no
41710 fi
41711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41712 fi
41713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41714     fi
41715     if test $ac_cv_c_bigendian = unknown; then
41716       # Compile a test program.
41717       if test "$cross_compiling" = yes; then :
41718   # Try to guess by grepping values from an object file.
41719          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41720 /* end confdefs.h.  */
41721 short int ascii_mm[] =
41722                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41723                 short int ascii_ii[] =
41724                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41725                 int use_ascii (int i) {
41726                   return ascii_mm[i] + ascii_ii[i];
41727                 }
41728                 short int ebcdic_ii[] =
41729                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41730                 short int ebcdic_mm[] =
41731                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41732                 int use_ebcdic (int i) {
41733                   return ebcdic_mm[i] + ebcdic_ii[i];
41734                 }
41735                 extern int foo;
41736 
41737 int
41738 main ()
41739 {
41740 return use_ascii (foo) == use_ebcdic (foo);
41741   ;
41742   return 0;
41743 }
41744 _ACEOF
41745 if ac_fn_cxx_try_compile "$LINENO"; then :
41746   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41747               ac_cv_c_bigendian=yes
41748             fi
41749             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41750               if test "$ac_cv_c_bigendian" = unknown; then
41751                 ac_cv_c_bigendian=no
41752               else
41753                 # finding both strings is unlikely to happen, but who knows?
41754                 ac_cv_c_bigendian=unknown
41755               fi
41756             fi
41757 fi
41758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41759 else
41760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41761 /* end confdefs.h.  */
41762 $ac_includes_default
41763 int
41764 main ()
41765 {
41766 
41767              /* Are we little or big endian?  From Harbison&Steele.  */
41768              union
41769              {
41770                long int l;
41771                char c[sizeof (long int)];
41772              } u;
41773              u.l = 1;
41774              return u.c[sizeof (long int) - 1] == 1;
41775 
41776   ;
41777   return 0;
41778 }
41779 _ACEOF
41780 if ac_fn_cxx_try_run "$LINENO"; then :
41781   ac_cv_c_bigendian=no
41782 else
41783   ac_cv_c_bigendian=yes
41784 fi
41785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41786   conftest.$ac_objext conftest.beam conftest.$ac_ext
41787 fi
41788 
41789     fi
41790 fi
41791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41792 $as_echo "$ac_cv_c_bigendian" >&6; }
41793  case $ac_cv_c_bigendian in #(
41794    yes)
41795      ENDIAN="big";; #(
41796    no)
41797      ENDIAN="little" ;; #(
41798    universal)
41799      ENDIAN="universal_endianness"
41800      ;; #(
41801    *)
41802      ENDIAN="unknown" ;;
41803  esac
41804 
41805 
41806   if test "x$ENDIAN" = xuniversal_endianness; then
41807     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41808   fi
41809   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41810     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
41811   fi
41812 
41813 
41814 # Configure flags for the tools
41815 
41816   ###############################################################################
41817   #
41818   # How to compile shared libraries.
41819   #
41820 
41821   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41822     PICFLAG="-fPIC"
41823     C_FLAG_REORDER=''
41824     CXX_FLAG_REORDER=''
41825 
41826     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41827       # Linking is different on MacOSX
41828       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41829       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41830       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41831       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41832       SET_SHARED_LIBRARY_MAPFILE=''
41833     else
41834       # Default works for linux, might work on other platforms as well.
41835       SHARED_LIBRARY_FLAGS='-shared'
41836       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41837       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41838       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41839       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41840     fi
41841   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41842     PICFLAG=''
41843     C_FLAG_REORDER=''
41844     CXX_FLAG_REORDER=''
41845 
41846     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41847       # Linking is different on MacOSX
41848       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41849       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41850       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41851       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41852       SET_SHARED_LIBRARY_MAPFILE=''
41853     else
41854       # Default works for linux, might work on other platforms as well.
41855       SHARED_LIBRARY_FLAGS='-shared'
41856       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41857       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41858       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41859       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41860     fi
41861   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41862     PICFLAG="-KPIC"
41863     C_FLAG_REORDER='-xF'
41864     CXX_FLAG_REORDER='-xF'
41865     SHARED_LIBRARY_FLAGS="-G"
41866     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41867     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41868     SET_SHARED_LIBRARY_NAME=''
41869     SET_SHARED_LIBRARY_MAPFILE='-M$1'
41870   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41871     PICFLAG="-qpic=large"
41872     C_FLAG_REORDER=''
41873     CXX_FLAG_REORDER=''
41874     SHARED_LIBRARY_FLAGS="-qmkshrobj"
41875     SET_EXECUTABLE_ORIGIN=""
41876     SET_SHARED_LIBRARY_ORIGIN=''
41877     SET_SHARED_LIBRARY_NAME=''
41878     SET_SHARED_LIBRARY_MAPFILE=''
41879   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41880     PICFLAG=""
41881     C_FLAG_REORDER=''
41882     CXX_FLAG_REORDER=''
41883     SHARED_LIBRARY_FLAGS="-LD"
41884     SET_EXECUTABLE_ORIGIN=''
41885     SET_SHARED_LIBRARY_ORIGIN=''
41886     SET_SHARED_LIBRARY_NAME=''
41887     SET_SHARED_LIBRARY_MAPFILE=''
41888   fi
41889 
41890 
41891 
41892 
41893 
41894 
41895 
41896 
41897 
41898   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41899     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41900     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41901     CFLAGS_JDKLIB_EXTRA='-xstrconst'
41902   fi
41903   # The (cross) compiler is now configured, we can now test capabilities
41904   # of the target platform.
41905 
41906 
41907 
41908   ###############################################################################
41909   #
41910   # Setup the opt flags for different compilers
41911   # and different operating systems.
41912   #
41913 
41914   # FIXME: this was indirectly the old default, but just inherited.
41915   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41916   #   C_FLAG_DEPS="-MMD -MF"
41917   # fi
41918 
41919   # Generate make dependency files
41920   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41921     C_FLAG_DEPS="-MMD -MF"
41922   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41923     C_FLAG_DEPS="-MMD -MF"
41924   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41925     C_FLAG_DEPS="-xMMD -xMF"
41926   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41927     C_FLAG_DEPS="-qmakedep=gcc -MF"
41928   fi
41929   CXX_FLAG_DEPS="$C_FLAG_DEPS"
41930 
41931 
41932 
41933   # Debug symbols
41934   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41935     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41936       # reduce from default "-g2" option to save space
41937       CFLAGS_DEBUG_SYMBOLS="-g1"
41938       CXXFLAGS_DEBUG_SYMBOLS="-g1"
41939     else
41940       CFLAGS_DEBUG_SYMBOLS="-g"
41941       CXXFLAGS_DEBUG_SYMBOLS="-g"
41942     fi
41943   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41944     CFLAGS_DEBUG_SYMBOLS="-g"
41945     CXXFLAGS_DEBUG_SYMBOLS="-g"
41946   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41947     CFLAGS_DEBUG_SYMBOLS="-g -xs"
41948     # FIXME: likely a bug, this disables debug symbols rather than enables them
41949     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41950   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41951     CFLAGS_DEBUG_SYMBOLS="-g"
41952     CXXFLAGS_DEBUG_SYMBOLS="-g"
41953   fi
41954 
41955 
41956 
41957   # bounds, memory and behavior checking options
41958   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41959     case $DEBUG_LEVEL in
41960     release )
41961       # no adjustment
41962       ;;
41963     fastdebug )
41964       # no adjustment
41965       ;;
41966     slowdebug )
41967       # Add runtime stack smashing and undefined behavior checks
41968       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41969       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41970       ;;
41971     esac
41972   fi
41973 
41974 
41975 
41976   # Optimization levels
41977   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41978     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41979 
41980     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41981       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41982       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41983       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41984       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41985       C_O_FLAG_DEBUG="-xregs=no%frameptr"
41986       C_O_FLAG_NONE="-xregs=no%frameptr"
41987       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41988       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41989       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41990       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41991       CXX_O_FLAG_NONE="-xregs=no%frameptr"
41992       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41993         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41994         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41995       fi
41996     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41997       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41998       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41999       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42000       C_O_FLAG_DEBUG=""
42001       C_O_FLAG_NONE=""
42002       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42003       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42004       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42005       C_O_FLAG_DEBUG=""
42006       CXX_O_FLAG_NONE=""
42007     fi
42008   else
42009     # The remaining toolchains share opt flags between CC and CXX;
42010     # setup for C and duplicate afterwards.
42011     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42012       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42013         # On MacOSX we optimize for size, something
42014         # we should do for all platforms?
42015         C_O_FLAG_HIGHEST="-Os"
42016         C_O_FLAG_HI="-Os"
42017         C_O_FLAG_NORM="-Os"
42018       else
42019         C_O_FLAG_HIGHEST="-O3"
42020         C_O_FLAG_HI="-O3"
42021         C_O_FLAG_NORM="-O2"
42022       fi
42023       C_O_FLAG_DEBUG="-O0"
42024       C_O_FLAG_NONE="-O0"
42025     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42026       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42027         # On MacOSX we optimize for size, something
42028         # we should do for all platforms?
42029         C_O_FLAG_HIGHEST="-Os"
42030         C_O_FLAG_HI="-Os"
42031         C_O_FLAG_NORM="-Os"
42032       else
42033         C_O_FLAG_HIGHEST="-O3"
42034         C_O_FLAG_HI="-O3"
42035         C_O_FLAG_NORM="-O2"
42036       fi
42037       C_O_FLAG_DEBUG="-O0"
42038       C_O_FLAG_NONE="-O0"
42039     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42040       C_O_FLAG_HIGHEST="-O3"
42041       C_O_FLAG_HI="-O3 -qstrict"
42042       C_O_FLAG_NORM="-O2"
42043       C_O_FLAG_DEBUG="-qnoopt"
42044       C_O_FLAG_NONE="-qnoop"
42045     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42046       C_O_FLAG_HIGHEST="-O2"
42047       C_O_FLAG_HI="-O1"
42048       C_O_FLAG_NORM="-O1"
42049       C_O_FLAG_DEBUG="-Od"
42050       C_O_FLAG_NONE="-Od"
42051     fi
42052     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42053     CXX_O_FLAG_HI="$C_O_FLAG_HI"
42054     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42055     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42056     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42057   fi
42058 
42059   # Adjust optimization flags according to debug level.
42060   case $DEBUG_LEVEL in
42061     release )
42062       # no adjustment
42063       ;;
42064     fastdebug )
42065       # Not quite so much optimization
42066       C_O_FLAG_HI="$C_O_FLAG_NORM"
42067       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42068       ;;
42069     slowdebug )
42070       # Disable optimization
42071       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42072       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42073       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42074       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42075       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42076       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42077       ;;
42078   esac
42079 
42080 
42081 
42082 
42083 
42084 
42085 
42086 
42087 
42088 
42089 
42090 
42091 
42092   # Special extras...
42093   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42094     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42095       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42096       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42097     fi
42098   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42099     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42100     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42101     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42102   fi
42103 
42104   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42105     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42106 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42107   fi
42108 
42109   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42110     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42111 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42112   fi
42113 
42114   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42115     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42116 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42117   fi
42118 
42119 
42120 # Check whether --with-extra-cflags was given.
42121 if test "${with_extra_cflags+set}" = set; then :
42122   withval=$with_extra_cflags;
42123 fi
42124 
42125 
42126 
42127 # Check whether --with-extra-cxxflags was given.
42128 if test "${with_extra_cxxflags+set}" = set; then :
42129   withval=$with_extra_cxxflags;
42130 fi
42131 
42132 
42133 
42134 # Check whether --with-extra-ldflags was given.
42135 if test "${with_extra_ldflags+set}" = set; then :
42136   withval=$with_extra_ldflags;
42137 fi
42138 
42139 
42140   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42141   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42142   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42143 
42144   # Hotspot needs these set in their legacy form
42145   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42146   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42147   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42148 
42149 
42150 
42151 
42152 
42153   ###############################################################################
42154   #
42155   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42156   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42157   #
42158 
42159   # Setup compiler/platform specific flags into
42160   #    CFLAGS_JDK    - C Compiler flags
42161   #    CXXFLAGS_JDK  - C++ Compiler flags
42162   #    COMMON_CCXXFLAGS_JDK - common to C and C++
42163   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42164     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42165         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42166     case $OPENJDK_TARGET_CPU_ARCH in
42167       arm )
42168         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42169         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42170         ;;
42171       ppc )
42172         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42173         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42174         ;;
42175       * )
42176         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42177         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42178         ;;
42179     esac
42180   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42181     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42182     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42183       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42184       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42185     fi
42186 
42187     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42188     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42189   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42190     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42191     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42192   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42193     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42194     -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42195     -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42196     -DWIN32 -DIAL"
42197     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42198       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42199     else
42200       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42201     fi
42202   fi
42203 
42204   ###############################################################################
42205 
42206   # Adjust flags according to debug level.
42207   case $DEBUG_LEVEL in
42208     fastdebug | slowdebug )
42209       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42210       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42211       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42212       ;;
42213     release )
42214       ;;
42215     * )
42216       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42217       ;;
42218   esac
42219 
42220   # Setup LP64
42221   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42222 
42223   # Set some common defines. These works for all compilers, but assume
42224   # -D is universally accepted.
42225 
42226   # Setup endianness
42227   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42228     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42229     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42230     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42231     #   Note: -Dmacro         is the same as    #define macro 1
42232     #         -Dmacro=        is the same as    #define macro
42233     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42234       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42235     else
42236       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42237     fi
42238   else
42239     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42240     # are defined in the system?
42241     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42242       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42243     else
42244       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42245     fi
42246   fi
42247 
42248   # Setup target OS define. Use OS target name but in upper case.
42249   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42250   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42251 
42252   # Setup target CPU
42253   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42254 
42255   # Setup debug/release defines
42256   if test "x$DEBUG_LEVEL" = xrelease; then
42257     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42258     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42259       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42260     fi
42261   else
42262     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42263   fi
42264 
42265   # Setup release name
42266   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42267 
42268 
42269   # Set some additional per-OS defines.
42270   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42271     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42272   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42273     # FIXME: PPC64 should not be here.
42274     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42275   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42276     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42277   fi
42278 
42279   # Additional macosx handling
42280   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42281     # Setting these parameters makes it an error to link to macosx APIs that are
42282     # newer than the given OS version and makes the linked binaries compatible
42283     # even if built on a newer version of the OS.
42284     # The expected format is X.Y.Z
42285     MACOSX_VERSION_MIN=10.7.0
42286 
42287 
42288     # The macro takes the version with no dots, ex: 1070
42289     # Let the flags variables get resolved in make for easier override on make
42290     # command line.
42291     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42292     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42293   fi
42294 
42295   # Setup some hard coded includes
42296   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42297       -I${JDK_TOPDIR}/src/java.base/share/native/include \
42298       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42299       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42300 
42301   # The shared libraries are compiled using the picflag.
42302   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42303   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42304 
42305   # Executable flags
42306   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42307   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42308 
42309 
42310 
42311 
42312 
42313 
42314   # Setup LDFLAGS et al.
42315   #
42316 
42317   # Now this is odd. The JDK native libraries have to link against libjvm.so
42318   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42319   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42320   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42321   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42322   # libraries will link to whatever is in memory. Yuck.
42323   #
42324   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42325   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42326     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42327     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42328       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42329     fi
42330     # TODO: make -debug optional "--disable-full-debug-symbols"
42331     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42332   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42333     # If this is a --hash-style=gnu system, use --hash-style=both, why?
42334     # We have previously set HAS_GNU_HASH if this is the case
42335     if test -n "$HAS_GNU_HASH"; then
42336       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42337     fi
42338     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42339       # And since we now know that the linker is gnu, then add -z defs, to forbid
42340       # undefined symbols in object files.
42341       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42342       case $DEBUG_LEVEL in
42343         release )
42344           # tell linker to optimize libraries.
42345           # Should this be supplied to the OSS linker as well?
42346           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42347           ;;
42348         slowdebug )
42349           if test "x$HAS_LINKER_NOW" = "xtrue"; then
42350             # do relocations at load
42351             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42352             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42353           fi
42354           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42355             # mark relocations read only
42356             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42357             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42358           fi
42359           ;;
42360         fastdebug )
42361           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42362             # mark relocations read only
42363             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42364             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42365           fi
42366           ;;
42367         * )
42368           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42369           ;;
42370         esac
42371     fi
42372   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42373     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42374     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42375   fi
42376 
42377   # Customize LDFLAGS for executables
42378 
42379   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42380 
42381   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42382     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42383       LDFLAGS_STACK_SIZE=1048576
42384     else
42385       LDFLAGS_STACK_SIZE=327680
42386     fi
42387     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42388   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42389     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42390   fi
42391 
42392   # Customize LDFLAGS for libs
42393   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42394 
42395   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42396     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42397     LDFLAGS_JDKLIB_SUFFIX=""
42398   else
42399     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42400         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42401 
42402     # On some platforms (mac) the linker warns about non existing -L dirs.
42403     # Add server first if available. Linking aginst client does not always produce the same results.
42404     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42405     # Default to server for other variants.
42406     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42407       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42408     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42409       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42410     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42411       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42412     else
42413       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42414     fi
42415 
42416     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42417     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42418       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42419     fi
42420   fi
42421 
42422 
42423 
42424 
42425 
42426 
42427 
42428 
42429   # Some Zero and Shark settings.
42430   # ZERO_ARCHFLAG tells the compiler which mode to build for
42431   case "${OPENJDK_TARGET_CPU}" in
42432     s390)
42433       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42434       ;;
42435     *)
42436       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42437   esac
42438 
42439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42440 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42441   supports=yes
42442 
42443   saved_cflags="$CFLAGS"
42444   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42445   ac_ext=c
42446 ac_cpp='$CPP $CPPFLAGS'
42447 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42448 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42449 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42450 
42451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42452 /* end confdefs.h.  */
42453 int i;
42454 _ACEOF
42455 if ac_fn_c_try_compile "$LINENO"; then :
42456 
42457 else
42458   supports=no
42459 fi
42460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42461   ac_ext=cpp
42462 ac_cpp='$CXXCPP $CPPFLAGS'
42463 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42464 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42465 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42466 
42467   CFLAGS="$saved_cflags"
42468 
42469   saved_cxxflags="$CXXFLAGS"
42470   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42471   ac_ext=cpp
42472 ac_cpp='$CXXCPP $CPPFLAGS'
42473 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42474 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42475 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42476 
42477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42478 /* end confdefs.h.  */
42479 int i;
42480 _ACEOF
42481 if ac_fn_cxx_try_compile "$LINENO"; then :
42482 
42483 else
42484   supports=no
42485 fi
42486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42487   ac_ext=cpp
42488 ac_cpp='$CXXCPP $CPPFLAGS'
42489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42492 
42493   CXXFLAGS="$saved_cxxflags"
42494 
42495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42496 $as_echo "$supports" >&6; }
42497   if test "x$supports" = "xyes" ; then
42498     :
42499   else
42500     ZERO_ARCHFLAG=""
42501   fi
42502 
42503 
42504 
42505   # Check that the compiler supports -mX (or -qX on AIX) flags
42506   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42507 
42508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42509 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42510   supports=yes
42511 
42512   saved_cflags="$CFLAGS"
42513   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42514   ac_ext=c
42515 ac_cpp='$CPP $CPPFLAGS'
42516 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42517 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42519 
42520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42521 /* end confdefs.h.  */
42522 int i;
42523 _ACEOF
42524 if ac_fn_c_try_compile "$LINENO"; then :
42525 
42526 else
42527   supports=no
42528 fi
42529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42530   ac_ext=cpp
42531 ac_cpp='$CXXCPP $CPPFLAGS'
42532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42533 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42535 
42536   CFLAGS="$saved_cflags"
42537 
42538   saved_cxxflags="$CXXFLAGS"
42539   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42540   ac_ext=cpp
42541 ac_cpp='$CXXCPP $CPPFLAGS'
42542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42545 
42546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42547 /* end confdefs.h.  */
42548 int i;
42549 _ACEOF
42550 if ac_fn_cxx_try_compile "$LINENO"; then :
42551 
42552 else
42553   supports=no
42554 fi
42555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42556   ac_ext=cpp
42557 ac_cpp='$CXXCPP $CPPFLAGS'
42558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42559 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42561 
42562   CXXFLAGS="$saved_cxxflags"
42563 
42564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42565 $as_echo "$supports" >&6; }
42566   if test "x$supports" = "xyes" ; then
42567     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42568   else
42569     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42570   fi
42571 
42572 
42573 
42574   case "${TOOLCHAIN_TYPE}" in
42575     microsoft)
42576       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42577       ;;
42578     solstudio)
42579       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42580       ;;
42581     gcc)
42582       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42583       ;;
42584     clang)
42585       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42586       ;;
42587   esac
42588 
42589 
42590 
42591 # Setup debug symbols (need objcopy from the toolchain for that)
42592 
42593   #
42594   # ENABLE_DEBUG_SYMBOLS
42595   # This must be done after the toolchain is setup, since we're looking at objcopy.
42596   #
42597   # Check whether --enable-debug-symbols was given.
42598 if test "${enable_debug_symbols+set}" = set; then :
42599   enableval=$enable_debug_symbols;
42600 fi
42601 
42602 
42603   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42604 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42605 
42606   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42607     # explicit enabling of enable-debug-symbols and can't find objcopy
42608     #   this is an error
42609     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42610   fi
42611 
42612   if test "x$enable_debug_symbols" = "xyes"; then
42613     ENABLE_DEBUG_SYMBOLS=true
42614   elif test "x$enable_debug_symbols" = "xno"; then
42615     ENABLE_DEBUG_SYMBOLS=false
42616   else
42617     # Default is on if objcopy is found
42618     if test "x$OBJCOPY" != x; then
42619       ENABLE_DEBUG_SYMBOLS=true
42620     # MacOS X and Windows don't use objcopy but default is on for those OSes
42621     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42622       ENABLE_DEBUG_SYMBOLS=true
42623     else
42624       ENABLE_DEBUG_SYMBOLS=false
42625     fi
42626   fi
42627 
42628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42629 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42630 
42631   #
42632   # ZIP_DEBUGINFO_FILES
42633   #
42634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42635 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42636   # Check whether --enable-zip-debug-info was given.
42637 if test "${enable_zip_debug_info+set}" = set; then :
42638   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42639 else
42640   enable_zip_debug_info="yes"
42641 fi
42642 
42643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42644 $as_echo "${enable_zip_debug_info}" >&6; }
42645 
42646   if test "x${enable_zip_debug_info}" = "xno"; then
42647     ZIP_DEBUGINFO_FILES=false
42648   else
42649     ZIP_DEBUGINFO_FILES=true
42650   fi
42651 
42652 
42653 
42654 
42655 
42656 ###############################################################################
42657 #
42658 # Check dependencies for external and internal libraries.
42659 #
42660 ###############################################################################
42661 
42662 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42663 
42664   # When using cygwin or msys, we need a wrapper binary that renames
42665   # /cygdrive/c/ arguments into c:/ arguments and peeks into
42666   # @files and rewrites these too! This wrapper binary is
42667   # called fixpath.
42668   FIXPATH=
42669   if test "x$OPENJDK_BUILD_OS" = xwindows; then
42670     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42671 $as_echo_n "checking if fixpath can be created... " >&6; }
42672     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42673     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42674     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42675       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42676       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42677       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42678       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42679     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42680       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42681       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42682 
42683       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42684       # @ was chosen as separator to minimize risk of other tools messing around with it
42685       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42686       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42687 
42688       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42689     fi
42690     rm -f $OUTPUT_ROOT/fixpath*
42691     cd $OUTPUT_ROOT
42692     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42693     cd $CURDIR
42694 
42695     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42696       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42697 $as_echo "no" >&6; }
42698       cat $OUTPUT_ROOT/fixpath1.log
42699       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42700     fi
42701     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42702 $as_echo "yes" >&6; }
42703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42704 $as_echo_n "checking if fixpath.exe works... " >&6; }
42705     cd $OUTPUT_ROOT
42706     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42707     cd $CURDIR
42708     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42709       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42710 $as_echo "no" >&6; }
42711       cat $OUTPUT_ROOT/fixpath2.log
42712       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42713     fi
42714     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42715 $as_echo "yes" >&6; }
42716     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42717   fi
42718 
42719 
42720 
42721 
42722 
42723 
42724   ###############################################################################
42725   #
42726   # OS specific settings that we never will need to probe.
42727   #
42728   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42729     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42730 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42731     PULSE_NOT_NEEDED=yes
42732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42733 $as_echo "pulse" >&6; }
42734   fi
42735 
42736   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42737     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42738 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42739     ALSA_NOT_NEEDED=yes
42740     PULSE_NOT_NEEDED=yes
42741     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42742 $as_echo "alsa pulse" >&6; }
42743   fi
42744 
42745   if test "x$OPENJDK_TARGET_OS" = xaix; then
42746     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42747 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42748     ALSA_NOT_NEEDED=yes
42749     PULSE_NOT_NEEDED=yes
42750     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42751 $as_echo "alsa pulse" >&6; }
42752   fi
42753 
42754 
42755   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42756     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42757 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42758     CUPS_NOT_NEEDED=yes
42759     ALSA_NOT_NEEDED=yes
42760     PULSE_NOT_NEEDED=yes
42761     X11_NOT_NEEDED=yes
42762     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42763 $as_echo "alsa cups pulse x11" >&6; }
42764   fi
42765 
42766   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42767     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42768 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42769     ALSA_NOT_NEEDED=yes
42770     PULSE_NOT_NEEDED=yes
42771     X11_NOT_NEEDED=yes
42772     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42773 $as_echo "alsa pulse x11" >&6; }
42774   fi
42775 
42776   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42777     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42778 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42779     ALSA_NOT_NEEDED=yes
42780     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42781 $as_echo "alsa" >&6; }
42782   fi
42783 
42784   if test "x$OPENJDK" = "xfalse"; then
42785     FREETYPE_NOT_NEEDED=yes
42786   fi
42787 
42788   if test "x$SUPPORT_HEADFUL" = xno; then
42789     X11_NOT_NEEDED=yes
42790   fi
42791 
42792 
42793 
42794   ###############################################################################
42795   #
42796   # Check for X Windows
42797   #
42798 
42799   if test "x$X11_NOT_NEEDED" = xyes; then
42800     if test "x${with_x}" != x; then
42801       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42802 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42803     fi
42804     X_CFLAGS=
42805     X_LIBS=
42806   else
42807     # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42808     # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42809     # --x-libraries for the sysroot, if that seems to be correct.
42810     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42811       if test "x$SYSROOT" != "x"; then
42812         if test "x$x_includes" = xNONE; then
42813           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42814             x_includes="$SYSROOT/usr/X11R6/include"
42815           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42816             x_includes="$SYSROOT/usr/include"
42817           fi
42818         fi
42819         if test "x$x_libraries" = xNONE; then
42820           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42821             x_libraries="$SYSROOT/usr/X11R6/lib"
42822           elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42823             x_libraries="$SYSROOT/usr/lib64"
42824           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42825             x_libraries="$SYSROOT/usr/lib"
42826           fi
42827         fi
42828       fi
42829     fi
42830 
42831     # Now let autoconf do it's magic
42832     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42833 $as_echo_n "checking for X... " >&6; }
42834 
42835 
42836 # Check whether --with-x was given.
42837 if test "${with_x+set}" = set; then :
42838   withval=$with_x;
42839 fi
42840 
42841 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42842 if test "x$with_x" = xno; then
42843   # The user explicitly disabled X.
42844   have_x=disabled
42845 else
42846   case $x_includes,$x_libraries in #(
42847     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42848     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42849   $as_echo_n "(cached) " >&6
42850 else
42851   # One or both of the vars are not set, and there is no cached value.
42852 ac_x_includes=no ac_x_libraries=no
42853 rm -f -r conftest.dir
42854 if mkdir conftest.dir; then
42855   cd conftest.dir
42856   cat >Imakefile <<'_ACEOF'
42857 incroot:
42858         @echo incroot='${INCROOT}'
42859 usrlibdir:
42860         @echo usrlibdir='${USRLIBDIR}'
42861 libdir:
42862         @echo libdir='${LIBDIR}'
42863 _ACEOF
42864   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42865     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42866     for ac_var in incroot usrlibdir libdir; do
42867       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42868     done
42869     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42870     for ac_extension in a so sl dylib la dll; do
42871       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42872          test -f "$ac_im_libdir/libX11.$ac_extension"; then
42873         ac_im_usrlibdir=$ac_im_libdir; break
42874       fi
42875     done
42876     # Screen out bogus values from the imake configuration.  They are
42877     # bogus both because they are the default anyway, and because
42878     # using them would break gcc on systems where it needs fixed includes.
42879     case $ac_im_incroot in
42880         /usr/include) ac_x_includes= ;;
42881         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42882     esac
42883     case $ac_im_usrlibdir in
42884         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
42885         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42886     esac
42887   fi
42888   cd ..
42889   rm -f -r conftest.dir
42890 fi
42891 
42892 # Standard set of common directories for X headers.
42893 # Check X11 before X11Rn because it is often a symlink to the current release.
42894 ac_x_header_dirs='
42895 /usr/X11/include
42896 /usr/X11R7/include
42897 /usr/X11R6/include
42898 /usr/X11R5/include
42899 /usr/X11R4/include
42900 
42901 /usr/include/X11
42902 /usr/include/X11R7
42903 /usr/include/X11R6
42904 /usr/include/X11R5
42905 /usr/include/X11R4
42906 
42907 /usr/local/X11/include
42908 /usr/local/X11R7/include
42909 /usr/local/X11R6/include
42910 /usr/local/X11R5/include
42911 /usr/local/X11R4/include
42912 
42913 /usr/local/include/X11
42914 /usr/local/include/X11R7
42915 /usr/local/include/X11R6
42916 /usr/local/include/X11R5
42917 /usr/local/include/X11R4
42918 
42919 /usr/X386/include
42920 /usr/x386/include
42921 /usr/XFree86/include/X11
42922 
42923 /usr/include
42924 /usr/local/include
42925 /usr/unsupported/include
42926 /usr/athena/include
42927 /usr/local/x11r5/include
42928 /usr/lpp/Xamples/include
42929 
42930 /usr/openwin/include
42931 /usr/openwin/share/include'
42932 
42933 if test "$ac_x_includes" = no; then
42934   # Guess where to find include files, by looking for Xlib.h.
42935   # First, try using that file with no special directory specified.
42936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42937 /* end confdefs.h.  */
42938 #include <X11/Xlib.h>
42939 _ACEOF
42940 if ac_fn_cxx_try_cpp "$LINENO"; then :
42941   # We can compile using X headers with no special include directory.
42942 ac_x_includes=
42943 else
42944   for ac_dir in $ac_x_header_dirs; do
42945   if test -r "$ac_dir/X11/Xlib.h"; then
42946     ac_x_includes=$ac_dir
42947     break
42948   fi
42949 done
42950 fi
42951 rm -f conftest.err conftest.i conftest.$ac_ext
42952 fi # $ac_x_includes = no
42953 
42954 if test "$ac_x_libraries" = no; then
42955   # Check for the libraries.
42956   # See if we find them without any special options.
42957   # Don't add to $LIBS permanently.
42958   ac_save_LIBS=$LIBS
42959   LIBS="-lX11 $LIBS"
42960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42961 /* end confdefs.h.  */
42962 #include <X11/Xlib.h>
42963 int
42964 main ()
42965 {
42966 XrmInitialize ()
42967   ;
42968   return 0;
42969 }
42970 _ACEOF
42971 if ac_fn_cxx_try_link "$LINENO"; then :
42972   LIBS=$ac_save_LIBS
42973 # We can link X programs with no special library path.
42974 ac_x_libraries=
42975 else
42976   LIBS=$ac_save_LIBS
42977 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42978 do
42979   # Don't even attempt the hair of trying to link an X program!
42980   for ac_extension in a so sl dylib la dll; do
42981     if test -r "$ac_dir/libX11.$ac_extension"; then
42982       ac_x_libraries=$ac_dir
42983       break 2
42984     fi
42985   done
42986 done
42987 fi
42988 rm -f core conftest.err conftest.$ac_objext \
42989     conftest$ac_exeext conftest.$ac_ext
42990 fi # $ac_x_libraries = no
42991 
42992 case $ac_x_includes,$ac_x_libraries in #(
42993   no,* | *,no | *\'*)
42994     # Didn't find X, or a directory has "'" in its name.
42995     ac_cv_have_x="have_x=no";; #(
42996   *)
42997     # Record where we found X for the cache.
42998     ac_cv_have_x="have_x=yes\
42999         ac_x_includes='$ac_x_includes'\
43000         ac_x_libraries='$ac_x_libraries'"
43001 esac
43002 fi
43003 ;; #(
43004     *) have_x=yes;;
43005   esac
43006   eval "$ac_cv_have_x"
43007 fi # $with_x != no
43008 
43009 if test "$have_x" != yes; then
43010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43011 $as_echo "$have_x" >&6; }
43012   no_x=yes
43013 else
43014   # If each of the values was on the command line, it overrides each guess.
43015   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43016   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43017   # Update the cache value to reflect the command line values.
43018   ac_cv_have_x="have_x=yes\
43019         ac_x_includes='$x_includes'\
43020         ac_x_libraries='$x_libraries'"
43021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43022 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43023 fi
43024 
43025     if test "$no_x" = yes; then
43026   # Not all programs may use this symbol, but it does not hurt to define it.
43027 
43028 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43029 
43030   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43031 else
43032   if test -n "$x_includes"; then
43033     X_CFLAGS="$X_CFLAGS -I$x_includes"
43034   fi
43035 
43036   # It would also be nice to do this for all -L options, not just this one.
43037   if test -n "$x_libraries"; then
43038     X_LIBS="$X_LIBS -L$x_libraries"
43039     # For Solaris; some versions of Sun CC require a space after -R and
43040     # others require no space.  Words are not sufficient . . . .
43041     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43042 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43043     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43044     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43045     ac_cxx_werror_flag=yes
43046     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43047 /* end confdefs.h.  */
43048 
43049 int
43050 main ()
43051 {
43052 
43053   ;
43054   return 0;
43055 }
43056 _ACEOF
43057 if ac_fn_cxx_try_link "$LINENO"; then :
43058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43059 $as_echo "no" >&6; }
43060        X_LIBS="$X_LIBS -R$x_libraries"
43061 else
43062   LIBS="$ac_xsave_LIBS -R $x_libraries"
43063        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43064 /* end confdefs.h.  */
43065 
43066 int
43067 main ()
43068 {
43069 
43070   ;
43071   return 0;
43072 }
43073 _ACEOF
43074 if ac_fn_cxx_try_link "$LINENO"; then :
43075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43076 $as_echo "yes" >&6; }
43077           X_LIBS="$X_LIBS -R $x_libraries"
43078 else
43079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43080 $as_echo "neither works" >&6; }
43081 fi
43082 rm -f core conftest.err conftest.$ac_objext \
43083     conftest$ac_exeext conftest.$ac_ext
43084 fi
43085 rm -f core conftest.err conftest.$ac_objext \
43086     conftest$ac_exeext conftest.$ac_ext
43087     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43088     LIBS=$ac_xsave_LIBS
43089   fi
43090 
43091   # Check for system-dependent libraries X programs must link with.
43092   # Do this before checking for the system-independent R6 libraries
43093   # (-lICE), since we may need -lsocket or whatever for X linking.
43094 
43095   if test "$ISC" = yes; then
43096     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43097   else
43098     # Martyn Johnson says this is needed for Ultrix, if the X
43099     # libraries were built with DECnet support.  And Karl Berry says
43100     # the Alpha needs dnet_stub (dnet does not exist).
43101     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43102     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43103 /* end confdefs.h.  */
43104 
43105 /* Override any GCC internal prototype to avoid an error.
43106    Use char because int might match the return type of a GCC
43107    builtin and then its argument prototype would still apply.  */
43108 #ifdef __cplusplus
43109 extern "C"
43110 #endif
43111 char XOpenDisplay ();
43112 int
43113 main ()
43114 {
43115 return XOpenDisplay ();
43116   ;
43117   return 0;
43118 }
43119 _ACEOF
43120 if ac_fn_cxx_try_link "$LINENO"; then :
43121 
43122 else
43123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43124 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43125 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43126   $as_echo_n "(cached) " >&6
43127 else
43128   ac_check_lib_save_LIBS=$LIBS
43129 LIBS="-ldnet  $LIBS"
43130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43131 /* end confdefs.h.  */
43132 
43133 /* Override any GCC internal prototype to avoid an error.
43134    Use char because int might match the return type of a GCC
43135    builtin and then its argument prototype would still apply.  */
43136 #ifdef __cplusplus
43137 extern "C"
43138 #endif
43139 char dnet_ntoa ();
43140 int
43141 main ()
43142 {
43143 return dnet_ntoa ();
43144   ;
43145   return 0;
43146 }
43147 _ACEOF
43148 if ac_fn_cxx_try_link "$LINENO"; then :
43149   ac_cv_lib_dnet_dnet_ntoa=yes
43150 else
43151   ac_cv_lib_dnet_dnet_ntoa=no
43152 fi
43153 rm -f core conftest.err conftest.$ac_objext \
43154     conftest$ac_exeext conftest.$ac_ext
43155 LIBS=$ac_check_lib_save_LIBS
43156 fi
43157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43158 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43159 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43160   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43161 fi
43162 
43163     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43164       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43165 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43166 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43167   $as_echo_n "(cached) " >&6
43168 else
43169   ac_check_lib_save_LIBS=$LIBS
43170 LIBS="-ldnet_stub  $LIBS"
43171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43172 /* end confdefs.h.  */
43173 
43174 /* Override any GCC internal prototype to avoid an error.
43175    Use char because int might match the return type of a GCC
43176    builtin and then its argument prototype would still apply.  */
43177 #ifdef __cplusplus
43178 extern "C"
43179 #endif
43180 char dnet_ntoa ();
43181 int
43182 main ()
43183 {
43184 return dnet_ntoa ();
43185   ;
43186   return 0;
43187 }
43188 _ACEOF
43189 if ac_fn_cxx_try_link "$LINENO"; then :
43190   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43191 else
43192   ac_cv_lib_dnet_stub_dnet_ntoa=no
43193 fi
43194 rm -f core conftest.err conftest.$ac_objext \
43195     conftest$ac_exeext conftest.$ac_ext
43196 LIBS=$ac_check_lib_save_LIBS
43197 fi
43198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43199 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43200 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43201   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43202 fi
43203 
43204     fi
43205 fi
43206 rm -f core conftest.err conftest.$ac_objext \
43207     conftest$ac_exeext conftest.$ac_ext
43208     LIBS="$ac_xsave_LIBS"
43209 
43210     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43211     # to get the SysV transport functions.
43212     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43213     # needs -lnsl.
43214     # The nsl library prevents programs from opening the X display
43215     # on Irix 5.2, according to T.E. Dickey.
43216     # The functions gethostbyname, getservbyname, and inet_addr are
43217     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43218     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43219 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43220 
43221 fi
43222 
43223     if test $ac_cv_func_gethostbyname = no; then
43224       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43225 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43226 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43227   $as_echo_n "(cached) " >&6
43228 else
43229   ac_check_lib_save_LIBS=$LIBS
43230 LIBS="-lnsl  $LIBS"
43231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43232 /* end confdefs.h.  */
43233 
43234 /* Override any GCC internal prototype to avoid an error.
43235    Use char because int might match the return type of a GCC
43236    builtin and then its argument prototype would still apply.  */
43237 #ifdef __cplusplus
43238 extern "C"
43239 #endif
43240 char gethostbyname ();
43241 int
43242 main ()
43243 {
43244 return gethostbyname ();
43245   ;
43246   return 0;
43247 }
43248 _ACEOF
43249 if ac_fn_cxx_try_link "$LINENO"; then :
43250   ac_cv_lib_nsl_gethostbyname=yes
43251 else
43252   ac_cv_lib_nsl_gethostbyname=no
43253 fi
43254 rm -f core conftest.err conftest.$ac_objext \
43255     conftest$ac_exeext conftest.$ac_ext
43256 LIBS=$ac_check_lib_save_LIBS
43257 fi
43258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43259 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43260 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43261   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43262 fi
43263 
43264       if test $ac_cv_lib_nsl_gethostbyname = no; then
43265         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43266 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43267 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43268   $as_echo_n "(cached) " >&6
43269 else
43270   ac_check_lib_save_LIBS=$LIBS
43271 LIBS="-lbsd  $LIBS"
43272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43273 /* end confdefs.h.  */
43274 
43275 /* Override any GCC internal prototype to avoid an error.
43276    Use char because int might match the return type of a GCC
43277    builtin and then its argument prototype would still apply.  */
43278 #ifdef __cplusplus
43279 extern "C"
43280 #endif
43281 char gethostbyname ();
43282 int
43283 main ()
43284 {
43285 return gethostbyname ();
43286   ;
43287   return 0;
43288 }
43289 _ACEOF
43290 if ac_fn_cxx_try_link "$LINENO"; then :
43291   ac_cv_lib_bsd_gethostbyname=yes
43292 else
43293   ac_cv_lib_bsd_gethostbyname=no
43294 fi
43295 rm -f core conftest.err conftest.$ac_objext \
43296     conftest$ac_exeext conftest.$ac_ext
43297 LIBS=$ac_check_lib_save_LIBS
43298 fi
43299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43300 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43301 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43302   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43303 fi
43304 
43305       fi
43306     fi
43307 
43308     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43309     # socket/setsockopt and other routines are undefined under SCO ODT
43310     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43311     # on later versions), says Simon Leinen: it contains gethostby*
43312     # variants that don't use the name server (or something).  -lsocket
43313     # must be given before -lnsl if both are needed.  We assume that
43314     # if connect needs -lnsl, so does gethostbyname.
43315     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43316 if test "x$ac_cv_func_connect" = xyes; then :
43317 
43318 fi
43319 
43320     if test $ac_cv_func_connect = no; then
43321       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43322 $as_echo_n "checking for connect in -lsocket... " >&6; }
43323 if ${ac_cv_lib_socket_connect+:} false; then :
43324   $as_echo_n "(cached) " >&6
43325 else
43326   ac_check_lib_save_LIBS=$LIBS
43327 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43329 /* end confdefs.h.  */
43330 
43331 /* Override any GCC internal prototype to avoid an error.
43332    Use char because int might match the return type of a GCC
43333    builtin and then its argument prototype would still apply.  */
43334 #ifdef __cplusplus
43335 extern "C"
43336 #endif
43337 char connect ();
43338 int
43339 main ()
43340 {
43341 return connect ();
43342   ;
43343   return 0;
43344 }
43345 _ACEOF
43346 if ac_fn_cxx_try_link "$LINENO"; then :
43347   ac_cv_lib_socket_connect=yes
43348 else
43349   ac_cv_lib_socket_connect=no
43350 fi
43351 rm -f core conftest.err conftest.$ac_objext \
43352     conftest$ac_exeext conftest.$ac_ext
43353 LIBS=$ac_check_lib_save_LIBS
43354 fi
43355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43356 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43357 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43358   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43359 fi
43360 
43361     fi
43362 
43363     # Guillermo Gomez says -lposix is necessary on A/UX.
43364     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43365 if test "x$ac_cv_func_remove" = xyes; then :
43366 
43367 fi
43368 
43369     if test $ac_cv_func_remove = no; then
43370       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43371 $as_echo_n "checking for remove in -lposix... " >&6; }
43372 if ${ac_cv_lib_posix_remove+:} false; then :
43373   $as_echo_n "(cached) " >&6
43374 else
43375   ac_check_lib_save_LIBS=$LIBS
43376 LIBS="-lposix  $LIBS"
43377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43378 /* end confdefs.h.  */
43379 
43380 /* Override any GCC internal prototype to avoid an error.
43381    Use char because int might match the return type of a GCC
43382    builtin and then its argument prototype would still apply.  */
43383 #ifdef __cplusplus
43384 extern "C"
43385 #endif
43386 char remove ();
43387 int
43388 main ()
43389 {
43390 return remove ();
43391   ;
43392   return 0;
43393 }
43394 _ACEOF
43395 if ac_fn_cxx_try_link "$LINENO"; then :
43396   ac_cv_lib_posix_remove=yes
43397 else
43398   ac_cv_lib_posix_remove=no
43399 fi
43400 rm -f core conftest.err conftest.$ac_objext \
43401     conftest$ac_exeext conftest.$ac_ext
43402 LIBS=$ac_check_lib_save_LIBS
43403 fi
43404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43405 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43406 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43407   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43408 fi
43409 
43410     fi
43411 
43412     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43413     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43414 if test "x$ac_cv_func_shmat" = xyes; then :
43415 
43416 fi
43417 
43418     if test $ac_cv_func_shmat = no; then
43419       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43420 $as_echo_n "checking for shmat in -lipc... " >&6; }
43421 if ${ac_cv_lib_ipc_shmat+:} false; then :
43422   $as_echo_n "(cached) " >&6
43423 else
43424   ac_check_lib_save_LIBS=$LIBS
43425 LIBS="-lipc  $LIBS"
43426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43427 /* end confdefs.h.  */
43428 
43429 /* Override any GCC internal prototype to avoid an error.
43430    Use char because int might match the return type of a GCC
43431    builtin and then its argument prototype would still apply.  */
43432 #ifdef __cplusplus
43433 extern "C"
43434 #endif
43435 char shmat ();
43436 int
43437 main ()
43438 {
43439 return shmat ();
43440   ;
43441   return 0;
43442 }
43443 _ACEOF
43444 if ac_fn_cxx_try_link "$LINENO"; then :
43445   ac_cv_lib_ipc_shmat=yes
43446 else
43447   ac_cv_lib_ipc_shmat=no
43448 fi
43449 rm -f core conftest.err conftest.$ac_objext \
43450     conftest$ac_exeext conftest.$ac_ext
43451 LIBS=$ac_check_lib_save_LIBS
43452 fi
43453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43454 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43455 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43456   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43457 fi
43458 
43459     fi
43460   fi
43461 
43462   # Check for libraries that X11R6 Xt/Xaw programs need.
43463   ac_save_LDFLAGS=$LDFLAGS
43464   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43465   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43466   # check for ICE first), but we must link in the order -lSM -lICE or
43467   # we get undefined symbols.  So assume we have SM if we have ICE.
43468   # These have to be linked with before -lX11, unlike the other
43469   # libraries we check for below, so use a different variable.
43470   # John Interrante, Karl Berry
43471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43472 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43473 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43474   $as_echo_n "(cached) " >&6
43475 else
43476   ac_check_lib_save_LIBS=$LIBS
43477 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43479 /* end confdefs.h.  */
43480 
43481 /* Override any GCC internal prototype to avoid an error.
43482    Use char because int might match the return type of a GCC
43483    builtin and then its argument prototype would still apply.  */
43484 #ifdef __cplusplus
43485 extern "C"
43486 #endif
43487 char IceConnectionNumber ();
43488 int
43489 main ()
43490 {
43491 return IceConnectionNumber ();
43492   ;
43493   return 0;
43494 }
43495 _ACEOF
43496 if ac_fn_cxx_try_link "$LINENO"; then :
43497   ac_cv_lib_ICE_IceConnectionNumber=yes
43498 else
43499   ac_cv_lib_ICE_IceConnectionNumber=no
43500 fi
43501 rm -f core conftest.err conftest.$ac_objext \
43502     conftest$ac_exeext conftest.$ac_ext
43503 LIBS=$ac_check_lib_save_LIBS
43504 fi
43505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43506 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43507 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43508   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43509 fi
43510 
43511   LDFLAGS=$ac_save_LDFLAGS
43512 
43513 fi
43514 
43515 
43516     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43517     # this doesn't make sense so we remove it.
43518     if test "x$COMPILE_TYPE" = xcross; then
43519       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43520     fi
43521 
43522     if test "x$no_x" = xyes; then
43523 
43524   # Print a helpful message on how to acquire the necessary build dependency.
43525   # x11 is the help tag: freetype, cups, pulse, alsa etc
43526   MISSING_DEPENDENCY=x11
43527 
43528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43529     cygwin_help $MISSING_DEPENDENCY
43530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43531     msys_help $MISSING_DEPENDENCY
43532   else
43533     PKGHANDLER_COMMAND=
43534 
43535     case $PKGHANDLER in
43536       apt-get)
43537         apt_help     $MISSING_DEPENDENCY ;;
43538       yum)
43539         yum_help     $MISSING_DEPENDENCY ;;
43540       port)
43541         port_help    $MISSING_DEPENDENCY ;;
43542       pkgutil)
43543         pkgutil_help $MISSING_DEPENDENCY ;;
43544       pkgadd)
43545         pkgadd_help  $MISSING_DEPENDENCY ;;
43546     esac
43547 
43548     if test "x$PKGHANDLER_COMMAND" != x; then
43549       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43550     fi
43551   fi
43552 
43553       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43554     fi
43555 
43556     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43557       OPENWIN_HOME="/usr/openwin"
43558       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43559       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43560           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43561           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43562           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43563     fi
43564 
43565     ac_ext=c
43566 ac_cpp='$CPP $CPPFLAGS'
43567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43570 
43571     OLD_CFLAGS="$CFLAGS"
43572     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43573 
43574     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43575     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43576 do :
43577   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43578 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43579           # include <X11/Xlib.h>
43580           # include <X11/Xutil.h>
43581 
43582 
43583 "
43584 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43585   cat >>confdefs.h <<_ACEOF
43586 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43587 _ACEOF
43588  X11_HEADERS_OK=yes
43589 else
43590   X11_HEADERS_OK=no; break
43591 fi
43592 
43593 done
43594 
43595 
43596     if test "x$X11_HEADERS_OK" = xno; then
43597 
43598   # Print a helpful message on how to acquire the necessary build dependency.
43599   # x11 is the help tag: freetype, cups, pulse, alsa etc
43600   MISSING_DEPENDENCY=x11
43601 
43602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43603     cygwin_help $MISSING_DEPENDENCY
43604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43605     msys_help $MISSING_DEPENDENCY
43606   else
43607     PKGHANDLER_COMMAND=
43608 
43609     case $PKGHANDLER in
43610       apt-get)
43611         apt_help     $MISSING_DEPENDENCY ;;
43612       yum)
43613         yum_help     $MISSING_DEPENDENCY ;;
43614       port)
43615         port_help    $MISSING_DEPENDENCY ;;
43616       pkgutil)
43617         pkgutil_help $MISSING_DEPENDENCY ;;
43618       pkgadd)
43619         pkgadd_help  $MISSING_DEPENDENCY ;;
43620     esac
43621 
43622     if test "x$PKGHANDLER_COMMAND" != x; then
43623       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43624     fi
43625   fi
43626 
43627       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43628     fi
43629 
43630     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43631     # defined in libawt_xawt.
43632     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43633 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43634     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43635 /* end confdefs.h.  */
43636 #include <X11/extensions/Xrender.h>
43637 int
43638 main ()
43639 {
43640 XLinearGradient x;
43641   ;
43642   return 0;
43643 }
43644 _ACEOF
43645 if ac_fn_c_try_compile "$LINENO"; then :
43646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43647 $as_echo "yes" >&6; }
43648 else
43649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43650 $as_echo "no" >&6; }
43651          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43652 fi
43653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43654 
43655     CFLAGS="$OLD_CFLAGS"
43656     ac_ext=cpp
43657 ac_cpp='$CXXCPP $CPPFLAGS'
43658 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43659 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43660 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43661 
43662   fi # X11_NOT_NEEDED
43663 
43664 
43665 
43666 
43667 
43668 
43669   ###############################################################################
43670   #
43671   # The common unix printing system cups is used to print from java.
43672   #
43673 
43674 # Check whether --with-cups was given.
43675 if test "${with_cups+set}" = set; then :
43676   withval=$with_cups;
43677 fi
43678 
43679 
43680 # Check whether --with-cups-include was given.
43681 if test "${with_cups_include+set}" = set; then :
43682   withval=$with_cups_include;
43683 fi
43684 
43685 
43686   if test "x$CUPS_NOT_NEEDED" = xyes; then
43687     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43688       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43689 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43690     fi
43691     CUPS_CFLAGS=
43692   else
43693     CUPS_FOUND=no
43694 
43695     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43696       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43697     fi
43698 
43699     if test "x${with_cups}" != x; then
43700       CUPS_CFLAGS="-I${with_cups}/include"
43701       CUPS_FOUND=yes
43702     fi
43703     if test "x${with_cups_include}" != x; then
43704       CUPS_CFLAGS="-I${with_cups_include}"
43705       CUPS_FOUND=yes
43706     fi
43707     if test "x$CUPS_FOUND" = xno; then
43708 
43709 
43710   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43711     # Source the builddeps file again, to make sure it uses the latest variables!
43712     . $builddepsfile
43713     # Look for a target and build machine specific resource!
43714     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43715     if test "x$resource" = x; then
43716       # Ok, lets instead look for a target specific resource
43717       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43718     fi
43719     if test "x$resource" = x; then
43720       # Ok, lets instead look for a build specific resource
43721       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43722     fi
43723     if test "x$resource" = x; then
43724       # Ok, lets instead look for a generic resource
43725       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43726       resource=${builddep_cups}
43727     fi
43728     if test "x$resource" != x; then
43729       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43730 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43731       # If the resource in the builddeps.conf file is an existing directory,
43732       # for example /java/linux/cups
43733       if test -d ${resource}; then
43734         depdir=${resource}
43735       else
43736 
43737   # cups is for example mymodule
43738   # $resource is for example libs/general/libmymod_1_2_3.zip
43739   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43740   # $with_builddeps_dir is for example /localhome/builddeps
43741   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43742   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43743   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43744   filename=`basename $resource`
43745   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43746   filebase=${filename%%.*}
43747   extension=${filename#*.}
43748   installdir=$with_builddeps_dir/$filebase
43749   if test ! -f $installdir/$filename.unpacked; then
43750     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43751 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43752     if test ! -d $installdir; then
43753       mkdir -p $installdir
43754     fi
43755     if test ! -d $installdir; then
43756       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43757     fi
43758     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43759     touch $tmpfile
43760     if test ! -f $tmpfile; then
43761       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43762     fi
43763 
43764   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43765   # $tmpfile is the local file name for the downloaded file.
43766   VALID_TOOL=no
43767   if test "x$BDEPS_FTP" = xwget; then
43768     VALID_TOOL=yes
43769     wget -O $tmpfile $with_builddeps_server/$resource
43770   fi
43771   if test "x$BDEPS_FTP" = xlftp; then
43772     VALID_TOOL=yes
43773     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43774   fi
43775   if test "x$BDEPS_FTP" = xftp; then
43776     VALID_TOOL=yes
43777     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43778     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43779     FTPUSERPWD=${FTPSERVER%%@*}
43780     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43781       FTPUSER=${userpwd%%:*}
43782       FTPPWD=${userpwd#*@}
43783       FTPSERVER=${FTPSERVER#*@}
43784     else
43785       FTPUSER=ftp
43786       FTPPWD=ftp
43787     fi
43788     # the "pass" command does not work on some
43789     # ftp clients (read ftp.exe) but if it works,
43790     # passive mode is better!
43791     ( \
43792         echo "user $FTPUSER $FTPPWD"        ; \
43793         echo "pass"                         ; \
43794         echo "bin"                          ; \
43795         echo "get $FTPPATH $tmpfile"              ; \
43796     ) | ftp -in $FTPSERVER
43797   fi
43798   if test "x$VALID_TOOL" != xyes; then
43799     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43800   fi
43801 
43802     mv $tmpfile $installdir/$filename
43803     if test ! -s $installdir/$filename; then
43804       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43805     fi
43806     case "$extension" in
43807       zip)  echo "Unzipping $installdir/$filename..."
43808         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43809         ;;
43810       tar.gz) echo "Untaring $installdir/$filename..."
43811         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43812         ;;
43813       tgz) echo "Untaring $installdir/$filename..."
43814         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43815         ;;
43816       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43817         ;;
43818     esac
43819   fi
43820   if test -f $installdir/$filename.unpacked; then
43821     depdir=$installdir
43822   fi
43823 
43824       fi
43825       # Source the builddeps file again, because in the previous command, the depdir
43826       # was updated to point at the current build dependency install directory.
43827       . $builddepsfile
43828       # Now extract variables from the builddeps.conf files.
43829       theroot=${builddep_cups_ROOT}
43830       thecflags=${builddep_cups_CFLAGS}
43831       thelibs=${builddep_cups_LIBS}
43832       if test "x$depdir" = x; then
43833         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43834       fi
43835       CUPS=$depdir
43836       if test "x$theroot" != x; then
43837         CUPS="$theroot"
43838       fi
43839       if test "x$thecflags" != x; then
43840         CUPS_CFLAGS="$thecflags"
43841       fi
43842       if test "x$thelibs" != x; then
43843         CUPS_LIBS="$thelibs"
43844       fi
43845       CUPS_FOUND=yes
43846 
43847     fi
43848 
43849   fi
43850 
43851     fi
43852     if test "x$CUPS_FOUND" = xno; then
43853       # Are the cups headers installed in the default /usr/include location?
43854       for ac_header in cups/cups.h cups/ppd.h
43855 do :
43856   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43857 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43858 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43859   cat >>confdefs.h <<_ACEOF
43860 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43861 _ACEOF
43862 
43863             CUPS_FOUND=yes
43864             CUPS_CFLAGS=
43865             DEFAULT_CUPS=yes
43866 
43867 
43868 fi
43869 
43870 done
43871 
43872     fi
43873     if test "x$CUPS_FOUND" = xno; then
43874       # Getting nervous now? Lets poke around for standard Solaris third-party
43875       # package installation locations.
43876       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43877 $as_echo_n "checking for cups headers... " >&6; }
43878       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43879         # An SFW package seems to be installed!
43880         CUPS_FOUND=yes
43881         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43882       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43883         # A CSW package seems to be installed!
43884         CUPS_FOUND=yes
43885         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43886       fi
43887       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43888 $as_echo "$CUPS_FOUND" >&6; }
43889     fi
43890     if test "x$CUPS_FOUND" = xno; then
43891 
43892   # Print a helpful message on how to acquire the necessary build dependency.
43893   # cups is the help tag: freetype, cups, pulse, alsa etc
43894   MISSING_DEPENDENCY=cups
43895 
43896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43897     cygwin_help $MISSING_DEPENDENCY
43898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899     msys_help $MISSING_DEPENDENCY
43900   else
43901     PKGHANDLER_COMMAND=
43902 
43903     case $PKGHANDLER in
43904       apt-get)
43905         apt_help     $MISSING_DEPENDENCY ;;
43906       yum)
43907         yum_help     $MISSING_DEPENDENCY ;;
43908       port)
43909         port_help    $MISSING_DEPENDENCY ;;
43910       pkgutil)
43911         pkgutil_help $MISSING_DEPENDENCY ;;
43912       pkgadd)
43913         pkgadd_help  $MISSING_DEPENDENCY ;;
43914     esac
43915 
43916     if test "x$PKGHANDLER_COMMAND" != x; then
43917       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43918     fi
43919   fi
43920 
43921       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43922     fi
43923   fi
43924 
43925 
43926 
43927 
43928 
43929 
43930   ###############################################################################
43931   #
43932   # The ubiquitous freetype library is used to render fonts.
43933   #
43934 
43935 # Check whether --with-freetype was given.
43936 if test "${with_freetype+set}" = set; then :
43937   withval=$with_freetype;
43938 fi
43939 
43940 
43941 # Check whether --with-freetype-include was given.
43942 if test "${with_freetype_include+set}" = set; then :
43943   withval=$with_freetype_include;
43944 fi
43945 
43946 
43947 # Check whether --with-freetype-lib was given.
43948 if test "${with_freetype_lib+set}" = set; then :
43949   withval=$with_freetype_lib;
43950 fi
43951 
43952 
43953 # Check whether --with-freetype-src was given.
43954 if test "${with_freetype_src+set}" = set; then :
43955   withval=$with_freetype_src;
43956 fi
43957 
43958   # Check whether --enable-freetype-bundling was given.
43959 if test "${enable_freetype_bundling+set}" = set; then :
43960   enableval=$enable_freetype_bundling;
43961 fi
43962 
43963 
43964   # Need to specify explicitly since it needs to be overridden on some versions of macosx
43965   FREETYPE_BASE_NAME=freetype
43966   FREETYPE_CFLAGS=
43967   FREETYPE_LIBS=
43968   FREETYPE_BUNDLE_LIB_PATH=
43969 
43970   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43971     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
43972       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43973 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43974     fi
43975     if test "x$enable_freetype_bundling" != x; then
43976       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43977 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43978     fi
43979   else
43980     # freetype is needed to build; go get it!
43981 
43982     BUNDLE_FREETYPE="$enable_freetype_bundling"
43983 
43984     if  test "x$with_freetype_src" != x; then
43985       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43986         # Try to build freetype if --with-freetype-src was given on Windows
43987 
43988   FREETYPE_SRC_PATH="$with_freetype_src"
43989   BUILD_FREETYPE=yes
43990 
43991   # Check if the freetype sources are acessible..
43992   if ! test -d $FREETYPE_SRC_PATH; then
43993     { $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
43994 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
43995     BUILD_FREETYPE=no
43996   fi
43997   # ..and contain a vc2010 project file
43998   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
43999   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44000     { $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
44001 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44002     BUILD_FREETYPE=no
44003   fi
44004   # Now check if configure found a version of 'msbuild.exe'
44005   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44006     { $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
44007 $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;}
44008     BUILD_FREETYPE=no
44009   fi
44010 
44011   # Ready to go..
44012   if test "x$BUILD_FREETYPE" = xyes; then
44013 
44014     # msbuild requires trailing slashes for output directories
44015     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44016     freetype_lib_path_unix="$freetype_lib_path"
44017     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44018 
44019   unix_path="$vcxproj_path"
44020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44021     windows_path=`$CYGPATH -m "$unix_path"`
44022     vcxproj_path="$windows_path"
44023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44024     windows_path=`cmd //c echo $unix_path`
44025     vcxproj_path="$windows_path"
44026   fi
44027 
44028 
44029   unix_path="$freetype_lib_path"
44030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44031     windows_path=`$CYGPATH -m "$unix_path"`
44032     freetype_lib_path="$windows_path"
44033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44034     windows_path=`cmd //c echo $unix_path`
44035     freetype_lib_path="$windows_path"
44036   fi
44037 
44038 
44039   unix_path="$freetype_obj_path"
44040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44041     windows_path=`$CYGPATH -m "$unix_path"`
44042     freetype_obj_path="$windows_path"
44043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44044     windows_path=`cmd //c echo $unix_path`
44045     freetype_obj_path="$windows_path"
44046   fi
44047 
44048     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44049       freetype_platform=x64
44050     else
44051       freetype_platform=win32
44052     fi
44053 
44054     # The original freetype project file is for VS 2010 (i.e. 'v100'),
44055     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44056     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44057     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44058     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44059 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44060 
44061     # First we try to build the freetype.dll
44062     $ECHO -e "@echo off\n"\
44063              "$MSBUILD $vcxproj_path "\
44064                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44065                        "/p:Configuration=\"Release Multithreaded\" "\
44066                        "/p:Platform=$freetype_platform "\
44067                        "/p:ConfigurationType=DynamicLibrary "\
44068                        "/p:TargetName=freetype "\
44069                        "/p:OutDir=\"$freetype_lib_path\" "\
44070                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44071     cmd /c freetype.bat
44072 
44073     if test -s "$freetype_lib_path_unix/freetype.dll"; then
44074       # If that succeeds we also build freetype.lib
44075       $ECHO -e "@echo off\n"\
44076                "$MSBUILD $vcxproj_path "\
44077                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44078                          "/p:Configuration=\"Release Multithreaded\" "\
44079                          "/p:Platform=$freetype_platform "\
44080                          "/p:ConfigurationType=StaticLibrary "\
44081                          "/p:TargetName=freetype "\
44082                          "/p:OutDir=\"$freetype_lib_path\" "\
44083                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44084       cmd /c freetype.bat
44085 
44086       if test -s "$freetype_lib_path_unix/freetype.lib"; then
44087         # Once we build both, lib and dll, set freetype lib and include path appropriately
44088         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44089         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44090         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44091 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44092       else
44093         BUILD_FREETYPE=no
44094       fi
44095     else
44096       BUILD_FREETYPE=no
44097     fi
44098   fi
44099 
44100         if test "x$BUILD_FREETYPE" = xyes; then
44101           # Okay, we built it. Check that it works.
44102 
44103   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44104   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44105   METHOD="--with-freetype-src"
44106 
44107   # Let's start with an optimistic view of the world :-)
44108   FOUND_FREETYPE=yes
44109 
44110   # First look for the canonical freetype main include file ft2build.h.
44111   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44112     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44113     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44114     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44115       # Fail.
44116       FOUND_FREETYPE=no
44117     fi
44118   fi
44119 
44120   if test "x$FOUND_FREETYPE" = xyes; then
44121     # Include file found, let's continue the sanity check.
44122     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44123 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44124 
44125     # Reset to default value
44126     FREETYPE_BASE_NAME=freetype
44127     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44128     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44129       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44130           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44131         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44132         # for the .6 version explicitly.
44133         FREETYPE_BASE_NAME=freetype.6
44134         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44135         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44136 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44137       else
44138         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44139 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44140         FOUND_FREETYPE=no
44141       fi
44142     else
44143       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44144         # On Windows, we will need both .lib and .dll file.
44145         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44146           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44147 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44148           FOUND_FREETYPE=no
44149         fi
44150       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44151           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44152         # Found lib in isa dir, use that instead.
44153         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44154         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44155 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44156       fi
44157     fi
44158   fi
44159 
44160   if test "x$FOUND_FREETYPE" = xyes; then
44161 
44162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44163 
44164   # Input might be given as Windows format, start by converting to
44165   # unix format.
44166   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44167   new_path=`$CYGPATH -u "$path"`
44168 
44169   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44170   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44171   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44172   # "foo.exe" is OK but "foo" is an error.
44173   #
44174   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44175   # It is also a way to make sure we got the proper file name for the real test later on.
44176   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44177   if test "x$test_shortpath" = x; then
44178     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44179 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44180     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44181   fi
44182 
44183   # Call helper function which possibly converts this using DOS-style short mode.
44184   # If so, the updated path is stored in $new_path.
44185 
44186   input_path="$new_path"
44187   # Check if we need to convert this using DOS-style short mode. If the path
44188   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44189   # take no chances and rewrite it.
44190   # Note: m4 eats our [], so we need to use [ and ] instead.
44191   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44192   if test "x$has_forbidden_chars" != x; then
44193     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44194     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44195     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44196     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44197       # Going to short mode and back again did indeed matter. Since short mode is
44198       # case insensitive, let's make it lowercase to improve readability.
44199       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44200       # Now convert it back to Unix-stile (cygpath)
44201       input_path=`$CYGPATH -u "$shortmode_path"`
44202       new_path="$input_path"
44203     fi
44204   fi
44205 
44206   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44207   if test "x$test_cygdrive_prefix" = x; then
44208     # As a simple fix, exclude /usr/bin since it's not a real path.
44209     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44210       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44211       # a path prefixed by /cygdrive for fixpath to work.
44212       new_path="$CYGWIN_ROOT_PATH$input_path"
44213     fi
44214   fi
44215 
44216 
44217   if test "x$path" != "x$new_path"; then
44218     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44220 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44221   fi
44222 
44223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44224 
44225   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44226   has_colon=`$ECHO $path | $GREP ^.:`
44227   new_path="$path"
44228   if test "x$has_colon" = x; then
44229     # Not in mixed or Windows style, start by that.
44230     new_path=`cmd //c echo $path`
44231   fi
44232 
44233 
44234   input_path="$new_path"
44235   # Check if we need to convert this using DOS-style short mode. If the path
44236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44237   # take no chances and rewrite it.
44238   # Note: m4 eats our [], so we need to use [ and ] instead.
44239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44240   if test "x$has_forbidden_chars" != x; then
44241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44242     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44243   fi
44244 
44245 
44246   windows_path="$new_path"
44247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44248     unix_path=`$CYGPATH -u "$windows_path"`
44249     new_path="$unix_path"
44250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44252     new_path="$unix_path"
44253   fi
44254 
44255   if test "x$path" != "x$new_path"; then
44256     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44258 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44259   fi
44260 
44261   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44262   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44263 
44264   else
44265     # We're on a unix platform. Hooray! :)
44266     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44267     has_space=`$ECHO "$path" | $GREP " "`
44268     if test "x$has_space" != x; then
44269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44270 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44271       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44272     fi
44273 
44274     # Use eval to expand a potential ~
44275     eval path="$path"
44276     if test ! -f "$path" && test ! -d "$path"; then
44277       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44278     fi
44279 
44280     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44281   fi
44282 
44283 
44284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44285 
44286   # Input might be given as Windows format, start by converting to
44287   # unix format.
44288   path="$POTENTIAL_FREETYPE_LIB_PATH"
44289   new_path=`$CYGPATH -u "$path"`
44290 
44291   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44292   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44293   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44294   # "foo.exe" is OK but "foo" is an error.
44295   #
44296   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44297   # It is also a way to make sure we got the proper file name for the real test later on.
44298   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44299   if test "x$test_shortpath" = x; then
44300     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44301 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44302     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44303   fi
44304 
44305   # Call helper function which possibly converts this using DOS-style short mode.
44306   # If so, the updated path is stored in $new_path.
44307 
44308   input_path="$new_path"
44309   # Check if we need to convert this using DOS-style short mode. If the path
44310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44311   # take no chances and rewrite it.
44312   # Note: m4 eats our [], so we need to use [ and ] instead.
44313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44314   if test "x$has_forbidden_chars" != x; then
44315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44316     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44317     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44318     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44319       # Going to short mode and back again did indeed matter. Since short mode is
44320       # case insensitive, let's make it lowercase to improve readability.
44321       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44322       # Now convert it back to Unix-stile (cygpath)
44323       input_path=`$CYGPATH -u "$shortmode_path"`
44324       new_path="$input_path"
44325     fi
44326   fi
44327 
44328   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44329   if test "x$test_cygdrive_prefix" = x; then
44330     # As a simple fix, exclude /usr/bin since it's not a real path.
44331     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44332       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44333       # a path prefixed by /cygdrive for fixpath to work.
44334       new_path="$CYGWIN_ROOT_PATH$input_path"
44335     fi
44336   fi
44337 
44338 
44339   if test "x$path" != "x$new_path"; then
44340     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44342 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44343   fi
44344 
44345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44346 
44347   path="$POTENTIAL_FREETYPE_LIB_PATH"
44348   has_colon=`$ECHO $path | $GREP ^.:`
44349   new_path="$path"
44350   if test "x$has_colon" = x; then
44351     # Not in mixed or Windows style, start by that.
44352     new_path=`cmd //c echo $path`
44353   fi
44354 
44355 
44356   input_path="$new_path"
44357   # Check if we need to convert this using DOS-style short mode. If the path
44358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44359   # take no chances and rewrite it.
44360   # Note: m4 eats our [], so we need to use [ and ] instead.
44361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44362   if test "x$has_forbidden_chars" != x; then
44363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44364     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44365   fi
44366 
44367 
44368   windows_path="$new_path"
44369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44370     unix_path=`$CYGPATH -u "$windows_path"`
44371     new_path="$unix_path"
44372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44374     new_path="$unix_path"
44375   fi
44376 
44377   if test "x$path" != "x$new_path"; then
44378     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44380 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44381   fi
44382 
44383   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44384   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44385 
44386   else
44387     # We're on a unix platform. Hooray! :)
44388     path="$POTENTIAL_FREETYPE_LIB_PATH"
44389     has_space=`$ECHO "$path" | $GREP " "`
44390     if test "x$has_space" != x; then
44391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44392 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44393       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44394     fi
44395 
44396     # Use eval to expand a potential ~
44397     eval path="$path"
44398     if test ! -f "$path" && test ! -d "$path"; then
44399       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44400     fi
44401 
44402     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44403   fi
44404 
44405 
44406     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44408 $as_echo_n "checking for freetype includes... " >&6; }
44409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44410 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44411     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44413 $as_echo_n "checking for freetype libraries... " >&6; }
44414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44415 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44416   fi
44417 
44418           if test "x$FOUND_FREETYPE" != xyes; then
44419             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44420           fi
44421         else
44422           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44423 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44424           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44425         fi
44426       else
44427         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44428 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44429       fi
44430     fi
44431 
44432     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44433       # User has specified settings
44434 
44435       if test "x$BUNDLE_FREETYPE" = x; then
44436         # If not specified, default is to bundle freetype
44437         BUNDLE_FREETYPE=yes
44438       fi
44439 
44440       if test "x$with_freetype" != x; then
44441         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44442         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44443       fi
44444 
44445       # Allow --with-freetype-lib and --with-freetype-include to override
44446       if test "x$with_freetype_include" != x; then
44447         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44448       fi
44449       if test "x$with_freetype_lib" != x; then
44450         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44451       fi
44452 
44453       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44454         # Okay, we got it. Check that it works.
44455 
44456   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44457   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44458   METHOD="--with-freetype"
44459 
44460   # Let's start with an optimistic view of the world :-)
44461   FOUND_FREETYPE=yes
44462 
44463   # First look for the canonical freetype main include file ft2build.h.
44464   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44465     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44466     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44467     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44468       # Fail.
44469       FOUND_FREETYPE=no
44470     fi
44471   fi
44472 
44473   if test "x$FOUND_FREETYPE" = xyes; then
44474     # Include file found, let's continue the sanity check.
44475     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44476 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44477 
44478     # Reset to default value
44479     FREETYPE_BASE_NAME=freetype
44480     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44481     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44482       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44483           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44484         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44485         # for the .6 version explicitly.
44486         FREETYPE_BASE_NAME=freetype.6
44487         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44488         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44489 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44490       else
44491         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44492 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44493         FOUND_FREETYPE=no
44494       fi
44495     else
44496       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44497         # On Windows, we will need both .lib and .dll file.
44498         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44499           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44500 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44501           FOUND_FREETYPE=no
44502         fi
44503       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44504           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44505         # Found lib in isa dir, use that instead.
44506         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44507         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44508 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44509       fi
44510     fi
44511   fi
44512 
44513   if test "x$FOUND_FREETYPE" = xyes; then
44514 
44515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44516 
44517   # Input might be given as Windows format, start by converting to
44518   # unix format.
44519   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44520   new_path=`$CYGPATH -u "$path"`
44521 
44522   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44523   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44524   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44525   # "foo.exe" is OK but "foo" is an error.
44526   #
44527   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44528   # It is also a way to make sure we got the proper file name for the real test later on.
44529   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44530   if test "x$test_shortpath" = x; then
44531     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44532 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44533     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44534   fi
44535 
44536   # Call helper function which possibly converts this using DOS-style short mode.
44537   # If so, the updated path is stored in $new_path.
44538 
44539   input_path="$new_path"
44540   # Check if we need to convert this using DOS-style short mode. If the path
44541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44542   # take no chances and rewrite it.
44543   # Note: m4 eats our [], so we need to use [ and ] instead.
44544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44545   if test "x$has_forbidden_chars" != x; then
44546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44547     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44548     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44549     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44550       # Going to short mode and back again did indeed matter. Since short mode is
44551       # case insensitive, let's make it lowercase to improve readability.
44552       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44553       # Now convert it back to Unix-stile (cygpath)
44554       input_path=`$CYGPATH -u "$shortmode_path"`
44555       new_path="$input_path"
44556     fi
44557   fi
44558 
44559   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44560   if test "x$test_cygdrive_prefix" = x; then
44561     # As a simple fix, exclude /usr/bin since it's not a real path.
44562     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44563       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44564       # a path prefixed by /cygdrive for fixpath to work.
44565       new_path="$CYGWIN_ROOT_PATH$input_path"
44566     fi
44567   fi
44568 
44569 
44570   if test "x$path" != "x$new_path"; then
44571     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44573 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44574   fi
44575 
44576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44577 
44578   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44579   has_colon=`$ECHO $path | $GREP ^.:`
44580   new_path="$path"
44581   if test "x$has_colon" = x; then
44582     # Not in mixed or Windows style, start by that.
44583     new_path=`cmd //c echo $path`
44584   fi
44585 
44586 
44587   input_path="$new_path"
44588   # Check if we need to convert this using DOS-style short mode. If the path
44589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44590   # take no chances and rewrite it.
44591   # Note: m4 eats our [], so we need to use [ and ] instead.
44592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44593   if test "x$has_forbidden_chars" != x; then
44594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44595     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44596   fi
44597 
44598 
44599   windows_path="$new_path"
44600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44601     unix_path=`$CYGPATH -u "$windows_path"`
44602     new_path="$unix_path"
44603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44605     new_path="$unix_path"
44606   fi
44607 
44608   if test "x$path" != "x$new_path"; then
44609     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44610     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44611 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44612   fi
44613 
44614   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44615   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44616 
44617   else
44618     # We're on a unix platform. Hooray! :)
44619     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44620     has_space=`$ECHO "$path" | $GREP " "`
44621     if test "x$has_space" != x; then
44622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44623 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44624       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44625     fi
44626 
44627     # Use eval to expand a potential ~
44628     eval path="$path"
44629     if test ! -f "$path" && test ! -d "$path"; then
44630       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44631     fi
44632 
44633     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44634   fi
44635 
44636 
44637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44638 
44639   # Input might be given as Windows format, start by converting to
44640   # unix format.
44641   path="$POTENTIAL_FREETYPE_LIB_PATH"
44642   new_path=`$CYGPATH -u "$path"`
44643 
44644   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44645   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44646   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44647   # "foo.exe" is OK but "foo" is an error.
44648   #
44649   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44650   # It is also a way to make sure we got the proper file name for the real test later on.
44651   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44652   if test "x$test_shortpath" = x; then
44653     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44654 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44655     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44656   fi
44657 
44658   # Call helper function which possibly converts this using DOS-style short mode.
44659   # If so, the updated path is stored in $new_path.
44660 
44661   input_path="$new_path"
44662   # Check if we need to convert this using DOS-style short mode. If the path
44663   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44664   # take no chances and rewrite it.
44665   # Note: m4 eats our [], so we need to use [ and ] instead.
44666   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44667   if test "x$has_forbidden_chars" != x; then
44668     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44669     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44670     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44671     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44672       # Going to short mode and back again did indeed matter. Since short mode is
44673       # case insensitive, let's make it lowercase to improve readability.
44674       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44675       # Now convert it back to Unix-stile (cygpath)
44676       input_path=`$CYGPATH -u "$shortmode_path"`
44677       new_path="$input_path"
44678     fi
44679   fi
44680 
44681   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44682   if test "x$test_cygdrive_prefix" = x; then
44683     # As a simple fix, exclude /usr/bin since it's not a real path.
44684     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44685       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44686       # a path prefixed by /cygdrive for fixpath to work.
44687       new_path="$CYGWIN_ROOT_PATH$input_path"
44688     fi
44689   fi
44690 
44691 
44692   if test "x$path" != "x$new_path"; then
44693     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44695 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44696   fi
44697 
44698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44699 
44700   path="$POTENTIAL_FREETYPE_LIB_PATH"
44701   has_colon=`$ECHO $path | $GREP ^.:`
44702   new_path="$path"
44703   if test "x$has_colon" = x; then
44704     # Not in mixed or Windows style, start by that.
44705     new_path=`cmd //c echo $path`
44706   fi
44707 
44708 
44709   input_path="$new_path"
44710   # Check if we need to convert this using DOS-style short mode. If the path
44711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44712   # take no chances and rewrite it.
44713   # Note: m4 eats our [], so we need to use [ and ] instead.
44714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44715   if test "x$has_forbidden_chars" != x; then
44716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44717     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44718   fi
44719 
44720 
44721   windows_path="$new_path"
44722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44723     unix_path=`$CYGPATH -u "$windows_path"`
44724     new_path="$unix_path"
44725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44727     new_path="$unix_path"
44728   fi
44729 
44730   if test "x$path" != "x$new_path"; then
44731     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44733 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44734   fi
44735 
44736   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44737   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44738 
44739   else
44740     # We're on a unix platform. Hooray! :)
44741     path="$POTENTIAL_FREETYPE_LIB_PATH"
44742     has_space=`$ECHO "$path" | $GREP " "`
44743     if test "x$has_space" != x; then
44744       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44745 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44746       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44747     fi
44748 
44749     # Use eval to expand a potential ~
44750     eval path="$path"
44751     if test ! -f "$path" && test ! -d "$path"; then
44752       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44753     fi
44754 
44755     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44756   fi
44757 
44758 
44759     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44761 $as_echo_n "checking for freetype includes... " >&6; }
44762     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44763 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44764     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44765     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44766 $as_echo_n "checking for freetype libraries... " >&6; }
44767     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44768 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44769   fi
44770 
44771         if test "x$FOUND_FREETYPE" != xyes; then
44772           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44773         fi
44774       else
44775         # User specified only one of lib or include. This is an error.
44776         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44777           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44778 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44779           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44780         else
44781           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44782 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44783           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44784         fi
44785       fi
44786     else
44787       # User did not specify settings, but we need freetype. Try to locate it.
44788 
44789       if test "x$BUNDLE_FREETYPE" = x; then
44790         # If not specified, default is to bundle freetype only on windows
44791         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44792           BUNDLE_FREETYPE=yes
44793         else
44794           BUNDLE_FREETYPE=no
44795         fi
44796       fi
44797 
44798       if test "x$FOUND_FREETYPE" != xyes; then
44799         # Check builddeps
44800 
44801 
44802   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44803     # Source the builddeps file again, to make sure it uses the latest variables!
44804     . $builddepsfile
44805     # Look for a target and build machine specific resource!
44806     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44807     if test "x$resource" = x; then
44808       # Ok, lets instead look for a target specific resource
44809       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44810     fi
44811     if test "x$resource" = x; then
44812       # Ok, lets instead look for a build specific resource
44813       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44814     fi
44815     if test "x$resource" = x; then
44816       # Ok, lets instead look for a generic resource
44817       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44818       resource=${builddep_freetype2}
44819     fi
44820     if test "x$resource" != x; then
44821       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44822 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44823       # If the resource in the builddeps.conf file is an existing directory,
44824       # for example /java/linux/cups
44825       if test -d ${resource}; then
44826         depdir=${resource}
44827       else
44828 
44829   # freetype2 is for example mymodule
44830   # $resource is for example libs/general/libmymod_1_2_3.zip
44831   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44832   # $with_builddeps_dir is for example /localhome/builddeps
44833   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44834   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44835   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44836   filename=`basename $resource`
44837   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44838   filebase=${filename%%.*}
44839   extension=${filename#*.}
44840   installdir=$with_builddeps_dir/$filebase
44841   if test ! -f $installdir/$filename.unpacked; then
44842     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44843 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44844     if test ! -d $installdir; then
44845       mkdir -p $installdir
44846     fi
44847     if test ! -d $installdir; then
44848       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44849     fi
44850     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44851     touch $tmpfile
44852     if test ! -f $tmpfile; then
44853       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44854     fi
44855 
44856   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44857   # $tmpfile is the local file name for the downloaded file.
44858   VALID_TOOL=no
44859   if test "x$BDEPS_FTP" = xwget; then
44860     VALID_TOOL=yes
44861     wget -O $tmpfile $with_builddeps_server/$resource
44862   fi
44863   if test "x$BDEPS_FTP" = xlftp; then
44864     VALID_TOOL=yes
44865     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44866   fi
44867   if test "x$BDEPS_FTP" = xftp; then
44868     VALID_TOOL=yes
44869     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44870     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44871     FTPUSERPWD=${FTPSERVER%%@*}
44872     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44873       FTPUSER=${userpwd%%:*}
44874       FTPPWD=${userpwd#*@}
44875       FTPSERVER=${FTPSERVER#*@}
44876     else
44877       FTPUSER=ftp
44878       FTPPWD=ftp
44879     fi
44880     # the "pass" command does not work on some
44881     # ftp clients (read ftp.exe) but if it works,
44882     # passive mode is better!
44883     ( \
44884         echo "user $FTPUSER $FTPPWD"        ; \
44885         echo "pass"                         ; \
44886         echo "bin"                          ; \
44887         echo "get $FTPPATH $tmpfile"              ; \
44888     ) | ftp -in $FTPSERVER
44889   fi
44890   if test "x$VALID_TOOL" != xyes; then
44891     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44892   fi
44893 
44894     mv $tmpfile $installdir/$filename
44895     if test ! -s $installdir/$filename; then
44896       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44897     fi
44898     case "$extension" in
44899       zip)  echo "Unzipping $installdir/$filename..."
44900         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44901         ;;
44902       tar.gz) echo "Untaring $installdir/$filename..."
44903         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44904         ;;
44905       tgz) echo "Untaring $installdir/$filename..."
44906         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44907         ;;
44908       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44909         ;;
44910     esac
44911   fi
44912   if test -f $installdir/$filename.unpacked; then
44913     depdir=$installdir
44914   fi
44915 
44916       fi
44917       # Source the builddeps file again, because in the previous command, the depdir
44918       # was updated to point at the current build dependency install directory.
44919       . $builddepsfile
44920       # Now extract variables from the builddeps.conf files.
44921       theroot=${builddep_freetype2_ROOT}
44922       thecflags=${builddep_freetype2_CFLAGS}
44923       thelibs=${builddep_freetype2_LIBS}
44924       if test "x$depdir" = x; then
44925         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44926       fi
44927       FREETYPE=$depdir
44928       if test "x$theroot" != x; then
44929         FREETYPE="$theroot"
44930       fi
44931       if test "x$thecflags" != x; then
44932         FREETYPE_CFLAGS="$thecflags"
44933       fi
44934       if test "x$thelibs" != x; then
44935         FREETYPE_LIBS="$thelibs"
44936       fi
44937       FOUND_FREETYPE=yes
44938       else FOUND_FREETYPE=no
44939 
44940     fi
44941     else FOUND_FREETYPE=no
44942 
44943   fi
44944 
44945         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44946         if test "x$FOUND_FREETYPE" = xyes; then
44947           if test "x$BUNDLE_FREETYPE" = xyes; then
44948             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44949 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44950             FOUND_FREETYPE=no
44951           else
44952             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44953 $as_echo_n "checking for freetype... " >&6; }
44954             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44955 $as_echo "yes (using builddeps)" >&6; }
44956           fi
44957         fi
44958       fi
44959 
44960       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44961       if test "x$SYSROOT" = x; then
44962         if test "x$FOUND_FREETYPE" != xyes; then
44963           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44964           if test "x$PKG_CONFIG" != x; then
44965 
44966 pkg_failed=no
44967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44968 $as_echo_n "checking for FREETYPE... " >&6; }
44969 
44970 if test -n "$FREETYPE_CFLAGS"; then
44971     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44972  elif test -n "$PKG_CONFIG"; then
44973     if test -n "$PKG_CONFIG" && \
44974     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44975   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44976   ac_status=$?
44977   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44978   test $ac_status = 0; }; then
44979   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44980 else
44981   pkg_failed=yes
44982 fi
44983  else
44984     pkg_failed=untried
44985 fi
44986 if test -n "$FREETYPE_LIBS"; then
44987     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44988  elif test -n "$PKG_CONFIG"; then
44989     if test -n "$PKG_CONFIG" && \
44990     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44991   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44992   ac_status=$?
44993   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44994   test $ac_status = 0; }; then
44995   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44996 else
44997   pkg_failed=yes
44998 fi
44999  else
45000     pkg_failed=untried
45001 fi
45002 
45003 
45004 
45005 if test $pkg_failed = yes; then
45006 
45007 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45008         _pkg_short_errors_supported=yes
45009 else
45010         _pkg_short_errors_supported=no
45011 fi
45012         if test $_pkg_short_errors_supported = yes; then
45013                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45014         else
45015                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45016         fi
45017         # Put the nasty error message in config.log where it belongs
45018         echo "$FREETYPE_PKG_ERRORS" >&5
45019 
45020         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45021 $as_echo "no" >&6; }
45022                 FOUND_FREETYPE=no
45023 elif test $pkg_failed = untried; then
45024         FOUND_FREETYPE=no
45025 else
45026         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45027         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45028         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45029 $as_echo "yes" >&6; }
45030         FOUND_FREETYPE=yes
45031 fi
45032             if test "x$FOUND_FREETYPE" = xyes; then
45033               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45034               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45035               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45036               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45037                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45038               fi
45039               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45040               if test "x$BUNDLE_FREETYPE" = xyes; then
45041                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45042 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45043                 FOUND_FREETYPE=no
45044               else
45045                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45046 $as_echo_n "checking for freetype... " >&6; }
45047                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45048 $as_echo "yes (using pkg-config)" >&6; }
45049               fi
45050             fi
45051           fi
45052         fi
45053       fi
45054 
45055       if test "x$FOUND_FREETYPE" != xyes; then
45056         # Check in well-known locations
45057         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45058           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45059 
45060   windows_path="$FREETYPE_BASE_DIR"
45061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45062     unix_path=`$CYGPATH -u "$windows_path"`
45063     FREETYPE_BASE_DIR="$unix_path"
45064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45066     FREETYPE_BASE_DIR="$unix_path"
45067   fi
45068 
45069 
45070   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45071   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45072   METHOD="well-known location"
45073 
45074   # Let's start with an optimistic view of the world :-)
45075   FOUND_FREETYPE=yes
45076 
45077   # First look for the canonical freetype main include file ft2build.h.
45078   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45079     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45080     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45081     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45082       # Fail.
45083       FOUND_FREETYPE=no
45084     fi
45085   fi
45086 
45087   if test "x$FOUND_FREETYPE" = xyes; then
45088     # Include file found, let's continue the sanity check.
45089     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45090 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45091 
45092     # Reset to default value
45093     FREETYPE_BASE_NAME=freetype
45094     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45095     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45096       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45097           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45098         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45099         # for the .6 version explicitly.
45100         FREETYPE_BASE_NAME=freetype.6
45101         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45102         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45103 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45104       else
45105         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45106 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45107         FOUND_FREETYPE=no
45108       fi
45109     else
45110       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45111         # On Windows, we will need both .lib and .dll file.
45112         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45113           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45114 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45115           FOUND_FREETYPE=no
45116         fi
45117       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45118           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45119         # Found lib in isa dir, use that instead.
45120         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45121         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45122 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45123       fi
45124     fi
45125   fi
45126 
45127   if test "x$FOUND_FREETYPE" = xyes; then
45128 
45129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45130 
45131   # Input might be given as Windows format, start by converting to
45132   # unix format.
45133   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45134   new_path=`$CYGPATH -u "$path"`
45135 
45136   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45137   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45138   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45139   # "foo.exe" is OK but "foo" is an error.
45140   #
45141   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45142   # It is also a way to make sure we got the proper file name for the real test later on.
45143   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45144   if test "x$test_shortpath" = x; then
45145     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45146 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45147     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45148   fi
45149 
45150   # Call helper function which possibly converts this using DOS-style short mode.
45151   # If so, the updated path is stored in $new_path.
45152 
45153   input_path="$new_path"
45154   # Check if we need to convert this using DOS-style short mode. If the path
45155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45156   # take no chances and rewrite it.
45157   # Note: m4 eats our [], so we need to use [ and ] instead.
45158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45159   if test "x$has_forbidden_chars" != x; then
45160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45161     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45162     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45163     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45164       # Going to short mode and back again did indeed matter. Since short mode is
45165       # case insensitive, let's make it lowercase to improve readability.
45166       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45167       # Now convert it back to Unix-stile (cygpath)
45168       input_path=`$CYGPATH -u "$shortmode_path"`
45169       new_path="$input_path"
45170     fi
45171   fi
45172 
45173   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45174   if test "x$test_cygdrive_prefix" = x; then
45175     # As a simple fix, exclude /usr/bin since it's not a real path.
45176     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45177       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45178       # a path prefixed by /cygdrive for fixpath to work.
45179       new_path="$CYGWIN_ROOT_PATH$input_path"
45180     fi
45181   fi
45182 
45183 
45184   if test "x$path" != "x$new_path"; then
45185     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45186     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45187 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45188   fi
45189 
45190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45191 
45192   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45193   has_colon=`$ECHO $path | $GREP ^.:`
45194   new_path="$path"
45195   if test "x$has_colon" = x; then
45196     # Not in mixed or Windows style, start by that.
45197     new_path=`cmd //c echo $path`
45198   fi
45199 
45200 
45201   input_path="$new_path"
45202   # Check if we need to convert this using DOS-style short mode. If the path
45203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45204   # take no chances and rewrite it.
45205   # Note: m4 eats our [], so we need to use [ and ] instead.
45206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45207   if test "x$has_forbidden_chars" != x; then
45208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45209     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45210   fi
45211 
45212 
45213   windows_path="$new_path"
45214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45215     unix_path=`$CYGPATH -u "$windows_path"`
45216     new_path="$unix_path"
45217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45218     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45219     new_path="$unix_path"
45220   fi
45221 
45222   if test "x$path" != "x$new_path"; then
45223     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45224     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45225 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45226   fi
45227 
45228   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45229   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45230 
45231   else
45232     # We're on a unix platform. Hooray! :)
45233     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45234     has_space=`$ECHO "$path" | $GREP " "`
45235     if test "x$has_space" != x; then
45236       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45237 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45238       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45239     fi
45240 
45241     # Use eval to expand a potential ~
45242     eval path="$path"
45243     if test ! -f "$path" && test ! -d "$path"; then
45244       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45245     fi
45246 
45247     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45248   fi
45249 
45250 
45251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45252 
45253   # Input might be given as Windows format, start by converting to
45254   # unix format.
45255   path="$POTENTIAL_FREETYPE_LIB_PATH"
45256   new_path=`$CYGPATH -u "$path"`
45257 
45258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45261   # "foo.exe" is OK but "foo" is an error.
45262   #
45263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45264   # It is also a way to make sure we got the proper file name for the real test later on.
45265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45266   if test "x$test_shortpath" = x; then
45267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45268 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45269     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45270   fi
45271 
45272   # Call helper function which possibly converts this using DOS-style short mode.
45273   # If so, the updated path is stored in $new_path.
45274 
45275   input_path="$new_path"
45276   # Check if we need to convert this using DOS-style short mode. If the path
45277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45278   # take no chances and rewrite it.
45279   # Note: m4 eats our [], so we need to use [ and ] instead.
45280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45281   if test "x$has_forbidden_chars" != x; then
45282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45286       # Going to short mode and back again did indeed matter. Since short mode is
45287       # case insensitive, let's make it lowercase to improve readability.
45288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45289       # Now convert it back to Unix-stile (cygpath)
45290       input_path=`$CYGPATH -u "$shortmode_path"`
45291       new_path="$input_path"
45292     fi
45293   fi
45294 
45295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45296   if test "x$test_cygdrive_prefix" = x; then
45297     # As a simple fix, exclude /usr/bin since it's not a real path.
45298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45300       # a path prefixed by /cygdrive for fixpath to work.
45301       new_path="$CYGWIN_ROOT_PATH$input_path"
45302     fi
45303   fi
45304 
45305 
45306   if test "x$path" != "x$new_path"; then
45307     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45309 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45310   fi
45311 
45312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45313 
45314   path="$POTENTIAL_FREETYPE_LIB_PATH"
45315   has_colon=`$ECHO $path | $GREP ^.:`
45316   new_path="$path"
45317   if test "x$has_colon" = x; then
45318     # Not in mixed or Windows style, start by that.
45319     new_path=`cmd //c echo $path`
45320   fi
45321 
45322 
45323   input_path="$new_path"
45324   # Check if we need to convert this using DOS-style short mode. If the path
45325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45326   # take no chances and rewrite it.
45327   # Note: m4 eats our [], so we need to use [ and ] instead.
45328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45329   if test "x$has_forbidden_chars" != x; then
45330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45332   fi
45333 
45334 
45335   windows_path="$new_path"
45336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337     unix_path=`$CYGPATH -u "$windows_path"`
45338     new_path="$unix_path"
45339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45341     new_path="$unix_path"
45342   fi
45343 
45344   if test "x$path" != "x$new_path"; then
45345     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45347 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45348   fi
45349 
45350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45352 
45353   else
45354     # We're on a unix platform. Hooray! :)
45355     path="$POTENTIAL_FREETYPE_LIB_PATH"
45356     has_space=`$ECHO "$path" | $GREP " "`
45357     if test "x$has_space" != x; then
45358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45359 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45360       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45361     fi
45362 
45363     # Use eval to expand a potential ~
45364     eval path="$path"
45365     if test ! -f "$path" && test ! -d "$path"; then
45366       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45367     fi
45368 
45369     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45370   fi
45371 
45372 
45373     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45374     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45375 $as_echo_n "checking for freetype includes... " >&6; }
45376     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45377 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45378     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45380 $as_echo_n "checking for freetype libraries... " >&6; }
45381     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45382 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45383   fi
45384 
45385           if test "x$FOUND_FREETYPE" != xyes; then
45386             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45387 
45388   windows_path="$FREETYPE_BASE_DIR"
45389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45390     unix_path=`$CYGPATH -u "$windows_path"`
45391     FREETYPE_BASE_DIR="$unix_path"
45392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45394     FREETYPE_BASE_DIR="$unix_path"
45395   fi
45396 
45397 
45398   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45399   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45400   METHOD="well-known location"
45401 
45402   # Let's start with an optimistic view of the world :-)
45403   FOUND_FREETYPE=yes
45404 
45405   # First look for the canonical freetype main include file ft2build.h.
45406   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45407     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45408     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45409     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45410       # Fail.
45411       FOUND_FREETYPE=no
45412     fi
45413   fi
45414 
45415   if test "x$FOUND_FREETYPE" = xyes; then
45416     # Include file found, let's continue the sanity check.
45417     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45418 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45419 
45420     # Reset to default value
45421     FREETYPE_BASE_NAME=freetype
45422     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45423     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45424       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45425           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45426         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45427         # for the .6 version explicitly.
45428         FREETYPE_BASE_NAME=freetype.6
45429         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45430         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45431 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45432       else
45433         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45434 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45435         FOUND_FREETYPE=no
45436       fi
45437     else
45438       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45439         # On Windows, we will need both .lib and .dll file.
45440         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45441           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45442 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45443           FOUND_FREETYPE=no
45444         fi
45445       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45446           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45447         # Found lib in isa dir, use that instead.
45448         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45449         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45450 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45451       fi
45452     fi
45453   fi
45454 
45455   if test "x$FOUND_FREETYPE" = xyes; then
45456 
45457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45458 
45459   # Input might be given as Windows format, start by converting to
45460   # unix format.
45461   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45462   new_path=`$CYGPATH -u "$path"`
45463 
45464   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45465   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45466   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45467   # "foo.exe" is OK but "foo" is an error.
45468   #
45469   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45470   # It is also a way to make sure we got the proper file name for the real test later on.
45471   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45472   if test "x$test_shortpath" = x; then
45473     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45474 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45475     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45476   fi
45477 
45478   # Call helper function which possibly converts this using DOS-style short mode.
45479   # If so, the updated path is stored in $new_path.
45480 
45481   input_path="$new_path"
45482   # Check if we need to convert this using DOS-style short mode. If the path
45483   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45484   # take no chances and rewrite it.
45485   # Note: m4 eats our [], so we need to use [ and ] instead.
45486   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45487   if test "x$has_forbidden_chars" != x; then
45488     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45489     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45490     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45491     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45492       # Going to short mode and back again did indeed matter. Since short mode is
45493       # case insensitive, let's make it lowercase to improve readability.
45494       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45495       # Now convert it back to Unix-stile (cygpath)
45496       input_path=`$CYGPATH -u "$shortmode_path"`
45497       new_path="$input_path"
45498     fi
45499   fi
45500 
45501   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45502   if test "x$test_cygdrive_prefix" = x; then
45503     # As a simple fix, exclude /usr/bin since it's not a real path.
45504     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45505       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45506       # a path prefixed by /cygdrive for fixpath to work.
45507       new_path="$CYGWIN_ROOT_PATH$input_path"
45508     fi
45509   fi
45510 
45511 
45512   if test "x$path" != "x$new_path"; then
45513     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45514     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45515 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45516   fi
45517 
45518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45519 
45520   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45521   has_colon=`$ECHO $path | $GREP ^.:`
45522   new_path="$path"
45523   if test "x$has_colon" = x; then
45524     # Not in mixed or Windows style, start by that.
45525     new_path=`cmd //c echo $path`
45526   fi
45527 
45528 
45529   input_path="$new_path"
45530   # Check if we need to convert this using DOS-style short mode. If the path
45531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45532   # take no chances and rewrite it.
45533   # Note: m4 eats our [], so we need to use [ and ] instead.
45534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45535   if test "x$has_forbidden_chars" != x; then
45536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45537     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45538   fi
45539 
45540 
45541   windows_path="$new_path"
45542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45543     unix_path=`$CYGPATH -u "$windows_path"`
45544     new_path="$unix_path"
45545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45546     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45547     new_path="$unix_path"
45548   fi
45549 
45550   if test "x$path" != "x$new_path"; then
45551     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45552     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45553 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45554   fi
45555 
45556   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45557   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45558 
45559   else
45560     # We're on a unix platform. Hooray! :)
45561     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45562     has_space=`$ECHO "$path" | $GREP " "`
45563     if test "x$has_space" != x; then
45564       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45565 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45566       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45567     fi
45568 
45569     # Use eval to expand a potential ~
45570     eval path="$path"
45571     if test ! -f "$path" && test ! -d "$path"; then
45572       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45573     fi
45574 
45575     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45576   fi
45577 
45578 
45579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45580 
45581   # Input might be given as Windows format, start by converting to
45582   # unix format.
45583   path="$POTENTIAL_FREETYPE_LIB_PATH"
45584   new_path=`$CYGPATH -u "$path"`
45585 
45586   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45587   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45588   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45589   # "foo.exe" is OK but "foo" is an error.
45590   #
45591   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45592   # It is also a way to make sure we got the proper file name for the real test later on.
45593   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45594   if test "x$test_shortpath" = x; then
45595     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45596 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45597     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45598   fi
45599 
45600   # Call helper function which possibly converts this using DOS-style short mode.
45601   # If so, the updated path is stored in $new_path.
45602 
45603   input_path="$new_path"
45604   # Check if we need to convert this using DOS-style short mode. If the path
45605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45606   # take no chances and rewrite it.
45607   # Note: m4 eats our [], so we need to use [ and ] instead.
45608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45609   if test "x$has_forbidden_chars" != x; then
45610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45611     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45612     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45613     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45614       # Going to short mode and back again did indeed matter. Since short mode is
45615       # case insensitive, let's make it lowercase to improve readability.
45616       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45617       # Now convert it back to Unix-stile (cygpath)
45618       input_path=`$CYGPATH -u "$shortmode_path"`
45619       new_path="$input_path"
45620     fi
45621   fi
45622 
45623   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45624   if test "x$test_cygdrive_prefix" = x; then
45625     # As a simple fix, exclude /usr/bin since it's not a real path.
45626     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45627       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45628       # a path prefixed by /cygdrive for fixpath to work.
45629       new_path="$CYGWIN_ROOT_PATH$input_path"
45630     fi
45631   fi
45632 
45633 
45634   if test "x$path" != "x$new_path"; then
45635     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45636     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45637 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45638   fi
45639 
45640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45641 
45642   path="$POTENTIAL_FREETYPE_LIB_PATH"
45643   has_colon=`$ECHO $path | $GREP ^.:`
45644   new_path="$path"
45645   if test "x$has_colon" = x; then
45646     # Not in mixed or Windows style, start by that.
45647     new_path=`cmd //c echo $path`
45648   fi
45649 
45650 
45651   input_path="$new_path"
45652   # Check if we need to convert this using DOS-style short mode. If the path
45653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45654   # take no chances and rewrite it.
45655   # Note: m4 eats our [], so we need to use [ and ] instead.
45656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45657   if test "x$has_forbidden_chars" != x; then
45658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45659     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45660   fi
45661 
45662 
45663   windows_path="$new_path"
45664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45665     unix_path=`$CYGPATH -u "$windows_path"`
45666     new_path="$unix_path"
45667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45669     new_path="$unix_path"
45670   fi
45671 
45672   if test "x$path" != "x$new_path"; then
45673     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45674     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45675 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45676   fi
45677 
45678   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45679   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45680 
45681   else
45682     # We're on a unix platform. Hooray! :)
45683     path="$POTENTIAL_FREETYPE_LIB_PATH"
45684     has_space=`$ECHO "$path" | $GREP " "`
45685     if test "x$has_space" != x; then
45686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45687 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45688       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45689     fi
45690 
45691     # Use eval to expand a potential ~
45692     eval path="$path"
45693     if test ! -f "$path" && test ! -d "$path"; then
45694       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45695     fi
45696 
45697     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45698   fi
45699 
45700 
45701     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45703 $as_echo_n "checking for freetype includes... " >&6; }
45704     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45705 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45706     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45708 $as_echo_n "checking for freetype libraries... " >&6; }
45709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45710 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45711   fi
45712 
45713           fi
45714         else
45715           FREETYPE_BASE_DIR="$SYSROOT/usr"
45716 
45717   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45718   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45719   METHOD="well-known location"
45720 
45721   # Let's start with an optimistic view of the world :-)
45722   FOUND_FREETYPE=yes
45723 
45724   # First look for the canonical freetype main include file ft2build.h.
45725   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45726     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45727     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45728     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45729       # Fail.
45730       FOUND_FREETYPE=no
45731     fi
45732   fi
45733 
45734   if test "x$FOUND_FREETYPE" = xyes; then
45735     # Include file found, let's continue the sanity check.
45736     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45737 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45738 
45739     # Reset to default value
45740     FREETYPE_BASE_NAME=freetype
45741     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45742     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45743       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45744           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45745         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45746         # for the .6 version explicitly.
45747         FREETYPE_BASE_NAME=freetype.6
45748         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45749         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45750 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45751       else
45752         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45753 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45754         FOUND_FREETYPE=no
45755       fi
45756     else
45757       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45758         # On Windows, we will need both .lib and .dll file.
45759         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45760           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45761 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45762           FOUND_FREETYPE=no
45763         fi
45764       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45765           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45766         # Found lib in isa dir, use that instead.
45767         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45768         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45769 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45770       fi
45771     fi
45772   fi
45773 
45774   if test "x$FOUND_FREETYPE" = xyes; then
45775 
45776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45777 
45778   # Input might be given as Windows format, start by converting to
45779   # unix format.
45780   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45781   new_path=`$CYGPATH -u "$path"`
45782 
45783   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45784   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45785   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45786   # "foo.exe" is OK but "foo" is an error.
45787   #
45788   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45789   # It is also a way to make sure we got the proper file name for the real test later on.
45790   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45791   if test "x$test_shortpath" = x; then
45792     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45793 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45794     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45795   fi
45796 
45797   # Call helper function which possibly converts this using DOS-style short mode.
45798   # If so, the updated path is stored in $new_path.
45799 
45800   input_path="$new_path"
45801   # Check if we need to convert this using DOS-style short mode. If the path
45802   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45803   # take no chances and rewrite it.
45804   # Note: m4 eats our [], so we need to use [ and ] instead.
45805   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45806   if test "x$has_forbidden_chars" != x; then
45807     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45808     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45809     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45810     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45811       # Going to short mode and back again did indeed matter. Since short mode is
45812       # case insensitive, let's make it lowercase to improve readability.
45813       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45814       # Now convert it back to Unix-stile (cygpath)
45815       input_path=`$CYGPATH -u "$shortmode_path"`
45816       new_path="$input_path"
45817     fi
45818   fi
45819 
45820   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45821   if test "x$test_cygdrive_prefix" = x; then
45822     # As a simple fix, exclude /usr/bin since it's not a real path.
45823     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45824       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45825       # a path prefixed by /cygdrive for fixpath to work.
45826       new_path="$CYGWIN_ROOT_PATH$input_path"
45827     fi
45828   fi
45829 
45830 
45831   if test "x$path" != "x$new_path"; then
45832     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45834 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45835   fi
45836 
45837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45838 
45839   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45840   has_colon=`$ECHO $path | $GREP ^.:`
45841   new_path="$path"
45842   if test "x$has_colon" = x; then
45843     # Not in mixed or Windows style, start by that.
45844     new_path=`cmd //c echo $path`
45845   fi
45846 
45847 
45848   input_path="$new_path"
45849   # Check if we need to convert this using DOS-style short mode. If the path
45850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45851   # take no chances and rewrite it.
45852   # Note: m4 eats our [], so we need to use [ and ] instead.
45853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45854   if test "x$has_forbidden_chars" != x; then
45855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45856     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45857   fi
45858 
45859 
45860   windows_path="$new_path"
45861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45862     unix_path=`$CYGPATH -u "$windows_path"`
45863     new_path="$unix_path"
45864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45866     new_path="$unix_path"
45867   fi
45868 
45869   if test "x$path" != "x$new_path"; then
45870     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45871     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45872 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45873   fi
45874 
45875   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45876   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45877 
45878   else
45879     # We're on a unix platform. Hooray! :)
45880     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45881     has_space=`$ECHO "$path" | $GREP " "`
45882     if test "x$has_space" != x; then
45883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45884 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45885       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45886     fi
45887 
45888     # Use eval to expand a potential ~
45889     eval path="$path"
45890     if test ! -f "$path" && test ! -d "$path"; then
45891       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45892     fi
45893 
45894     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45895   fi
45896 
45897 
45898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45899 
45900   # Input might be given as Windows format, start by converting to
45901   # unix format.
45902   path="$POTENTIAL_FREETYPE_LIB_PATH"
45903   new_path=`$CYGPATH -u "$path"`
45904 
45905   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45906   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45907   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45908   # "foo.exe" is OK but "foo" is an error.
45909   #
45910   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45911   # It is also a way to make sure we got the proper file name for the real test later on.
45912   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45913   if test "x$test_shortpath" = x; then
45914     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45915 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45916     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45917   fi
45918 
45919   # Call helper function which possibly converts this using DOS-style short mode.
45920   # If so, the updated path is stored in $new_path.
45921 
45922   input_path="$new_path"
45923   # Check if we need to convert this using DOS-style short mode. If the path
45924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45925   # take no chances and rewrite it.
45926   # Note: m4 eats our [], so we need to use [ and ] instead.
45927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45928   if test "x$has_forbidden_chars" != x; then
45929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45930     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45931     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45932     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45933       # Going to short mode and back again did indeed matter. Since short mode is
45934       # case insensitive, let's make it lowercase to improve readability.
45935       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45936       # Now convert it back to Unix-stile (cygpath)
45937       input_path=`$CYGPATH -u "$shortmode_path"`
45938       new_path="$input_path"
45939     fi
45940   fi
45941 
45942   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45943   if test "x$test_cygdrive_prefix" = x; then
45944     # As a simple fix, exclude /usr/bin since it's not a real path.
45945     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45946       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45947       # a path prefixed by /cygdrive for fixpath to work.
45948       new_path="$CYGWIN_ROOT_PATH$input_path"
45949     fi
45950   fi
45951 
45952 
45953   if test "x$path" != "x$new_path"; then
45954     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45955     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45956 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45957   fi
45958 
45959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45960 
45961   path="$POTENTIAL_FREETYPE_LIB_PATH"
45962   has_colon=`$ECHO $path | $GREP ^.:`
45963   new_path="$path"
45964   if test "x$has_colon" = x; then
45965     # Not in mixed or Windows style, start by that.
45966     new_path=`cmd //c echo $path`
45967   fi
45968 
45969 
45970   input_path="$new_path"
45971   # Check if we need to convert this using DOS-style short mode. If the path
45972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45973   # take no chances and rewrite it.
45974   # Note: m4 eats our [], so we need to use [ and ] instead.
45975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45976   if test "x$has_forbidden_chars" != x; then
45977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45978     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45979   fi
45980 
45981 
45982   windows_path="$new_path"
45983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45984     unix_path=`$CYGPATH -u "$windows_path"`
45985     new_path="$unix_path"
45986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45987     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45988     new_path="$unix_path"
45989   fi
45990 
45991   if test "x$path" != "x$new_path"; then
45992     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45993     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45994 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45995   fi
45996 
45997   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45998   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45999 
46000   else
46001     # We're on a unix platform. Hooray! :)
46002     path="$POTENTIAL_FREETYPE_LIB_PATH"
46003     has_space=`$ECHO "$path" | $GREP " "`
46004     if test "x$has_space" != x; then
46005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46006 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46007       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46008     fi
46009 
46010     # Use eval to expand a potential ~
46011     eval path="$path"
46012     if test ! -f "$path" && test ! -d "$path"; then
46013       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46014     fi
46015 
46016     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46017   fi
46018 
46019 
46020     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46022 $as_echo_n "checking for freetype includes... " >&6; }
46023     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46024 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46025     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46026     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46027 $as_echo_n "checking for freetype libraries... " >&6; }
46028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46029 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46030   fi
46031 
46032 
46033           if test "x$FOUND_FREETYPE" != xyes; then
46034             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46035 
46036   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46037   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46038   METHOD="well-known location"
46039 
46040   # Let's start with an optimistic view of the world :-)
46041   FOUND_FREETYPE=yes
46042 
46043   # First look for the canonical freetype main include file ft2build.h.
46044   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46045     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46046     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46047     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46048       # Fail.
46049       FOUND_FREETYPE=no
46050     fi
46051   fi
46052 
46053   if test "x$FOUND_FREETYPE" = xyes; then
46054     # Include file found, let's continue the sanity check.
46055     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46056 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46057 
46058     # Reset to default value
46059     FREETYPE_BASE_NAME=freetype
46060     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46061     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46062       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46063           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46064         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46065         # for the .6 version explicitly.
46066         FREETYPE_BASE_NAME=freetype.6
46067         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46068         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46069 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46070       else
46071         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46072 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46073         FOUND_FREETYPE=no
46074       fi
46075     else
46076       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46077         # On Windows, we will need both .lib and .dll file.
46078         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46079           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46080 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46081           FOUND_FREETYPE=no
46082         fi
46083       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46084           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46085         # Found lib in isa dir, use that instead.
46086         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46087         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46088 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46089       fi
46090     fi
46091   fi
46092 
46093   if test "x$FOUND_FREETYPE" = xyes; then
46094 
46095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46096 
46097   # Input might be given as Windows format, start by converting to
46098   # unix format.
46099   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46100   new_path=`$CYGPATH -u "$path"`
46101 
46102   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46103   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46104   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46105   # "foo.exe" is OK but "foo" is an error.
46106   #
46107   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46108   # It is also a way to make sure we got the proper file name for the real test later on.
46109   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46110   if test "x$test_shortpath" = x; then
46111     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46112 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46113     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46114   fi
46115 
46116   # Call helper function which possibly converts this using DOS-style short mode.
46117   # If so, the updated path is stored in $new_path.
46118 
46119   input_path="$new_path"
46120   # Check if we need to convert this using DOS-style short mode. If the path
46121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46122   # take no chances and rewrite it.
46123   # Note: m4 eats our [], so we need to use [ and ] instead.
46124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46125   if test "x$has_forbidden_chars" != x; then
46126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46127     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46128     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46129     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46130       # Going to short mode and back again did indeed matter. Since short mode is
46131       # case insensitive, let's make it lowercase to improve readability.
46132       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46133       # Now convert it back to Unix-stile (cygpath)
46134       input_path=`$CYGPATH -u "$shortmode_path"`
46135       new_path="$input_path"
46136     fi
46137   fi
46138 
46139   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46140   if test "x$test_cygdrive_prefix" = x; then
46141     # As a simple fix, exclude /usr/bin since it's not a real path.
46142     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46143       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46144       # a path prefixed by /cygdrive for fixpath to work.
46145       new_path="$CYGWIN_ROOT_PATH$input_path"
46146     fi
46147   fi
46148 
46149 
46150   if test "x$path" != "x$new_path"; then
46151     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46153 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46154   fi
46155 
46156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46157 
46158   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46159   has_colon=`$ECHO $path | $GREP ^.:`
46160   new_path="$path"
46161   if test "x$has_colon" = x; then
46162     # Not in mixed or Windows style, start by that.
46163     new_path=`cmd //c echo $path`
46164   fi
46165 
46166 
46167   input_path="$new_path"
46168   # Check if we need to convert this using DOS-style short mode. If the path
46169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46170   # take no chances and rewrite it.
46171   # Note: m4 eats our [], so we need to use [ and ] instead.
46172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46173   if test "x$has_forbidden_chars" != x; then
46174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46175     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46176   fi
46177 
46178 
46179   windows_path="$new_path"
46180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46181     unix_path=`$CYGPATH -u "$windows_path"`
46182     new_path="$unix_path"
46183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46185     new_path="$unix_path"
46186   fi
46187 
46188   if test "x$path" != "x$new_path"; then
46189     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46190     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46191 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46192   fi
46193 
46194   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46195   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46196 
46197   else
46198     # We're on a unix platform. Hooray! :)
46199     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46200     has_space=`$ECHO "$path" | $GREP " "`
46201     if test "x$has_space" != x; then
46202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46203 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46204       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46205     fi
46206 
46207     # Use eval to expand a potential ~
46208     eval path="$path"
46209     if test ! -f "$path" && test ! -d "$path"; then
46210       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46211     fi
46212 
46213     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46214   fi
46215 
46216 
46217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46218 
46219   # Input might be given as Windows format, start by converting to
46220   # unix format.
46221   path="$POTENTIAL_FREETYPE_LIB_PATH"
46222   new_path=`$CYGPATH -u "$path"`
46223 
46224   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46225   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46226   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46227   # "foo.exe" is OK but "foo" is an error.
46228   #
46229   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46230   # It is also a way to make sure we got the proper file name for the real test later on.
46231   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46232   if test "x$test_shortpath" = x; then
46233     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46234 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46235     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46236   fi
46237 
46238   # Call helper function which possibly converts this using DOS-style short mode.
46239   # If so, the updated path is stored in $new_path.
46240 
46241   input_path="$new_path"
46242   # Check if we need to convert this using DOS-style short mode. If the path
46243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46244   # take no chances and rewrite it.
46245   # Note: m4 eats our [], so we need to use [ and ] instead.
46246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46247   if test "x$has_forbidden_chars" != x; then
46248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46249     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46250     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46251     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46252       # Going to short mode and back again did indeed matter. Since short mode is
46253       # case insensitive, let's make it lowercase to improve readability.
46254       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46255       # Now convert it back to Unix-stile (cygpath)
46256       input_path=`$CYGPATH -u "$shortmode_path"`
46257       new_path="$input_path"
46258     fi
46259   fi
46260 
46261   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46262   if test "x$test_cygdrive_prefix" = x; then
46263     # As a simple fix, exclude /usr/bin since it's not a real path.
46264     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46265       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46266       # a path prefixed by /cygdrive for fixpath to work.
46267       new_path="$CYGWIN_ROOT_PATH$input_path"
46268     fi
46269   fi
46270 
46271 
46272   if test "x$path" != "x$new_path"; then
46273     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46274     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46275 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46276   fi
46277 
46278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46279 
46280   path="$POTENTIAL_FREETYPE_LIB_PATH"
46281   has_colon=`$ECHO $path | $GREP ^.:`
46282   new_path="$path"
46283   if test "x$has_colon" = x; then
46284     # Not in mixed or Windows style, start by that.
46285     new_path=`cmd //c echo $path`
46286   fi
46287 
46288 
46289   input_path="$new_path"
46290   # Check if we need to convert this using DOS-style short mode. If the path
46291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46292   # take no chances and rewrite it.
46293   # Note: m4 eats our [], so we need to use [ and ] instead.
46294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46295   if test "x$has_forbidden_chars" != x; then
46296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46297     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46298   fi
46299 
46300 
46301   windows_path="$new_path"
46302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46303     unix_path=`$CYGPATH -u "$windows_path"`
46304     new_path="$unix_path"
46305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46306     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46307     new_path="$unix_path"
46308   fi
46309 
46310   if test "x$path" != "x$new_path"; then
46311     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46313 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46314   fi
46315 
46316   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46317   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46318 
46319   else
46320     # We're on a unix platform. Hooray! :)
46321     path="$POTENTIAL_FREETYPE_LIB_PATH"
46322     has_space=`$ECHO "$path" | $GREP " "`
46323     if test "x$has_space" != x; then
46324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46325 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46326       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46327     fi
46328 
46329     # Use eval to expand a potential ~
46330     eval path="$path"
46331     if test ! -f "$path" && test ! -d "$path"; then
46332       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46333     fi
46334 
46335     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46336   fi
46337 
46338 
46339     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46341 $as_echo_n "checking for freetype includes... " >&6; }
46342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46343 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46344     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46346 $as_echo_n "checking for freetype libraries... " >&6; }
46347     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46348 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46349   fi
46350 
46351           fi
46352 
46353           if test "x$FOUND_FREETYPE" != xyes; then
46354             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46355 
46356   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46357   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46358   METHOD="well-known location"
46359 
46360   # Let's start with an optimistic view of the world :-)
46361   FOUND_FREETYPE=yes
46362 
46363   # First look for the canonical freetype main include file ft2build.h.
46364   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46365     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46366     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46367     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46368       # Fail.
46369       FOUND_FREETYPE=no
46370     fi
46371   fi
46372 
46373   if test "x$FOUND_FREETYPE" = xyes; then
46374     # Include file found, let's continue the sanity check.
46375     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46376 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46377 
46378     # Reset to default value
46379     FREETYPE_BASE_NAME=freetype
46380     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46381     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46382       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46383           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46384         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46385         # for the .6 version explicitly.
46386         FREETYPE_BASE_NAME=freetype.6
46387         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46388         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46389 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46390       else
46391         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46392 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46393         FOUND_FREETYPE=no
46394       fi
46395     else
46396       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46397         # On Windows, we will need both .lib and .dll file.
46398         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46399           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46400 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46401           FOUND_FREETYPE=no
46402         fi
46403       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46404           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46405         # Found lib in isa dir, use that instead.
46406         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46407         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46408 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46409       fi
46410     fi
46411   fi
46412 
46413   if test "x$FOUND_FREETYPE" = xyes; then
46414 
46415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46416 
46417   # Input might be given as Windows format, start by converting to
46418   # unix format.
46419   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46420   new_path=`$CYGPATH -u "$path"`
46421 
46422   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46423   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46424   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46425   # "foo.exe" is OK but "foo" is an error.
46426   #
46427   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46428   # It is also a way to make sure we got the proper file name for the real test later on.
46429   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46430   if test "x$test_shortpath" = x; then
46431     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46432 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46433     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46434   fi
46435 
46436   # Call helper function which possibly converts this using DOS-style short mode.
46437   # If so, the updated path is stored in $new_path.
46438 
46439   input_path="$new_path"
46440   # Check if we need to convert this using DOS-style short mode. If the path
46441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46442   # take no chances and rewrite it.
46443   # Note: m4 eats our [], so we need to use [ and ] instead.
46444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46445   if test "x$has_forbidden_chars" != x; then
46446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46447     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46448     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46449     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46450       # Going to short mode and back again did indeed matter. Since short mode is
46451       # case insensitive, let's make it lowercase to improve readability.
46452       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46453       # Now convert it back to Unix-stile (cygpath)
46454       input_path=`$CYGPATH -u "$shortmode_path"`
46455       new_path="$input_path"
46456     fi
46457   fi
46458 
46459   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46460   if test "x$test_cygdrive_prefix" = x; then
46461     # As a simple fix, exclude /usr/bin since it's not a real path.
46462     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46463       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46464       # a path prefixed by /cygdrive for fixpath to work.
46465       new_path="$CYGWIN_ROOT_PATH$input_path"
46466     fi
46467   fi
46468 
46469 
46470   if test "x$path" != "x$new_path"; then
46471     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46472     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46473 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46474   fi
46475 
46476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46477 
46478   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46479   has_colon=`$ECHO $path | $GREP ^.:`
46480   new_path="$path"
46481   if test "x$has_colon" = x; then
46482     # Not in mixed or Windows style, start by that.
46483     new_path=`cmd //c echo $path`
46484   fi
46485 
46486 
46487   input_path="$new_path"
46488   # Check if we need to convert this using DOS-style short mode. If the path
46489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46490   # take no chances and rewrite it.
46491   # Note: m4 eats our [], so we need to use [ and ] instead.
46492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46493   if test "x$has_forbidden_chars" != x; then
46494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46495     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46496   fi
46497 
46498 
46499   windows_path="$new_path"
46500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46501     unix_path=`$CYGPATH -u "$windows_path"`
46502     new_path="$unix_path"
46503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46505     new_path="$unix_path"
46506   fi
46507 
46508   if test "x$path" != "x$new_path"; then
46509     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46510     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46511 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46512   fi
46513 
46514   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46515   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46516 
46517   else
46518     # We're on a unix platform. Hooray! :)
46519     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46520     has_space=`$ECHO "$path" | $GREP " "`
46521     if test "x$has_space" != x; then
46522       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46523 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46524       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46525     fi
46526 
46527     # Use eval to expand a potential ~
46528     eval path="$path"
46529     if test ! -f "$path" && test ! -d "$path"; then
46530       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46531     fi
46532 
46533     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46534   fi
46535 
46536 
46537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46538 
46539   # Input might be given as Windows format, start by converting to
46540   # unix format.
46541   path="$POTENTIAL_FREETYPE_LIB_PATH"
46542   new_path=`$CYGPATH -u "$path"`
46543 
46544   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46545   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46546   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46547   # "foo.exe" is OK but "foo" is an error.
46548   #
46549   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46550   # It is also a way to make sure we got the proper file name for the real test later on.
46551   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46552   if test "x$test_shortpath" = x; then
46553     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46554 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46555     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46556   fi
46557 
46558   # Call helper function which possibly converts this using DOS-style short mode.
46559   # If so, the updated path is stored in $new_path.
46560 
46561   input_path="$new_path"
46562   # Check if we need to convert this using DOS-style short mode. If the path
46563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46564   # take no chances and rewrite it.
46565   # Note: m4 eats our [], so we need to use [ and ] instead.
46566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46567   if test "x$has_forbidden_chars" != x; then
46568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46569     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46570     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46571     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46572       # Going to short mode and back again did indeed matter. Since short mode is
46573       # case insensitive, let's make it lowercase to improve readability.
46574       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46575       # Now convert it back to Unix-stile (cygpath)
46576       input_path=`$CYGPATH -u "$shortmode_path"`
46577       new_path="$input_path"
46578     fi
46579   fi
46580 
46581   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46582   if test "x$test_cygdrive_prefix" = x; then
46583     # As a simple fix, exclude /usr/bin since it's not a real path.
46584     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46585       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46586       # a path prefixed by /cygdrive for fixpath to work.
46587       new_path="$CYGWIN_ROOT_PATH$input_path"
46588     fi
46589   fi
46590 
46591 
46592   if test "x$path" != "x$new_path"; then
46593     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46594     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46595 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46596   fi
46597 
46598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46599 
46600   path="$POTENTIAL_FREETYPE_LIB_PATH"
46601   has_colon=`$ECHO $path | $GREP ^.:`
46602   new_path="$path"
46603   if test "x$has_colon" = x; then
46604     # Not in mixed or Windows style, start by that.
46605     new_path=`cmd //c echo $path`
46606   fi
46607 
46608 
46609   input_path="$new_path"
46610   # Check if we need to convert this using DOS-style short mode. If the path
46611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46612   # take no chances and rewrite it.
46613   # Note: m4 eats our [], so we need to use [ and ] instead.
46614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46615   if test "x$has_forbidden_chars" != x; then
46616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46617     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46618   fi
46619 
46620 
46621   windows_path="$new_path"
46622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46623     unix_path=`$CYGPATH -u "$windows_path"`
46624     new_path="$unix_path"
46625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46626     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46627     new_path="$unix_path"
46628   fi
46629 
46630   if test "x$path" != "x$new_path"; then
46631     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46632     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46633 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46634   fi
46635 
46636   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46637   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46638 
46639   else
46640     # We're on a unix platform. Hooray! :)
46641     path="$POTENTIAL_FREETYPE_LIB_PATH"
46642     has_space=`$ECHO "$path" | $GREP " "`
46643     if test "x$has_space" != x; then
46644       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46645 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46646       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46647     fi
46648 
46649     # Use eval to expand a potential ~
46650     eval path="$path"
46651     if test ! -f "$path" && test ! -d "$path"; then
46652       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46653     fi
46654 
46655     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46656   fi
46657 
46658 
46659     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46661 $as_echo_n "checking for freetype includes... " >&6; }
46662     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46663 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46664     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46665     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46666 $as_echo_n "checking for freetype libraries... " >&6; }
46667     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46668 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46669   fi
46670 
46671           fi
46672 
46673           if test "x$FOUND_FREETYPE" != xyes; then
46674             FREETYPE_BASE_DIR="$SYSROOT/usr"
46675             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46676 
46677   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46678   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46679   METHOD="well-known location"
46680 
46681   # Let's start with an optimistic view of the world :-)
46682   FOUND_FREETYPE=yes
46683 
46684   # First look for the canonical freetype main include file ft2build.h.
46685   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46686     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46687     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46688     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46689       # Fail.
46690       FOUND_FREETYPE=no
46691     fi
46692   fi
46693 
46694   if test "x$FOUND_FREETYPE" = xyes; then
46695     # Include file found, let's continue the sanity check.
46696     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46697 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46698 
46699     # Reset to default value
46700     FREETYPE_BASE_NAME=freetype
46701     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46702     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46703       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46704           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46705         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46706         # for the .6 version explicitly.
46707         FREETYPE_BASE_NAME=freetype.6
46708         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46709         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46710 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46711       else
46712         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46713 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46714         FOUND_FREETYPE=no
46715       fi
46716     else
46717       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46718         # On Windows, we will need both .lib and .dll file.
46719         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46720           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46721 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46722           FOUND_FREETYPE=no
46723         fi
46724       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46725           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46726         # Found lib in isa dir, use that instead.
46727         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46728         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46729 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46730       fi
46731     fi
46732   fi
46733 
46734   if test "x$FOUND_FREETYPE" = xyes; then
46735 
46736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46737 
46738   # Input might be given as Windows format, start by converting to
46739   # unix format.
46740   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46741   new_path=`$CYGPATH -u "$path"`
46742 
46743   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46744   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46745   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46746   # "foo.exe" is OK but "foo" is an error.
46747   #
46748   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46749   # It is also a way to make sure we got the proper file name for the real test later on.
46750   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46751   if test "x$test_shortpath" = x; then
46752     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46753 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46754     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46755   fi
46756 
46757   # Call helper function which possibly converts this using DOS-style short mode.
46758   # If so, the updated path is stored in $new_path.
46759 
46760   input_path="$new_path"
46761   # Check if we need to convert this using DOS-style short mode. If the path
46762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46763   # take no chances and rewrite it.
46764   # Note: m4 eats our [], so we need to use [ and ] instead.
46765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46766   if test "x$has_forbidden_chars" != x; then
46767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46768     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46769     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46770     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46771       # Going to short mode and back again did indeed matter. Since short mode is
46772       # case insensitive, let's make it lowercase to improve readability.
46773       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46774       # Now convert it back to Unix-stile (cygpath)
46775       input_path=`$CYGPATH -u "$shortmode_path"`
46776       new_path="$input_path"
46777     fi
46778   fi
46779 
46780   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46781   if test "x$test_cygdrive_prefix" = x; then
46782     # As a simple fix, exclude /usr/bin since it's not a real path.
46783     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46784       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46785       # a path prefixed by /cygdrive for fixpath to work.
46786       new_path="$CYGWIN_ROOT_PATH$input_path"
46787     fi
46788   fi
46789 
46790 
46791   if test "x$path" != "x$new_path"; then
46792     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46794 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46795   fi
46796 
46797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46798 
46799   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46800   has_colon=`$ECHO $path | $GREP ^.:`
46801   new_path="$path"
46802   if test "x$has_colon" = x; then
46803     # Not in mixed or Windows style, start by that.
46804     new_path=`cmd //c echo $path`
46805   fi
46806 
46807 
46808   input_path="$new_path"
46809   # Check if we need to convert this using DOS-style short mode. If the path
46810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46811   # take no chances and rewrite it.
46812   # Note: m4 eats our [], so we need to use [ and ] instead.
46813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46814   if test "x$has_forbidden_chars" != x; then
46815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46816     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46817   fi
46818 
46819 
46820   windows_path="$new_path"
46821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46822     unix_path=`$CYGPATH -u "$windows_path"`
46823     new_path="$unix_path"
46824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46826     new_path="$unix_path"
46827   fi
46828 
46829   if test "x$path" != "x$new_path"; then
46830     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46832 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46833   fi
46834 
46835   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46836   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46837 
46838   else
46839     # We're on a unix platform. Hooray! :)
46840     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46841     has_space=`$ECHO "$path" | $GREP " "`
46842     if test "x$has_space" != x; then
46843       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46844 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46845       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46846     fi
46847 
46848     # Use eval to expand a potential ~
46849     eval path="$path"
46850     if test ! -f "$path" && test ! -d "$path"; then
46851       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46852     fi
46853 
46854     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46855   fi
46856 
46857 
46858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46859 
46860   # Input might be given as Windows format, start by converting to
46861   # unix format.
46862   path="$POTENTIAL_FREETYPE_LIB_PATH"
46863   new_path=`$CYGPATH -u "$path"`
46864 
46865   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46866   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46867   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46868   # "foo.exe" is OK but "foo" is an error.
46869   #
46870   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46871   # It is also a way to make sure we got the proper file name for the real test later on.
46872   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46873   if test "x$test_shortpath" = x; then
46874     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46875 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46876     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46877   fi
46878 
46879   # Call helper function which possibly converts this using DOS-style short mode.
46880   # If so, the updated path is stored in $new_path.
46881 
46882   input_path="$new_path"
46883   # Check if we need to convert this using DOS-style short mode. If the path
46884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46885   # take no chances and rewrite it.
46886   # Note: m4 eats our [], so we need to use [ and ] instead.
46887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46888   if test "x$has_forbidden_chars" != x; then
46889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46893       # Going to short mode and back again did indeed matter. Since short mode is
46894       # case insensitive, let's make it lowercase to improve readability.
46895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46896       # Now convert it back to Unix-stile (cygpath)
46897       input_path=`$CYGPATH -u "$shortmode_path"`
46898       new_path="$input_path"
46899     fi
46900   fi
46901 
46902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46903   if test "x$test_cygdrive_prefix" = x; then
46904     # As a simple fix, exclude /usr/bin since it's not a real path.
46905     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46907       # a path prefixed by /cygdrive for fixpath to work.
46908       new_path="$CYGWIN_ROOT_PATH$input_path"
46909     fi
46910   fi
46911 
46912 
46913   if test "x$path" != "x$new_path"; then
46914     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46915     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46916 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46917   fi
46918 
46919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46920 
46921   path="$POTENTIAL_FREETYPE_LIB_PATH"
46922   has_colon=`$ECHO $path | $GREP ^.:`
46923   new_path="$path"
46924   if test "x$has_colon" = x; then
46925     # Not in mixed or Windows style, start by that.
46926     new_path=`cmd //c echo $path`
46927   fi
46928 
46929 
46930   input_path="$new_path"
46931   # Check if we need to convert this using DOS-style short mode. If the path
46932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46933   # take no chances and rewrite it.
46934   # Note: m4 eats our [], so we need to use [ and ] instead.
46935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46936   if test "x$has_forbidden_chars" != x; then
46937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46938     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46939   fi
46940 
46941 
46942   windows_path="$new_path"
46943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46944     unix_path=`$CYGPATH -u "$windows_path"`
46945     new_path="$unix_path"
46946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46948     new_path="$unix_path"
46949   fi
46950 
46951   if test "x$path" != "x$new_path"; then
46952     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46954 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46955   fi
46956 
46957   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46958   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46959 
46960   else
46961     # We're on a unix platform. Hooray! :)
46962     path="$POTENTIAL_FREETYPE_LIB_PATH"
46963     has_space=`$ECHO "$path" | $GREP " "`
46964     if test "x$has_space" != x; then
46965       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46966 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46967       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46968     fi
46969 
46970     # Use eval to expand a potential ~
46971     eval path="$path"
46972     if test ! -f "$path" && test ! -d "$path"; then
46973       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46974     fi
46975 
46976     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46977   fi
46978 
46979 
46980     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46982 $as_echo_n "checking for freetype includes... " >&6; }
46983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46984 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46985     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46986     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46987 $as_echo_n "checking for freetype libraries... " >&6; }
46988     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46989 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46990   fi
46991 
46992             else
46993 
46994   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46995   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46996   METHOD="well-known location"
46997 
46998   # Let's start with an optimistic view of the world :-)
46999   FOUND_FREETYPE=yes
47000 
47001   # First look for the canonical freetype main include file ft2build.h.
47002   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47003     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47004     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47005     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47006       # Fail.
47007       FOUND_FREETYPE=no
47008     fi
47009   fi
47010 
47011   if test "x$FOUND_FREETYPE" = xyes; then
47012     # Include file found, let's continue the sanity check.
47013     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47014 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47015 
47016     # Reset to default value
47017     FREETYPE_BASE_NAME=freetype
47018     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47019     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47020       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47021           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47022         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47023         # for the .6 version explicitly.
47024         FREETYPE_BASE_NAME=freetype.6
47025         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47026         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47027 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47028       else
47029         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47030 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47031         FOUND_FREETYPE=no
47032       fi
47033     else
47034       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47035         # On Windows, we will need both .lib and .dll file.
47036         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47037           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47038 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47039           FOUND_FREETYPE=no
47040         fi
47041       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47042           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47043         # Found lib in isa dir, use that instead.
47044         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47045         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47046 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47047       fi
47048     fi
47049   fi
47050 
47051   if test "x$FOUND_FREETYPE" = xyes; then
47052 
47053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47054 
47055   # Input might be given as Windows format, start by converting to
47056   # unix format.
47057   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47058   new_path=`$CYGPATH -u "$path"`
47059 
47060   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47061   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47062   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47063   # "foo.exe" is OK but "foo" is an error.
47064   #
47065   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47066   # It is also a way to make sure we got the proper file name for the real test later on.
47067   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47068   if test "x$test_shortpath" = x; then
47069     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47070 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47071     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47072   fi
47073 
47074   # Call helper function which possibly converts this using DOS-style short mode.
47075   # If so, the updated path is stored in $new_path.
47076 
47077   input_path="$new_path"
47078   # Check if we need to convert this using DOS-style short mode. If the path
47079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47080   # take no chances and rewrite it.
47081   # Note: m4 eats our [], so we need to use [ and ] instead.
47082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47083   if test "x$has_forbidden_chars" != x; then
47084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47085     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47086     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47087     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47088       # Going to short mode and back again did indeed matter. Since short mode is
47089       # case insensitive, let's make it lowercase to improve readability.
47090       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47091       # Now convert it back to Unix-stile (cygpath)
47092       input_path=`$CYGPATH -u "$shortmode_path"`
47093       new_path="$input_path"
47094     fi
47095   fi
47096 
47097   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47098   if test "x$test_cygdrive_prefix" = x; then
47099     # As a simple fix, exclude /usr/bin since it's not a real path.
47100     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47101       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47102       # a path prefixed by /cygdrive for fixpath to work.
47103       new_path="$CYGWIN_ROOT_PATH$input_path"
47104     fi
47105   fi
47106 
47107 
47108   if test "x$path" != "x$new_path"; then
47109     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47111 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47112   fi
47113 
47114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47115 
47116   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47117   has_colon=`$ECHO $path | $GREP ^.:`
47118   new_path="$path"
47119   if test "x$has_colon" = x; then
47120     # Not in mixed or Windows style, start by that.
47121     new_path=`cmd //c echo $path`
47122   fi
47123 
47124 
47125   input_path="$new_path"
47126   # Check if we need to convert this using DOS-style short mode. If the path
47127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47128   # take no chances and rewrite it.
47129   # Note: m4 eats our [], so we need to use [ and ] instead.
47130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47131   if test "x$has_forbidden_chars" != x; then
47132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47133     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47134   fi
47135 
47136 
47137   windows_path="$new_path"
47138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47139     unix_path=`$CYGPATH -u "$windows_path"`
47140     new_path="$unix_path"
47141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47143     new_path="$unix_path"
47144   fi
47145 
47146   if test "x$path" != "x$new_path"; then
47147     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47148     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47149 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47150   fi
47151 
47152   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47153   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47154 
47155   else
47156     # We're on a unix platform. Hooray! :)
47157     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47158     has_space=`$ECHO "$path" | $GREP " "`
47159     if test "x$has_space" != x; then
47160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47161 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47162       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47163     fi
47164 
47165     # Use eval to expand a potential ~
47166     eval path="$path"
47167     if test ! -f "$path" && test ! -d "$path"; then
47168       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47169     fi
47170 
47171     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47172   fi
47173 
47174 
47175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47176 
47177   # Input might be given as Windows format, start by converting to
47178   # unix format.
47179   path="$POTENTIAL_FREETYPE_LIB_PATH"
47180   new_path=`$CYGPATH -u "$path"`
47181 
47182   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47183   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47184   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47185   # "foo.exe" is OK but "foo" is an error.
47186   #
47187   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47188   # It is also a way to make sure we got the proper file name for the real test later on.
47189   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47190   if test "x$test_shortpath" = x; then
47191     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47192 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47193     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47194   fi
47195 
47196   # Call helper function which possibly converts this using DOS-style short mode.
47197   # If so, the updated path is stored in $new_path.
47198 
47199   input_path="$new_path"
47200   # Check if we need to convert this using DOS-style short mode. If the path
47201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47202   # take no chances and rewrite it.
47203   # Note: m4 eats our [], so we need to use [ and ] instead.
47204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47205   if test "x$has_forbidden_chars" != x; then
47206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47207     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47208     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47209     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47210       # Going to short mode and back again did indeed matter. Since short mode is
47211       # case insensitive, let's make it lowercase to improve readability.
47212       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47213       # Now convert it back to Unix-stile (cygpath)
47214       input_path=`$CYGPATH -u "$shortmode_path"`
47215       new_path="$input_path"
47216     fi
47217   fi
47218 
47219   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47220   if test "x$test_cygdrive_prefix" = x; then
47221     # As a simple fix, exclude /usr/bin since it's not a real path.
47222     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47223       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47224       # a path prefixed by /cygdrive for fixpath to work.
47225       new_path="$CYGWIN_ROOT_PATH$input_path"
47226     fi
47227   fi
47228 
47229 
47230   if test "x$path" != "x$new_path"; then
47231     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47232     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47233 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47234   fi
47235 
47236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47237 
47238   path="$POTENTIAL_FREETYPE_LIB_PATH"
47239   has_colon=`$ECHO $path | $GREP ^.:`
47240   new_path="$path"
47241   if test "x$has_colon" = x; then
47242     # Not in mixed or Windows style, start by that.
47243     new_path=`cmd //c echo $path`
47244   fi
47245 
47246 
47247   input_path="$new_path"
47248   # Check if we need to convert this using DOS-style short mode. If the path
47249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47250   # take no chances and rewrite it.
47251   # Note: m4 eats our [], so we need to use [ and ] instead.
47252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47253   if test "x$has_forbidden_chars" != x; then
47254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47255     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47256   fi
47257 
47258 
47259   windows_path="$new_path"
47260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47261     unix_path=`$CYGPATH -u "$windows_path"`
47262     new_path="$unix_path"
47263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47265     new_path="$unix_path"
47266   fi
47267 
47268   if test "x$path" != "x$new_path"; then
47269     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47271 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47272   fi
47273 
47274   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47275   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47276 
47277   else
47278     # We're on a unix platform. Hooray! :)
47279     path="$POTENTIAL_FREETYPE_LIB_PATH"
47280     has_space=`$ECHO "$path" | $GREP " "`
47281     if test "x$has_space" != x; then
47282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47283 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47284       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47285     fi
47286 
47287     # Use eval to expand a potential ~
47288     eval path="$path"
47289     if test ! -f "$path" && test ! -d "$path"; then
47290       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47291     fi
47292 
47293     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47294   fi
47295 
47296 
47297     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47298     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47299 $as_echo_n "checking for freetype includes... " >&6; }
47300     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47301 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47302     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47304 $as_echo_n "checking for freetype libraries... " >&6; }
47305     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47306 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47307   fi
47308 
47309               if test "x$FOUND_FREETYPE" != xyes; then
47310 
47311   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47312   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47313   METHOD="well-known location"
47314 
47315   # Let's start with an optimistic view of the world :-)
47316   FOUND_FREETYPE=yes
47317 
47318   # First look for the canonical freetype main include file ft2build.h.
47319   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47320     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47321     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47322     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47323       # Fail.
47324       FOUND_FREETYPE=no
47325     fi
47326   fi
47327 
47328   if test "x$FOUND_FREETYPE" = xyes; then
47329     # Include file found, let's continue the sanity check.
47330     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47331 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47332 
47333     # Reset to default value
47334     FREETYPE_BASE_NAME=freetype
47335     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47336     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47337       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47338           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47339         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47340         # for the .6 version explicitly.
47341         FREETYPE_BASE_NAME=freetype.6
47342         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47343         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47344 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47345       else
47346         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47347 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47348         FOUND_FREETYPE=no
47349       fi
47350     else
47351       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47352         # On Windows, we will need both .lib and .dll file.
47353         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47354           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47355 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47356           FOUND_FREETYPE=no
47357         fi
47358       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47359           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47360         # Found lib in isa dir, use that instead.
47361         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47362         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47363 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47364       fi
47365     fi
47366   fi
47367 
47368   if test "x$FOUND_FREETYPE" = xyes; then
47369 
47370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47371 
47372   # Input might be given as Windows format, start by converting to
47373   # unix format.
47374   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47375   new_path=`$CYGPATH -u "$path"`
47376 
47377   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47378   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47379   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47380   # "foo.exe" is OK but "foo" is an error.
47381   #
47382   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47383   # It is also a way to make sure we got the proper file name for the real test later on.
47384   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47385   if test "x$test_shortpath" = x; then
47386     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47387 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47388     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47389   fi
47390 
47391   # Call helper function which possibly converts this using DOS-style short mode.
47392   # If so, the updated path is stored in $new_path.
47393 
47394   input_path="$new_path"
47395   # Check if we need to convert this using DOS-style short mode. If the path
47396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47397   # take no chances and rewrite it.
47398   # Note: m4 eats our [], so we need to use [ and ] instead.
47399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47400   if test "x$has_forbidden_chars" != x; then
47401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47402     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47403     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47404     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47405       # Going to short mode and back again did indeed matter. Since short mode is
47406       # case insensitive, let's make it lowercase to improve readability.
47407       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47408       # Now convert it back to Unix-stile (cygpath)
47409       input_path=`$CYGPATH -u "$shortmode_path"`
47410       new_path="$input_path"
47411     fi
47412   fi
47413 
47414   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47415   if test "x$test_cygdrive_prefix" = x; then
47416     # As a simple fix, exclude /usr/bin since it's not a real path.
47417     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47418       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47419       # a path prefixed by /cygdrive for fixpath to work.
47420       new_path="$CYGWIN_ROOT_PATH$input_path"
47421     fi
47422   fi
47423 
47424 
47425   if test "x$path" != "x$new_path"; then
47426     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47428 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47429   fi
47430 
47431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47432 
47433   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47434   has_colon=`$ECHO $path | $GREP ^.:`
47435   new_path="$path"
47436   if test "x$has_colon" = x; then
47437     # Not in mixed or Windows style, start by that.
47438     new_path=`cmd //c echo $path`
47439   fi
47440 
47441 
47442   input_path="$new_path"
47443   # Check if we need to convert this using DOS-style short mode. If the path
47444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47445   # take no chances and rewrite it.
47446   # Note: m4 eats our [], so we need to use [ and ] instead.
47447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47448   if test "x$has_forbidden_chars" != x; then
47449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47450     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47451   fi
47452 
47453 
47454   windows_path="$new_path"
47455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47456     unix_path=`$CYGPATH -u "$windows_path"`
47457     new_path="$unix_path"
47458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47460     new_path="$unix_path"
47461   fi
47462 
47463   if test "x$path" != "x$new_path"; then
47464     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47466 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47467   fi
47468 
47469   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47470   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47471 
47472   else
47473     # We're on a unix platform. Hooray! :)
47474     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47475     has_space=`$ECHO "$path" | $GREP " "`
47476     if test "x$has_space" != x; then
47477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47478 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47479       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47480     fi
47481 
47482     # Use eval to expand a potential ~
47483     eval path="$path"
47484     if test ! -f "$path" && test ! -d "$path"; then
47485       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47486     fi
47487 
47488     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47489   fi
47490 
47491 
47492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47493 
47494   # Input might be given as Windows format, start by converting to
47495   # unix format.
47496   path="$POTENTIAL_FREETYPE_LIB_PATH"
47497   new_path=`$CYGPATH -u "$path"`
47498 
47499   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47500   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47501   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47502   # "foo.exe" is OK but "foo" is an error.
47503   #
47504   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47505   # It is also a way to make sure we got the proper file name for the real test later on.
47506   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47507   if test "x$test_shortpath" = x; then
47508     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47509 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47510     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47511   fi
47512 
47513   # Call helper function which possibly converts this using DOS-style short mode.
47514   # If so, the updated path is stored in $new_path.
47515 
47516   input_path="$new_path"
47517   # Check if we need to convert this using DOS-style short mode. If the path
47518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47519   # take no chances and rewrite it.
47520   # Note: m4 eats our [], so we need to use [ and ] instead.
47521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47522   if test "x$has_forbidden_chars" != x; then
47523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47524     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47525     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47526     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47527       # Going to short mode and back again did indeed matter. Since short mode is
47528       # case insensitive, let's make it lowercase to improve readability.
47529       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47530       # Now convert it back to Unix-stile (cygpath)
47531       input_path=`$CYGPATH -u "$shortmode_path"`
47532       new_path="$input_path"
47533     fi
47534   fi
47535 
47536   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47537   if test "x$test_cygdrive_prefix" = x; then
47538     # As a simple fix, exclude /usr/bin since it's not a real path.
47539     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47540       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47541       # a path prefixed by /cygdrive for fixpath to work.
47542       new_path="$CYGWIN_ROOT_PATH$input_path"
47543     fi
47544   fi
47545 
47546 
47547   if test "x$path" != "x$new_path"; then
47548     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47550 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47551   fi
47552 
47553   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47554 
47555   path="$POTENTIAL_FREETYPE_LIB_PATH"
47556   has_colon=`$ECHO $path | $GREP ^.:`
47557   new_path="$path"
47558   if test "x$has_colon" = x; then
47559     # Not in mixed or Windows style, start by that.
47560     new_path=`cmd //c echo $path`
47561   fi
47562 
47563 
47564   input_path="$new_path"
47565   # Check if we need to convert this using DOS-style short mode. If the path
47566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47567   # take no chances and rewrite it.
47568   # Note: m4 eats our [], so we need to use [ and ] instead.
47569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47570   if test "x$has_forbidden_chars" != x; then
47571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47572     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47573   fi
47574 
47575 
47576   windows_path="$new_path"
47577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47578     unix_path=`$CYGPATH -u "$windows_path"`
47579     new_path="$unix_path"
47580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47582     new_path="$unix_path"
47583   fi
47584 
47585   if test "x$path" != "x$new_path"; then
47586     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47587     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47588 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47589   fi
47590 
47591   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47592   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47593 
47594   else
47595     # We're on a unix platform. Hooray! :)
47596     path="$POTENTIAL_FREETYPE_LIB_PATH"
47597     has_space=`$ECHO "$path" | $GREP " "`
47598     if test "x$has_space" != x; then
47599       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47600 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47601       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47602     fi
47603 
47604     # Use eval to expand a potential ~
47605     eval path="$path"
47606     if test ! -f "$path" && test ! -d "$path"; then
47607       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47608     fi
47609 
47610     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47611   fi
47612 
47613 
47614     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47615     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47616 $as_echo_n "checking for freetype includes... " >&6; }
47617     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47618 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47619     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47620     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47621 $as_echo_n "checking for freetype libraries... " >&6; }
47622     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47623 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47624   fi
47625 
47626               fi
47627             fi
47628           fi
47629         fi
47630       fi # end check in well-known locations
47631 
47632       if test "x$FOUND_FREETYPE" != xyes; then
47633 
47634   # Print a helpful message on how to acquire the necessary build dependency.
47635   # freetype is the help tag: freetype, cups, pulse, alsa etc
47636   MISSING_DEPENDENCY=freetype
47637 
47638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47639     cygwin_help $MISSING_DEPENDENCY
47640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47641     msys_help $MISSING_DEPENDENCY
47642   else
47643     PKGHANDLER_COMMAND=
47644 
47645     case $PKGHANDLER in
47646       apt-get)
47647         apt_help     $MISSING_DEPENDENCY ;;
47648       yum)
47649         yum_help     $MISSING_DEPENDENCY ;;
47650       port)
47651         port_help    $MISSING_DEPENDENCY ;;
47652       pkgutil)
47653         pkgutil_help $MISSING_DEPENDENCY ;;
47654       pkgadd)
47655         pkgadd_help  $MISSING_DEPENDENCY ;;
47656     esac
47657 
47658     if test "x$PKGHANDLER_COMMAND" != x; then
47659       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47660     fi
47661   fi
47662 
47663         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47664       fi
47665     fi # end user specified settings
47666 
47667     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47668     if test "x$FREETYPE_CFLAGS" = x; then
47669 
47670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47671 
47672   # Input might be given as Windows format, start by converting to
47673   # unix format.
47674   path="$FREETYPE_INCLUDE_PATH"
47675   new_path=`$CYGPATH -u "$path"`
47676 
47677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47680   # "foo.exe" is OK but "foo" is an error.
47681   #
47682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47683   # It is also a way to make sure we got the proper file name for the real test later on.
47684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47685   if test "x$test_shortpath" = x; then
47686     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47687 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47688     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47689   fi
47690 
47691   # Call helper function which possibly converts this using DOS-style short mode.
47692   # If so, the updated path is stored in $new_path.
47693 
47694   input_path="$new_path"
47695   # Check if we need to convert this using DOS-style short mode. If the path
47696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47697   # take no chances and rewrite it.
47698   # Note: m4 eats our [], so we need to use [ and ] instead.
47699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47700   if test "x$has_forbidden_chars" != x; then
47701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47702     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47703     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47704     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47705       # Going to short mode and back again did indeed matter. Since short mode is
47706       # case insensitive, let's make it lowercase to improve readability.
47707       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47708       # Now convert it back to Unix-stile (cygpath)
47709       input_path=`$CYGPATH -u "$shortmode_path"`
47710       new_path="$input_path"
47711     fi
47712   fi
47713 
47714   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47715   if test "x$test_cygdrive_prefix" = x; then
47716     # As a simple fix, exclude /usr/bin since it's not a real path.
47717     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47718       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47719       # a path prefixed by /cygdrive for fixpath to work.
47720       new_path="$CYGWIN_ROOT_PATH$input_path"
47721     fi
47722   fi
47723 
47724 
47725   if test "x$path" != "x$new_path"; then
47726     FREETYPE_INCLUDE_PATH="$new_path"
47727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47728 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47729   fi
47730 
47731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47732 
47733   path="$FREETYPE_INCLUDE_PATH"
47734   has_colon=`$ECHO $path | $GREP ^.:`
47735   new_path="$path"
47736   if test "x$has_colon" = x; then
47737     # Not in mixed or Windows style, start by that.
47738     new_path=`cmd //c echo $path`
47739   fi
47740 
47741 
47742   input_path="$new_path"
47743   # Check if we need to convert this using DOS-style short mode. If the path
47744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47745   # take no chances and rewrite it.
47746   # Note: m4 eats our [], so we need to use [ and ] instead.
47747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47748   if test "x$has_forbidden_chars" != x; then
47749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47750     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47751   fi
47752 
47753 
47754   windows_path="$new_path"
47755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47756     unix_path=`$CYGPATH -u "$windows_path"`
47757     new_path="$unix_path"
47758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47760     new_path="$unix_path"
47761   fi
47762 
47763   if test "x$path" != "x$new_path"; then
47764     FREETYPE_INCLUDE_PATH="$new_path"
47765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47766 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47767   fi
47768 
47769   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47770   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47771 
47772   else
47773     # We're on a unix platform. Hooray! :)
47774     path="$FREETYPE_INCLUDE_PATH"
47775     has_space=`$ECHO "$path" | $GREP " "`
47776     if test "x$has_space" != x; then
47777       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47778 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47779       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47780     fi
47781 
47782     # Use eval to expand a potential ~
47783     eval path="$path"
47784     if test ! -f "$path" && test ! -d "$path"; then
47785       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47786     fi
47787 
47788     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47789   fi
47790 
47791       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47792         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47793       else
47794         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47795       fi
47796     fi
47797 
47798     if test "x$FREETYPE_LIBS" = x; then
47799 
47800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47801 
47802   # Input might be given as Windows format, start by converting to
47803   # unix format.
47804   path="$FREETYPE_LIB_PATH"
47805   new_path=`$CYGPATH -u "$path"`
47806 
47807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47810   # "foo.exe" is OK but "foo" is an error.
47811   #
47812   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47813   # It is also a way to make sure we got the proper file name for the real test later on.
47814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47815   if test "x$test_shortpath" = x; then
47816     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47817 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47818     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47819   fi
47820 
47821   # Call helper function which possibly converts this using DOS-style short mode.
47822   # If so, the updated path is stored in $new_path.
47823 
47824   input_path="$new_path"
47825   # Check if we need to convert this using DOS-style short mode. If the path
47826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47827   # take no chances and rewrite it.
47828   # Note: m4 eats our [], so we need to use [ and ] instead.
47829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47830   if test "x$has_forbidden_chars" != x; then
47831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47835       # Going to short mode and back again did indeed matter. Since short mode is
47836       # case insensitive, let's make it lowercase to improve readability.
47837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47838       # Now convert it back to Unix-stile (cygpath)
47839       input_path=`$CYGPATH -u "$shortmode_path"`
47840       new_path="$input_path"
47841     fi
47842   fi
47843 
47844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47845   if test "x$test_cygdrive_prefix" = x; then
47846     # As a simple fix, exclude /usr/bin since it's not a real path.
47847     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47849       # a path prefixed by /cygdrive for fixpath to work.
47850       new_path="$CYGWIN_ROOT_PATH$input_path"
47851     fi
47852   fi
47853 
47854 
47855   if test "x$path" != "x$new_path"; then
47856     FREETYPE_LIB_PATH="$new_path"
47857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47858 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47859   fi
47860 
47861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47862 
47863   path="$FREETYPE_LIB_PATH"
47864   has_colon=`$ECHO $path | $GREP ^.:`
47865   new_path="$path"
47866   if test "x$has_colon" = x; then
47867     # Not in mixed or Windows style, start by that.
47868     new_path=`cmd //c echo $path`
47869   fi
47870 
47871 
47872   input_path="$new_path"
47873   # Check if we need to convert this using DOS-style short mode. If the path
47874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47875   # take no chances and rewrite it.
47876   # Note: m4 eats our [], so we need to use [ and ] instead.
47877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47878   if test "x$has_forbidden_chars" != x; then
47879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47880     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47881   fi
47882 
47883 
47884   windows_path="$new_path"
47885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47886     unix_path=`$CYGPATH -u "$windows_path"`
47887     new_path="$unix_path"
47888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47890     new_path="$unix_path"
47891   fi
47892 
47893   if test "x$path" != "x$new_path"; then
47894     FREETYPE_LIB_PATH="$new_path"
47895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47896 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47897   fi
47898 
47899   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47900   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47901 
47902   else
47903     # We're on a unix platform. Hooray! :)
47904     path="$FREETYPE_LIB_PATH"
47905     has_space=`$ECHO "$path" | $GREP " "`
47906     if test "x$has_space" != x; then
47907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47908 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47909       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47910     fi
47911 
47912     # Use eval to expand a potential ~
47913     eval path="$path"
47914     if test ! -f "$path" && test ! -d "$path"; then
47915       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47916     fi
47917 
47918     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47919   fi
47920 
47921       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47922         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
47923       else
47924         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
47925       fi
47926     fi
47927 
47928     # Try to compile it
47929     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47930 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
47931     ac_ext=cpp
47932 ac_cpp='$CXXCPP $CPPFLAGS'
47933 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47934 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47935 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47936 
47937     PREV_CXXCFLAGS="$CXXFLAGS"
47938     PREV_LIBS="$LIBS"
47939     PREV_CXX="$CXX"
47940     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47941     LIBS="$LIBS $FREETYPE_LIBS"
47942     CXX="$FIXPATH $CXX"
47943     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47944 /* end confdefs.h.  */
47945 
47946           #include<ft2build.h>
47947           #include FT_FREETYPE_H
47948           int main () {
47949             FT_Init_FreeType(NULL);
47950             return 0;
47951           }
47952 
47953 _ACEOF
47954 if ac_fn_cxx_try_link "$LINENO"; then :
47955 
47956           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47957 $as_echo "yes" >&6; }
47958 
47959 else
47960 
47961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47962 $as_echo "no" >&6; }
47963           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47964 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47965           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47966 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47967 
47968 
47969   # Print a helpful message on how to acquire the necessary build dependency.
47970   # freetype is the help tag: freetype, cups, pulse, alsa etc
47971   MISSING_DEPENDENCY=freetype
47972 
47973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47974     cygwin_help $MISSING_DEPENDENCY
47975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47976     msys_help $MISSING_DEPENDENCY
47977   else
47978     PKGHANDLER_COMMAND=
47979 
47980     case $PKGHANDLER in
47981       apt-get)
47982         apt_help     $MISSING_DEPENDENCY ;;
47983       yum)
47984         yum_help     $MISSING_DEPENDENCY ;;
47985       port)
47986         port_help    $MISSING_DEPENDENCY ;;
47987       pkgutil)
47988         pkgutil_help $MISSING_DEPENDENCY ;;
47989       pkgadd)
47990         pkgadd_help  $MISSING_DEPENDENCY ;;
47991     esac
47992 
47993     if test "x$PKGHANDLER_COMMAND" != x; then
47994       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47995     fi
47996   fi
47997 
47998 
47999           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48000 
48001 
48002 fi
48003 rm -f core conftest.err conftest.$ac_objext \
48004     conftest$ac_exeext conftest.$ac_ext
48005     CXXCFLAGS="$PREV_CXXFLAGS"
48006     LIBS="$PREV_LIBS"
48007     CXX="$PREV_CXX"
48008     ac_ext=cpp
48009 ac_cpp='$CXXCPP $CPPFLAGS'
48010 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48011 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48012 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48013 
48014 
48015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48016 $as_echo_n "checking if we should bundle freetype... " >&6; }
48017     if test "x$BUNDLE_FREETYPE" = xyes; then
48018       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48019     fi
48020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48021 $as_echo "$BUNDLE_FREETYPE" >&6; }
48022 
48023   fi # end freetype needed
48024 
48025 
48026 
48027 
48028 
48029 
48030 
48031   ###############################################################################
48032   #
48033   # Check for alsa headers and libraries. Used on Linux/GNU systems.
48034   #
48035 
48036 # Check whether --with-alsa was given.
48037 if test "${with_alsa+set}" = set; then :
48038   withval=$with_alsa;
48039 fi
48040 
48041 
48042 # Check whether --with-alsa-include was given.
48043 if test "${with_alsa_include+set}" = set; then :
48044   withval=$with_alsa_include;
48045 fi
48046 
48047 
48048 # Check whether --with-alsa-lib was given.
48049 if test "${with_alsa_lib+set}" = set; then :
48050   withval=$with_alsa_lib;
48051 fi
48052 
48053 
48054   if test "x$ALSA_NOT_NEEDED" = xyes; then
48055     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48056       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48057 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48058     fi
48059     ALSA_CFLAGS=
48060     ALSA_LIBS=
48061   else
48062     ALSA_FOUND=no
48063 
48064     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48065       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48066     fi
48067 
48068     if test "x${with_alsa}" != x; then
48069       ALSA_LIBS="-L${with_alsa}/lib -lasound"
48070       ALSA_CFLAGS="-I${with_alsa}/include"
48071       ALSA_FOUND=yes
48072     fi
48073     if test "x${with_alsa_include}" != x; then
48074       ALSA_CFLAGS="-I${with_alsa_include}"
48075       ALSA_FOUND=yes
48076     fi
48077     if test "x${with_alsa_lib}" != x; then
48078       ALSA_LIBS="-L${with_alsa_lib} -lasound"
48079       ALSA_FOUND=yes
48080     fi
48081     if test "x$ALSA_FOUND" = xno; then
48082 
48083 
48084   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48085     # Source the builddeps file again, to make sure it uses the latest variables!
48086     . $builddepsfile
48087     # Look for a target and build machine specific resource!
48088     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48089     if test "x$resource" = x; then
48090       # Ok, lets instead look for a target specific resource
48091       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48092     fi
48093     if test "x$resource" = x; then
48094       # Ok, lets instead look for a build specific resource
48095       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48096     fi
48097     if test "x$resource" = x; then
48098       # Ok, lets instead look for a generic resource
48099       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48100       resource=${builddep_alsa}
48101     fi
48102     if test "x$resource" != x; then
48103       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48104 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48105       # If the resource in the builddeps.conf file is an existing directory,
48106       # for example /java/linux/cups
48107       if test -d ${resource}; then
48108         depdir=${resource}
48109       else
48110 
48111   # alsa is for example mymodule
48112   # $resource is for example libs/general/libmymod_1_2_3.zip
48113   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48114   # $with_builddeps_dir is for example /localhome/builddeps
48115   # depdir is the name of the variable into which we store the depdir, eg MYMOD
48116   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48117   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48118   filename=`basename $resource`
48119   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48120   filebase=${filename%%.*}
48121   extension=${filename#*.}
48122   installdir=$with_builddeps_dir/$filebase
48123   if test ! -f $installdir/$filename.unpacked; then
48124     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48125 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48126     if test ! -d $installdir; then
48127       mkdir -p $installdir
48128     fi
48129     if test ! -d $installdir; then
48130       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48131     fi
48132     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48133     touch $tmpfile
48134     if test ! -f $tmpfile; then
48135       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48136     fi
48137 
48138   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48139   # $tmpfile is the local file name for the downloaded file.
48140   VALID_TOOL=no
48141   if test "x$BDEPS_FTP" = xwget; then
48142     VALID_TOOL=yes
48143     wget -O $tmpfile $with_builddeps_server/$resource
48144   fi
48145   if test "x$BDEPS_FTP" = xlftp; then
48146     VALID_TOOL=yes
48147     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48148   fi
48149   if test "x$BDEPS_FTP" = xftp; then
48150     VALID_TOOL=yes
48151     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48152     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48153     FTPUSERPWD=${FTPSERVER%%@*}
48154     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48155       FTPUSER=${userpwd%%:*}
48156       FTPPWD=${userpwd#*@}
48157       FTPSERVER=${FTPSERVER#*@}
48158     else
48159       FTPUSER=ftp
48160       FTPPWD=ftp
48161     fi
48162     # the "pass" command does not work on some
48163     # ftp clients (read ftp.exe) but if it works,
48164     # passive mode is better!
48165     ( \
48166         echo "user $FTPUSER $FTPPWD"        ; \
48167         echo "pass"                         ; \
48168         echo "bin"                          ; \
48169         echo "get $FTPPATH $tmpfile"              ; \
48170     ) | ftp -in $FTPSERVER
48171   fi
48172   if test "x$VALID_TOOL" != xyes; then
48173     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48174   fi
48175 
48176     mv $tmpfile $installdir/$filename
48177     if test ! -s $installdir/$filename; then
48178       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48179     fi
48180     case "$extension" in
48181       zip)  echo "Unzipping $installdir/$filename..."
48182         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48183         ;;
48184       tar.gz) echo "Untaring $installdir/$filename..."
48185         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48186         ;;
48187       tgz) echo "Untaring $installdir/$filename..."
48188         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48189         ;;
48190       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48191         ;;
48192     esac
48193   fi
48194   if test -f $installdir/$filename.unpacked; then
48195     depdir=$installdir
48196   fi
48197 
48198       fi
48199       # Source the builddeps file again, because in the previous command, the depdir
48200       # was updated to point at the current build dependency install directory.
48201       . $builddepsfile
48202       # Now extract variables from the builddeps.conf files.
48203       theroot=${builddep_alsa_ROOT}
48204       thecflags=${builddep_alsa_CFLAGS}
48205       thelibs=${builddep_alsa_LIBS}
48206       if test "x$depdir" = x; then
48207         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48208       fi
48209       ALSA=$depdir
48210       if test "x$theroot" != x; then
48211         ALSA="$theroot"
48212       fi
48213       if test "x$thecflags" != x; then
48214         ALSA_CFLAGS="$thecflags"
48215       fi
48216       if test "x$thelibs" != x; then
48217         ALSA_LIBS="$thelibs"
48218       fi
48219       ALSA_FOUND=yes
48220       else ALSA_FOUND=no
48221 
48222     fi
48223     else ALSA_FOUND=no
48224 
48225   fi
48226 
48227     fi
48228     # Do not try pkg-config if we have a sysroot set.
48229     if test "x$SYSROOT" = x; then
48230       if test "x$ALSA_FOUND" = xno; then
48231 
48232 pkg_failed=no
48233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48234 $as_echo_n "checking for ALSA... " >&6; }
48235 
48236 if test -n "$ALSA_CFLAGS"; then
48237     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48238  elif test -n "$PKG_CONFIG"; then
48239     if test -n "$PKG_CONFIG" && \
48240     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48241   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48242   ac_status=$?
48243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48244   test $ac_status = 0; }; then
48245   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48246 else
48247   pkg_failed=yes
48248 fi
48249  else
48250     pkg_failed=untried
48251 fi
48252 if test -n "$ALSA_LIBS"; then
48253     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48254  elif test -n "$PKG_CONFIG"; then
48255     if test -n "$PKG_CONFIG" && \
48256     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48257   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48258   ac_status=$?
48259   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48260   test $ac_status = 0; }; then
48261   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48262 else
48263   pkg_failed=yes
48264 fi
48265  else
48266     pkg_failed=untried
48267 fi
48268 
48269 
48270 
48271 if test $pkg_failed = yes; then
48272 
48273 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48274         _pkg_short_errors_supported=yes
48275 else
48276         _pkg_short_errors_supported=no
48277 fi
48278         if test $_pkg_short_errors_supported = yes; then
48279                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48280         else
48281                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48282         fi
48283         # Put the nasty error message in config.log where it belongs
48284         echo "$ALSA_PKG_ERRORS" >&5
48285 
48286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48287 $as_echo "no" >&6; }
48288                 ALSA_FOUND=no
48289 elif test $pkg_failed = untried; then
48290         ALSA_FOUND=no
48291 else
48292         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48293         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48295 $as_echo "yes" >&6; }
48296         ALSA_FOUND=yes
48297 fi
48298       fi
48299     fi
48300     if test "x$ALSA_FOUND" = xno; then
48301       for ac_header in alsa/asoundlib.h
48302 do :
48303   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48304 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48305   cat >>confdefs.h <<_ACEOF
48306 #define HAVE_ALSA_ASOUNDLIB_H 1
48307 _ACEOF
48308 
48309             ALSA_FOUND=yes
48310             ALSA_CFLAGS=-Iignoreme
48311             ALSA_LIBS=-lasound
48312             DEFAULT_ALSA=yes
48313 
48314 else
48315   ALSA_FOUND=no
48316 fi
48317 
48318 done
48319 
48320     fi
48321     if test "x$ALSA_FOUND" = xno; then
48322 
48323   # Print a helpful message on how to acquire the necessary build dependency.
48324   # alsa is the help tag: freetype, cups, pulse, alsa etc
48325   MISSING_DEPENDENCY=alsa
48326 
48327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48328     cygwin_help $MISSING_DEPENDENCY
48329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48330     msys_help $MISSING_DEPENDENCY
48331   else
48332     PKGHANDLER_COMMAND=
48333 
48334     case $PKGHANDLER in
48335       apt-get)
48336         apt_help     $MISSING_DEPENDENCY ;;
48337       yum)
48338         yum_help     $MISSING_DEPENDENCY ;;
48339       port)
48340         port_help    $MISSING_DEPENDENCY ;;
48341       pkgutil)
48342         pkgutil_help $MISSING_DEPENDENCY ;;
48343       pkgadd)
48344         pkgadd_help  $MISSING_DEPENDENCY ;;
48345     esac
48346 
48347     if test "x$PKGHANDLER_COMMAND" != x; then
48348       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48349     fi
48350   fi
48351 
48352       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48353     fi
48354   fi
48355 
48356 
48357 
48358 
48359 
48360 
48361   ###############################################################################
48362   #
48363   # Check for the jpeg library
48364   #
48365 
48366 
48367 # Check whether --with-libjpeg was given.
48368 if test "${with_libjpeg+set}" = set; then :
48369   withval=$with_libjpeg;
48370 fi
48371 
48372 
48373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48374 $as_echo_n "checking for which libjpeg to use... " >&6; }
48375 
48376   # default is bundled
48377   DEFAULT_LIBJPEG=bundled
48378 
48379   #
48380   # if user didn't specify, use DEFAULT_LIBJPEG
48381   #
48382   if test "x${with_libjpeg}" = "x"; then
48383     with_libjpeg=${DEFAULT_LIBJPEG}
48384   fi
48385 
48386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48387 $as_echo "${with_libjpeg}" >&6; }
48388 
48389   if test "x${with_libjpeg}" = "xbundled"; then
48390     USE_EXTERNAL_LIBJPEG=false
48391   elif test "x${with_libjpeg}" = "xsystem"; then
48392     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48393 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48394 
48395 else
48396    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48397 fi
48398 
48399 
48400     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48401 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48402 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48403   $as_echo_n "(cached) " >&6
48404 else
48405   ac_check_lib_save_LIBS=$LIBS
48406 LIBS="-ljpeg  $LIBS"
48407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48408 /* end confdefs.h.  */
48409 
48410 /* Override any GCC internal prototype to avoid an error.
48411    Use char because int might match the return type of a GCC
48412    builtin and then its argument prototype would still apply.  */
48413 #ifdef __cplusplus
48414 extern "C"
48415 #endif
48416 char jpeg_CreateDecompress ();
48417 int
48418 main ()
48419 {
48420 return jpeg_CreateDecompress ();
48421   ;
48422   return 0;
48423 }
48424 _ACEOF
48425 if ac_fn_cxx_try_link "$LINENO"; then :
48426   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48427 else
48428   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48429 fi
48430 rm -f core conftest.err conftest.$ac_objext \
48431     conftest$ac_exeext conftest.$ac_ext
48432 LIBS=$ac_check_lib_save_LIBS
48433 fi
48434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48435 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48436 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48437   cat >>confdefs.h <<_ACEOF
48438 #define HAVE_LIBJPEG 1
48439 _ACEOF
48440 
48441   LIBS="-ljpeg $LIBS"
48442 
48443 else
48444    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48445 fi
48446 
48447 
48448     USE_EXTERNAL_LIBJPEG=true
48449   else
48450     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48451   fi
48452 
48453 
48454 
48455   ###############################################################################
48456   #
48457   # Check for the gif library
48458   #
48459 
48460 
48461 # Check whether --with-giflib was given.
48462 if test "${with_giflib+set}" = set; then :
48463   withval=$with_giflib;
48464 fi
48465 
48466 
48467 
48468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48469 $as_echo_n "checking for which giflib to use... " >&6; }
48470 
48471   # default is bundled
48472   DEFAULT_GIFLIB=bundled
48473 
48474   #
48475   # if user didn't specify, use DEFAULT_GIFLIB
48476   #
48477   if test "x${with_giflib}" = "x"; then
48478     with_giflib=${DEFAULT_GIFLIB}
48479   fi
48480 
48481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48482 $as_echo "${with_giflib}" >&6; }
48483 
48484   if test "x${with_giflib}" = "xbundled"; then
48485     USE_EXTERNAL_LIBGIF=false
48486   elif test "x${with_giflib}" = "xsystem"; then
48487     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48488 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48489 
48490 else
48491    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48492 fi
48493 
48494 
48495     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48496 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48497 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48498   $as_echo_n "(cached) " >&6
48499 else
48500   ac_check_lib_save_LIBS=$LIBS
48501 LIBS="-lgif  $LIBS"
48502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48503 /* end confdefs.h.  */
48504 
48505 /* Override any GCC internal prototype to avoid an error.
48506    Use char because int might match the return type of a GCC
48507    builtin and then its argument prototype would still apply.  */
48508 #ifdef __cplusplus
48509 extern "C"
48510 #endif
48511 char DGifGetCode ();
48512 int
48513 main ()
48514 {
48515 return DGifGetCode ();
48516   ;
48517   return 0;
48518 }
48519 _ACEOF
48520 if ac_fn_cxx_try_link "$LINENO"; then :
48521   ac_cv_lib_gif_DGifGetCode=yes
48522 else
48523   ac_cv_lib_gif_DGifGetCode=no
48524 fi
48525 rm -f core conftest.err conftest.$ac_objext \
48526     conftest$ac_exeext conftest.$ac_ext
48527 LIBS=$ac_check_lib_save_LIBS
48528 fi
48529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48530 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48531 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48532   cat >>confdefs.h <<_ACEOF
48533 #define HAVE_LIBGIF 1
48534 _ACEOF
48535 
48536   LIBS="-lgif $LIBS"
48537 
48538 else
48539    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48540 fi
48541 
48542 
48543     USE_EXTERNAL_LIBGIF=true
48544   else
48545     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48546   fi
48547 
48548 
48549   ###############################################################################
48550   #
48551   # Check for the lcms2 library
48552   #
48553 
48554 
48555 # Check whether --with-lcms was given.
48556 if test "${with_lcms+set}" = set; then :
48557   withval=$with_lcms;
48558 fi
48559 
48560 
48561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48562 $as_echo_n "checking for which lcms to use... " >&6; }
48563 
48564   DEFAULT_LCMS=bundled
48565 
48566   #
48567   # If user didn't specify, use DEFAULT_LCMS
48568   #
48569   if test "x${with_lcms}" = "x"; then
48570       with_lcms=${DEFAULT_LCMS}
48571   fi
48572 
48573   if test "x${with_lcms}" = "xbundled"; then
48574     USE_EXTERNAL_LCMS=false
48575     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48576 $as_echo "bundled" >&6; }
48577   elif test "x${with_lcms}" = "xsystem"; then
48578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48579 $as_echo "system" >&6; }
48580 
48581 pkg_failed=no
48582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48583 $as_echo_n "checking for LCMS... " >&6; }
48584 
48585 if test -n "$LCMS_CFLAGS"; then
48586     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48587  elif test -n "$PKG_CONFIG"; then
48588     if test -n "$PKG_CONFIG" && \
48589     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48590   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48591   ac_status=$?
48592   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48593   test $ac_status = 0; }; then
48594   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48595 else
48596   pkg_failed=yes
48597 fi
48598  else
48599     pkg_failed=untried
48600 fi
48601 if test -n "$LCMS_LIBS"; then
48602     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48603  elif test -n "$PKG_CONFIG"; then
48604     if test -n "$PKG_CONFIG" && \
48605     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48606   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48607   ac_status=$?
48608   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48609   test $ac_status = 0; }; then
48610   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48611 else
48612   pkg_failed=yes
48613 fi
48614  else
48615     pkg_failed=untried
48616 fi
48617 
48618 
48619 
48620 if test $pkg_failed = yes; then
48621 
48622 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48623         _pkg_short_errors_supported=yes
48624 else
48625         _pkg_short_errors_supported=no
48626 fi
48627         if test $_pkg_short_errors_supported = yes; then
48628                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48629         else
48630                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48631         fi
48632         # Put the nasty error message in config.log where it belongs
48633         echo "$LCMS_PKG_ERRORS" >&5
48634 
48635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48636 $as_echo "no" >&6; }
48637                 LCMS_FOUND=no
48638 elif test $pkg_failed = untried; then
48639         LCMS_FOUND=no
48640 else
48641         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48642         LCMS_LIBS=$pkg_cv_LCMS_LIBS
48643         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48644 $as_echo "yes" >&6; }
48645         LCMS_FOUND=yes
48646 fi
48647     if test "x${LCMS_FOUND}" = "xyes"; then
48648       USE_EXTERNAL_LCMS=true
48649     else
48650       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48651     fi
48652   else
48653     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48654   fi
48655 
48656 
48657 
48658   ###############################################################################
48659   #
48660   # Check for the png library
48661   #
48662 
48663 
48664 # Check whether --with-libpng was given.
48665 if test "${with_libpng+set}" = set; then :
48666   withval=$with_libpng;
48667 fi
48668 
48669 
48670 
48671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48672 $as_echo_n "checking for which libpng to use... " >&6; }
48673 
48674   # default is bundled
48675   DEFAULT_LIBPNG=bundled
48676 
48677   #
48678   # if user didn't specify, use DEFAULT_LIBPNG
48679   #
48680   if test "x${with_libpng}" = "x"; then
48681       with_libpng=${DEFAULT_LIBPNG}
48682   fi
48683 
48684   if test "x${with_libpng}" = "xbundled"; then
48685       USE_EXTERNAL_LIBPNG=false
48686       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48687 $as_echo "bundled" >&6; }
48688   elif test "x${with_libpng}" = "xsystem"; then
48689 
48690 pkg_failed=no
48691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48692 $as_echo_n "checking for PNG... " >&6; }
48693 
48694 if test -n "$PNG_CFLAGS"; then
48695     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48696  elif test -n "$PKG_CONFIG"; then
48697     if test -n "$PKG_CONFIG" && \
48698     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48699   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48700   ac_status=$?
48701   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48702   test $ac_status = 0; }; then
48703   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48704 else
48705   pkg_failed=yes
48706 fi
48707  else
48708     pkg_failed=untried
48709 fi
48710 if test -n "$PNG_LIBS"; then
48711     pkg_cv_PNG_LIBS="$PNG_LIBS"
48712  elif test -n "$PKG_CONFIG"; then
48713     if test -n "$PKG_CONFIG" && \
48714     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48715   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48716   ac_status=$?
48717   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48718   test $ac_status = 0; }; then
48719   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48720 else
48721   pkg_failed=yes
48722 fi
48723  else
48724     pkg_failed=untried
48725 fi
48726 
48727 
48728 
48729 if test $pkg_failed = yes; then
48730 
48731 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48732         _pkg_short_errors_supported=yes
48733 else
48734         _pkg_short_errors_supported=no
48735 fi
48736         if test $_pkg_short_errors_supported = yes; then
48737                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48738         else
48739                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48740         fi
48741         # Put the nasty error message in config.log where it belongs
48742         echo "$PNG_PKG_ERRORS" >&5
48743 
48744         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48745 $as_echo "no" >&6; }
48746                  LIBPNG_FOUND=no
48747 elif test $pkg_failed = untried; then
48748          LIBPNG_FOUND=no
48749 else
48750         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48751         PNG_LIBS=$pkg_cv_PNG_LIBS
48752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48753 $as_echo "yes" >&6; }
48754          LIBPNG_FOUND=yes
48755 fi
48756       if test "x${LIBPNG_FOUND}" = "xyes"; then
48757           USE_EXTERNAL_LIBPNG=true
48758           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48759 $as_echo "system" >&6; }
48760       else
48761           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48762 $as_echo "system not found" >&6; }
48763           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48764       fi
48765   else
48766       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48767   fi
48768 
48769 
48770   ###############################################################################
48771   #
48772   # Check for the zlib library
48773   #
48774 
48775 
48776 # Check whether --with-zlib was given.
48777 if test "${with_zlib+set}" = set; then :
48778   withval=$with_zlib;
48779 fi
48780 
48781 
48782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48783 $as_echo_n "checking for compress in -lz... " >&6; }
48784 if ${ac_cv_lib_z_compress+:} false; then :
48785   $as_echo_n "(cached) " >&6
48786 else
48787   ac_check_lib_save_LIBS=$LIBS
48788 LIBS="-lz  $LIBS"
48789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48790 /* end confdefs.h.  */
48791 
48792 /* Override any GCC internal prototype to avoid an error.
48793    Use char because int might match the return type of a GCC
48794    builtin and then its argument prototype would still apply.  */
48795 #ifdef __cplusplus
48796 extern "C"
48797 #endif
48798 char compress ();
48799 int
48800 main ()
48801 {
48802 return compress ();
48803   ;
48804   return 0;
48805 }
48806 _ACEOF
48807 if ac_fn_cxx_try_link "$LINENO"; then :
48808   ac_cv_lib_z_compress=yes
48809 else
48810   ac_cv_lib_z_compress=no
48811 fi
48812 rm -f core conftest.err conftest.$ac_objext \
48813     conftest$ac_exeext conftest.$ac_ext
48814 LIBS=$ac_check_lib_save_LIBS
48815 fi
48816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48817 $as_echo "$ac_cv_lib_z_compress" >&6; }
48818 if test "x$ac_cv_lib_z_compress" = xyes; then :
48819    ZLIB_FOUND=yes
48820 else
48821    ZLIB_FOUND=no
48822 fi
48823 
48824 
48825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48826 $as_echo_n "checking for which zlib to use... " >&6; }
48827 
48828   DEFAULT_ZLIB=bundled
48829   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48830     #
48831     # On macosx default is system...on others default is
48832     #
48833     DEFAULT_ZLIB=system
48834   fi
48835 
48836   if test "x${ZLIB_FOUND}" != "xyes"; then
48837     #
48838     # If we don't find any system...set default to bundled
48839     #
48840     DEFAULT_ZLIB=bundled
48841   fi
48842 
48843   #
48844   # If user didn't specify, use DEFAULT_ZLIB
48845   #
48846   if test "x${with_zlib}" = "x"; then
48847     with_zlib=${DEFAULT_ZLIB}
48848   fi
48849 
48850   if test "x${with_zlib}" = "xbundled"; then
48851     USE_EXTERNAL_LIBZ=false
48852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48853 $as_echo "bundled" >&6; }
48854   elif test "x${with_zlib}" = "xsystem"; then
48855     if test "x${ZLIB_FOUND}" = "xyes"; then
48856       USE_EXTERNAL_LIBZ=true
48857       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48858 $as_echo "system" >&6; }
48859     else
48860       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48861 $as_echo "system not found" >&6; }
48862       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48863     fi
48864   else
48865     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48866   fi
48867 
48868 
48869 
48870   ###############################################################################
48871   LIBZIP_CAN_USE_MMAP=true
48872 
48873 
48874 
48875   ###############################################################################
48876   #
48877   # Check if altzone exists in time.h
48878   #
48879 
48880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48881 /* end confdefs.h.  */
48882 #include <time.h>
48883 int
48884 main ()
48885 {
48886 return (int)altzone;
48887   ;
48888   return 0;
48889 }
48890 _ACEOF
48891 if ac_fn_cxx_try_link "$LINENO"; then :
48892   has_altzone=yes
48893 else
48894   has_altzone=no
48895 fi
48896 rm -f core conftest.err conftest.$ac_objext \
48897     conftest$ac_exeext conftest.$ac_ext
48898   if test "x$has_altzone" = xyes; then
48899 
48900 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48901 
48902   fi
48903 
48904   ###############################################################################
48905   #
48906   # Check the maths library
48907   #
48908 
48909   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48910 $as_echo_n "checking for cos in -lm... " >&6; }
48911 if ${ac_cv_lib_m_cos+:} false; then :
48912   $as_echo_n "(cached) " >&6
48913 else
48914   ac_check_lib_save_LIBS=$LIBS
48915 LIBS="-lm  $LIBS"
48916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48917 /* end confdefs.h.  */
48918 
48919 /* Override any GCC internal prototype to avoid an error.
48920    Use char because int might match the return type of a GCC
48921    builtin and then its argument prototype would still apply.  */
48922 #ifdef __cplusplus
48923 extern "C"
48924 #endif
48925 char cos ();
48926 int
48927 main ()
48928 {
48929 return cos ();
48930   ;
48931   return 0;
48932 }
48933 _ACEOF
48934 if ac_fn_cxx_try_link "$LINENO"; then :
48935   ac_cv_lib_m_cos=yes
48936 else
48937   ac_cv_lib_m_cos=no
48938 fi
48939 rm -f core conftest.err conftest.$ac_objext \
48940     conftest$ac_exeext conftest.$ac_ext
48941 LIBS=$ac_check_lib_save_LIBS
48942 fi
48943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48944 $as_echo "$ac_cv_lib_m_cos" >&6; }
48945 if test "x$ac_cv_lib_m_cos" = xyes; then :
48946   cat >>confdefs.h <<_ACEOF
48947 #define HAVE_LIBM 1
48948 _ACEOF
48949 
48950   LIBS="-lm $LIBS"
48951 
48952 else
48953 
48954         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48955 $as_echo "$as_me: Maths library was not found" >&6;}
48956 
48957 
48958 fi
48959 
48960 
48961 
48962   ###############################################################################
48963   #
48964   # Check for libdl.so
48965 
48966   save_LIBS="$LIBS"
48967   LIBS=""
48968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48969 $as_echo_n "checking for dlopen in -ldl... " >&6; }
48970 if ${ac_cv_lib_dl_dlopen+:} false; then :
48971   $as_echo_n "(cached) " >&6
48972 else
48973   ac_check_lib_save_LIBS=$LIBS
48974 LIBS="-ldl  $LIBS"
48975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48976 /* end confdefs.h.  */
48977 
48978 /* Override any GCC internal prototype to avoid an error.
48979    Use char because int might match the return type of a GCC
48980    builtin and then its argument prototype would still apply.  */
48981 #ifdef __cplusplus
48982 extern "C"
48983 #endif
48984 char dlopen ();
48985 int
48986 main ()
48987 {
48988 return dlopen ();
48989   ;
48990   return 0;
48991 }
48992 _ACEOF
48993 if ac_fn_cxx_try_link "$LINENO"; then :
48994   ac_cv_lib_dl_dlopen=yes
48995 else
48996   ac_cv_lib_dl_dlopen=no
48997 fi
48998 rm -f core conftest.err conftest.$ac_objext \
48999     conftest$ac_exeext conftest.$ac_ext
49000 LIBS=$ac_check_lib_save_LIBS
49001 fi
49002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49003 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49004 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49005   cat >>confdefs.h <<_ACEOF
49006 #define HAVE_LIBDL 1
49007 _ACEOF
49008 
49009   LIBS="-ldl $LIBS"
49010 
49011 fi
49012 
49013   LIBDL="$LIBS"
49014 
49015   LIBS="$save_LIBS"
49016 
49017 
49018   ###############################################################################
49019   #
49020   # statically link libstdc++ before C++ ABI is stablized on Linux unless
49021   # dynamic build is configured on command line.
49022   #
49023 
49024 # Check whether --with-stdc++lib was given.
49025 if test "${with_stdc__lib+set}" = set; then :
49026   withval=$with_stdc__lib;
49027         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49028                 && test "x$with_stdc__lib" != xdefault; then
49029           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49030         fi
49031 
49032 else
49033   with_stdc__lib=default
49034 
49035 fi
49036 
49037 
49038   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49039     # Test if -lstdc++ works.
49040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49041 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49042     ac_ext=cpp
49043 ac_cpp='$CXXCPP $CPPFLAGS'
49044 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49045 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49046 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49047 
49048     OLD_CXXFLAGS="$CXXFLAGS"
49049     CXXFLAGS="$CXXFLAGS -lstdc++"
49050     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49051 /* end confdefs.h.  */
49052 
49053 int
49054 main ()
49055 {
49056 return 0;
49057   ;
49058   return 0;
49059 }
49060 _ACEOF
49061 if ac_fn_cxx_try_link "$LINENO"; then :
49062   has_dynamic_libstdcxx=yes
49063 else
49064   has_dynamic_libstdcxx=no
49065 fi
49066 rm -f core conftest.err conftest.$ac_objext \
49067     conftest$ac_exeext conftest.$ac_ext
49068     CXXFLAGS="$OLD_CXXFLAGS"
49069     ac_ext=cpp
49070 ac_cpp='$CXXCPP $CPPFLAGS'
49071 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49072 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49073 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49074 
49075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49076 $as_echo "$has_dynamic_libstdcxx" >&6; }
49077 
49078     # Test if stdc++ can be linked statically.
49079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49080 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49081     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49082     ac_ext=cpp
49083 ac_cpp='$CXXCPP $CPPFLAGS'
49084 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49085 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49086 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49087 
49088     OLD_LIBS="$LIBS"
49089     OLD_CXX="$CXX"
49090     LIBS="$STATIC_STDCXX_FLAGS"
49091     CXX="$CC"
49092     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49093 /* end confdefs.h.  */
49094 
49095 int
49096 main ()
49097 {
49098 return 0;
49099   ;
49100   return 0;
49101 }
49102 _ACEOF
49103 if ac_fn_cxx_try_link "$LINENO"; then :
49104   has_static_libstdcxx=yes
49105 else
49106   has_static_libstdcxx=no
49107 fi
49108 rm -f core conftest.err conftest.$ac_objext \
49109     conftest$ac_exeext conftest.$ac_ext
49110     LIBS="$OLD_LIBS"
49111     CXX="$OLD_CXX"
49112     ac_ext=cpp
49113 ac_cpp='$CXXCPP $CPPFLAGS'
49114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49117 
49118     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49119 $as_echo "$has_static_libstdcxx" >&6; }
49120 
49121     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49122       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49123     fi
49124 
49125     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49126       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49127     fi
49128 
49129     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49130       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49131     fi
49132 
49133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49134 $as_echo_n "checking how to link with libstdc++... " >&6; }
49135     # If dynamic was requested, it's available since it would fail above otherwise.
49136     # If dynamic wasn't requested, go with static unless it isn't available.
49137     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49138       LIBCXX="$LIBCXX -lstdc++"
49139       LDCXX="$CXX"
49140       STATIC_CXX_SETTING="STATIC_CXX=false"
49141       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49142 $as_echo "dynamic" >&6; }
49143     else
49144       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49145       LDCXX="$CC"
49146       STATIC_CXX_SETTING="STATIC_CXX=true"
49147       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49148 $as_echo "static" >&6; }
49149     fi
49150   fi
49151 
49152 
49153   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49154     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49155 
49156 pkg_failed=no
49157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49158 $as_echo_n "checking for LIBFFI... " >&6; }
49159 
49160 if test -n "$LIBFFI_CFLAGS"; then
49161     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49162  elif test -n "$PKG_CONFIG"; then
49163     if test -n "$PKG_CONFIG" && \
49164     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49165   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49166   ac_status=$?
49167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49168   test $ac_status = 0; }; then
49169   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49170 else
49171   pkg_failed=yes
49172 fi
49173  else
49174     pkg_failed=untried
49175 fi
49176 if test -n "$LIBFFI_LIBS"; then
49177     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49178  elif test -n "$PKG_CONFIG"; then
49179     if test -n "$PKG_CONFIG" && \
49180     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49181   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49182   ac_status=$?
49183   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49184   test $ac_status = 0; }; then
49185   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49186 else
49187   pkg_failed=yes
49188 fi
49189  else
49190     pkg_failed=untried
49191 fi
49192 
49193 
49194 
49195 if test $pkg_failed = yes; then
49196 
49197 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49198         _pkg_short_errors_supported=yes
49199 else
49200         _pkg_short_errors_supported=no
49201 fi
49202         if test $_pkg_short_errors_supported = yes; then
49203                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49204         else
49205                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49206         fi
49207         # Put the nasty error message in config.log where it belongs
49208         echo "$LIBFFI_PKG_ERRORS" >&5
49209 
49210         as_fn_error $? "Package requirements (libffi) were not met:
49211 
49212 $LIBFFI_PKG_ERRORS
49213 
49214 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49215 installed software in a non-standard prefix.
49216 
49217 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49218 and LIBFFI_LIBS to avoid the need to call pkg-config.
49219 See the pkg-config man page for more details.
49220 " "$LINENO" 5
49221 elif test $pkg_failed = untried; then
49222         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49223 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49224 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49225 is in your PATH or set the PKG_CONFIG environment variable to the full
49226 path to pkg-config.
49227 
49228 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49229 and LIBFFI_LIBS to avoid the need to call pkg-config.
49230 See the pkg-config man page for more details.
49231 
49232 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49233 See \`config.log' for more details" "$LINENO" 5; }
49234 else
49235         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49236         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49237         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49238 $as_echo "yes" >&6; }
49239         :
49240 fi
49241 
49242   fi
49243 
49244   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49245     # Extract the first word of "llvm-config", so it can be a program name with args.
49246 set dummy llvm-config; ac_word=$2
49247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49248 $as_echo_n "checking for $ac_word... " >&6; }
49249 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49250   $as_echo_n "(cached) " >&6
49251 else
49252   if test -n "$LLVM_CONFIG"; then
49253   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49254 else
49255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49256 for as_dir in $PATH
49257 do
49258   IFS=$as_save_IFS
49259   test -z "$as_dir" && as_dir=.
49260     for ac_exec_ext in '' $ac_executable_extensions; do
49261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49262     ac_cv_prog_LLVM_CONFIG="llvm-config"
49263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49264     break 2
49265   fi
49266 done
49267   done
49268 IFS=$as_save_IFS
49269 
49270 fi
49271 fi
49272 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49273 if test -n "$LLVM_CONFIG"; then
49274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49275 $as_echo "$LLVM_CONFIG" >&6; }
49276 else
49277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49278 $as_echo "no" >&6; }
49279 fi
49280 
49281 
49282 
49283     if test "x$LLVM_CONFIG" != xllvm-config; then
49284       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49285     fi
49286 
49287     llvm_components="jit mcjit engine nativecodegen native"
49288     unset LLVM_CFLAGS
49289     for flag in $("$LLVM_CONFIG" --cxxflags); do
49290       if echo "${flag}" | grep -q '^-[ID]'; then
49291         if test "${flag}" != "-D_DEBUG" ; then
49292           if test "${LLVM_CFLAGS}" != "" ; then
49293             LLVM_CFLAGS="${LLVM_CFLAGS} "
49294           fi
49295           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49296         fi
49297       fi
49298     done
49299     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49300     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49301 
49302     unset LLVM_LDFLAGS
49303     for flag in $("${LLVM_CONFIG}" --ldflags); do
49304       if echo "${flag}" | grep -q '^-L'; then
49305         if test "${LLVM_LDFLAGS}" != ""; then
49306           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49307         fi
49308         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49309       fi
49310     done
49311 
49312     unset LLVM_LIBS
49313     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49314       if echo "${flag}" | grep -q '^-l'; then
49315         if test "${LLVM_LIBS}" != ""; then
49316           LLVM_LIBS="${LLVM_LIBS} "
49317         fi
49318         LLVM_LIBS="${LLVM_LIBS}${flag}"
49319       fi
49320     done
49321 
49322 
49323 
49324 
49325   fi
49326 
49327   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49328   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49329     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49330   fi
49331 
49332   # TODO better (platform agnostic) test
49333   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49334     LIBCXX="-lstdc++"
49335   fi
49336 
49337 
49338 
49339 
49340   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49341 
49342 
49343 # Check whether --with-msvcr-dll was given.
49344 if test "${with_msvcr_dll+set}" = set; then :
49345   withval=$with_msvcr_dll;
49346 fi
49347 
49348 
49349   if test "x$with_msvcr_dll" != x; then
49350     # If given explicitely by user, do not probe. If not present, fail directly.
49351 
49352   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49353   METHOD="--with-msvcr-dll"
49354   if test -e "$POSSIBLE_MSVCR_DLL"; then
49355     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49356 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49357 
49358     # Need to check if the found msvcr is correct architecture
49359     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49360 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49361     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49362     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49363       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49364       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49365       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49366         CORRECT_MSVCR_ARCH="PE32 executable"
49367       else
49368         CORRECT_MSVCR_ARCH="PE32+ executable"
49369       fi
49370     else
49371       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49372         CORRECT_MSVCR_ARCH=386
49373       else
49374         CORRECT_MSVCR_ARCH=x86-64
49375       fi
49376     fi
49377     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49378       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49379 $as_echo "ok" >&6; }
49380       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49381       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49382 $as_echo_n "checking for msvcr100.dll... " >&6; }
49383       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49384 $as_echo "$MSVCR_DLL" >&6; }
49385     else
49386       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49387 $as_echo "incorrect, ignoring" >&6; }
49388       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49389 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49390     fi
49391   fi
49392 
49393     if test "x$MSVCR_DLL" = x; then
49394       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49395     fi
49396   fi
49397 
49398   if test "x$MSVCR_DLL" = x; then
49399     # Probe: Using well-known location from Visual Studio 10.0
49400     if test "x$VCINSTALLDIR" != x; then
49401       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49402 
49403   windows_path="$CYGWIN_VC_INSTALL_DIR"
49404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49405     unix_path=`$CYGPATH -u "$windows_path"`
49406     CYGWIN_VC_INSTALL_DIR="$unix_path"
49407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49409     CYGWIN_VC_INSTALL_DIR="$unix_path"
49410   fi
49411 
49412       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49413         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49414       else
49415         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49416       fi
49417 
49418   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49419   METHOD="well-known location in VCINSTALLDIR"
49420   if test -e "$POSSIBLE_MSVCR_DLL"; then
49421     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49422 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49423 
49424     # Need to check if the found msvcr is correct architecture
49425     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49426 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49427     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49428     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49429       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49430       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49431       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49432         CORRECT_MSVCR_ARCH="PE32 executable"
49433       else
49434         CORRECT_MSVCR_ARCH="PE32+ executable"
49435       fi
49436     else
49437       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49438         CORRECT_MSVCR_ARCH=386
49439       else
49440         CORRECT_MSVCR_ARCH=x86-64
49441       fi
49442     fi
49443     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49444       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49445 $as_echo "ok" >&6; }
49446       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49447       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49448 $as_echo_n "checking for msvcr100.dll... " >&6; }
49449       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49450 $as_echo "$MSVCR_DLL" >&6; }
49451     else
49452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49453 $as_echo "incorrect, ignoring" >&6; }
49454       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49455 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49456     fi
49457   fi
49458 
49459     fi
49460   fi
49461 
49462   if test "x$MSVCR_DLL" = x; then
49463     # Probe: Check in the Boot JDK directory.
49464     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49465 
49466   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49467   METHOD="well-known location in Boot JDK"
49468   if test -e "$POSSIBLE_MSVCR_DLL"; then
49469     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49470 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49471 
49472     # Need to check if the found msvcr is correct architecture
49473     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49474 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49475     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49476     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49477       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49478       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49479       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49480         CORRECT_MSVCR_ARCH="PE32 executable"
49481       else
49482         CORRECT_MSVCR_ARCH="PE32+ executable"
49483       fi
49484     else
49485       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49486         CORRECT_MSVCR_ARCH=386
49487       else
49488         CORRECT_MSVCR_ARCH=x86-64
49489       fi
49490     fi
49491     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49492       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49493 $as_echo "ok" >&6; }
49494       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49495       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49496 $as_echo_n "checking for msvcr100.dll... " >&6; }
49497       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49498 $as_echo "$MSVCR_DLL" >&6; }
49499     else
49500       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49501 $as_echo "incorrect, ignoring" >&6; }
49502       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49503 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49504     fi
49505   fi
49506 
49507   fi
49508 
49509   if test "x$MSVCR_DLL" = x; then
49510     # Probe: Look in the Windows system32 directory
49511     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49512 
49513   windows_path="$CYGWIN_SYSTEMROOT"
49514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49515     unix_path=`$CYGPATH -u "$windows_path"`
49516     CYGWIN_SYSTEMROOT="$unix_path"
49517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49519     CYGWIN_SYSTEMROOT="$unix_path"
49520   fi
49521 
49522     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49523 
49524   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49525   METHOD="well-known location in SYSTEMROOT"
49526   if test -e "$POSSIBLE_MSVCR_DLL"; then
49527     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49528 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49529 
49530     # Need to check if the found msvcr is correct architecture
49531     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49532 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49533     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49534     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49535       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49536       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49537       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49538         CORRECT_MSVCR_ARCH="PE32 executable"
49539       else
49540         CORRECT_MSVCR_ARCH="PE32+ executable"
49541       fi
49542     else
49543       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49544         CORRECT_MSVCR_ARCH=386
49545       else
49546         CORRECT_MSVCR_ARCH=x86-64
49547       fi
49548     fi
49549     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49550       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49551 $as_echo "ok" >&6; }
49552       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49553       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49554 $as_echo_n "checking for msvcr100.dll... " >&6; }
49555       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49556 $as_echo "$MSVCR_DLL" >&6; }
49557     else
49558       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49559 $as_echo "incorrect, ignoring" >&6; }
49560       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49561 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49562     fi
49563   fi
49564 
49565   fi
49566 
49567   if test "x$MSVCR_DLL" = x; then
49568     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49569     if test "x$VS100COMNTOOLS" != x; then
49570       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49571 
49572   windows_path="$CYGWIN_VS_TOOLS_DIR"
49573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49574     unix_path=`$CYGPATH -u "$windows_path"`
49575     CYGWIN_VS_TOOLS_DIR="$unix_path"
49576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49578     CYGWIN_VS_TOOLS_DIR="$unix_path"
49579   fi
49580 
49581       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49582         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49583       else
49584         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49585       fi
49586 
49587   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49588   METHOD="search of VS100COMNTOOLS"
49589   if test -e "$POSSIBLE_MSVCR_DLL"; then
49590     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49591 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49592 
49593     # Need to check if the found msvcr is correct architecture
49594     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49595 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49596     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49597     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49598       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49599       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49600       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49601         CORRECT_MSVCR_ARCH="PE32 executable"
49602       else
49603         CORRECT_MSVCR_ARCH="PE32+ executable"
49604       fi
49605     else
49606       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49607         CORRECT_MSVCR_ARCH=386
49608       else
49609         CORRECT_MSVCR_ARCH=x86-64
49610       fi
49611     fi
49612     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49613       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49614 $as_echo "ok" >&6; }
49615       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49616       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49617 $as_echo_n "checking for msvcr100.dll... " >&6; }
49618       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49619 $as_echo "$MSVCR_DLL" >&6; }
49620     else
49621       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49622 $as_echo "incorrect, ignoring" >&6; }
49623       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49624 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49625     fi
49626   fi
49627 
49628     fi
49629   fi
49630 
49631   if test "x$MSVCR_DLL" = x; then
49632     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49633     # (This was the original behaviour; kept since it might turn up something)
49634     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49635       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49636         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49637       else
49638         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49639         if test "x$POSSIBLE_MSVCR_DLL" = x; then
49640           # We're grasping at straws now...
49641           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49642         fi
49643       fi
49644 
49645 
49646   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49647   METHOD="search of VCINSTALLDIR"
49648   if test -e "$POSSIBLE_MSVCR_DLL"; then
49649     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49650 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49651 
49652     # Need to check if the found msvcr is correct architecture
49653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49654 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49655     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49656     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49657       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49658       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49659       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49660         CORRECT_MSVCR_ARCH="PE32 executable"
49661       else
49662         CORRECT_MSVCR_ARCH="PE32+ executable"
49663       fi
49664     else
49665       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49666         CORRECT_MSVCR_ARCH=386
49667       else
49668         CORRECT_MSVCR_ARCH=x86-64
49669       fi
49670     fi
49671     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49672       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49673 $as_echo "ok" >&6; }
49674       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49675       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49676 $as_echo_n "checking for msvcr100.dll... " >&6; }
49677       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49678 $as_echo "$MSVCR_DLL" >&6; }
49679     else
49680       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49681 $as_echo "incorrect, ignoring" >&6; }
49682       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49683 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49684     fi
49685   fi
49686 
49687     fi
49688   fi
49689 
49690   if test "x$MSVCR_DLL" = x; then
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: no" >&5
49694 $as_echo "no" >&6; }
49695     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49696   fi
49697 
49698 
49699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49700 
49701   # Input might be given as Windows format, start by converting to
49702   # unix format.
49703   path="$MSVCR_DLL"
49704   new_path=`$CYGPATH -u "$path"`
49705 
49706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49709   # "foo.exe" is OK but "foo" is an error.
49710   #
49711   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49712   # It is also a way to make sure we got the proper file name for the real test later on.
49713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49714   if test "x$test_shortpath" = x; then
49715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49716 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49717     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49718   fi
49719 
49720   # Call helper function which possibly converts this using DOS-style short mode.
49721   # If so, the updated path is stored in $new_path.
49722 
49723   input_path="$new_path"
49724   # Check if we need to convert this using DOS-style short mode. If the path
49725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49726   # take no chances and rewrite it.
49727   # Note: m4 eats our [], so we need to use [ and ] instead.
49728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49729   if test "x$has_forbidden_chars" != x; then
49730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49734       # Going to short mode and back again did indeed matter. Since short mode is
49735       # case insensitive, let's make it lowercase to improve readability.
49736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49737       # Now convert it back to Unix-stile (cygpath)
49738       input_path=`$CYGPATH -u "$shortmode_path"`
49739       new_path="$input_path"
49740     fi
49741   fi
49742 
49743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49744   if test "x$test_cygdrive_prefix" = x; then
49745     # As a simple fix, exclude /usr/bin since it's not a real path.
49746     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49748       # a path prefixed by /cygdrive for fixpath to work.
49749       new_path="$CYGWIN_ROOT_PATH$input_path"
49750     fi
49751   fi
49752 
49753 
49754   if test "x$path" != "x$new_path"; then
49755     MSVCR_DLL="$new_path"
49756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49757 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49758   fi
49759 
49760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49761 
49762   path="$MSVCR_DLL"
49763   has_colon=`$ECHO $path | $GREP ^.:`
49764   new_path="$path"
49765   if test "x$has_colon" = x; then
49766     # Not in mixed or Windows style, start by that.
49767     new_path=`cmd //c echo $path`
49768   fi
49769 
49770 
49771   input_path="$new_path"
49772   # Check if we need to convert this using DOS-style short mode. If the path
49773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49774   # take no chances and rewrite it.
49775   # Note: m4 eats our [], so we need to use [ and ] instead.
49776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49777   if test "x$has_forbidden_chars" != x; then
49778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49780   fi
49781 
49782 
49783   windows_path="$new_path"
49784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49785     unix_path=`$CYGPATH -u "$windows_path"`
49786     new_path="$unix_path"
49787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49789     new_path="$unix_path"
49790   fi
49791 
49792   if test "x$path" != "x$new_path"; then
49793     MSVCR_DLL="$new_path"
49794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49795 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49796   fi
49797 
49798   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49799   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49800 
49801   else
49802     # We're on a unix platform. Hooray! :)
49803     path="$MSVCR_DLL"
49804     has_space=`$ECHO "$path" | $GREP " "`
49805     if test "x$has_space" != x; then
49806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49807 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49808       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49809     fi
49810 
49811     # Use eval to expand a potential ~
49812     eval path="$path"
49813     if test ! -f "$path" && test ! -d "$path"; then
49814       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49815     fi
49816 
49817     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49818   fi
49819 
49820 
49821 
49822 
49823 # Check whether --with-dxsdk was given.
49824 if test "${with_dxsdk+set}" = set; then :
49825   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49826 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49827 fi
49828 
49829 
49830 
49831 
49832 # Check whether --with-dxsdk-lib was given.
49833 if test "${with_dxsdk_lib+set}" = set; then :
49834   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49835 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49836 fi
49837 
49838 
49839 
49840 
49841 # Check whether --with-dxsdk-include was given.
49842 if test "${with_dxsdk_include+set}" = set; then :
49843   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49844 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49845 fi
49846 
49847 
49848   fi
49849 
49850 
49851 
49852 ###############################################################################
49853 #
49854 # We need to do some final tweaking, when everything else is done.
49855 #
49856 ###############################################################################
49857 
49858 
49859   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49860 
49861 
49862   # The name of the Service Agent jar.
49863   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49864   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49865     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49866   fi
49867 
49868 
49869 
49870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49871 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49872 
49873     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
49874       ENABLE_INTREE_EC=yes
49875       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49876 $as_echo "yes" >&6; }
49877     else
49878       ENABLE_INTREE_EC=no
49879       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49880 $as_echo "no" >&6; }
49881     fi
49882 
49883 
49884 
49885 
49886 ###############################################################################
49887 #
49888 # Configure parts of the build that only affect the build performance,
49889 # not the result.
49890 #
49891 ###############################################################################
49892 
49893 
49894   # How many cores do we have on this build system?
49895 
49896 # Check whether --with-num-cores was given.
49897 if test "${with_num_cores+set}" = set; then :
49898   withval=$with_num_cores;
49899 fi
49900 
49901   if test "x$with_num_cores" = x; then
49902     # The number of cores were not specified, try to probe them.
49903 
49904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49905 $as_echo_n "checking for number of cores... " >&6; }
49906   NUM_CORES=1
49907   FOUND_CORES=no
49908 
49909   if test -f /proc/cpuinfo; then
49910     # Looks like a Linux (or cygwin) system
49911     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49912     FOUND_CORES=yes
49913   elif test -x /usr/sbin/psrinfo; then
49914     # Looks like a Solaris system
49915     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49916     FOUND_CORES=yes
49917   elif test -x /usr/sbin/system_profiler; then
49918     # Looks like a MacOSX system
49919     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49920     FOUND_CORES=yes
49921   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49922     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49923     FOUND_CORES=yes
49924   elif test -n "$NUMBER_OF_PROCESSORS"; then
49925     # On windows, look in the env
49926     NUM_CORES=$NUMBER_OF_PROCESSORS
49927     FOUND_CORES=yes
49928   fi
49929 
49930   if test "x$FOUND_CORES" = xyes; then
49931     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49932 $as_echo "$NUM_CORES" >&6; }
49933   else
49934     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49935 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
49936     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49937 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49938   fi
49939 
49940   else
49941     NUM_CORES=$with_num_cores
49942   fi
49943 
49944 
49945 
49946   # How much memory do we have on this build system?
49947 
49948 # Check whether --with-memory-size was given.
49949 if test "${with_memory_size+set}" = set; then :
49950   withval=$with_memory_size;
49951 fi
49952 
49953   if test "x$with_memory_size" = x; then
49954     # The memory size was not specified, try to probe it.
49955 
49956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49957 $as_echo_n "checking for memory size... " >&6; }
49958   # Default to 1024 MB
49959   MEMORY_SIZE=1024
49960   FOUND_MEM=no
49961 
49962   if test -f /proc/meminfo; then
49963     # Looks like a Linux (or cygwin) system
49964     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49965     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49966     FOUND_MEM=yes
49967   elif test -x /usr/sbin/prtconf; then
49968     # Looks like a Solaris or AIX system
49969     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49970     FOUND_MEM=yes
49971   elif test -x /usr/sbin/system_profiler; then
49972     # Looks like a MacOSX system
49973     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49974     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49975     FOUND_MEM=yes
49976   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49977     # Windows, but without cygwin
49978     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49979     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49980     FOUND_MEM=yes
49981   fi
49982 
49983   if test "x$FOUND_MEM" = xyes; then
49984     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49985 $as_echo "$MEMORY_SIZE MB" >&6; }
49986   else
49987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49988 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49989     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49990 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49991   fi
49992 
49993   else
49994     MEMORY_SIZE=$with_memory_size
49995   fi
49996 
49997 
49998 
49999   # Provide a decent default number of parallel jobs for make depending on
50000   # number of cores, amount of memory and machine architecture.
50001 
50002 # Check whether --with-jobs was given.
50003 if test "${with_jobs+set}" = set; then :
50004   withval=$with_jobs;
50005 fi
50006 
50007   if test "x$with_jobs" = x; then
50008     # Number of jobs was not specified, calculate.
50009     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50010 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50011     # Approximate memory in GB.
50012     memory_gb=`expr $MEMORY_SIZE / 1024`
50013     # Pick the lowest of memory in gb and number of cores.
50014     if test "$memory_gb" -lt "$NUM_CORES"; then
50015       JOBS="$memory_gb"
50016     else
50017       JOBS="$NUM_CORES"
50018       # On bigger machines, leave some room for other processes to run
50019       if test "$JOBS" -gt "4"; then
50020         JOBS=`expr $JOBS '*' 90 / 100`
50021       fi
50022     fi
50023     # Cap number of jobs to 16
50024     if test "$JOBS" -gt "16"; then
50025       JOBS=16
50026     fi
50027     if test "$JOBS" -eq "0"; then
50028       JOBS=1
50029     fi
50030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50031 $as_echo "$JOBS" >&6; }
50032   else
50033     JOBS=$with_jobs
50034   fi
50035 
50036 
50037 
50038 # Setup arguments for the boot jdk (after cores and memory have been setup)
50039 
50040   ##############################################################################
50041   #
50042   # Specify jvm options for anything that is run with the Boot JDK.
50043   # Not all JVM:s accept the same arguments on the command line.
50044   #
50045 
50046 # Check whether --with-boot-jdk-jvmargs was given.
50047 if test "${with_boot_jdk_jvmargs+set}" = set; then :
50048   withval=$with_boot_jdk_jvmargs;
50049 fi
50050 
50051 
50052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50053 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
50054 
50055   # Disable special log output when a debug build is used as Boot JDK...
50056 
50057   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50058   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50059   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50060   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50061   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50062   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50063     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50064     JVM_ARG_OK=true
50065   else
50066     $ECHO "Arg failed:" >&5
50067     $ECHO "$OUTPUT" >&5
50068     JVM_ARG_OK=false
50069   fi
50070 
50071 
50072   # Apply user provided options.
50073 
50074   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50075   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50076   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50077   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50078   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50079   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50080     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50081     JVM_ARG_OK=true
50082   else
50083     $ECHO "Arg failed:" >&5
50084     $ECHO "$OUTPUT" >&5
50085     JVM_ARG_OK=false
50086   fi
50087 
50088 
50089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50090 $as_echo "$boot_jdk_jvmargs" >&6; }
50091 
50092   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50093   JAVA_FLAGS=$boot_jdk_jvmargs
50094 
50095 
50096 
50097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50098 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50099 
50100   # Starting amount of heap memory.
50101 
50102   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50103   $ECHO "Command: $JAVA -Xms64M -version" >&5
50104   OUTPUT=`$JAVA -Xms64M -version 2>&1`
50105   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50106   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50107   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50108     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50109     JVM_ARG_OK=true
50110   else
50111     $ECHO "Arg failed:" >&5
50112     $ECHO "$OUTPUT" >&5
50113     JVM_ARG_OK=false
50114   fi
50115 
50116 
50117   # Maximum amount of heap memory.
50118   # Maximum stack size.
50119   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50120   if test "x$BUILD_NUM_BITS" = x32; then
50121     if test "$JVM_MAX_HEAP" -gt "1100"; then
50122       JVM_MAX_HEAP=1100
50123     elif test "$JVM_MAX_HEAP" -lt "512"; then
50124       JVM_MAX_HEAP=512
50125     fi
50126     STACK_SIZE=768
50127   else
50128     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50129     # pointers are used. Apparently, we need to increase the heap and stack
50130     # space for the jvm. More specifically, when running javac to build huge
50131     # jdk batch
50132     if test "$JVM_MAX_HEAP" -gt "1600"; then
50133       JVM_MAX_HEAP=1600
50134     elif test "$JVM_MAX_HEAP" -lt "512"; then
50135       JVM_MAX_HEAP=512
50136     fi
50137     STACK_SIZE=1536
50138   fi
50139 
50140   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50141   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50142   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50143   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50144   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50145   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50146     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50147     JVM_ARG_OK=true
50148   else
50149     $ECHO "Arg failed:" >&5
50150     $ECHO "$OUTPUT" >&5
50151     JVM_ARG_OK=false
50152   fi
50153 
50154 
50155   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50156   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50157   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50158   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50159   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50160   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50161     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50162     JVM_ARG_OK=true
50163   else
50164     $ECHO "Arg failed:" >&5
50165     $ECHO "$OUTPUT" >&5
50166     JVM_ARG_OK=false
50167   fi
50168 
50169 
50170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50171 $as_echo "$boot_jdk_jvmargs_big" >&6; }
50172 
50173   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50174 
50175 
50176 
50177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50178 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50179 
50180   # Use serial gc for small short lived tools if possible
50181 
50182   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50183   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50184   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50185   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50186   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50187   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50188     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50189     JVM_ARG_OK=true
50190   else
50191     $ECHO "Arg failed:" >&5
50192     $ECHO "$OUTPUT" >&5
50193     JVM_ARG_OK=false
50194   fi
50195 
50196 
50197   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50198   $ECHO "Command: $JAVA -Xms32M -version" >&5
50199   OUTPUT=`$JAVA -Xms32M -version 2>&1`
50200   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50201   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50202   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50203     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50204     JVM_ARG_OK=true
50205   else
50206     $ECHO "Arg failed:" >&5
50207     $ECHO "$OUTPUT" >&5
50208     JVM_ARG_OK=false
50209   fi
50210 
50211 
50212   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50213   $ECHO "Command: $JAVA -Xmx512M -version" >&5
50214   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50215   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50216   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50217   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50218     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50219     JVM_ARG_OK=true
50220   else
50221     $ECHO "Arg failed:" >&5
50222     $ECHO "$OUTPUT" >&5
50223     JVM_ARG_OK=false
50224   fi
50225 
50226 
50227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50228 $as_echo "$boot_jdk_jvmargs_small" >&6; }
50229 
50230   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50231 
50232 
50233   JAVA_TOOL_FLAGS_SMALL=""
50234   for f in $JAVA_FLAGS_SMALL; do
50235     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50236   done
50237 
50238 
50239 
50240 # Setup smart javac (after cores and memory have been setup)
50241 
50242 
50243 # Check whether --with-sjavac-server-java was given.
50244 if test "${with_sjavac_server_java+set}" = set; then :
50245   withval=$with_sjavac_server_java;
50246 fi
50247 
50248 
50249   if test "x$with_sjavac_server_java" != x; then
50250     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50251     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50252     if test "x$FOUND_VERSION" = x; then
50253       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50254     fi
50255   else
50256     SJAVAC_SERVER_JAVA="$JAVA"
50257   fi
50258 
50259 
50260   if test "$MEMORY_SIZE" -gt "3000"; then
50261 
50262   $ECHO "Check if jvm arg is ok: -d64" >&5
50263   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50264   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50265   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50266   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50267   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50268     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50269     JVM_ARG_OK=true
50270   else
50271     $ECHO "Arg failed:" >&5
50272     $ECHO "$OUTPUT" >&5
50273     JVM_ARG_OK=false
50274   fi
50275 
50276     if test "$JVM_ARG_OK" = true; then
50277       JVM_64BIT=true
50278       JVM_ARG_OK=false
50279     fi
50280   fi
50281 
50282   MX_VALUE=`expr $MEMORY_SIZE / 2`
50283   if test "$JVM_64BIT" = true; then
50284     # Set ms lower than mx since more than one instance of the server might
50285     # get launched at the same time before they figure out which instance won.
50286     MS_VALUE=512
50287     if test "$MX_VALUE" -gt "2048"; then
50288       MX_VALUE=2048
50289     fi
50290   else
50291     MS_VALUE=256
50292     if test "$MX_VALUE" -gt "1500"; then
50293       MX_VALUE=1500
50294     fi
50295   fi
50296   if test "$MX_VALUE" -lt "512"; then
50297     MX_VALUE=512
50298   fi
50299 
50300   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50301   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50302   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50303   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50304   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50305   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50306     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50307     JVM_ARG_OK=true
50308   else
50309     $ECHO "Arg failed:" >&5
50310     $ECHO "$OUTPUT" >&5
50311     JVM_ARG_OK=false
50312   fi
50313 
50314 
50315 
50316   # Check whether --enable-sjavac was given.
50317 if test "${enable_sjavac+set}" = set; then :
50318   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50319 else
50320   ENABLE_SJAVAC='no'
50321 fi
50322 
50323   if test "x$JVM_ARG_OK" = "xfalse"; then
50324     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50325 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50326     ENABLE_SJAVAC=no;
50327   fi
50328   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50329 $as_echo_n "checking whether to use sjavac... " >&6; }
50330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50331 $as_echo "$ENABLE_SJAVAC" >&6; }
50332 
50333 
50334   if test "x$ENABLE_SJAVAC" = xyes; then
50335     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50336   else
50337     SJAVAC_SERVER_DIR=
50338   fi
50339 
50340 
50341 
50342 # Can the C/C++ compiler use precompiled headers?
50343 
50344 
50345   ###############################################################################
50346   #
50347   # Can the C/C++ compiler use precompiled headers?
50348   #
50349   # Check whether --enable-precompiled-headers was given.
50350 if test "${enable_precompiled_headers+set}" = set; then :
50351   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50352 else
50353   ENABLE_PRECOMPH=yes
50354 fi
50355 
50356 
50357   USE_PRECOMPILED_HEADER=1
50358   if test "x$ENABLE_PRECOMPH" = xno; then
50359     USE_PRECOMPILED_HEADER=0
50360   fi
50361 
50362   if test "x$ENABLE_PRECOMPH" = xyes; then
50363     # Check that the compiler actually supports precomp headers.
50364     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50365       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50366 $as_echo_n "checking that precompiled headers work... " >&6; }
50367       echo "int alfa();" > conftest.h
50368       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50369       if test ! -f conftest.hpp.gch; then
50370         USE_PRECOMPILED_HEADER=0
50371         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50372 $as_echo "no" >&6; }
50373       else
50374         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50375 $as_echo "yes" >&6; }
50376       fi
50377       rm -f conftest.h conftest.hpp.gch
50378     fi
50379   fi
50380 
50381 
50382 
50383 
50384 # Setup use of ccache, if available
50385 
50386   # Check whether --enable-ccache was given.
50387 if test "${enable_ccache+set}" = set; then :
50388   enableval=$enable_ccache;
50389 fi
50390 
50391 
50392   CCACHE=
50393   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50394 $as_echo_n "checking is ccache enabled... " >&6; }
50395   ENABLE_CCACHE=$enable_ccache
50396   if test "x$enable_ccache" = xyes; then
50397     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50398 $as_echo "yes" >&6; }
50399     OLD_PATH="$PATH"
50400     if test "x$TOOLCHAIN_PATH" != x; then
50401       PATH=$TOOLCHAIN_PATH:$PATH
50402     fi
50403 
50404 
50405 
50406   # Publish this variable in the help.
50407 
50408 
50409   if test "x$CCACHE" = x; then
50410     # The variable is not set by user, try to locate tool using the code snippet
50411     for ac_prog in ccache
50412 do
50413   # Extract the first word of "$ac_prog", so it can be a program name with args.
50414 set dummy $ac_prog; ac_word=$2
50415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50416 $as_echo_n "checking for $ac_word... " >&6; }
50417 if ${ac_cv_path_CCACHE+:} false; then :
50418   $as_echo_n "(cached) " >&6
50419 else
50420   case $CCACHE in
50421   [\\/]* | ?:[\\/]*)
50422   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50423   ;;
50424   *)
50425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50426 for as_dir in $PATH
50427 do
50428   IFS=$as_save_IFS
50429   test -z "$as_dir" && as_dir=.
50430     for ac_exec_ext in '' $ac_executable_extensions; do
50431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50432     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50434     break 2
50435   fi
50436 done
50437   done
50438 IFS=$as_save_IFS
50439 
50440   ;;
50441 esac
50442 fi
50443 CCACHE=$ac_cv_path_CCACHE
50444 if test -n "$CCACHE"; then
50445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50446 $as_echo "$CCACHE" >&6; }
50447 else
50448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50449 $as_echo "no" >&6; }
50450 fi
50451 
50452 
50453   test -n "$CCACHE" && break
50454 done
50455 
50456   else
50457     # The variable is set, but is it from the command line or the environment?
50458 
50459     # Try to remove the string !CCACHE! from our list.
50460     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50461     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50462       # If it failed, the variable was not from the command line. Ignore it,
50463       # but warn the user (except for BASH, which is always set by the calling BASH).
50464       if test "xCCACHE" != xBASH; then
50465         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50466 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50467       fi
50468       # Try to locate tool using the code snippet
50469       for ac_prog in ccache
50470 do
50471   # Extract the first word of "$ac_prog", so it can be a program name with args.
50472 set dummy $ac_prog; ac_word=$2
50473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50474 $as_echo_n "checking for $ac_word... " >&6; }
50475 if ${ac_cv_path_CCACHE+:} false; then :
50476   $as_echo_n "(cached) " >&6
50477 else
50478   case $CCACHE in
50479   [\\/]* | ?:[\\/]*)
50480   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50481   ;;
50482   *)
50483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50484 for as_dir in $PATH
50485 do
50486   IFS=$as_save_IFS
50487   test -z "$as_dir" && as_dir=.
50488     for ac_exec_ext in '' $ac_executable_extensions; do
50489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50490     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50492     break 2
50493   fi
50494 done
50495   done
50496 IFS=$as_save_IFS
50497 
50498   ;;
50499 esac
50500 fi
50501 CCACHE=$ac_cv_path_CCACHE
50502 if test -n "$CCACHE"; then
50503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50504 $as_echo "$CCACHE" >&6; }
50505 else
50506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50507 $as_echo "no" >&6; }
50508 fi
50509 
50510 
50511   test -n "$CCACHE" && break
50512 done
50513 
50514     else
50515       # If it succeeded, then it was overridden by the user. We will use it
50516       # for the tool.
50517 
50518       # First remove it from the list of overridden variables, so we can test
50519       # for unknown variables in the end.
50520       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50521 
50522       # Check if the provided tool contains a complete path.
50523       tool_specified="$CCACHE"
50524       tool_basename="${tool_specified##*/}"
50525       if test "x$tool_basename" = "x$tool_specified"; then
50526         # A command without a complete path is provided, search $PATH.
50527         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50528 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50529         # Extract the first word of "$tool_basename", so it can be a program name with args.
50530 set dummy $tool_basename; ac_word=$2
50531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50532 $as_echo_n "checking for $ac_word... " >&6; }
50533 if ${ac_cv_path_CCACHE+:} false; then :
50534   $as_echo_n "(cached) " >&6
50535 else
50536   case $CCACHE in
50537   [\\/]* | ?:[\\/]*)
50538   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50539   ;;
50540   *)
50541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50542 for as_dir in $PATH
50543 do
50544   IFS=$as_save_IFS
50545   test -z "$as_dir" && as_dir=.
50546     for ac_exec_ext in '' $ac_executable_extensions; do
50547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50548     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50550     break 2
50551   fi
50552 done
50553   done
50554 IFS=$as_save_IFS
50555 
50556   ;;
50557 esac
50558 fi
50559 CCACHE=$ac_cv_path_CCACHE
50560 if test -n "$CCACHE"; then
50561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50562 $as_echo "$CCACHE" >&6; }
50563 else
50564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50565 $as_echo "no" >&6; }
50566 fi
50567 
50568 
50569         if test "x$CCACHE" = x; then
50570           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50571         fi
50572       else
50573         # Otherwise we believe it is a complete path. Use it as it is.
50574         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50575 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50576         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50577 $as_echo_n "checking for CCACHE... " >&6; }
50578         if test ! -x "$tool_specified"; then
50579           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50580 $as_echo "not found" >&6; }
50581           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50582         fi
50583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50584 $as_echo "$tool_specified" >&6; }
50585       fi
50586     fi
50587   fi
50588 
50589 
50590 
50591   if test "x$CCACHE" = x; then
50592     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50593   fi
50594 
50595 
50596     CCACHE_STATUS="enabled"
50597     PATH="$OLD_PATH"
50598   elif test "x$enable_ccache" = xno; then
50599     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50600 $as_echo "no, explicitly disabled" >&6; }
50601   elif test "x$enable_ccache" = x; then
50602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50603 $as_echo "no" >&6; }
50604   else
50605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50606 $as_echo "unknown" >&6; }
50607     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50608   fi
50609 
50610 
50611 
50612 # Check whether --with-ccache-dir was given.
50613 if test "${with_ccache_dir+set}" = set; then :
50614   withval=$with_ccache_dir;
50615 fi
50616 
50617 
50618   if test "x$with_ccache_dir" != x; then
50619     # When using a non home ccache directory, assume the use is to share ccache files
50620     # with other users. Thus change the umask.
50621     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50622     if test "x$CCACHE" = x; then
50623       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50624 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50625     fi
50626   fi
50627 
50628   if test "x$CCACHE" != x; then
50629 
50630   if test "x$CCACHE" != x; then
50631     # Only use ccache if it is 3.1.4 or later, which supports
50632     # precompiled headers.
50633     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50634 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50635     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50636     if test "x$HAS_GOOD_CCACHE" = x; then
50637       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50638 $as_echo "no, disabling ccache" >&6; }
50639       CCACHE=
50640       CCACHE_STATUS="disabled"
50641     else
50642       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50643 $as_echo "yes" >&6; }
50644       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50645 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50646       PUSHED_FLAGS="$CXXFLAGS"
50647       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50648       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50649 /* end confdefs.h.  */
50650 
50651 int
50652 main ()
50653 {
50654 
50655   ;
50656   return 0;
50657 }
50658 _ACEOF
50659 if ac_fn_cxx_try_compile "$LINENO"; then :
50660   CC_KNOWS_CCACHE_TRICK=yes
50661 else
50662   CC_KNOWS_CCACHE_TRICK=no
50663 fi
50664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50665       CXXFLAGS="$PUSHED_FLAGS"
50666       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50668 $as_echo "yes" >&6; }
50669       else
50670         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50671 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
50672         CCACHE=
50673         CCACHE_STATUS="disabled"
50674       fi
50675     fi
50676   fi
50677 
50678   if test "x$CCACHE" != x; then
50679     CCACHE_SLOPPINESS=time_macros
50680     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50681     CCACHE_FLAGS=-fpch-preprocess
50682 
50683     if test "x$SET_CCACHE_DIR" != x; then
50684       mkdir -p $CCACHE_DIR > /dev/null 2>&1
50685       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50686     fi
50687   fi
50688 
50689   fi
50690 
50691 
50692 ###############################################################################
50693 #
50694 # And now the finish...
50695 #
50696 ###############################################################################
50697 
50698 # Check for some common pitfalls
50699 
50700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50701     file_to_test="$SRC_ROOT/LICENSE"
50702     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50703       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
50704     fi
50705   fi
50706 
50707 
50708   # Did user specify any unknown variables?
50709 
50710   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50711     # Replace the separating ! with spaces before presenting for end user.
50712     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50713     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50714 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50715   fi
50716 
50717 
50718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50719 $as_echo_n "checking if build directory is on local disk... " >&6; }
50720 
50721   # df -l lists only local disks; if the given directory is not found then
50722   # a non-zero exit code is given
50723   if test "x$DF" = x; then
50724     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50725       # msys does not have df; use Windows "net use" instead.
50726       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50727       if test "x$IS_NETWORK_DISK" = x; then
50728         OUTPUT_DIR_IS_LOCAL="yes"
50729       else
50730         OUTPUT_DIR_IS_LOCAL="no"
50731       fi
50732     else
50733       # No df here, say it's local
50734       OUTPUT_DIR_IS_LOCAL="yes"
50735     fi
50736   else
50737     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50738       OUTPUT_DIR_IS_LOCAL="yes"
50739     else
50740       OUTPUT_DIR_IS_LOCAL="no"
50741     fi
50742   fi
50743 
50744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50745 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50746 
50747 
50748 
50749   # Check if the user has any old-style ALT_ variables set.
50750   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50751 
50752   # Before generating output files, test if they exist. If they do, this is a reconfigure.
50753   # Since we can't properly handle the dependencies for this, warn the user about the situation
50754   if test -e $OUTPUT_ROOT/spec.gmk; then
50755     IS_RECONFIGURE=yes
50756   else
50757     IS_RECONFIGURE=no
50758   fi
50759 
50760 
50761 # At the end, call the custom hook. (Dummy macro if no custom sources available)
50762 
50763 
50764 # We're messing a bit with internal autoconf variables to put the config.status
50765 # in the output directory instead of the current directory.
50766 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50767 
50768 # Create the actual output files. Now the main work of configure is done.
50769 cat >confcache <<\_ACEOF
50770 # This file is a shell script that caches the results of configure
50771 # tests run on this system so they can be shared between configure
50772 # scripts and configure runs, see configure's option --config-cache.
50773 # It is not useful on other systems.  If it contains results you don't
50774 # want to keep, you may remove or edit it.
50775 #
50776 # config.status only pays attention to the cache file if you give it
50777 # the --recheck option to rerun configure.
50778 #
50779 # `ac_cv_env_foo' variables (set or unset) will be overridden when
50780 # loading this file, other *unset* `ac_cv_foo' will be assigned the
50781 # following values.
50782 
50783 _ACEOF
50784 
50785 # The following way of writing the cache mishandles newlines in values,
50786 # but we know of no workaround that is simple, portable, and efficient.
50787 # So, we kill variables containing newlines.
50788 # Ultrix sh set writes to stderr and can't be redirected directly,
50789 # and sets the high bit in the cache file unless we assign to the vars.
50790 (
50791   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50792     eval ac_val=\$$ac_var
50793     case $ac_val in #(
50794     *${as_nl}*)
50795       case $ac_var in #(
50796       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50797 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50798       esac
50799       case $ac_var in #(
50800       _ | IFS | as_nl) ;; #(
50801       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
50802       *) { eval $ac_var=; unset $ac_var;} ;;
50803       esac ;;
50804     esac
50805   done
50806 
50807   (set) 2>&1 |
50808     case $as_nl`(ac_space=' '; set) 2>&1` in #(
50809     *${as_nl}ac_space=\ *)
50810       # `set' does not quote correctly, so add quotes: double-quote
50811       # substitution turns \\\\ into \\, and sed turns \\ into \.
50812       sed -n \
50813         "s/'/'\\\\''/g;
50814           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50815       ;; #(
50816     *)
50817       # `set' quotes correctly as required by POSIX, so do not add quotes.
50818       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
50819       ;;
50820     esac |
50821     sort
50822 ) |
50823   sed '
50824      /^ac_cv_env_/b end
50825      t clear
50826      :clear
50827      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50828      t end
50829      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50830      :end' >>confcache
50831 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50832   if test -w "$cache_file"; then
50833     if test "x$cache_file" != "x/dev/null"; then
50834       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50835 $as_echo "$as_me: updating cache $cache_file" >&6;}
50836       if test ! -f "$cache_file" || test -h "$cache_file"; then
50837         cat confcache >"$cache_file"
50838       else
50839         case $cache_file in #(
50840         */* | ?:*)
50841           mv -f confcache "$cache_file"$$ &&
50842           mv -f "$cache_file"$$ "$cache_file" ;; #(
50843         *)
50844           mv -f confcache "$cache_file" ;;
50845         esac
50846       fi
50847     fi
50848   else
50849     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50850 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50851   fi
50852 fi
50853 rm -f confcache
50854 
50855 test "x$prefix" = xNONE && prefix=$ac_default_prefix
50856 # Let make expand exec_prefix.
50857 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50858 
50859 # Transform confdefs.h into DEFS.
50860 # Protect against shell expansion while executing Makefile rules.
50861 # Protect against Makefile macro expansion.
50862 #
50863 # If the first sed substitution is executed (which looks for macros that
50864 # take arguments), then branch to the quote section.  Otherwise,
50865 # look for a macro that doesn't take arguments.
50866 ac_script='
50867 :mline
50868 /\\$/{
50869  N
50870  s,\\\n,,
50871  b mline
50872 }
50873 t clear
50874 :clear
50875 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
50876 t quote
50877 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
50878 t quote
50879 b any
50880 :quote
50881 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
50882 s/\[/\\&/g
50883 s/\]/\\&/g
50884 s/\$/$$/g
50885 H
50886 :any
50887 ${
50888         g
50889         s/^\n//
50890         s/\n/ /g
50891         p
50892 }
50893 '
50894 DEFS=`sed -n "$ac_script" confdefs.h`
50895 
50896 
50897 ac_libobjs=
50898 ac_ltlibobjs=
50899 U=
50900 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50901   # 1. Remove the extension, and $U if already installed.
50902   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50903   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50904   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50905   #    will be set to the directory where LIBOBJS objects are built.
50906   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50907   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50908 done
50909 LIBOBJS=$ac_libobjs
50910 
50911 LTLIBOBJS=$ac_ltlibobjs
50912 
50913 
50914 
50915 : "${CONFIG_STATUS=./config.status}"
50916 ac_write_fail=0
50917 ac_clean_files_save=$ac_clean_files
50918 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50919 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50920 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50921 as_write_fail=0
50922 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50923 #! $SHELL
50924 # Generated by $as_me.
50925 # Run this file to recreate the current configuration.
50926 # Compiler output produced by configure, useful for debugging
50927 # configure, is in config.log if it exists.
50928 
50929 debug=false
50930 ac_cs_recheck=false
50931 ac_cs_silent=false
50932 
50933 SHELL=\${CONFIG_SHELL-$SHELL}
50934 export SHELL
50935 _ASEOF
50936 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50937 ## -------------------- ##
50938 ## M4sh Initialization. ##
50939 ## -------------------- ##
50940 
50941 # Be more Bourne compatible
50942 DUALCASE=1; export DUALCASE # for MKS sh
50943 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50944   emulate sh
50945   NULLCMD=:
50946   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50947   # is contrary to our usage.  Disable this feature.
50948   alias -g '${1+"$@"}'='"$@"'
50949   setopt NO_GLOB_SUBST
50950 else
50951   case `(set -o) 2>/dev/null` in #(
50952   *posix*) :
50953     set -o posix ;; #(
50954   *) :
50955      ;;
50956 esac
50957 fi
50958 
50959 
50960 as_nl='
50961 '
50962 export as_nl
50963 # Printing a long string crashes Solaris 7 /usr/bin/printf.
50964 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50965 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50966 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50967 # Prefer a ksh shell builtin over an external printf program on Solaris,
50968 # but without wasting forks for bash or zsh.
50969 if test -z "$BASH_VERSION$ZSH_VERSION" \
50970     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50971   as_echo='print -r --'
50972   as_echo_n='print -rn --'
50973 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50974   as_echo='printf %s\n'
50975   as_echo_n='printf %s'
50976 else
50977   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50978     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50979     as_echo_n='/usr/ucb/echo -n'
50980   else
50981     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50982     as_echo_n_body='eval
50983       arg=$1;
50984       case $arg in #(
50985       *"$as_nl"*)
50986         expr "X$arg" : "X\\(.*\\)$as_nl";
50987         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50988       esac;
50989       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50990     '
50991     export as_echo_n_body
50992     as_echo_n='sh -c $as_echo_n_body as_echo'
50993   fi
50994   export as_echo_body
50995   as_echo='sh -c $as_echo_body as_echo'
50996 fi
50997 
50998 # The user is always right.
50999 if test "${PATH_SEPARATOR+set}" != set; then
51000   PATH_SEPARATOR=:
51001   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51002     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51003       PATH_SEPARATOR=';'
51004   }
51005 fi
51006 
51007 
51008 # IFS
51009 # We need space, tab and new line, in precisely that order.  Quoting is
51010 # there to prevent editors from complaining about space-tab.
51011 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51012 # splitting by setting IFS to empty value.)
51013 IFS=" ""        $as_nl"
51014 
51015 # Find who we are.  Look in the path if we contain no directory separator.
51016 as_myself=
51017 case $0 in #((
51018   *[\\/]* ) as_myself=$0 ;;
51019   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51020 for as_dir in $PATH
51021 do
51022   IFS=$as_save_IFS
51023   test -z "$as_dir" && as_dir=.
51024     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51025   done
51026 IFS=$as_save_IFS
51027 
51028      ;;
51029 esac
51030 # We did not find ourselves, most probably we were run as `sh COMMAND'
51031 # in which case we are not to be found in the path.
51032 if test "x$as_myself" = x; then
51033   as_myself=$0
51034 fi
51035 if test ! -f "$as_myself"; then
51036   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51037   exit 1
51038 fi
51039 
51040 # Unset variables that we do not need and which cause bugs (e.g. in
51041 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51042 # suppresses any "Segmentation fault" message there.  '((' could
51043 # trigger a bug in pdksh 5.2.14.
51044 for as_var in BASH_ENV ENV MAIL MAILPATH
51045 do eval test x\${$as_var+set} = xset \
51046   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51047 done
51048 PS1='$ '
51049 PS2='> '
51050 PS4='+ '
51051 
51052 # NLS nuisances.
51053 LC_ALL=C
51054 export LC_ALL
51055 LANGUAGE=C
51056 export LANGUAGE
51057 
51058 # CDPATH.
51059 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51060 
51061 
51062 # as_fn_error STATUS ERROR [LINENO LOG_FD]
51063 # ----------------------------------------
51064 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51065 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51066 # script with STATUS, using 1 if that was 0.
51067 as_fn_error ()
51068 {
51069   as_status=$1; test $as_status -eq 0 && as_status=1
51070   if test "$4"; then
51071     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51072     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51073   fi
51074   $as_echo "$as_me: error: $2" >&2
51075   as_fn_exit $as_status
51076 } # as_fn_error
51077 
51078 
51079 # as_fn_set_status STATUS
51080 # -----------------------
51081 # Set $? to STATUS, without forking.
51082 as_fn_set_status ()
51083 {
51084   return $1
51085 } # as_fn_set_status
51086 
51087 # as_fn_exit STATUS
51088 # -----------------
51089 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51090 as_fn_exit ()
51091 {
51092   set +e
51093   as_fn_set_status $1
51094   exit $1
51095 } # as_fn_exit
51096 
51097 # as_fn_unset VAR
51098 # ---------------
51099 # Portably unset VAR.
51100 as_fn_unset ()
51101 {
51102   { eval $1=; unset $1;}
51103 }
51104 as_unset=as_fn_unset
51105 # as_fn_append VAR VALUE
51106 # ----------------------
51107 # Append the text in VALUE to the end of the definition contained in VAR. Take
51108 # advantage of any shell optimizations that allow amortized linear growth over
51109 # repeated appends, instead of the typical quadratic growth present in naive
51110 # implementations.
51111 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51112   eval 'as_fn_append ()
51113   {
51114     eval $1+=\$2
51115   }'
51116 else
51117   as_fn_append ()
51118   {
51119     eval $1=\$$1\$2
51120   }
51121 fi # as_fn_append
51122 
51123 # as_fn_arith ARG...
51124 # ------------------
51125 # Perform arithmetic evaluation on the ARGs, and store the result in the
51126 # global $as_val. Take advantage of shells that can avoid forks. The arguments
51127 # must be portable across $(()) and expr.
51128 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51129   eval 'as_fn_arith ()
51130   {
51131     as_val=$(( $* ))
51132   }'
51133 else
51134   as_fn_arith ()
51135   {
51136     as_val=`expr "$@" || test $? -eq 1`
51137   }
51138 fi # as_fn_arith
51139 
51140 
51141 if expr a : '\(a\)' >/dev/null 2>&1 &&
51142    test "X`expr 00001 : '.*\(...\)'`" = X001; then
51143   as_expr=expr
51144 else
51145   as_expr=false
51146 fi
51147 
51148 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51149   as_basename=basename
51150 else
51151   as_basename=false
51152 fi
51153 
51154 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51155   as_dirname=dirname
51156 else
51157   as_dirname=false
51158 fi
51159 
51160 as_me=`$as_basename -- "$0" ||
51161 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51162          X"$0" : 'X\(//\)$' \| \
51163          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51164 $as_echo X/"$0" |
51165     sed '/^.*\/\([^/][^/]*\)\/*$/{
51166             s//\1/
51167             q
51168           }
51169           /^X\/\(\/\/\)$/{
51170             s//\1/
51171             q
51172           }
51173           /^X\/\(\/\).*/{
51174             s//\1/
51175             q
51176           }
51177           s/.*/./; q'`
51178 
51179 # Avoid depending upon Character Ranges.
51180 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51181 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51182 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51183 as_cr_digits='0123456789'
51184 as_cr_alnum=$as_cr_Letters$as_cr_digits
51185 
51186 ECHO_C= ECHO_N= ECHO_T=
51187 case `echo -n x` in #(((((
51188 -n*)
51189   case `echo 'xy\c'` in
51190   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
51191   xy)  ECHO_C='\c';;
51192   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51193        ECHO_T=' ';;
51194   esac;;
51195 *)
51196   ECHO_N='-n';;
51197 esac
51198 
51199 rm -f conf$$ conf$$.exe conf$$.file
51200 if test -d conf$$.dir; then
51201   rm -f conf$$.dir/conf$$.file
51202 else
51203   rm -f conf$$.dir
51204   mkdir conf$$.dir 2>/dev/null
51205 fi
51206 if (echo >conf$$.file) 2>/dev/null; then
51207   if ln -s conf$$.file conf$$ 2>/dev/null; then
51208     as_ln_s='ln -s'
51209     # ... but there are two gotchas:
51210     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51211     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51212     # In both cases, we have to default to `cp -pR'.
51213     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51214       as_ln_s='cp -pR'
51215   elif ln conf$$.file conf$$ 2>/dev/null; then
51216     as_ln_s=ln
51217   else
51218     as_ln_s='cp -pR'
51219   fi
51220 else
51221   as_ln_s='cp -pR'
51222 fi
51223 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51224 rmdir conf$$.dir 2>/dev/null
51225 
51226 
51227 # as_fn_mkdir_p
51228 # -------------
51229 # Create "$as_dir" as a directory, including parents if necessary.
51230 as_fn_mkdir_p ()
51231 {
51232 
51233   case $as_dir in #(
51234   -*) as_dir=./$as_dir;;
51235   esac
51236   test -d "$as_dir" || eval $as_mkdir_p || {
51237     as_dirs=
51238     while :; do
51239       case $as_dir in #(
51240       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51241       *) as_qdir=$as_dir;;
51242       esac
51243       as_dirs="'$as_qdir' $as_dirs"
51244       as_dir=`$as_dirname -- "$as_dir" ||
51245 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51246          X"$as_dir" : 'X\(//\)[^/]' \| \
51247          X"$as_dir" : 'X\(//\)$' \| \
51248          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51249 $as_echo X"$as_dir" |
51250     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51251             s//\1/
51252             q
51253           }
51254           /^X\(\/\/\)[^/].*/{
51255             s//\1/
51256             q
51257           }
51258           /^X\(\/\/\)$/{
51259             s//\1/
51260             q
51261           }
51262           /^X\(\/\).*/{
51263             s//\1/
51264             q
51265           }
51266           s/.*/./; q'`
51267       test -d "$as_dir" && break
51268     done
51269     test -z "$as_dirs" || eval "mkdir $as_dirs"
51270   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51271 
51272 
51273 } # as_fn_mkdir_p
51274 if mkdir -p . 2>/dev/null; then
51275   as_mkdir_p='mkdir -p "$as_dir"'
51276 else
51277   test -d ./-p && rmdir ./-p
51278   as_mkdir_p=false
51279 fi
51280 
51281 
51282 # as_fn_executable_p FILE
51283 # -----------------------
51284 # Test if FILE is an executable regular file.
51285 as_fn_executable_p ()
51286 {
51287   test -f "$1" && test -x "$1"
51288 } # as_fn_executable_p
51289 as_test_x='test -x'
51290 as_executable_p=as_fn_executable_p
51291 
51292 # Sed expression to map a string onto a valid CPP name.
51293 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51294 
51295 # Sed expression to map a string onto a valid variable name.
51296 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51297 
51298 
51299 exec 6>&1
51300 ## ----------------------------------- ##
51301 ## Main body of $CONFIG_STATUS script. ##
51302 ## ----------------------------------- ##
51303 _ASEOF
51304 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51305 
51306 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51307 # Save the log message, to keep $0 and so on meaningful, and to
51308 # report actual input values of CONFIG_FILES etc. instead of their
51309 # values after options handling.
51310 ac_log="
51311 This file was extended by OpenJDK $as_me jdk9, which was
51312 generated by GNU Autoconf 2.69.  Invocation command line was
51313 
51314   CONFIG_FILES    = $CONFIG_FILES
51315   CONFIG_HEADERS  = $CONFIG_HEADERS
51316   CONFIG_LINKS    = $CONFIG_LINKS
51317   CONFIG_COMMANDS = $CONFIG_COMMANDS
51318   $ $0 $@
51319 
51320 on `(hostname || uname -n) 2>/dev/null | sed 1q`
51321 "
51322 
51323 _ACEOF
51324 
51325 case $ac_config_files in *"
51326 "*) set x $ac_config_files; shift; ac_config_files=$*;;
51327 esac
51328 
51329 
51330 
51331 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51332 # Files that config.status was made for.
51333 config_files="$ac_config_files"
51334 
51335 _ACEOF
51336 
51337 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51338 ac_cs_usage="\
51339 \`$as_me' instantiates files and other configuration actions
51340 from templates according to the current configuration.  Unless the files
51341 and actions are specified as TAGs, all are instantiated by default.
51342 
51343 Usage: $0 [OPTION]... [TAG]...
51344 
51345   -h, --help       print this help, then exit
51346   -V, --version    print version number and configuration settings, then exit
51347       --config     print configuration, then exit
51348   -q, --quiet, --silent
51349                    do not print progress messages
51350   -d, --debug      don't remove temporary files
51351       --recheck    update $as_me by reconfiguring in the same conditions
51352       --file=FILE[:TEMPLATE]
51353                    instantiate the configuration file FILE
51354 
51355 Configuration files:
51356 $config_files
51357 
51358 Report bugs to <build-dev@openjdk.java.net>.
51359 OpenJDK home page: <http://openjdk.java.net>."
51360 
51361 _ACEOF
51362 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51363 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51364 ac_cs_version="\\
51365 OpenJDK config.status jdk9
51366 configured by $0, generated by GNU Autoconf 2.69,
51367   with options \\"\$ac_cs_config\\"
51368 
51369 Copyright (C) 2012 Free Software Foundation, Inc.
51370 This config.status script is free software; the Free Software Foundation
51371 gives unlimited permission to copy, distribute and modify it."
51372 
51373 ac_pwd='$ac_pwd'
51374 srcdir='$srcdir'
51375 AWK='$AWK'
51376 test -n "\$AWK" || AWK=awk
51377 _ACEOF
51378 
51379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51380 # The default lists apply if the user does not specify any file.
51381 ac_need_defaults=:
51382 while test $# != 0
51383 do
51384   case $1 in
51385   --*=?*)
51386     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51387     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51388     ac_shift=:
51389     ;;
51390   --*=)
51391     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51392     ac_optarg=
51393     ac_shift=:
51394     ;;
51395   *)
51396     ac_option=$1
51397     ac_optarg=$2
51398     ac_shift=shift
51399     ;;
51400   esac
51401 
51402   case $ac_option in
51403   # Handling of the options.
51404   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51405     ac_cs_recheck=: ;;
51406   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51407     $as_echo "$ac_cs_version"; exit ;;
51408   --config | --confi | --conf | --con | --co | --c )
51409     $as_echo "$ac_cs_config"; exit ;;
51410   --debug | --debu | --deb | --de | --d | -d )
51411     debug=: ;;
51412   --file | --fil | --fi | --f )
51413     $ac_shift
51414     case $ac_optarg in
51415     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51416     '') as_fn_error $? "missing file argument" ;;
51417     esac
51418     as_fn_append CONFIG_FILES " '$ac_optarg'"
51419     ac_need_defaults=false;;
51420   --he | --h |  --help | --hel | -h )
51421     $as_echo "$ac_cs_usage"; exit ;;
51422   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51423   | -silent | --silent | --silen | --sile | --sil | --si | --s)
51424     ac_cs_silent=: ;;
51425 
51426   # This is an error.
51427   -*) as_fn_error $? "unrecognized option: \`$1'
51428 Try \`$0 --help' for more information." ;;
51429 
51430   *) as_fn_append ac_config_targets " $1"
51431      ac_need_defaults=false ;;
51432 
51433   esac
51434   shift
51435 done
51436 
51437 ac_configure_extra_args=
51438 
51439 if $ac_cs_silent; then
51440   exec 6>/dev/null
51441   ac_configure_extra_args="$ac_configure_extra_args --silent"
51442 fi
51443 
51444 _ACEOF
51445 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51446 if \$ac_cs_recheck; then
51447   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51448   shift
51449   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51450   CONFIG_SHELL='$SHELL'
51451   export CONFIG_SHELL
51452   exec "\$@"
51453 fi
51454 
51455 _ACEOF
51456 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51457 exec 5>>config.log
51458 {
51459   echo
51460   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51461 ## Running $as_me. ##
51462 _ASBOX
51463   $as_echo "$ac_log"
51464 } >&5
51465 
51466 _ACEOF
51467 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51468 _ACEOF
51469 
51470 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51471 
51472 # Handling of arguments.
51473 for ac_config_target in $ac_config_targets
51474 do
51475   case $ac_config_target in
51476     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51477     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51478     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51479     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51480     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51481 
51482   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51483   esac
51484 done
51485 
51486 
51487 # If the user did not use the arguments to specify the items to instantiate,
51488 # then the envvar interface is used.  Set only those that are not.
51489 # We use the long form for the default assignment because of an extremely
51490 # bizarre bug on SunOS 4.1.3.
51491 if $ac_need_defaults; then
51492   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51493 fi
51494 
51495 # Have a temporary directory for convenience.  Make it in the build tree
51496 # simply because there is no reason against having it here, and in addition,
51497 # creating and moving files from /tmp can sometimes cause problems.
51498 # Hook for its removal unless debugging.
51499 # Note that there is a small window in which the directory will not be cleaned:
51500 # after its creation but before its name has been assigned to `$tmp'.
51501 $debug ||
51502 {
51503   tmp= ac_tmp=
51504   trap 'exit_status=$?
51505   : "${ac_tmp:=$tmp}"
51506   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51507 ' 0
51508   trap 'as_fn_exit 1' 1 2 13 15
51509 }
51510 # Create a (secure) tmp directory for tmp files.
51511 
51512 {
51513   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51514   test -d "$tmp"
51515 }  ||
51516 {
51517   tmp=./conf$$-$RANDOM
51518   (umask 077 && mkdir "$tmp")
51519 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51520 ac_tmp=$tmp
51521 
51522 # Set up the scripts for CONFIG_FILES section.
51523 # No need to generate them if there are no CONFIG_FILES.
51524 # This happens for instance with `./config.status config.h'.
51525 if test -n "$CONFIG_FILES"; then
51526 
51527 
51528 ac_cr=`echo X | tr X '\015'`
51529 # On cygwin, bash can eat \r inside `` if the user requested igncr.
51530 # But we know of no other shell where ac_cr would be empty at this
51531 # point, so we can use a bashism as a fallback.
51532 if test "x$ac_cr" = x; then
51533   eval ac_cr=\$\'\\r\'
51534 fi
51535 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51536 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51537   ac_cs_awk_cr='\\r'
51538 else
51539   ac_cs_awk_cr=$ac_cr
51540 fi
51541 
51542 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51543 _ACEOF
51544 
51545 
51546 {
51547   echo "cat >conf$$subs.awk <<_ACEOF" &&
51548   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51549   echo "_ACEOF"
51550 } >conf$$subs.sh ||
51551   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51552 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51553 ac_delim='%!_!# '
51554 for ac_last_try in false false false false false :; do
51555   . ./conf$$subs.sh ||
51556     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51557 
51558   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51559   if test $ac_delim_n = $ac_delim_num; then
51560     break
51561   elif $ac_last_try; then
51562     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51563   else
51564     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51565   fi
51566 done
51567 rm -f conf$$subs.sh
51568 
51569 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51570 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51571 _ACEOF
51572 sed -n '
51573 h
51574 s/^/S["/; s/!.*/"]=/
51575 p
51576 g
51577 s/^[^!]*!//
51578 :repl
51579 t repl
51580 s/'"$ac_delim"'$//
51581 t delim
51582 :nl
51583 h
51584 s/\(.\{148\}\)..*/\1/
51585 t more1
51586 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51587 p
51588 n
51589 b repl
51590 :more1
51591 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51592 p
51593 g
51594 s/.\{148\}//
51595 t nl
51596 :delim
51597 h
51598 s/\(.\{148\}\)..*/\1/
51599 t more2
51600 s/["\\]/\\&/g; s/^/"/; s/$/"/
51601 p
51602 b
51603 :more2
51604 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51605 p
51606 g
51607 s/.\{148\}//
51608 t delim
51609 ' <conf$$subs.awk | sed '
51610 /^[^""]/{
51611   N
51612   s/\n//
51613 }
51614 ' >>$CONFIG_STATUS || ac_write_fail=1
51615 rm -f conf$$subs.awk
51616 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51617 _ACAWK
51618 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51619   for (key in S) S_is_set[key] = 1
51620   FS = ""
51621 
51622 }
51623 {
51624   line = $ 0
51625   nfields = split(line, field, "@")
51626   substed = 0
51627   len = length(field[1])
51628   for (i = 2; i < nfields; i++) {
51629     key = field[i]
51630     keylen = length(key)
51631     if (S_is_set[key]) {
51632       value = S[key]
51633       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51634       len += length(value) + length(field[++i])
51635       substed = 1
51636     } else
51637       len += 1 + keylen
51638   }
51639 
51640   print line
51641 }
51642 
51643 _ACAWK
51644 _ACEOF
51645 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51646 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51647   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51648 else
51649   cat
51650 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51651   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51652 _ACEOF
51653 
51654 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51655 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51656 # trailing colons and then remove the whole line if VPATH becomes empty
51657 # (actually we leave an empty line to preserve line numbers).
51658 if test "x$srcdir" = x.; then
51659   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
51660 h
51661 s///
51662 s/^/:/
51663 s/[      ]*$/:/
51664 s/:\$(srcdir):/:/g
51665 s/:\${srcdir}:/:/g
51666 s/:@srcdir@:/:/g
51667 s/^:*//
51668 s/:*$//
51669 x
51670 s/\(=[   ]*\).*/\1/
51671 G
51672 s/\n//
51673 s/^[^=]*=[       ]*$//
51674 }'
51675 fi
51676 
51677 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51678 fi # test -n "$CONFIG_FILES"
51679 
51680 
51681 eval set X "  :F $CONFIG_FILES      "
51682 shift
51683 for ac_tag
51684 do
51685   case $ac_tag in
51686   :[FHLC]) ac_mode=$ac_tag; continue;;
51687   esac
51688   case $ac_mode$ac_tag in
51689   :[FHL]*:*);;
51690   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51691   :[FH]-) ac_tag=-:-;;
51692   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51693   esac
51694   ac_save_IFS=$IFS
51695   IFS=:
51696   set x $ac_tag
51697   IFS=$ac_save_IFS
51698   shift
51699   ac_file=$1
51700   shift
51701 
51702   case $ac_mode in
51703   :L) ac_source=$1;;
51704   :[FH])
51705     ac_file_inputs=
51706     for ac_f
51707     do
51708       case $ac_f in
51709       -) ac_f="$ac_tmp/stdin";;
51710       *) # Look for the file first in the build tree, then in the source tree
51711          # (if the path is not absolute).  The absolute path cannot be DOS-style,
51712          # because $ac_f cannot contain `:'.
51713          test -f "$ac_f" ||
51714            case $ac_f in
51715            [\\/$]*) false;;
51716            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51717            esac ||
51718            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51719       esac
51720       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51721       as_fn_append ac_file_inputs " '$ac_f'"
51722     done
51723 
51724     # Let's still pretend it is `configure' which instantiates (i.e., don't
51725     # use $as_me), people would be surprised to read:
51726     #    /* config.h.  Generated by config.status.  */
51727     configure_input='Generated from '`
51728           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51729         `' by configure.'
51730     if test x"$ac_file" != x-; then
51731       configure_input="$ac_file.  $configure_input"
51732       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51733 $as_echo "$as_me: creating $ac_file" >&6;}
51734     fi
51735     # Neutralize special characters interpreted by sed in replacement strings.
51736     case $configure_input in #(
51737     *\&* | *\|* | *\\* )
51738        ac_sed_conf_input=`$as_echo "$configure_input" |
51739        sed 's/[\\\\&|]/\\\\&/g'`;; #(
51740     *) ac_sed_conf_input=$configure_input;;
51741     esac
51742 
51743     case $ac_tag in
51744     *:-:* | *:-) cat >"$ac_tmp/stdin" \
51745       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51746     esac
51747     ;;
51748   esac
51749 
51750   ac_dir=`$as_dirname -- "$ac_file" ||
51751 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51752          X"$ac_file" : 'X\(//\)[^/]' \| \
51753          X"$ac_file" : 'X\(//\)$' \| \
51754          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51755 $as_echo X"$ac_file" |
51756     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51757             s//\1/
51758             q
51759           }
51760           /^X\(\/\/\)[^/].*/{
51761             s//\1/
51762             q
51763           }
51764           /^X\(\/\/\)$/{
51765             s//\1/
51766             q
51767           }
51768           /^X\(\/\).*/{
51769             s//\1/
51770             q
51771           }
51772           s/.*/./; q'`
51773   as_dir="$ac_dir"; as_fn_mkdir_p
51774   ac_builddir=.
51775 
51776 case "$ac_dir" in
51777 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51778 *)
51779   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51780   # A ".." for each directory in $ac_dir_suffix.
51781   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51782   case $ac_top_builddir_sub in
51783   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51784   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51785   esac ;;
51786 esac
51787 ac_abs_top_builddir=$ac_pwd
51788 ac_abs_builddir=$ac_pwd$ac_dir_suffix
51789 # for backward compatibility:
51790 ac_top_builddir=$ac_top_build_prefix
51791 
51792 case $srcdir in
51793   .)  # We are building in place.
51794     ac_srcdir=.
51795     ac_top_srcdir=$ac_top_builddir_sub
51796     ac_abs_top_srcdir=$ac_pwd ;;
51797   [\\/]* | ?:[\\/]* )  # Absolute name.
51798     ac_srcdir=$srcdir$ac_dir_suffix;
51799     ac_top_srcdir=$srcdir
51800     ac_abs_top_srcdir=$srcdir ;;
51801   *) # Relative name.
51802     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51803     ac_top_srcdir=$ac_top_build_prefix$srcdir
51804     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51805 esac
51806 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51807 
51808 
51809   case $ac_mode in
51810   :F)
51811   #
51812   # CONFIG_FILE
51813   #
51814 
51815 _ACEOF
51816 
51817 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51818 # If the template does not know about datarootdir, expand it.
51819 # FIXME: This hack should be removed a few years after 2.60.
51820 ac_datarootdir_hack=; ac_datarootdir_seen=
51821 ac_sed_dataroot='
51822 /datarootdir/ {
51823   p
51824   q
51825 }
51826 /@datadir@/p
51827 /@docdir@/p
51828 /@infodir@/p
51829 /@localedir@/p
51830 /@mandir@/p'
51831 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51832 *datarootdir*) ac_datarootdir_seen=yes;;
51833 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51834   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51835 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51836 _ACEOF
51837 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51838   ac_datarootdir_hack='
51839   s&@datadir@&$datadir&g
51840   s&@docdir@&$docdir&g
51841   s&@infodir@&$infodir&g
51842   s&@localedir@&$localedir&g
51843   s&@mandir@&$mandir&g
51844   s&\\\${datarootdir}&$datarootdir&g' ;;
51845 esac
51846 _ACEOF
51847 
51848 # Neutralize VPATH when `$srcdir' = `.'.
51849 # Shell code in configure.ac might set extrasub.
51850 # FIXME: do we really want to maintain this feature?
51851 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51852 ac_sed_extra="$ac_vpsub
51853 $extrasub
51854 _ACEOF
51855 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51856 :t
51857 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51858 s|@configure_input@|$ac_sed_conf_input|;t t
51859 s&@top_builddir@&$ac_top_builddir_sub&;t t
51860 s&@top_build_prefix@&$ac_top_build_prefix&;t t
51861 s&@srcdir@&$ac_srcdir&;t t
51862 s&@abs_srcdir@&$ac_abs_srcdir&;t t
51863 s&@top_srcdir@&$ac_top_srcdir&;t t
51864 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51865 s&@builddir@&$ac_builddir&;t t
51866 s&@abs_builddir@&$ac_abs_builddir&;t t
51867 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51868 $ac_datarootdir_hack
51869 "
51870 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51871   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51872 
51873 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51874   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51875   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
51876       "$ac_tmp/out"`; test -z "$ac_out"; } &&
51877   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51878 which seems to be undefined.  Please make sure it is defined" >&5
51879 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51880 which seems to be undefined.  Please make sure it is defined" >&2;}
51881 
51882   rm -f "$ac_tmp/stdin"
51883   case $ac_file in
51884   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51885   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51886   esac \
51887   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51888  ;;
51889 
51890 
51891 
51892   esac
51893 
51894 done # for ac_tag
51895 
51896 
51897 as_fn_exit 0
51898 _ACEOF
51899 ac_clean_files=$ac_clean_files_save
51900 
51901 test $ac_write_fail = 0 ||
51902   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51903 
51904 
51905 # configure is writing to config.log, and then calls config.status.
51906 # config.status does its own redirection, appending to config.log.
51907 # Unfortunately, on DOS this fails, as config.log is still kept open
51908 # by configure, so config.status won't be able to write to it; its
51909 # output is simply discarded.  So we exec the FD to /dev/null,
51910 # effectively closing config.log, so it can be properly (re)opened and
51911 # appended to by config.status.  When coming back to configure, we
51912 # need to make the FD available again.
51913 if test "$no_create" != yes; then
51914   ac_cs_success=:
51915   ac_config_status_args=
51916   test "$silent" = yes &&
51917     ac_config_status_args="$ac_config_status_args --quiet"
51918   exec 5>/dev/null
51919   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51920   exec 5>>config.log
51921   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51922   # would make configure fail if this is the last instruction.
51923   $ac_cs_success || as_fn_exit 1
51924 fi
51925 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51926   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51927 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51928 fi
51929 
51930 
51931 # Try to move the config.log file to the output directory.
51932 if test -e ./config.log; then
51933   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51934 fi
51935 
51936 # Make the compare script executable
51937 $CHMOD +x $OUTPUT_ROOT/compare.sh
51938 
51939 # Finally output some useful information to the user
51940 
51941   # Finally output some useful information to the user
51942 
51943   printf "\n"
51944   printf "====================================================\n"
51945   if test "x$no_create" != "xyes"; then
51946     if test "x$IS_RECONFIGURE" != "xyes"; then
51947       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
51948     else
51949       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
51950     fi
51951   else
51952     if test "x$IS_RECONFIGURE" != "xyes"; then
51953       printf "A configuration has been successfully checked but not created\n"
51954     else
51955       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
51956     fi
51957   fi
51958   if test "x$CONFIGURE_COMMAND_LINE" != x; then
51959     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51960   else
51961     printf "using default settings.\n"
51962   fi
51963 
51964   printf "\n"
51965   printf "Configuration summary:\n"
51966   printf "* Debug level:    $DEBUG_LEVEL\n"
51967   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51968   printf "* JDK variant:    $JDK_VARIANT\n"
51969   printf "* JVM variants:   $with_jvm_variants\n"
51970   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51971 
51972   printf "\n"
51973   printf "Tools summary:\n"
51974   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51975     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51976   fi
51977   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51978   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51979   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51980   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51981 
51982   printf "\n"
51983   printf "Build performance summary:\n"
51984   printf "* Cores to use:   $JOBS\n"
51985   printf "* Memory limit:   $MEMORY_SIZE MB\n"
51986   if test "x$CCACHE_STATUS" != "x"; then
51987     printf "* ccache status:  $CCACHE_STATUS\n"
51988   fi
51989   printf "\n"
51990 
51991   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51992     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51993     printf "will result in longer build times.\n"
51994     printf "\n"
51995   fi
51996 
51997   if test "x$FOUND_ALT_VARIABLES" != "x"; then
51998     printf "WARNING: You have old-style ALT_ environment variables set.\n"
51999     printf "These are not respected, and will be ignored. It is recommended\n"
52000     printf "that you clean your environment. The following variables are set:\n"
52001     printf "$FOUND_ALT_VARIABLES\n"
52002     printf "\n"
52003   fi
52004 
52005   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52006     printf "WARNING: Your build output directory is not on a local disk.\n"
52007     printf "This will severely degrade build performance!\n"
52008     printf "It is recommended that you create an output directory on a local disk,\n"
52009     printf "and run the configure script again from that directory.\n"
52010     printf "\n"
52011   fi
52012 
52013   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52014     printf "WARNING: The result of this configuration has overridden an older\n"
52015     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52016     printf "proper build. Failure to do so might result in strange build problems.\n"
52017     printf "\n"
52018   fi
52019 
52020   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52021     printf "WARNING: The result of this configuration was not saved.\n"
52022     printf "You should run without '--no-create | -n' to create the configuration.\n"
52023     printf "\n"
52024   fi
52025 
52026 
52027 
52028 if test -e "$OUTPUT_ROOT/config.log"; then
52029   $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52030   if test $? -eq 0; then
52031     printf "The following warnings were produced. Repeated here for convenience:\n"
52032     # We must quote sed expression (using []) to stop m4 from eating the [].
52033     $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52034     printf "\n"
52035   fi
52036 fi
52037 
52038