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 MSVCP_DLL
 649 MSVCR_DLL
 650 LIBCXX
 651 LLVM_LIBS
 652 LLVM_LDFLAGS
 653 LLVM_CFLAGS
 654 LLVM_CONFIG
 655 LIBFFI_LIBS
 656 LIBFFI_CFLAGS
 657 STATIC_CXX_SETTING
 658 LIBDL
 659 LIBM
 660 LIBZIP_CAN_USE_MMAP
 661 USE_EXTERNAL_LIBZ
 662 USE_EXTERNAL_LIBPNG
 663 PNG_LIBS
 664 PNG_CFLAGS
 665 USE_EXTERNAL_LCMS
 666 LCMS_LIBS
 667 LCMS_CFLAGS
 668 USE_EXTERNAL_LIBGIF
 669 USE_EXTERNAL_LIBJPEG
 670 ALSA_LIBS
 671 ALSA_CFLAGS
 672 FREETYPE_BUNDLE_LIB_PATH
 673 FREETYPE_LIBS
 674 FREETYPE_CFLAGS
 675 CUPS_CFLAGS
 676 X_EXTRA_LIBS
 677 X_LIBS
 678 X_PRE_LIBS
 679 X_CFLAGS
 680 XMKMF
 681 FIXPATH
 682 ZIP_DEBUGINFO_FILES
 683 ENABLE_DEBUG_SYMBOLS
 684 CFLAGS_WARNINGS_ARE_ERRORS
 685 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 686 ZERO_ARCHFLAG
 687 LDFLAGS_CXX_JDK
 688 LDFLAGS_JDKEXE_SUFFIX
 689 LDFLAGS_JDKLIB_SUFFIX
 690 LDFLAGS_JDKEXE
 691 LDFLAGS_JDKLIB
 692 CXXFLAGS_JDKEXE
 693 CXXFLAGS_JDKLIB
 694 CFLAGS_JDKEXE
 695 CFLAGS_JDKLIB
 696 MACOSX_VERSION_MIN
 697 LEGACY_EXTRA_LDFLAGS
 698 LEGACY_EXTRA_CXXFLAGS
 699 LEGACY_EXTRA_CFLAGS
 700 CXX_O_FLAG_NONE
 701 CXX_O_FLAG_DEBUG
 702 CXX_O_FLAG_NORM
 703 CXX_O_FLAG_HI
 704 CXX_O_FLAG_HIGHEST
 705 C_O_FLAG_NONE
 706 C_O_FLAG_DEBUG
 707 C_O_FLAG_NORM
 708 C_O_FLAG_HI
 709 C_O_FLAG_HIGHEST
 710 CXXFLAGS_DEBUG_OPTIONS
 711 CFLAGS_DEBUG_OPTIONS
 712 CXXFLAGS_DEBUG_SYMBOLS
 713 CFLAGS_DEBUG_SYMBOLS
 714 CXX_FLAG_DEPS
 715 C_FLAG_DEPS
 716 SET_SHARED_LIBRARY_MAPFILE
 717 SET_SHARED_LIBRARY_NAME
 718 SET_SHARED_LIBRARY_ORIGIN
 719 SET_EXECUTABLE_ORIGIN
 720 SHARED_LIBRARY_FLAGS
 721 CXX_FLAG_REORDER
 722 C_FLAG_REORDER
 723 SYSROOT_LDFLAGS
 724 SYSROOT_CFLAGS
 725 RC_FLAGS
 726 AR_OUT_OPTION
 727 LD_OUT_OPTION
 728 EXE_OUT_OPTION
 729 CC_OUT_OPTION
 730 POST_MCS_CMD
 731 POST_STRIP_CMD
 732 ARFLAGS
 733 COMPILER_TARGET_BITS_FLAG
 734 JT_HOME
 735 JTREGEXE
 736 USING_BROKEN_SUSE_LD
 737 PACKAGE_PATH
 738 LDEXECXX
 739 LDEXE
 740 USE_CLANG
 741 HOTSPOT_LD
 742 HOTSPOT_CXX
 743 HOTSPOT_RC
 744 HOTSPOT_MT
 745 BUILD_LD
 746 BUILD_CXX
 747 BUILD_CC
 748 ac_ct_OBJDUMP
 749 OBJDUMP
 750 ac_ct_OBJCOPY
 751 OBJCOPY
 752 ac_ct_NM
 753 ac_ct_STRIP
 754 MCS
 755 GNM
 756 NM
 757 STRIP
 758 MSBUILD
 759 DUMPBIN
 760 RC
 761 MT
 762 LIPO
 763 ac_ct_OBJC
 764 OBJCFLAGS
 765 OBJC
 766 ac_ct_AR
 767 AR
 768 AS
 769 LDCXX
 770 LD
 771 CXXCPP
 772 CPP
 773 ac_ct_CXX
 774 CXXFLAGS
 775 CXX
 776 ac_ct_PROPER_COMPILER_CXX
 777 PROPER_COMPILER_CXX
 778 TOOLCHAIN_PATH_CXX
 779 POTENTIAL_CXX
 780 OBJEXT
 781 EXEEXT
 782 ac_ct_CC
 783 CPPFLAGS
 784 LDFLAGS
 785 CFLAGS
 786 CC
 787 ac_ct_PROPER_COMPILER_CC
 788 PROPER_COMPILER_CC
 789 TOOLCHAIN_PATH_CC
 790 POTENTIAL_CC
 791 VS_LIB
 792 VS_INCLUDE
 793 VS_PATH
 794 CYGWIN_LINK
 795 EXE_SUFFIX
 796 OBJ_SUFFIX
 797 STATIC_LIBRARY
 798 SHARED_LIBRARY
 799 STATIC_LIBRARY_SUFFIX
 800 SHARED_LIBRARY_SUFFIX
 801 LIBRARY_PREFIX
 802 TOOLCHAIN_TYPE
 803 BUILD_HOTSPOT
 804 HOTSPOT_DIST
 805 BUILD_OUTPUT
 806 OVERRIDE_SRC_ROOT
 807 ADD_SRC_ROOT
 808 JDK_TOPDIR
 809 NASHORN_TOPDIR
 810 HOTSPOT_TOPDIR
 811 JAXWS_TOPDIR
 812 JAXP_TOPDIR
 813 CORBA_TOPDIR
 814 LANGTOOLS_TOPDIR
 815 JAVAC_FLAGS
 816 BOOT_JDK_SOURCETARGET
 817 JARSIGNER
 818 NATIVE2ASCII
 819 JAR
 820 JAVAH
 821 JAVAC
 822 JAVA
 823 BOOT_JDK
 824 JAVA_CHECK
 825 JAVAC_CHECK
 826 COOKED_BUILD_NUMBER
 827 JDK_VERSION
 828 COPYRIGHT_YEAR
 829 MACOSX_BUNDLE_ID_BASE
 830 MACOSX_BUNDLE_NAME_BASE
 831 COMPANY_NAME
 832 JDK_RC_PLATFORM_NAME
 833 PRODUCT_SUFFIX
 834 PRODUCT_NAME
 835 LAUNCHER_NAME
 836 MILESTONE
 837 JDK_BUILD_NUMBER
 838 JDK_UPDATE_VERSION
 839 JDK_MICRO_VERSION
 840 JDK_MINOR_VERSION
 841 JDK_MAJOR_VERSION
 842 USER_RELEASE_SUFFIX
 843 COMPRESS_JARS
 844 RMICONNECTOR_IIOP
 845 UNLIMITED_CRYPTO
 846 CACERTS_FILE
 847 TEST_IN_BUILD
 848 BUILD_HEADLESS
 849 SUPPORT_HEADFUL
 850 SUPPORT_HEADLESS
 851 BDEPS_FTP
 852 BDEPS_UNZIP
 853 OS_VERSION_MICRO
 854 OS_VERSION_MINOR
 855 OS_VERSION_MAJOR
 856 PKG_CONFIG
 857 CODESIGN
 858 XATTR
 859 DSYMUTIL
 860 IS_GNU_TIME
 861 TIME
 862 STAT
 863 HG
 864 READELF
 865 OTOOL
 866 LDD
 867 ZIP
 868 UNZIP
 869 FIND_DELETE
 870 OUTPUT_SYNC
 871 OUTPUT_SYNC_SUPPORTED
 872 MAKE
 873 CHECK_TOOLSDIR_MAKE
 874 CHECK_TOOLSDIR_GMAKE
 875 CHECK_MAKE
 876 CHECK_GMAKE
 877 PKGHANDLER
 878 OUTPUT_ROOT
 879 CONF_NAME
 880 SPEC
 881 SDKROOT
 882 XCODEBUILD
 883 BUILD_VARIANT_RELEASE
 884 DEBUG_CLASSFILES
 885 FASTDEBUG
 886 VARIANT
 887 DEBUG_LEVEL
 888 MACOSX_UNIVERSAL
 889 INCLUDE_SA
 890 JVM_VARIANT_CORE
 891 JVM_VARIANT_ZEROSHARK
 892 JVM_VARIANT_ZERO
 893 JVM_VARIANT_KERNEL
 894 JVM_VARIANT_MINIMAL1
 895 JVM_VARIANT_CLIENT
 896 JVM_VARIANT_SERVER
 897 JVM_VARIANTS
 898 JVM_INTERPRETER
 899 JDK_VARIANT
 900 SET_OPENJDK
 901 BUILD_LOG_WRAPPER
 902 BUILD_LOG_PREVIOUS
 903 BUILD_LOG
 904 TOPDIR
 905 PATH_SEP
 906 ZERO_ARCHDEF
 907 DEFINE_CROSS_COMPILE_ARCH
 908 LP64
 909 OPENJDK_TARGET_OS_EXPORT_DIR
 910 OPENJDK_TARGET_CPU_JLI_CFLAGS
 911 OPENJDK_TARGET_CPU_OSARCH
 912 OPENJDK_TARGET_CPU_ISADIR
 913 OPENJDK_TARGET_CPU_LIBDIR
 914 OPENJDK_TARGET_CPU_LEGACY_LIB
 915 OPENJDK_TARGET_CPU_LEGACY
 916 REQUIRED_OS_VERSION
 917 REQUIRED_OS_NAME
 918 COMPILE_TYPE
 919 OPENJDK_TARGET_CPU_ENDIAN
 920 OPENJDK_TARGET_CPU_BITS
 921 OPENJDK_TARGET_CPU_ARCH
 922 OPENJDK_TARGET_CPU
 923 OPENJDK_TARGET_OS_ENV
 924 OPENJDK_TARGET_OS_TYPE
 925 OPENJDK_TARGET_OS
 926 OPENJDK_BUILD_CPU_ENDIAN
 927 OPENJDK_BUILD_CPU_BITS
 928 OPENJDK_BUILD_CPU_ARCH
 929 OPENJDK_BUILD_CPU
 930 OPENJDK_BUILD_OS_ENV
 931 OPENJDK_BUILD_OS_TYPE
 932 OPENJDK_BUILD_OS
 933 OPENJDK_BUILD_AUTOCONF_NAME
 934 OPENJDK_TARGET_AUTOCONF_NAME
 935 target_os
 936 target_vendor
 937 target_cpu
 938 target
 939 host_os
 940 host_vendor
 941 host_cpu
 942 host
 943 build_os
 944 build_vendor
 945 build_cpu
 946 build
 947 CPIO
 948 SETFILE
 949 DF
 950 READLINK
 951 CYGPATH
 952 SED
 953 FGREP
 954 EGREP
 955 GREP
 956 AWK
 957 XARGS
 958 WHICH
 959 WC
 960 UNIQ
 961 UNAME
 962 TR
 963 TOUCH
 964 TEE
 965 TAR
 966 TAIL
 967 SORT
 968 SH
 969 RM
 970 PRINTF
 971 NAWK
 972 MV
 973 MKTEMP
 974 MKDIR
 975 LS
 976 LN
 977 HEAD
 978 FIND
 979 FILE
 980 EXPR
 981 ECHO
 982 DIRNAME
 983 DIFF
 984 DATE
 985 CUT
 986 CP
 987 COMM
 988 CMP
 989 CHMOD
 990 CAT
 991 BASH
 992 BASENAME
 993 DATE_WHEN_CONFIGURED
 994 CONFIGURE_COMMAND_LINE
 995 target_alias
 996 host_alias
 997 build_alias
 998 LIBS
 999 ECHO_T
1000 ECHO_N
1001 ECHO_C
1002 DEFS
1003 mandir
1004 localedir
1005 libdir
1006 psdir
1007 pdfdir
1008 dvidir
1009 htmldir
1010 infodir
1011 docdir
1012 oldincludedir
1013 includedir
1014 localstatedir
1015 sharedstatedir
1016 sysconfdir
1017 datadir
1018 datarootdir
1019 libexecdir
1020 sbindir
1021 bindir
1022 program_transform_name
1023 prefix
1024 exec_prefix
1025 PACKAGE_URL
1026 PACKAGE_BUGREPORT
1027 PACKAGE_STRING
1028 PACKAGE_VERSION
1029 PACKAGE_TARNAME
1030 PACKAGE_NAME
1031 PATH_SEPARATOR
1032 SHELL'
1033 ac_subst_files=''
1034 ac_user_opts='
1035 enable_option_checking
1036 with_target_bits
1037 enable_openjdk_only
1038 with_custom_make_dir
1039 with_jdk_variant
1040 with_jvm_interpreter
1041 with_jvm_variants
1042 enable_debug
1043 with_debug_level
1044 with_devkit
1045 with_sys_root
1046 with_sysroot
1047 with_tools_dir
1048 with_toolchain_path
1049 with_extra_path
1050 with_sdk_name
1051 with_conf_name
1052 with_output_sync
1053 with_builddeps_conf
1054 with_builddeps_server
1055 with_builddeps_dir
1056 with_builddeps_group
1057 enable_headful
1058 enable_hotspot_test_in_build
1059 with_cacerts_file
1060 enable_unlimited_crypto
1061 enable_rmiconnector_iiop
1062 with_milestone
1063 with_update_version
1064 with_user_release_suffix
1065 with_build_number
1066 with_copyright_year
1067 with_boot_jdk
1068 with_add_source_root
1069 with_override_source_root
1070 with_adds_and_overrides
1071 with_override_langtools
1072 with_override_corba
1073 with_override_jaxp
1074 with_override_jaxws
1075 with_override_hotspot
1076 with_override_nashorn
1077 with_override_jdk
1078 with_import_hotspot
1079 with_toolchain_type
1080 with_toolchain_version
1081 with_jtreg
1082 with_extra_cflags
1083 with_extra_cxxflags
1084 with_extra_ldflags
1085 enable_debug_symbols
1086 enable_zip_debug_info
1087 with_x
1088 with_cups
1089 with_cups_include
1090 with_freetype
1091 with_freetype_include
1092 with_freetype_lib
1093 with_freetype_src
1094 enable_freetype_bundling
1095 with_alsa
1096 with_alsa_include
1097 with_alsa_lib
1098 with_libjpeg
1099 with_giflib
1100 with_lcms
1101 with_libpng
1102 with_zlib
1103 with_stdc__lib
1104 with_msvcr_dll
1105 with_msvcp_dll
1106 with_dxsdk
1107 with_dxsdk_lib
1108 with_dxsdk_include
1109 with_num_cores
1110 with_memory_size
1111 with_jobs
1112 with_boot_jdk_jvmargs
1113 with_sjavac_server_java
1114 enable_sjavac
1115 enable_precompiled_headers
1116 enable_ccache
1117 with_ccache_dir
1118 '
1119       ac_precious_vars='build_alias
1120 host_alias
1121 target_alias
1122 BASENAME
1123 BASH
1124 CAT
1125 CHMOD
1126 CMP
1127 COMM
1128 CP
1129 CUT
1130 DATE
1131 DIFF
1132 DIRNAME
1133 ECHO
1134 EXPR
1135 FILE
1136 FIND
1137 HEAD
1138 LN
1139 LS
1140 MKDIR
1141 MKTEMP
1142 MV
1143 NAWK
1144 PRINTF
1145 RM
1146 SH
1147 SORT
1148 TAIL
1149 TAR
1150 TEE
1151 TOUCH
1152 TR
1153 UNAME
1154 UNIQ
1155 WC
1156 WHICH
1157 XARGS
1158 AWK
1159 GREP
1160 EGREP
1161 FGREP
1162 SED
1163 CYGPATH
1164 READLINK
1165 DF
1166 SETFILE
1167 CPIO
1168 UNZIP
1169 ZIP
1170 LDD
1171 OTOOL
1172 READELF
1173 HG
1174 STAT
1175 TIME
1176 DSYMUTIL
1177 XATTR
1178 CODESIGN
1179 PKG_CONFIG
1180 JAVA
1181 JAVAC
1182 JAVAH
1183 JAR
1184 NATIVE2ASCII
1185 JARSIGNER
1186 CC
1187 CFLAGS
1188 LDFLAGS
1189 LIBS
1190 CPPFLAGS
1191 CXX
1192 CXXFLAGS
1193 CCC
1194 CPP
1195 CXXCPP
1196 AS
1197 AR
1198 OBJC
1199 OBJCFLAGS
1200 LIPO
1201 STRIP
1202 NM
1203 GNM
1204 MCS
1205 OBJCOPY
1206 OBJDUMP
1207 BUILD_CC
1208 BUILD_CXX
1209 BUILD_LD
1210 JTREGEXE
1211 XMKMF
1212 FREETYPE_CFLAGS
1213 FREETYPE_LIBS
1214 ALSA_CFLAGS
1215 ALSA_LIBS
1216 LCMS_CFLAGS
1217 LCMS_LIBS
1218 PNG_CFLAGS
1219 PNG_LIBS
1220 LIBFFI_CFLAGS
1221 LIBFFI_LIBS
1222 CCACHE'
1223 
1224 
1225 # Initialize some variables set by options.
1226 ac_init_help=
1227 ac_init_version=false
1228 ac_unrecognized_opts=
1229 ac_unrecognized_sep=
1230 # The variables have the same names as the options, with
1231 # dashes changed to underlines.
1232 cache_file=/dev/null
1233 exec_prefix=NONE
1234 no_create=
1235 no_recursion=
1236 prefix=NONE
1237 program_prefix=NONE
1238 program_suffix=NONE
1239 program_transform_name=s,x,x,
1240 silent=
1241 site=
1242 srcdir=
1243 verbose=
1244 x_includes=NONE
1245 x_libraries=NONE
1246 
1247 # Installation directory options.
1248 # These are left unexpanded so users can "make install exec_prefix=/foo"
1249 # and all the variables that are supposed to be based on exec_prefix
1250 # by default will actually change.
1251 # Use braces instead of parens because sh, perl, etc. also accept them.
1252 # (The list follows the same order as the GNU Coding Standards.)
1253 bindir='${exec_prefix}/bin'
1254 sbindir='${exec_prefix}/sbin'
1255 libexecdir='${exec_prefix}/libexec'
1256 datarootdir='${prefix}/share'
1257 datadir='${datarootdir}'
1258 sysconfdir='${prefix}/etc'
1259 sharedstatedir='${prefix}/com'
1260 localstatedir='${prefix}/var'
1261 includedir='${prefix}/include'
1262 oldincludedir='/usr/include'
1263 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1264 infodir='${datarootdir}/info'
1265 htmldir='${docdir}'
1266 dvidir='${docdir}'
1267 pdfdir='${docdir}'
1268 psdir='${docdir}'
1269 libdir='${exec_prefix}/lib'
1270 localedir='${datarootdir}/locale'
1271 mandir='${datarootdir}/man'
1272 
1273 ac_prev=
1274 ac_dashdash=
1275 for ac_option
1276 do
1277   # If the previous option needs an argument, assign it.
1278   if test -n "$ac_prev"; then
1279     eval $ac_prev=\$ac_option
1280     ac_prev=
1281     continue
1282   fi
1283 
1284   case $ac_option in
1285   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1286   *=)   ac_optarg= ;;
1287   *)    ac_optarg=yes ;;
1288   esac
1289 
1290   # Accept the important Cygnus configure options, so we can diagnose typos.
1291 
1292   case $ac_dashdash$ac_option in
1293   --)
1294     ac_dashdash=yes ;;
1295 
1296   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1297     ac_prev=bindir ;;
1298   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1299     bindir=$ac_optarg ;;
1300 
1301   -build | --build | --buil | --bui | --bu)
1302     ac_prev=build_alias ;;
1303   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1304     build_alias=$ac_optarg ;;
1305 
1306   -cache-file | --cache-file | --cache-fil | --cache-fi \
1307   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1308     ac_prev=cache_file ;;
1309   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1310   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1311     cache_file=$ac_optarg ;;
1312 
1313   --config-cache | -C)
1314     cache_file=config.cache ;;
1315 
1316   -datadir | --datadir | --datadi | --datad)
1317     ac_prev=datadir ;;
1318   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1319     datadir=$ac_optarg ;;
1320 
1321   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1322   | --dataroo | --dataro | --datar)
1323     ac_prev=datarootdir ;;
1324   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1325   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1326     datarootdir=$ac_optarg ;;
1327 
1328   -disable-* | --disable-*)
1329     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1330     # Reject names that are not valid shell variable names.
1331     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332       as_fn_error $? "invalid feature name: $ac_useropt"
1333     ac_useropt_orig=$ac_useropt
1334     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335     case $ac_user_opts in
1336       *"
1337 "enable_$ac_useropt"
1338 "*) ;;
1339       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1340          ac_unrecognized_sep=', ';;
1341     esac
1342     eval enable_$ac_useropt=no ;;
1343 
1344   -docdir | --docdir | --docdi | --doc | --do)
1345     ac_prev=docdir ;;
1346   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1347     docdir=$ac_optarg ;;
1348 
1349   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1350     ac_prev=dvidir ;;
1351   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1352     dvidir=$ac_optarg ;;
1353 
1354   -enable-* | --enable-*)
1355     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1356     # Reject names that are not valid shell variable names.
1357     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358       as_fn_error $? "invalid feature name: $ac_useropt"
1359     ac_useropt_orig=$ac_useropt
1360     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361     case $ac_user_opts in
1362       *"
1363 "enable_$ac_useropt"
1364 "*) ;;
1365       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1366          ac_unrecognized_sep=', ';;
1367     esac
1368     eval enable_$ac_useropt=\$ac_optarg ;;
1369 
1370   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1371   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1372   | --exec | --exe | --ex)
1373     ac_prev=exec_prefix ;;
1374   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1375   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1376   | --exec=* | --exe=* | --ex=*)
1377     exec_prefix=$ac_optarg ;;
1378 
1379   -gas | --gas | --ga | --g)
1380     # Obsolete; use --with-gas.
1381     with_gas=yes ;;
1382 
1383   -help | --help | --hel | --he | -h)
1384     ac_init_help=long ;;
1385   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1386     ac_init_help=recursive ;;
1387   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1388     ac_init_help=short ;;
1389 
1390   -host | --host | --hos | --ho)
1391     ac_prev=host_alias ;;
1392   -host=* | --host=* | --hos=* | --ho=*)
1393     host_alias=$ac_optarg ;;
1394 
1395   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1396     ac_prev=htmldir ;;
1397   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1398   | --ht=*)
1399     htmldir=$ac_optarg ;;
1400 
1401   -includedir | --includedir | --includedi | --included | --include \
1402   | --includ | --inclu | --incl | --inc)
1403     ac_prev=includedir ;;
1404   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1405   | --includ=* | --inclu=* | --incl=* | --inc=*)
1406     includedir=$ac_optarg ;;
1407 
1408   -infodir | --infodir | --infodi | --infod | --info | --inf)
1409     ac_prev=infodir ;;
1410   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1411     infodir=$ac_optarg ;;
1412 
1413   -libdir | --libdir | --libdi | --libd)
1414     ac_prev=libdir ;;
1415   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1416     libdir=$ac_optarg ;;
1417 
1418   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1419   | --libexe | --libex | --libe)
1420     ac_prev=libexecdir ;;
1421   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1422   | --libexe=* | --libex=* | --libe=*)
1423     libexecdir=$ac_optarg ;;
1424 
1425   -localedir | --localedir | --localedi | --localed | --locale)
1426     ac_prev=localedir ;;
1427   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1428     localedir=$ac_optarg ;;
1429 
1430   -localstatedir | --localstatedir | --localstatedi | --localstated \
1431   | --localstate | --localstat | --localsta | --localst | --locals)
1432     ac_prev=localstatedir ;;
1433   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1434   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1435     localstatedir=$ac_optarg ;;
1436 
1437   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1438     ac_prev=mandir ;;
1439   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1440     mandir=$ac_optarg ;;
1441 
1442   -nfp | --nfp | --nf)
1443     # Obsolete; use --without-fp.
1444     with_fp=no ;;
1445 
1446   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1447   | --no-cr | --no-c | -n)
1448     no_create=yes ;;
1449 
1450   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1451   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1452     no_recursion=yes ;;
1453 
1454   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1455   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1456   | --oldin | --oldi | --old | --ol | --o)
1457     ac_prev=oldincludedir ;;
1458   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1459   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1460   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1461     oldincludedir=$ac_optarg ;;
1462 
1463   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1464     ac_prev=prefix ;;
1465   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1466     prefix=$ac_optarg ;;
1467 
1468   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1469   | --program-pre | --program-pr | --program-p)
1470     ac_prev=program_prefix ;;
1471   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1472   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1473     program_prefix=$ac_optarg ;;
1474 
1475   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1476   | --program-suf | --program-su | --program-s)
1477     ac_prev=program_suffix ;;
1478   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1479   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1480     program_suffix=$ac_optarg ;;
1481 
1482   -program-transform-name | --program-transform-name \
1483   | --program-transform-nam | --program-transform-na \
1484   | --program-transform-n | --program-transform- \
1485   | --program-transform | --program-transfor \
1486   | --program-transfo | --program-transf \
1487   | --program-trans | --program-tran \
1488   | --progr-tra | --program-tr | --program-t)
1489     ac_prev=program_transform_name ;;
1490   -program-transform-name=* | --program-transform-name=* \
1491   | --program-transform-nam=* | --program-transform-na=* \
1492   | --program-transform-n=* | --program-transform-=* \
1493   | --program-transform=* | --program-transfor=* \
1494   | --program-transfo=* | --program-transf=* \
1495   | --program-trans=* | --program-tran=* \
1496   | --progr-tra=* | --program-tr=* | --program-t=*)
1497     program_transform_name=$ac_optarg ;;
1498 
1499   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1500     ac_prev=pdfdir ;;
1501   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1502     pdfdir=$ac_optarg ;;
1503 
1504   -psdir | --psdir | --psdi | --psd | --ps)
1505     ac_prev=psdir ;;
1506   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1507     psdir=$ac_optarg ;;
1508 
1509   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510   | -silent | --silent | --silen | --sile | --sil)
1511     silent=yes ;;
1512 
1513   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1514     ac_prev=sbindir ;;
1515   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1516   | --sbi=* | --sb=*)
1517     sbindir=$ac_optarg ;;
1518 
1519   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1520   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1521   | --sharedst | --shareds | --shared | --share | --shar \
1522   | --sha | --sh)
1523     ac_prev=sharedstatedir ;;
1524   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1525   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1526   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1527   | --sha=* | --sh=*)
1528     sharedstatedir=$ac_optarg ;;
1529 
1530   -site | --site | --sit)
1531     ac_prev=site ;;
1532   -site=* | --site=* | --sit=*)
1533     site=$ac_optarg ;;
1534 
1535   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1536     ac_prev=srcdir ;;
1537   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1538     srcdir=$ac_optarg ;;
1539 
1540   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1541   | --syscon | --sysco | --sysc | --sys | --sy)
1542     ac_prev=sysconfdir ;;
1543   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1544   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1545     sysconfdir=$ac_optarg ;;
1546 
1547   -target | --target | --targe | --targ | --tar | --ta | --t)
1548     ac_prev=target_alias ;;
1549   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1550     target_alias=$ac_optarg ;;
1551 
1552   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1553     verbose=yes ;;
1554 
1555   -version | --version | --versio | --versi | --vers | -V)
1556     ac_init_version=: ;;
1557 
1558   -with-* | --with-*)
1559     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1560     # Reject names that are not valid shell variable names.
1561     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1562       as_fn_error $? "invalid package name: $ac_useropt"
1563     ac_useropt_orig=$ac_useropt
1564     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1565     case $ac_user_opts in
1566       *"
1567 "with_$ac_useropt"
1568 "*) ;;
1569       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1570          ac_unrecognized_sep=', ';;
1571     esac
1572     eval with_$ac_useropt=\$ac_optarg ;;
1573 
1574   -without-* | --without-*)
1575     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1576     # Reject names that are not valid shell variable names.
1577     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578       as_fn_error $? "invalid package name: $ac_useropt"
1579     ac_useropt_orig=$ac_useropt
1580     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581     case $ac_user_opts in
1582       *"
1583 "with_$ac_useropt"
1584 "*) ;;
1585       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1586          ac_unrecognized_sep=', ';;
1587     esac
1588     eval with_$ac_useropt=no ;;
1589 
1590   --x)
1591     # Obsolete; use --with-x.
1592     with_x=yes ;;
1593 
1594   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1595   | --x-incl | --x-inc | --x-in | --x-i)
1596     ac_prev=x_includes ;;
1597   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1598   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1599     x_includes=$ac_optarg ;;
1600 
1601   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1602   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1603     ac_prev=x_libraries ;;
1604   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1605   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1606     x_libraries=$ac_optarg ;;
1607 
1608   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1609 Try \`$0 --help' for more information"
1610     ;;
1611 
1612   *=*)
1613     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1614     # Reject names that are not valid shell variable names.
1615     case $ac_envvar in #(
1616       '' | [0-9]* | *[!_$as_cr_alnum]* )
1617       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1618     esac
1619     eval $ac_envvar=\$ac_optarg
1620     export $ac_envvar ;;
1621 
1622   *)
1623     # FIXME: should be removed in autoconf 3.0.
1624     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1625     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1626       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1627     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1628     ;;
1629 
1630   esac
1631 done
1632 
1633 if test -n "$ac_prev"; then
1634   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1635   as_fn_error $? "missing argument to $ac_option"
1636 fi
1637 
1638 if test -n "$ac_unrecognized_opts"; then
1639   case $enable_option_checking in
1640     no) ;;
1641     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1642     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1643   esac
1644 fi
1645 
1646 # Check all directory arguments for consistency.
1647 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1648                 datadir sysconfdir sharedstatedir localstatedir includedir \
1649                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1650                 libdir localedir mandir
1651 do
1652   eval ac_val=\$$ac_var
1653   # Remove trailing slashes.
1654   case $ac_val in
1655     */ )
1656       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1657       eval $ac_var=\$ac_val;;
1658   esac
1659   # Be sure to have absolute directory names.
1660   case $ac_val in
1661     [\\/$]* | ?:[\\/]* )  continue;;
1662     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1663   esac
1664   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1665 done
1666 
1667 # There might be people who depend on the old broken behavior: `$host'
1668 # used to hold the argument of --host etc.
1669 # FIXME: To remove some day.
1670 build=$build_alias
1671 host=$host_alias
1672 target=$target_alias
1673 
1674 # FIXME: To remove some day.
1675 if test "x$host_alias" != x; then
1676   if test "x$build_alias" = x; then
1677     cross_compiling=maybe
1678   elif test "x$build_alias" != "x$host_alias"; then
1679     cross_compiling=yes
1680   fi
1681 fi
1682 
1683 ac_tool_prefix=
1684 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1685 
1686 test "$silent" = yes && exec 6>/dev/null
1687 
1688 
1689 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1690 ac_ls_di=`ls -di .` &&
1691 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1692   as_fn_error $? "working directory cannot be determined"
1693 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1694   as_fn_error $? "pwd does not report name of working directory"
1695 
1696 
1697 # Find the source files, if location was not specified.
1698 if test -z "$srcdir"; then
1699   ac_srcdir_defaulted=yes
1700   # Try the directory containing this script, then the parent directory.
1701   ac_confdir=`$as_dirname -- "$as_myself" ||
1702 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1703          X"$as_myself" : 'X\(//\)[^/]' \| \
1704          X"$as_myself" : 'X\(//\)$' \| \
1705          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1706 $as_echo X"$as_myself" |
1707     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1708             s//\1/
1709             q
1710           }
1711           /^X\(\/\/\)[^/].*/{
1712             s//\1/
1713             q
1714           }
1715           /^X\(\/\/\)$/{
1716             s//\1/
1717             q
1718           }
1719           /^X\(\/\).*/{
1720             s//\1/
1721             q
1722           }
1723           s/.*/./; q'`
1724   srcdir=$ac_confdir
1725   if test ! -r "$srcdir/$ac_unique_file"; then
1726     srcdir=..
1727   fi
1728 else
1729   ac_srcdir_defaulted=no
1730 fi
1731 if test ! -r "$srcdir/$ac_unique_file"; then
1732   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1733   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1734 fi
1735 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1736 ac_abs_confdir=`(
1737         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1738         pwd)`
1739 # When building in place, set srcdir=.
1740 if test "$ac_abs_confdir" = "$ac_pwd"; then
1741   srcdir=.
1742 fi
1743 # Remove unnecessary trailing slashes from srcdir.
1744 # Double slashes in file names in object file debugging info
1745 # mess up M-x gdb in Emacs.
1746 case $srcdir in
1747 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1748 esac
1749 for ac_var in $ac_precious_vars; do
1750   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1751   eval ac_env_${ac_var}_value=\$${ac_var}
1752   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1753   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1754 done
1755 
1756 #
1757 # Report the --help message.
1758 #
1759 if test "$ac_init_help" = "long"; then
1760   # Omit some internal or obsolete options to make the list less imposing.
1761   # This message is too long to be a string in the A/UX 3.1 sh.
1762   cat <<_ACEOF
1763 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1764 
1765 Usage: $0 [OPTION]... [VAR=VALUE]...
1766 
1767 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1768 VAR=VALUE.  See below for descriptions of some of the useful variables.
1769 
1770 Defaults for the options are specified in brackets.
1771 
1772 Configuration:
1773   -h, --help              display this help and exit
1774       --help=short        display options specific to this package
1775       --help=recursive    display the short help of all the included packages
1776   -V, --version           display version information and exit
1777   -q, --quiet, --silent   do not print \`checking ...' messages
1778       --cache-file=FILE   cache test results in FILE [disabled]
1779   -C, --config-cache      alias for \`--cache-file=config.cache'
1780   -n, --no-create         do not create output files
1781       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1782 
1783 Installation directories:
1784   --prefix=PREFIX         install architecture-independent files in PREFIX
1785                           [$ac_default_prefix]
1786   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1787                           [PREFIX]
1788 
1789 By default, \`make install' will install all the files in
1790 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1791 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1792 for instance \`--prefix=\$HOME'.
1793 
1794 For better control, use the options below.
1795 
1796 Fine tuning of the installation directories:
1797   --bindir=DIR            user executables [EPREFIX/bin]
1798   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1799   --libexecdir=DIR        program executables [EPREFIX/libexec]
1800   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1801   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1802   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1803   --libdir=DIR            object code libraries [EPREFIX/lib]
1804   --includedir=DIR        C header files [PREFIX/include]
1805   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1806   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1807   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1808   --infodir=DIR           info documentation [DATAROOTDIR/info]
1809   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1810   --mandir=DIR            man documentation [DATAROOTDIR/man]
1811   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1812   --htmldir=DIR           html documentation [DOCDIR]
1813   --dvidir=DIR            dvi documentation [DOCDIR]
1814   --pdfdir=DIR            pdf documentation [DOCDIR]
1815   --psdir=DIR             ps documentation [DOCDIR]
1816 _ACEOF
1817 
1818   cat <<\_ACEOF
1819 
1820 X features:
1821   --x-includes=DIR    X include files are in DIR
1822   --x-libraries=DIR   X library files are in DIR
1823 
1824 System types:
1825   --build=BUILD     configure for building on BUILD [guessed]
1826   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1827   --target=TARGET   configure for building compilers for TARGET [HOST]
1828 _ACEOF
1829 fi
1830 
1831 if test -n "$ac_init_help"; then
1832   case $ac_init_help in
1833      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1834    esac
1835   cat <<\_ACEOF
1836 
1837 Optional Features:
1838   --disable-option-checking  ignore unrecognized --enable/--with options
1839   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1840   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1841   --enable-openjdk-only   suppress building custom source even if present
1842                           [disabled]
1843   --enable-debug          set the debug level to fastdebug (shorthand for
1844                           --with-debug-level=fastdebug) [disabled]
1845   --disable-headful       disable building headful support (graphical UI
1846                           support) [enabled]
1847   --enable-hotspot-test-in-build
1848                           run the Queens test after Hotspot build [disabled]
1849   --enable-unlimited-crypto
1850                           Enable unlimited crypto policy [disabled]
1851   --enable-rmiconnector-iiop
1852                           enable the JMX RMIConnector iiop transport
1853                           [disabled]
1854   --disable-debug-symbols disable generation of debug symbols [enabled]
1855   --disable-zip-debug-info
1856                           disable zipping of debug-info files [enabled]
1857   --disable-freetype-bundling
1858                           disable bundling of the freetype library with the
1859                           build result [enabled on Windows or when using
1860                           --with-freetype, disabled otherwise]
1861   --enable-sjavac         use sjavac to do fast incremental compiles
1862                           [disabled]
1863   --disable-precompiled-headers
1864                           disable using precompiled headers when compiling C++
1865                           [enabled]
1866   --enable-ccache         enable using ccache to speed up recompilations
1867                           [disabled]
1868 
1869 Optional Packages:
1870   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1871   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1872   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1873                           support it), e.g. --with-target-bits=32 [guessed]
1874   --with-custom-make-dir  Deprecated. Option is kept for backwards
1875                           compatibility and is ignored
1876   --with-jdk-variant      JDK variant to build (normal) [normal]
1877   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1878   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1879                           client, minimal1, kernel, zero, zeroshark, core)
1880                           [server]
1881   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1882                           optimized (HotSpot build only)) [release]
1883   --with-devkit           use this devkit for compilers, tools and resources
1884   --with-sys-root         alias for --with-sysroot for backwards compatability
1885   --with-sysroot          use this directory as sysroot
1886   --with-tools-dir        alias for --with-toolchain-path for backwards
1887                           compatibility
1888   --with-toolchain-path   prepend these directories when searching for
1889                           toolchain binaries (compilers etc)
1890   --with-extra-path       prepend these directories to the default path
1891   --with-sdk-name         use the platform SDK of the given name. [macosx]
1892   --with-conf-name        use this as the name of the configuration [generated
1893                           from important configuration options]
1894   --with-output-sync      set make output sync type if supported by make.
1895                           [recurse]
1896   --with-builddeps-conf   use this configuration file for the builddeps
1897   --with-builddeps-server download and use build dependencies from this server
1898                           url
1899   --with-builddeps-dir    store downloaded build dependencies here
1900                           [/localhome/builddeps]
1901   --with-builddeps-group  chgrp the downloaded build dependencies to this
1902                           group
1903   --with-cacerts-file     specify alternative cacerts file
1904   --with-milestone        Set milestone value for build [internal]
1905   --with-update-version   Set update version value for build [b00]
1906   --with-user-release-suffix
1907                           Add a custom string to the version string if build
1908                           number is not set.[username_builddateb00]
1909   --with-build-number     Set build number value for build [b00]
1910   --with-copyright-year   Set copyright year value for build [current year]
1911   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1912   --with-add-source-root  for each and every source directory, look in this
1913                           additional source root for the same directory; if it
1914                           exists and have files in it, include it in the build
1915   --with-override-source-root
1916                           for each and every source directory, look in this
1917                           override source root for the same directory; if it
1918                           exists, use that directory instead and ignore the
1919                           directory in the original source root
1920   --with-adds-and-overrides
1921                           use the subdirs 'adds' and 'overrides' in the
1922                           specified directory as add-source-root and
1923                           override-source-root
1924   --with-override-langtools
1925                           use this langtools dir for the build
1926   --with-override-corba   use this corba dir for the build
1927   --with-override-jaxp    use this jaxp dir for the build
1928   --with-override-jaxws   use this jaxws dir for the build
1929   --with-override-hotspot use this hotspot dir for the build
1930   --with-override-nashorn use this nashorn dir for the build
1931   --with-override-jdk     use this jdk dir for the build
1932   --with-import-hotspot   import hotspot binaries from this jdk image or
1933                           hotspot build dist dir instead of building from
1934                           source
1935   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1936                           to show possible values [platform dependent]
1937   --with-toolchain-version
1938                           the version of the toolchain to look for, use
1939                           '--help' to show possible values [platform
1940                           dependent]
1941   --with-jtreg            Regression Test Harness [probed]
1942   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1943   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1944   --with-extra-ldflags    extra flags to be used when linking jdk
1945   --with-x                use the X Window System
1946   --with-cups             specify prefix directory for the cups package
1947                           (expecting the headers under PATH/include)
1948   --with-cups-include     specify directory for the cups include files
1949   --with-freetype         specify prefix directory for the freetype package
1950                           (expecting the libraries under PATH/lib and the
1951                           headers under PATH/include)
1952   --with-freetype-include specify directory for the freetype include files
1953   --with-freetype-lib     specify directory for the freetype library
1954   --with-freetype-src     specify directory with freetype sources to
1955                           automatically build the library (experimental,
1956                           Windows-only)
1957   --with-alsa             specify prefix directory for the alsa package
1958                           (expecting the libraries under PATH/lib and the
1959                           headers under PATH/include)
1960   --with-alsa-include     specify directory for the alsa include files
1961   --with-alsa-lib         specify directory for the alsa library
1962   --with-libjpeg          use libjpeg from build system or OpenJDK source
1963                           (system, bundled) [bundled]
1964   --with-giflib           use giflib from build system or OpenJDK source
1965                           (system, bundled) [bundled]
1966   --with-lcms             use lcms2 from build system or OpenJDK source
1967                           (system, bundled) [bundled]
1968   --with-libpng           use libpng from build system or OpenJDK source
1969                           (system, bundled) [bundled]
1970   --with-zlib             use zlib from build system or OpenJDK source
1971                           (system, bundled) [bundled]
1972   --with-stdc++lib=<static>,<dynamic>,<default>
1973                           force linking of the C++ runtime on Linux to either
1974                           static or dynamic, default is static with dynamic as
1975                           fallback
1976   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1977                           (Windows only) [probed]
1978   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1979                           (Windows only) [probed]
1980   --with-dxsdk            Deprecated. Option is kept for backwards
1981                           compatibility and is ignored
1982   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1983                           compatibility and is ignored
1984   --with-dxsdk-include    Deprecated. Option is kept for backwards
1985                           compatibility and is ignored
1986   --with-num-cores        number of cores in the build system, e.g.
1987                           --with-num-cores=8 [probed]
1988   --with-memory-size      memory (in MB) available in the build system, e.g.
1989                           --with-memory-size=1024 [probed]
1990   --with-jobs             number of parallel jobs to let make run [calculated
1991                           based on cores and memory]
1992   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1993                           invocations of boot JDK, overriding the default
1994                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1995                           -enableassertions"
1996   --with-sjavac-server-java
1997                           use this java binary for running the sjavac
1998                           background server [Boot JDK java]
1999   --with-ccache-dir       where to store ccache files [~/.ccache]
2000 
2001 Some influential environment variables:
2002   BASENAME    Override default value for BASENAME
2003   BASH        Override default value for BASH
2004   CAT         Override default value for CAT
2005   CHMOD       Override default value for CHMOD
2006   CMP         Override default value for CMP
2007   COMM        Override default value for COMM
2008   CP          Override default value for CP
2009   CUT         Override default value for CUT
2010   DATE        Override default value for DATE
2011   DIFF        Override default value for DIFF
2012   DIRNAME     Override default value for DIRNAME
2013   ECHO        Override default value for ECHO
2014   EXPR        Override default value for EXPR
2015   FILE        Override default value for FILE
2016   FIND        Override default value for FIND
2017   HEAD        Override default value for HEAD
2018   LN          Override default value for LN
2019   LS          Override default value for LS
2020   MKDIR       Override default value for MKDIR
2021   MKTEMP      Override default value for MKTEMP
2022   MV          Override default value for MV
2023   NAWK        Override default value for NAWK
2024   PRINTF      Override default value for PRINTF
2025   RM          Override default value for RM
2026   SH          Override default value for SH
2027   SORT        Override default value for SORT
2028   TAIL        Override default value for TAIL
2029   TAR         Override default value for TAR
2030   TEE         Override default value for TEE
2031   TOUCH       Override default value for TOUCH
2032   TR          Override default value for TR
2033   UNAME       Override default value for UNAME
2034   UNIQ        Override default value for UNIQ
2035   WC          Override default value for WC
2036   WHICH       Override default value for WHICH
2037   XARGS       Override default value for XARGS
2038   AWK         Override default value for AWK
2039   GREP        Override default value for GREP
2040   EGREP       Override default value for EGREP
2041   FGREP       Override default value for FGREP
2042   SED         Override default value for SED
2043   CYGPATH     Override default value for CYGPATH
2044   READLINK    Override default value for READLINK
2045   DF          Override default value for DF
2046   SETFILE     Override default value for SETFILE
2047   CPIO        Override default value for CPIO
2048   UNZIP       Override default value for UNZIP
2049   ZIP         Override default value for ZIP
2050   LDD         Override default value for LDD
2051   OTOOL       Override default value for OTOOL
2052   READELF     Override default value for READELF
2053   HG          Override default value for HG
2054   STAT        Override default value for STAT
2055   TIME        Override default value for TIME
2056   DSYMUTIL    Override default value for DSYMUTIL
2057   XATTR       Override default value for XATTR
2058   CODESIGN    Override default value for CODESIGN
2059   PKG_CONFIG  path to pkg-config utility
2060   JAVA        Override default value for JAVA
2061   JAVAC       Override default value for JAVAC
2062   JAVAH       Override default value for JAVAH
2063   JAR         Override default value for JAR
2064   NATIVE2ASCII
2065               Override default value for NATIVE2ASCII
2066   JARSIGNER   Override default value for JARSIGNER
2067   CC          C compiler command
2068   CFLAGS      C compiler flags
2069   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2070               nonstandard directory <lib dir>
2071   LIBS        libraries to pass to the linker, e.g. -l<library>
2072   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2073               you have headers in a nonstandard directory <include dir>
2074   CXX         C++ compiler command
2075   CXXFLAGS    C++ compiler flags
2076   CPP         C preprocessor
2077   CXXCPP      C++ preprocessor
2078   AS          Override default value for AS
2079   AR          Override default value for AR
2080   OBJC        Objective C compiler command
2081   OBJCFLAGS   Objective C compiler flags
2082   LIPO        Override default value for LIPO
2083   STRIP       Override default value for STRIP
2084   NM          Override default value for NM
2085   GNM         Override default value for GNM
2086   MCS         Override default value for MCS
2087   OBJCOPY     Override default value for OBJCOPY
2088   OBJDUMP     Override default value for OBJDUMP
2089   BUILD_CC    Override default value for BUILD_CC
2090   BUILD_CXX   Override default value for BUILD_CXX
2091   BUILD_LD    Override default value for BUILD_LD
2092   JTREGEXE    Override default value for JTREGEXE
2093   XMKMF       Path to xmkmf, Makefile generator for X Window System
2094   FREETYPE_CFLAGS
2095               C compiler flags for FREETYPE, overriding pkg-config
2096   FREETYPE_LIBS
2097               linker flags for FREETYPE, overriding pkg-config
2098   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2099   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2100   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2101   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2102   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2103   PNG_LIBS    linker flags for PNG, overriding pkg-config
2104   LIBFFI_CFLAGS
2105               C compiler flags for LIBFFI, overriding pkg-config
2106   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2107   CCACHE      Override default value for CCACHE
2108 
2109 Use these variables to override the choices made by `configure' or to help
2110 it to find libraries and programs with nonstandard names/locations.
2111 
2112 Report bugs to <build-dev@openjdk.java.net>.
2113 OpenJDK home page: <http://openjdk.java.net>.
2114 _ACEOF
2115 ac_status=$?
2116 fi
2117 
2118 if test "$ac_init_help" = "recursive"; then
2119   # If there are subdirs, report their specific --help.
2120   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2121     test -d "$ac_dir" ||
2122       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2123       continue
2124     ac_builddir=.
2125 
2126 case "$ac_dir" in
2127 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2128 *)
2129   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2130   # A ".." for each directory in $ac_dir_suffix.
2131   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2132   case $ac_top_builddir_sub in
2133   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2134   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2135   esac ;;
2136 esac
2137 ac_abs_top_builddir=$ac_pwd
2138 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2139 # for backward compatibility:
2140 ac_top_builddir=$ac_top_build_prefix
2141 
2142 case $srcdir in
2143   .)  # We are building in place.
2144     ac_srcdir=.
2145     ac_top_srcdir=$ac_top_builddir_sub
2146     ac_abs_top_srcdir=$ac_pwd ;;
2147   [\\/]* | ?:[\\/]* )  # Absolute name.
2148     ac_srcdir=$srcdir$ac_dir_suffix;
2149     ac_top_srcdir=$srcdir
2150     ac_abs_top_srcdir=$srcdir ;;
2151   *) # Relative name.
2152     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2153     ac_top_srcdir=$ac_top_build_prefix$srcdir
2154     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2155 esac
2156 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2157 
2158     cd "$ac_dir" || { ac_status=$?; continue; }
2159     # Check for guested configure.
2160     if test -f "$ac_srcdir/configure.gnu"; then
2161       echo &&
2162       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2163     elif test -f "$ac_srcdir/configure"; then
2164       echo &&
2165       $SHELL "$ac_srcdir/configure" --help=recursive
2166     else
2167       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2168     fi || ac_status=$?
2169     cd "$ac_pwd" || { ac_status=$?; break; }
2170   done
2171 fi
2172 
2173 test -n "$ac_init_help" && exit $ac_status
2174 if $ac_init_version; then
2175   cat <<\_ACEOF
2176 OpenJDK configure jdk9
2177 generated by GNU Autoconf 2.69
2178 
2179 Copyright (C) 2012 Free Software Foundation, Inc.
2180 This configure script is free software; the Free Software Foundation
2181 gives unlimited permission to copy, distribute and modify it.
2182 _ACEOF
2183   exit
2184 fi
2185 
2186 ## ------------------------ ##
2187 ## Autoconf initialization. ##
2188 ## ------------------------ ##
2189 
2190 # ac_fn_c_try_compile LINENO
2191 # --------------------------
2192 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2193 ac_fn_c_try_compile ()
2194 {
2195   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2196   rm -f conftest.$ac_objext
2197   if { { ac_try="$ac_compile"
2198 case "(($ac_try" in
2199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2200   *) ac_try_echo=$ac_try;;
2201 esac
2202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2203 $as_echo "$ac_try_echo"; } >&5
2204   (eval "$ac_compile") 2>conftest.err
2205   ac_status=$?
2206   if test -s conftest.err; then
2207     grep -v '^ *+' conftest.err >conftest.er1
2208     cat conftest.er1 >&5
2209     mv -f conftest.er1 conftest.err
2210   fi
2211   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2212   test $ac_status = 0; } && {
2213          test -z "$ac_c_werror_flag" ||
2214          test ! -s conftest.err
2215        } && test -s conftest.$ac_objext; then :
2216   ac_retval=0
2217 else
2218   $as_echo "$as_me: failed program was:" >&5
2219 sed 's/^/| /' conftest.$ac_ext >&5
2220 
2221         ac_retval=1
2222 fi
2223   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2224   as_fn_set_status $ac_retval
2225 
2226 } # ac_fn_c_try_compile
2227 
2228 # ac_fn_cxx_try_compile LINENO
2229 # ----------------------------
2230 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2231 ac_fn_cxx_try_compile ()
2232 {
2233   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234   rm -f conftest.$ac_objext
2235   if { { ac_try="$ac_compile"
2236 case "(($ac_try" in
2237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2238   *) ac_try_echo=$ac_try;;
2239 esac
2240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2241 $as_echo "$ac_try_echo"; } >&5
2242   (eval "$ac_compile") 2>conftest.err
2243   ac_status=$?
2244   if test -s conftest.err; then
2245     grep -v '^ *+' conftest.err >conftest.er1
2246     cat conftest.er1 >&5
2247     mv -f conftest.er1 conftest.err
2248   fi
2249   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2250   test $ac_status = 0; } && {
2251          test -z "$ac_cxx_werror_flag" ||
2252          test ! -s conftest.err
2253        } && test -s conftest.$ac_objext; then :
2254   ac_retval=0
2255 else
2256   $as_echo "$as_me: failed program was:" >&5
2257 sed 's/^/| /' conftest.$ac_ext >&5
2258 
2259         ac_retval=1
2260 fi
2261   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262   as_fn_set_status $ac_retval
2263 
2264 } # ac_fn_cxx_try_compile
2265 
2266 # ac_fn_c_try_cpp LINENO
2267 # ----------------------
2268 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2269 ac_fn_c_try_cpp ()
2270 {
2271   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272   if { { ac_try="$ac_cpp conftest.$ac_ext"
2273 case "(($ac_try" in
2274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2275   *) ac_try_echo=$ac_try;;
2276 esac
2277 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2278 $as_echo "$ac_try_echo"; } >&5
2279   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2280   ac_status=$?
2281   if test -s conftest.err; then
2282     grep -v '^ *+' conftest.err >conftest.er1
2283     cat conftest.er1 >&5
2284     mv -f conftest.er1 conftest.err
2285   fi
2286   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2287   test $ac_status = 0; } > conftest.i && {
2288          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2289          test ! -s conftest.err
2290        }; then :
2291   ac_retval=0
2292 else
2293   $as_echo "$as_me: failed program was:" >&5
2294 sed 's/^/| /' conftest.$ac_ext >&5
2295 
2296     ac_retval=1
2297 fi
2298   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299   as_fn_set_status $ac_retval
2300 
2301 } # ac_fn_c_try_cpp
2302 
2303 # ac_fn_cxx_try_cpp LINENO
2304 # ------------------------
2305 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2306 ac_fn_cxx_try_cpp ()
2307 {
2308   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309   if { { ac_try="$ac_cpp conftest.$ac_ext"
2310 case "(($ac_try" in
2311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2312   *) ac_try_echo=$ac_try;;
2313 esac
2314 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2315 $as_echo "$ac_try_echo"; } >&5
2316   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2317   ac_status=$?
2318   if test -s conftest.err; then
2319     grep -v '^ *+' conftest.err >conftest.er1
2320     cat conftest.er1 >&5
2321     mv -f conftest.er1 conftest.err
2322   fi
2323   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2324   test $ac_status = 0; } > conftest.i && {
2325          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2326          test ! -s conftest.err
2327        }; then :
2328   ac_retval=0
2329 else
2330   $as_echo "$as_me: failed program was:" >&5
2331 sed 's/^/| /' conftest.$ac_ext >&5
2332 
2333     ac_retval=1
2334 fi
2335   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2336   as_fn_set_status $ac_retval
2337 
2338 } # ac_fn_cxx_try_cpp
2339 
2340 # ac_fn_objc_try_compile LINENO
2341 # -----------------------------
2342 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2343 ac_fn_objc_try_compile ()
2344 {
2345   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2346   rm -f conftest.$ac_objext
2347   if { { ac_try="$ac_compile"
2348 case "(($ac_try" in
2349   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2350   *) ac_try_echo=$ac_try;;
2351 esac
2352 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2353 $as_echo "$ac_try_echo"; } >&5
2354   (eval "$ac_compile") 2>conftest.err
2355   ac_status=$?
2356   if test -s conftest.err; then
2357     grep -v '^ *+' conftest.err >conftest.er1
2358     cat conftest.er1 >&5
2359     mv -f conftest.er1 conftest.err
2360   fi
2361   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2362   test $ac_status = 0; } && {
2363          test -z "$ac_objc_werror_flag" ||
2364          test ! -s conftest.err
2365        } && test -s conftest.$ac_objext; then :
2366   ac_retval=0
2367 else
2368   $as_echo "$as_me: failed program was:" >&5
2369 sed 's/^/| /' conftest.$ac_ext >&5
2370 
2371         ac_retval=1
2372 fi
2373   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2374   as_fn_set_status $ac_retval
2375 
2376 } # ac_fn_objc_try_compile
2377 
2378 # ac_fn_c_try_link LINENO
2379 # -----------------------
2380 # Try to link conftest.$ac_ext, and return whether this succeeded.
2381 ac_fn_c_try_link ()
2382 {
2383   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384   rm -f conftest.$ac_objext conftest$ac_exeext
2385   if { { ac_try="$ac_link"
2386 case "(($ac_try" in
2387   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388   *) ac_try_echo=$ac_try;;
2389 esac
2390 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391 $as_echo "$ac_try_echo"; } >&5
2392   (eval "$ac_link") 2>conftest.err
2393   ac_status=$?
2394   if test -s conftest.err; then
2395     grep -v '^ *+' conftest.err >conftest.er1
2396     cat conftest.er1 >&5
2397     mv -f conftest.er1 conftest.err
2398   fi
2399   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400   test $ac_status = 0; } && {
2401          test -z "$ac_c_werror_flag" ||
2402          test ! -s conftest.err
2403        } && test -s conftest$ac_exeext && {
2404          test "$cross_compiling" = yes ||
2405          test -x conftest$ac_exeext
2406        }; then :
2407   ac_retval=0
2408 else
2409   $as_echo "$as_me: failed program was:" >&5
2410 sed 's/^/| /' conftest.$ac_ext >&5
2411 
2412         ac_retval=1
2413 fi
2414   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2415   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2416   # interfere with the next link command; also delete a directory that is
2417   # left behind by Apple's compiler.  We do this before executing the actions.
2418   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2419   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420   as_fn_set_status $ac_retval
2421 
2422 } # ac_fn_c_try_link
2423 
2424 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2425 # ---------------------------------------------------------
2426 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2427 # the include files in INCLUDES and setting the cache variable VAR
2428 # accordingly.
2429 ac_fn_cxx_check_header_mongrel ()
2430 {
2431   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432   if eval \${$3+:} false; then :
2433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2434 $as_echo_n "checking for $2... " >&6; }
2435 if eval \${$3+:} false; then :
2436   $as_echo_n "(cached) " >&6
2437 fi
2438 eval ac_res=\$$3
2439                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2440 $as_echo "$ac_res" >&6; }
2441 else
2442   # Is the header compilable?
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2444 $as_echo_n "checking $2 usability... " >&6; }
2445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446 /* end confdefs.h.  */
2447 $4
2448 #include <$2>
2449 _ACEOF
2450 if ac_fn_cxx_try_compile "$LINENO"; then :
2451   ac_header_compiler=yes
2452 else
2453   ac_header_compiler=no
2454 fi
2455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2457 $as_echo "$ac_header_compiler" >&6; }
2458 
2459 # Is the header present?
2460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2461 $as_echo_n "checking $2 presence... " >&6; }
2462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463 /* end confdefs.h.  */
2464 #include <$2>
2465 _ACEOF
2466 if ac_fn_cxx_try_cpp "$LINENO"; then :
2467   ac_header_preproc=yes
2468 else
2469   ac_header_preproc=no
2470 fi
2471 rm -f conftest.err conftest.i conftest.$ac_ext
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2473 $as_echo "$ac_header_preproc" >&6; }
2474 
2475 # So?  What about this header?
2476 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2477   yes:no: )
2478     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2479 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2480     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2481 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2482     ;;
2483   no:yes:* )
2484     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2485 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2486     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2487 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2488     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2489 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2490     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2491 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2492     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2493 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2494 ( $as_echo "## ----------------------------------------- ##
2495 ## Report this to build-dev@openjdk.java.net ##
2496 ## ----------------------------------------- ##"
2497      ) | sed "s/^/$as_me: WARNING:     /" >&2
2498     ;;
2499 esac
2500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2501 $as_echo_n "checking for $2... " >&6; }
2502 if eval \${$3+:} false; then :
2503   $as_echo_n "(cached) " >&6
2504 else
2505   eval "$3=\$ac_header_compiler"
2506 fi
2507 eval ac_res=\$$3
2508                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2509 $as_echo "$ac_res" >&6; }
2510 fi
2511   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2512 
2513 } # ac_fn_cxx_check_header_mongrel
2514 
2515 # ac_fn_cxx_try_run LINENO
2516 # ------------------------
2517 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2518 # that executables *can* be run.
2519 ac_fn_cxx_try_run ()
2520 {
2521   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2522   if { { ac_try="$ac_link"
2523 case "(($ac_try" in
2524   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2525   *) ac_try_echo=$ac_try;;
2526 esac
2527 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2528 $as_echo "$ac_try_echo"; } >&5
2529   (eval "$ac_link") 2>&5
2530   ac_status=$?
2531   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2532   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2533   { { case "(($ac_try" in
2534   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535   *) ac_try_echo=$ac_try;;
2536 esac
2537 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2538 $as_echo "$ac_try_echo"; } >&5
2539   (eval "$ac_try") 2>&5
2540   ac_status=$?
2541   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2542   test $ac_status = 0; }; }; then :
2543   ac_retval=0
2544 else
2545   $as_echo "$as_me: program exited with status $ac_status" >&5
2546        $as_echo "$as_me: failed program was:" >&5
2547 sed 's/^/| /' conftest.$ac_ext >&5
2548 
2549        ac_retval=$ac_status
2550 fi
2551   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2552   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2553   as_fn_set_status $ac_retval
2554 
2555 } # ac_fn_cxx_try_run
2556 
2557 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2558 # ---------------------------------------------------------
2559 # Tests whether HEADER exists and can be compiled using the include files in
2560 # INCLUDES, setting the cache variable VAR accordingly.
2561 ac_fn_cxx_check_header_compile ()
2562 {
2563   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2565 $as_echo_n "checking for $2... " >&6; }
2566 if eval \${$3+:} false; then :
2567   $as_echo_n "(cached) " >&6
2568 else
2569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570 /* end confdefs.h.  */
2571 $4
2572 #include <$2>
2573 _ACEOF
2574 if ac_fn_cxx_try_compile "$LINENO"; then :
2575   eval "$3=yes"
2576 else
2577   eval "$3=no"
2578 fi
2579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580 fi
2581 eval ac_res=\$$3
2582                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583 $as_echo "$ac_res" >&6; }
2584   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585 
2586 } # ac_fn_cxx_check_header_compile
2587 
2588 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2589 # ----------------------------------------------
2590 # Tries to find the compile-time value of EXPR in a program that includes
2591 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2592 # computed
2593 ac_fn_cxx_compute_int ()
2594 {
2595   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2596   if test "$cross_compiling" = yes; then
2597     # Depending upon the size, compute the lo and hi bounds.
2598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599 /* end confdefs.h.  */
2600 $4
2601 int
2602 main ()
2603 {
2604 static int test_array [1 - 2 * !(($2) >= 0)];
2605 test_array [0] = 0;
2606 return test_array [0];
2607 
2608   ;
2609   return 0;
2610 }
2611 _ACEOF
2612 if ac_fn_cxx_try_compile "$LINENO"; then :
2613   ac_lo=0 ac_mid=0
2614   while :; do
2615     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2616 /* end confdefs.h.  */
2617 $4
2618 int
2619 main ()
2620 {
2621 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2622 test_array [0] = 0;
2623 return test_array [0];
2624 
2625   ;
2626   return 0;
2627 }
2628 _ACEOF
2629 if ac_fn_cxx_try_compile "$LINENO"; then :
2630   ac_hi=$ac_mid; break
2631 else
2632   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2633                         if test $ac_lo -le $ac_mid; then
2634                           ac_lo= ac_hi=
2635                           break
2636                         fi
2637                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2638 fi
2639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2640   done
2641 else
2642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643 /* end confdefs.h.  */
2644 $4
2645 int
2646 main ()
2647 {
2648 static int test_array [1 - 2 * !(($2) < 0)];
2649 test_array [0] = 0;
2650 return test_array [0];
2651 
2652   ;
2653   return 0;
2654 }
2655 _ACEOF
2656 if ac_fn_cxx_try_compile "$LINENO"; then :
2657   ac_hi=-1 ac_mid=-1
2658   while :; do
2659     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660 /* end confdefs.h.  */
2661 $4
2662 int
2663 main ()
2664 {
2665 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2666 test_array [0] = 0;
2667 return test_array [0];
2668 
2669   ;
2670   return 0;
2671 }
2672 _ACEOF
2673 if ac_fn_cxx_try_compile "$LINENO"; then :
2674   ac_lo=$ac_mid; break
2675 else
2676   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2677                         if test $ac_mid -le $ac_hi; then
2678                           ac_lo= ac_hi=
2679                           break
2680                         fi
2681                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2682 fi
2683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684   done
2685 else
2686   ac_lo= ac_hi=
2687 fi
2688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689 fi
2690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2691 # Binary search between lo and hi bounds.
2692 while test "x$ac_lo" != "x$ac_hi"; do
2693   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695 /* end confdefs.h.  */
2696 $4
2697 int
2698 main ()
2699 {
2700 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2701 test_array [0] = 0;
2702 return test_array [0];
2703 
2704   ;
2705   return 0;
2706 }
2707 _ACEOF
2708 if ac_fn_cxx_try_compile "$LINENO"; then :
2709   ac_hi=$ac_mid
2710 else
2711   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2712 fi
2713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2714 done
2715 case $ac_lo in #((
2716 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2717 '') ac_retval=1 ;;
2718 esac
2719   else
2720     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2721 /* end confdefs.h.  */
2722 $4
2723 static long int longval () { return $2; }
2724 static unsigned long int ulongval () { return $2; }
2725 #include <stdio.h>
2726 #include <stdlib.h>
2727 int
2728 main ()
2729 {
2730 
2731   FILE *f = fopen ("conftest.val", "w");
2732   if (! f)
2733     return 1;
2734   if (($2) < 0)
2735     {
2736       long int i = longval ();
2737       if (i != ($2))
2738         return 1;
2739       fprintf (f, "%ld", i);
2740     }
2741   else
2742     {
2743       unsigned long int i = ulongval ();
2744       if (i != ($2))
2745         return 1;
2746       fprintf (f, "%lu", i);
2747     }
2748   /* Do not output a trailing newline, as this causes \r\n confusion
2749      on some platforms.  */
2750   return ferror (f) || fclose (f) != 0;
2751 
2752   ;
2753   return 0;
2754 }
2755 _ACEOF
2756 if ac_fn_cxx_try_run "$LINENO"; then :
2757   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2758 else
2759   ac_retval=1
2760 fi
2761 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2762   conftest.$ac_objext conftest.beam conftest.$ac_ext
2763 rm -f conftest.val
2764 
2765   fi
2766   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767   as_fn_set_status $ac_retval
2768 
2769 } # ac_fn_cxx_compute_int
2770 
2771 # ac_fn_cxx_try_link LINENO
2772 # -------------------------
2773 # Try to link conftest.$ac_ext, and return whether this succeeded.
2774 ac_fn_cxx_try_link ()
2775 {
2776   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777   rm -f conftest.$ac_objext conftest$ac_exeext
2778   if { { ac_try="$ac_link"
2779 case "(($ac_try" in
2780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2781   *) ac_try_echo=$ac_try;;
2782 esac
2783 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2784 $as_echo "$ac_try_echo"; } >&5
2785   (eval "$ac_link") 2>conftest.err
2786   ac_status=$?
2787   if test -s conftest.err; then
2788     grep -v '^ *+' conftest.err >conftest.er1
2789     cat conftest.er1 >&5
2790     mv -f conftest.er1 conftest.err
2791   fi
2792   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2793   test $ac_status = 0; } && {
2794          test -z "$ac_cxx_werror_flag" ||
2795          test ! -s conftest.err
2796        } && test -s conftest$ac_exeext && {
2797          test "$cross_compiling" = yes ||
2798          test -x conftest$ac_exeext
2799        }; then :
2800   ac_retval=0
2801 else
2802   $as_echo "$as_me: failed program was:" >&5
2803 sed 's/^/| /' conftest.$ac_ext >&5
2804 
2805         ac_retval=1
2806 fi
2807   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2808   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2809   # interfere with the next link command; also delete a directory that is
2810   # left behind by Apple's compiler.  We do this before executing the actions.
2811   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2812   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2813   as_fn_set_status $ac_retval
2814 
2815 } # ac_fn_cxx_try_link
2816 
2817 # ac_fn_cxx_check_func LINENO FUNC VAR
2818 # ------------------------------------
2819 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2820 ac_fn_cxx_check_func ()
2821 {
2822   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2824 $as_echo_n "checking for $2... " >&6; }
2825 if eval \${$3+:} false; then :
2826   $as_echo_n "(cached) " >&6
2827 else
2828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829 /* end confdefs.h.  */
2830 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2831    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2832 #define $2 innocuous_$2
2833 
2834 /* System header to define __stub macros and hopefully few prototypes,
2835     which can conflict with char $2 (); below.
2836     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2837     <limits.h> exists even on freestanding compilers.  */
2838 
2839 #ifdef __STDC__
2840 # include <limits.h>
2841 #else
2842 # include <assert.h>
2843 #endif
2844 
2845 #undef $2
2846 
2847 /* Override any GCC internal prototype to avoid an error.
2848    Use char because int might match the return type of a GCC
2849    builtin and then its argument prototype would still apply.  */
2850 #ifdef __cplusplus
2851 extern "C"
2852 #endif
2853 char $2 ();
2854 /* The GNU C library defines this for functions which it implements
2855     to always fail with ENOSYS.  Some functions are actually named
2856     something starting with __ and the normal name is an alias.  */
2857 #if defined __stub_$2 || defined __stub___$2
2858 choke me
2859 #endif
2860 
2861 int
2862 main ()
2863 {
2864 return $2 ();
2865   ;
2866   return 0;
2867 }
2868 _ACEOF
2869 if ac_fn_cxx_try_link "$LINENO"; then :
2870   eval "$3=yes"
2871 else
2872   eval "$3=no"
2873 fi
2874 rm -f core conftest.err conftest.$ac_objext \
2875     conftest$ac_exeext conftest.$ac_ext
2876 fi
2877 eval ac_res=\$$3
2878                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2879 $as_echo "$ac_res" >&6; }
2880   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2881 
2882 } # ac_fn_cxx_check_func
2883 
2884 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2885 # -------------------------------------------------------
2886 # Tests whether HEADER exists and can be compiled using the include files in
2887 # INCLUDES, setting the cache variable VAR accordingly.
2888 ac_fn_c_check_header_compile ()
2889 {
2890   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2891   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2892 $as_echo_n "checking for $2... " >&6; }
2893 if eval \${$3+:} false; then :
2894   $as_echo_n "(cached) " >&6
2895 else
2896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2897 /* end confdefs.h.  */
2898 $4
2899 #include <$2>
2900 _ACEOF
2901 if ac_fn_c_try_compile "$LINENO"; then :
2902   eval "$3=yes"
2903 else
2904   eval "$3=no"
2905 fi
2906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907 fi
2908 eval ac_res=\$$3
2909                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2910 $as_echo "$ac_res" >&6; }
2911   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2912 
2913 } # ac_fn_c_check_header_compile
2914 cat >config.log <<_ACEOF
2915 This file contains any messages produced by compilers while
2916 running configure, to aid debugging if configure makes a mistake.
2917 
2918 It was created by OpenJDK $as_me jdk9, which was
2919 generated by GNU Autoconf 2.69.  Invocation command line was
2920 
2921   $ $0 $@
2922 
2923 _ACEOF
2924 exec 5>>config.log
2925 {
2926 cat <<_ASUNAME
2927 ## --------- ##
2928 ## Platform. ##
2929 ## --------- ##
2930 
2931 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2932 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2933 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2934 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2935 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2936 
2937 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2938 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2939 
2940 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2941 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2942 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2943 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2944 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2945 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2946 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2947 
2948 _ASUNAME
2949 
2950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2951 for as_dir in $PATH
2952 do
2953   IFS=$as_save_IFS
2954   test -z "$as_dir" && as_dir=.
2955     $as_echo "PATH: $as_dir"
2956   done
2957 IFS=$as_save_IFS
2958 
2959 } >&5
2960 
2961 cat >&5 <<_ACEOF
2962 
2963 
2964 ## ----------- ##
2965 ## Core tests. ##
2966 ## ----------- ##
2967 
2968 _ACEOF
2969 
2970 
2971 # Keep a trace of the command line.
2972 # Strip out --no-create and --no-recursion so they do not pile up.
2973 # Strip out --silent because we don't want to record it for future runs.
2974 # Also quote any args containing shell meta-characters.
2975 # Make two passes to allow for proper duplicate-argument suppression.
2976 ac_configure_args=
2977 ac_configure_args0=
2978 ac_configure_args1=
2979 ac_must_keep_next=false
2980 for ac_pass in 1 2
2981 do
2982   for ac_arg
2983   do
2984     case $ac_arg in
2985     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2986     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2987     | -silent | --silent | --silen | --sile | --sil)
2988       continue ;;
2989     *\'*)
2990       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2991     esac
2992     case $ac_pass in
2993     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2994     2)
2995       as_fn_append ac_configure_args1 " '$ac_arg'"
2996       if test $ac_must_keep_next = true; then
2997         ac_must_keep_next=false # Got value, back to normal.
2998       else
2999         case $ac_arg in
3000           *=* | --config-cache | -C | -disable-* | --disable-* \
3001           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3002           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3003           | -with-* | --with-* | -without-* | --without-* | --x)
3004             case "$ac_configure_args0 " in
3005               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3006             esac
3007             ;;
3008           -* ) ac_must_keep_next=true ;;
3009         esac
3010       fi
3011       as_fn_append ac_configure_args " '$ac_arg'"
3012       ;;
3013     esac
3014   done
3015 done
3016 { ac_configure_args0=; unset ac_configure_args0;}
3017 { ac_configure_args1=; unset ac_configure_args1;}
3018 
3019 # When interrupted or exit'd, cleanup temporary files, and complete
3020 # config.log.  We remove comments because anyway the quotes in there
3021 # would cause problems or look ugly.
3022 # WARNING: Use '\'' to represent an apostrophe within the trap.
3023 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3024 trap 'exit_status=$?
3025   # Save into config.log some information that might help in debugging.
3026   {
3027     echo
3028 
3029     $as_echo "## ---------------- ##
3030 ## Cache variables. ##
3031 ## ---------------- ##"
3032     echo
3033     # The following way of writing the cache mishandles newlines in values,
3034 (
3035   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3036     eval ac_val=\$$ac_var
3037     case $ac_val in #(
3038     *${as_nl}*)
3039       case $ac_var in #(
3040       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3041 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3042       esac
3043       case $ac_var in #(
3044       _ | IFS | as_nl) ;; #(
3045       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3046       *) { eval $ac_var=; unset $ac_var;} ;;
3047       esac ;;
3048     esac
3049   done
3050   (set) 2>&1 |
3051     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3052     *${as_nl}ac_space=\ *)
3053       sed -n \
3054         "s/'\''/'\''\\\\'\'''\''/g;
3055           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3056       ;; #(
3057     *)
3058       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3059       ;;
3060     esac |
3061     sort
3062 )
3063     echo
3064 
3065     $as_echo "## ----------------- ##
3066 ## Output variables. ##
3067 ## ----------------- ##"
3068     echo
3069     for ac_var in $ac_subst_vars
3070     do
3071       eval ac_val=\$$ac_var
3072       case $ac_val in
3073       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3074       esac
3075       $as_echo "$ac_var='\''$ac_val'\''"
3076     done | sort
3077     echo
3078 
3079     if test -n "$ac_subst_files"; then
3080       $as_echo "## ------------------- ##
3081 ## File substitutions. ##
3082 ## ------------------- ##"
3083       echo
3084       for ac_var in $ac_subst_files
3085       do
3086         eval ac_val=\$$ac_var
3087         case $ac_val in
3088         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3089         esac
3090         $as_echo "$ac_var='\''$ac_val'\''"
3091       done | sort
3092       echo
3093     fi
3094 
3095     if test -s confdefs.h; then
3096       $as_echo "## ----------- ##
3097 ## confdefs.h. ##
3098 ## ----------- ##"
3099       echo
3100       cat confdefs.h
3101       echo
3102     fi
3103     test "$ac_signal" != 0 &&
3104       $as_echo "$as_me: caught signal $ac_signal"
3105     $as_echo "$as_me: exit $exit_status"
3106   } >&5
3107   rm -f core *.core core.conftest.* &&
3108     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3109     exit $exit_status
3110 ' 0
3111 for ac_signal in 1 2 13 15; do
3112   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3113 done
3114 ac_signal=0
3115 
3116 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3117 rm -f -r conftest* confdefs.h
3118 
3119 $as_echo "/* confdefs.h */" > confdefs.h
3120 
3121 # Predefined preprocessor variables.
3122 
3123 cat >>confdefs.h <<_ACEOF
3124 #define PACKAGE_NAME "$PACKAGE_NAME"
3125 _ACEOF
3126 
3127 cat >>confdefs.h <<_ACEOF
3128 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3129 _ACEOF
3130 
3131 cat >>confdefs.h <<_ACEOF
3132 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3133 _ACEOF
3134 
3135 cat >>confdefs.h <<_ACEOF
3136 #define PACKAGE_STRING "$PACKAGE_STRING"
3137 _ACEOF
3138 
3139 cat >>confdefs.h <<_ACEOF
3140 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3141 _ACEOF
3142 
3143 cat >>confdefs.h <<_ACEOF
3144 #define PACKAGE_URL "$PACKAGE_URL"
3145 _ACEOF
3146 
3147 
3148 # Let the site file select an alternate cache file if it wants to.
3149 # Prefer an explicitly selected file to automatically selected ones.
3150 ac_site_file1=NONE
3151 ac_site_file2=NONE
3152 if test -n "$CONFIG_SITE"; then
3153   # We do not want a PATH search for config.site.
3154   case $CONFIG_SITE in #((
3155     -*)  ac_site_file1=./$CONFIG_SITE;;
3156     */*) ac_site_file1=$CONFIG_SITE;;
3157     *)   ac_site_file1=./$CONFIG_SITE;;
3158   esac
3159 elif test "x$prefix" != xNONE; then
3160   ac_site_file1=$prefix/share/config.site
3161   ac_site_file2=$prefix/etc/config.site
3162 else
3163   ac_site_file1=$ac_default_prefix/share/config.site
3164   ac_site_file2=$ac_default_prefix/etc/config.site
3165 fi
3166 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3167 do
3168   test "x$ac_site_file" = xNONE && continue
3169   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3170     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3171 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3172     sed 's/^/| /' "$ac_site_file" >&5
3173     . "$ac_site_file" \
3174       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3175 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3176 as_fn_error $? "failed to load site script $ac_site_file
3177 See \`config.log' for more details" "$LINENO" 5; }
3178   fi
3179 done
3180 
3181 if test -r "$cache_file"; then
3182   # Some versions of bash will fail to source /dev/null (special files
3183   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3184   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3185     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3186 $as_echo "$as_me: loading cache $cache_file" >&6;}
3187     case $cache_file in
3188       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3189       *)                      . "./$cache_file";;
3190     esac
3191   fi
3192 else
3193   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3194 $as_echo "$as_me: creating cache $cache_file" >&6;}
3195   >$cache_file
3196 fi
3197 
3198 # Check that the precious variables saved in the cache have kept the same
3199 # value.
3200 ac_cache_corrupted=false
3201 for ac_var in $ac_precious_vars; do
3202   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3203   eval ac_new_set=\$ac_env_${ac_var}_set
3204   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3205   eval ac_new_val=\$ac_env_${ac_var}_value
3206   case $ac_old_set,$ac_new_set in
3207     set,)
3208       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3209 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3210       ac_cache_corrupted=: ;;
3211     ,set)
3212       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3213 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3214       ac_cache_corrupted=: ;;
3215     ,);;
3216     *)
3217       if test "x$ac_old_val" != "x$ac_new_val"; then
3218         # differences in whitespace do not lead to failure.
3219         ac_old_val_w=`echo x $ac_old_val`
3220         ac_new_val_w=`echo x $ac_new_val`
3221         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3222           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3223 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3224           ac_cache_corrupted=:
3225         else
3226           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3227 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3228           eval $ac_var=\$ac_old_val
3229         fi
3230         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3231 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3232         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3233 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3234       fi;;
3235   esac
3236   # Pass precious variables to config.status.
3237   if test "$ac_new_set" = set; then
3238     case $ac_new_val in
3239     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3240     *) ac_arg=$ac_var=$ac_new_val ;;
3241     esac
3242     case " $ac_configure_args " in
3243       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3244       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3245     esac
3246   fi
3247 done
3248 if $ac_cache_corrupted; then
3249   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3250 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3251   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3252 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3253   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3254 fi
3255 ## -------------------- ##
3256 ## Main body of script. ##
3257 ## -------------------- ##
3258 
3259 ac_ext=c
3260 ac_cpp='$CPP $CPPFLAGS'
3261 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3262 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3263 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3264 
3265 
3266 
3267 ac_aux_dir=
3268 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3269   if test -f "$ac_dir/install-sh"; then
3270     ac_aux_dir=$ac_dir
3271     ac_install_sh="$ac_aux_dir/install-sh -c"
3272     break
3273   elif test -f "$ac_dir/install.sh"; then
3274     ac_aux_dir=$ac_dir
3275     ac_install_sh="$ac_aux_dir/install.sh -c"
3276     break
3277   elif test -f "$ac_dir/shtool"; then
3278     ac_aux_dir=$ac_dir
3279     ac_install_sh="$ac_aux_dir/shtool install -c"
3280     break
3281   fi
3282 done
3283 if test -z "$ac_aux_dir"; then
3284   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
3285 fi
3286 
3287 # These three variables are undocumented and unsupported,
3288 # and are intended to be withdrawn in a future Autoconf release.
3289 # They can cause serious problems if a builder's source tree is in a directory
3290 # whose full name contains unusual characters.
3291 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3292 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3293 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3294 
3295 
3296 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3297 
3298 #
3299 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3300 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3301 #
3302 # This code is free software; you can redistribute it and/or modify it
3303 # under the terms of the GNU General Public License version 2 only, as
3304 # published by the Free Software Foundation.  Oracle designates this
3305 # particular file as subject to the "Classpath" exception as provided
3306 # by Oracle in the LICENSE file that accompanied this code.
3307 #
3308 # This code is distributed in the hope that it will be useful, but WITHOUT
3309 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3310 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3311 # version 2 for more details (a copy is included in the LICENSE file that
3312 # accompanied this code).
3313 #
3314 # You should have received a copy of the GNU General Public License version
3315 # 2 along with this work; if not, write to the Free Software Foundation,
3316 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317 #
3318 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3319 # or visit www.oracle.com if you need additional information or have any
3320 # questions.
3321 #
3322 
3323 #
3324 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3325 #
3326 # This program is free software; you can redistribute it and/or modify
3327 # it under the terms of the GNU General Public License as published by
3328 # the Free Software Foundation; either version 2 of the License, or
3329 # (at your option) any later version.
3330 #
3331 # This program is distributed in the hope that it will be useful, but
3332 # WITHOUT ANY WARRANTY; without even the implied warranty of
3333 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3334 # General Public License for more details.
3335 #
3336 # You should have received a copy of the GNU General Public License
3337 # along with this program; if not, write to the Free Software
3338 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3339 #
3340 # As a special exception to the GNU General Public License, if you
3341 # distribute this file as part of a program that contains a
3342 # configuration script generated by Autoconf, you may include it under
3343 # the same distribution terms that you use for the rest of that program.
3344 
3345 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3346 # ----------------------------------
3347 # PKG_PROG_PKG_CONFIG
3348 
3349 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3350 #
3351 # Check to see whether a particular set of modules exists.  Similar
3352 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3353 #
3354 #
3355 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3356 # this or PKG_CHECK_MODULES is called, or make sure to call
3357 # PKG_CHECK_EXISTS manually
3358 # --------------------------------------------------------------
3359 
3360 
3361 
3362 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3363 # ---------------------------------------------
3364 # _PKG_CONFIG
3365 
3366 # _PKG_SHORT_ERRORS_SUPPORTED
3367 # -----------------------------
3368 # _PKG_SHORT_ERRORS_SUPPORTED
3369 
3370 
3371 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3372 # [ACTION-IF-NOT-FOUND])
3373 #
3374 #
3375 # Note that if there is a possibility the first call to
3376 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3377 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3378 #
3379 #
3380 # --------------------------------------------------------------
3381 # PKG_CHECK_MODULES
3382 
3383 
3384 # Include these first...
3385 #
3386 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3387 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3388 #
3389 # This code is free software; you can redistribute it and/or modify it
3390 # under the terms of the GNU General Public License version 2 only, as
3391 # published by the Free Software Foundation.  Oracle designates this
3392 # particular file as subject to the "Classpath" exception as provided
3393 # by Oracle in the LICENSE file that accompanied this code.
3394 #
3395 # This code is distributed in the hope that it will be useful, but WITHOUT
3396 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3397 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3398 # version 2 for more details (a copy is included in the LICENSE file that
3399 # accompanied this code).
3400 #
3401 # You should have received a copy of the GNU General Public License version
3402 # 2 along with this work; if not, write to the Free Software Foundation,
3403 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3404 #
3405 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3406 # or visit www.oracle.com if you need additional information or have any
3407 # questions.
3408 #
3409 
3410 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3411 # If so, then append $1 to $2 \
3412 # Also set JVM_ARG_OK to true/false depending on outcome.
3413 
3414 
3415 # Appends a string to a path variable, only adding the : when needed.
3416 
3417 
3418 # Prepends a string to a path variable, only adding the : when needed.
3419 
3420 
3421 # This will make sure the given variable points to a full and proper
3422 # path. This means:
3423 # 1) There will be no spaces in the path. On unix platforms,
3424 #    spaces in the path will result in an error. On Windows,
3425 #    the path will be rewritten using short-style to be space-free.
3426 # 2) The path will be absolute, and it will be in unix-style (on
3427 #     cygwin).
3428 # $1: The name of the variable to fix
3429 
3430 
3431 # This will make sure the given variable points to a executable
3432 # with a full and proper path. This means:
3433 # 1) There will be no spaces in the path. On unix platforms,
3434 #    spaces in the path will result in an error. On Windows,
3435 #    the path will be rewritten using short-style to be space-free.
3436 # 2) The path will be absolute, and it will be in unix-style (on
3437 #     cygwin).
3438 # Any arguments given to the executable is preserved.
3439 # If the input variable does not have a directory specification, then
3440 # it need to be in the PATH.
3441 # $1: The name of the variable to fix
3442 
3443 
3444 
3445 
3446 # Register a --with argument but mark it as deprecated
3447 # $1: The name of the with argument to deprecate, not including --with-
3448 
3449 
3450 # Register a --enable argument but mark it as deprecated
3451 # $1: The name of the with argument to deprecate, not including --enable-
3452 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3453 
3454 
3455 
3456 
3457 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3458 # $1: variable to check
3459 
3460 
3461 # Check that there are no unprocessed overridden variables left.
3462 # If so, they are an incorrect argument and we will exit with an error.
3463 
3464 
3465 # Setup a tool for the given variable. If correctly specified by the user,
3466 # use that value, otherwise search for the tool using the supplied code snippet.
3467 # $1: variable to set
3468 # $2: code snippet to call to look for the tool
3469 
3470 
3471 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3472 # $1: variable to set
3473 # $2: executable name (or list of names) to look for
3474 
3475 
3476 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3477 # $1: variable to set
3478 # $2: executable name (or list of names) to look for
3479 
3480 
3481 # Like BASIC_PATH_PROGS but fails if no tool was found.
3482 # $1: variable to set
3483 # $2: executable name (or list of names) to look for
3484 
3485 
3486 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3487 # $1: variable to set
3488 # $2: autoconf macro to call to look for the special tool
3489 
3490 
3491 # Setup the most fundamental tools that relies on not much else to set up,
3492 # but is used by much of the early bootstrap code.
3493 
3494 
3495 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3496 
3497 
3498 
3499 
3500 
3501 
3502 
3503 
3504 
3505 #%%% Simple tools %%%
3506 
3507 # Check if we have found a usable version of make
3508 # $1: the path to a potential make binary (or empty)
3509 # $2: the description on how we found this
3510 
3511 
3512 
3513 
3514 # Goes looking for a usable version of GNU make.
3515 
3516 
3517 
3518 
3519 
3520 
3521 # Check if build directory is on local disk. If not possible to determine,
3522 # we prefer to claim it's local.
3523 # Argument 1: directory to test
3524 # Argument 2: what to do if it is on local disk
3525 # Argument 3: what to do otherwise (remote disk or failure)
3526 
3527 
3528 # Check that source files have basic read permissions set. This might
3529 # not be the case in cygwin in certain conditions.
3530 
3531 
3532 
3533 
3534 #
3535 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3536 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3537 #
3538 # This code is free software; you can redistribute it and/or modify it
3539 # under the terms of the GNU General Public License version 2 only, as
3540 # published by the Free Software Foundation.  Oracle designates this
3541 # particular file as subject to the "Classpath" exception as provided
3542 # by Oracle in the LICENSE file that accompanied this code.
3543 #
3544 # This code is distributed in the hope that it will be useful, but WITHOUT
3545 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3546 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3547 # version 2 for more details (a copy is included in the LICENSE file that
3548 # accompanied this code).
3549 #
3550 # You should have received a copy of the GNU General Public License version
3551 # 2 along with this work; if not, write to the Free Software Foundation,
3552 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3553 #
3554 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3555 # or visit www.oracle.com if you need additional information or have any
3556 # questions.
3557 #
3558 
3559 
3560 
3561 
3562 
3563 # Helper function which possibly converts a path using DOS-style short mode.
3564 # If so, the updated path is stored in $new_path.
3565 # $1: The path to check
3566 
3567 
3568 # Helper function which possibly converts a path using DOS-style short mode.
3569 # If so, the updated path is stored in $new_path.
3570 # $1: The path to check
3571 
3572 
3573 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3574 # and could probably be heavily simplified. However, all changes in this
3575 # area tend to need lot of testing in different scenarios, and in lack of
3576 # proper unit testing, cleaning this up has not been deemed worth the effort
3577 # at the moment.
3578 
3579 
3580 
3581 
3582 
3583 
3584 
3585 
3586 
3587 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3588 
3589 
3590 
3591 
3592 #
3593 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3594 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3595 #
3596 # This code is free software; you can redistribute it and/or modify it
3597 # under the terms of the GNU General Public License version 2 only, as
3598 # published by the Free Software Foundation.  Oracle designates this
3599 # particular file as subject to the "Classpath" exception as provided
3600 # by Oracle in the LICENSE file that accompanied this code.
3601 #
3602 # This code is distributed in the hope that it will be useful, but WITHOUT
3603 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3604 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3605 # version 2 for more details (a copy is included in the LICENSE file that
3606 # accompanied this code).
3607 #
3608 # You should have received a copy of the GNU General Public License version
3609 # 2 along with this work; if not, write to the Free Software Foundation,
3610 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3611 #
3612 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3613 # or visit www.oracle.com if you need additional information or have any
3614 # questions.
3615 #
3616 
3617 
3618 
3619 
3620 
3621 
3622 
3623 
3624 
3625 
3626 
3627 # ... then the rest
3628 #
3629 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3630 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3631 #
3632 # This code is free software; you can redistribute it and/or modify it
3633 # under the terms of the GNU General Public License version 2 only, as
3634 # published by the Free Software Foundation.  Oracle designates this
3635 # particular file as subject to the "Classpath" exception as provided
3636 # by Oracle in the LICENSE file that accompanied this code.
3637 #
3638 # This code is distributed in the hope that it will be useful, but WITHOUT
3639 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3640 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3641 # version 2 for more details (a copy is included in the LICENSE file that
3642 # accompanied this code).
3643 #
3644 # You should have received a copy of the GNU General Public License version
3645 # 2 along with this work; if not, write to the Free Software Foundation,
3646 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3647 #
3648 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3649 # or visit www.oracle.com if you need additional information or have any
3650 # questions.
3651 #
3652 
3653 ########################################################################
3654 # This file handles detection of the Boot JDK. The Boot JDK detection
3655 # process has been developed as a response to solve a complex real-world
3656 # problem. Initially, it was simple, but it has grown as platform after
3657 # platform, idiosyncracy after idiosyncracy has been supported.
3658 #
3659 # The basic idea is this:
3660 # 1) You need an acceptable *) JDK to use as a Boot JDK
3661 # 2) There are several ways to locate a JDK, that are mostly platform
3662 #    dependent **)
3663 # 3) You can have multiple JDKs installed
3664 # 4) If possible, configure should try to dig out an acceptable JDK
3665 #    automatically, without having to resort to command-line options
3666 #
3667 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3668 #     javac) and not a JRE, etc.
3669 #
3670 # **) On Windows we typically use a well-known path.
3671 #     On MacOSX we typically use the tool java_home.
3672 #     On Linux we typically find javac in the $PATH, and then follow a
3673 #     chain of symlinks that often ends up in a real JDK.
3674 #
3675 # This leads to the code where we check in different ways to locate a
3676 # JDK, and if one is found, check if it is acceptable. If not, we print
3677 # our reasons for rejecting it (useful when debugging non-working
3678 # configure situations) and continue checking the next one.
3679 ########################################################################
3680 
3681 # Execute the check given as argument, and verify the result
3682 # If the Boot JDK was previously found, do nothing
3683 # $1 A command line (typically autoconf macro) to execute
3684 
3685 
3686 # Test: Is bootjdk explicitely set by command line arguments?
3687 
3688 
3689 # Test: Is bootjdk available from builddeps?
3690 
3691 
3692 # Test: Is $JAVA_HOME set?
3693 
3694 
3695 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3696 
3697 
3698 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3699 # $1: Argument to the java_home binary (optional)
3700 
3701 
3702 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3703 
3704 
3705 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3706 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3707 # $1 = Path to directory containing jdk installations.
3708 # $2 = String to append to the found JDK directory to get the proper JDK home
3709 
3710 
3711 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3712 # environmental variable as base for where to look.
3713 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3714 
3715 
3716 # Test: Is there a JDK installed in default, well-known locations?
3717 
3718 
3719 # Check that a command-line tool in the Boot JDK is correct
3720 # $1 = name of variable to assign
3721 # $2 = name of binary
3722 
3723 
3724 ###############################################################################
3725 #
3726 # We need a Boot JDK to bootstrap the build.
3727 #
3728 
3729 
3730 
3731 
3732 
3733 #
3734 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3735 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3736 #
3737 # This code is free software; you can redistribute it and/or modify it
3738 # under the terms of the GNU General Public License version 2 only, as
3739 # published by the Free Software Foundation.  Oracle designates this
3740 # particular file as subject to the "Classpath" exception as provided
3741 # by Oracle in the LICENSE file that accompanied this code.
3742 #
3743 # This code is distributed in the hope that it will be useful, but WITHOUT
3744 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3745 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3746 # version 2 for more details (a copy is included in the LICENSE file that
3747 # accompanied this code).
3748 #
3749 # You should have received a copy of the GNU General Public License version
3750 # 2 along with this work; if not, write to the Free Software Foundation,
3751 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3752 #
3753 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3754 # or visit www.oracle.com if you need additional information or have any
3755 # questions.
3756 #
3757 
3758 
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 
3767 
3768 
3769 
3770 
3771 
3772 
3773 
3774 
3775 
3776 
3777 #
3778 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3779 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3780 #
3781 # This code is free software; you can redistribute it and/or modify it
3782 # under the terms of the GNU General Public License version 2 only, as
3783 # published by the Free Software Foundation.  Oracle designates this
3784 # particular file as subject to the "Classpath" exception as provided
3785 # by Oracle in the LICENSE file that accompanied this code.
3786 #
3787 # This code is distributed in the hope that it will be useful, but WITHOUT
3788 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3789 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3790 # version 2 for more details (a copy is included in the LICENSE file that
3791 # accompanied this code).
3792 #
3793 # You should have received a copy of the GNU General Public License version
3794 # 2 along with this work; if not, write to the Free Software Foundation,
3795 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3796 #
3797 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3798 # or visit www.oracle.com if you need additional information or have any
3799 # questions.
3800 #
3801 
3802 
3803 
3804 
3805 
3806 # Documentation on common flags used for solstudio in HIGHEST.
3807 #
3808 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3809 #          done with care, there are some assumptions below that need to
3810 #          be understood about the use of pointers, and IEEE behavior.
3811 #
3812 # -fns: Use non-standard floating point mode (not IEEE 754)
3813 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3814 # -fsingle: Use single precision floating point with 'float'
3815 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3816 #   (Source with excessing pointer casting and data access with mixed
3817 #    pointer types are not recommended)
3818 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3819 #   (If you expect perfect errno behavior, do not use this)
3820 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3821 # -xrestrict: Pointer parameters to functions do not overlap
3822 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3823 #    If you pass in multiple pointers to the same data, do not use this)
3824 # -xlibmil: Inline some library routines
3825 #   (If you expect perfect errno behavior, do not use this)
3826 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3827 #   (If you expect perfect errno behavior, do not use this)
3828 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3829 
3830     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3831     # Bug?
3832     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3833     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3834     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3835     #fi
3836 
3837 
3838 
3839 
3840 
3841 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3842 #                                   [RUN-IF-FALSE])
3843 # ------------------------------------------------------------
3844 # Check that the c and c++ compilers support an argument
3845 
3846 
3847 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3848 #                                    [RUN-IF-FALSE])
3849 # ------------------------------------------------------------
3850 # Check that the linker support an argument
3851 
3852 
3853 
3854 
3855 #
3856 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3857 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3858 #
3859 # This code is free software; you can redistribute it and/or modify it
3860 # under the terms of the GNU General Public License version 2 only, as
3861 # published by the Free Software Foundation.  Oracle designates this
3862 # particular file as subject to the "Classpath" exception as provided
3863 # by Oracle in the LICENSE file that accompanied this code.
3864 #
3865 # This code is distributed in the hope that it will be useful, but WITHOUT
3866 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3867 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3868 # version 2 for more details (a copy is included in the LICENSE file that
3869 # accompanied this code).
3870 #
3871 # You should have received a copy of the GNU General Public License version
3872 # 2 along with this work; if not, write to the Free Software Foundation,
3873 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3874 #
3875 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3876 # or visit www.oracle.com if you need additional information or have any
3877 # questions.
3878 #
3879 
3880 
3881 
3882 
3883 
3884 cygwin_help() {
3885   case $1 in
3886     unzip)
3887       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3888       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3889       ;;
3890     zip)
3891       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3892       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3893       ;;
3894     make)
3895       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3896       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3897       ;;
3898     freetype)
3899       HELP_MSG="
3900 The freetype library can now be build during the configure process.
3901 Download the freetype sources and unpack them into an arbitrary directory:
3902 
3903 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3904 tar -xzf freetype-2.5.3.tar.gz
3905 
3906 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3907 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3908 builds or into '<freetype_src>/lib32' for 32-bit builds.
3909 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3910 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3911       ;;
3912   esac
3913 }
3914 
3915 msys_help() {
3916   PKGHANDLER_COMMAND=""
3917 }
3918 
3919 apt_help() {
3920   case $1 in
3921     devkit)
3922       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3923     openjdk)
3924       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3925     alsa)
3926       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3927     cups)
3928       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3929     freetype)
3930       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3931     pulse)
3932       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3933     x11)
3934       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3935     ccache)
3936       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3937   esac
3938 }
3939 
3940 yum_help() {
3941   case $1 in
3942     devkit)
3943       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3944     openjdk)
3945       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3946     alsa)
3947       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3948     cups)
3949       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3950     freetype)
3951       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3952     pulse)
3953       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3954     x11)
3955       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3956     ccache)
3957       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3958   esac
3959 }
3960 
3961 port_help() {
3962   PKGHANDLER_COMMAND=""
3963 }
3964 
3965 pkgutil_help() {
3966   PKGHANDLER_COMMAND=""
3967 }
3968 
3969 pkgadd_help() {
3970   PKGHANDLER_COMMAND=""
3971 }
3972 
3973 # This function will check if we're called from the "configure" wrapper while
3974 # printing --help. If so, we will print out additional information that can
3975 # only be extracted within the autoconf script, and then exit. This must be
3976 # called at the very beginning in configure.ac.
3977 
3978 
3979 
3980 
3981 
3982 
3983 #
3984 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3985 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3986 #
3987 # This code is free software; you can redistribute it and/or modify it
3988 # under the terms of the GNU General Public License version 2 only, as
3989 # published by the Free Software Foundation.  Oracle designates this
3990 # particular file as subject to the "Classpath" exception as provided
3991 # by Oracle in the LICENSE file that accompanied this code.
3992 #
3993 # This code is distributed in the hope that it will be useful, but WITHOUT
3994 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3995 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3996 # version 2 for more details (a copy is included in the LICENSE file that
3997 # accompanied this code).
3998 #
3999 # You should have received a copy of the GNU General Public License version
4000 # 2 along with this work; if not, write to the Free Software Foundation,
4001 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4002 #
4003 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4004 # or visit www.oracle.com if you need additional information or have any
4005 # questions.
4006 #
4007 
4008 
4009 
4010 
4011 
4012 
4013 
4014 
4015 
4016 
4017 ###############################################################################
4018 #
4019 # Should we build only OpenJDK even if closed sources are present?
4020 #
4021 
4022 
4023 
4024 
4025 ###############################################################################
4026 #
4027 # Setup version numbers
4028 #
4029 
4030 
4031 
4032 
4033 
4034 
4035 #
4036 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4037 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4038 #
4039 # This code is free software; you can redistribute it and/or modify it
4040 # under the terms of the GNU General Public License version 2 only, as
4041 # published by the Free Software Foundation.  Oracle designates this
4042 # particular file as subject to the "Classpath" exception as provided
4043 # by Oracle in the LICENSE file that accompanied this code.
4044 #
4045 # This code is distributed in the hope that it will be useful, but WITHOUT
4046 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4047 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4048 # version 2 for more details (a copy is included in the LICENSE file that
4049 # accompanied this code).
4050 #
4051 # You should have received a copy of the GNU General Public License version
4052 # 2 along with this work; if not, write to the Free Software Foundation,
4053 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4054 #
4055 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4056 # or visit www.oracle.com if you need additional information or have any
4057 # questions.
4058 #
4059 
4060 
4061 
4062 
4063 
4064 
4065 
4066 
4067 
4068 
4069 
4070 
4071 
4072 
4073 
4074 
4075 
4076 
4077 
4078 
4079 
4080 #
4081 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4082 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4083 #
4084 # This code is free software; you can redistribute it and/or modify it
4085 # under the terms of the GNU General Public License version 2 only, as
4086 # published by the Free Software Foundation.  Oracle designates this
4087 # particular file as subject to the "Classpath" exception as provided
4088 # by Oracle in the LICENSE file that accompanied this code.
4089 #
4090 # This code is distributed in the hope that it will be useful, but WITHOUT
4091 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4092 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4093 # version 2 for more details (a copy is included in the LICENSE file that
4094 # accompanied this code).
4095 #
4096 # You should have received a copy of the GNU General Public License version
4097 # 2 along with this work; if not, write to the Free Software Foundation,
4098 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4099 #
4100 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4101 # or visit www.oracle.com if you need additional information or have any
4102 # questions.
4103 #
4104 
4105 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4106 # Converts autoconf style CPU name to OpenJDK style, into
4107 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4108 
4109 
4110 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4111 # Converts autoconf style OS name to OpenJDK style, into
4112 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4113 
4114 
4115 # Expects $host_os $host_cpu $build_os and $build_cpu
4116 # and $with_target_bits to have been setup!
4117 #
4118 # Translate the standard triplet(quadruplet) definition
4119 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4120 # OPENJDK_BUILD_OS, etc.
4121 
4122 
4123 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4124 # accordingly. Must be done after setting up build and target system, but before
4125 # doing anything else with these values.
4126 
4127 
4128 # Setup the legacy variables, for controlling the old makefiles.
4129 #
4130 
4131 
4132 
4133 
4134 #%%% Build and target systems %%%
4135 
4136 
4137 
4138 
4139 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4140 # Add -mX to various FLAGS variables.
4141 
4142 
4143 
4144 
4145 
4146 
4147 #
4148 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4149 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4150 #
4151 # This code is free software; you can redistribute it and/or modify it
4152 # under the terms of the GNU General Public License version 2 only, as
4153 # published by the Free Software Foundation.  Oracle designates this
4154 # particular file as subject to the "Classpath" exception as provided
4155 # by Oracle in the LICENSE file that accompanied this code.
4156 #
4157 # This code is distributed in the hope that it will be useful, but WITHOUT
4158 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4159 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4160 # version 2 for more details (a copy is included in the LICENSE file that
4161 # accompanied this code).
4162 #
4163 # You should have received a copy of the GNU General Public License version
4164 # 2 along with this work; if not, write to the Free Software Foundation,
4165 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4166 #
4167 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4168 # or visit www.oracle.com if you need additional information or have any
4169 # questions.
4170 #
4171 
4172 
4173 
4174 
4175 
4176 
4177 
4178 
4179 #
4180 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4181 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4182 #
4183 # This code is free software; you can redistribute it and/or modify it
4184 # under the terms of the GNU General Public License version 2 only, as
4185 # published by the Free Software Foundation.  Oracle designates this
4186 # particular file as subject to the "Classpath" exception as provided
4187 # by Oracle in the LICENSE file that accompanied this code.
4188 #
4189 # This code is distributed in the hope that it will be useful, but WITHOUT
4190 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4191 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4192 # version 2 for more details (a copy is included in the LICENSE file that
4193 # accompanied this code).
4194 #
4195 # You should have received a copy of the GNU General Public License version
4196 # 2 along with this work; if not, write to the Free Software Foundation,
4197 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4198 #
4199 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4200 # or visit www.oracle.com if you need additional information or have any
4201 # questions.
4202 #
4203 
4204 ########################################################################
4205 # This file is responsible for detecting, verifying and setting up the
4206 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4207 # proper paths to the binaries, but it will not setup any flags.
4208 #
4209 # The binaries used is determined by the toolchain type, which is the family of
4210 # compilers and related tools that are used.
4211 ########################################################################
4212 
4213 
4214 # All valid toolchains, regardless of platform (used by help.m4)
4215 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4216 
4217 # These toolchains are valid on different platforms
4218 VALID_TOOLCHAINS_linux="gcc clang"
4219 VALID_TOOLCHAINS_solaris="solstudio"
4220 VALID_TOOLCHAINS_macosx="gcc clang"
4221 VALID_TOOLCHAINS_aix="xlc"
4222 VALID_TOOLCHAINS_windows="microsoft"
4223 
4224 # Toolchain descriptions
4225 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4226 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4227 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4228 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4229 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4230 
4231 # Setup a number of variables describing how native output files are
4232 # named on this platform/toolchain.
4233 
4234 
4235 # Determine which toolchain type to use, and make sure it is valid for this
4236 # platform. Setup various information about the selected toolchain.
4237 
4238 
4239 # Before we start detecting the toolchain executables, we might need some
4240 # special setup, e.g. additional paths etc.
4241 
4242 
4243 # Restore path, etc
4244 
4245 
4246 # Check if a compiler is of the toolchain type we expect, and save the version
4247 # information from it. If the compiler does not match the expected type,
4248 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4249 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4250 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4251 #
4252 # $1 = compiler to test (CC or CXX)
4253 # $2 = human readable name of compiler (C or C++)
4254 
4255 
4256 # Try to locate the given C or C++ compiler in the path, or otherwise.
4257 #
4258 # $1 = compiler to test (CC or CXX)
4259 # $2 = human readable name of compiler (C or C++)
4260 # $3 = list of compiler names to search for
4261 
4262 
4263 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4264 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4265 # archiver (AR). Verify that the compilers are correct according to the
4266 # toolchain type.
4267 
4268 
4269 # Setup additional tools that is considered a part of the toolchain, but not the
4270 # core part. Many of these are highly platform-specific and do not exist,
4271 # and/or are not needed on all platforms.
4272 
4273 
4274 # Setup the build tools (i.e, the compiler and linker used to build programs
4275 # that should be run on the build platform, not the target platform, as a build
4276 # helper). Since the non-cross-compile case uses the normal, target compilers
4277 # for this, we can only do this after these have been setup.
4278 
4279 
4280 # Setup legacy variables that are still needed as alternative ways to refer to
4281 # parts of the toolchain.
4282 
4283 
4284 # Do some additional checks on the detected tools.
4285 
4286 
4287 # Setup the JTReg Regression Test Harness.
4288 
4289 
4290 #
4291 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4292 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4293 #
4294 # This code is free software; you can redistribute it and/or modify it
4295 # under the terms of the GNU General Public License version 2 only, as
4296 # published by the Free Software Foundation.  Oracle designates this
4297 # particular file as subject to the "Classpath" exception as provided
4298 # by Oracle in the LICENSE file that accompanied this code.
4299 #
4300 # This code is distributed in the hope that it will be useful, but WITHOUT
4301 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4302 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4303 # version 2 for more details (a copy is included in the LICENSE file that
4304 # accompanied this code).
4305 #
4306 # You should have received a copy of the GNU General Public License version
4307 # 2 along with this work; if not, write to the Free Software Foundation,
4308 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4309 #
4310 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4311 # or visit www.oracle.com if you need additional information or have any
4312 # questions.
4313 #
4314 
4315 ################################################################################
4316 
4317 VALID_VS_VERSIONS="2010 2012 2013"
4318 
4319 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4320 VS_VERSION_INTERNAL_2010=100
4321 VS_MSVCR_2010=msvcr100.dll
4322 # We don't use msvcp on Visual Studio 2010
4323 #VS_MSVCP_2010=msvcp100.dll
4324 VS_ENVVAR_2010="VS100COMNTOOLS"
4325 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4326 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4327 VS_VS_PLATFORM_NAME_2010="v100"
4328 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4329 
4330 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4331 VS_VERSION_INTERNAL_2012=110
4332 VS_MSVCR_2012=msvcr110.dll
4333 VS_MSVCP_2012=msvcp110.dll
4334 VS_ENVVAR_2012="VS110COMNTOOLS"
4335 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4336 VS_SDK_INSTALLDIR_2012=
4337 VS_VS_PLATFORM_NAME_2012="v110"
4338 VS_SDK_PLATFORM_NAME_2012=
4339 
4340 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4341 VS_VERSION_INTERNAL_2013=120
4342 VS_MSVCR_2013=msvcr120.dll
4343 VS_MSVCP_2013=msvcp120.dll
4344 VS_ENVVAR_2013="VS120COMNTOOLS"
4345 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4346 VS_SDK_INSTALLDIR_2013=
4347 VS_VS_PLATFORM_NAME_2013="v120"
4348 VS_SDK_PLATFORM_NAME_2013=
4349 
4350 ################################################################################
4351 
4352 
4353 
4354 ################################################################################
4355 
4356 
4357 
4358 ################################################################################
4359 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4360 # build environment and assigns it to VS_ENV_CMD
4361 
4362 
4363 ################################################################################
4364 
4365 
4366 
4367 ################################################################################
4368 # Check if the VS env variables were setup prior to running configure.
4369 # If not, then find vcvarsall.bat and run it automatically, and integrate
4370 # the set env variables into the spec file.
4371 
4372 
4373 
4374 
4375 
4376 
4377 
4378 
4379 
4380 
4381 
4382 
4383 
4384 # This line needs to be here, verbatim, after all includes and the dummy hook
4385 # definitions. It is replaced with custom functionality when building
4386 # custom sources.
4387 #CUSTOM_AUTOCONF_INCLUDE
4388 
4389 # Do not change or remove the following line, it is needed for consistency checks:
4390 DATE_WHEN_GENERATED=1421073193
4391 
4392 ###############################################################################
4393 #
4394 # Initialization / Boot-strapping
4395 #
4396 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4397 # thus it jumps back and forth, each time gaining something needed later on.
4398 #
4399 ###############################################################################
4400 
4401 # If we are requested to print additional help, do that and then exit.
4402 # This must be the very first call.
4403 
4404   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4405     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4406     $PRINTF "Which are valid to use depends on the build platform.\n"
4407     for toolchain in $VALID_TOOLCHAINS_all; do
4408       # Use indirect variable referencing
4409       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4410       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4411       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4412     done
4413 
4414     # And now exit directly
4415     exit 0
4416   fi
4417 
4418 
4419 # Basic initialization that must happen first of all in the normal process.
4420 
4421   # Save the original command line. This is passed to us by the wrapper configure script.
4422 
4423   DATE_WHEN_CONFIGURED=`LANG=C date`
4424 
4425   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4426 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4427   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4428 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4429 
4430 
4431   # Start with tools that do not need have cross compilation support
4432   # and can be expected to be found in the default PATH. These tools are
4433   # used by configure. Nor are these tools expected to be found in the
4434   # devkit from the builddeps server either, since they are
4435   # needed to download the devkit.
4436 
4437   # First are all the simple required tools.
4438 
4439 
4440 
4441   # Publish this variable in the help.
4442 
4443 
4444   if test "x$BASENAME" = x; then
4445     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
4493 
4494     # Try to remove the string !BASENAME! from our list.
4495     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4496     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4497       # If it failed, the variable was not from the command line. Ignore it,
4498       # but warn the user (except for BASH, which is always set by the calling BASH).
4499       if test "xBASENAME" != xBASH; then
4500         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4501 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4502       fi
4503       # Try to locate tool using the code snippet
4504       for ac_prog in basename
4505 do
4506   # Extract the first word of "$ac_prog", so it can be a program name with args.
4507 set dummy $ac_prog; 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   test -n "$BASENAME" && break
4547 done
4548 
4549     else
4550       # If it succeeded, then it was overridden by the user. We will use it
4551       # for the tool.
4552 
4553       # First remove it from the list of overridden variables, so we can test
4554       # for unknown variables in the end.
4555       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4556 
4557       # Check if the provided tool contains a complete path.
4558       tool_specified="$BASENAME"
4559       tool_basename="${tool_specified##*/}"
4560       if test "x$tool_basename" = "x$tool_specified"; then
4561         # A command without a complete path is provided, search $PATH.
4562         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4563 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4564         # Extract the first word of "$tool_basename", so it can be a program name with args.
4565 set dummy $tool_basename; ac_word=$2
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567 $as_echo_n "checking for $ac_word... " >&6; }
4568 if ${ac_cv_path_BASENAME+:} false; then :
4569   $as_echo_n "(cached) " >&6
4570 else
4571   case $BASENAME in
4572   [\\/]* | ?:[\\/]*)
4573   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4574   ;;
4575   *)
4576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577 for as_dir in $PATH
4578 do
4579   IFS=$as_save_IFS
4580   test -z "$as_dir" && as_dir=.
4581     for ac_exec_ext in '' $ac_executable_extensions; do
4582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585     break 2
4586   fi
4587 done
4588   done
4589 IFS=$as_save_IFS
4590 
4591   ;;
4592 esac
4593 fi
4594 BASENAME=$ac_cv_path_BASENAME
4595 if test -n "$BASENAME"; then
4596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4597 $as_echo "$BASENAME" >&6; }
4598 else
4599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600 $as_echo "no" >&6; }
4601 fi
4602 
4603 
4604         if test "x$BASENAME" = x; then
4605           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4606         fi
4607       else
4608         # Otherwise we believe it is a complete path. Use it as it is.
4609         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4610 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4611         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4612 $as_echo_n "checking for BASENAME... " >&6; }
4613         if test ! -x "$tool_specified"; then
4614           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4615 $as_echo "not found" >&6; }
4616           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4617         fi
4618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4619 $as_echo "$tool_specified" >&6; }
4620       fi
4621     fi
4622   fi
4623 
4624 
4625 
4626   if test "x$BASENAME" = x; then
4627     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4628   fi
4629 
4630 
4631 
4632 
4633 
4634   # Publish this variable in the help.
4635 
4636 
4637   if test "x$BASH" = x; then
4638     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
4686 
4687     # Try to remove the string !BASH! from our list.
4688     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4689     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4690       # If it failed, the variable was not from the command line. Ignore it,
4691       # but warn the user (except for BASH, which is always set by the calling BASH).
4692       if test "xBASH" != xBASH; then
4693         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4694 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4695       fi
4696       # Try to locate tool using the code snippet
4697       for ac_prog in bash
4698 do
4699   # Extract the first word of "$ac_prog", so it can be a program name with args.
4700 set dummy $ac_prog; 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   test -n "$BASH" && break
4740 done
4741 
4742     else
4743       # If it succeeded, then it was overridden by the user. We will use it
4744       # for the tool.
4745 
4746       # First remove it from the list of overridden variables, so we can test
4747       # for unknown variables in the end.
4748       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4749 
4750       # Check if the provided tool contains a complete path.
4751       tool_specified="$BASH"
4752       tool_basename="${tool_specified##*/}"
4753       if test "x$tool_basename" = "x$tool_specified"; then
4754         # A command without a complete path is provided, search $PATH.
4755         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4756 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4757         # Extract the first word of "$tool_basename", so it can be a program name with args.
4758 set dummy $tool_basename; ac_word=$2
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760 $as_echo_n "checking for $ac_word... " >&6; }
4761 if ${ac_cv_path_BASH+:} false; then :
4762   $as_echo_n "(cached) " >&6
4763 else
4764   case $BASH in
4765   [\\/]* | ?:[\\/]*)
4766   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4767   ;;
4768   *)
4769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770 for as_dir in $PATH
4771 do
4772   IFS=$as_save_IFS
4773   test -z "$as_dir" && as_dir=.
4774     for ac_exec_ext in '' $ac_executable_extensions; do
4775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4776     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4778     break 2
4779   fi
4780 done
4781   done
4782 IFS=$as_save_IFS
4783 
4784   ;;
4785 esac
4786 fi
4787 BASH=$ac_cv_path_BASH
4788 if test -n "$BASH"; then
4789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4790 $as_echo "$BASH" >&6; }
4791 else
4792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793 $as_echo "no" >&6; }
4794 fi
4795 
4796 
4797         if test "x$BASH" = x; then
4798           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4799         fi
4800       else
4801         # Otherwise we believe it is a complete path. Use it as it is.
4802         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4803 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4804         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4805 $as_echo_n "checking for BASH... " >&6; }
4806         if test ! -x "$tool_specified"; then
4807           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4808 $as_echo "not found" >&6; }
4809           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4810         fi
4811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4812 $as_echo "$tool_specified" >&6; }
4813       fi
4814     fi
4815   fi
4816 
4817 
4818 
4819   if test "x$BASH" = x; then
4820     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4821   fi
4822 
4823 
4824 
4825 
4826 
4827   # Publish this variable in the help.
4828 
4829 
4830   if test "x$CAT" = x; then
4831     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
4879 
4880     # Try to remove the string !CAT! from our list.
4881     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4882     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4883       # If it failed, the variable was not from the command line. Ignore it,
4884       # but warn the user (except for BASH, which is always set by the calling BASH).
4885       if test "xCAT" != xBASH; then
4886         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4887 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4888       fi
4889       # Try to locate tool using the code snippet
4890       for ac_prog in cat
4891 do
4892   # Extract the first word of "$ac_prog", so it can be a program name with args.
4893 set dummy $ac_prog; 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   test -n "$CAT" && break
4933 done
4934 
4935     else
4936       # If it succeeded, then it was overridden by the user. We will use it
4937       # for the tool.
4938 
4939       # First remove it from the list of overridden variables, so we can test
4940       # for unknown variables in the end.
4941       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4942 
4943       # Check if the provided tool contains a complete path.
4944       tool_specified="$CAT"
4945       tool_basename="${tool_specified##*/}"
4946       if test "x$tool_basename" = "x$tool_specified"; then
4947         # A command without a complete path is provided, search $PATH.
4948         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4949 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4950         # Extract the first word of "$tool_basename", so it can be a program name with args.
4951 set dummy $tool_basename; ac_word=$2
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953 $as_echo_n "checking for $ac_word... " >&6; }
4954 if ${ac_cv_path_CAT+:} false; then :
4955   $as_echo_n "(cached) " >&6
4956 else
4957   case $CAT in
4958   [\\/]* | ?:[\\/]*)
4959   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4960   ;;
4961   *)
4962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963 for as_dir in $PATH
4964 do
4965   IFS=$as_save_IFS
4966   test -z "$as_dir" && as_dir=.
4967     for ac_exec_ext in '' $ac_executable_extensions; do
4968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4969     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4971     break 2
4972   fi
4973 done
4974   done
4975 IFS=$as_save_IFS
4976 
4977   ;;
4978 esac
4979 fi
4980 CAT=$ac_cv_path_CAT
4981 if test -n "$CAT"; then
4982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4983 $as_echo "$CAT" >&6; }
4984 else
4985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986 $as_echo "no" >&6; }
4987 fi
4988 
4989 
4990         if test "x$CAT" = x; then
4991           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4992         fi
4993       else
4994         # Otherwise we believe it is a complete path. Use it as it is.
4995         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4996 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4997         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4998 $as_echo_n "checking for CAT... " >&6; }
4999         if test ! -x "$tool_specified"; then
5000           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5001 $as_echo "not found" >&6; }
5002           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5003         fi
5004         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5005 $as_echo "$tool_specified" >&6; }
5006       fi
5007     fi
5008   fi
5009 
5010 
5011 
5012   if test "x$CAT" = x; then
5013     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5014   fi
5015 
5016 
5017 
5018 
5019 
5020   # Publish this variable in the help.
5021 
5022 
5023   if test "x$CHMOD" = x; then
5024     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
5072 
5073     # Try to remove the string !CHMOD! from our list.
5074     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5075     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5076       # If it failed, the variable was not from the command line. Ignore it,
5077       # but warn the user (except for BASH, which is always set by the calling BASH).
5078       if test "xCHMOD" != xBASH; then
5079         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5080 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5081       fi
5082       # Try to locate tool using the code snippet
5083       for ac_prog in chmod
5084 do
5085   # Extract the first word of "$ac_prog", so it can be a program name with args.
5086 set dummy $ac_prog; 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   test -n "$CHMOD" && break
5126 done
5127 
5128     else
5129       # If it succeeded, then it was overridden by the user. We will use it
5130       # for the tool.
5131 
5132       # First remove it from the list of overridden variables, so we can test
5133       # for unknown variables in the end.
5134       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5135 
5136       # Check if the provided tool contains a complete path.
5137       tool_specified="$CHMOD"
5138       tool_basename="${tool_specified##*/}"
5139       if test "x$tool_basename" = "x$tool_specified"; then
5140         # A command without a complete path is provided, search $PATH.
5141         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5142 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5143         # Extract the first word of "$tool_basename", so it can be a program name with args.
5144 set dummy $tool_basename; ac_word=$2
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146 $as_echo_n "checking for $ac_word... " >&6; }
5147 if ${ac_cv_path_CHMOD+:} false; then :
5148   $as_echo_n "(cached) " >&6
5149 else
5150   case $CHMOD in
5151   [\\/]* | ?:[\\/]*)
5152   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5153   ;;
5154   *)
5155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156 for as_dir in $PATH
5157 do
5158   IFS=$as_save_IFS
5159   test -z "$as_dir" && as_dir=.
5160     for ac_exec_ext in '' $ac_executable_extensions; do
5161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5162     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164     break 2
5165   fi
5166 done
5167   done
5168 IFS=$as_save_IFS
5169 
5170   ;;
5171 esac
5172 fi
5173 CHMOD=$ac_cv_path_CHMOD
5174 if test -n "$CHMOD"; then
5175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5176 $as_echo "$CHMOD" >&6; }
5177 else
5178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179 $as_echo "no" >&6; }
5180 fi
5181 
5182 
5183         if test "x$CHMOD" = x; then
5184           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5185         fi
5186       else
5187         # Otherwise we believe it is a complete path. Use it as it is.
5188         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5189 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5191 $as_echo_n "checking for CHMOD... " >&6; }
5192         if test ! -x "$tool_specified"; then
5193           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5194 $as_echo "not found" >&6; }
5195           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5196         fi
5197         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5198 $as_echo "$tool_specified" >&6; }
5199       fi
5200     fi
5201   fi
5202 
5203 
5204 
5205   if test "x$CHMOD" = x; then
5206     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5207   fi
5208 
5209 
5210 
5211 
5212 
5213   # Publish this variable in the help.
5214 
5215 
5216   if test "x$CMP" = x; then
5217     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
5265 
5266     # Try to remove the string !CMP! from our list.
5267     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5268     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5269       # If it failed, the variable was not from the command line. Ignore it,
5270       # but warn the user (except for BASH, which is always set by the calling BASH).
5271       if test "xCMP" != xBASH; then
5272         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5273 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5274       fi
5275       # Try to locate tool using the code snippet
5276       for ac_prog in cmp
5277 do
5278   # Extract the first word of "$ac_prog", so it can be a program name with args.
5279 set dummy $ac_prog; 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   test -n "$CMP" && break
5319 done
5320 
5321     else
5322       # If it succeeded, then it was overridden by the user. We will use it
5323       # for the tool.
5324 
5325       # First remove it from the list of overridden variables, so we can test
5326       # for unknown variables in the end.
5327       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5328 
5329       # Check if the provided tool contains a complete path.
5330       tool_specified="$CMP"
5331       tool_basename="${tool_specified##*/}"
5332       if test "x$tool_basename" = "x$tool_specified"; then
5333         # A command without a complete path is provided, search $PATH.
5334         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5335 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5336         # Extract the first word of "$tool_basename", so it can be a program name with args.
5337 set dummy $tool_basename; ac_word=$2
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5339 $as_echo_n "checking for $ac_word... " >&6; }
5340 if ${ac_cv_path_CMP+:} false; then :
5341   $as_echo_n "(cached) " >&6
5342 else
5343   case $CMP in
5344   [\\/]* | ?:[\\/]*)
5345   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5346   ;;
5347   *)
5348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5349 for as_dir in $PATH
5350 do
5351   IFS=$as_save_IFS
5352   test -z "$as_dir" && as_dir=.
5353     for ac_exec_ext in '' $ac_executable_extensions; do
5354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5355     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5357     break 2
5358   fi
5359 done
5360   done
5361 IFS=$as_save_IFS
5362 
5363   ;;
5364 esac
5365 fi
5366 CMP=$ac_cv_path_CMP
5367 if test -n "$CMP"; then
5368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5369 $as_echo "$CMP" >&6; }
5370 else
5371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5372 $as_echo "no" >&6; }
5373 fi
5374 
5375 
5376         if test "x$CMP" = x; then
5377           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5378         fi
5379       else
5380         # Otherwise we believe it is a complete path. Use it as it is.
5381         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5382 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5383         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5384 $as_echo_n "checking for CMP... " >&6; }
5385         if test ! -x "$tool_specified"; then
5386           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5387 $as_echo "not found" >&6; }
5388           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5389         fi
5390         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5391 $as_echo "$tool_specified" >&6; }
5392       fi
5393     fi
5394   fi
5395 
5396 
5397 
5398   if test "x$CMP" = x; then
5399     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5400   fi
5401 
5402 
5403 
5404 
5405 
5406   # Publish this variable in the help.
5407 
5408 
5409   if test "x$COMM" = x; then
5410     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
5458 
5459     # Try to remove the string !COMM! from our list.
5460     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5461     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5462       # If it failed, the variable was not from the command line. Ignore it,
5463       # but warn the user (except for BASH, which is always set by the calling BASH).
5464       if test "xCOMM" != xBASH; then
5465         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5466 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5467       fi
5468       # Try to locate tool using the code snippet
5469       for ac_prog in comm
5470 do
5471   # Extract the first word of "$ac_prog", so it can be a program name with args.
5472 set dummy $ac_prog; 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   test -n "$COMM" && break
5512 done
5513 
5514     else
5515       # If it succeeded, then it was overridden by the user. We will use it
5516       # for the tool.
5517 
5518       # First remove it from the list of overridden variables, so we can test
5519       # for unknown variables in the end.
5520       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5521 
5522       # Check if the provided tool contains a complete path.
5523       tool_specified="$COMM"
5524       tool_basename="${tool_specified##*/}"
5525       if test "x$tool_basename" = "x$tool_specified"; then
5526         # A command without a complete path is provided, search $PATH.
5527         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5528 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5529         # Extract the first word of "$tool_basename", so it can be a program name with args.
5530 set dummy $tool_basename; ac_word=$2
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5532 $as_echo_n "checking for $ac_word... " >&6; }
5533 if ${ac_cv_path_COMM+:} false; then :
5534   $as_echo_n "(cached) " >&6
5535 else
5536   case $COMM in
5537   [\\/]* | ?:[\\/]*)
5538   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5539   ;;
5540   *)
5541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5542 for as_dir in $PATH
5543 do
5544   IFS=$as_save_IFS
5545   test -z "$as_dir" && as_dir=.
5546     for ac_exec_ext in '' $ac_executable_extensions; do
5547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5548     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5550     break 2
5551   fi
5552 done
5553   done
5554 IFS=$as_save_IFS
5555 
5556   ;;
5557 esac
5558 fi
5559 COMM=$ac_cv_path_COMM
5560 if test -n "$COMM"; then
5561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5562 $as_echo "$COMM" >&6; }
5563 else
5564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5565 $as_echo "no" >&6; }
5566 fi
5567 
5568 
5569         if test "x$COMM" = x; then
5570           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5571         fi
5572       else
5573         # Otherwise we believe it is a complete path. Use it as it is.
5574         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5575 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5576         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5577 $as_echo_n "checking for COMM... " >&6; }
5578         if test ! -x "$tool_specified"; then
5579           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5580 $as_echo "not found" >&6; }
5581           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5582         fi
5583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5584 $as_echo "$tool_specified" >&6; }
5585       fi
5586     fi
5587   fi
5588 
5589 
5590 
5591   if test "x$COMM" = x; then
5592     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5593   fi
5594 
5595 
5596 
5597 
5598 
5599   # Publish this variable in the help.
5600 
5601 
5602   if test "x$CP" = x; then
5603     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
5651 
5652     # Try to remove the string !CP! from our list.
5653     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5654     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5655       # If it failed, the variable was not from the command line. Ignore it,
5656       # but warn the user (except for BASH, which is always set by the calling BASH).
5657       if test "xCP" != xBASH; then
5658         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5659 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5660       fi
5661       # Try to locate tool using the code snippet
5662       for ac_prog in cp
5663 do
5664   # Extract the first word of "$ac_prog", so it can be a program name with args.
5665 set dummy $ac_prog; 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   test -n "$CP" && break
5705 done
5706 
5707     else
5708       # If it succeeded, then it was overridden by the user. We will use it
5709       # for the tool.
5710 
5711       # First remove it from the list of overridden variables, so we can test
5712       # for unknown variables in the end.
5713       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5714 
5715       # Check if the provided tool contains a complete path.
5716       tool_specified="$CP"
5717       tool_basename="${tool_specified##*/}"
5718       if test "x$tool_basename" = "x$tool_specified"; then
5719         # A command without a complete path is provided, search $PATH.
5720         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5721 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5722         # Extract the first word of "$tool_basename", so it can be a program name with args.
5723 set dummy $tool_basename; ac_word=$2
5724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5725 $as_echo_n "checking for $ac_word... " >&6; }
5726 if ${ac_cv_path_CP+:} false; then :
5727   $as_echo_n "(cached) " >&6
5728 else
5729   case $CP in
5730   [\\/]* | ?:[\\/]*)
5731   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5732   ;;
5733   *)
5734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5735 for as_dir in $PATH
5736 do
5737   IFS=$as_save_IFS
5738   test -z "$as_dir" && as_dir=.
5739     for ac_exec_ext in '' $ac_executable_extensions; do
5740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5741     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5743     break 2
5744   fi
5745 done
5746   done
5747 IFS=$as_save_IFS
5748 
5749   ;;
5750 esac
5751 fi
5752 CP=$ac_cv_path_CP
5753 if test -n "$CP"; then
5754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5755 $as_echo "$CP" >&6; }
5756 else
5757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758 $as_echo "no" >&6; }
5759 fi
5760 
5761 
5762         if test "x$CP" = x; then
5763           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5764         fi
5765       else
5766         # Otherwise we believe it is a complete path. Use it as it is.
5767         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5768 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5769         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5770 $as_echo_n "checking for CP... " >&6; }
5771         if test ! -x "$tool_specified"; then
5772           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5773 $as_echo "not found" >&6; }
5774           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5775         fi
5776         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5777 $as_echo "$tool_specified" >&6; }
5778       fi
5779     fi
5780   fi
5781 
5782 
5783 
5784   if test "x$CP" = x; then
5785     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5786   fi
5787 
5788 
5789 
5790 
5791 
5792   # Publish this variable in the help.
5793 
5794 
5795   if test "x$CUT" = x; then
5796     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
5844 
5845     # Try to remove the string !CUT! from our list.
5846     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5847     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5848       # If it failed, the variable was not from the command line. Ignore it,
5849       # but warn the user (except for BASH, which is always set by the calling BASH).
5850       if test "xCUT" != xBASH; then
5851         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5852 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5853       fi
5854       # Try to locate tool using the code snippet
5855       for ac_prog in cut
5856 do
5857   # Extract the first word of "$ac_prog", so it can be a program name with args.
5858 set dummy $ac_prog; 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   test -n "$CUT" && break
5898 done
5899 
5900     else
5901       # If it succeeded, then it was overridden by the user. We will use it
5902       # for the tool.
5903 
5904       # First remove it from the list of overridden variables, so we can test
5905       # for unknown variables in the end.
5906       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5907 
5908       # Check if the provided tool contains a complete path.
5909       tool_specified="$CUT"
5910       tool_basename="${tool_specified##*/}"
5911       if test "x$tool_basename" = "x$tool_specified"; then
5912         # A command without a complete path is provided, search $PATH.
5913         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5914 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5915         # Extract the first word of "$tool_basename", so it can be a program name with args.
5916 set dummy $tool_basename; ac_word=$2
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5918 $as_echo_n "checking for $ac_word... " >&6; }
5919 if ${ac_cv_path_CUT+:} false; then :
5920   $as_echo_n "(cached) " >&6
5921 else
5922   case $CUT in
5923   [\\/]* | ?:[\\/]*)
5924   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5925   ;;
5926   *)
5927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5928 for as_dir in $PATH
5929 do
5930   IFS=$as_save_IFS
5931   test -z "$as_dir" && as_dir=.
5932     for ac_exec_ext in '' $ac_executable_extensions; do
5933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5934     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5936     break 2
5937   fi
5938 done
5939   done
5940 IFS=$as_save_IFS
5941 
5942   ;;
5943 esac
5944 fi
5945 CUT=$ac_cv_path_CUT
5946 if test -n "$CUT"; then
5947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5948 $as_echo "$CUT" >&6; }
5949 else
5950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951 $as_echo "no" >&6; }
5952 fi
5953 
5954 
5955         if test "x$CUT" = x; then
5956           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5957         fi
5958       else
5959         # Otherwise we believe it is a complete path. Use it as it is.
5960         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5961 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5962         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5963 $as_echo_n "checking for CUT... " >&6; }
5964         if test ! -x "$tool_specified"; then
5965           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5966 $as_echo "not found" >&6; }
5967           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5968         fi
5969         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5970 $as_echo "$tool_specified" >&6; }
5971       fi
5972     fi
5973   fi
5974 
5975 
5976 
5977   if test "x$CUT" = x; then
5978     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5979   fi
5980 
5981 
5982 
5983 
5984 
5985   # Publish this variable in the help.
5986 
5987 
5988   if test "x$DATE" = x; then
5989     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
6037 
6038     # Try to remove the string !DATE! from our list.
6039     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6040     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6041       # If it failed, the variable was not from the command line. Ignore it,
6042       # but warn the user (except for BASH, which is always set by the calling BASH).
6043       if test "xDATE" != xBASH; then
6044         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6045 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6046       fi
6047       # Try to locate tool using the code snippet
6048       for ac_prog in date
6049 do
6050   # Extract the first word of "$ac_prog", so it can be a program name with args.
6051 set dummy $ac_prog; 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   test -n "$DATE" && break
6091 done
6092 
6093     else
6094       # If it succeeded, then it was overridden by the user. We will use it
6095       # for the tool.
6096 
6097       # First remove it from the list of overridden variables, so we can test
6098       # for unknown variables in the end.
6099       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6100 
6101       # Check if the provided tool contains a complete path.
6102       tool_specified="$DATE"
6103       tool_basename="${tool_specified##*/}"
6104       if test "x$tool_basename" = "x$tool_specified"; then
6105         # A command without a complete path is provided, search $PATH.
6106         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6107 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6108         # Extract the first word of "$tool_basename", so it can be a program name with args.
6109 set dummy $tool_basename; ac_word=$2
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111 $as_echo_n "checking for $ac_word... " >&6; }
6112 if ${ac_cv_path_DATE+:} false; then :
6113   $as_echo_n "(cached) " >&6
6114 else
6115   case $DATE in
6116   [\\/]* | ?:[\\/]*)
6117   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6118   ;;
6119   *)
6120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121 for as_dir in $PATH
6122 do
6123   IFS=$as_save_IFS
6124   test -z "$as_dir" && as_dir=.
6125     for ac_exec_ext in '' $ac_executable_extensions; do
6126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6127     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6129     break 2
6130   fi
6131 done
6132   done
6133 IFS=$as_save_IFS
6134 
6135   ;;
6136 esac
6137 fi
6138 DATE=$ac_cv_path_DATE
6139 if test -n "$DATE"; then
6140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6141 $as_echo "$DATE" >&6; }
6142 else
6143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6144 $as_echo "no" >&6; }
6145 fi
6146 
6147 
6148         if test "x$DATE" = x; then
6149           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6150         fi
6151       else
6152         # Otherwise we believe it is a complete path. Use it as it is.
6153         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6154 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6155         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6156 $as_echo_n "checking for DATE... " >&6; }
6157         if test ! -x "$tool_specified"; then
6158           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6159 $as_echo "not found" >&6; }
6160           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6161         fi
6162         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6163 $as_echo "$tool_specified" >&6; }
6164       fi
6165     fi
6166   fi
6167 
6168 
6169 
6170   if test "x$DATE" = x; then
6171     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6172   fi
6173 
6174 
6175 
6176 
6177 
6178   # Publish this variable in the help.
6179 
6180 
6181   if test "x$DIFF" = x; then
6182     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
6230 
6231     # Try to remove the string !DIFF! from our list.
6232     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6233     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6234       # If it failed, the variable was not from the command line. Ignore it,
6235       # but warn the user (except for BASH, which is always set by the calling BASH).
6236       if test "xDIFF" != xBASH; then
6237         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6238 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6239       fi
6240       # Try to locate tool using the code snippet
6241       for ac_prog in gdiff diff
6242 do
6243   # Extract the first word of "$ac_prog", so it can be a program name with args.
6244 set dummy $ac_prog; 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   test -n "$DIFF" && break
6284 done
6285 
6286     else
6287       # If it succeeded, then it was overridden by the user. We will use it
6288       # for the tool.
6289 
6290       # First remove it from the list of overridden variables, so we can test
6291       # for unknown variables in the end.
6292       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6293 
6294       # Check if the provided tool contains a complete path.
6295       tool_specified="$DIFF"
6296       tool_basename="${tool_specified##*/}"
6297       if test "x$tool_basename" = "x$tool_specified"; then
6298         # A command without a complete path is provided, search $PATH.
6299         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6300 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6301         # Extract the first word of "$tool_basename", so it can be a program name with args.
6302 set dummy $tool_basename; ac_word=$2
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6304 $as_echo_n "checking for $ac_word... " >&6; }
6305 if ${ac_cv_path_DIFF+:} false; then :
6306   $as_echo_n "(cached) " >&6
6307 else
6308   case $DIFF in
6309   [\\/]* | ?:[\\/]*)
6310   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6311   ;;
6312   *)
6313   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6314 for as_dir in $PATH
6315 do
6316   IFS=$as_save_IFS
6317   test -z "$as_dir" && as_dir=.
6318     for ac_exec_ext in '' $ac_executable_extensions; do
6319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6320     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6322     break 2
6323   fi
6324 done
6325   done
6326 IFS=$as_save_IFS
6327 
6328   ;;
6329 esac
6330 fi
6331 DIFF=$ac_cv_path_DIFF
6332 if test -n "$DIFF"; then
6333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6334 $as_echo "$DIFF" >&6; }
6335 else
6336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337 $as_echo "no" >&6; }
6338 fi
6339 
6340 
6341         if test "x$DIFF" = x; then
6342           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6343         fi
6344       else
6345         # Otherwise we believe it is a complete path. Use it as it is.
6346         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6347 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6348         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6349 $as_echo_n "checking for DIFF... " >&6; }
6350         if test ! -x "$tool_specified"; then
6351           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6352 $as_echo "not found" >&6; }
6353           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6354         fi
6355         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6356 $as_echo "$tool_specified" >&6; }
6357       fi
6358     fi
6359   fi
6360 
6361 
6362 
6363   if test "x$DIFF" = x; then
6364     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6365   fi
6366 
6367 
6368 
6369 
6370 
6371   # Publish this variable in the help.
6372 
6373 
6374   if test "x$DIRNAME" = x; then
6375     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
6423 
6424     # Try to remove the string !DIRNAME! from our list.
6425     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6426     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6427       # If it failed, the variable was not from the command line. Ignore it,
6428       # but warn the user (except for BASH, which is always set by the calling BASH).
6429       if test "xDIRNAME" != xBASH; then
6430         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6431 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6432       fi
6433       # Try to locate tool using the code snippet
6434       for ac_prog in dirname
6435 do
6436   # Extract the first word of "$ac_prog", so it can be a program name with args.
6437 set dummy $ac_prog; 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   test -n "$DIRNAME" && break
6477 done
6478 
6479     else
6480       # If it succeeded, then it was overridden by the user. We will use it
6481       # for the tool.
6482 
6483       # First remove it from the list of overridden variables, so we can test
6484       # for unknown variables in the end.
6485       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6486 
6487       # Check if the provided tool contains a complete path.
6488       tool_specified="$DIRNAME"
6489       tool_basename="${tool_specified##*/}"
6490       if test "x$tool_basename" = "x$tool_specified"; then
6491         # A command without a complete path is provided, search $PATH.
6492         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6493 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6494         # Extract the first word of "$tool_basename", so it can be a program name with args.
6495 set dummy $tool_basename; ac_word=$2
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6497 $as_echo_n "checking for $ac_word... " >&6; }
6498 if ${ac_cv_path_DIRNAME+:} false; then :
6499   $as_echo_n "(cached) " >&6
6500 else
6501   case $DIRNAME in
6502   [\\/]* | ?:[\\/]*)
6503   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6504   ;;
6505   *)
6506   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6507 for as_dir in $PATH
6508 do
6509   IFS=$as_save_IFS
6510   test -z "$as_dir" && as_dir=.
6511     for ac_exec_ext in '' $ac_executable_extensions; do
6512   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6513     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6514     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6515     break 2
6516   fi
6517 done
6518   done
6519 IFS=$as_save_IFS
6520 
6521   ;;
6522 esac
6523 fi
6524 DIRNAME=$ac_cv_path_DIRNAME
6525 if test -n "$DIRNAME"; then
6526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6527 $as_echo "$DIRNAME" >&6; }
6528 else
6529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530 $as_echo "no" >&6; }
6531 fi
6532 
6533 
6534         if test "x$DIRNAME" = x; then
6535           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6536         fi
6537       else
6538         # Otherwise we believe it is a complete path. Use it as it is.
6539         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6540 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6542 $as_echo_n "checking for DIRNAME... " >&6; }
6543         if test ! -x "$tool_specified"; then
6544           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6545 $as_echo "not found" >&6; }
6546           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6547         fi
6548         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6549 $as_echo "$tool_specified" >&6; }
6550       fi
6551     fi
6552   fi
6553 
6554 
6555 
6556   if test "x$DIRNAME" = x; then
6557     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6558   fi
6559 
6560 
6561 
6562 
6563 
6564   # Publish this variable in the help.
6565 
6566 
6567   if test "x$ECHO" = x; then
6568     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
6616 
6617     # Try to remove the string !ECHO! from our list.
6618     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6619     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6620       # If it failed, the variable was not from the command line. Ignore it,
6621       # but warn the user (except for BASH, which is always set by the calling BASH).
6622       if test "xECHO" != xBASH; then
6623         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6624 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6625       fi
6626       # Try to locate tool using the code snippet
6627       for ac_prog in echo
6628 do
6629   # Extract the first word of "$ac_prog", so it can be a program name with args.
6630 set dummy $ac_prog; 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   test -n "$ECHO" && break
6670 done
6671 
6672     else
6673       # If it succeeded, then it was overridden by the user. We will use it
6674       # for the tool.
6675 
6676       # First remove it from the list of overridden variables, so we can test
6677       # for unknown variables in the end.
6678       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6679 
6680       # Check if the provided tool contains a complete path.
6681       tool_specified="$ECHO"
6682       tool_basename="${tool_specified##*/}"
6683       if test "x$tool_basename" = "x$tool_specified"; then
6684         # A command without a complete path is provided, search $PATH.
6685         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6686 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6687         # Extract the first word of "$tool_basename", so it can be a program name with args.
6688 set dummy $tool_basename; ac_word=$2
6689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6690 $as_echo_n "checking for $ac_word... " >&6; }
6691 if ${ac_cv_path_ECHO+:} false; then :
6692   $as_echo_n "(cached) " >&6
6693 else
6694   case $ECHO in
6695   [\\/]* | ?:[\\/]*)
6696   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6697   ;;
6698   *)
6699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6700 for as_dir in $PATH
6701 do
6702   IFS=$as_save_IFS
6703   test -z "$as_dir" && as_dir=.
6704     for ac_exec_ext in '' $ac_executable_extensions; do
6705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6706     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6708     break 2
6709   fi
6710 done
6711   done
6712 IFS=$as_save_IFS
6713 
6714   ;;
6715 esac
6716 fi
6717 ECHO=$ac_cv_path_ECHO
6718 if test -n "$ECHO"; then
6719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6720 $as_echo "$ECHO" >&6; }
6721 else
6722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723 $as_echo "no" >&6; }
6724 fi
6725 
6726 
6727         if test "x$ECHO" = x; then
6728           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6729         fi
6730       else
6731         # Otherwise we believe it is a complete path. Use it as it is.
6732         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6733 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6735 $as_echo_n "checking for ECHO... " >&6; }
6736         if test ! -x "$tool_specified"; then
6737           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6738 $as_echo "not found" >&6; }
6739           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6740         fi
6741         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6742 $as_echo "$tool_specified" >&6; }
6743       fi
6744     fi
6745   fi
6746 
6747 
6748 
6749   if test "x$ECHO" = x; then
6750     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6751   fi
6752 
6753 
6754 
6755 
6756 
6757   # Publish this variable in the help.
6758 
6759 
6760   if test "x$EXPR" = x; then
6761     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
6809 
6810     # Try to remove the string !EXPR! from our list.
6811     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6812     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6813       # If it failed, the variable was not from the command line. Ignore it,
6814       # but warn the user (except for BASH, which is always set by the calling BASH).
6815       if test "xEXPR" != xBASH; then
6816         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6817 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6818       fi
6819       # Try to locate tool using the code snippet
6820       for ac_prog in expr
6821 do
6822   # Extract the first word of "$ac_prog", so it can be a program name with args.
6823 set dummy $ac_prog; 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   test -n "$EXPR" && break
6863 done
6864 
6865     else
6866       # If it succeeded, then it was overridden by the user. We will use it
6867       # for the tool.
6868 
6869       # First remove it from the list of overridden variables, so we can test
6870       # for unknown variables in the end.
6871       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6872 
6873       # Check if the provided tool contains a complete path.
6874       tool_specified="$EXPR"
6875       tool_basename="${tool_specified##*/}"
6876       if test "x$tool_basename" = "x$tool_specified"; then
6877         # A command without a complete path is provided, search $PATH.
6878         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6879 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6880         # Extract the first word of "$tool_basename", so it can be a program name with args.
6881 set dummy $tool_basename; ac_word=$2
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6883 $as_echo_n "checking for $ac_word... " >&6; }
6884 if ${ac_cv_path_EXPR+:} false; then :
6885   $as_echo_n "(cached) " >&6
6886 else
6887   case $EXPR in
6888   [\\/]* | ?:[\\/]*)
6889   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6890   ;;
6891   *)
6892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6893 for as_dir in $PATH
6894 do
6895   IFS=$as_save_IFS
6896   test -z "$as_dir" && as_dir=.
6897     for ac_exec_ext in '' $ac_executable_extensions; do
6898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6899     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6901     break 2
6902   fi
6903 done
6904   done
6905 IFS=$as_save_IFS
6906 
6907   ;;
6908 esac
6909 fi
6910 EXPR=$ac_cv_path_EXPR
6911 if test -n "$EXPR"; then
6912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6913 $as_echo "$EXPR" >&6; }
6914 else
6915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6916 $as_echo "no" >&6; }
6917 fi
6918 
6919 
6920         if test "x$EXPR" = x; then
6921           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6922         fi
6923       else
6924         # Otherwise we believe it is a complete path. Use it as it is.
6925         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6926 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6927         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6928 $as_echo_n "checking for EXPR... " >&6; }
6929         if test ! -x "$tool_specified"; then
6930           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6931 $as_echo "not found" >&6; }
6932           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6933         fi
6934         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6935 $as_echo "$tool_specified" >&6; }
6936       fi
6937     fi
6938   fi
6939 
6940 
6941 
6942   if test "x$EXPR" = x; then
6943     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6944   fi
6945 
6946 
6947 
6948 
6949 
6950   # Publish this variable in the help.
6951 
6952 
6953   if test "x$FILE" = x; then
6954     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
7002 
7003     # Try to remove the string !FILE! from our list.
7004     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7005     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7006       # If it failed, the variable was not from the command line. Ignore it,
7007       # but warn the user (except for BASH, which is always set by the calling BASH).
7008       if test "xFILE" != xBASH; then
7009         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7010 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7011       fi
7012       # Try to locate tool using the code snippet
7013       for ac_prog in file
7014 do
7015   # Extract the first word of "$ac_prog", so it can be a program name with args.
7016 set dummy $ac_prog; 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   test -n "$FILE" && break
7056 done
7057 
7058     else
7059       # If it succeeded, then it was overridden by the user. We will use it
7060       # for the tool.
7061 
7062       # First remove it from the list of overridden variables, so we can test
7063       # for unknown variables in the end.
7064       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7065 
7066       # Check if the provided tool contains a complete path.
7067       tool_specified="$FILE"
7068       tool_basename="${tool_specified##*/}"
7069       if test "x$tool_basename" = "x$tool_specified"; then
7070         # A command without a complete path is provided, search $PATH.
7071         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7072 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7073         # Extract the first word of "$tool_basename", so it can be a program name with args.
7074 set dummy $tool_basename; ac_word=$2
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7076 $as_echo_n "checking for $ac_word... " >&6; }
7077 if ${ac_cv_path_FILE+:} false; then :
7078   $as_echo_n "(cached) " >&6
7079 else
7080   case $FILE in
7081   [\\/]* | ?:[\\/]*)
7082   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7083   ;;
7084   *)
7085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086 for as_dir in $PATH
7087 do
7088   IFS=$as_save_IFS
7089   test -z "$as_dir" && as_dir=.
7090     for ac_exec_ext in '' $ac_executable_extensions; do
7091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094     break 2
7095   fi
7096 done
7097   done
7098 IFS=$as_save_IFS
7099 
7100   ;;
7101 esac
7102 fi
7103 FILE=$ac_cv_path_FILE
7104 if test -n "$FILE"; then
7105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7106 $as_echo "$FILE" >&6; }
7107 else
7108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7109 $as_echo "no" >&6; }
7110 fi
7111 
7112 
7113         if test "x$FILE" = x; then
7114           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7115         fi
7116       else
7117         # Otherwise we believe it is a complete path. Use it as it is.
7118         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7119 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7120         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7121 $as_echo_n "checking for FILE... " >&6; }
7122         if test ! -x "$tool_specified"; then
7123           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7124 $as_echo "not found" >&6; }
7125           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7126         fi
7127         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7128 $as_echo "$tool_specified" >&6; }
7129       fi
7130     fi
7131   fi
7132 
7133 
7134 
7135   if test "x$FILE" = x; then
7136     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7137   fi
7138 
7139 
7140 
7141 
7142 
7143   # Publish this variable in the help.
7144 
7145 
7146   if test "x$FIND" = x; then
7147     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
7195 
7196     # Try to remove the string !FIND! from our list.
7197     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7198     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7199       # If it failed, the variable was not from the command line. Ignore it,
7200       # but warn the user (except for BASH, which is always set by the calling BASH).
7201       if test "xFIND" != xBASH; then
7202         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7203 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7204       fi
7205       # Try to locate tool using the code snippet
7206       for ac_prog in find
7207 do
7208   # Extract the first word of "$ac_prog", so it can be a program name with args.
7209 set dummy $ac_prog; 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   test -n "$FIND" && break
7249 done
7250 
7251     else
7252       # If it succeeded, then it was overridden by the user. We will use it
7253       # for the tool.
7254 
7255       # First remove it from the list of overridden variables, so we can test
7256       # for unknown variables in the end.
7257       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7258 
7259       # Check if the provided tool contains a complete path.
7260       tool_specified="$FIND"
7261       tool_basename="${tool_specified##*/}"
7262       if test "x$tool_basename" = "x$tool_specified"; then
7263         # A command without a complete path is provided, search $PATH.
7264         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7265 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7266         # Extract the first word of "$tool_basename", so it can be a program name with args.
7267 set dummy $tool_basename; ac_word=$2
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7269 $as_echo_n "checking for $ac_word... " >&6; }
7270 if ${ac_cv_path_FIND+:} false; then :
7271   $as_echo_n "(cached) " >&6
7272 else
7273   case $FIND in
7274   [\\/]* | ?:[\\/]*)
7275   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7276   ;;
7277   *)
7278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7279 for as_dir in $PATH
7280 do
7281   IFS=$as_save_IFS
7282   test -z "$as_dir" && as_dir=.
7283     for ac_exec_ext in '' $ac_executable_extensions; do
7284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7285     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7287     break 2
7288   fi
7289 done
7290   done
7291 IFS=$as_save_IFS
7292 
7293   ;;
7294 esac
7295 fi
7296 FIND=$ac_cv_path_FIND
7297 if test -n "$FIND"; then
7298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7299 $as_echo "$FIND" >&6; }
7300 else
7301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302 $as_echo "no" >&6; }
7303 fi
7304 
7305 
7306         if test "x$FIND" = x; then
7307           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7308         fi
7309       else
7310         # Otherwise we believe it is a complete path. Use it as it is.
7311         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7312 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7313         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7314 $as_echo_n "checking for FIND... " >&6; }
7315         if test ! -x "$tool_specified"; then
7316           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7317 $as_echo "not found" >&6; }
7318           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7319         fi
7320         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7321 $as_echo "$tool_specified" >&6; }
7322       fi
7323     fi
7324   fi
7325 
7326 
7327 
7328   if test "x$FIND" = x; then
7329     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7330   fi
7331 
7332 
7333 
7334 
7335 
7336   # Publish this variable in the help.
7337 
7338 
7339   if test "x$HEAD" = x; then
7340     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
7388 
7389     # Try to remove the string !HEAD! from our list.
7390     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7391     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7392       # If it failed, the variable was not from the command line. Ignore it,
7393       # but warn the user (except for BASH, which is always set by the calling BASH).
7394       if test "xHEAD" != xBASH; then
7395         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7396 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7397       fi
7398       # Try to locate tool using the code snippet
7399       for ac_prog in head
7400 do
7401   # Extract the first word of "$ac_prog", so it can be a program name with args.
7402 set dummy $ac_prog; 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   test -n "$HEAD" && break
7442 done
7443 
7444     else
7445       # If it succeeded, then it was overridden by the user. We will use it
7446       # for the tool.
7447 
7448       # First remove it from the list of overridden variables, so we can test
7449       # for unknown variables in the end.
7450       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7451 
7452       # Check if the provided tool contains a complete path.
7453       tool_specified="$HEAD"
7454       tool_basename="${tool_specified##*/}"
7455       if test "x$tool_basename" = "x$tool_specified"; then
7456         # A command without a complete path is provided, search $PATH.
7457         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7458 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7459         # Extract the first word of "$tool_basename", so it can be a program name with args.
7460 set dummy $tool_basename; ac_word=$2
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7462 $as_echo_n "checking for $ac_word... " >&6; }
7463 if ${ac_cv_path_HEAD+:} false; then :
7464   $as_echo_n "(cached) " >&6
7465 else
7466   case $HEAD in
7467   [\\/]* | ?:[\\/]*)
7468   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7469   ;;
7470   *)
7471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7472 for as_dir in $PATH
7473 do
7474   IFS=$as_save_IFS
7475   test -z "$as_dir" && as_dir=.
7476     for ac_exec_ext in '' $ac_executable_extensions; do
7477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7478     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7480     break 2
7481   fi
7482 done
7483   done
7484 IFS=$as_save_IFS
7485 
7486   ;;
7487 esac
7488 fi
7489 HEAD=$ac_cv_path_HEAD
7490 if test -n "$HEAD"; then
7491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7492 $as_echo "$HEAD" >&6; }
7493 else
7494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495 $as_echo "no" >&6; }
7496 fi
7497 
7498 
7499         if test "x$HEAD" = x; then
7500           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7501         fi
7502       else
7503         # Otherwise we believe it is a complete path. Use it as it is.
7504         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7505 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7507 $as_echo_n "checking for HEAD... " >&6; }
7508         if test ! -x "$tool_specified"; then
7509           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7510 $as_echo "not found" >&6; }
7511           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7512         fi
7513         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7514 $as_echo "$tool_specified" >&6; }
7515       fi
7516     fi
7517   fi
7518 
7519 
7520 
7521   if test "x$HEAD" = x; then
7522     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7523   fi
7524 
7525 
7526 
7527 
7528 
7529   # Publish this variable in the help.
7530 
7531 
7532   if test "x$LN" = x; then
7533     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
7581 
7582     # Try to remove the string !LN! from our list.
7583     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7584     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7585       # If it failed, the variable was not from the command line. Ignore it,
7586       # but warn the user (except for BASH, which is always set by the calling BASH).
7587       if test "xLN" != xBASH; then
7588         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7589 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7590       fi
7591       # Try to locate tool using the code snippet
7592       for ac_prog in ln
7593 do
7594   # Extract the first word of "$ac_prog", so it can be a program name with args.
7595 set dummy $ac_prog; 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   test -n "$LN" && break
7635 done
7636 
7637     else
7638       # If it succeeded, then it was overridden by the user. We will use it
7639       # for the tool.
7640 
7641       # First remove it from the list of overridden variables, so we can test
7642       # for unknown variables in the end.
7643       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7644 
7645       # Check if the provided tool contains a complete path.
7646       tool_specified="$LN"
7647       tool_basename="${tool_specified##*/}"
7648       if test "x$tool_basename" = "x$tool_specified"; then
7649         # A command without a complete path is provided, search $PATH.
7650         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7651 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7652         # Extract the first word of "$tool_basename", so it can be a program name with args.
7653 set dummy $tool_basename; ac_word=$2
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7655 $as_echo_n "checking for $ac_word... " >&6; }
7656 if ${ac_cv_path_LN+:} false; then :
7657   $as_echo_n "(cached) " >&6
7658 else
7659   case $LN in
7660   [\\/]* | ?:[\\/]*)
7661   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7662   ;;
7663   *)
7664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7665 for as_dir in $PATH
7666 do
7667   IFS=$as_save_IFS
7668   test -z "$as_dir" && as_dir=.
7669     for ac_exec_ext in '' $ac_executable_extensions; do
7670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7671     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7673     break 2
7674   fi
7675 done
7676   done
7677 IFS=$as_save_IFS
7678 
7679   ;;
7680 esac
7681 fi
7682 LN=$ac_cv_path_LN
7683 if test -n "$LN"; then
7684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7685 $as_echo "$LN" >&6; }
7686 else
7687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688 $as_echo "no" >&6; }
7689 fi
7690 
7691 
7692         if test "x$LN" = x; then
7693           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7694         fi
7695       else
7696         # Otherwise we believe it is a complete path. Use it as it is.
7697         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7698 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7700 $as_echo_n "checking for LN... " >&6; }
7701         if test ! -x "$tool_specified"; then
7702           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7703 $as_echo "not found" >&6; }
7704           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7705         fi
7706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7707 $as_echo "$tool_specified" >&6; }
7708       fi
7709     fi
7710   fi
7711 
7712 
7713 
7714   if test "x$LN" = x; then
7715     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7716   fi
7717 
7718 
7719 
7720 
7721 
7722   # Publish this variable in the help.
7723 
7724 
7725   if test "x$LS" = x; then
7726     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
7774 
7775     # Try to remove the string !LS! from our list.
7776     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7777     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7778       # If it failed, the variable was not from the command line. Ignore it,
7779       # but warn the user (except for BASH, which is always set by the calling BASH).
7780       if test "xLS" != xBASH; then
7781         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7782 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7783       fi
7784       # Try to locate tool using the code snippet
7785       for ac_prog in ls
7786 do
7787   # Extract the first word of "$ac_prog", so it can be a program name with args.
7788 set dummy $ac_prog; 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   test -n "$LS" && break
7828 done
7829 
7830     else
7831       # If it succeeded, then it was overridden by the user. We will use it
7832       # for the tool.
7833 
7834       # First remove it from the list of overridden variables, so we can test
7835       # for unknown variables in the end.
7836       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7837 
7838       # Check if the provided tool contains a complete path.
7839       tool_specified="$LS"
7840       tool_basename="${tool_specified##*/}"
7841       if test "x$tool_basename" = "x$tool_specified"; then
7842         # A command without a complete path is provided, search $PATH.
7843         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7844 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7845         # Extract the first word of "$tool_basename", so it can be a program name with args.
7846 set dummy $tool_basename; ac_word=$2
7847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7848 $as_echo_n "checking for $ac_word... " >&6; }
7849 if ${ac_cv_path_LS+:} false; then :
7850   $as_echo_n "(cached) " >&6
7851 else
7852   case $LS in
7853   [\\/]* | ?:[\\/]*)
7854   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7855   ;;
7856   *)
7857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7858 for as_dir in $PATH
7859 do
7860   IFS=$as_save_IFS
7861   test -z "$as_dir" && as_dir=.
7862     for ac_exec_ext in '' $ac_executable_extensions; do
7863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7864     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7866     break 2
7867   fi
7868 done
7869   done
7870 IFS=$as_save_IFS
7871 
7872   ;;
7873 esac
7874 fi
7875 LS=$ac_cv_path_LS
7876 if test -n "$LS"; then
7877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7878 $as_echo "$LS" >&6; }
7879 else
7880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7881 $as_echo "no" >&6; }
7882 fi
7883 
7884 
7885         if test "x$LS" = x; then
7886           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7887         fi
7888       else
7889         # Otherwise we believe it is a complete path. Use it as it is.
7890         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7891 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7893 $as_echo_n "checking for LS... " >&6; }
7894         if test ! -x "$tool_specified"; then
7895           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7896 $as_echo "not found" >&6; }
7897           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7898         fi
7899         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7900 $as_echo "$tool_specified" >&6; }
7901       fi
7902     fi
7903   fi
7904 
7905 
7906 
7907   if test "x$LS" = x; then
7908     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7909   fi
7910 
7911 
7912 
7913 
7914 
7915   # Publish this variable in the help.
7916 
7917 
7918   if test "x$MKDIR" = x; then
7919     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
7967 
7968     # Try to remove the string !MKDIR! from our list.
7969     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7970     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7971       # If it failed, the variable was not from the command line. Ignore it,
7972       # but warn the user (except for BASH, which is always set by the calling BASH).
7973       if test "xMKDIR" != xBASH; then
7974         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7975 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7976       fi
7977       # Try to locate tool using the code snippet
7978       for ac_prog in mkdir
7979 do
7980   # Extract the first word of "$ac_prog", so it can be a program name with args.
7981 set dummy $ac_prog; 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   test -n "$MKDIR" && break
8021 done
8022 
8023     else
8024       # If it succeeded, then it was overridden by the user. We will use it
8025       # for the tool.
8026 
8027       # First remove it from the list of overridden variables, so we can test
8028       # for unknown variables in the end.
8029       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8030 
8031       # Check if the provided tool contains a complete path.
8032       tool_specified="$MKDIR"
8033       tool_basename="${tool_specified##*/}"
8034       if test "x$tool_basename" = "x$tool_specified"; then
8035         # A command without a complete path is provided, search $PATH.
8036         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8037 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8038         # Extract the first word of "$tool_basename", so it can be a program name with args.
8039 set dummy $tool_basename; ac_word=$2
8040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8041 $as_echo_n "checking for $ac_word... " >&6; }
8042 if ${ac_cv_path_MKDIR+:} false; then :
8043   $as_echo_n "(cached) " >&6
8044 else
8045   case $MKDIR in
8046   [\\/]* | ?:[\\/]*)
8047   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8048   ;;
8049   *)
8050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8051 for as_dir in $PATH
8052 do
8053   IFS=$as_save_IFS
8054   test -z "$as_dir" && as_dir=.
8055     for ac_exec_ext in '' $ac_executable_extensions; do
8056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8057     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8059     break 2
8060   fi
8061 done
8062   done
8063 IFS=$as_save_IFS
8064 
8065   ;;
8066 esac
8067 fi
8068 MKDIR=$ac_cv_path_MKDIR
8069 if test -n "$MKDIR"; then
8070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8071 $as_echo "$MKDIR" >&6; }
8072 else
8073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8074 $as_echo "no" >&6; }
8075 fi
8076 
8077 
8078         if test "x$MKDIR" = x; then
8079           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8080         fi
8081       else
8082         # Otherwise we believe it is a complete path. Use it as it is.
8083         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8084 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8086 $as_echo_n "checking for MKDIR... " >&6; }
8087         if test ! -x "$tool_specified"; then
8088           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8089 $as_echo "not found" >&6; }
8090           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8091         fi
8092         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8093 $as_echo "$tool_specified" >&6; }
8094       fi
8095     fi
8096   fi
8097 
8098 
8099 
8100   if test "x$MKDIR" = x; then
8101     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8102   fi
8103 
8104 
8105 
8106 
8107 
8108   # Publish this variable in the help.
8109 
8110 
8111   if test "x$MKTEMP" = x; then
8112     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
8160 
8161     # Try to remove the string !MKTEMP! from our list.
8162     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8163     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8164       # If it failed, the variable was not from the command line. Ignore it,
8165       # but warn the user (except for BASH, which is always set by the calling BASH).
8166       if test "xMKTEMP" != xBASH; then
8167         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8168 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8169       fi
8170       # Try to locate tool using the code snippet
8171       for ac_prog in mktemp
8172 do
8173   # Extract the first word of "$ac_prog", so it can be a program name with args.
8174 set dummy $ac_prog; 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   test -n "$MKTEMP" && break
8214 done
8215 
8216     else
8217       # If it succeeded, then it was overridden by the user. We will use it
8218       # for the tool.
8219 
8220       # First remove it from the list of overridden variables, so we can test
8221       # for unknown variables in the end.
8222       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8223 
8224       # Check if the provided tool contains a complete path.
8225       tool_specified="$MKTEMP"
8226       tool_basename="${tool_specified##*/}"
8227       if test "x$tool_basename" = "x$tool_specified"; then
8228         # A command without a complete path is provided, search $PATH.
8229         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8230 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8231         # Extract the first word of "$tool_basename", so it can be a program name with args.
8232 set dummy $tool_basename; ac_word=$2
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8234 $as_echo_n "checking for $ac_word... " >&6; }
8235 if ${ac_cv_path_MKTEMP+:} false; then :
8236   $as_echo_n "(cached) " >&6
8237 else
8238   case $MKTEMP in
8239   [\\/]* | ?:[\\/]*)
8240   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8241   ;;
8242   *)
8243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8244 for as_dir in $PATH
8245 do
8246   IFS=$as_save_IFS
8247   test -z "$as_dir" && as_dir=.
8248     for ac_exec_ext in '' $ac_executable_extensions; do
8249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8250     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8252     break 2
8253   fi
8254 done
8255   done
8256 IFS=$as_save_IFS
8257 
8258   ;;
8259 esac
8260 fi
8261 MKTEMP=$ac_cv_path_MKTEMP
8262 if test -n "$MKTEMP"; then
8263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8264 $as_echo "$MKTEMP" >&6; }
8265 else
8266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267 $as_echo "no" >&6; }
8268 fi
8269 
8270 
8271         if test "x$MKTEMP" = x; then
8272           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8273         fi
8274       else
8275         # Otherwise we believe it is a complete path. Use it as it is.
8276         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8277 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8278         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8279 $as_echo_n "checking for MKTEMP... " >&6; }
8280         if test ! -x "$tool_specified"; then
8281           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8282 $as_echo "not found" >&6; }
8283           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8284         fi
8285         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8286 $as_echo "$tool_specified" >&6; }
8287       fi
8288     fi
8289   fi
8290 
8291 
8292 
8293   if test "x$MKTEMP" = x; then
8294     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8295   fi
8296 
8297 
8298 
8299 
8300 
8301   # Publish this variable in the help.
8302 
8303 
8304   if test "x$MV" = x; then
8305     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
8353 
8354     # Try to remove the string !MV! from our list.
8355     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8356     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8357       # If it failed, the variable was not from the command line. Ignore it,
8358       # but warn the user (except for BASH, which is always set by the calling BASH).
8359       if test "xMV" != xBASH; then
8360         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8361 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8362       fi
8363       # Try to locate tool using the code snippet
8364       for ac_prog in mv
8365 do
8366   # Extract the first word of "$ac_prog", so it can be a program name with args.
8367 set dummy $ac_prog; 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   test -n "$MV" && break
8407 done
8408 
8409     else
8410       # If it succeeded, then it was overridden by the user. We will use it
8411       # for the tool.
8412 
8413       # First remove it from the list of overridden variables, so we can test
8414       # for unknown variables in the end.
8415       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8416 
8417       # Check if the provided tool contains a complete path.
8418       tool_specified="$MV"
8419       tool_basename="${tool_specified##*/}"
8420       if test "x$tool_basename" = "x$tool_specified"; then
8421         # A command without a complete path is provided, search $PATH.
8422         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8423 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8424         # Extract the first word of "$tool_basename", so it can be a program name with args.
8425 set dummy $tool_basename; ac_word=$2
8426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8427 $as_echo_n "checking for $ac_word... " >&6; }
8428 if ${ac_cv_path_MV+:} false; then :
8429   $as_echo_n "(cached) " >&6
8430 else
8431   case $MV in
8432   [\\/]* | ?:[\\/]*)
8433   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8434   ;;
8435   *)
8436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8437 for as_dir in $PATH
8438 do
8439   IFS=$as_save_IFS
8440   test -z "$as_dir" && as_dir=.
8441     for ac_exec_ext in '' $ac_executable_extensions; do
8442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8443     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8445     break 2
8446   fi
8447 done
8448   done
8449 IFS=$as_save_IFS
8450 
8451   ;;
8452 esac
8453 fi
8454 MV=$ac_cv_path_MV
8455 if test -n "$MV"; then
8456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8457 $as_echo "$MV" >&6; }
8458 else
8459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8460 $as_echo "no" >&6; }
8461 fi
8462 
8463 
8464         if test "x$MV" = x; then
8465           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8466         fi
8467       else
8468         # Otherwise we believe it is a complete path. Use it as it is.
8469         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8470 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8471         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8472 $as_echo_n "checking for MV... " >&6; }
8473         if test ! -x "$tool_specified"; then
8474           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8475 $as_echo "not found" >&6; }
8476           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8477         fi
8478         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8479 $as_echo "$tool_specified" >&6; }
8480       fi
8481     fi
8482   fi
8483 
8484 
8485 
8486   if test "x$MV" = x; then
8487     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8488   fi
8489 
8490 
8491 
8492 
8493 
8494   # Publish this variable in the help.
8495 
8496 
8497   if test "x$NAWK" = x; then
8498     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
8546 
8547     # Try to remove the string !NAWK! from our list.
8548     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8549     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8550       # If it failed, the variable was not from the command line. Ignore it,
8551       # but warn the user (except for BASH, which is always set by the calling BASH).
8552       if test "xNAWK" != xBASH; then
8553         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8554 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8555       fi
8556       # Try to locate tool using the code snippet
8557       for ac_prog in nawk gawk awk
8558 do
8559   # Extract the first word of "$ac_prog", so it can be a program name with args.
8560 set dummy $ac_prog; 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   test -n "$NAWK" && break
8600 done
8601 
8602     else
8603       # If it succeeded, then it was overridden by the user. We will use it
8604       # for the tool.
8605 
8606       # First remove it from the list of overridden variables, so we can test
8607       # for unknown variables in the end.
8608       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8609 
8610       # Check if the provided tool contains a complete path.
8611       tool_specified="$NAWK"
8612       tool_basename="${tool_specified##*/}"
8613       if test "x$tool_basename" = "x$tool_specified"; then
8614         # A command without a complete path is provided, search $PATH.
8615         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8616 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8617         # Extract the first word of "$tool_basename", so it can be a program name with args.
8618 set dummy $tool_basename; ac_word=$2
8619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8620 $as_echo_n "checking for $ac_word... " >&6; }
8621 if ${ac_cv_path_NAWK+:} false; then :
8622   $as_echo_n "(cached) " >&6
8623 else
8624   case $NAWK in
8625   [\\/]* | ?:[\\/]*)
8626   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8627   ;;
8628   *)
8629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8630 for as_dir in $PATH
8631 do
8632   IFS=$as_save_IFS
8633   test -z "$as_dir" && as_dir=.
8634     for ac_exec_ext in '' $ac_executable_extensions; do
8635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8636     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8638     break 2
8639   fi
8640 done
8641   done
8642 IFS=$as_save_IFS
8643 
8644   ;;
8645 esac
8646 fi
8647 NAWK=$ac_cv_path_NAWK
8648 if test -n "$NAWK"; then
8649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8650 $as_echo "$NAWK" >&6; }
8651 else
8652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8653 $as_echo "no" >&6; }
8654 fi
8655 
8656 
8657         if test "x$NAWK" = x; then
8658           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8659         fi
8660       else
8661         # Otherwise we believe it is a complete path. Use it as it is.
8662         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8663 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8664         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8665 $as_echo_n "checking for NAWK... " >&6; }
8666         if test ! -x "$tool_specified"; then
8667           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8668 $as_echo "not found" >&6; }
8669           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8670         fi
8671         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8672 $as_echo "$tool_specified" >&6; }
8673       fi
8674     fi
8675   fi
8676 
8677 
8678 
8679   if test "x$NAWK" = x; then
8680     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8681   fi
8682 
8683 
8684 
8685 
8686 
8687   # Publish this variable in the help.
8688 
8689 
8690   if test "x$PRINTF" = x; then
8691     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
8739 
8740     # Try to remove the string !PRINTF! from our list.
8741     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8742     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8743       # If it failed, the variable was not from the command line. Ignore it,
8744       # but warn the user (except for BASH, which is always set by the calling BASH).
8745       if test "xPRINTF" != xBASH; then
8746         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8747 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8748       fi
8749       # Try to locate tool using the code snippet
8750       for ac_prog in printf
8751 do
8752   # Extract the first word of "$ac_prog", so it can be a program name with args.
8753 set dummy $ac_prog; 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   test -n "$PRINTF" && break
8793 done
8794 
8795     else
8796       # If it succeeded, then it was overridden by the user. We will use it
8797       # for the tool.
8798 
8799       # First remove it from the list of overridden variables, so we can test
8800       # for unknown variables in the end.
8801       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8802 
8803       # Check if the provided tool contains a complete path.
8804       tool_specified="$PRINTF"
8805       tool_basename="${tool_specified##*/}"
8806       if test "x$tool_basename" = "x$tool_specified"; then
8807         # A command without a complete path is provided, search $PATH.
8808         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8809 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8810         # Extract the first word of "$tool_basename", so it can be a program name with args.
8811 set dummy $tool_basename; ac_word=$2
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8813 $as_echo_n "checking for $ac_word... " >&6; }
8814 if ${ac_cv_path_PRINTF+:} false; then :
8815   $as_echo_n "(cached) " >&6
8816 else
8817   case $PRINTF in
8818   [\\/]* | ?:[\\/]*)
8819   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8820   ;;
8821   *)
8822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8823 for as_dir in $PATH
8824 do
8825   IFS=$as_save_IFS
8826   test -z "$as_dir" && as_dir=.
8827     for ac_exec_ext in '' $ac_executable_extensions; do
8828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8829     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8831     break 2
8832   fi
8833 done
8834   done
8835 IFS=$as_save_IFS
8836 
8837   ;;
8838 esac
8839 fi
8840 PRINTF=$ac_cv_path_PRINTF
8841 if test -n "$PRINTF"; then
8842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8843 $as_echo "$PRINTF" >&6; }
8844 else
8845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8846 $as_echo "no" >&6; }
8847 fi
8848 
8849 
8850         if test "x$PRINTF" = x; then
8851           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8852         fi
8853       else
8854         # Otherwise we believe it is a complete path. Use it as it is.
8855         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8856 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8857         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8858 $as_echo_n "checking for PRINTF... " >&6; }
8859         if test ! -x "$tool_specified"; then
8860           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8861 $as_echo "not found" >&6; }
8862           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8863         fi
8864         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8865 $as_echo "$tool_specified" >&6; }
8866       fi
8867     fi
8868   fi
8869 
8870 
8871 
8872   if test "x$PRINTF" = x; then
8873     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8874   fi
8875 
8876 
8877 
8878 
8879 
8880   # Publish this variable in the help.
8881 
8882 
8883   if test "x$RM" = x; then
8884     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
8932 
8933     # Try to remove the string !RM! from our list.
8934     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8935     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8936       # If it failed, the variable was not from the command line. Ignore it,
8937       # but warn the user (except for BASH, which is always set by the calling BASH).
8938       if test "xRM" != xBASH; then
8939         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8940 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8941       fi
8942       # Try to locate tool using the code snippet
8943       for ac_prog in rm
8944 do
8945   # Extract the first word of "$ac_prog", so it can be a program name with args.
8946 set dummy $ac_prog; 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   test -n "$RM" && break
8986 done
8987 
8988     else
8989       # If it succeeded, then it was overridden by the user. We will use it
8990       # for the tool.
8991 
8992       # First remove it from the list of overridden variables, so we can test
8993       # for unknown variables in the end.
8994       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8995 
8996       # Check if the provided tool contains a complete path.
8997       tool_specified="$RM"
8998       tool_basename="${tool_specified##*/}"
8999       if test "x$tool_basename" = "x$tool_specified"; then
9000         # A command without a complete path is provided, search $PATH.
9001         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9002 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9003         # Extract the first word of "$tool_basename", so it can be a program name with args.
9004 set dummy $tool_basename; ac_word=$2
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9006 $as_echo_n "checking for $ac_word... " >&6; }
9007 if ${ac_cv_path_RM+:} false; then :
9008   $as_echo_n "(cached) " >&6
9009 else
9010   case $RM in
9011   [\\/]* | ?:[\\/]*)
9012   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9013   ;;
9014   *)
9015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9016 for as_dir in $PATH
9017 do
9018   IFS=$as_save_IFS
9019   test -z "$as_dir" && as_dir=.
9020     for ac_exec_ext in '' $ac_executable_extensions; do
9021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9022     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9024     break 2
9025   fi
9026 done
9027   done
9028 IFS=$as_save_IFS
9029 
9030   ;;
9031 esac
9032 fi
9033 RM=$ac_cv_path_RM
9034 if test -n "$RM"; then
9035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9036 $as_echo "$RM" >&6; }
9037 else
9038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039 $as_echo "no" >&6; }
9040 fi
9041 
9042 
9043         if test "x$RM" = x; then
9044           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9045         fi
9046       else
9047         # Otherwise we believe it is a complete path. Use it as it is.
9048         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9049 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9050         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9051 $as_echo_n "checking for RM... " >&6; }
9052         if test ! -x "$tool_specified"; then
9053           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9054 $as_echo "not found" >&6; }
9055           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9056         fi
9057         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9058 $as_echo "$tool_specified" >&6; }
9059       fi
9060     fi
9061   fi
9062 
9063 
9064 
9065   if test "x$RM" = x; then
9066     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9067   fi
9068 
9069 
9070 
9071 
9072 
9073   # Publish this variable in the help.
9074 
9075 
9076   if test "x$SH" = x; then
9077     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
9125 
9126     # Try to remove the string !SH! from our list.
9127     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9128     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9129       # If it failed, the variable was not from the command line. Ignore it,
9130       # but warn the user (except for BASH, which is always set by the calling BASH).
9131       if test "xSH" != xBASH; then
9132         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9133 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9134       fi
9135       # Try to locate tool using the code snippet
9136       for ac_prog in sh
9137 do
9138   # Extract the first word of "$ac_prog", so it can be a program name with args.
9139 set dummy $ac_prog; 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   test -n "$SH" && break
9179 done
9180 
9181     else
9182       # If it succeeded, then it was overridden by the user. We will use it
9183       # for the tool.
9184 
9185       # First remove it from the list of overridden variables, so we can test
9186       # for unknown variables in the end.
9187       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9188 
9189       # Check if the provided tool contains a complete path.
9190       tool_specified="$SH"
9191       tool_basename="${tool_specified##*/}"
9192       if test "x$tool_basename" = "x$tool_specified"; then
9193         # A command without a complete path is provided, search $PATH.
9194         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9195 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9196         # Extract the first word of "$tool_basename", so it can be a program name with args.
9197 set dummy $tool_basename; ac_word=$2
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9199 $as_echo_n "checking for $ac_word... " >&6; }
9200 if ${ac_cv_path_SH+:} false; then :
9201   $as_echo_n "(cached) " >&6
9202 else
9203   case $SH in
9204   [\\/]* | ?:[\\/]*)
9205   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9206   ;;
9207   *)
9208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9209 for as_dir in $PATH
9210 do
9211   IFS=$as_save_IFS
9212   test -z "$as_dir" && as_dir=.
9213     for ac_exec_ext in '' $ac_executable_extensions; do
9214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9215     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9217     break 2
9218   fi
9219 done
9220   done
9221 IFS=$as_save_IFS
9222 
9223   ;;
9224 esac
9225 fi
9226 SH=$ac_cv_path_SH
9227 if test -n "$SH"; then
9228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9229 $as_echo "$SH" >&6; }
9230 else
9231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9232 $as_echo "no" >&6; }
9233 fi
9234 
9235 
9236         if test "x$SH" = x; then
9237           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9238         fi
9239       else
9240         # Otherwise we believe it is a complete path. Use it as it is.
9241         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9242 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9243         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9244 $as_echo_n "checking for SH... " >&6; }
9245         if test ! -x "$tool_specified"; then
9246           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9247 $as_echo "not found" >&6; }
9248           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9249         fi
9250         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9251 $as_echo "$tool_specified" >&6; }
9252       fi
9253     fi
9254   fi
9255 
9256 
9257 
9258   if test "x$SH" = x; then
9259     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9260   fi
9261 
9262 
9263 
9264 
9265 
9266   # Publish this variable in the help.
9267 
9268 
9269   if test "x$SORT" = x; then
9270     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
9318 
9319     # Try to remove the string !SORT! from our list.
9320     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9321     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9322       # If it failed, the variable was not from the command line. Ignore it,
9323       # but warn the user (except for BASH, which is always set by the calling BASH).
9324       if test "xSORT" != xBASH; then
9325         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9326 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9327       fi
9328       # Try to locate tool using the code snippet
9329       for ac_prog in sort
9330 do
9331   # Extract the first word of "$ac_prog", so it can be a program name with args.
9332 set dummy $ac_prog; 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   test -n "$SORT" && break
9372 done
9373 
9374     else
9375       # If it succeeded, then it was overridden by the user. We will use it
9376       # for the tool.
9377 
9378       # First remove it from the list of overridden variables, so we can test
9379       # for unknown variables in the end.
9380       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9381 
9382       # Check if the provided tool contains a complete path.
9383       tool_specified="$SORT"
9384       tool_basename="${tool_specified##*/}"
9385       if test "x$tool_basename" = "x$tool_specified"; then
9386         # A command without a complete path is provided, search $PATH.
9387         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9388 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9389         # Extract the first word of "$tool_basename", so it can be a program name with args.
9390 set dummy $tool_basename; ac_word=$2
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392 $as_echo_n "checking for $ac_word... " >&6; }
9393 if ${ac_cv_path_SORT+:} false; then :
9394   $as_echo_n "(cached) " >&6
9395 else
9396   case $SORT in
9397   [\\/]* | ?:[\\/]*)
9398   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9399   ;;
9400   *)
9401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402 for as_dir in $PATH
9403 do
9404   IFS=$as_save_IFS
9405   test -z "$as_dir" && as_dir=.
9406     for ac_exec_ext in '' $ac_executable_extensions; do
9407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410     break 2
9411   fi
9412 done
9413   done
9414 IFS=$as_save_IFS
9415 
9416   ;;
9417 esac
9418 fi
9419 SORT=$ac_cv_path_SORT
9420 if test -n "$SORT"; then
9421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9422 $as_echo "$SORT" >&6; }
9423 else
9424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425 $as_echo "no" >&6; }
9426 fi
9427 
9428 
9429         if test "x$SORT" = x; then
9430           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9431         fi
9432       else
9433         # Otherwise we believe it is a complete path. Use it as it is.
9434         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9435 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9436         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9437 $as_echo_n "checking for SORT... " >&6; }
9438         if test ! -x "$tool_specified"; then
9439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9440 $as_echo "not found" >&6; }
9441           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9442         fi
9443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9444 $as_echo "$tool_specified" >&6; }
9445       fi
9446     fi
9447   fi
9448 
9449 
9450 
9451   if test "x$SORT" = x; then
9452     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9453   fi
9454 
9455 
9456 
9457 
9458 
9459   # Publish this variable in the help.
9460 
9461 
9462   if test "x$TAIL" = x; then
9463     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
9511 
9512     # Try to remove the string !TAIL! from our list.
9513     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9514     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9515       # If it failed, the variable was not from the command line. Ignore it,
9516       # but warn the user (except for BASH, which is always set by the calling BASH).
9517       if test "xTAIL" != xBASH; then
9518         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9519 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9520       fi
9521       # Try to locate tool using the code snippet
9522       for ac_prog in tail
9523 do
9524   # Extract the first word of "$ac_prog", so it can be a program name with args.
9525 set dummy $ac_prog; 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   test -n "$TAIL" && break
9565 done
9566 
9567     else
9568       # If it succeeded, then it was overridden by the user. We will use it
9569       # for the tool.
9570 
9571       # First remove it from the list of overridden variables, so we can test
9572       # for unknown variables in the end.
9573       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9574 
9575       # Check if the provided tool contains a complete path.
9576       tool_specified="$TAIL"
9577       tool_basename="${tool_specified##*/}"
9578       if test "x$tool_basename" = "x$tool_specified"; then
9579         # A command without a complete path is provided, search $PATH.
9580         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9581 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9582         # Extract the first word of "$tool_basename", so it can be a program name with args.
9583 set dummy $tool_basename; ac_word=$2
9584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9585 $as_echo_n "checking for $ac_word... " >&6; }
9586 if ${ac_cv_path_TAIL+:} false; then :
9587   $as_echo_n "(cached) " >&6
9588 else
9589   case $TAIL in
9590   [\\/]* | ?:[\\/]*)
9591   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9592   ;;
9593   *)
9594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9595 for as_dir in $PATH
9596 do
9597   IFS=$as_save_IFS
9598   test -z "$as_dir" && as_dir=.
9599     for ac_exec_ext in '' $ac_executable_extensions; do
9600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9601     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9603     break 2
9604   fi
9605 done
9606   done
9607 IFS=$as_save_IFS
9608 
9609   ;;
9610 esac
9611 fi
9612 TAIL=$ac_cv_path_TAIL
9613 if test -n "$TAIL"; then
9614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9615 $as_echo "$TAIL" >&6; }
9616 else
9617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618 $as_echo "no" >&6; }
9619 fi
9620 
9621 
9622         if test "x$TAIL" = x; then
9623           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9624         fi
9625       else
9626         # Otherwise we believe it is a complete path. Use it as it is.
9627         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9628 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9629         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9630 $as_echo_n "checking for TAIL... " >&6; }
9631         if test ! -x "$tool_specified"; then
9632           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9633 $as_echo "not found" >&6; }
9634           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9635         fi
9636         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9637 $as_echo "$tool_specified" >&6; }
9638       fi
9639     fi
9640   fi
9641 
9642 
9643 
9644   if test "x$TAIL" = x; then
9645     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9646   fi
9647 
9648 
9649 
9650 
9651 
9652   # Publish this variable in the help.
9653 
9654 
9655   if test "x$TAR" = x; then
9656     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
9704 
9705     # Try to remove the string !TAR! from our list.
9706     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9707     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9708       # If it failed, the variable was not from the command line. Ignore it,
9709       # but warn the user (except for BASH, which is always set by the calling BASH).
9710       if test "xTAR" != xBASH; then
9711         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9712 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9713       fi
9714       # Try to locate tool using the code snippet
9715       for ac_prog in tar
9716 do
9717   # Extract the first word of "$ac_prog", so it can be a program name with args.
9718 set dummy $ac_prog; 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   test -n "$TAR" && break
9758 done
9759 
9760     else
9761       # If it succeeded, then it was overridden by the user. We will use it
9762       # for the tool.
9763 
9764       # First remove it from the list of overridden variables, so we can test
9765       # for unknown variables in the end.
9766       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9767 
9768       # Check if the provided tool contains a complete path.
9769       tool_specified="$TAR"
9770       tool_basename="${tool_specified##*/}"
9771       if test "x$tool_basename" = "x$tool_specified"; then
9772         # A command without a complete path is provided, search $PATH.
9773         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9774 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9775         # Extract the first word of "$tool_basename", so it can be a program name with args.
9776 set dummy $tool_basename; ac_word=$2
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9778 $as_echo_n "checking for $ac_word... " >&6; }
9779 if ${ac_cv_path_TAR+:} false; then :
9780   $as_echo_n "(cached) " >&6
9781 else
9782   case $TAR in
9783   [\\/]* | ?:[\\/]*)
9784   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9785   ;;
9786   *)
9787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9788 for as_dir in $PATH
9789 do
9790   IFS=$as_save_IFS
9791   test -z "$as_dir" && as_dir=.
9792     for ac_exec_ext in '' $ac_executable_extensions; do
9793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9794     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9796     break 2
9797   fi
9798 done
9799   done
9800 IFS=$as_save_IFS
9801 
9802   ;;
9803 esac
9804 fi
9805 TAR=$ac_cv_path_TAR
9806 if test -n "$TAR"; then
9807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9808 $as_echo "$TAR" >&6; }
9809 else
9810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811 $as_echo "no" >&6; }
9812 fi
9813 
9814 
9815         if test "x$TAR" = x; then
9816           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9817         fi
9818       else
9819         # Otherwise we believe it is a complete path. Use it as it is.
9820         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9821 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9822         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9823 $as_echo_n "checking for TAR... " >&6; }
9824         if test ! -x "$tool_specified"; then
9825           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9826 $as_echo "not found" >&6; }
9827           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9828         fi
9829         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9830 $as_echo "$tool_specified" >&6; }
9831       fi
9832     fi
9833   fi
9834 
9835 
9836 
9837   if test "x$TAR" = x; then
9838     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9839   fi
9840 
9841 
9842 
9843 
9844 
9845   # Publish this variable in the help.
9846 
9847 
9848   if test "x$TEE" = x; then
9849     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
9897 
9898     # Try to remove the string !TEE! from our list.
9899     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9900     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9901       # If it failed, the variable was not from the command line. Ignore it,
9902       # but warn the user (except for BASH, which is always set by the calling BASH).
9903       if test "xTEE" != xBASH; then
9904         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9905 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9906       fi
9907       # Try to locate tool using the code snippet
9908       for ac_prog in tee
9909 do
9910   # Extract the first word of "$ac_prog", so it can be a program name with args.
9911 set dummy $ac_prog; 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   test -n "$TEE" && break
9951 done
9952 
9953     else
9954       # If it succeeded, then it was overridden by the user. We will use it
9955       # for the tool.
9956 
9957       # First remove it from the list of overridden variables, so we can test
9958       # for unknown variables in the end.
9959       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9960 
9961       # Check if the provided tool contains a complete path.
9962       tool_specified="$TEE"
9963       tool_basename="${tool_specified##*/}"
9964       if test "x$tool_basename" = "x$tool_specified"; then
9965         # A command without a complete path is provided, search $PATH.
9966         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9967 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9968         # Extract the first word of "$tool_basename", so it can be a program name with args.
9969 set dummy $tool_basename; ac_word=$2
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9971 $as_echo_n "checking for $ac_word... " >&6; }
9972 if ${ac_cv_path_TEE+:} false; then :
9973   $as_echo_n "(cached) " >&6
9974 else
9975   case $TEE in
9976   [\\/]* | ?:[\\/]*)
9977   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9978   ;;
9979   *)
9980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9981 for as_dir in $PATH
9982 do
9983   IFS=$as_save_IFS
9984   test -z "$as_dir" && as_dir=.
9985     for ac_exec_ext in '' $ac_executable_extensions; do
9986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9987     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9989     break 2
9990   fi
9991 done
9992   done
9993 IFS=$as_save_IFS
9994 
9995   ;;
9996 esac
9997 fi
9998 TEE=$ac_cv_path_TEE
9999 if test -n "$TEE"; then
10000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10001 $as_echo "$TEE" >&6; }
10002 else
10003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10004 $as_echo "no" >&6; }
10005 fi
10006 
10007 
10008         if test "x$TEE" = x; then
10009           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10010         fi
10011       else
10012         # Otherwise we believe it is a complete path. Use it as it is.
10013         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10014 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10015         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10016 $as_echo_n "checking for TEE... " >&6; }
10017         if test ! -x "$tool_specified"; then
10018           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10019 $as_echo "not found" >&6; }
10020           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10021         fi
10022         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10023 $as_echo "$tool_specified" >&6; }
10024       fi
10025     fi
10026   fi
10027 
10028 
10029 
10030   if test "x$TEE" = x; then
10031     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10032   fi
10033 
10034 
10035 
10036 
10037 
10038   # Publish this variable in the help.
10039 
10040 
10041   if test "x$TOUCH" = x; then
10042     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
10090 
10091     # Try to remove the string !TOUCH! from our list.
10092     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10093     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10094       # If it failed, the variable was not from the command line. Ignore it,
10095       # but warn the user (except for BASH, which is always set by the calling BASH).
10096       if test "xTOUCH" != xBASH; then
10097         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10098 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10099       fi
10100       # Try to locate tool using the code snippet
10101       for ac_prog in touch
10102 do
10103   # Extract the first word of "$ac_prog", so it can be a program name with args.
10104 set dummy $ac_prog; ac_word=$2
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106 $as_echo_n "checking for $ac_word... " >&6; }
10107 if ${ac_cv_path_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   test -n "$TOUCH" && break
10144 done
10145 
10146     else
10147       # If it succeeded, then it was overridden by the user. We will use it
10148       # for the tool.
10149 
10150       # First remove it from the list of overridden variables, so we can test
10151       # for unknown variables in the end.
10152       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10153 
10154       # Check if the provided tool contains a complete path.
10155       tool_specified="$TOUCH"
10156       tool_basename="${tool_specified##*/}"
10157       if test "x$tool_basename" = "x$tool_specified"; then
10158         # A command without a complete path is provided, search $PATH.
10159         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10160 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10161         # Extract the first word of "$tool_basename", so it can be a program name with args.
10162 set dummy $tool_basename; ac_word=$2
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10164 $as_echo_n "checking for $ac_word... " >&6; }
10165 if ${ac_cv_path_TOUCH+:} false; then :
10166   $as_echo_n "(cached) " >&6
10167 else
10168   case $TOUCH in
10169   [\\/]* | ?:[\\/]*)
10170   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10171   ;;
10172   *)
10173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10174 for as_dir in $PATH
10175 do
10176   IFS=$as_save_IFS
10177   test -z "$as_dir" && as_dir=.
10178     for ac_exec_ext in '' $ac_executable_extensions; do
10179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10180     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10182     break 2
10183   fi
10184 done
10185   done
10186 IFS=$as_save_IFS
10187 
10188   ;;
10189 esac
10190 fi
10191 TOUCH=$ac_cv_path_TOUCH
10192 if test -n "$TOUCH"; then
10193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10194 $as_echo "$TOUCH" >&6; }
10195 else
10196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197 $as_echo "no" >&6; }
10198 fi
10199 
10200 
10201         if test "x$TOUCH" = x; then
10202           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10203         fi
10204       else
10205         # Otherwise we believe it is a complete path. Use it as it is.
10206         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10207 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10208         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10209 $as_echo_n "checking for TOUCH... " >&6; }
10210         if test ! -x "$tool_specified"; then
10211           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10212 $as_echo "not found" >&6; }
10213           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10214         fi
10215         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10216 $as_echo "$tool_specified" >&6; }
10217       fi
10218     fi
10219   fi
10220 
10221 
10222 
10223   if test "x$TOUCH" = x; then
10224     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10225   fi
10226 
10227 
10228 
10229 
10230 
10231   # Publish this variable in the help.
10232 
10233 
10234   if test "x$TR" = x; then
10235     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
10283 
10284     # Try to remove the string !TR! from our list.
10285     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10286     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10287       # If it failed, the variable was not from the command line. Ignore it,
10288       # but warn the user (except for BASH, which is always set by the calling BASH).
10289       if test "xTR" != xBASH; then
10290         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10291 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10292       fi
10293       # Try to locate tool using the code snippet
10294       for ac_prog in tr
10295 do
10296   # Extract the first word of "$ac_prog", so it can be a program name with args.
10297 set dummy $ac_prog; 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   test -n "$TR" && break
10337 done
10338 
10339     else
10340       # If it succeeded, then it was overridden by the user. We will use it
10341       # for the tool.
10342 
10343       # First remove it from the list of overridden variables, so we can test
10344       # for unknown variables in the end.
10345       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10346 
10347       # Check if the provided tool contains a complete path.
10348       tool_specified="$TR"
10349       tool_basename="${tool_specified##*/}"
10350       if test "x$tool_basename" = "x$tool_specified"; then
10351         # A command without a complete path is provided, search $PATH.
10352         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10353 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10354         # Extract the first word of "$tool_basename", so it can be a program name with args.
10355 set dummy $tool_basename; ac_word=$2
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357 $as_echo_n "checking for $ac_word... " >&6; }
10358 if ${ac_cv_path_TR+:} false; then :
10359   $as_echo_n "(cached) " >&6
10360 else
10361   case $TR in
10362   [\\/]* | ?:[\\/]*)
10363   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10364   ;;
10365   *)
10366   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367 for as_dir in $PATH
10368 do
10369   IFS=$as_save_IFS
10370   test -z "$as_dir" && as_dir=.
10371     for ac_exec_ext in '' $ac_executable_extensions; do
10372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375     break 2
10376   fi
10377 done
10378   done
10379 IFS=$as_save_IFS
10380 
10381   ;;
10382 esac
10383 fi
10384 TR=$ac_cv_path_TR
10385 if test -n "$TR"; then
10386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10387 $as_echo "$TR" >&6; }
10388 else
10389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390 $as_echo "no" >&6; }
10391 fi
10392 
10393 
10394         if test "x$TR" = x; then
10395           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10396         fi
10397       else
10398         # Otherwise we believe it is a complete path. Use it as it is.
10399         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10400 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10401         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10402 $as_echo_n "checking for TR... " >&6; }
10403         if test ! -x "$tool_specified"; then
10404           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10405 $as_echo "not found" >&6; }
10406           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10407         fi
10408         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10409 $as_echo "$tool_specified" >&6; }
10410       fi
10411     fi
10412   fi
10413 
10414 
10415 
10416   if test "x$TR" = x; then
10417     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10418   fi
10419 
10420 
10421 
10422 
10423 
10424   # Publish this variable in the help.
10425 
10426 
10427   if test "x$UNAME" = x; then
10428     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
10476 
10477     # Try to remove the string !UNAME! from our list.
10478     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10479     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10480       # If it failed, the variable was not from the command line. Ignore it,
10481       # but warn the user (except for BASH, which is always set by the calling BASH).
10482       if test "xUNAME" != xBASH; then
10483         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10484 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10485       fi
10486       # Try to locate tool using the code snippet
10487       for ac_prog in uname
10488 do
10489   # Extract the first word of "$ac_prog", so it can be a program name with args.
10490 set dummy $ac_prog; 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   test -n "$UNAME" && break
10530 done
10531 
10532     else
10533       # If it succeeded, then it was overridden by the user. We will use it
10534       # for the tool.
10535 
10536       # First remove it from the list of overridden variables, so we can test
10537       # for unknown variables in the end.
10538       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10539 
10540       # Check if the provided tool contains a complete path.
10541       tool_specified="$UNAME"
10542       tool_basename="${tool_specified##*/}"
10543       if test "x$tool_basename" = "x$tool_specified"; then
10544         # A command without a complete path is provided, search $PATH.
10545         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10546 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10547         # Extract the first word of "$tool_basename", so it can be a program name with args.
10548 set dummy $tool_basename; ac_word=$2
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10550 $as_echo_n "checking for $ac_word... " >&6; }
10551 if ${ac_cv_path_UNAME+:} false; then :
10552   $as_echo_n "(cached) " >&6
10553 else
10554   case $UNAME in
10555   [\\/]* | ?:[\\/]*)
10556   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10557   ;;
10558   *)
10559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10560 for as_dir in $PATH
10561 do
10562   IFS=$as_save_IFS
10563   test -z "$as_dir" && as_dir=.
10564     for ac_exec_ext in '' $ac_executable_extensions; do
10565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10566     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10568     break 2
10569   fi
10570 done
10571   done
10572 IFS=$as_save_IFS
10573 
10574   ;;
10575 esac
10576 fi
10577 UNAME=$ac_cv_path_UNAME
10578 if test -n "$UNAME"; then
10579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10580 $as_echo "$UNAME" >&6; }
10581 else
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10583 $as_echo "no" >&6; }
10584 fi
10585 
10586 
10587         if test "x$UNAME" = x; then
10588           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10589         fi
10590       else
10591         # Otherwise we believe it is a complete path. Use it as it is.
10592         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10593 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10594         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10595 $as_echo_n "checking for UNAME... " >&6; }
10596         if test ! -x "$tool_specified"; then
10597           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10598 $as_echo "not found" >&6; }
10599           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10600         fi
10601         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10602 $as_echo "$tool_specified" >&6; }
10603       fi
10604     fi
10605   fi
10606 
10607 
10608 
10609   if test "x$UNAME" = x; then
10610     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10611   fi
10612 
10613 
10614 
10615 
10616 
10617   # Publish this variable in the help.
10618 
10619 
10620   if test "x$UNIQ" = x; then
10621     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
10669 
10670     # Try to remove the string !UNIQ! from our list.
10671     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10672     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10673       # If it failed, the variable was not from the command line. Ignore it,
10674       # but warn the user (except for BASH, which is always set by the calling BASH).
10675       if test "xUNIQ" != xBASH; then
10676         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10677 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10678       fi
10679       # Try to locate tool using the code snippet
10680       for ac_prog in uniq
10681 do
10682   # Extract the first word of "$ac_prog", so it can be a program name with args.
10683 set dummy $ac_prog; 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   test -n "$UNIQ" && break
10723 done
10724 
10725     else
10726       # If it succeeded, then it was overridden by the user. We will use it
10727       # for the tool.
10728 
10729       # First remove it from the list of overridden variables, so we can test
10730       # for unknown variables in the end.
10731       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10732 
10733       # Check if the provided tool contains a complete path.
10734       tool_specified="$UNIQ"
10735       tool_basename="${tool_specified##*/}"
10736       if test "x$tool_basename" = "x$tool_specified"; then
10737         # A command without a complete path is provided, search $PATH.
10738         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10739 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10740         # Extract the first word of "$tool_basename", so it can be a program name with args.
10741 set dummy $tool_basename; ac_word=$2
10742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743 $as_echo_n "checking for $ac_word... " >&6; }
10744 if ${ac_cv_path_UNIQ+:} false; then :
10745   $as_echo_n "(cached) " >&6
10746 else
10747   case $UNIQ in
10748   [\\/]* | ?:[\\/]*)
10749   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10750   ;;
10751   *)
10752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753 for as_dir in $PATH
10754 do
10755   IFS=$as_save_IFS
10756   test -z "$as_dir" && as_dir=.
10757     for ac_exec_ext in '' $ac_executable_extensions; do
10758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761     break 2
10762   fi
10763 done
10764   done
10765 IFS=$as_save_IFS
10766 
10767   ;;
10768 esac
10769 fi
10770 UNIQ=$ac_cv_path_UNIQ
10771 if test -n "$UNIQ"; then
10772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10773 $as_echo "$UNIQ" >&6; }
10774 else
10775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776 $as_echo "no" >&6; }
10777 fi
10778 
10779 
10780         if test "x$UNIQ" = x; then
10781           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10782         fi
10783       else
10784         # Otherwise we believe it is a complete path. Use it as it is.
10785         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10786 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10787         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10788 $as_echo_n "checking for UNIQ... " >&6; }
10789         if test ! -x "$tool_specified"; then
10790           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10791 $as_echo "not found" >&6; }
10792           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10793         fi
10794         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10795 $as_echo "$tool_specified" >&6; }
10796       fi
10797     fi
10798   fi
10799 
10800 
10801 
10802   if test "x$UNIQ" = x; then
10803     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10804   fi
10805 
10806 
10807 
10808 
10809 
10810   # Publish this variable in the help.
10811 
10812 
10813   if test "x$WC" = x; then
10814     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
10862 
10863     # Try to remove the string !WC! from our list.
10864     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10865     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10866       # If it failed, the variable was not from the command line. Ignore it,
10867       # but warn the user (except for BASH, which is always set by the calling BASH).
10868       if test "xWC" != xBASH; then
10869         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10870 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10871       fi
10872       # Try to locate tool using the code snippet
10873       for ac_prog in wc
10874 do
10875   # Extract the first word of "$ac_prog", so it can be a program name with args.
10876 set dummy $ac_prog; 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   test -n "$WC" && break
10916 done
10917 
10918     else
10919       # If it succeeded, then it was overridden by the user. We will use it
10920       # for the tool.
10921 
10922       # First remove it from the list of overridden variables, so we can test
10923       # for unknown variables in the end.
10924       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10925 
10926       # Check if the provided tool contains a complete path.
10927       tool_specified="$WC"
10928       tool_basename="${tool_specified##*/}"
10929       if test "x$tool_basename" = "x$tool_specified"; then
10930         # A command without a complete path is provided, search $PATH.
10931         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10932 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10933         # Extract the first word of "$tool_basename", so it can be a program name with args.
10934 set dummy $tool_basename; ac_word=$2
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10936 $as_echo_n "checking for $ac_word... " >&6; }
10937 if ${ac_cv_path_WC+:} false; then :
10938   $as_echo_n "(cached) " >&6
10939 else
10940   case $WC in
10941   [\\/]* | ?:[\\/]*)
10942   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10943   ;;
10944   *)
10945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10946 for as_dir in $PATH
10947 do
10948   IFS=$as_save_IFS
10949   test -z "$as_dir" && as_dir=.
10950     for ac_exec_ext in '' $ac_executable_extensions; do
10951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10952     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10954     break 2
10955   fi
10956 done
10957   done
10958 IFS=$as_save_IFS
10959 
10960   ;;
10961 esac
10962 fi
10963 WC=$ac_cv_path_WC
10964 if test -n "$WC"; then
10965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10966 $as_echo "$WC" >&6; }
10967 else
10968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969 $as_echo "no" >&6; }
10970 fi
10971 
10972 
10973         if test "x$WC" = x; then
10974           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10975         fi
10976       else
10977         # Otherwise we believe it is a complete path. Use it as it is.
10978         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10979 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10980         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10981 $as_echo_n "checking for WC... " >&6; }
10982         if test ! -x "$tool_specified"; then
10983           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10984 $as_echo "not found" >&6; }
10985           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10986         fi
10987         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10988 $as_echo "$tool_specified" >&6; }
10989       fi
10990     fi
10991   fi
10992 
10993 
10994 
10995   if test "x$WC" = x; then
10996     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10997   fi
10998 
10999 
11000 
11001 
11002 
11003   # Publish this variable in the help.
11004 
11005 
11006   if test "x$WHICH" = x; then
11007     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
11055 
11056     # Try to remove the string !WHICH! from our list.
11057     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11058     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11059       # If it failed, the variable was not from the command line. Ignore it,
11060       # but warn the user (except for BASH, which is always set by the calling BASH).
11061       if test "xWHICH" != xBASH; then
11062         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11063 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11064       fi
11065       # Try to locate tool using the code snippet
11066       for ac_prog in which
11067 do
11068   # Extract the first word of "$ac_prog", so it can be a program name with args.
11069 set dummy $ac_prog; 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   test -n "$WHICH" && break
11109 done
11110 
11111     else
11112       # If it succeeded, then it was overridden by the user. We will use it
11113       # for the tool.
11114 
11115       # First remove it from the list of overridden variables, so we can test
11116       # for unknown variables in the end.
11117       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11118 
11119       # Check if the provided tool contains a complete path.
11120       tool_specified="$WHICH"
11121       tool_basename="${tool_specified##*/}"
11122       if test "x$tool_basename" = "x$tool_specified"; then
11123         # A command without a complete path is provided, search $PATH.
11124         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11125 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11126         # Extract the first word of "$tool_basename", so it can be a program name with args.
11127 set dummy $tool_basename; ac_word=$2
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11129 $as_echo_n "checking for $ac_word... " >&6; }
11130 if ${ac_cv_path_WHICH+:} false; then :
11131   $as_echo_n "(cached) " >&6
11132 else
11133   case $WHICH in
11134   [\\/]* | ?:[\\/]*)
11135   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11136   ;;
11137   *)
11138   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11139 for as_dir in $PATH
11140 do
11141   IFS=$as_save_IFS
11142   test -z "$as_dir" && as_dir=.
11143     for ac_exec_ext in '' $ac_executable_extensions; do
11144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11145     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11147     break 2
11148   fi
11149 done
11150   done
11151 IFS=$as_save_IFS
11152 
11153   ;;
11154 esac
11155 fi
11156 WHICH=$ac_cv_path_WHICH
11157 if test -n "$WHICH"; then
11158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11159 $as_echo "$WHICH" >&6; }
11160 else
11161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11162 $as_echo "no" >&6; }
11163 fi
11164 
11165 
11166         if test "x$WHICH" = x; then
11167           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11168         fi
11169       else
11170         # Otherwise we believe it is a complete path. Use it as it is.
11171         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11172 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11173         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11174 $as_echo_n "checking for WHICH... " >&6; }
11175         if test ! -x "$tool_specified"; then
11176           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11177 $as_echo "not found" >&6; }
11178           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11179         fi
11180         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11181 $as_echo "$tool_specified" >&6; }
11182       fi
11183     fi
11184   fi
11185 
11186 
11187 
11188   if test "x$WHICH" = x; then
11189     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11190   fi
11191 
11192 
11193 
11194 
11195 
11196   # Publish this variable in the help.
11197 
11198 
11199   if test "x$XARGS" = x; then
11200     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
11248 
11249     # Try to remove the string !XARGS! from our list.
11250     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11251     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11252       # If it failed, the variable was not from the command line. Ignore it,
11253       # but warn the user (except for BASH, which is always set by the calling BASH).
11254       if test "xXARGS" != xBASH; then
11255         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11256 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11257       fi
11258       # Try to locate tool using the code snippet
11259       for ac_prog in xargs
11260 do
11261   # Extract the first word of "$ac_prog", so it can be a program name with args.
11262 set dummy $ac_prog; 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   test -n "$XARGS" && break
11302 done
11303 
11304     else
11305       # If it succeeded, then it was overridden by the user. We will use it
11306       # for the tool.
11307 
11308       # First remove it from the list of overridden variables, so we can test
11309       # for unknown variables in the end.
11310       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11311 
11312       # Check if the provided tool contains a complete path.
11313       tool_specified="$XARGS"
11314       tool_basename="${tool_specified##*/}"
11315       if test "x$tool_basename" = "x$tool_specified"; then
11316         # A command without a complete path is provided, search $PATH.
11317         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11318 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11319         # Extract the first word of "$tool_basename", so it can be a program name with args.
11320 set dummy $tool_basename; ac_word=$2
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11322 $as_echo_n "checking for $ac_word... " >&6; }
11323 if ${ac_cv_path_XARGS+:} false; then :
11324   $as_echo_n "(cached) " >&6
11325 else
11326   case $XARGS in
11327   [\\/]* | ?:[\\/]*)
11328   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11329   ;;
11330   *)
11331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11332 for as_dir in $PATH
11333 do
11334   IFS=$as_save_IFS
11335   test -z "$as_dir" && as_dir=.
11336     for ac_exec_ext in '' $ac_executable_extensions; do
11337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11338     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11340     break 2
11341   fi
11342 done
11343   done
11344 IFS=$as_save_IFS
11345 
11346   ;;
11347 esac
11348 fi
11349 XARGS=$ac_cv_path_XARGS
11350 if test -n "$XARGS"; then
11351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11352 $as_echo "$XARGS" >&6; }
11353 else
11354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355 $as_echo "no" >&6; }
11356 fi
11357 
11358 
11359         if test "x$XARGS" = x; then
11360           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11361         fi
11362       else
11363         # Otherwise we believe it is a complete path. Use it as it is.
11364         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11365 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11367 $as_echo_n "checking for XARGS... " >&6; }
11368         if test ! -x "$tool_specified"; then
11369           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11370 $as_echo "not found" >&6; }
11371           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11372         fi
11373         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11374 $as_echo "$tool_specified" >&6; }
11375       fi
11376     fi
11377   fi
11378 
11379 
11380 
11381   if test "x$XARGS" = x; then
11382     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11383   fi
11384 
11385 
11386 
11387   # Then required tools that require some special treatment.
11388 
11389 
11390   # Publish this variable in the help.
11391 
11392 
11393   if test "x$AWK" = x; then
11394     # The variable is not set by user, try to locate tool using the code snippet
11395     for ac_prog in gawk mawk nawk awk
11396 do
11397   # Extract the first word of "$ac_prog", so it can be a program name with args.
11398 set dummy $ac_prog; ac_word=$2
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11400 $as_echo_n "checking for $ac_word... " >&6; }
11401 if ${ac_cv_prog_AWK+:} false; then :
11402   $as_echo_n "(cached) " >&6
11403 else
11404   if test -n "$AWK"; then
11405   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11406 else
11407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11408 for as_dir in $PATH
11409 do
11410   IFS=$as_save_IFS
11411   test -z "$as_dir" && as_dir=.
11412     for ac_exec_ext in '' $ac_executable_extensions; do
11413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11414     ac_cv_prog_AWK="$ac_prog"
11415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11416     break 2
11417   fi
11418 done
11419   done
11420 IFS=$as_save_IFS
11421 
11422 fi
11423 fi
11424 AWK=$ac_cv_prog_AWK
11425 if test -n "$AWK"; then
11426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11427 $as_echo "$AWK" >&6; }
11428 else
11429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430 $as_echo "no" >&6; }
11431 fi
11432 
11433 
11434   test -n "$AWK" && break
11435 done
11436 
11437   else
11438     # The variable is set, but is it from the command line or the environment?
11439 
11440     # Try to remove the string !AWK! from our list.
11441     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11442     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11443       # If it failed, the variable was not from the command line. Ignore it,
11444       # but warn the user (except for BASH, which is always set by the calling BASH).
11445       if test "xAWK" != xBASH; then
11446         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11447 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11448       fi
11449       # Try to locate tool using the code snippet
11450       for ac_prog in gawk mawk nawk awk
11451 do
11452   # Extract the first word of "$ac_prog", so it can be a program name with args.
11453 set dummy $ac_prog; ac_word=$2
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11455 $as_echo_n "checking for $ac_word... " >&6; }
11456 if ${ac_cv_prog_AWK+:} false; then :
11457   $as_echo_n "(cached) " >&6
11458 else
11459   if test -n "$AWK"; then
11460   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11461 else
11462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11463 for as_dir in $PATH
11464 do
11465   IFS=$as_save_IFS
11466   test -z "$as_dir" && as_dir=.
11467     for ac_exec_ext in '' $ac_executable_extensions; do
11468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11469     ac_cv_prog_AWK="$ac_prog"
11470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11471     break 2
11472   fi
11473 done
11474   done
11475 IFS=$as_save_IFS
11476 
11477 fi
11478 fi
11479 AWK=$ac_cv_prog_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   test -n "$AWK" && break
11490 done
11491 
11492     else
11493       # If it succeeded, then it was overridden by the user. We will use it
11494       # for the tool.
11495 
11496       # First remove it from the list of overridden variables, so we can test
11497       # for unknown variables in the end.
11498       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11499 
11500       # Check if the provided tool contains a complete path.
11501       tool_specified="$AWK"
11502       tool_basename="${tool_specified##*/}"
11503       if test "x$tool_basename" = "x$tool_specified"; then
11504         # A command without a complete path is provided, search $PATH.
11505         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11506 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11507         # Extract the first word of "$tool_basename", so it can be a program name with args.
11508 set dummy $tool_basename; ac_word=$2
11509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11510 $as_echo_n "checking for $ac_word... " >&6; }
11511 if ${ac_cv_path_AWK+:} false; then :
11512   $as_echo_n "(cached) " >&6
11513 else
11514   case $AWK in
11515   [\\/]* | ?:[\\/]*)
11516   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11517   ;;
11518   *)
11519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11520 for as_dir in $PATH
11521 do
11522   IFS=$as_save_IFS
11523   test -z "$as_dir" && as_dir=.
11524     for ac_exec_ext in '' $ac_executable_extensions; do
11525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11526     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11528     break 2
11529   fi
11530 done
11531   done
11532 IFS=$as_save_IFS
11533 
11534   ;;
11535 esac
11536 fi
11537 AWK=$ac_cv_path_AWK
11538 if test -n "$AWK"; then
11539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11540 $as_echo "$AWK" >&6; }
11541 else
11542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11543 $as_echo "no" >&6; }
11544 fi
11545 
11546 
11547         if test "x$AWK" = x; then
11548           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11549         fi
11550       else
11551         # Otherwise we believe it is a complete path. Use it as it is.
11552         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11553 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11555 $as_echo_n "checking for AWK... " >&6; }
11556         if test ! -x "$tool_specified"; then
11557           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11558 $as_echo "not found" >&6; }
11559           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11560         fi
11561         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11562 $as_echo "$tool_specified" >&6; }
11563       fi
11564     fi
11565   fi
11566 
11567 
11568   if test "x$AWK" = x; then
11569     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11570   fi
11571 
11572 
11573 
11574 
11575   # Publish this variable in the help.
11576 
11577 
11578   if test "x$GREP" = x; then
11579     # The variable is not set by user, try to locate tool using the code snippet
11580     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11581 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11582 if ${ac_cv_path_GREP+:} false; then :
11583   $as_echo_n "(cached) " >&6
11584 else
11585   if test -z "$GREP"; then
11586   ac_path_GREP_found=false
11587   # Loop through the user's path and test for each of PROGNAME-LIST
11588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11589 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11590 do
11591   IFS=$as_save_IFS
11592   test -z "$as_dir" && as_dir=.
11593     for ac_prog in grep ggrep; do
11594     for ac_exec_ext in '' $ac_executable_extensions; do
11595       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11596       as_fn_executable_p "$ac_path_GREP" || continue
11597 # Check for GNU ac_path_GREP and select it if it is found.
11598   # Check for GNU $ac_path_GREP
11599 case `"$ac_path_GREP" --version 2>&1` in
11600 *GNU*)
11601   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11602 *)
11603   ac_count=0
11604   $as_echo_n 0123456789 >"conftest.in"
11605   while :
11606   do
11607     cat "conftest.in" "conftest.in" >"conftest.tmp"
11608     mv "conftest.tmp" "conftest.in"
11609     cp "conftest.in" "conftest.nl"
11610     $as_echo 'GREP' >> "conftest.nl"
11611     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11612     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11613     as_fn_arith $ac_count + 1 && ac_count=$as_val
11614     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11615       # Best one so far, save it but keep looking for a better one
11616       ac_cv_path_GREP="$ac_path_GREP"
11617       ac_path_GREP_max=$ac_count
11618     fi
11619     # 10*(2^10) chars as input seems more than enough
11620     test $ac_count -gt 10 && break
11621   done
11622   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11623 esac
11624 
11625       $ac_path_GREP_found && break 3
11626     done
11627   done
11628   done
11629 IFS=$as_save_IFS
11630   if test -z "$ac_cv_path_GREP"; then
11631     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11632   fi
11633 else
11634   ac_cv_path_GREP=$GREP
11635 fi
11636 
11637 fi
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11639 $as_echo "$ac_cv_path_GREP" >&6; }
11640  GREP="$ac_cv_path_GREP"
11641 
11642 
11643   else
11644     # The variable is set, but is it from the command line or the environment?
11645 
11646     # Try to remove the string !GREP! from our list.
11647     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11648     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11649       # If it failed, the variable was not from the command line. Ignore it,
11650       # but warn the user (except for BASH, which is always set by the calling BASH).
11651       if test "xGREP" != xBASH; then
11652         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11653 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11654       fi
11655       # Try to locate tool using the code snippet
11656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11657 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11658 if ${ac_cv_path_GREP+:} false; then :
11659   $as_echo_n "(cached) " >&6
11660 else
11661   if test -z "$GREP"; then
11662   ac_path_GREP_found=false
11663   # Loop through the user's path and test for each of PROGNAME-LIST
11664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11665 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11666 do
11667   IFS=$as_save_IFS
11668   test -z "$as_dir" && as_dir=.
11669     for ac_prog in grep ggrep; do
11670     for ac_exec_ext in '' $ac_executable_extensions; do
11671       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11672       as_fn_executable_p "$ac_path_GREP" || continue
11673 # Check for GNU ac_path_GREP and select it if it is found.
11674   # Check for GNU $ac_path_GREP
11675 case `"$ac_path_GREP" --version 2>&1` in
11676 *GNU*)
11677   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11678 *)
11679   ac_count=0
11680   $as_echo_n 0123456789 >"conftest.in"
11681   while :
11682   do
11683     cat "conftest.in" "conftest.in" >"conftest.tmp"
11684     mv "conftest.tmp" "conftest.in"
11685     cp "conftest.in" "conftest.nl"
11686     $as_echo 'GREP' >> "conftest.nl"
11687     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11688     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11689     as_fn_arith $ac_count + 1 && ac_count=$as_val
11690     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11691       # Best one so far, save it but keep looking for a better one
11692       ac_cv_path_GREP="$ac_path_GREP"
11693       ac_path_GREP_max=$ac_count
11694     fi
11695     # 10*(2^10) chars as input seems more than enough
11696     test $ac_count -gt 10 && break
11697   done
11698   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11699 esac
11700 
11701       $ac_path_GREP_found && break 3
11702     done
11703   done
11704   done
11705 IFS=$as_save_IFS
11706   if test -z "$ac_cv_path_GREP"; then
11707     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11708   fi
11709 else
11710   ac_cv_path_GREP=$GREP
11711 fi
11712 
11713 fi
11714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11715 $as_echo "$ac_cv_path_GREP" >&6; }
11716  GREP="$ac_cv_path_GREP"
11717 
11718 
11719     else
11720       # If it succeeded, then it was overridden by the user. We will use it
11721       # for the tool.
11722 
11723       # First remove it from the list of overridden variables, so we can test
11724       # for unknown variables in the end.
11725       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11726 
11727       # Check if the provided tool contains a complete path.
11728       tool_specified="$GREP"
11729       tool_basename="${tool_specified##*/}"
11730       if test "x$tool_basename" = "x$tool_specified"; then
11731         # A command without a complete path is provided, search $PATH.
11732         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11733 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11734         # Extract the first word of "$tool_basename", so it can be a program name with args.
11735 set dummy $tool_basename; ac_word=$2
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11737 $as_echo_n "checking for $ac_word... " >&6; }
11738 if ${ac_cv_path_GREP+:} false; then :
11739   $as_echo_n "(cached) " >&6
11740 else
11741   case $GREP in
11742   [\\/]* | ?:[\\/]*)
11743   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11744   ;;
11745   *)
11746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11747 for as_dir in $PATH
11748 do
11749   IFS=$as_save_IFS
11750   test -z "$as_dir" && as_dir=.
11751     for ac_exec_ext in '' $ac_executable_extensions; do
11752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11753     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11755     break 2
11756   fi
11757 done
11758   done
11759 IFS=$as_save_IFS
11760 
11761   ;;
11762 esac
11763 fi
11764 GREP=$ac_cv_path_GREP
11765 if test -n "$GREP"; then
11766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11767 $as_echo "$GREP" >&6; }
11768 else
11769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770 $as_echo "no" >&6; }
11771 fi
11772 
11773 
11774         if test "x$GREP" = x; then
11775           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11776         fi
11777       else
11778         # Otherwise we believe it is a complete path. Use it as it is.
11779         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11780 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11782 $as_echo_n "checking for GREP... " >&6; }
11783         if test ! -x "$tool_specified"; then
11784           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11785 $as_echo "not found" >&6; }
11786           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11787         fi
11788         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11789 $as_echo "$tool_specified" >&6; }
11790       fi
11791     fi
11792   fi
11793 
11794 
11795   if test "x$GREP" = x; then
11796     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11797   fi
11798 
11799 
11800 
11801 
11802   # Publish this variable in the help.
11803 
11804 
11805   if test "x$EGREP" = x; then
11806     # The variable is not set by user, try to locate tool using the code snippet
11807     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11808 $as_echo_n "checking for egrep... " >&6; }
11809 if ${ac_cv_path_EGREP+:} false; then :
11810   $as_echo_n "(cached) " >&6
11811 else
11812   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11813    then ac_cv_path_EGREP="$GREP -E"
11814    else
11815      if test -z "$EGREP"; then
11816   ac_path_EGREP_found=false
11817   # Loop through the user's path and test for each of PROGNAME-LIST
11818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11819 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11820 do
11821   IFS=$as_save_IFS
11822   test -z "$as_dir" && as_dir=.
11823     for ac_prog in egrep; do
11824     for ac_exec_ext in '' $ac_executable_extensions; do
11825       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11826       as_fn_executable_p "$ac_path_EGREP" || continue
11827 # Check for GNU ac_path_EGREP and select it if it is found.
11828   # Check for GNU $ac_path_EGREP
11829 case `"$ac_path_EGREP" --version 2>&1` in
11830 *GNU*)
11831   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11832 *)
11833   ac_count=0
11834   $as_echo_n 0123456789 >"conftest.in"
11835   while :
11836   do
11837     cat "conftest.in" "conftest.in" >"conftest.tmp"
11838     mv "conftest.tmp" "conftest.in"
11839     cp "conftest.in" "conftest.nl"
11840     $as_echo 'EGREP' >> "conftest.nl"
11841     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11842     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11843     as_fn_arith $ac_count + 1 && ac_count=$as_val
11844     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11845       # Best one so far, save it but keep looking for a better one
11846       ac_cv_path_EGREP="$ac_path_EGREP"
11847       ac_path_EGREP_max=$ac_count
11848     fi
11849     # 10*(2^10) chars as input seems more than enough
11850     test $ac_count -gt 10 && break
11851   done
11852   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11853 esac
11854 
11855       $ac_path_EGREP_found && break 3
11856     done
11857   done
11858   done
11859 IFS=$as_save_IFS
11860   if test -z "$ac_cv_path_EGREP"; then
11861     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11862   fi
11863 else
11864   ac_cv_path_EGREP=$EGREP
11865 fi
11866 
11867    fi
11868 fi
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11870 $as_echo "$ac_cv_path_EGREP" >&6; }
11871  EGREP="$ac_cv_path_EGREP"
11872 
11873 
11874   else
11875     # The variable is set, but is it from the command line or the environment?
11876 
11877     # Try to remove the string !EGREP! from our list.
11878     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11879     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11880       # If it failed, the variable was not from the command line. Ignore it,
11881       # but warn the user (except for BASH, which is always set by the calling BASH).
11882       if test "xEGREP" != xBASH; then
11883         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11884 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11885       fi
11886       # Try to locate tool using the code snippet
11887       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11888 $as_echo_n "checking for egrep... " >&6; }
11889 if ${ac_cv_path_EGREP+:} false; then :
11890   $as_echo_n "(cached) " >&6
11891 else
11892   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11893    then ac_cv_path_EGREP="$GREP -E"
11894    else
11895      if test -z "$EGREP"; then
11896   ac_path_EGREP_found=false
11897   # Loop through the user's path and test for each of PROGNAME-LIST
11898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11899 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11900 do
11901   IFS=$as_save_IFS
11902   test -z "$as_dir" && as_dir=.
11903     for ac_prog in egrep; do
11904     for ac_exec_ext in '' $ac_executable_extensions; do
11905       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11906       as_fn_executable_p "$ac_path_EGREP" || continue
11907 # Check for GNU ac_path_EGREP and select it if it is found.
11908   # Check for GNU $ac_path_EGREP
11909 case `"$ac_path_EGREP" --version 2>&1` in
11910 *GNU*)
11911   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11912 *)
11913   ac_count=0
11914   $as_echo_n 0123456789 >"conftest.in"
11915   while :
11916   do
11917     cat "conftest.in" "conftest.in" >"conftest.tmp"
11918     mv "conftest.tmp" "conftest.in"
11919     cp "conftest.in" "conftest.nl"
11920     $as_echo 'EGREP' >> "conftest.nl"
11921     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11922     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11923     as_fn_arith $ac_count + 1 && ac_count=$as_val
11924     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11925       # Best one so far, save it but keep looking for a better one
11926       ac_cv_path_EGREP="$ac_path_EGREP"
11927       ac_path_EGREP_max=$ac_count
11928     fi
11929     # 10*(2^10) chars as input seems more than enough
11930     test $ac_count -gt 10 && break
11931   done
11932   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11933 esac
11934 
11935       $ac_path_EGREP_found && break 3
11936     done
11937   done
11938   done
11939 IFS=$as_save_IFS
11940   if test -z "$ac_cv_path_EGREP"; then
11941     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11942   fi
11943 else
11944   ac_cv_path_EGREP=$EGREP
11945 fi
11946 
11947    fi
11948 fi
11949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11950 $as_echo "$ac_cv_path_EGREP" >&6; }
11951  EGREP="$ac_cv_path_EGREP"
11952 
11953 
11954     else
11955       # If it succeeded, then it was overridden by the user. We will use it
11956       # for the tool.
11957 
11958       # First remove it from the list of overridden variables, so we can test
11959       # for unknown variables in the end.
11960       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11961 
11962       # Check if the provided tool contains a complete path.
11963       tool_specified="$EGREP"
11964       tool_basename="${tool_specified##*/}"
11965       if test "x$tool_basename" = "x$tool_specified"; then
11966         # A command without a complete path is provided, search $PATH.
11967         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11968 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11969         # Extract the first word of "$tool_basename", so it can be a program name with args.
11970 set dummy $tool_basename; ac_word=$2
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11972 $as_echo_n "checking for $ac_word... " >&6; }
11973 if ${ac_cv_path_EGREP+:} false; then :
11974   $as_echo_n "(cached) " >&6
11975 else
11976   case $EGREP in
11977   [\\/]* | ?:[\\/]*)
11978   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11979   ;;
11980   *)
11981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11982 for as_dir in $PATH
11983 do
11984   IFS=$as_save_IFS
11985   test -z "$as_dir" && as_dir=.
11986     for ac_exec_ext in '' $ac_executable_extensions; do
11987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11988     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11990     break 2
11991   fi
11992 done
11993   done
11994 IFS=$as_save_IFS
11995 
11996   ;;
11997 esac
11998 fi
11999 EGREP=$ac_cv_path_EGREP
12000 if test -n "$EGREP"; then
12001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12002 $as_echo "$EGREP" >&6; }
12003 else
12004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12005 $as_echo "no" >&6; }
12006 fi
12007 
12008 
12009         if test "x$EGREP" = x; then
12010           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12011         fi
12012       else
12013         # Otherwise we believe it is a complete path. Use it as it is.
12014         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12015 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12016         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12017 $as_echo_n "checking for EGREP... " >&6; }
12018         if test ! -x "$tool_specified"; then
12019           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12020 $as_echo "not found" >&6; }
12021           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12022         fi
12023         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12024 $as_echo "$tool_specified" >&6; }
12025       fi
12026     fi
12027   fi
12028 
12029 
12030   if test "x$EGREP" = x; then
12031     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12032   fi
12033 
12034 
12035 
12036 
12037   # Publish this variable in the help.
12038 
12039 
12040   if test "x$FGREP" = x; then
12041     # The variable is not set by user, try to locate tool using the code snippet
12042     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12043 $as_echo_n "checking for fgrep... " >&6; }
12044 if ${ac_cv_path_FGREP+:} false; then :
12045   $as_echo_n "(cached) " >&6
12046 else
12047   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12048    then ac_cv_path_FGREP="$GREP -F"
12049    else
12050      if test -z "$FGREP"; then
12051   ac_path_FGREP_found=false
12052   # Loop through the user's path and test for each of PROGNAME-LIST
12053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12054 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12055 do
12056   IFS=$as_save_IFS
12057   test -z "$as_dir" && as_dir=.
12058     for ac_prog in fgrep; do
12059     for ac_exec_ext in '' $ac_executable_extensions; do
12060       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12061       as_fn_executable_p "$ac_path_FGREP" || continue
12062 # Check for GNU ac_path_FGREP and select it if it is found.
12063   # Check for GNU $ac_path_FGREP
12064 case `"$ac_path_FGREP" --version 2>&1` in
12065 *GNU*)
12066   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12067 *)
12068   ac_count=0
12069   $as_echo_n 0123456789 >"conftest.in"
12070   while :
12071   do
12072     cat "conftest.in" "conftest.in" >"conftest.tmp"
12073     mv "conftest.tmp" "conftest.in"
12074     cp "conftest.in" "conftest.nl"
12075     $as_echo 'FGREP' >> "conftest.nl"
12076     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12077     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12078     as_fn_arith $ac_count + 1 && ac_count=$as_val
12079     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12080       # Best one so far, save it but keep looking for a better one
12081       ac_cv_path_FGREP="$ac_path_FGREP"
12082       ac_path_FGREP_max=$ac_count
12083     fi
12084     # 10*(2^10) chars as input seems more than enough
12085     test $ac_count -gt 10 && break
12086   done
12087   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12088 esac
12089 
12090       $ac_path_FGREP_found && break 3
12091     done
12092   done
12093   done
12094 IFS=$as_save_IFS
12095   if test -z "$ac_cv_path_FGREP"; then
12096     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12097   fi
12098 else
12099   ac_cv_path_FGREP=$FGREP
12100 fi
12101 
12102    fi
12103 fi
12104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12105 $as_echo "$ac_cv_path_FGREP" >&6; }
12106  FGREP="$ac_cv_path_FGREP"
12107 
12108 
12109   else
12110     # The variable is set, but is it from the command line or the environment?
12111 
12112     # Try to remove the string !FGREP! from our list.
12113     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12114     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12115       # If it failed, the variable was not from the command line. Ignore it,
12116       # but warn the user (except for BASH, which is always set by the calling BASH).
12117       if test "xFGREP" != xBASH; then
12118         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12119 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12120       fi
12121       # Try to locate tool using the code snippet
12122       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12123 $as_echo_n "checking for fgrep... " >&6; }
12124 if ${ac_cv_path_FGREP+:} false; then :
12125   $as_echo_n "(cached) " >&6
12126 else
12127   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12128    then ac_cv_path_FGREP="$GREP -F"
12129    else
12130      if test -z "$FGREP"; then
12131   ac_path_FGREP_found=false
12132   # Loop through the user's path and test for each of PROGNAME-LIST
12133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12134 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12135 do
12136   IFS=$as_save_IFS
12137   test -z "$as_dir" && as_dir=.
12138     for ac_prog in fgrep; do
12139     for ac_exec_ext in '' $ac_executable_extensions; do
12140       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12141       as_fn_executable_p "$ac_path_FGREP" || continue
12142 # Check for GNU ac_path_FGREP and select it if it is found.
12143   # Check for GNU $ac_path_FGREP
12144 case `"$ac_path_FGREP" --version 2>&1` in
12145 *GNU*)
12146   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12147 *)
12148   ac_count=0
12149   $as_echo_n 0123456789 >"conftest.in"
12150   while :
12151   do
12152     cat "conftest.in" "conftest.in" >"conftest.tmp"
12153     mv "conftest.tmp" "conftest.in"
12154     cp "conftest.in" "conftest.nl"
12155     $as_echo 'FGREP' >> "conftest.nl"
12156     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12157     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12158     as_fn_arith $ac_count + 1 && ac_count=$as_val
12159     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12160       # Best one so far, save it but keep looking for a better one
12161       ac_cv_path_FGREP="$ac_path_FGREP"
12162       ac_path_FGREP_max=$ac_count
12163     fi
12164     # 10*(2^10) chars as input seems more than enough
12165     test $ac_count -gt 10 && break
12166   done
12167   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12168 esac
12169 
12170       $ac_path_FGREP_found && break 3
12171     done
12172   done
12173   done
12174 IFS=$as_save_IFS
12175   if test -z "$ac_cv_path_FGREP"; then
12176     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12177   fi
12178 else
12179   ac_cv_path_FGREP=$FGREP
12180 fi
12181 
12182    fi
12183 fi
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12185 $as_echo "$ac_cv_path_FGREP" >&6; }
12186  FGREP="$ac_cv_path_FGREP"
12187 
12188 
12189     else
12190       # If it succeeded, then it was overridden by the user. We will use it
12191       # for the tool.
12192 
12193       # First remove it from the list of overridden variables, so we can test
12194       # for unknown variables in the end.
12195       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12196 
12197       # Check if the provided tool contains a complete path.
12198       tool_specified="$FGREP"
12199       tool_basename="${tool_specified##*/}"
12200       if test "x$tool_basename" = "x$tool_specified"; then
12201         # A command without a complete path is provided, search $PATH.
12202         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12203 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12204         # Extract the first word of "$tool_basename", so it can be a program name with args.
12205 set dummy $tool_basename; ac_word=$2
12206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12207 $as_echo_n "checking for $ac_word... " >&6; }
12208 if ${ac_cv_path_FGREP+:} false; then :
12209   $as_echo_n "(cached) " >&6
12210 else
12211   case $FGREP in
12212   [\\/]* | ?:[\\/]*)
12213   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12214   ;;
12215   *)
12216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12217 for as_dir in $PATH
12218 do
12219   IFS=$as_save_IFS
12220   test -z "$as_dir" && as_dir=.
12221     for ac_exec_ext in '' $ac_executable_extensions; do
12222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12223     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12225     break 2
12226   fi
12227 done
12228   done
12229 IFS=$as_save_IFS
12230 
12231   ;;
12232 esac
12233 fi
12234 FGREP=$ac_cv_path_FGREP
12235 if test -n "$FGREP"; then
12236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12237 $as_echo "$FGREP" >&6; }
12238 else
12239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12240 $as_echo "no" >&6; }
12241 fi
12242 
12243 
12244         if test "x$FGREP" = x; then
12245           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12246         fi
12247       else
12248         # Otherwise we believe it is a complete path. Use it as it is.
12249         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12250 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12252 $as_echo_n "checking for FGREP... " >&6; }
12253         if test ! -x "$tool_specified"; then
12254           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12255 $as_echo "not found" >&6; }
12256           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12257         fi
12258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12259 $as_echo "$tool_specified" >&6; }
12260       fi
12261     fi
12262   fi
12263 
12264 
12265   if test "x$FGREP" = x; then
12266     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12267   fi
12268 
12269 
12270 
12271 
12272   # Publish this variable in the help.
12273 
12274 
12275   if test "x$SED" = x; then
12276     # The variable is not set by user, try to locate tool using the code snippet
12277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12278 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12279 if ${ac_cv_path_SED+:} false; then :
12280   $as_echo_n "(cached) " >&6
12281 else
12282             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12283      for ac_i in 1 2 3 4 5 6 7; do
12284        ac_script="$ac_script$as_nl$ac_script"
12285      done
12286      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12287      { ac_script=; unset ac_script;}
12288      if test -z "$SED"; then
12289   ac_path_SED_found=false
12290   # Loop through the user's path and test for each of PROGNAME-LIST
12291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12292 for as_dir in $PATH
12293 do
12294   IFS=$as_save_IFS
12295   test -z "$as_dir" && as_dir=.
12296     for ac_prog in sed gsed; do
12297     for ac_exec_ext in '' $ac_executable_extensions; do
12298       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12299       as_fn_executable_p "$ac_path_SED" || continue
12300 # Check for GNU ac_path_SED and select it if it is found.
12301   # Check for GNU $ac_path_SED
12302 case `"$ac_path_SED" --version 2>&1` in
12303 *GNU*)
12304   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12305 *)
12306   ac_count=0
12307   $as_echo_n 0123456789 >"conftest.in"
12308   while :
12309   do
12310     cat "conftest.in" "conftest.in" >"conftest.tmp"
12311     mv "conftest.tmp" "conftest.in"
12312     cp "conftest.in" "conftest.nl"
12313     $as_echo '' >> "conftest.nl"
12314     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12315     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12316     as_fn_arith $ac_count + 1 && ac_count=$as_val
12317     if test $ac_count -gt ${ac_path_SED_max-0}; then
12318       # Best one so far, save it but keep looking for a better one
12319       ac_cv_path_SED="$ac_path_SED"
12320       ac_path_SED_max=$ac_count
12321     fi
12322     # 10*(2^10) chars as input seems more than enough
12323     test $ac_count -gt 10 && break
12324   done
12325   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12326 esac
12327 
12328       $ac_path_SED_found && break 3
12329     done
12330   done
12331   done
12332 IFS=$as_save_IFS
12333   if test -z "$ac_cv_path_SED"; then
12334     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12335   fi
12336 else
12337   ac_cv_path_SED=$SED
12338 fi
12339 
12340 fi
12341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12342 $as_echo "$ac_cv_path_SED" >&6; }
12343  SED="$ac_cv_path_SED"
12344   rm -f conftest.sed
12345 
12346   else
12347     # The variable is set, but is it from the command line or the environment?
12348 
12349     # Try to remove the string !SED! from our list.
12350     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12351     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12352       # If it failed, the variable was not from the command line. Ignore it,
12353       # but warn the user (except for BASH, which is always set by the calling BASH).
12354       if test "xSED" != xBASH; then
12355         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12356 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12357       fi
12358       # Try to locate tool using the code snippet
12359       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12360 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12361 if ${ac_cv_path_SED+:} false; then :
12362   $as_echo_n "(cached) " >&6
12363 else
12364             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12365      for ac_i in 1 2 3 4 5 6 7; do
12366        ac_script="$ac_script$as_nl$ac_script"
12367      done
12368      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12369      { ac_script=; unset ac_script;}
12370      if test -z "$SED"; then
12371   ac_path_SED_found=false
12372   # Loop through the user's path and test for each of PROGNAME-LIST
12373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12374 for as_dir in $PATH
12375 do
12376   IFS=$as_save_IFS
12377   test -z "$as_dir" && as_dir=.
12378     for ac_prog in sed gsed; do
12379     for ac_exec_ext in '' $ac_executable_extensions; do
12380       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12381       as_fn_executable_p "$ac_path_SED" || continue
12382 # Check for GNU ac_path_SED and select it if it is found.
12383   # Check for GNU $ac_path_SED
12384 case `"$ac_path_SED" --version 2>&1` in
12385 *GNU*)
12386   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12387 *)
12388   ac_count=0
12389   $as_echo_n 0123456789 >"conftest.in"
12390   while :
12391   do
12392     cat "conftest.in" "conftest.in" >"conftest.tmp"
12393     mv "conftest.tmp" "conftest.in"
12394     cp "conftest.in" "conftest.nl"
12395     $as_echo '' >> "conftest.nl"
12396     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12397     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12398     as_fn_arith $ac_count + 1 && ac_count=$as_val
12399     if test $ac_count -gt ${ac_path_SED_max-0}; then
12400       # Best one so far, save it but keep looking for a better one
12401       ac_cv_path_SED="$ac_path_SED"
12402       ac_path_SED_max=$ac_count
12403     fi
12404     # 10*(2^10) chars as input seems more than enough
12405     test $ac_count -gt 10 && break
12406   done
12407   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12408 esac
12409 
12410       $ac_path_SED_found && break 3
12411     done
12412   done
12413   done
12414 IFS=$as_save_IFS
12415   if test -z "$ac_cv_path_SED"; then
12416     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12417   fi
12418 else
12419   ac_cv_path_SED=$SED
12420 fi
12421 
12422 fi
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12424 $as_echo "$ac_cv_path_SED" >&6; }
12425  SED="$ac_cv_path_SED"
12426   rm -f conftest.sed
12427 
12428     else
12429       # If it succeeded, then it was overridden by the user. We will use it
12430       # for the tool.
12431 
12432       # First remove it from the list of overridden variables, so we can test
12433       # for unknown variables in the end.
12434       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12435 
12436       # Check if the provided tool contains a complete path.
12437       tool_specified="$SED"
12438       tool_basename="${tool_specified##*/}"
12439       if test "x$tool_basename" = "x$tool_specified"; then
12440         # A command without a complete path is provided, search $PATH.
12441         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12442 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12443         # Extract the first word of "$tool_basename", so it can be a program name with args.
12444 set dummy $tool_basename; ac_word=$2
12445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12446 $as_echo_n "checking for $ac_word... " >&6; }
12447 if ${ac_cv_path_SED+:} false; then :
12448   $as_echo_n "(cached) " >&6
12449 else
12450   case $SED in
12451   [\\/]* | ?:[\\/]*)
12452   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12453   ;;
12454   *)
12455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12456 for as_dir in $PATH
12457 do
12458   IFS=$as_save_IFS
12459   test -z "$as_dir" && as_dir=.
12460     for ac_exec_ext in '' $ac_executable_extensions; do
12461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12462     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12464     break 2
12465   fi
12466 done
12467   done
12468 IFS=$as_save_IFS
12469 
12470   ;;
12471 esac
12472 fi
12473 SED=$ac_cv_path_SED
12474 if test -n "$SED"; then
12475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12476 $as_echo "$SED" >&6; }
12477 else
12478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12479 $as_echo "no" >&6; }
12480 fi
12481 
12482 
12483         if test "x$SED" = x; then
12484           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12485         fi
12486       else
12487         # Otherwise we believe it is a complete path. Use it as it is.
12488         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12489 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12490         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12491 $as_echo_n "checking for SED... " >&6; }
12492         if test ! -x "$tool_specified"; then
12493           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12494 $as_echo "not found" >&6; }
12495           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12496         fi
12497         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12498 $as_echo "$tool_specified" >&6; }
12499       fi
12500     fi
12501   fi
12502 
12503 
12504   if test "x$SED" = x; then
12505     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12506   fi
12507 
12508 
12509 
12510   # Always force rm.
12511   RM="$RM -f"
12512 
12513   # pwd behaves differently on various platforms and some don't support the -L flag.
12514   # Always use the bash builtin pwd to get uniform behavior.
12515   THEPWDCMD=pwd
12516 
12517   # These are not required on all platforms
12518 
12519 
12520   # Publish this variable in the help.
12521 
12522 
12523   if test "x$CYGPATH" = x; then
12524     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
12572 
12573     # Try to remove the string !CYGPATH! from our list.
12574     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12575     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12576       # If it failed, the variable was not from the command line. Ignore it,
12577       # but warn the user (except for BASH, which is always set by the calling BASH).
12578       if test "xCYGPATH" != xBASH; then
12579         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12580 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12581       fi
12582       # Try to locate tool using the code snippet
12583       for ac_prog in cygpath
12584 do
12585   # Extract the first word of "$ac_prog", so it can be a program name with args.
12586 set dummy $ac_prog; 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   test -n "$CYGPATH" && break
12626 done
12627 
12628     else
12629       # If it succeeded, then it was overridden by the user. We will use it
12630       # for the tool.
12631 
12632       # First remove it from the list of overridden variables, so we can test
12633       # for unknown variables in the end.
12634       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12635 
12636       # Check if the provided tool contains a complete path.
12637       tool_specified="$CYGPATH"
12638       tool_basename="${tool_specified##*/}"
12639       if test "x$tool_basename" = "x$tool_specified"; then
12640         # A command without a complete path is provided, search $PATH.
12641         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12642 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12643         # Extract the first word of "$tool_basename", so it can be a program name with args.
12644 set dummy $tool_basename; ac_word=$2
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12646 $as_echo_n "checking for $ac_word... " >&6; }
12647 if ${ac_cv_path_CYGPATH+:} false; then :
12648   $as_echo_n "(cached) " >&6
12649 else
12650   case $CYGPATH in
12651   [\\/]* | ?:[\\/]*)
12652   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12653   ;;
12654   *)
12655   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656 for as_dir in $PATH
12657 do
12658   IFS=$as_save_IFS
12659   test -z "$as_dir" && as_dir=.
12660     for ac_exec_ext in '' $ac_executable_extensions; do
12661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12662     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12664     break 2
12665   fi
12666 done
12667   done
12668 IFS=$as_save_IFS
12669 
12670   ;;
12671 esac
12672 fi
12673 CYGPATH=$ac_cv_path_CYGPATH
12674 if test -n "$CYGPATH"; then
12675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12676 $as_echo "$CYGPATH" >&6; }
12677 else
12678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679 $as_echo "no" >&6; }
12680 fi
12681 
12682 
12683         if test "x$CYGPATH" = x; then
12684           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12685         fi
12686       else
12687         # Otherwise we believe it is a complete path. Use it as it is.
12688         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12689 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12690         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12691 $as_echo_n "checking for CYGPATH... " >&6; }
12692         if test ! -x "$tool_specified"; then
12693           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12694 $as_echo "not found" >&6; }
12695           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12696         fi
12697         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12698 $as_echo "$tool_specified" >&6; }
12699       fi
12700     fi
12701   fi
12702 
12703 
12704 
12705 
12706   # Publish this variable in the help.
12707 
12708 
12709   if test "x$READLINK" = x; then
12710     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
12758 
12759     # Try to remove the string !READLINK! from our list.
12760     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12761     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12762       # If it failed, the variable was not from the command line. Ignore it,
12763       # but warn the user (except for BASH, which is always set by the calling BASH).
12764       if test "xREADLINK" != xBASH; then
12765         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12766 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12767       fi
12768       # Try to locate tool using the code snippet
12769       for ac_prog in greadlink readlink
12770 do
12771   # Extract the first word of "$ac_prog", so it can be a program name with args.
12772 set dummy $ac_prog; 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   test -n "$READLINK" && break
12812 done
12813 
12814     else
12815       # If it succeeded, then it was overridden by the user. We will use it
12816       # for the tool.
12817 
12818       # First remove it from the list of overridden variables, so we can test
12819       # for unknown variables in the end.
12820       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12821 
12822       # Check if the provided tool contains a complete path.
12823       tool_specified="$READLINK"
12824       tool_basename="${tool_specified##*/}"
12825       if test "x$tool_basename" = "x$tool_specified"; then
12826         # A command without a complete path is provided, search $PATH.
12827         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12828 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12829         # Extract the first word of "$tool_basename", so it can be a program name with args.
12830 set dummy $tool_basename; ac_word=$2
12831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12832 $as_echo_n "checking for $ac_word... " >&6; }
12833 if ${ac_cv_path_READLINK+:} false; then :
12834   $as_echo_n "(cached) " >&6
12835 else
12836   case $READLINK in
12837   [\\/]* | ?:[\\/]*)
12838   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12839   ;;
12840   *)
12841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12842 for as_dir in $PATH
12843 do
12844   IFS=$as_save_IFS
12845   test -z "$as_dir" && as_dir=.
12846     for ac_exec_ext in '' $ac_executable_extensions; do
12847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12848     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12850     break 2
12851   fi
12852 done
12853   done
12854 IFS=$as_save_IFS
12855 
12856   ;;
12857 esac
12858 fi
12859 READLINK=$ac_cv_path_READLINK
12860 if test -n "$READLINK"; then
12861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12862 $as_echo "$READLINK" >&6; }
12863 else
12864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12865 $as_echo "no" >&6; }
12866 fi
12867 
12868 
12869         if test "x$READLINK" = x; then
12870           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12871         fi
12872       else
12873         # Otherwise we believe it is a complete path. Use it as it is.
12874         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12875 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12876         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12877 $as_echo_n "checking for READLINK... " >&6; }
12878         if test ! -x "$tool_specified"; then
12879           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12880 $as_echo "not found" >&6; }
12881           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12882         fi
12883         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12884 $as_echo "$tool_specified" >&6; }
12885       fi
12886     fi
12887   fi
12888 
12889 
12890 
12891 
12892   # Publish this variable in the help.
12893 
12894 
12895   if test "x$DF" = x; then
12896     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
12944 
12945     # Try to remove the string !DF! from our list.
12946     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12947     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12948       # If it failed, the variable was not from the command line. Ignore it,
12949       # but warn the user (except for BASH, which is always set by the calling BASH).
12950       if test "xDF" != xBASH; then
12951         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12952 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12953       fi
12954       # Try to locate tool using the code snippet
12955       for ac_prog in df
12956 do
12957   # Extract the first word of "$ac_prog", so it can be a program name with args.
12958 set dummy $ac_prog; 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   test -n "$DF" && break
12998 done
12999 
13000     else
13001       # If it succeeded, then it was overridden by the user. We will use it
13002       # for the tool.
13003 
13004       # First remove it from the list of overridden variables, so we can test
13005       # for unknown variables in the end.
13006       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13007 
13008       # Check if the provided tool contains a complete path.
13009       tool_specified="$DF"
13010       tool_basename="${tool_specified##*/}"
13011       if test "x$tool_basename" = "x$tool_specified"; then
13012         # A command without a complete path is provided, search $PATH.
13013         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13014 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13015         # Extract the first word of "$tool_basename", so it can be a program name with args.
13016 set dummy $tool_basename; ac_word=$2
13017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13018 $as_echo_n "checking for $ac_word... " >&6; }
13019 if ${ac_cv_path_DF+:} false; then :
13020   $as_echo_n "(cached) " >&6
13021 else
13022   case $DF in
13023   [\\/]* | ?:[\\/]*)
13024   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13025   ;;
13026   *)
13027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13028 for as_dir in $PATH
13029 do
13030   IFS=$as_save_IFS
13031   test -z "$as_dir" && as_dir=.
13032     for ac_exec_ext in '' $ac_executable_extensions; do
13033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13034     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13036     break 2
13037   fi
13038 done
13039   done
13040 IFS=$as_save_IFS
13041 
13042   ;;
13043 esac
13044 fi
13045 DF=$ac_cv_path_DF
13046 if test -n "$DF"; then
13047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13048 $as_echo "$DF" >&6; }
13049 else
13050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13051 $as_echo "no" >&6; }
13052 fi
13053 
13054 
13055         if test "x$DF" = x; then
13056           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13057         fi
13058       else
13059         # Otherwise we believe it is a complete path. Use it as it is.
13060         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13061 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13062         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13063 $as_echo_n "checking for DF... " >&6; }
13064         if test ! -x "$tool_specified"; then
13065           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13066 $as_echo "not found" >&6; }
13067           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13068         fi
13069         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13070 $as_echo "$tool_specified" >&6; }
13071       fi
13072     fi
13073   fi
13074 
13075 
13076 
13077 
13078   # Publish this variable in the help.
13079 
13080 
13081   if test "x$SETFILE" = x; then
13082     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
13130 
13131     # Try to remove the string !SETFILE! from our list.
13132     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13133     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13134       # If it failed, the variable was not from the command line. Ignore it,
13135       # but warn the user (except for BASH, which is always set by the calling BASH).
13136       if test "xSETFILE" != xBASH; then
13137         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13138 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13139       fi
13140       # Try to locate tool using the code snippet
13141       for ac_prog in SetFile
13142 do
13143   # Extract the first word of "$ac_prog", so it can be a program name with args.
13144 set dummy $ac_prog; 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   test -n "$SETFILE" && break
13184 done
13185 
13186     else
13187       # If it succeeded, then it was overridden by the user. We will use it
13188       # for the tool.
13189 
13190       # First remove it from the list of overridden variables, so we can test
13191       # for unknown variables in the end.
13192       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13193 
13194       # Check if the provided tool contains a complete path.
13195       tool_specified="$SETFILE"
13196       tool_basename="${tool_specified##*/}"
13197       if test "x$tool_basename" = "x$tool_specified"; then
13198         # A command without a complete path is provided, search $PATH.
13199         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13200 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13201         # Extract the first word of "$tool_basename", so it can be a program name with args.
13202 set dummy $tool_basename; ac_word=$2
13203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13204 $as_echo_n "checking for $ac_word... " >&6; }
13205 if ${ac_cv_path_SETFILE+:} false; then :
13206   $as_echo_n "(cached) " >&6
13207 else
13208   case $SETFILE in
13209   [\\/]* | ?:[\\/]*)
13210   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13211   ;;
13212   *)
13213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13214 for as_dir in $PATH
13215 do
13216   IFS=$as_save_IFS
13217   test -z "$as_dir" && as_dir=.
13218     for ac_exec_ext in '' $ac_executable_extensions; do
13219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13220     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13222     break 2
13223   fi
13224 done
13225   done
13226 IFS=$as_save_IFS
13227 
13228   ;;
13229 esac
13230 fi
13231 SETFILE=$ac_cv_path_SETFILE
13232 if test -n "$SETFILE"; then
13233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13234 $as_echo "$SETFILE" >&6; }
13235 else
13236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13237 $as_echo "no" >&6; }
13238 fi
13239 
13240 
13241         if test "x$SETFILE" = x; then
13242           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13243         fi
13244       else
13245         # Otherwise we believe it is a complete path. Use it as it is.
13246         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13247 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13248         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13249 $as_echo_n "checking for SETFILE... " >&6; }
13250         if test ! -x "$tool_specified"; then
13251           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13252 $as_echo "not found" >&6; }
13253           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13254         fi
13255         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13256 $as_echo "$tool_specified" >&6; }
13257       fi
13258     fi
13259   fi
13260 
13261 
13262 
13263 
13264   # Publish this variable in the help.
13265 
13266 
13267   if test "x$CPIO" = x; then
13268     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
13316 
13317     # Try to remove the string !CPIO! from our list.
13318     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13319     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13320       # If it failed, the variable was not from the command line. Ignore it,
13321       # but warn the user (except for BASH, which is always set by the calling BASH).
13322       if test "xCPIO" != xBASH; then
13323         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13324 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13325       fi
13326       # Try to locate tool using the code snippet
13327       for ac_prog in cpio bsdcpio
13328 do
13329   # Extract the first word of "$ac_prog", so it can be a program name with args.
13330 set dummy $ac_prog; 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   test -n "$CPIO" && break
13370 done
13371 
13372     else
13373       # If it succeeded, then it was overridden by the user. We will use it
13374       # for the tool.
13375 
13376       # First remove it from the list of overridden variables, so we can test
13377       # for unknown variables in the end.
13378       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13379 
13380       # Check if the provided tool contains a complete path.
13381       tool_specified="$CPIO"
13382       tool_basename="${tool_specified##*/}"
13383       if test "x$tool_basename" = "x$tool_specified"; then
13384         # A command without a complete path is provided, search $PATH.
13385         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13386 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13387         # Extract the first word of "$tool_basename", so it can be a program name with args.
13388 set dummy $tool_basename; ac_word=$2
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13390 $as_echo_n "checking for $ac_word... " >&6; }
13391 if ${ac_cv_path_CPIO+:} false; then :
13392   $as_echo_n "(cached) " >&6
13393 else
13394   case $CPIO in
13395   [\\/]* | ?:[\\/]*)
13396   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13397   ;;
13398   *)
13399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13400 for as_dir in $PATH
13401 do
13402   IFS=$as_save_IFS
13403   test -z "$as_dir" && as_dir=.
13404     for ac_exec_ext in '' $ac_executable_extensions; do
13405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13406     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13408     break 2
13409   fi
13410 done
13411   done
13412 IFS=$as_save_IFS
13413 
13414   ;;
13415 esac
13416 fi
13417 CPIO=$ac_cv_path_CPIO
13418 if test -n "$CPIO"; then
13419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13420 $as_echo "$CPIO" >&6; }
13421 else
13422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13423 $as_echo "no" >&6; }
13424 fi
13425 
13426 
13427         if test "x$CPIO" = x; then
13428           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13429         fi
13430       else
13431         # Otherwise we believe it is a complete path. Use it as it is.
13432         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13433 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13434         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13435 $as_echo_n "checking for CPIO... " >&6; }
13436         if test ! -x "$tool_specified"; then
13437           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13438 $as_echo "not found" >&6; }
13439           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13440         fi
13441         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13442 $as_echo "$tool_specified" >&6; }
13443       fi
13444     fi
13445   fi
13446 
13447 
13448 
13449 
13450 # Now we can determine OpenJDK build and target platforms. This is required to
13451 # have early on.
13452 # Make sure we can run config.sub.
13453 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13454   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13455 
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13457 $as_echo_n "checking build system type... " >&6; }
13458 if ${ac_cv_build+:} false; then :
13459   $as_echo_n "(cached) " >&6
13460 else
13461   ac_build_alias=$build_alias
13462 test "x$ac_build_alias" = x &&
13463   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13464 test "x$ac_build_alias" = x &&
13465   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13466 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13467   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13468 
13469 fi
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13471 $as_echo "$ac_cv_build" >&6; }
13472 case $ac_cv_build in
13473 *-*-*) ;;
13474 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13475 esac
13476 build=$ac_cv_build
13477 ac_save_IFS=$IFS; IFS='-'
13478 set x $ac_cv_build
13479 shift
13480 build_cpu=$1
13481 build_vendor=$2
13482 shift; shift
13483 # Remember, the first character of IFS is used to create $*,
13484 # except with old shells:
13485 build_os=$*
13486 IFS=$ac_save_IFS
13487 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13488 
13489 
13490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13491 $as_echo_n "checking host system type... " >&6; }
13492 if ${ac_cv_host+:} false; then :
13493   $as_echo_n "(cached) " >&6
13494 else
13495   if test "x$host_alias" = x; then
13496   ac_cv_host=$ac_cv_build
13497 else
13498   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13499     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13500 fi
13501 
13502 fi
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13504 $as_echo "$ac_cv_host" >&6; }
13505 case $ac_cv_host in
13506 *-*-*) ;;
13507 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13508 esac
13509 host=$ac_cv_host
13510 ac_save_IFS=$IFS; IFS='-'
13511 set x $ac_cv_host
13512 shift
13513 host_cpu=$1
13514 host_vendor=$2
13515 shift; shift
13516 # Remember, the first character of IFS is used to create $*,
13517 # except with old shells:
13518 host_os=$*
13519 IFS=$ac_save_IFS
13520 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13521 
13522 
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13524 $as_echo_n "checking target system type... " >&6; }
13525 if ${ac_cv_target+:} false; then :
13526   $as_echo_n "(cached) " >&6
13527 else
13528   if test "x$target_alias" = x; then
13529   ac_cv_target=$ac_cv_host
13530 else
13531   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13532     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13533 fi
13534 
13535 fi
13536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13537 $as_echo "$ac_cv_target" >&6; }
13538 case $ac_cv_target in
13539 *-*-*) ;;
13540 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13541 esac
13542 target=$ac_cv_target
13543 ac_save_IFS=$IFS; IFS='-'
13544 set x $ac_cv_target
13545 shift
13546 target_cpu=$1
13547 target_vendor=$2
13548 shift; shift
13549 # Remember, the first character of IFS is used to create $*,
13550 # except with old shells:
13551 target_os=$*
13552 IFS=$ac_save_IFS
13553 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13554 
13555 
13556 # The aliases save the names the user supplied, while $host etc.
13557 # will get canonicalized.
13558 test -n "$target_alias" &&
13559   test "$program_prefix$program_suffix$program_transform_name" = \
13560     NONENONEs,x,x, &&
13561   program_prefix=${target_alias}-
13562 
13563   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13564   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13565   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13566   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13567   # to use the configure naming style.
13568 
13569 
13570 
13571 
13572 
13573   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13574   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13575   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13576   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13577   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13578   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13579 
13580 
13581 
13582   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13583 
13584   case "$build_os" in
13585     *linux*)
13586       VAR_OS=linux
13587       VAR_OS_TYPE=unix
13588       ;;
13589     *solaris*)
13590       VAR_OS=solaris
13591       VAR_OS_TYPE=unix
13592       ;;
13593     *darwin*)
13594       VAR_OS=macosx
13595       VAR_OS_TYPE=unix
13596       ;;
13597     *bsd*)
13598       VAR_OS=bsd
13599       VAR_OS_TYPE=unix
13600       ;;
13601     *cygwin*)
13602       VAR_OS=windows
13603       VAR_OS_ENV=windows.cygwin
13604       ;;
13605     *mingw*)
13606       VAR_OS=windows
13607       VAR_OS_ENV=windows.msys
13608       ;;
13609     *aix*)
13610       VAR_OS=aix
13611       VAR_OS_TYPE=unix
13612       ;;
13613     *)
13614       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13615       ;;
13616   esac
13617 
13618 
13619   # First argument is the cpu name from the trip/quad
13620   case "$build_cpu" in
13621     x86_64)
13622       VAR_CPU=x86_64
13623       VAR_CPU_ARCH=x86
13624       VAR_CPU_BITS=64
13625       VAR_CPU_ENDIAN=little
13626       ;;
13627     i?86)
13628       VAR_CPU=x86
13629       VAR_CPU_ARCH=x86
13630       VAR_CPU_BITS=32
13631       VAR_CPU_ENDIAN=little
13632       ;;
13633     arm*)
13634       VAR_CPU=arm
13635       VAR_CPU_ARCH=arm
13636       VAR_CPU_BITS=32
13637       VAR_CPU_ENDIAN=little
13638       ;;
13639     powerpc)
13640       VAR_CPU=ppc
13641       VAR_CPU_ARCH=ppc
13642       VAR_CPU_BITS=32
13643       VAR_CPU_ENDIAN=big
13644       ;;
13645     powerpc64)
13646       VAR_CPU=ppc64
13647       VAR_CPU_ARCH=ppc
13648       VAR_CPU_BITS=64
13649       VAR_CPU_ENDIAN=big
13650       ;;
13651     powerpc64le)
13652       VAR_CPU=ppc64
13653       VAR_CPU_ARCH=ppc
13654       VAR_CPU_BITS=64
13655       VAR_CPU_ENDIAN=little
13656       ;;
13657     s390)
13658       VAR_CPU=s390
13659       VAR_CPU_ARCH=s390
13660       VAR_CPU_BITS=32
13661       VAR_CPU_ENDIAN=big
13662       ;;
13663     s390x)
13664       VAR_CPU=s390x
13665       VAR_CPU_ARCH=s390
13666       VAR_CPU_BITS=64
13667       VAR_CPU_ENDIAN=big
13668       ;;
13669     sparc)
13670       VAR_CPU=sparc
13671       VAR_CPU_ARCH=sparc
13672       VAR_CPU_BITS=32
13673       VAR_CPU_ENDIAN=big
13674       ;;
13675     sparcv9|sparc64)
13676       VAR_CPU=sparcv9
13677       VAR_CPU_ARCH=sparc
13678       VAR_CPU_BITS=64
13679       VAR_CPU_ENDIAN=big
13680       ;;
13681     *)
13682       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13683       ;;
13684   esac
13685 
13686   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13687   OPENJDK_BUILD_OS="$VAR_OS"
13688   if test "x$VAR_OS_TYPE" != x; then
13689     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13690   else
13691     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13692   fi
13693   if test "x$VAR_OS_ENV" != x; then
13694     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13695   else
13696     OPENJDK_BUILD_OS_ENV="$VAR_OS"
13697   fi
13698   OPENJDK_BUILD_CPU="$VAR_CPU"
13699   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13700   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13701   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13702 
13703 
13704 
13705 
13706 
13707 
13708 
13709 
13710   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13711 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13713 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13714 
13715   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13716 
13717   case "$host_os" in
13718     *linux*)
13719       VAR_OS=linux
13720       VAR_OS_TYPE=unix
13721       ;;
13722     *solaris*)
13723       VAR_OS=solaris
13724       VAR_OS_TYPE=unix
13725       ;;
13726     *darwin*)
13727       VAR_OS=macosx
13728       VAR_OS_TYPE=unix
13729       ;;
13730     *bsd*)
13731       VAR_OS=bsd
13732       VAR_OS_TYPE=unix
13733       ;;
13734     *cygwin*)
13735       VAR_OS=windows
13736       VAR_OS_ENV=windows.cygwin
13737       ;;
13738     *mingw*)
13739       VAR_OS=windows
13740       VAR_OS_ENV=windows.msys
13741       ;;
13742     *aix*)
13743       VAR_OS=aix
13744       VAR_OS_TYPE=unix
13745       ;;
13746     *)
13747       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13748       ;;
13749   esac
13750 
13751 
13752   # First argument is the cpu name from the trip/quad
13753   case "$host_cpu" in
13754     x86_64)
13755       VAR_CPU=x86_64
13756       VAR_CPU_ARCH=x86
13757       VAR_CPU_BITS=64
13758       VAR_CPU_ENDIAN=little
13759       ;;
13760     i?86)
13761       VAR_CPU=x86
13762       VAR_CPU_ARCH=x86
13763       VAR_CPU_BITS=32
13764       VAR_CPU_ENDIAN=little
13765       ;;
13766     arm*)
13767       VAR_CPU=arm
13768       VAR_CPU_ARCH=arm
13769       VAR_CPU_BITS=32
13770       VAR_CPU_ENDIAN=little
13771       ;;
13772     powerpc)
13773       VAR_CPU=ppc
13774       VAR_CPU_ARCH=ppc
13775       VAR_CPU_BITS=32
13776       VAR_CPU_ENDIAN=big
13777       ;;
13778     powerpc64)
13779       VAR_CPU=ppc64
13780       VAR_CPU_ARCH=ppc
13781       VAR_CPU_BITS=64
13782       VAR_CPU_ENDIAN=big
13783       ;;
13784     powerpc64le)
13785       VAR_CPU=ppc64
13786       VAR_CPU_ARCH=ppc
13787       VAR_CPU_BITS=64
13788       VAR_CPU_ENDIAN=little
13789       ;;
13790     s390)
13791       VAR_CPU=s390
13792       VAR_CPU_ARCH=s390
13793       VAR_CPU_BITS=32
13794       VAR_CPU_ENDIAN=big
13795       ;;
13796     s390x)
13797       VAR_CPU=s390x
13798       VAR_CPU_ARCH=s390
13799       VAR_CPU_BITS=64
13800       VAR_CPU_ENDIAN=big
13801       ;;
13802     sparc)
13803       VAR_CPU=sparc
13804       VAR_CPU_ARCH=sparc
13805       VAR_CPU_BITS=32
13806       VAR_CPU_ENDIAN=big
13807       ;;
13808     sparcv9|sparc64)
13809       VAR_CPU=sparcv9
13810       VAR_CPU_ARCH=sparc
13811       VAR_CPU_BITS=64
13812       VAR_CPU_ENDIAN=big
13813       ;;
13814     *)
13815       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13816       ;;
13817   esac
13818 
13819   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13820   OPENJDK_TARGET_OS="$VAR_OS"
13821   if test "x$VAR_OS_TYPE" != x; then
13822     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13823   else
13824     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13825   fi
13826   if test "x$VAR_OS_ENV" != x; then
13827     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13828   else
13829     OPENJDK_TARGET_OS_ENV="$VAR_OS"
13830   fi
13831   OPENJDK_TARGET_CPU="$VAR_CPU"
13832   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13833   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13834   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13835 
13836 
13837 
13838 
13839 
13840 
13841 
13842 
13843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13844 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13846 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13847 
13848 
13849 
13850 # Check whether --with-target-bits was given.
13851 if test "${with_target_bits+set}" = set; then :
13852   withval=$with_target_bits;
13853 fi
13854 
13855 
13856   # We have three types of compiles:
13857   # native  == normal compilation, target system == build system
13858   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13859   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13860   #
13861   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13862     # We're doing a proper cross-compilation
13863     COMPILE_TYPE="cross"
13864   else
13865     COMPILE_TYPE="native"
13866   fi
13867 
13868   if test "x$with_target_bits" != x; then
13869     if test "x$COMPILE_TYPE" = "xcross"; then
13870       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13871     fi
13872 
13873     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13874       # A reduced build is requested
13875       COMPILE_TYPE="reduced"
13876       OPENJDK_TARGET_CPU_BITS=32
13877       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13878         OPENJDK_TARGET_CPU=x86
13879       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13880         OPENJDK_TARGET_CPU=sparc
13881       else
13882         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13883       fi
13884     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13885       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
13886     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13887       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13888 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13889     else
13890       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13891     fi
13892   fi
13893 
13894 
13895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13896 $as_echo_n "checking compilation type... " >&6; }
13897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13898 $as_echo "$COMPILE_TYPE" >&6; }
13899 
13900 
13901   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13902     REQUIRED_OS_NAME=SunOS
13903     REQUIRED_OS_VERSION=5.10
13904   fi
13905   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13906     REQUIRED_OS_NAME=Linux
13907     REQUIRED_OS_VERSION=2.6
13908   fi
13909   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13910     REQUIRED_OS_NAME=Windows
13911     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13912       REQUIRED_OS_VERSION=5.2
13913     else
13914       REQUIRED_OS_VERSION=5.1
13915     fi
13916   fi
13917   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13918     REQUIRED_OS_NAME=Darwin
13919     REQUIRED_OS_VERSION=11.2
13920   fi
13921 
13922 
13923 
13924 
13925 
13926   # Also store the legacy naming of the cpu.
13927   # Ie i586 and amd64 instead of x86 and x86_64
13928   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13929   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13930     OPENJDK_TARGET_CPU_LEGACY="i586"
13931   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13932     # On all platforms except MacOSX replace x86_64 with amd64.
13933     OPENJDK_TARGET_CPU_LEGACY="amd64"
13934   fi
13935 
13936 
13937   # And the second legacy naming of the cpu.
13938   # Ie i386 and amd64 instead of x86 and x86_64.
13939   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13940   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13941     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13942   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13943     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13944   fi
13945 
13946 
13947   # This is the name of the cpu (but using i386 and amd64 instead of
13948   # x86 and x86_64, respectively), preceeded by a /, to be used when
13949   # locating libraries. On macosx, it's empty, though.
13950   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13951   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13952     OPENJDK_TARGET_CPU_LIBDIR=""
13953   fi
13954 
13955 
13956   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13957   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13958   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13959   OPENJDK_TARGET_CPU_ISADIR=""
13960   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13961     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13962       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13963     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13964       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13965     fi
13966   fi
13967 
13968 
13969   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13970   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13971   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13972     # On linux only, we replace x86 with i386.
13973     OPENJDK_TARGET_CPU_OSARCH="i386"
13974   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13975     # On all platforms except macosx, we replace x86_64 with amd64.
13976     OPENJDK_TARGET_CPU_OSARCH="amd64"
13977   fi
13978 
13979 
13980   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13981   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13982     OPENJDK_TARGET_CPU_JLI="i386"
13983   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13984     # On all platforms except macosx, we replace x86_64 with amd64.
13985     OPENJDK_TARGET_CPU_JLI="amd64"
13986   fi
13987   # Now setup the -D flags for building libjli.
13988   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13989   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13990     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13991       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13992     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13993       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13994     fi
13995   fi
13996 
13997 
13998   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13999       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14000   else
14001       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14002   fi
14003 
14004 
14005   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14006     A_LP64="LP64:="
14007     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14008     # unpack200.exe
14009     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14010       ADD_LP64="-D_LP64=1"
14011     fi
14012   fi
14013   LP64=$A_LP64
14014 
14015 
14016   if test "x$COMPILE_TYPE" = "xcross"; then
14017     # FIXME: ... or should this include reduced builds..?
14018     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14019   else
14020     DEFINE_CROSS_COMPILE_ARCH=""
14021   fi
14022 
14023 
14024   # ZERO_ARCHDEF is used to enable architecture-specific code
14025   case "${OPENJDK_TARGET_CPU}" in
14026     ppc)     ZERO_ARCHDEF=PPC32 ;;
14027     ppc64)   ZERO_ARCHDEF=PPC64 ;;
14028     s390*)   ZERO_ARCHDEF=S390  ;;
14029     sparc*)  ZERO_ARCHDEF=SPARC ;;
14030     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14031     x86)     ZERO_ARCHDEF=IA32  ;;
14032     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14033   esac
14034 
14035 
14036 
14037 
14038 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14039 
14040   # Save the current directory this script was started from
14041   CURDIR="$PWD"
14042 
14043   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14044     PATH_SEP=";"
14045 
14046   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14047   if test $SRC_ROOT_LENGTH -gt 100; then
14048     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14049   fi
14050 
14051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14053 $as_echo_n "checking cygwin release... " >&6; }
14054     CYGWIN_VERSION=`$UNAME -r`
14055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14056 $as_echo "$CYGWIN_VERSION" >&6; }
14057     WINDOWS_ENV_VENDOR='cygwin'
14058     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14059 
14060     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14061     if test "x$CYGWIN_VERSION_OK" = x; then
14062       { $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
14063 $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;}
14064       as_fn_error $? "Cannot continue" "$LINENO" 5
14065     fi
14066     if test "x$CYGPATH" = x; then
14067       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14068     fi
14069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14070 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14071     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14072     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14073     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14074     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14075     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14076 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14077     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14078     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14079     if test "x$test_cygdrive_prefix" = x; then
14080       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14081     fi
14082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14084 $as_echo_n "checking msys release... " >&6; }
14085     MSYS_VERSION=`$UNAME -r`
14086     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14087 $as_echo "$MSYS_VERSION" >&6; }
14088 
14089     WINDOWS_ENV_VENDOR='msys'
14090     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14091 
14092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14093 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14094     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14095     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14096 
14097   windows_path="$MSYS_ROOT_PATH"
14098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14099     unix_path=`$CYGPATH -u "$windows_path"`
14100     MSYS_ROOT_PATH="$unix_path"
14101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14102     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14103     MSYS_ROOT_PATH="$unix_path"
14104   fi
14105 
14106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14107 $as_echo "$MSYS_ROOT_PATH" >&6; }
14108     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14109   else
14110     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14111   fi
14112 
14113   # Test if windows or unix (cygwin/msys) find is first in path.
14114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14115 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14116   FIND_BINARY_OUTPUT=`find --version 2>&1`
14117   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14118     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14119 $as_echo "unix style" >&6; }
14120   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14121     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14122 $as_echo "Windows" >&6; }
14123     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14124 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14125     { $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
14126 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14127     as_fn_error $? "Cannot continue" "$LINENO" 5
14128   else
14129     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14130 $as_echo "unknown" >&6; }
14131     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14132 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14133   fi
14134 
14135   else
14136     PATH_SEP=":"
14137   fi
14138 
14139 
14140   # We get the top-level directory from the supporting wrappers.
14141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14142 $as_echo_n "checking for top-level directory... " >&6; }
14143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14144 $as_echo "$TOPDIR" >&6; }
14145 
14146 
14147   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14148 
14149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14150 
14151   # Input might be given as Windows format, start by converting to
14152   # unix format.
14153   path="$CURDIR"
14154   new_path=`$CYGPATH -u "$path"`
14155 
14156   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14157   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14158   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14159   # "foo.exe" is OK but "foo" is an error.
14160   #
14161   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14162   # It is also a way to make sure we got the proper file name for the real test later on.
14163   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14164   if test "x$test_shortpath" = x; then
14165     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14166 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14167     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14168   fi
14169 
14170   # Call helper function which possibly converts this using DOS-style short mode.
14171   # If so, the updated path is stored in $new_path.
14172 
14173   input_path="$new_path"
14174   # Check if we need to convert this using DOS-style short mode. If the path
14175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14176   # take no chances and rewrite it.
14177   # Note: m4 eats our [], so we need to use [ and ] instead.
14178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14179   if test "x$has_forbidden_chars" != x; then
14180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14181     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14182     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14183     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14184       # Going to short mode and back again did indeed matter. Since short mode is
14185       # case insensitive, let's make it lowercase to improve readability.
14186       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14187       # Now convert it back to Unix-stile (cygpath)
14188       input_path=`$CYGPATH -u "$shortmode_path"`
14189       new_path="$input_path"
14190     fi
14191   fi
14192 
14193   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14194   if test "x$test_cygdrive_prefix" = x; then
14195     # As a simple fix, exclude /usr/bin since it's not a real path.
14196     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14197       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14198       # a path prefixed by /cygdrive for fixpath to work.
14199       new_path="$CYGWIN_ROOT_PATH$input_path"
14200     fi
14201   fi
14202 
14203 
14204   if test "x$path" != "x$new_path"; then
14205     CURDIR="$new_path"
14206     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14207 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14208   fi
14209 
14210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14211 
14212   path="$CURDIR"
14213   has_colon=`$ECHO $path | $GREP ^.:`
14214   new_path="$path"
14215   if test "x$has_colon" = x; then
14216     # Not in mixed or Windows style, start by that.
14217     new_path=`cmd //c echo $path`
14218   fi
14219 
14220 
14221   input_path="$new_path"
14222   # Check if we need to convert this using DOS-style short mode. If the path
14223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14224   # take no chances and rewrite it.
14225   # Note: m4 eats our [], so we need to use [ and ] instead.
14226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14227   if test "x$has_forbidden_chars" != x; then
14228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14229     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230   fi
14231 
14232 
14233   windows_path="$new_path"
14234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14235     unix_path=`$CYGPATH -u "$windows_path"`
14236     new_path="$unix_path"
14237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14239     new_path="$unix_path"
14240   fi
14241 
14242   if test "x$path" != "x$new_path"; then
14243     CURDIR="$new_path"
14244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14245 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14246   fi
14247 
14248   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14249   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14250 
14251   else
14252     # We're on a unix platform. Hooray! :)
14253     path="$CURDIR"
14254     has_space=`$ECHO "$path" | $GREP " "`
14255     if test "x$has_space" != x; then
14256       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14257 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14258       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14259     fi
14260 
14261     # Use eval to expand a potential ~
14262     eval path="$path"
14263     if test ! -f "$path" && test ! -d "$path"; then
14264       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14265     fi
14266 
14267     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14268   fi
14269 
14270 
14271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14272 
14273   # Input might be given as Windows format, start by converting to
14274   # unix format.
14275   path="$TOPDIR"
14276   new_path=`$CYGPATH -u "$path"`
14277 
14278   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14279   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14280   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14281   # "foo.exe" is OK but "foo" is an error.
14282   #
14283   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14284   # It is also a way to make sure we got the proper file name for the real test later on.
14285   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14286   if test "x$test_shortpath" = x; then
14287     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14288 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14289     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14290   fi
14291 
14292   # Call helper function which possibly converts this using DOS-style short mode.
14293   # If so, the updated path is stored in $new_path.
14294 
14295   input_path="$new_path"
14296   # Check if we need to convert this using DOS-style short mode. If the path
14297   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14298   # take no chances and rewrite it.
14299   # Note: m4 eats our [], so we need to use [ and ] instead.
14300   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14301   if test "x$has_forbidden_chars" != x; then
14302     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14303     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14304     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14305     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14306       # Going to short mode and back again did indeed matter. Since short mode is
14307       # case insensitive, let's make it lowercase to improve readability.
14308       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14309       # Now convert it back to Unix-stile (cygpath)
14310       input_path=`$CYGPATH -u "$shortmode_path"`
14311       new_path="$input_path"
14312     fi
14313   fi
14314 
14315   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14316   if test "x$test_cygdrive_prefix" = x; then
14317     # As a simple fix, exclude /usr/bin since it's not a real path.
14318     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14319       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14320       # a path prefixed by /cygdrive for fixpath to work.
14321       new_path="$CYGWIN_ROOT_PATH$input_path"
14322     fi
14323   fi
14324 
14325 
14326   if test "x$path" != "x$new_path"; then
14327     TOPDIR="$new_path"
14328     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14329 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14330   fi
14331 
14332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14333 
14334   path="$TOPDIR"
14335   has_colon=`$ECHO $path | $GREP ^.:`
14336   new_path="$path"
14337   if test "x$has_colon" = x; then
14338     # Not in mixed or Windows style, start by that.
14339     new_path=`cmd //c echo $path`
14340   fi
14341 
14342 
14343   input_path="$new_path"
14344   # Check if we need to convert this using DOS-style short mode. If the path
14345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14346   # take no chances and rewrite it.
14347   # Note: m4 eats our [], so we need to use [ and ] instead.
14348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14349   if test "x$has_forbidden_chars" != x; then
14350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14351     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14352   fi
14353 
14354 
14355   windows_path="$new_path"
14356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14357     unix_path=`$CYGPATH -u "$windows_path"`
14358     new_path="$unix_path"
14359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14361     new_path="$unix_path"
14362   fi
14363 
14364   if test "x$path" != "x$new_path"; then
14365     TOPDIR="$new_path"
14366     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14367 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14368   fi
14369 
14370   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14371   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14372 
14373   else
14374     # We're on a unix platform. Hooray! :)
14375     path="$TOPDIR"
14376     has_space=`$ECHO "$path" | $GREP " "`
14377     if test "x$has_space" != x; then
14378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14379 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14380       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14381     fi
14382 
14383     # Use eval to expand a potential ~
14384     eval path="$path"
14385     if test ! -f "$path" && test ! -d "$path"; then
14386       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14387     fi
14388 
14389     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14390   fi
14391 
14392   # SRC_ROOT is a traditional alias for TOPDIR.
14393   SRC_ROOT=$TOPDIR
14394 
14395   # Locate the directory of this script.
14396   AUTOCONF_DIR=$TOPDIR/common/autoconf
14397 
14398 
14399   # Setup default logging of stdout and stderr to build.log in the output root.
14400   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14401   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14402   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14403 
14404 
14405 
14406 
14407 
14408 # Check if it's a pure open build or if custom sources are to be used.
14409 
14410   # Check whether --enable-openjdk-only was given.
14411 if test "${enable_openjdk_only+set}" = set; then :
14412   enableval=$enable_openjdk_only;
14413 else
14414   enable_openjdk_only="no"
14415 fi
14416 
14417 
14418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14419 $as_echo_n "checking for presence of closed sources... " >&6; }
14420   if test -d "$SRC_ROOT/jdk/src/closed"; then
14421     CLOSED_SOURCE_PRESENT=yes
14422   else
14423     CLOSED_SOURCE_PRESENT=no
14424   fi
14425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14426 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14427 
14428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14429 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14430   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14432 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14433 
14434   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14435     OPENJDK=true
14436     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14437       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14438 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14439     fi
14440   else
14441     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14442       OPENJDK=true
14443     else
14444       OPENJDK=false
14445     fi
14446   fi
14447 
14448   if test "x$OPENJDK" = "xtrue"; then
14449     SET_OPENJDK="OPENJDK=true"
14450   fi
14451 
14452 
14453 
14454   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14455   # the IncludeCustomExtension macro.
14456 
14457 
14458 # Check whether --with-custom-make-dir was given.
14459 if test "${with_custom_make_dir+set}" = set; then :
14460   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
14461 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14462 fi
14463 
14464 
14465 
14466 
14467 # These are needed to be able to create a configuration name (and thus the output directory)
14468 
14469   ###############################################################################
14470   #
14471   # Check which variant of the JDK that we want to build.
14472   # Currently we have:
14473   #    normal:   standard edition
14474   # but the custom make system may add other variants
14475   #
14476   # Effectively the JDK variant gives a name to a specific set of
14477   # modules to compile into the JDK. In the future, these modules
14478   # might even be Jigsaw modules.
14479   #
14480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14481 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14482 
14483 # Check whether --with-jdk-variant was given.
14484 if test "${with_jdk_variant+set}" = set; then :
14485   withval=$with_jdk_variant;
14486 fi
14487 
14488 
14489   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14490     JDK_VARIANT="normal"
14491   else
14492     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14493   fi
14494 
14495 
14496 
14497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14498 $as_echo "$JDK_VARIANT" >&6; }
14499 
14500 
14501 ###############################################################################
14502 #
14503 # Check which interpreter of the JVM we want to build.
14504 # Currently we have:
14505 #    template: Template interpreter (the default)
14506 #    cpp     : C++ interpreter
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14508 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14509 
14510 # Check whether --with-jvm-interpreter was given.
14511 if test "${with_jvm_interpreter+set}" = set; then :
14512   withval=$with_jvm_interpreter;
14513 fi
14514 
14515 
14516 if test "x$with_jvm_interpreter" = x; then
14517      with_jvm_interpreter="template"
14518 fi
14519 
14520 JVM_INTERPRETER="$with_jvm_interpreter"
14521 
14522 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14523    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14524 fi
14525 
14526 
14527 
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14529 $as_echo "$with_jvm_interpreter" >&6; }
14530 
14531 
14532 
14533   ###############################################################################
14534   #
14535   # Check which variants of the JVM that we want to build.
14536   # Currently we have:
14537   #    server: normal interpreter and a tiered C1/C2 compiler
14538   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14539   #    minimal1: reduced form of client with optional VM services and features stripped out
14540   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14541   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14542   #    zero: no machine code interpreter, no compiler
14543   #    zeroshark: zero interpreter and shark/llvm compiler backend
14544 #    core: interpreter only, no compiler (only works on some platforms)
14545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14546 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14547 
14548 # Check whether --with-jvm-variants was given.
14549 if test "${with_jvm_variants+set}" = set; then :
14550   withval=$with_jvm_variants;
14551 fi
14552 
14553 
14554   if test "x$with_jvm_variants" = x; then
14555     with_jvm_variants="server"
14556   fi
14557 
14558   JVM_VARIANTS=",$with_jvm_variants,"
14559   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,//'`
14560 
14561   if test "x$TEST_VARIANTS" != "x,"; then
14562      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14563   fi
14564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14565 $as_echo "$with_jvm_variants" >&6; }
14566 
14567   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14568   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14569   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14570   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14571   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14572   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14573   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14574 
14575   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14576     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14577       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14578     fi
14579   fi
14580   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14581     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14582       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14583     fi
14584   fi
14585   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14586     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14587       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14588     fi
14589   fi
14590 
14591   # Replace the commas with AND for use in the build directory name.
14592   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14593   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/'`
14594   if test "x$COUNT_VARIANTS" != "x,1"; then
14595     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14596   else
14597     BUILDING_MULTIPLE_JVM_VARIANTS=no
14598   fi
14599 
14600 
14601 
14602 
14603 
14604 
14605 
14606 
14607 
14608 
14609   INCLUDE_SA=true
14610   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14611     INCLUDE_SA=false
14612   fi
14613   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14614     INCLUDE_SA=false
14615   fi
14616   if test "x$OPENJDK_TARGET_OS" = xaix ; then
14617     INCLUDE_SA=false
14618   fi
14619 
14620 
14621   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14622     MACOSX_UNIVERSAL="true"
14623   fi
14624 
14625 
14626 
14627 
14628   ###############################################################################
14629   #
14630   # Set the debug level
14631   #    release: no debug information, all optimizations, no asserts.
14632   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14633   #    fastdebug: debug information (-g), all optimizations, all asserts
14634   #    slowdebug: debug information (-g), no optimizations, all asserts
14635   #
14636   DEBUG_LEVEL="release"
14637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14638 $as_echo_n "checking which debug level to use... " >&6; }
14639   # Check whether --enable-debug was given.
14640 if test "${enable_debug+set}" = set; then :
14641   enableval=$enable_debug;
14642         ENABLE_DEBUG="${enableval}"
14643         DEBUG_LEVEL="fastdebug"
14644 
14645 else
14646   ENABLE_DEBUG="no"
14647 fi
14648 
14649 
14650 
14651 # Check whether --with-debug-level was given.
14652 if test "${with_debug_level+set}" = set; then :
14653   withval=$with_debug_level;
14654         DEBUG_LEVEL="${withval}"
14655         if test "x$ENABLE_DEBUG" = xyes; then
14656           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14657         fi
14658 
14659 fi
14660 
14661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14662 $as_echo "$DEBUG_LEVEL" >&6; }
14663 
14664   if test "x$DEBUG_LEVEL" != xrelease && \
14665       test "x$DEBUG_LEVEL" != xoptimized && \
14666       test "x$DEBUG_LEVEL" != xfastdebug && \
14667       test "x$DEBUG_LEVEL" != xslowdebug; then
14668     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14669   fi
14670 
14671 
14672   ###############################################################################
14673   #
14674   # Setup legacy vars/targets and new vars to deal with different debug levels.
14675   #
14676 
14677   case $DEBUG_LEVEL in
14678     release )
14679       VARIANT="OPT"
14680       FASTDEBUG="false"
14681       DEBUG_CLASSFILES="false"
14682       BUILD_VARIANT_RELEASE=""
14683       HOTSPOT_DEBUG_LEVEL="product"
14684       HOTSPOT_EXPORT="product"
14685       ;;
14686     fastdebug )
14687       VARIANT="DBG"
14688       FASTDEBUG="true"
14689       DEBUG_CLASSFILES="true"
14690       BUILD_VARIANT_RELEASE="-fastdebug"
14691       HOTSPOT_DEBUG_LEVEL="fastdebug"
14692       HOTSPOT_EXPORT="fastdebug"
14693       ;;
14694     slowdebug )
14695       VARIANT="DBG"
14696       FASTDEBUG="false"
14697       DEBUG_CLASSFILES="true"
14698       BUILD_VARIANT_RELEASE="-debug"
14699       HOTSPOT_DEBUG_LEVEL="debug"
14700       HOTSPOT_EXPORT="debug"
14701       ;;
14702     optimized )
14703       VARIANT="OPT"
14704       FASTDEBUG="false"
14705       DEBUG_CLASSFILES="false"
14706       BUILD_VARIANT_RELEASE="-optimized"
14707       HOTSPOT_DEBUG_LEVEL="optimized"
14708       HOTSPOT_EXPORT="optimized"
14709       ;;
14710   esac
14711 
14712   # The debug level 'optimized' is a little special because it is currently only
14713   # applicable to the HotSpot build where it means to build a completely
14714   # optimized version of the VM without any debugging code (like for the
14715   # 'release' debug level which is called 'product' in the HotSpot build) but
14716   # with the exception that it can contain additional code which is otherwise
14717   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14718   # test new and/or experimental features which are not intended for customer
14719   # shipment. Because these new features need to be tested and benchmarked in
14720   # real world scenarios, we want to build the containing JDK at the 'release'
14721   # debug level.
14722   if test "x$DEBUG_LEVEL" = xoptimized; then
14723     DEBUG_LEVEL="release"
14724   fi
14725 
14726   #####
14727   # Generate the legacy makefile targets for hotspot.
14728   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14729   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14730   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14731   # But until then ...
14732   HOTSPOT_TARGET=""
14733 
14734   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14735     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14736   fi
14737 
14738   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14739     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14740   fi
14741 
14742   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14743     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14744   fi
14745 
14746   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14747     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14748   fi
14749 
14750   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14751     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14752   fi
14753 
14754   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14755     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14756   fi
14757 
14758   if test "x$JVM_VARIANT_CORE" = xtrue; then
14759     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14760   fi
14761 
14762   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14763 
14764   # On Macosx universal binaries are produced, but they only contain
14765   # 64 bit intel. This invalidates control of which jvms are built
14766   # from configure, but only server is valid anyway. Fix this
14767   # when hotspot makefiles are rewritten.
14768   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14769     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14770   fi
14771 
14772   #####
14773 
14774 
14775 
14776 
14777 
14778 
14779 
14780 
14781 # With basic setup done, call the custom early hook.
14782 
14783 
14784 # Check if we have devkits, extra paths or sysroot set.
14785 
14786 
14787 # Check whether --with-devkit was given.
14788 if test "${with_devkit+set}" = set; then :
14789   withval=$with_devkit;
14790 
14791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14792 
14793   # Input might be given as Windows format, start by converting to
14794   # unix format.
14795   path="$with_devkit"
14796   new_path=`$CYGPATH -u "$path"`
14797 
14798   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14799   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14800   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14801   # "foo.exe" is OK but "foo" is an error.
14802   #
14803   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14804   # It is also a way to make sure we got the proper file name for the real test later on.
14805   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14806   if test "x$test_shortpath" = x; then
14807     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14808 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14809     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14810   fi
14811 
14812   # Call helper function which possibly converts this using DOS-style short mode.
14813   # If so, the updated path is stored in $new_path.
14814 
14815   input_path="$new_path"
14816   # Check if we need to convert this using DOS-style short mode. If the path
14817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14818   # take no chances and rewrite it.
14819   # Note: m4 eats our [], so we need to use [ and ] instead.
14820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14821   if test "x$has_forbidden_chars" != x; then
14822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14826       # Going to short mode and back again did indeed matter. Since short mode is
14827       # case insensitive, let's make it lowercase to improve readability.
14828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14829       # Now convert it back to Unix-stile (cygpath)
14830       input_path=`$CYGPATH -u "$shortmode_path"`
14831       new_path="$input_path"
14832     fi
14833   fi
14834 
14835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14836   if test "x$test_cygdrive_prefix" = x; then
14837     # As a simple fix, exclude /usr/bin since it's not a real path.
14838     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14840       # a path prefixed by /cygdrive for fixpath to work.
14841       new_path="$CYGWIN_ROOT_PATH$input_path"
14842     fi
14843   fi
14844 
14845 
14846   if test "x$path" != "x$new_path"; then
14847     with_devkit="$new_path"
14848     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14849 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14850   fi
14851 
14852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14853 
14854   path="$with_devkit"
14855   has_colon=`$ECHO $path | $GREP ^.:`
14856   new_path="$path"
14857   if test "x$has_colon" = x; then
14858     # Not in mixed or Windows style, start by that.
14859     new_path=`cmd //c echo $path`
14860   fi
14861 
14862 
14863   input_path="$new_path"
14864   # Check if we need to convert this using DOS-style short mode. If the path
14865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14866   # take no chances and rewrite it.
14867   # Note: m4 eats our [], so we need to use [ and ] instead.
14868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14869   if test "x$has_forbidden_chars" != x; then
14870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14871     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14872   fi
14873 
14874 
14875   windows_path="$new_path"
14876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14877     unix_path=`$CYGPATH -u "$windows_path"`
14878     new_path="$unix_path"
14879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14881     new_path="$unix_path"
14882   fi
14883 
14884   if test "x$path" != "x$new_path"; then
14885     with_devkit="$new_path"
14886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14887 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14888   fi
14889 
14890   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14891   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14892 
14893   else
14894     # We're on a unix platform. Hooray! :)
14895     path="$with_devkit"
14896     has_space=`$ECHO "$path" | $GREP " "`
14897     if test "x$has_space" != x; then
14898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14899 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14900       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14901     fi
14902 
14903     # Use eval to expand a potential ~
14904     eval path="$path"
14905     if test ! -f "$path" && test ! -d "$path"; then
14906       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14907     fi
14908 
14909     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14910   fi
14911 
14912         DEVKIT_ROOT="$with_devkit"
14913         # Check for a meta data info file in the root of the devkit
14914         if test -f "$DEVKIT_ROOT/devkit.info"; then
14915           # This potentially sets the following:
14916           # DEVKIT_NAME: A descriptive name of the devkit
14917           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14918           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14919           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14920           . $DEVKIT_ROOT/devkit.info
14921         fi
14922 
14923         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14924 $as_echo_n "checking for devkit... " >&6; }
14925         if test "x$DEVKIT_NAME" != x; then
14926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14927 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14928         else
14929           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14930 $as_echo "$DEVKIT_ROOT" >&6; }
14931         fi
14932 
14933         if test "x$DEVKIT_EXTRA_PATH" != x; then
14934 
14935   if test "x$DEVKIT_EXTRA_PATH" != x; then
14936     if test "x$EXTRA_PATH" = x; then
14937       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14938     else
14939       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14940     fi
14941   fi
14942 
14943         fi
14944 
14945         # Fallback default of just /bin if DEVKIT_PATH is not defined
14946         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14947           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14948         fi
14949 
14950   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14951     if test "x$TOOLCHAIN_PATH" = x; then
14952       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14953     else
14954       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14955     fi
14956   fi
14957 
14958 
14959         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14960         # places for backwards compatiblity.
14961         if test "x$DEVKIT_SYSROOT" != x; then
14962           SYSROOT="$DEVKIT_SYSROOT"
14963         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14964           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14965         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14966           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14967         fi
14968 
14969 
14970 fi
14971 
14972 
14973   # You can force the sysroot if the sysroot encoded into the compiler tools
14974   # is not correct.
14975 
14976 # Check whether --with-sys-root was given.
14977 if test "${with_sys_root+set}" = set; then :
14978   withval=$with_sys_root; SYSROOT=$with_sys_root
14979 
14980 fi
14981 
14982 
14983 
14984 # Check whether --with-sysroot was given.
14985 if test "${with_sysroot+set}" = set; then :
14986   withval=$with_sysroot; SYSROOT=$with_sysroot
14987 
14988 fi
14989 
14990 
14991 
14992 # Check whether --with-tools-dir was given.
14993 if test "${with_tools_dir+set}" = set; then :
14994   withval=$with_tools_dir;
14995   if test "x$with_tools_dir" != x; then
14996     if test "x$TOOLCHAIN_PATH" = x; then
14997       TOOLCHAIN_PATH="$with_tools_dir"
14998     else
14999       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15000     fi
15001   fi
15002 
15003 
15004 fi
15005 
15006 
15007 
15008 # Check whether --with-toolchain-path was given.
15009 if test "${with_toolchain_path+set}" = set; then :
15010   withval=$with_toolchain_path;
15011   if test "x$with_toolchain_path" != x; then
15012     if test "x$TOOLCHAIN_PATH" = x; then
15013       TOOLCHAIN_PATH="$with_toolchain_path"
15014     else
15015       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15016     fi
15017   fi
15018 
15019 
15020 fi
15021 
15022 
15023 
15024 # Check whether --with-extra-path was given.
15025 if test "${with_extra_path+set}" = set; then :
15026   withval=$with_extra_path;
15027   if test "x$with_extra_path" != x; then
15028     if test "x$EXTRA_PATH" = x; then
15029       EXTRA_PATH="$with_extra_path"
15030     else
15031       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15032     fi
15033   fi
15034 
15035 
15036 fi
15037 
15038 
15039   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15040     # detect if Xcode is installed by running xcodebuild -version
15041     # if no Xcode installed, xcodebuild exits with 1
15042     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15043     if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15044       # We need to use xcodebuild in the toolchain dir provided by the user, this will
15045       # fall back on the stub binary in /usr/bin/xcodebuild
15046       # Extract the first word of "xcodebuild", so it can be a program name with args.
15047 set dummy xcodebuild; ac_word=$2
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15049 $as_echo_n "checking for $ac_word... " >&6; }
15050 if ${ac_cv_path_XCODEBUILD+:} false; then :
15051   $as_echo_n "(cached) " >&6
15052 else
15053   case $XCODEBUILD in
15054   [\\/]* | ?:[\\/]*)
15055   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15056   ;;
15057   *)
15058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15059 for as_dir in $TOOLCHAIN_PATH
15060 do
15061   IFS=$as_save_IFS
15062   test -z "$as_dir" && as_dir=.
15063     for ac_exec_ext in '' $ac_executable_extensions; do
15064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15065     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15067     break 2
15068   fi
15069 done
15070   done
15071 IFS=$as_save_IFS
15072 
15073   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15074   ;;
15075 esac
15076 fi
15077 XCODEBUILD=$ac_cv_path_XCODEBUILD
15078 if test -n "$XCODEBUILD"; then
15079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15080 $as_echo "$XCODEBUILD" >&6; }
15081 else
15082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15083 $as_echo "no" >&6; }
15084 fi
15085 
15086 
15087     else
15088       # this should result in SYSROOT being empty, unless --with-sysroot is provided
15089       # when only the command line tools are installed there are no SDKs, so headers
15090       # are copied into the system frameworks
15091       XCODEBUILD=
15092 
15093     fi
15094 
15095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15096 $as_echo_n "checking for sdk name... " >&6; }
15097 
15098 # Check whether --with-sdk-name was given.
15099 if test "${with_sdk_name+set}" = set; then :
15100   withval=$with_sdk_name; SDKNAME=$with_sdk_name
15101 
15102 fi
15103 
15104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15105 $as_echo "$SDKNAME" >&6; }
15106 
15107     # if toolchain path is specified then don't rely on system headers, they may not compile
15108     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15109     test -z "$TOOLCHAIN_PATH" && \
15110       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15111 
15112     if test -z "$SYSROOT"; then
15113       if test -n "$XCODEBUILD"; then
15114         # if we don't have system headers, use default SDK name (last resort)
15115         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15116           SDKNAME=${SDKNAME:-macosx}
15117         fi
15118 
15119         if test -n "$SDKNAME"; then
15120           # Call xcodebuild to determine SYSROOT
15121           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15122         fi
15123       else
15124         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15125           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
15126         fi
15127       fi
15128     else
15129       # warn user if --with-sdk-name was also set
15130       if test -n "$with_sdk_name"; then
15131         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15132 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15133       fi
15134     fi
15135 
15136     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15137       # If no system framework headers, then SYSROOT must be set, or we won't build
15138       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
15139     fi
15140 
15141     # Perform a basic sanity test
15142     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15143       if test -z "$SYSROOT"; then
15144         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
15145       else
15146         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15147       fi
15148     fi
15149 
15150     # set SDKROOT too, Xcode tools will pick it up
15151     SDKROOT=$SYSROOT
15152 
15153   fi
15154 
15155   # Prepend the extra path to the global path
15156 
15157   if test "x$EXTRA_PATH" != x; then
15158     if test "x$PATH" = x; then
15159       PATH="$EXTRA_PATH"
15160     else
15161       PATH="$EXTRA_PATH:$PATH"
15162     fi
15163   fi
15164 
15165 
15166   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15167     # Add extra search paths on solaris for utilities like ar and as etc...
15168     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15169   fi
15170 
15171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15172 $as_echo_n "checking for sysroot... " >&6; }
15173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15174 $as_echo "$SYSROOT" >&6; }
15175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15176 $as_echo_n "checking for toolchain path... " >&6; }
15177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15178 $as_echo "$TOOLCHAIN_PATH" >&6; }
15179   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15180 $as_echo_n "checking for extra path... " >&6; }
15181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15182 $as_echo "$EXTRA_PATH" >&6; }
15183 
15184 
15185 # To properly create a configuration name, we need to have the OpenJDK target
15186 # and options (variants and debug level) parsed.
15187 
15188 
15189 
15190 # Check whether --with-conf-name was given.
15191 if test "${with_conf_name+set}" = set; then :
15192   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15193 fi
15194 
15195 
15196   # Test from where we are running configure, in or outside of src root.
15197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15198 $as_echo_n "checking where to store configuration... " >&6; }
15199   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15200       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15201       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15202     # We are running configure from the src root.
15203     # Create a default ./build/target-variant-debuglevel output root.
15204     if test "x${CONF_NAME}" = x; then
15205       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15206 $as_echo "in default location" >&6; }
15207       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15208     else
15209       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15210 $as_echo "in build directory with custom name" >&6; }
15211     fi
15212     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15213     $MKDIR -p "$OUTPUT_ROOT"
15214     if test ! -d "$OUTPUT_ROOT"; then
15215       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15216     fi
15217   else
15218     # We are running configure from outside of the src dir.
15219     # Then use the current directory as output dir!
15220     # If configuration is situated in normal build directory, just use the build
15221     # directory name as configuration name, otherwise use the complete path.
15222     if test "x${CONF_NAME}" = x; then
15223       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15224     fi
15225     OUTPUT_ROOT="$CURDIR"
15226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15227 $as_echo "in current directory" >&6; }
15228 
15229     # WARNING: This might be a bad thing to do. You need to be sure you want to
15230     # have a configuration in this directory. Do some sanity checks!
15231 
15232     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15233       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15234       # other files
15235       files_present=`$LS $OUTPUT_ROOT`
15236       # Configure has already touched config.log and confdefs.h in the current dir when this check
15237       # is performed.
15238       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15239       | $TR -d '\n'`
15240       if test "x$filtered_files" != x; then
15241         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15242 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15243         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15244 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15245         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15246 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15247         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15248 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15249         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15250 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15251         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15252 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15253         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15254 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15255         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15256       fi
15257     fi
15258   fi
15259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15260 $as_echo_n "checking what configuration name to use... " >&6; }
15261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15262 $as_echo "$CONF_NAME" >&6; }
15263 
15264 
15265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15266 
15267   # Input might be given as Windows format, start by converting to
15268   # unix format.
15269   path="$OUTPUT_ROOT"
15270   new_path=`$CYGPATH -u "$path"`
15271 
15272   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15273   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15274   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15275   # "foo.exe" is OK but "foo" is an error.
15276   #
15277   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15278   # It is also a way to make sure we got the proper file name for the real test later on.
15279   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15280   if test "x$test_shortpath" = x; then
15281     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15282 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15283     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15284   fi
15285 
15286   # Call helper function which possibly converts this using DOS-style short mode.
15287   # If so, the updated path is stored in $new_path.
15288 
15289   input_path="$new_path"
15290   # Check if we need to convert this using DOS-style short mode. If the path
15291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15292   # take no chances and rewrite it.
15293   # Note: m4 eats our [], so we need to use [ and ] instead.
15294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15295   if test "x$has_forbidden_chars" != x; then
15296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15297     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15298     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15299     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15300       # Going to short mode and back again did indeed matter. Since short mode is
15301       # case insensitive, let's make it lowercase to improve readability.
15302       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15303       # Now convert it back to Unix-stile (cygpath)
15304       input_path=`$CYGPATH -u "$shortmode_path"`
15305       new_path="$input_path"
15306     fi
15307   fi
15308 
15309   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15310   if test "x$test_cygdrive_prefix" = x; then
15311     # As a simple fix, exclude /usr/bin since it's not a real path.
15312     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15313       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15314       # a path prefixed by /cygdrive for fixpath to work.
15315       new_path="$CYGWIN_ROOT_PATH$input_path"
15316     fi
15317   fi
15318 
15319 
15320   if test "x$path" != "x$new_path"; then
15321     OUTPUT_ROOT="$new_path"
15322     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15323 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15324   fi
15325 
15326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15327 
15328   path="$OUTPUT_ROOT"
15329   has_colon=`$ECHO $path | $GREP ^.:`
15330   new_path="$path"
15331   if test "x$has_colon" = x; then
15332     # Not in mixed or Windows style, start by that.
15333     new_path=`cmd //c echo $path`
15334   fi
15335 
15336 
15337   input_path="$new_path"
15338   # Check if we need to convert this using DOS-style short mode. If the path
15339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15340   # take no chances and rewrite it.
15341   # Note: m4 eats our [], so we need to use [ and ] instead.
15342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15343   if test "x$has_forbidden_chars" != x; then
15344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15345     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15346   fi
15347 
15348 
15349   windows_path="$new_path"
15350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15351     unix_path=`$CYGPATH -u "$windows_path"`
15352     new_path="$unix_path"
15353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15355     new_path="$unix_path"
15356   fi
15357 
15358   if test "x$path" != "x$new_path"; then
15359     OUTPUT_ROOT="$new_path"
15360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15361 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15362   fi
15363 
15364   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15365   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15366 
15367   else
15368     # We're on a unix platform. Hooray! :)
15369     path="$OUTPUT_ROOT"
15370     has_space=`$ECHO "$path" | $GREP " "`
15371     if test "x$has_space" != x; then
15372       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15373 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15374       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15375     fi
15376 
15377     # Use eval to expand a potential ~
15378     eval path="$path"
15379     if test ! -f "$path" && test ! -d "$path"; then
15380       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15381     fi
15382 
15383     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15384   fi
15385 
15386 
15387   SPEC=$OUTPUT_ROOT/spec.gmk
15388 
15389   CONF_NAME=$CONF_NAME
15390 
15391   OUTPUT_ROOT=$OUTPUT_ROOT
15392 
15393 
15394   # The spec.gmk file contains all variables for the make system.
15395   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15396 
15397   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15398   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15399 
15400   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15401   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15402 
15403   # The compare.sh is used to compare the build output to other builds.
15404   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15405 
15406   # The generated Makefile knows where the spec.gmk is and where the source is.
15407   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15408   # which will look for generated configurations
15409   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15410 
15411 
15412 
15413 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15414 
15415   for ac_prog in apt-get yum port pkgutil pkgadd
15416 do
15417   # Extract the first word of "$ac_prog", so it can be a program name with args.
15418 set dummy $ac_prog; ac_word=$2
15419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15420 $as_echo_n "checking for $ac_word... " >&6; }
15421 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15422   $as_echo_n "(cached) " >&6
15423 else
15424   if test -n "$PKGHANDLER"; then
15425   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15426 else
15427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15428 for as_dir in $PATH
15429 do
15430   IFS=$as_save_IFS
15431   test -z "$as_dir" && as_dir=.
15432     for ac_exec_ext in '' $ac_executable_extensions; do
15433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15434     ac_cv_prog_PKGHANDLER="$ac_prog"
15435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15436     break 2
15437   fi
15438 done
15439   done
15440 IFS=$as_save_IFS
15441 
15442 fi
15443 fi
15444 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15445 if test -n "$PKGHANDLER"; then
15446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15447 $as_echo "$PKGHANDLER" >&6; }
15448 else
15449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15450 $as_echo "no" >&6; }
15451 fi
15452 
15453 
15454   test -n "$PKGHANDLER" && break
15455 done
15456 
15457 
15458 
15459 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15460 
15461 
15462   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15463   if test "x$MAKE" != x; then
15464     # User has supplied a make, test it.
15465     if test ! -f "$MAKE"; then
15466       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15467     fi
15468 
15469   MAKE_CANDIDATE=""$MAKE""
15470   DESCRIPTION="user supplied MAKE=$MAKE"
15471   if test "x$MAKE_CANDIDATE" != x; then
15472     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15473 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15474     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15475     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15476     if test "x$IS_GNU_MAKE" = x; then
15477       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15478 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15479     else
15480       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15481       if test "x$IS_MODERN_MAKE" = x; then
15482         { $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
15483 $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;}
15484       else
15485         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15486           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15487             MAKE_EXPECTED_ENV='cygwin'
15488           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15489             MAKE_EXPECTED_ENV='msys'
15490           else
15491             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15492           fi
15493           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15494           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15495         else
15496           # Not relevant for non-Windows
15497           IS_MAKE_CORRECT_ENV=true
15498         fi
15499         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15500           { $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
15501 $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;}
15502         else
15503           FOUND_MAKE=$MAKE_CANDIDATE
15504 
15505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15506 
15507   # First separate the path from the arguments. This will split at the first
15508   # space.
15509   complete="$FOUND_MAKE"
15510   path="${complete%% *}"
15511   tmp="$complete EOL"
15512   arguments="${tmp#* }"
15513 
15514   # Input might be given as Windows format, start by converting to
15515   # unix format.
15516   new_path=`$CYGPATH -u "$path"`
15517 
15518   # Now try to locate executable using which
15519   new_path=`$WHICH "$new_path" 2> /dev/null`
15520   # bat and cmd files are not always considered executable in cygwin causing which
15521   # to not find them
15522   if test "x$new_path" = x \
15523       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15524       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15525     new_path=`$CYGPATH -u "$path"`
15526   fi
15527   if test "x$new_path" = x; then
15528     # Oops. Which didn't find the executable.
15529     # The splitting of arguments from the executable at a space might have been incorrect,
15530     # since paths with space are more likely in Windows. Give it another try with the whole
15531     # argument.
15532     path="$complete"
15533     arguments="EOL"
15534     new_path=`$CYGPATH -u "$path"`
15535     new_path=`$WHICH "$new_path" 2> /dev/null`
15536     # bat and cmd files are not always considered executable in cygwin causing which
15537     # to not find them
15538     if test "x$new_path" = x \
15539         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15540         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15541       new_path=`$CYGPATH -u "$path"`
15542     fi
15543     if test "x$new_path" = x; then
15544       # It's still not found. Now this is an unrecoverable error.
15545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15546 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15547       has_space=`$ECHO "$complete" | $GREP " "`
15548       if test "x$has_space" != x; then
15549         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15551       fi
15552       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15553     fi
15554   fi
15555 
15556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15559   # "foo.exe" is OK but "foo" is an error.
15560   #
15561   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15562   # It is also a way to make sure we got the proper file name for the real test later on.
15563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15564   if test "x$test_shortpath" = x; then
15565     # Short path failed, file does not exist as specified.
15566     # Try adding .exe or .cmd
15567     if test -f "${new_path}.exe"; then
15568       input_to_shortpath="${new_path}.exe"
15569     elif test -f "${new_path}.cmd"; then
15570       input_to_shortpath="${new_path}.cmd"
15571     else
15572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15573 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15574       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15575 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15576       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15577     fi
15578   else
15579     input_to_shortpath="$new_path"
15580   fi
15581 
15582   # Call helper function which possibly converts this using DOS-style short mode.
15583   # If so, the updated path is stored in $new_path.
15584   new_path="$input_to_shortpath"
15585 
15586   input_path="$input_to_shortpath"
15587   # Check if we need to convert this using DOS-style short mode. If the path
15588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15589   # take no chances and rewrite it.
15590   # Note: m4 eats our [], so we need to use [ and ] instead.
15591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15592   if test "x$has_forbidden_chars" != x; then
15593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15594     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15595     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15596     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15597       # Going to short mode and back again did indeed matter. Since short mode is
15598       # case insensitive, let's make it lowercase to improve readability.
15599       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15600       # Now convert it back to Unix-stile (cygpath)
15601       input_path=`$CYGPATH -u "$shortmode_path"`
15602       new_path="$input_path"
15603     fi
15604   fi
15605 
15606   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15607   if test "x$test_cygdrive_prefix" = x; then
15608     # As a simple fix, exclude /usr/bin since it's not a real path.
15609     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15610       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15611       # a path prefixed by /cygdrive for fixpath to work.
15612       new_path="$CYGWIN_ROOT_PATH$input_path"
15613     fi
15614   fi
15615 
15616   # remove trailing .exe if any
15617   new_path="${new_path/%.exe/}"
15618 
15619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15620 
15621   # First separate the path from the arguments. This will split at the first
15622   # space.
15623   complete="$FOUND_MAKE"
15624   path="${complete%% *}"
15625   tmp="$complete EOL"
15626   arguments="${tmp#* }"
15627 
15628   # Input might be given as Windows format, start by converting to
15629   # unix format.
15630   new_path="$path"
15631 
15632   windows_path="$new_path"
15633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15634     unix_path=`$CYGPATH -u "$windows_path"`
15635     new_path="$unix_path"
15636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15638     new_path="$unix_path"
15639   fi
15640 
15641 
15642   # Now try to locate executable using which
15643   new_path=`$WHICH "$new_path" 2> /dev/null`
15644 
15645   if test "x$new_path" = x; then
15646     # Oops. Which didn't find the executable.
15647     # The splitting of arguments from the executable at a space might have been incorrect,
15648     # since paths with space are more likely in Windows. Give it another try with the whole
15649     # argument.
15650     path="$complete"
15651     arguments="EOL"
15652     new_path="$path"
15653 
15654   windows_path="$new_path"
15655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15656     unix_path=`$CYGPATH -u "$windows_path"`
15657     new_path="$unix_path"
15658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15660     new_path="$unix_path"
15661   fi
15662 
15663 
15664     new_path=`$WHICH "$new_path" 2> /dev/null`
15665     # bat and cmd files are not always considered executable in MSYS causing which
15666     # to not find them
15667     if test "x$new_path" = x \
15668         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15669         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15670       new_path="$path"
15671 
15672   windows_path="$new_path"
15673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15674     unix_path=`$CYGPATH -u "$windows_path"`
15675     new_path="$unix_path"
15676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15678     new_path="$unix_path"
15679   fi
15680 
15681     fi
15682 
15683     if test "x$new_path" = x; then
15684       # It's still not found. Now this is an unrecoverable error.
15685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15686 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15687       has_space=`$ECHO "$complete" | $GREP " "`
15688       if test "x$has_space" != x; then
15689         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15690 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15691       fi
15692       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15693     fi
15694   fi
15695 
15696   # Now new_path has a complete unix path to the binary
15697   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15698     # Keep paths in /bin as-is, but remove trailing .exe if any
15699     new_path="${new_path/%.exe/}"
15700     # Do not save /bin paths to all_fixpath_prefixes!
15701   else
15702     # Not in mixed or Windows style, start by that.
15703     new_path=`cmd //c echo $new_path`
15704 
15705   input_path="$new_path"
15706   # Check if we need to convert this using DOS-style short mode. If the path
15707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15708   # take no chances and rewrite it.
15709   # Note: m4 eats our [], so we need to use [ and ] instead.
15710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15711   if test "x$has_forbidden_chars" != x; then
15712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15713     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15714   fi
15715 
15716     # Output is in $new_path
15717 
15718   windows_path="$new_path"
15719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15720     unix_path=`$CYGPATH -u "$windows_path"`
15721     new_path="$unix_path"
15722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15724     new_path="$unix_path"
15725   fi
15726 
15727     # remove trailing .exe if any
15728     new_path="${new_path/%.exe/}"
15729 
15730     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15731     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15732   fi
15733 
15734   else
15735     # We're on a unix platform. Hooray! :)
15736     # First separate the path from the arguments. This will split at the first
15737     # space.
15738     complete="$FOUND_MAKE"
15739     path="${complete%% *}"
15740     tmp="$complete EOL"
15741     arguments="${tmp#* }"
15742 
15743     # Cannot rely on the command "which" here since it doesn't always work.
15744     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15745     if test -z "$is_absolute_path"; then
15746       # Path to executable is not absolute. Find it.
15747       IFS_save="$IFS"
15748       IFS=:
15749       for p in $PATH; do
15750         if test -f "$p/$path" && test -x "$p/$path"; then
15751           new_path="$p/$path"
15752           break
15753         fi
15754       done
15755       IFS="$IFS_save"
15756     else
15757       # This is an absolute path, we can use it without further modifications.
15758       new_path="$path"
15759     fi
15760 
15761     if test "x$new_path" = x; then
15762       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15763 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15764       has_space=`$ECHO "$complete" | $GREP " "`
15765       if test "x$has_space" != x; then
15766         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15767 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15768       fi
15769       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15770     fi
15771   fi
15772 
15773   # Now join together the path and the arguments once again
15774   if test "x$arguments" != xEOL; then
15775     new_complete="$new_path ${arguments% *}"
15776   else
15777     new_complete="$new_path"
15778   fi
15779 
15780   if test "x$complete" != "x$new_complete"; then
15781     FOUND_MAKE="$new_complete"
15782     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15783 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15784   fi
15785 
15786         fi
15787       fi
15788     fi
15789   fi
15790 
15791     if test "x$FOUND_MAKE" = x; then
15792       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15793     fi
15794   else
15795     # Try our hardest to locate a correct version of GNU make
15796     for ac_prog in gmake
15797 do
15798   # Extract the first word of "$ac_prog", so it can be a program name with args.
15799 set dummy $ac_prog; ac_word=$2
15800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15801 $as_echo_n "checking for $ac_word... " >&6; }
15802 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15803   $as_echo_n "(cached) " >&6
15804 else
15805   case $CHECK_GMAKE in
15806   [\\/]* | ?:[\\/]*)
15807   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15808   ;;
15809   *)
15810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15811 for as_dir in $PATH
15812 do
15813   IFS=$as_save_IFS
15814   test -z "$as_dir" && as_dir=.
15815     for ac_exec_ext in '' $ac_executable_extensions; do
15816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15817     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15819     break 2
15820   fi
15821 done
15822   done
15823 IFS=$as_save_IFS
15824 
15825   ;;
15826 esac
15827 fi
15828 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15829 if test -n "$CHECK_GMAKE"; then
15830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15831 $as_echo "$CHECK_GMAKE" >&6; }
15832 else
15833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15834 $as_echo "no" >&6; }
15835 fi
15836 
15837 
15838   test -n "$CHECK_GMAKE" && break
15839 done
15840 
15841 
15842   MAKE_CANDIDATE=""$CHECK_GMAKE""
15843   DESCRIPTION="gmake in PATH"
15844   if test "x$MAKE_CANDIDATE" != x; then
15845     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15846 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15847     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15848     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15849     if test "x$IS_GNU_MAKE" = x; then
15850       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15851 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15852     else
15853       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15854       if test "x$IS_MODERN_MAKE" = x; then
15855         { $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
15856 $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;}
15857       else
15858         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15859           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15860             MAKE_EXPECTED_ENV='cygwin'
15861           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15862             MAKE_EXPECTED_ENV='msys'
15863           else
15864             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15865           fi
15866           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15867           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15868         else
15869           # Not relevant for non-Windows
15870           IS_MAKE_CORRECT_ENV=true
15871         fi
15872         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15873           { $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
15874 $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;}
15875         else
15876           FOUND_MAKE=$MAKE_CANDIDATE
15877 
15878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15879 
15880   # First separate the path from the arguments. This will split at the first
15881   # space.
15882   complete="$FOUND_MAKE"
15883   path="${complete%% *}"
15884   tmp="$complete EOL"
15885   arguments="${tmp#* }"
15886 
15887   # Input might be given as Windows format, start by converting to
15888   # unix format.
15889   new_path=`$CYGPATH -u "$path"`
15890 
15891   # Now try to locate executable using which
15892   new_path=`$WHICH "$new_path" 2> /dev/null`
15893   # bat and cmd files are not always considered executable in cygwin causing which
15894   # to not find them
15895   if test "x$new_path" = x \
15896       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15897       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15898     new_path=`$CYGPATH -u "$path"`
15899   fi
15900   if test "x$new_path" = x; then
15901     # Oops. Which didn't find the executable.
15902     # The splitting of arguments from the executable at a space might have been incorrect,
15903     # since paths with space are more likely in Windows. Give it another try with the whole
15904     # argument.
15905     path="$complete"
15906     arguments="EOL"
15907     new_path=`$CYGPATH -u "$path"`
15908     new_path=`$WHICH "$new_path" 2> /dev/null`
15909     # bat and cmd files are not always considered executable in cygwin causing which
15910     # to not find them
15911     if test "x$new_path" = x \
15912         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15913         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15914       new_path=`$CYGPATH -u "$path"`
15915     fi
15916     if test "x$new_path" = x; then
15917       # It's still not found. Now this is an unrecoverable error.
15918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15919 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15920       has_space=`$ECHO "$complete" | $GREP " "`
15921       if test "x$has_space" != x; then
15922         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15923 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15924       fi
15925       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15926     fi
15927   fi
15928 
15929   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15930   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15931   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15932   # "foo.exe" is OK but "foo" is an error.
15933   #
15934   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15935   # It is also a way to make sure we got the proper file name for the real test later on.
15936   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15937   if test "x$test_shortpath" = x; then
15938     # Short path failed, file does not exist as specified.
15939     # Try adding .exe or .cmd
15940     if test -f "${new_path}.exe"; then
15941       input_to_shortpath="${new_path}.exe"
15942     elif test -f "${new_path}.cmd"; then
15943       input_to_shortpath="${new_path}.cmd"
15944     else
15945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15946 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15947       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15948 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15949       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15950     fi
15951   else
15952     input_to_shortpath="$new_path"
15953   fi
15954 
15955   # Call helper function which possibly converts this using DOS-style short mode.
15956   # If so, the updated path is stored in $new_path.
15957   new_path="$input_to_shortpath"
15958 
15959   input_path="$input_to_shortpath"
15960   # Check if we need to convert this using DOS-style short mode. If the path
15961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15962   # take no chances and rewrite it.
15963   # Note: m4 eats our [], so we need to use [ and ] instead.
15964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15965   if test "x$has_forbidden_chars" != x; then
15966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15970       # Going to short mode and back again did indeed matter. Since short mode is
15971       # case insensitive, let's make it lowercase to improve readability.
15972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15973       # Now convert it back to Unix-stile (cygpath)
15974       input_path=`$CYGPATH -u "$shortmode_path"`
15975       new_path="$input_path"
15976     fi
15977   fi
15978 
15979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15980   if test "x$test_cygdrive_prefix" = x; then
15981     # As a simple fix, exclude /usr/bin since it's not a real path.
15982     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15984       # a path prefixed by /cygdrive for fixpath to work.
15985       new_path="$CYGWIN_ROOT_PATH$input_path"
15986     fi
15987   fi
15988 
15989   # remove trailing .exe if any
15990   new_path="${new_path/%.exe/}"
15991 
15992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15993 
15994   # First separate the path from the arguments. This will split at the first
15995   # space.
15996   complete="$FOUND_MAKE"
15997   path="${complete%% *}"
15998   tmp="$complete EOL"
15999   arguments="${tmp#* }"
16000 
16001   # Input might be given as Windows format, start by converting to
16002   # unix format.
16003   new_path="$path"
16004 
16005   windows_path="$new_path"
16006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16007     unix_path=`$CYGPATH -u "$windows_path"`
16008     new_path="$unix_path"
16009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16011     new_path="$unix_path"
16012   fi
16013 
16014 
16015   # Now try to locate executable using which
16016   new_path=`$WHICH "$new_path" 2> /dev/null`
16017 
16018   if test "x$new_path" = x; then
16019     # Oops. Which didn't find the executable.
16020     # The splitting of arguments from the executable at a space might have been incorrect,
16021     # since paths with space are more likely in Windows. Give it another try with the whole
16022     # argument.
16023     path="$complete"
16024     arguments="EOL"
16025     new_path="$path"
16026 
16027   windows_path="$new_path"
16028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16029     unix_path=`$CYGPATH -u "$windows_path"`
16030     new_path="$unix_path"
16031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16033     new_path="$unix_path"
16034   fi
16035 
16036 
16037     new_path=`$WHICH "$new_path" 2> /dev/null`
16038     # bat and cmd files are not always considered executable in MSYS causing which
16039     # to not find them
16040     if test "x$new_path" = x \
16041         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16042         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16043       new_path="$path"
16044 
16045   windows_path="$new_path"
16046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16047     unix_path=`$CYGPATH -u "$windows_path"`
16048     new_path="$unix_path"
16049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16051     new_path="$unix_path"
16052   fi
16053 
16054     fi
16055 
16056     if test "x$new_path" = x; then
16057       # It's still not found. Now this is an unrecoverable error.
16058       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16059 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16060       has_space=`$ECHO "$complete" | $GREP " "`
16061       if test "x$has_space" != x; then
16062         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16063 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16064       fi
16065       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16066     fi
16067   fi
16068 
16069   # Now new_path has a complete unix path to the binary
16070   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16071     # Keep paths in /bin as-is, but remove trailing .exe if any
16072     new_path="${new_path/%.exe/}"
16073     # Do not save /bin paths to all_fixpath_prefixes!
16074   else
16075     # Not in mixed or Windows style, start by that.
16076     new_path=`cmd //c echo $new_path`
16077 
16078   input_path="$new_path"
16079   # Check if we need to convert this using DOS-style short mode. If the path
16080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16081   # take no chances and rewrite it.
16082   # Note: m4 eats our [], so we need to use [ and ] instead.
16083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16084   if test "x$has_forbidden_chars" != x; then
16085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16086     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16087   fi
16088 
16089     # Output is in $new_path
16090 
16091   windows_path="$new_path"
16092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16093     unix_path=`$CYGPATH -u "$windows_path"`
16094     new_path="$unix_path"
16095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16097     new_path="$unix_path"
16098   fi
16099 
16100     # remove trailing .exe if any
16101     new_path="${new_path/%.exe/}"
16102 
16103     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16104     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16105   fi
16106 
16107   else
16108     # We're on a unix platform. Hooray! :)
16109     # First separate the path from the arguments. This will split at the first
16110     # space.
16111     complete="$FOUND_MAKE"
16112     path="${complete%% *}"
16113     tmp="$complete EOL"
16114     arguments="${tmp#* }"
16115 
16116     # Cannot rely on the command "which" here since it doesn't always work.
16117     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16118     if test -z "$is_absolute_path"; then
16119       # Path to executable is not absolute. Find it.
16120       IFS_save="$IFS"
16121       IFS=:
16122       for p in $PATH; do
16123         if test -f "$p/$path" && test -x "$p/$path"; then
16124           new_path="$p/$path"
16125           break
16126         fi
16127       done
16128       IFS="$IFS_save"
16129     else
16130       # This is an absolute path, we can use it without further modifications.
16131       new_path="$path"
16132     fi
16133 
16134     if test "x$new_path" = x; then
16135       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16136 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16137       has_space=`$ECHO "$complete" | $GREP " "`
16138       if test "x$has_space" != x; then
16139         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16140 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16141       fi
16142       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16143     fi
16144   fi
16145 
16146   # Now join together the path and the arguments once again
16147   if test "x$arguments" != xEOL; then
16148     new_complete="$new_path ${arguments% *}"
16149   else
16150     new_complete="$new_path"
16151   fi
16152 
16153   if test "x$complete" != "x$new_complete"; then
16154     FOUND_MAKE="$new_complete"
16155     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16156 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16157   fi
16158 
16159         fi
16160       fi
16161     fi
16162   fi
16163 
16164 
16165     if test "x$FOUND_MAKE" = x; then
16166       for ac_prog in make
16167 do
16168   # Extract the first word of "$ac_prog", so it can be a program name with args.
16169 set dummy $ac_prog; ac_word=$2
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16171 $as_echo_n "checking for $ac_word... " >&6; }
16172 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16173   $as_echo_n "(cached) " >&6
16174 else
16175   case $CHECK_MAKE in
16176   [\\/]* | ?:[\\/]*)
16177   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16178   ;;
16179   *)
16180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16181 for as_dir in $PATH
16182 do
16183   IFS=$as_save_IFS
16184   test -z "$as_dir" && as_dir=.
16185     for ac_exec_ext in '' $ac_executable_extensions; do
16186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16187     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16189     break 2
16190   fi
16191 done
16192   done
16193 IFS=$as_save_IFS
16194 
16195   ;;
16196 esac
16197 fi
16198 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16199 if test -n "$CHECK_MAKE"; then
16200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16201 $as_echo "$CHECK_MAKE" >&6; }
16202 else
16203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16204 $as_echo "no" >&6; }
16205 fi
16206 
16207 
16208   test -n "$CHECK_MAKE" && break
16209 done
16210 
16211 
16212   MAKE_CANDIDATE=""$CHECK_MAKE""
16213   DESCRIPTION="make in PATH"
16214   if test "x$MAKE_CANDIDATE" != x; then
16215     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16216 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16217     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16218     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16219     if test "x$IS_GNU_MAKE" = x; then
16220       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16221 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16222     else
16223       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16224       if test "x$IS_MODERN_MAKE" = x; then
16225         { $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
16226 $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;}
16227       else
16228         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16229           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16230             MAKE_EXPECTED_ENV='cygwin'
16231           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16232             MAKE_EXPECTED_ENV='msys'
16233           else
16234             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16235           fi
16236           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16237           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16238         else
16239           # Not relevant for non-Windows
16240           IS_MAKE_CORRECT_ENV=true
16241         fi
16242         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16243           { $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
16244 $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;}
16245         else
16246           FOUND_MAKE=$MAKE_CANDIDATE
16247 
16248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16249 
16250   # First separate the path from the arguments. This will split at the first
16251   # space.
16252   complete="$FOUND_MAKE"
16253   path="${complete%% *}"
16254   tmp="$complete EOL"
16255   arguments="${tmp#* }"
16256 
16257   # Input might be given as Windows format, start by converting to
16258   # unix format.
16259   new_path=`$CYGPATH -u "$path"`
16260 
16261   # Now try to locate executable using which
16262   new_path=`$WHICH "$new_path" 2> /dev/null`
16263   # bat and cmd files are not always considered executable in cygwin causing which
16264   # to not find them
16265   if test "x$new_path" = x \
16266       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16267       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16268     new_path=`$CYGPATH -u "$path"`
16269   fi
16270   if test "x$new_path" = x; then
16271     # Oops. Which didn't find the executable.
16272     # The splitting of arguments from the executable at a space might have been incorrect,
16273     # since paths with space are more likely in Windows. Give it another try with the whole
16274     # argument.
16275     path="$complete"
16276     arguments="EOL"
16277     new_path=`$CYGPATH -u "$path"`
16278     new_path=`$WHICH "$new_path" 2> /dev/null`
16279     # bat and cmd files are not always considered executable in cygwin causing which
16280     # to not find them
16281     if test "x$new_path" = x \
16282         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16283         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16284       new_path=`$CYGPATH -u "$path"`
16285     fi
16286     if test "x$new_path" = x; then
16287       # It's still not found. Now this is an unrecoverable error.
16288       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16289 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16290       has_space=`$ECHO "$complete" | $GREP " "`
16291       if test "x$has_space" != x; then
16292         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16294       fi
16295       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16296     fi
16297   fi
16298 
16299   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16300   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16301   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16302   # "foo.exe" is OK but "foo" is an error.
16303   #
16304   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16305   # It is also a way to make sure we got the proper file name for the real test later on.
16306   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16307   if test "x$test_shortpath" = x; then
16308     # Short path failed, file does not exist as specified.
16309     # Try adding .exe or .cmd
16310     if test -f "${new_path}.exe"; then
16311       input_to_shortpath="${new_path}.exe"
16312     elif test -f "${new_path}.cmd"; then
16313       input_to_shortpath="${new_path}.cmd"
16314     else
16315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16316 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16317       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16319       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16320     fi
16321   else
16322     input_to_shortpath="$new_path"
16323   fi
16324 
16325   # Call helper function which possibly converts this using DOS-style short mode.
16326   # If so, the updated path is stored in $new_path.
16327   new_path="$input_to_shortpath"
16328 
16329   input_path="$input_to_shortpath"
16330   # Check if we need to convert this using DOS-style short mode. If the path
16331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16332   # take no chances and rewrite it.
16333   # Note: m4 eats our [], so we need to use [ and ] instead.
16334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16335   if test "x$has_forbidden_chars" != x; then
16336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16340       # Going to short mode and back again did indeed matter. Since short mode is
16341       # case insensitive, let's make it lowercase to improve readability.
16342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16343       # Now convert it back to Unix-stile (cygpath)
16344       input_path=`$CYGPATH -u "$shortmode_path"`
16345       new_path="$input_path"
16346     fi
16347   fi
16348 
16349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16350   if test "x$test_cygdrive_prefix" = x; then
16351     # As a simple fix, exclude /usr/bin since it's not a real path.
16352     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16354       # a path prefixed by /cygdrive for fixpath to work.
16355       new_path="$CYGWIN_ROOT_PATH$input_path"
16356     fi
16357   fi
16358 
16359   # remove trailing .exe if any
16360   new_path="${new_path/%.exe/}"
16361 
16362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16363 
16364   # First separate the path from the arguments. This will split at the first
16365   # space.
16366   complete="$FOUND_MAKE"
16367   path="${complete%% *}"
16368   tmp="$complete EOL"
16369   arguments="${tmp#* }"
16370 
16371   # Input might be given as Windows format, start by converting to
16372   # unix format.
16373   new_path="$path"
16374 
16375   windows_path="$new_path"
16376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377     unix_path=`$CYGPATH -u "$windows_path"`
16378     new_path="$unix_path"
16379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16381     new_path="$unix_path"
16382   fi
16383 
16384 
16385   # Now try to locate executable using which
16386   new_path=`$WHICH "$new_path" 2> /dev/null`
16387 
16388   if test "x$new_path" = x; then
16389     # Oops. Which didn't find the executable.
16390     # The splitting of arguments from the executable at a space might have been incorrect,
16391     # since paths with space are more likely in Windows. Give it another try with the whole
16392     # argument.
16393     path="$complete"
16394     arguments="EOL"
16395     new_path="$path"
16396 
16397   windows_path="$new_path"
16398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16399     unix_path=`$CYGPATH -u "$windows_path"`
16400     new_path="$unix_path"
16401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16403     new_path="$unix_path"
16404   fi
16405 
16406 
16407     new_path=`$WHICH "$new_path" 2> /dev/null`
16408     # bat and cmd files are not always considered executable in MSYS causing which
16409     # to not find them
16410     if test "x$new_path" = x \
16411         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16412         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16413       new_path="$path"
16414 
16415   windows_path="$new_path"
16416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417     unix_path=`$CYGPATH -u "$windows_path"`
16418     new_path="$unix_path"
16419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421     new_path="$unix_path"
16422   fi
16423 
16424     fi
16425 
16426     if test "x$new_path" = x; then
16427       # It's still not found. Now this is an unrecoverable error.
16428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16429 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16430       has_space=`$ECHO "$complete" | $GREP " "`
16431       if test "x$has_space" != x; then
16432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16434       fi
16435       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16436     fi
16437   fi
16438 
16439   # Now new_path has a complete unix path to the binary
16440   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16441     # Keep paths in /bin as-is, but remove trailing .exe if any
16442     new_path="${new_path/%.exe/}"
16443     # Do not save /bin paths to all_fixpath_prefixes!
16444   else
16445     # Not in mixed or Windows style, start by that.
16446     new_path=`cmd //c echo $new_path`
16447 
16448   input_path="$new_path"
16449   # Check if we need to convert this using DOS-style short mode. If the path
16450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16451   # take no chances and rewrite it.
16452   # Note: m4 eats our [], so we need to use [ and ] instead.
16453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16454   if test "x$has_forbidden_chars" != x; then
16455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16456     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16457   fi
16458 
16459     # Output is in $new_path
16460 
16461   windows_path="$new_path"
16462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16463     unix_path=`$CYGPATH -u "$windows_path"`
16464     new_path="$unix_path"
16465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16467     new_path="$unix_path"
16468   fi
16469 
16470     # remove trailing .exe if any
16471     new_path="${new_path/%.exe/}"
16472 
16473     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16474     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16475   fi
16476 
16477   else
16478     # We're on a unix platform. Hooray! :)
16479     # First separate the path from the arguments. This will split at the first
16480     # space.
16481     complete="$FOUND_MAKE"
16482     path="${complete%% *}"
16483     tmp="$complete EOL"
16484     arguments="${tmp#* }"
16485 
16486     # Cannot rely on the command "which" here since it doesn't always work.
16487     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16488     if test -z "$is_absolute_path"; then
16489       # Path to executable is not absolute. Find it.
16490       IFS_save="$IFS"
16491       IFS=:
16492       for p in $PATH; do
16493         if test -f "$p/$path" && test -x "$p/$path"; then
16494           new_path="$p/$path"
16495           break
16496         fi
16497       done
16498       IFS="$IFS_save"
16499     else
16500       # This is an absolute path, we can use it without further modifications.
16501       new_path="$path"
16502     fi
16503 
16504     if test "x$new_path" = x; then
16505       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16506 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16507       has_space=`$ECHO "$complete" | $GREP " "`
16508       if test "x$has_space" != x; then
16509         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16510 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16511       fi
16512       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16513     fi
16514   fi
16515 
16516   # Now join together the path and the arguments once again
16517   if test "x$arguments" != xEOL; then
16518     new_complete="$new_path ${arguments% *}"
16519   else
16520     new_complete="$new_path"
16521   fi
16522 
16523   if test "x$complete" != "x$new_complete"; then
16524     FOUND_MAKE="$new_complete"
16525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16526 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16527   fi
16528 
16529         fi
16530       fi
16531     fi
16532   fi
16533 
16534     fi
16535 
16536     if test "x$FOUND_MAKE" = x; then
16537       if test "x$TOOLCHAIN_PATH" != x; then
16538         # We have a toolchain path, check that as well before giving up.
16539         OLD_PATH=$PATH
16540         PATH=$TOOLCHAIN_PATH:$PATH
16541         for ac_prog in gmake
16542 do
16543   # Extract the first word of "$ac_prog", so it can be a program name with args.
16544 set dummy $ac_prog; ac_word=$2
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16546 $as_echo_n "checking for $ac_word... " >&6; }
16547 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16548   $as_echo_n "(cached) " >&6
16549 else
16550   case $CHECK_TOOLSDIR_GMAKE in
16551   [\\/]* | ?:[\\/]*)
16552   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16553   ;;
16554   *)
16555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16556 for as_dir in $PATH
16557 do
16558   IFS=$as_save_IFS
16559   test -z "$as_dir" && as_dir=.
16560     for ac_exec_ext in '' $ac_executable_extensions; do
16561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16562     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16564     break 2
16565   fi
16566 done
16567   done
16568 IFS=$as_save_IFS
16569 
16570   ;;
16571 esac
16572 fi
16573 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16574 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16576 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16577 else
16578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16579 $as_echo "no" >&6; }
16580 fi
16581 
16582 
16583   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16584 done
16585 
16586 
16587   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16588   DESCRIPTION="gmake in tools-dir"
16589   if test "x$MAKE_CANDIDATE" != x; then
16590     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16591 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16592     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16593     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16594     if test "x$IS_GNU_MAKE" = x; then
16595       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16596 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16597     else
16598       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16599       if test "x$IS_MODERN_MAKE" = x; then
16600         { $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
16601 $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;}
16602       else
16603         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16604           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16605             MAKE_EXPECTED_ENV='cygwin'
16606           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16607             MAKE_EXPECTED_ENV='msys'
16608           else
16609             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16610           fi
16611           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16612           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16613         else
16614           # Not relevant for non-Windows
16615           IS_MAKE_CORRECT_ENV=true
16616         fi
16617         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16618           { $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
16619 $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;}
16620         else
16621           FOUND_MAKE=$MAKE_CANDIDATE
16622 
16623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16624 
16625   # First separate the path from the arguments. This will split at the first
16626   # space.
16627   complete="$FOUND_MAKE"
16628   path="${complete%% *}"
16629   tmp="$complete EOL"
16630   arguments="${tmp#* }"
16631 
16632   # Input might be given as Windows format, start by converting to
16633   # unix format.
16634   new_path=`$CYGPATH -u "$path"`
16635 
16636   # Now try to locate executable using which
16637   new_path=`$WHICH "$new_path" 2> /dev/null`
16638   # bat and cmd files are not always considered executable in cygwin causing which
16639   # to not find them
16640   if test "x$new_path" = x \
16641       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16642       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16643     new_path=`$CYGPATH -u "$path"`
16644   fi
16645   if test "x$new_path" = x; then
16646     # Oops. Which didn't find the executable.
16647     # The splitting of arguments from the executable at a space might have been incorrect,
16648     # since paths with space are more likely in Windows. Give it another try with the whole
16649     # argument.
16650     path="$complete"
16651     arguments="EOL"
16652     new_path=`$CYGPATH -u "$path"`
16653     new_path=`$WHICH "$new_path" 2> /dev/null`
16654     # bat and cmd files are not always considered executable in cygwin causing which
16655     # to not find them
16656     if test "x$new_path" = x \
16657         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16658         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16659       new_path=`$CYGPATH -u "$path"`
16660     fi
16661     if test "x$new_path" = x; then
16662       # It's still not found. Now this is an unrecoverable error.
16663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16664 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16665       has_space=`$ECHO "$complete" | $GREP " "`
16666       if test "x$has_space" != x; then
16667         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16668 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16669       fi
16670       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16671     fi
16672   fi
16673 
16674   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16675   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16676   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16677   # "foo.exe" is OK but "foo" is an error.
16678   #
16679   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16680   # It is also a way to make sure we got the proper file name for the real test later on.
16681   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16682   if test "x$test_shortpath" = x; then
16683     # Short path failed, file does not exist as specified.
16684     # Try adding .exe or .cmd
16685     if test -f "${new_path}.exe"; then
16686       input_to_shortpath="${new_path}.exe"
16687     elif test -f "${new_path}.cmd"; then
16688       input_to_shortpath="${new_path}.cmd"
16689     else
16690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16691 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16692       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16693 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16694       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16695     fi
16696   else
16697     input_to_shortpath="$new_path"
16698   fi
16699 
16700   # Call helper function which possibly converts this using DOS-style short mode.
16701   # If so, the updated path is stored in $new_path.
16702   new_path="$input_to_shortpath"
16703 
16704   input_path="$input_to_shortpath"
16705   # Check if we need to convert this using DOS-style short mode. If the path
16706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16707   # take no chances and rewrite it.
16708   # Note: m4 eats our [], so we need to use [ and ] instead.
16709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16710   if test "x$has_forbidden_chars" != x; then
16711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16712     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16713     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16714     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16715       # Going to short mode and back again did indeed matter. Since short mode is
16716       # case insensitive, let's make it lowercase to improve readability.
16717       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16718       # Now convert it back to Unix-stile (cygpath)
16719       input_path=`$CYGPATH -u "$shortmode_path"`
16720       new_path="$input_path"
16721     fi
16722   fi
16723 
16724   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16725   if test "x$test_cygdrive_prefix" = x; then
16726     # As a simple fix, exclude /usr/bin since it's not a real path.
16727     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16728       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16729       # a path prefixed by /cygdrive for fixpath to work.
16730       new_path="$CYGWIN_ROOT_PATH$input_path"
16731     fi
16732   fi
16733 
16734   # remove trailing .exe if any
16735   new_path="${new_path/%.exe/}"
16736 
16737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16738 
16739   # First separate the path from the arguments. This will split at the first
16740   # space.
16741   complete="$FOUND_MAKE"
16742   path="${complete%% *}"
16743   tmp="$complete EOL"
16744   arguments="${tmp#* }"
16745 
16746   # Input might be given as Windows format, start by converting to
16747   # unix format.
16748   new_path="$path"
16749 
16750   windows_path="$new_path"
16751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16752     unix_path=`$CYGPATH -u "$windows_path"`
16753     new_path="$unix_path"
16754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16756     new_path="$unix_path"
16757   fi
16758 
16759 
16760   # Now try to locate executable using which
16761   new_path=`$WHICH "$new_path" 2> /dev/null`
16762 
16763   if test "x$new_path" = x; then
16764     # Oops. Which didn't find the executable.
16765     # The splitting of arguments from the executable at a space might have been incorrect,
16766     # since paths with space are more likely in Windows. Give it another try with the whole
16767     # argument.
16768     path="$complete"
16769     arguments="EOL"
16770     new_path="$path"
16771 
16772   windows_path="$new_path"
16773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16774     unix_path=`$CYGPATH -u "$windows_path"`
16775     new_path="$unix_path"
16776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16778     new_path="$unix_path"
16779   fi
16780 
16781 
16782     new_path=`$WHICH "$new_path" 2> /dev/null`
16783     # bat and cmd files are not always considered executable in MSYS causing which
16784     # to not find them
16785     if test "x$new_path" = x \
16786         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16787         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16788       new_path="$path"
16789 
16790   windows_path="$new_path"
16791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16792     unix_path=`$CYGPATH -u "$windows_path"`
16793     new_path="$unix_path"
16794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16795     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16796     new_path="$unix_path"
16797   fi
16798 
16799     fi
16800 
16801     if test "x$new_path" = x; then
16802       # It's still not found. Now this is an unrecoverable error.
16803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16804 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16805       has_space=`$ECHO "$complete" | $GREP " "`
16806       if test "x$has_space" != x; then
16807         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16808 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16809       fi
16810       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16811     fi
16812   fi
16813 
16814   # Now new_path has a complete unix path to the binary
16815   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16816     # Keep paths in /bin as-is, but remove trailing .exe if any
16817     new_path="${new_path/%.exe/}"
16818     # Do not save /bin paths to all_fixpath_prefixes!
16819   else
16820     # Not in mixed or Windows style, start by that.
16821     new_path=`cmd //c echo $new_path`
16822 
16823   input_path="$new_path"
16824   # Check if we need to convert this using DOS-style short mode. If the path
16825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16826   # take no chances and rewrite it.
16827   # Note: m4 eats our [], so we need to use [ and ] instead.
16828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16829   if test "x$has_forbidden_chars" != x; then
16830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16831     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16832   fi
16833 
16834     # Output is in $new_path
16835 
16836   windows_path="$new_path"
16837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16838     unix_path=`$CYGPATH -u "$windows_path"`
16839     new_path="$unix_path"
16840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16842     new_path="$unix_path"
16843   fi
16844 
16845     # remove trailing .exe if any
16846     new_path="${new_path/%.exe/}"
16847 
16848     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16849     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16850   fi
16851 
16852   else
16853     # We're on a unix platform. Hooray! :)
16854     # First separate the path from the arguments. This will split at the first
16855     # space.
16856     complete="$FOUND_MAKE"
16857     path="${complete%% *}"
16858     tmp="$complete EOL"
16859     arguments="${tmp#* }"
16860 
16861     # Cannot rely on the command "which" here since it doesn't always work.
16862     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16863     if test -z "$is_absolute_path"; then
16864       # Path to executable is not absolute. Find it.
16865       IFS_save="$IFS"
16866       IFS=:
16867       for p in $PATH; do
16868         if test -f "$p/$path" && test -x "$p/$path"; then
16869           new_path="$p/$path"
16870           break
16871         fi
16872       done
16873       IFS="$IFS_save"
16874     else
16875       # This is an absolute path, we can use it without further modifications.
16876       new_path="$path"
16877     fi
16878 
16879     if test "x$new_path" = x; then
16880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16881 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16882       has_space=`$ECHO "$complete" | $GREP " "`
16883       if test "x$has_space" != x; then
16884         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16885 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16886       fi
16887       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16888     fi
16889   fi
16890 
16891   # Now join together the path and the arguments once again
16892   if test "x$arguments" != xEOL; then
16893     new_complete="$new_path ${arguments% *}"
16894   else
16895     new_complete="$new_path"
16896   fi
16897 
16898   if test "x$complete" != "x$new_complete"; then
16899     FOUND_MAKE="$new_complete"
16900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16901 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16902   fi
16903 
16904         fi
16905       fi
16906     fi
16907   fi
16908 
16909         if test "x$FOUND_MAKE" = x; then
16910           for ac_prog in make
16911 do
16912   # Extract the first word of "$ac_prog", so it can be a program name with args.
16913 set dummy $ac_prog; ac_word=$2
16914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16915 $as_echo_n "checking for $ac_word... " >&6; }
16916 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16917   $as_echo_n "(cached) " >&6
16918 else
16919   case $CHECK_TOOLSDIR_MAKE in
16920   [\\/]* | ?:[\\/]*)
16921   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16922   ;;
16923   *)
16924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16925 for as_dir in $PATH
16926 do
16927   IFS=$as_save_IFS
16928   test -z "$as_dir" && as_dir=.
16929     for ac_exec_ext in '' $ac_executable_extensions; do
16930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16931     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16933     break 2
16934   fi
16935 done
16936   done
16937 IFS=$as_save_IFS
16938 
16939   ;;
16940 esac
16941 fi
16942 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16943 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16945 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16946 else
16947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16948 $as_echo "no" >&6; }
16949 fi
16950 
16951 
16952   test -n "$CHECK_TOOLSDIR_MAKE" && break
16953 done
16954 
16955 
16956   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16957   DESCRIPTION="make in tools-dir"
16958   if test "x$MAKE_CANDIDATE" != x; then
16959     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16960 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16961     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16962     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16963     if test "x$IS_GNU_MAKE" = x; then
16964       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16965 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16966     else
16967       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16968       if test "x$IS_MODERN_MAKE" = x; then
16969         { $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
16970 $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;}
16971       else
16972         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16973           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16974             MAKE_EXPECTED_ENV='cygwin'
16975           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976             MAKE_EXPECTED_ENV='msys'
16977           else
16978             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16979           fi
16980           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16981           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16982         else
16983           # Not relevant for non-Windows
16984           IS_MAKE_CORRECT_ENV=true
16985         fi
16986         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16987           { $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
16988 $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;}
16989         else
16990           FOUND_MAKE=$MAKE_CANDIDATE
16991 
16992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16993 
16994   # First separate the path from the arguments. This will split at the first
16995   # space.
16996   complete="$FOUND_MAKE"
16997   path="${complete%% *}"
16998   tmp="$complete EOL"
16999   arguments="${tmp#* }"
17000 
17001   # Input might be given as Windows format, start by converting to
17002   # unix format.
17003   new_path=`$CYGPATH -u "$path"`
17004 
17005   # Now try to locate executable using which
17006   new_path=`$WHICH "$new_path" 2> /dev/null`
17007   # bat and cmd files are not always considered executable in cygwin causing which
17008   # to not find them
17009   if test "x$new_path" = x \
17010       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17011       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17012     new_path=`$CYGPATH -u "$path"`
17013   fi
17014   if test "x$new_path" = x; then
17015     # Oops. Which didn't find the executable.
17016     # The splitting of arguments from the executable at a space might have been incorrect,
17017     # since paths with space are more likely in Windows. Give it another try with the whole
17018     # argument.
17019     path="$complete"
17020     arguments="EOL"
17021     new_path=`$CYGPATH -u "$path"`
17022     new_path=`$WHICH "$new_path" 2> /dev/null`
17023     # bat and cmd files are not always considered executable in cygwin causing which
17024     # to not find them
17025     if test "x$new_path" = x \
17026         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17027         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17028       new_path=`$CYGPATH -u "$path"`
17029     fi
17030     if test "x$new_path" = x; then
17031       # It's still not found. Now this is an unrecoverable error.
17032       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17033 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17034       has_space=`$ECHO "$complete" | $GREP " "`
17035       if test "x$has_space" != x; then
17036         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17037 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17038       fi
17039       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17040     fi
17041   fi
17042 
17043   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17044   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17045   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17046   # "foo.exe" is OK but "foo" is an error.
17047   #
17048   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17049   # It is also a way to make sure we got the proper file name for the real test later on.
17050   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17051   if test "x$test_shortpath" = x; then
17052     # Short path failed, file does not exist as specified.
17053     # Try adding .exe or .cmd
17054     if test -f "${new_path}.exe"; then
17055       input_to_shortpath="${new_path}.exe"
17056     elif test -f "${new_path}.cmd"; then
17057       input_to_shortpath="${new_path}.cmd"
17058     else
17059       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17060 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17061       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17062 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17063       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17064     fi
17065   else
17066     input_to_shortpath="$new_path"
17067   fi
17068 
17069   # Call helper function which possibly converts this using DOS-style short mode.
17070   # If so, the updated path is stored in $new_path.
17071   new_path="$input_to_shortpath"
17072 
17073   input_path="$input_to_shortpath"
17074   # Check if we need to convert this using DOS-style short mode. If the path
17075   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17076   # take no chances and rewrite it.
17077   # Note: m4 eats our [], so we need to use [ and ] instead.
17078   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17079   if test "x$has_forbidden_chars" != x; then
17080     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17081     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17082     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17083     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17084       # Going to short mode and back again did indeed matter. Since short mode is
17085       # case insensitive, let's make it lowercase to improve readability.
17086       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17087       # Now convert it back to Unix-stile (cygpath)
17088       input_path=`$CYGPATH -u "$shortmode_path"`
17089       new_path="$input_path"
17090     fi
17091   fi
17092 
17093   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17094   if test "x$test_cygdrive_prefix" = x; then
17095     # As a simple fix, exclude /usr/bin since it's not a real path.
17096     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17097       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17098       # a path prefixed by /cygdrive for fixpath to work.
17099       new_path="$CYGWIN_ROOT_PATH$input_path"
17100     fi
17101   fi
17102 
17103   # remove trailing .exe if any
17104   new_path="${new_path/%.exe/}"
17105 
17106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17107 
17108   # First separate the path from the arguments. This will split at the first
17109   # space.
17110   complete="$FOUND_MAKE"
17111   path="${complete%% *}"
17112   tmp="$complete EOL"
17113   arguments="${tmp#* }"
17114 
17115   # Input might be given as Windows format, start by converting to
17116   # unix format.
17117   new_path="$path"
17118 
17119   windows_path="$new_path"
17120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17121     unix_path=`$CYGPATH -u "$windows_path"`
17122     new_path="$unix_path"
17123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17125     new_path="$unix_path"
17126   fi
17127 
17128 
17129   # Now try to locate executable using which
17130   new_path=`$WHICH "$new_path" 2> /dev/null`
17131 
17132   if test "x$new_path" = x; then
17133     # Oops. Which didn't find the executable.
17134     # The splitting of arguments from the executable at a space might have been incorrect,
17135     # since paths with space are more likely in Windows. Give it another try with the whole
17136     # argument.
17137     path="$complete"
17138     arguments="EOL"
17139     new_path="$path"
17140 
17141   windows_path="$new_path"
17142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17143     unix_path=`$CYGPATH -u "$windows_path"`
17144     new_path="$unix_path"
17145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17147     new_path="$unix_path"
17148   fi
17149 
17150 
17151     new_path=`$WHICH "$new_path" 2> /dev/null`
17152     # bat and cmd files are not always considered executable in MSYS causing which
17153     # to not find them
17154     if test "x$new_path" = x \
17155         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17156         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17157       new_path="$path"
17158 
17159   windows_path="$new_path"
17160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17161     unix_path=`$CYGPATH -u "$windows_path"`
17162     new_path="$unix_path"
17163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17165     new_path="$unix_path"
17166   fi
17167 
17168     fi
17169 
17170     if test "x$new_path" = x; then
17171       # It's still not found. Now this is an unrecoverable error.
17172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17173 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17174       has_space=`$ECHO "$complete" | $GREP " "`
17175       if test "x$has_space" != x; then
17176         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17178       fi
17179       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17180     fi
17181   fi
17182 
17183   # Now new_path has a complete unix path to the binary
17184   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17185     # Keep paths in /bin as-is, but remove trailing .exe if any
17186     new_path="${new_path/%.exe/}"
17187     # Do not save /bin paths to all_fixpath_prefixes!
17188   else
17189     # Not in mixed or Windows style, start by that.
17190     new_path=`cmd //c echo $new_path`
17191 
17192   input_path="$new_path"
17193   # Check if we need to convert this using DOS-style short mode. If the path
17194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17195   # take no chances and rewrite it.
17196   # Note: m4 eats our [], so we need to use [ and ] instead.
17197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17198   if test "x$has_forbidden_chars" != x; then
17199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17201   fi
17202 
17203     # Output is in $new_path
17204 
17205   windows_path="$new_path"
17206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17207     unix_path=`$CYGPATH -u "$windows_path"`
17208     new_path="$unix_path"
17209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17211     new_path="$unix_path"
17212   fi
17213 
17214     # remove trailing .exe if any
17215     new_path="${new_path/%.exe/}"
17216 
17217     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17218     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17219   fi
17220 
17221   else
17222     # We're on a unix platform. Hooray! :)
17223     # First separate the path from the arguments. This will split at the first
17224     # space.
17225     complete="$FOUND_MAKE"
17226     path="${complete%% *}"
17227     tmp="$complete EOL"
17228     arguments="${tmp#* }"
17229 
17230     # Cannot rely on the command "which" here since it doesn't always work.
17231     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17232     if test -z "$is_absolute_path"; then
17233       # Path to executable is not absolute. Find it.
17234       IFS_save="$IFS"
17235       IFS=:
17236       for p in $PATH; do
17237         if test -f "$p/$path" && test -x "$p/$path"; then
17238           new_path="$p/$path"
17239           break
17240         fi
17241       done
17242       IFS="$IFS_save"
17243     else
17244       # This is an absolute path, we can use it without further modifications.
17245       new_path="$path"
17246     fi
17247 
17248     if test "x$new_path" = x; then
17249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17250 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17251       has_space=`$ECHO "$complete" | $GREP " "`
17252       if test "x$has_space" != x; then
17253         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17254 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17255       fi
17256       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17257     fi
17258   fi
17259 
17260   # Now join together the path and the arguments once again
17261   if test "x$arguments" != xEOL; then
17262     new_complete="$new_path ${arguments% *}"
17263   else
17264     new_complete="$new_path"
17265   fi
17266 
17267   if test "x$complete" != "x$new_complete"; then
17268     FOUND_MAKE="$new_complete"
17269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17270 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17271   fi
17272 
17273         fi
17274       fi
17275     fi
17276   fi
17277 
17278         fi
17279         PATH=$OLD_PATH
17280       fi
17281     fi
17282 
17283     if test "x$FOUND_MAKE" = x; then
17284       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
17285     fi
17286   fi
17287 
17288   MAKE=$FOUND_MAKE
17289 
17290   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17291 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17292 
17293 
17294   # Check if make supports the output sync option and if so, setup using it.
17295   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17296 $as_echo_n "checking if make --output-sync is supported... " >&6; }
17297   if $MAKE --version -O > /dev/null 2>&1; then
17298     OUTPUT_SYNC_SUPPORTED=true
17299     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17300 $as_echo "yes" >&6; }
17301     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17302 $as_echo_n "checking for output-sync value... " >&6; }
17303 
17304 # Check whether --with-output-sync was given.
17305 if test "${with_output_sync+set}" = set; then :
17306   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17307 fi
17308 
17309     if test "x$OUTPUT_SYNC" = "x"; then
17310       OUTPUT_SYNC=none
17311     fi
17312     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17313 $as_echo "$OUTPUT_SYNC" >&6; }
17314     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17315       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17316     fi
17317   else
17318     OUTPUT_SYNC_SUPPORTED=false
17319     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17320 $as_echo "no" >&6; }
17321   fi
17322 
17323 
17324 
17325 
17326 
17327 
17328   # Test if find supports -delete
17329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17330 $as_echo_n "checking if find supports -delete... " >&6; }
17331   FIND_DELETE="-delete"
17332 
17333   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17334 
17335   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17336 
17337   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17338   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17339     # No, it does not.
17340     rm $DELETEDIR/TestIfFindSupportsDelete
17341     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17342       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17343       FIND_DELETE="-print | xargs rm"
17344     else
17345       FIND_DELETE="-exec rm \{\} \+"
17346     fi
17347     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348 $as_echo "no" >&6; }
17349   else
17350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17351 $as_echo "yes" >&6; }
17352   fi
17353   rmdir $DELETEDIR
17354 
17355 
17356 
17357   # These tools might not be installed by default,
17358   # need hint on how to install them.
17359 
17360 
17361 
17362   # Publish this variable in the help.
17363 
17364 
17365   if test "x$UNZIP" = x; then
17366     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
17414 
17415     # Try to remove the string !UNZIP! from our list.
17416     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17417     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17418       # If it failed, the variable was not from the command line. Ignore it,
17419       # but warn the user (except for BASH, which is always set by the calling BASH).
17420       if test "xUNZIP" != xBASH; then
17421         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17422 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17423       fi
17424       # Try to locate tool using the code snippet
17425       for ac_prog in unzip
17426 do
17427   # Extract the first word of "$ac_prog", so it can be a program name with args.
17428 set dummy $ac_prog; 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   test -n "$UNZIP" && break
17468 done
17469 
17470     else
17471       # If it succeeded, then it was overridden by the user. We will use it
17472       # for the tool.
17473 
17474       # First remove it from the list of overridden variables, so we can test
17475       # for unknown variables in the end.
17476       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17477 
17478       # Check if the provided tool contains a complete path.
17479       tool_specified="$UNZIP"
17480       tool_basename="${tool_specified##*/}"
17481       if test "x$tool_basename" = "x$tool_specified"; then
17482         # A command without a complete path is provided, search $PATH.
17483         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17484 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17485         # Extract the first word of "$tool_basename", so it can be a program name with args.
17486 set dummy $tool_basename; ac_word=$2
17487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17488 $as_echo_n "checking for $ac_word... " >&6; }
17489 if ${ac_cv_path_UNZIP+:} false; then :
17490   $as_echo_n "(cached) " >&6
17491 else
17492   case $UNZIP in
17493   [\\/]* | ?:[\\/]*)
17494   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17495   ;;
17496   *)
17497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17498 for as_dir in $PATH
17499 do
17500   IFS=$as_save_IFS
17501   test -z "$as_dir" && as_dir=.
17502     for ac_exec_ext in '' $ac_executable_extensions; do
17503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17504     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17506     break 2
17507   fi
17508 done
17509   done
17510 IFS=$as_save_IFS
17511 
17512   ;;
17513 esac
17514 fi
17515 UNZIP=$ac_cv_path_UNZIP
17516 if test -n "$UNZIP"; then
17517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17518 $as_echo "$UNZIP" >&6; }
17519 else
17520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521 $as_echo "no" >&6; }
17522 fi
17523 
17524 
17525         if test "x$UNZIP" = x; then
17526           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17527         fi
17528       else
17529         # Otherwise we believe it is a complete path. Use it as it is.
17530         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17531 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17532         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17533 $as_echo_n "checking for UNZIP... " >&6; }
17534         if test ! -x "$tool_specified"; then
17535           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17536 $as_echo "not found" >&6; }
17537           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17538         fi
17539         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17540 $as_echo "$tool_specified" >&6; }
17541       fi
17542     fi
17543   fi
17544 
17545 
17546 
17547   if test "x$UNZIP" = x; then
17548     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17549   fi
17550 
17551 
17552 
17553 
17554 
17555   # Publish this variable in the help.
17556 
17557 
17558   if test "x$ZIP" = x; then
17559     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
17607 
17608     # Try to remove the string !ZIP! from our list.
17609     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17610     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17611       # If it failed, the variable was not from the command line. Ignore it,
17612       # but warn the user (except for BASH, which is always set by the calling BASH).
17613       if test "xZIP" != xBASH; then
17614         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17615 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17616       fi
17617       # Try to locate tool using the code snippet
17618       for ac_prog in zip
17619 do
17620   # Extract the first word of "$ac_prog", so it can be a program name with args.
17621 set dummy $ac_prog; 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   test -n "$ZIP" && break
17661 done
17662 
17663     else
17664       # If it succeeded, then it was overridden by the user. We will use it
17665       # for the tool.
17666 
17667       # First remove it from the list of overridden variables, so we can test
17668       # for unknown variables in the end.
17669       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17670 
17671       # Check if the provided tool contains a complete path.
17672       tool_specified="$ZIP"
17673       tool_basename="${tool_specified##*/}"
17674       if test "x$tool_basename" = "x$tool_specified"; then
17675         # A command without a complete path is provided, search $PATH.
17676         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17677 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17678         # Extract the first word of "$tool_basename", so it can be a program name with args.
17679 set dummy $tool_basename; ac_word=$2
17680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17681 $as_echo_n "checking for $ac_word... " >&6; }
17682 if ${ac_cv_path_ZIP+:} false; then :
17683   $as_echo_n "(cached) " >&6
17684 else
17685   case $ZIP in
17686   [\\/]* | ?:[\\/]*)
17687   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17688   ;;
17689   *)
17690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17691 for as_dir in $PATH
17692 do
17693   IFS=$as_save_IFS
17694   test -z "$as_dir" && as_dir=.
17695     for ac_exec_ext in '' $ac_executable_extensions; do
17696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17697     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17699     break 2
17700   fi
17701 done
17702   done
17703 IFS=$as_save_IFS
17704 
17705   ;;
17706 esac
17707 fi
17708 ZIP=$ac_cv_path_ZIP
17709 if test -n "$ZIP"; then
17710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17711 $as_echo "$ZIP" >&6; }
17712 else
17713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17714 $as_echo "no" >&6; }
17715 fi
17716 
17717 
17718         if test "x$ZIP" = x; then
17719           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17720         fi
17721       else
17722         # Otherwise we believe it is a complete path. Use it as it is.
17723         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17724 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17726 $as_echo_n "checking for ZIP... " >&6; }
17727         if test ! -x "$tool_specified"; then
17728           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17729 $as_echo "not found" >&6; }
17730           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17731         fi
17732         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17733 $as_echo "$tool_specified" >&6; }
17734       fi
17735     fi
17736   fi
17737 
17738 
17739 
17740   if test "x$ZIP" = x; then
17741     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17742   fi
17743 
17744 
17745 
17746   # Non-required basic tools
17747 
17748 
17749 
17750   # Publish this variable in the help.
17751 
17752 
17753   if test "x$LDD" = x; then
17754     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
17802 
17803     # Try to remove the string !LDD! from our list.
17804     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17805     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17806       # If it failed, the variable was not from the command line. Ignore it,
17807       # but warn the user (except for BASH, which is always set by the calling BASH).
17808       if test "xLDD" != xBASH; then
17809         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17810 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17811       fi
17812       # Try to locate tool using the code snippet
17813       for ac_prog in ldd
17814 do
17815   # Extract the first word of "$ac_prog", so it can be a program name with args.
17816 set dummy $ac_prog; 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   test -n "$LDD" && break
17856 done
17857 
17858     else
17859       # If it succeeded, then it was overridden by the user. We will use it
17860       # for the tool.
17861 
17862       # First remove it from the list of overridden variables, so we can test
17863       # for unknown variables in the end.
17864       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17865 
17866       # Check if the provided tool contains a complete path.
17867       tool_specified="$LDD"
17868       tool_basename="${tool_specified##*/}"
17869       if test "x$tool_basename" = "x$tool_specified"; then
17870         # A command without a complete path is provided, search $PATH.
17871         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17872 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17873         # Extract the first word of "$tool_basename", so it can be a program name with args.
17874 set dummy $tool_basename; ac_word=$2
17875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17876 $as_echo_n "checking for $ac_word... " >&6; }
17877 if ${ac_cv_path_LDD+:} false; then :
17878   $as_echo_n "(cached) " >&6
17879 else
17880   case $LDD in
17881   [\\/]* | ?:[\\/]*)
17882   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17883   ;;
17884   *)
17885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17886 for as_dir in $PATH
17887 do
17888   IFS=$as_save_IFS
17889   test -z "$as_dir" && as_dir=.
17890     for ac_exec_ext in '' $ac_executable_extensions; do
17891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17892     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17894     break 2
17895   fi
17896 done
17897   done
17898 IFS=$as_save_IFS
17899 
17900   ;;
17901 esac
17902 fi
17903 LDD=$ac_cv_path_LDD
17904 if test -n "$LDD"; then
17905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17906 $as_echo "$LDD" >&6; }
17907 else
17908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17909 $as_echo "no" >&6; }
17910 fi
17911 
17912 
17913         if test "x$LDD" = x; then
17914           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17915         fi
17916       else
17917         # Otherwise we believe it is a complete path. Use it as it is.
17918         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17919 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17920         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17921 $as_echo_n "checking for LDD... " >&6; }
17922         if test ! -x "$tool_specified"; then
17923           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17924 $as_echo "not found" >&6; }
17925           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17926         fi
17927         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17928 $as_echo "$tool_specified" >&6; }
17929       fi
17930     fi
17931   fi
17932 
17933 
17934   if test "x$LDD" = "x"; then
17935     # List shared lib dependencies is used for
17936     # debug output and checking for forbidden dependencies.
17937     # We can build without it.
17938     LDD="true"
17939   fi
17940 
17941 
17942   # Publish this variable in the help.
17943 
17944 
17945   if test "x$OTOOL" = x; then
17946     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
17994 
17995     # Try to remove the string !OTOOL! from our list.
17996     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17997     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17998       # If it failed, the variable was not from the command line. Ignore it,
17999       # but warn the user (except for BASH, which is always set by the calling BASH).
18000       if test "xOTOOL" != xBASH; then
18001         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18002 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18003       fi
18004       # Try to locate tool using the code snippet
18005       for ac_prog in otool
18006 do
18007   # Extract the first word of "$ac_prog", so it can be a program name with args.
18008 set dummy $ac_prog; 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   test -n "$OTOOL" && break
18048 done
18049 
18050     else
18051       # If it succeeded, then it was overridden by the user. We will use it
18052       # for the tool.
18053 
18054       # First remove it from the list of overridden variables, so we can test
18055       # for unknown variables in the end.
18056       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18057 
18058       # Check if the provided tool contains a complete path.
18059       tool_specified="$OTOOL"
18060       tool_basename="${tool_specified##*/}"
18061       if test "x$tool_basename" = "x$tool_specified"; then
18062         # A command without a complete path is provided, search $PATH.
18063         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18064 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18065         # Extract the first word of "$tool_basename", so it can be a program name with args.
18066 set dummy $tool_basename; ac_word=$2
18067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18068 $as_echo_n "checking for $ac_word... " >&6; }
18069 if ${ac_cv_path_OTOOL+:} false; then :
18070   $as_echo_n "(cached) " >&6
18071 else
18072   case $OTOOL in
18073   [\\/]* | ?:[\\/]*)
18074   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18075   ;;
18076   *)
18077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18078 for as_dir in $PATH
18079 do
18080   IFS=$as_save_IFS
18081   test -z "$as_dir" && as_dir=.
18082     for ac_exec_ext in '' $ac_executable_extensions; do
18083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18084     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18086     break 2
18087   fi
18088 done
18089   done
18090 IFS=$as_save_IFS
18091 
18092   ;;
18093 esac
18094 fi
18095 OTOOL=$ac_cv_path_OTOOL
18096 if test -n "$OTOOL"; then
18097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18098 $as_echo "$OTOOL" >&6; }
18099 else
18100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18101 $as_echo "no" >&6; }
18102 fi
18103 
18104 
18105         if test "x$OTOOL" = x; then
18106           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18107         fi
18108       else
18109         # Otherwise we believe it is a complete path. Use it as it is.
18110         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18111 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18112         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18113 $as_echo_n "checking for OTOOL... " >&6; }
18114         if test ! -x "$tool_specified"; then
18115           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18116 $as_echo "not found" >&6; }
18117           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18118         fi
18119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18120 $as_echo "$tool_specified" >&6; }
18121       fi
18122     fi
18123   fi
18124 
18125 
18126   if test "x$OTOOL" = "x"; then
18127     OTOOL="true"
18128   fi
18129 
18130 
18131   # Publish this variable in the help.
18132 
18133 
18134   if test "x$READELF" = x; then
18135     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
18183 
18184     # Try to remove the string !READELF! from our list.
18185     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18186     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18187       # If it failed, the variable was not from the command line. Ignore it,
18188       # but warn the user (except for BASH, which is always set by the calling BASH).
18189       if test "xREADELF" != xBASH; then
18190         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18191 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18192       fi
18193       # Try to locate tool using the code snippet
18194       for ac_prog in greadelf readelf
18195 do
18196   # Extract the first word of "$ac_prog", so it can be a program name with args.
18197 set dummy $ac_prog; 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   test -n "$READELF" && break
18237 done
18238 
18239     else
18240       # If it succeeded, then it was overridden by the user. We will use it
18241       # for the tool.
18242 
18243       # First remove it from the list of overridden variables, so we can test
18244       # for unknown variables in the end.
18245       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18246 
18247       # Check if the provided tool contains a complete path.
18248       tool_specified="$READELF"
18249       tool_basename="${tool_specified##*/}"
18250       if test "x$tool_basename" = "x$tool_specified"; then
18251         # A command without a complete path is provided, search $PATH.
18252         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18253 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18254         # Extract the first word of "$tool_basename", so it can be a program name with args.
18255 set dummy $tool_basename; ac_word=$2
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18257 $as_echo_n "checking for $ac_word... " >&6; }
18258 if ${ac_cv_path_READELF+:} false; then :
18259   $as_echo_n "(cached) " >&6
18260 else
18261   case $READELF in
18262   [\\/]* | ?:[\\/]*)
18263   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18264   ;;
18265   *)
18266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18267 for as_dir in $PATH
18268 do
18269   IFS=$as_save_IFS
18270   test -z "$as_dir" && as_dir=.
18271     for ac_exec_ext in '' $ac_executable_extensions; do
18272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18273     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18275     break 2
18276   fi
18277 done
18278   done
18279 IFS=$as_save_IFS
18280 
18281   ;;
18282 esac
18283 fi
18284 READELF=$ac_cv_path_READELF
18285 if test -n "$READELF"; then
18286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18287 $as_echo "$READELF" >&6; }
18288 else
18289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18290 $as_echo "no" >&6; }
18291 fi
18292 
18293 
18294         if test "x$READELF" = x; then
18295           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18296         fi
18297       else
18298         # Otherwise we believe it is a complete path. Use it as it is.
18299         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18300 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18302 $as_echo_n "checking for READELF... " >&6; }
18303         if test ! -x "$tool_specified"; then
18304           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18305 $as_echo "not found" >&6; }
18306           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18307         fi
18308         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18309 $as_echo "$tool_specified" >&6; }
18310       fi
18311     fi
18312   fi
18313 
18314 
18315 
18316 
18317   # Publish this variable in the help.
18318 
18319 
18320   if test "x$HG" = x; then
18321     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
18369 
18370     # Try to remove the string !HG! from our list.
18371     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18372     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18373       # If it failed, the variable was not from the command line. Ignore it,
18374       # but warn the user (except for BASH, which is always set by the calling BASH).
18375       if test "xHG" != xBASH; then
18376         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18377 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18378       fi
18379       # Try to locate tool using the code snippet
18380       for ac_prog in hg
18381 do
18382   # Extract the first word of "$ac_prog", so it can be a program name with args.
18383 set dummy $ac_prog; 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   test -n "$HG" && break
18423 done
18424 
18425     else
18426       # If it succeeded, then it was overridden by the user. We will use it
18427       # for the tool.
18428 
18429       # First remove it from the list of overridden variables, so we can test
18430       # for unknown variables in the end.
18431       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18432 
18433       # Check if the provided tool contains a complete path.
18434       tool_specified="$HG"
18435       tool_basename="${tool_specified##*/}"
18436       if test "x$tool_basename" = "x$tool_specified"; then
18437         # A command without a complete path is provided, search $PATH.
18438         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18439 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18440         # Extract the first word of "$tool_basename", so it can be a program name with args.
18441 set dummy $tool_basename; ac_word=$2
18442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18443 $as_echo_n "checking for $ac_word... " >&6; }
18444 if ${ac_cv_path_HG+:} false; then :
18445   $as_echo_n "(cached) " >&6
18446 else
18447   case $HG in
18448   [\\/]* | ?:[\\/]*)
18449   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18450   ;;
18451   *)
18452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18453 for as_dir in $PATH
18454 do
18455   IFS=$as_save_IFS
18456   test -z "$as_dir" && as_dir=.
18457     for ac_exec_ext in '' $ac_executable_extensions; do
18458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18459     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18461     break 2
18462   fi
18463 done
18464   done
18465 IFS=$as_save_IFS
18466 
18467   ;;
18468 esac
18469 fi
18470 HG=$ac_cv_path_HG
18471 if test -n "$HG"; then
18472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18473 $as_echo "$HG" >&6; }
18474 else
18475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18476 $as_echo "no" >&6; }
18477 fi
18478 
18479 
18480         if test "x$HG" = x; then
18481           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18482         fi
18483       else
18484         # Otherwise we believe it is a complete path. Use it as it is.
18485         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18486 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18487         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18488 $as_echo_n "checking for HG... " >&6; }
18489         if test ! -x "$tool_specified"; then
18490           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18491 $as_echo "not found" >&6; }
18492           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18493         fi
18494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18495 $as_echo "$tool_specified" >&6; }
18496       fi
18497     fi
18498   fi
18499 
18500 
18501 
18502 
18503   # Publish this variable in the help.
18504 
18505 
18506   if test "x$STAT" = x; then
18507     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
18555 
18556     # Try to remove the string !STAT! from our list.
18557     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18558     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18559       # If it failed, the variable was not from the command line. Ignore it,
18560       # but warn the user (except for BASH, which is always set by the calling BASH).
18561       if test "xSTAT" != xBASH; then
18562         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18563 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18564       fi
18565       # Try to locate tool using the code snippet
18566       for ac_prog in stat
18567 do
18568   # Extract the first word of "$ac_prog", so it can be a program name with args.
18569 set dummy $ac_prog; 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   test -n "$STAT" && break
18609 done
18610 
18611     else
18612       # If it succeeded, then it was overridden by the user. We will use it
18613       # for the tool.
18614 
18615       # First remove it from the list of overridden variables, so we can test
18616       # for unknown variables in the end.
18617       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18618 
18619       # Check if the provided tool contains a complete path.
18620       tool_specified="$STAT"
18621       tool_basename="${tool_specified##*/}"
18622       if test "x$tool_basename" = "x$tool_specified"; then
18623         # A command without a complete path is provided, search $PATH.
18624         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18625 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18626         # Extract the first word of "$tool_basename", so it can be a program name with args.
18627 set dummy $tool_basename; ac_word=$2
18628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629 $as_echo_n "checking for $ac_word... " >&6; }
18630 if ${ac_cv_path_STAT+:} false; then :
18631   $as_echo_n "(cached) " >&6
18632 else
18633   case $STAT in
18634   [\\/]* | ?:[\\/]*)
18635   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18636   ;;
18637   *)
18638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639 for as_dir in $PATH
18640 do
18641   IFS=$as_save_IFS
18642   test -z "$as_dir" && as_dir=.
18643     for ac_exec_ext in '' $ac_executable_extensions; do
18644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647     break 2
18648   fi
18649 done
18650   done
18651 IFS=$as_save_IFS
18652 
18653   ;;
18654 esac
18655 fi
18656 STAT=$ac_cv_path_STAT
18657 if test -n "$STAT"; then
18658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18659 $as_echo "$STAT" >&6; }
18660 else
18661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662 $as_echo "no" >&6; }
18663 fi
18664 
18665 
18666         if test "x$STAT" = x; then
18667           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18668         fi
18669       else
18670         # Otherwise we believe it is a complete path. Use it as it is.
18671         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18672 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18673         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18674 $as_echo_n "checking for STAT... " >&6; }
18675         if test ! -x "$tool_specified"; then
18676           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18677 $as_echo "not found" >&6; }
18678           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18679         fi
18680         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18681 $as_echo "$tool_specified" >&6; }
18682       fi
18683     fi
18684   fi
18685 
18686 
18687 
18688 
18689   # Publish this variable in the help.
18690 
18691 
18692   if test "x$TIME" = x; then
18693     # The variable is not set by user, 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     # The variable is set, but is it from the command line or the environment?
18741 
18742     # Try to remove the string !TIME! from our list.
18743     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18744     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18745       # If it failed, the variable was not from the command line. Ignore it,
18746       # but warn the user (except for BASH, which is always set by the calling BASH).
18747       if test "xTIME" != xBASH; then
18748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18749 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18750       fi
18751       # Try to locate tool using the code snippet
18752       for ac_prog in time
18753 do
18754   # Extract the first word of "$ac_prog", so it can be a program name with args.
18755 set dummy $ac_prog; 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   test -n "$TIME" && break
18795 done
18796 
18797     else
18798       # If it succeeded, then it was overridden by the user. We will use it
18799       # for the tool.
18800 
18801       # First remove it from the list of overridden variables, so we can test
18802       # for unknown variables in the end.
18803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18804 
18805       # Check if the provided tool contains a complete path.
18806       tool_specified="$TIME"
18807       tool_basename="${tool_specified##*/}"
18808       if test "x$tool_basename" = "x$tool_specified"; then
18809         # A command without a complete path is provided, search $PATH.
18810         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18811 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18812         # Extract the first word of "$tool_basename", so it can be a program name with args.
18813 set dummy $tool_basename; ac_word=$2
18814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18815 $as_echo_n "checking for $ac_word... " >&6; }
18816 if ${ac_cv_path_TIME+:} false; then :
18817   $as_echo_n "(cached) " >&6
18818 else
18819   case $TIME in
18820   [\\/]* | ?:[\\/]*)
18821   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18822   ;;
18823   *)
18824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18825 for as_dir in $PATH
18826 do
18827   IFS=$as_save_IFS
18828   test -z "$as_dir" && as_dir=.
18829     for ac_exec_ext in '' $ac_executable_extensions; do
18830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18831     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18833     break 2
18834   fi
18835 done
18836   done
18837 IFS=$as_save_IFS
18838 
18839   ;;
18840 esac
18841 fi
18842 TIME=$ac_cv_path_TIME
18843 if test -n "$TIME"; then
18844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18845 $as_echo "$TIME" >&6; }
18846 else
18847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18848 $as_echo "no" >&6; }
18849 fi
18850 
18851 
18852         if test "x$TIME" = x; then
18853           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18854         fi
18855       else
18856         # Otherwise we believe it is a complete path. Use it as it is.
18857         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18858 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18859         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18860 $as_echo_n "checking for TIME... " >&6; }
18861         if test ! -x "$tool_specified"; then
18862           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18863 $as_echo "not found" >&6; }
18864           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18865         fi
18866         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18867 $as_echo "$tool_specified" >&6; }
18868       fi
18869     fi
18870   fi
18871 
18872 
18873   # Check if it's GNU time
18874   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18875   if test "x$IS_GNU_TIME" != x; then
18876     IS_GNU_TIME=yes
18877   else
18878     IS_GNU_TIME=no
18879   fi
18880 
18881 
18882   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18883 
18884 
18885 
18886   # Publish this variable in the help.
18887 
18888 
18889   if test "x$COMM" = x; then
18890     # The variable is not set by user, try to locate tool using the code snippet
18891     for ac_prog in comm
18892 do
18893   # Extract the first word of "$ac_prog", so it can be a program name with args.
18894 set dummy $ac_prog; ac_word=$2
18895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18896 $as_echo_n "checking for $ac_word... " >&6; }
18897 if ${ac_cv_path_COMM+:} false; then :
18898   $as_echo_n "(cached) " >&6
18899 else
18900   case $COMM in
18901   [\\/]* | ?:[\\/]*)
18902   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18903   ;;
18904   *)
18905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18906 for as_dir in $PATH
18907 do
18908   IFS=$as_save_IFS
18909   test -z "$as_dir" && as_dir=.
18910     for ac_exec_ext in '' $ac_executable_extensions; do
18911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18912     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18914     break 2
18915   fi
18916 done
18917   done
18918 IFS=$as_save_IFS
18919 
18920   ;;
18921 esac
18922 fi
18923 COMM=$ac_cv_path_COMM
18924 if test -n "$COMM"; then
18925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18926 $as_echo "$COMM" >&6; }
18927 else
18928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18929 $as_echo "no" >&6; }
18930 fi
18931 
18932 
18933   test -n "$COMM" && break
18934 done
18935 
18936   else
18937     # The variable is set, but is it from the command line or the environment?
18938 
18939     # Try to remove the string !COMM! from our list.
18940     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18941     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18942       # If it failed, the variable was not from the command line. Ignore it,
18943       # but warn the user (except for BASH, which is always set by the calling BASH).
18944       if test "xCOMM" != xBASH; then
18945         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18946 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18947       fi
18948       # Try to locate tool using the code snippet
18949       for ac_prog in comm
18950 do
18951   # Extract the first word of "$ac_prog", so it can be a program name with args.
18952 set dummy $ac_prog; ac_word=$2
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18954 $as_echo_n "checking for $ac_word... " >&6; }
18955 if ${ac_cv_path_COMM+:} false; then :
18956   $as_echo_n "(cached) " >&6
18957 else
18958   case $COMM in
18959   [\\/]* | ?:[\\/]*)
18960   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18961   ;;
18962   *)
18963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18964 for as_dir in $PATH
18965 do
18966   IFS=$as_save_IFS
18967   test -z "$as_dir" && as_dir=.
18968     for ac_exec_ext in '' $ac_executable_extensions; do
18969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18970     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18972     break 2
18973   fi
18974 done
18975   done
18976 IFS=$as_save_IFS
18977 
18978   ;;
18979 esac
18980 fi
18981 COMM=$ac_cv_path_COMM
18982 if test -n "$COMM"; then
18983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18984 $as_echo "$COMM" >&6; }
18985 else
18986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18987 $as_echo "no" >&6; }
18988 fi
18989 
18990 
18991   test -n "$COMM" && break
18992 done
18993 
18994     else
18995       # If it succeeded, then it was overridden by the user. We will use it
18996       # for the tool.
18997 
18998       # First remove it from the list of overridden variables, so we can test
18999       # for unknown variables in the end.
19000       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19001 
19002       # Check if the provided tool contains a complete path.
19003       tool_specified="$COMM"
19004       tool_basename="${tool_specified##*/}"
19005       if test "x$tool_basename" = "x$tool_specified"; then
19006         # A command without a complete path is provided, search $PATH.
19007         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
19008 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
19009         # Extract the first word of "$tool_basename", so it can be a program name with args.
19010 set dummy $tool_basename; ac_word=$2
19011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19012 $as_echo_n "checking for $ac_word... " >&6; }
19013 if ${ac_cv_path_COMM+:} false; then :
19014   $as_echo_n "(cached) " >&6
19015 else
19016   case $COMM in
19017   [\\/]* | ?:[\\/]*)
19018   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
19019   ;;
19020   *)
19021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19022 for as_dir in $PATH
19023 do
19024   IFS=$as_save_IFS
19025   test -z "$as_dir" && as_dir=.
19026     for ac_exec_ext in '' $ac_executable_extensions; do
19027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19028     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
19029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19030     break 2
19031   fi
19032 done
19033   done
19034 IFS=$as_save_IFS
19035 
19036   ;;
19037 esac
19038 fi
19039 COMM=$ac_cv_path_COMM
19040 if test -n "$COMM"; then
19041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
19042 $as_echo "$COMM" >&6; }
19043 else
19044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19045 $as_echo "no" >&6; }
19046 fi
19047 
19048 
19049         if test "x$COMM" = x; then
19050           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19051         fi
19052       else
19053         # Otherwise we believe it is a complete path. Use it as it is.
19054         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19055 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19056         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19057 $as_echo_n "checking for COMM... " >&6; }
19058         if test ! -x "$tool_specified"; then
19059           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19060 $as_echo "not found" >&6; }
19061           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19062         fi
19063         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19064 $as_echo "$tool_specified" >&6; }
19065       fi
19066     fi
19067   fi
19068 
19069 
19070 
19071   if test "x$COMM" = x; then
19072     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19073   fi
19074 
19075 
19076   fi
19077 
19078   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19079 
19080 
19081 
19082   # Publish this variable in the help.
19083 
19084 
19085   if test "x$DSYMUTIL" = x; then
19086     # The variable is not set by user, try to locate tool using the code snippet
19087     for ac_prog in dsymutil
19088 do
19089   # Extract the first word of "$ac_prog", so it can be a program name with args.
19090 set dummy $ac_prog; ac_word=$2
19091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19092 $as_echo_n "checking for $ac_word... " >&6; }
19093 if ${ac_cv_path_DSYMUTIL+:} false; then :
19094   $as_echo_n "(cached) " >&6
19095 else
19096   case $DSYMUTIL in
19097   [\\/]* | ?:[\\/]*)
19098   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19099   ;;
19100   *)
19101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19102 for as_dir in $PATH
19103 do
19104   IFS=$as_save_IFS
19105   test -z "$as_dir" && as_dir=.
19106     for ac_exec_ext in '' $ac_executable_extensions; do
19107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19108     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19110     break 2
19111   fi
19112 done
19113   done
19114 IFS=$as_save_IFS
19115 
19116   ;;
19117 esac
19118 fi
19119 DSYMUTIL=$ac_cv_path_DSYMUTIL
19120 if test -n "$DSYMUTIL"; then
19121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19122 $as_echo "$DSYMUTIL" >&6; }
19123 else
19124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19125 $as_echo "no" >&6; }
19126 fi
19127 
19128 
19129   test -n "$DSYMUTIL" && break
19130 done
19131 
19132   else
19133     # The variable is set, but is it from the command line or the environment?
19134 
19135     # Try to remove the string !DSYMUTIL! from our list.
19136     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19137     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19138       # If it failed, the variable was not from the command line. Ignore it,
19139       # but warn the user (except for BASH, which is always set by the calling BASH).
19140       if test "xDSYMUTIL" != xBASH; then
19141         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19142 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19143       fi
19144       # Try to locate tool using the code snippet
19145       for ac_prog in dsymutil
19146 do
19147   # Extract the first word of "$ac_prog", so it can be a program name with args.
19148 set dummy $ac_prog; ac_word=$2
19149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19150 $as_echo_n "checking for $ac_word... " >&6; }
19151 if ${ac_cv_path_DSYMUTIL+:} false; then :
19152   $as_echo_n "(cached) " >&6
19153 else
19154   case $DSYMUTIL in
19155   [\\/]* | ?:[\\/]*)
19156   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19157   ;;
19158   *)
19159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19160 for as_dir in $PATH
19161 do
19162   IFS=$as_save_IFS
19163   test -z "$as_dir" && as_dir=.
19164     for ac_exec_ext in '' $ac_executable_extensions; do
19165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19166     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19168     break 2
19169   fi
19170 done
19171   done
19172 IFS=$as_save_IFS
19173 
19174   ;;
19175 esac
19176 fi
19177 DSYMUTIL=$ac_cv_path_DSYMUTIL
19178 if test -n "$DSYMUTIL"; then
19179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19180 $as_echo "$DSYMUTIL" >&6; }
19181 else
19182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19183 $as_echo "no" >&6; }
19184 fi
19185 
19186 
19187   test -n "$DSYMUTIL" && break
19188 done
19189 
19190     else
19191       # If it succeeded, then it was overridden by the user. We will use it
19192       # for the tool.
19193 
19194       # First remove it from the list of overridden variables, so we can test
19195       # for unknown variables in the end.
19196       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19197 
19198       # Check if the provided tool contains a complete path.
19199       tool_specified="$DSYMUTIL"
19200       tool_basename="${tool_specified##*/}"
19201       if test "x$tool_basename" = "x$tool_specified"; then
19202         # A command without a complete path is provided, search $PATH.
19203         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19204 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19205         # Extract the first word of "$tool_basename", so it can be a program name with args.
19206 set dummy $tool_basename; ac_word=$2
19207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19208 $as_echo_n "checking for $ac_word... " >&6; }
19209 if ${ac_cv_path_DSYMUTIL+:} false; then :
19210   $as_echo_n "(cached) " >&6
19211 else
19212   case $DSYMUTIL in
19213   [\\/]* | ?:[\\/]*)
19214   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19215   ;;
19216   *)
19217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19218 for as_dir in $PATH
19219 do
19220   IFS=$as_save_IFS
19221   test -z "$as_dir" && as_dir=.
19222     for ac_exec_ext in '' $ac_executable_extensions; do
19223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19224     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19226     break 2
19227   fi
19228 done
19229   done
19230 IFS=$as_save_IFS
19231 
19232   ;;
19233 esac
19234 fi
19235 DSYMUTIL=$ac_cv_path_DSYMUTIL
19236 if test -n "$DSYMUTIL"; then
19237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19238 $as_echo "$DSYMUTIL" >&6; }
19239 else
19240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19241 $as_echo "no" >&6; }
19242 fi
19243 
19244 
19245         if test "x$DSYMUTIL" = x; then
19246           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19247         fi
19248       else
19249         # Otherwise we believe it is a complete path. Use it as it is.
19250         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19251 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19253 $as_echo_n "checking for DSYMUTIL... " >&6; }
19254         if test ! -x "$tool_specified"; then
19255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19256 $as_echo "not found" >&6; }
19257           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19258         fi
19259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19260 $as_echo "$tool_specified" >&6; }
19261       fi
19262     fi
19263   fi
19264 
19265 
19266 
19267   if test "x$DSYMUTIL" = x; then
19268     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19269   fi
19270 
19271 
19272 
19273 
19274 
19275   # Publish this variable in the help.
19276 
19277 
19278   if test "x$XATTR" = x; then
19279     # The variable is not set by user, try to locate tool using the code snippet
19280     for ac_prog in xattr
19281 do
19282   # Extract the first word of "$ac_prog", so it can be a program name with args.
19283 set dummy $ac_prog; ac_word=$2
19284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19285 $as_echo_n "checking for $ac_word... " >&6; }
19286 if ${ac_cv_path_XATTR+:} false; then :
19287   $as_echo_n "(cached) " >&6
19288 else
19289   case $XATTR in
19290   [\\/]* | ?:[\\/]*)
19291   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19292   ;;
19293   *)
19294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19295 for as_dir in $PATH
19296 do
19297   IFS=$as_save_IFS
19298   test -z "$as_dir" && as_dir=.
19299     for ac_exec_ext in '' $ac_executable_extensions; do
19300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19301     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19303     break 2
19304   fi
19305 done
19306   done
19307 IFS=$as_save_IFS
19308 
19309   ;;
19310 esac
19311 fi
19312 XATTR=$ac_cv_path_XATTR
19313 if test -n "$XATTR"; then
19314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19315 $as_echo "$XATTR" >&6; }
19316 else
19317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19318 $as_echo "no" >&6; }
19319 fi
19320 
19321 
19322   test -n "$XATTR" && break
19323 done
19324 
19325   else
19326     # The variable is set, but is it from the command line or the environment?
19327 
19328     # Try to remove the string !XATTR! from our list.
19329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19331       # If it failed, the variable was not from the command line. Ignore it,
19332       # but warn the user (except for BASH, which is always set by the calling BASH).
19333       if test "xXATTR" != xBASH; then
19334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19335 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19336       fi
19337       # Try to locate tool using the code snippet
19338       for ac_prog in xattr
19339 do
19340   # Extract the first word of "$ac_prog", so it can be a program name with args.
19341 set dummy $ac_prog; ac_word=$2
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19343 $as_echo_n "checking for $ac_word... " >&6; }
19344 if ${ac_cv_path_XATTR+:} false; then :
19345   $as_echo_n "(cached) " >&6
19346 else
19347   case $XATTR in
19348   [\\/]* | ?:[\\/]*)
19349   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19350   ;;
19351   *)
19352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19353 for as_dir in $PATH
19354 do
19355   IFS=$as_save_IFS
19356   test -z "$as_dir" && as_dir=.
19357     for ac_exec_ext in '' $ac_executable_extensions; do
19358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19359     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19361     break 2
19362   fi
19363 done
19364   done
19365 IFS=$as_save_IFS
19366 
19367   ;;
19368 esac
19369 fi
19370 XATTR=$ac_cv_path_XATTR
19371 if test -n "$XATTR"; then
19372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19373 $as_echo "$XATTR" >&6; }
19374 else
19375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19376 $as_echo "no" >&6; }
19377 fi
19378 
19379 
19380   test -n "$XATTR" && break
19381 done
19382 
19383     else
19384       # If it succeeded, then it was overridden by the user. We will use it
19385       # for the tool.
19386 
19387       # First remove it from the list of overridden variables, so we can test
19388       # for unknown variables in the end.
19389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19390 
19391       # Check if the provided tool contains a complete path.
19392       tool_specified="$XATTR"
19393       tool_basename="${tool_specified##*/}"
19394       if test "x$tool_basename" = "x$tool_specified"; then
19395         # A command without a complete path is provided, search $PATH.
19396         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19397 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19398         # Extract the first word of "$tool_basename", so it can be a program name with args.
19399 set dummy $tool_basename; ac_word=$2
19400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19401 $as_echo_n "checking for $ac_word... " >&6; }
19402 if ${ac_cv_path_XATTR+:} false; then :
19403   $as_echo_n "(cached) " >&6
19404 else
19405   case $XATTR in
19406   [\\/]* | ?:[\\/]*)
19407   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19408   ;;
19409   *)
19410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19411 for as_dir in $PATH
19412 do
19413   IFS=$as_save_IFS
19414   test -z "$as_dir" && as_dir=.
19415     for ac_exec_ext in '' $ac_executable_extensions; do
19416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19417     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19419     break 2
19420   fi
19421 done
19422   done
19423 IFS=$as_save_IFS
19424 
19425   ;;
19426 esac
19427 fi
19428 XATTR=$ac_cv_path_XATTR
19429 if test -n "$XATTR"; then
19430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19431 $as_echo "$XATTR" >&6; }
19432 else
19433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19434 $as_echo "no" >&6; }
19435 fi
19436 
19437 
19438         if test "x$XATTR" = x; then
19439           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19440         fi
19441       else
19442         # Otherwise we believe it is a complete path. Use it as it is.
19443         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19444 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19446 $as_echo_n "checking for XATTR... " >&6; }
19447         if test ! -x "$tool_specified"; then
19448           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19449 $as_echo "not found" >&6; }
19450           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19451         fi
19452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19453 $as_echo "$tool_specified" >&6; }
19454       fi
19455     fi
19456   fi
19457 
19458 
19459 
19460   if test "x$XATTR" = x; then
19461     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19462   fi
19463 
19464 
19465 
19466 
19467   # Publish this variable in the help.
19468 
19469 
19470   if test "x$CODESIGN" = x; then
19471     # The variable is not set by user, try to locate tool using the code snippet
19472     for ac_prog in codesign
19473 do
19474   # Extract the first word of "$ac_prog", so it can be a program name with args.
19475 set dummy $ac_prog; ac_word=$2
19476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19477 $as_echo_n "checking for $ac_word... " >&6; }
19478 if ${ac_cv_path_CODESIGN+:} false; then :
19479   $as_echo_n "(cached) " >&6
19480 else
19481   case $CODESIGN in
19482   [\\/]* | ?:[\\/]*)
19483   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19484   ;;
19485   *)
19486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19487 for as_dir in $PATH
19488 do
19489   IFS=$as_save_IFS
19490   test -z "$as_dir" && as_dir=.
19491     for ac_exec_ext in '' $ac_executable_extensions; do
19492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19493     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19495     break 2
19496   fi
19497 done
19498   done
19499 IFS=$as_save_IFS
19500 
19501   ;;
19502 esac
19503 fi
19504 CODESIGN=$ac_cv_path_CODESIGN
19505 if test -n "$CODESIGN"; then
19506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19507 $as_echo "$CODESIGN" >&6; }
19508 else
19509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19510 $as_echo "no" >&6; }
19511 fi
19512 
19513 
19514   test -n "$CODESIGN" && break
19515 done
19516 
19517   else
19518     # The variable is set, but is it from the command line or the environment?
19519 
19520     # Try to remove the string !CODESIGN! from our list.
19521     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19522     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19523       # If it failed, the variable was not from the command line. Ignore it,
19524       # but warn the user (except for BASH, which is always set by the calling BASH).
19525       if test "xCODESIGN" != xBASH; then
19526         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19527 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19528       fi
19529       # Try to locate tool using the code snippet
19530       for ac_prog in codesign
19531 do
19532   # Extract the first word of "$ac_prog", so it can be a program name with args.
19533 set dummy $ac_prog; ac_word=$2
19534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19535 $as_echo_n "checking for $ac_word... " >&6; }
19536 if ${ac_cv_path_CODESIGN+:} false; then :
19537   $as_echo_n "(cached) " >&6
19538 else
19539   case $CODESIGN in
19540   [\\/]* | ?:[\\/]*)
19541   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19542   ;;
19543   *)
19544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19545 for as_dir in $PATH
19546 do
19547   IFS=$as_save_IFS
19548   test -z "$as_dir" && as_dir=.
19549     for ac_exec_ext in '' $ac_executable_extensions; do
19550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19551     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19553     break 2
19554   fi
19555 done
19556   done
19557 IFS=$as_save_IFS
19558 
19559   ;;
19560 esac
19561 fi
19562 CODESIGN=$ac_cv_path_CODESIGN
19563 if test -n "$CODESIGN"; then
19564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19565 $as_echo "$CODESIGN" >&6; }
19566 else
19567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19568 $as_echo "no" >&6; }
19569 fi
19570 
19571 
19572   test -n "$CODESIGN" && break
19573 done
19574 
19575     else
19576       # If it succeeded, then it was overridden by the user. We will use it
19577       # for the tool.
19578 
19579       # First remove it from the list of overridden variables, so we can test
19580       # for unknown variables in the end.
19581       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19582 
19583       # Check if the provided tool contains a complete path.
19584       tool_specified="$CODESIGN"
19585       tool_basename="${tool_specified##*/}"
19586       if test "x$tool_basename" = "x$tool_specified"; then
19587         # A command without a complete path is provided, search $PATH.
19588         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19589 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19590         # Extract the first word of "$tool_basename", so it can be a program name with args.
19591 set dummy $tool_basename; ac_word=$2
19592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19593 $as_echo_n "checking for $ac_word... " >&6; }
19594 if ${ac_cv_path_CODESIGN+:} false; then :
19595   $as_echo_n "(cached) " >&6
19596 else
19597   case $CODESIGN in
19598   [\\/]* | ?:[\\/]*)
19599   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19600   ;;
19601   *)
19602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19603 for as_dir in $PATH
19604 do
19605   IFS=$as_save_IFS
19606   test -z "$as_dir" && as_dir=.
19607     for ac_exec_ext in '' $ac_executable_extensions; do
19608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19609     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19611     break 2
19612   fi
19613 done
19614   done
19615 IFS=$as_save_IFS
19616 
19617   ;;
19618 esac
19619 fi
19620 CODESIGN=$ac_cv_path_CODESIGN
19621 if test -n "$CODESIGN"; then
19622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19623 $as_echo "$CODESIGN" >&6; }
19624 else
19625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19626 $as_echo "no" >&6; }
19627 fi
19628 
19629 
19630         if test "x$CODESIGN" = x; then
19631           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19632         fi
19633       else
19634         # Otherwise we believe it is a complete path. Use it as it is.
19635         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19636 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19638 $as_echo_n "checking for CODESIGN... " >&6; }
19639         if test ! -x "$tool_specified"; then
19640           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19641 $as_echo "not found" >&6; }
19642           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19643         fi
19644         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19645 $as_echo "$tool_specified" >&6; }
19646       fi
19647     fi
19648   fi
19649 
19650 
19651     if test "x$CODESIGN" != "x"; then
19652       # Verify that the openjdk_codesign certificate is present
19653       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19654 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19655       rm -f codesign-testfile
19656       touch codesign-testfile
19657       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19658       rm -f codesign-testfile
19659       if test "x$CODESIGN" = x; then
19660         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19661 $as_echo "no" >&6; }
19662       else
19663         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19664 $as_echo "yes" >&6; }
19665       fi
19666     fi
19667   fi
19668 
19669 
19670 # Check if pkg-config is available.
19671 
19672 
19673 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19674         if test -n "$ac_tool_prefix"; then
19675   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19676 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19678 $as_echo_n "checking for $ac_word... " >&6; }
19679 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19680   $as_echo_n "(cached) " >&6
19681 else
19682   case $PKG_CONFIG in
19683   [\\/]* | ?:[\\/]*)
19684   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19685   ;;
19686   *)
19687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19688 for as_dir in $PATH
19689 do
19690   IFS=$as_save_IFS
19691   test -z "$as_dir" && as_dir=.
19692     for ac_exec_ext in '' $ac_executable_extensions; do
19693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19694     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19696     break 2
19697   fi
19698 done
19699   done
19700 IFS=$as_save_IFS
19701 
19702   ;;
19703 esac
19704 fi
19705 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19706 if test -n "$PKG_CONFIG"; then
19707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19708 $as_echo "$PKG_CONFIG" >&6; }
19709 else
19710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19711 $as_echo "no" >&6; }
19712 fi
19713 
19714 
19715 fi
19716 if test -z "$ac_cv_path_PKG_CONFIG"; then
19717   ac_pt_PKG_CONFIG=$PKG_CONFIG
19718   # Extract the first word of "pkg-config", so it can be a program name with args.
19719 set dummy pkg-config; ac_word=$2
19720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19721 $as_echo_n "checking for $ac_word... " >&6; }
19722 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19723   $as_echo_n "(cached) " >&6
19724 else
19725   case $ac_pt_PKG_CONFIG in
19726   [\\/]* | ?:[\\/]*)
19727   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19728   ;;
19729   *)
19730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19731 for as_dir in $PATH
19732 do
19733   IFS=$as_save_IFS
19734   test -z "$as_dir" && as_dir=.
19735     for ac_exec_ext in '' $ac_executable_extensions; do
19736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19737     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19739     break 2
19740   fi
19741 done
19742   done
19743 IFS=$as_save_IFS
19744 
19745   ;;
19746 esac
19747 fi
19748 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19749 if test -n "$ac_pt_PKG_CONFIG"; then
19750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19751 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19752 else
19753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19754 $as_echo "no" >&6; }
19755 fi
19756 
19757   if test "x$ac_pt_PKG_CONFIG" = x; then
19758     PKG_CONFIG=""
19759   else
19760     case $cross_compiling:$ac_tool_warned in
19761 yes:)
19762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19763 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19764 ac_tool_warned=yes ;;
19765 esac
19766     PKG_CONFIG=$ac_pt_PKG_CONFIG
19767   fi
19768 else
19769   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19770 fi
19771 
19772 fi
19773 if test -n "$PKG_CONFIG"; then
19774         _pkg_min_version=0.9.0
19775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19776 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19777         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19778                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19779 $as_echo "yes" >&6; }
19780         else
19781                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19782 $as_echo "no" >&6; }
19783                 PKG_CONFIG=""
19784         fi
19785 
19786 fi
19787 
19788 # After basic tools have been setup, we can check build os specific details.
19789 
19790   ###############################################################################
19791 
19792   # Note that this is the build platform OS version!
19793 
19794   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19795   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19796   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19797   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19798 
19799 
19800 
19801 
19802 
19803 # Setup builddeps, for automatic downloading of tools we need.
19804 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19805 # boot-jdk setup, but we need to have basic tools setup first.
19806 
19807 
19808 # Check whether --with-builddeps-conf was given.
19809 if test "${with_builddeps_conf+set}" = set; then :
19810   withval=$with_builddeps_conf;
19811 fi
19812 
19813 
19814 
19815 # Check whether --with-builddeps-server was given.
19816 if test "${with_builddeps_server+set}" = set; then :
19817   withval=$with_builddeps_server;
19818 fi
19819 
19820 
19821 
19822 # Check whether --with-builddeps-dir was given.
19823 if test "${with_builddeps_dir+set}" = set; then :
19824   withval=$with_builddeps_dir;
19825 else
19826   with_builddeps_dir=/localhome/builddeps
19827 fi
19828 
19829 
19830 
19831 # Check whether --with-builddeps-group was given.
19832 if test "${with_builddeps_group+set}" = set; then :
19833   withval=$with_builddeps_group;
19834 fi
19835 
19836 
19837 
19838 
19839   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19840     if test "x$with_builddeps_conf" != x; then
19841       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19842 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19843       builddepsfile=$with_builddeps_conf
19844       if test -s $builddepsfile; then
19845         . $builddepsfile
19846         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19847 $as_echo "loaded!" >&6; }
19848       else
19849         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19850       fi
19851     else
19852       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19853 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19854       builddepsfile=`mktemp`
19855       touch $builddepsfile
19856       # Put all found confs into a single file.
19857       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19858       # Source the file to acquire the variables
19859       if test -s $builddepsfile; then
19860         . $builddepsfile
19861         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19862 $as_echo "found at least one!" >&6; }
19863       else
19864         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19865       fi
19866     fi
19867     # Create build and target names that use _ instead of "-" and ".".
19868     # This is necessary to use them in variable names.
19869     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19870     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19871     # Extract rewrite information for build and target
19872     eval rewritten_build=\${REWRITE_${build_var}}
19873     if test "x$rewritten_build" = x; then
19874       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19875       echo Build stays the same $rewritten_build
19876     else
19877       echo Rewriting build for builddeps into $rewritten_build
19878     fi
19879     eval rewritten_target=\${REWRITE_${target_var}}
19880     if test "x$rewritten_target" = x; then
19881       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19882       echo Target stays the same $rewritten_target
19883     else
19884       echo Rewriting target for builddeps into $rewritten_target
19885     fi
19886     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19887     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19888   fi
19889   for ac_prog in 7z unzip
19890 do
19891   # Extract the first word of "$ac_prog", so it can be a program name with args.
19892 set dummy $ac_prog; ac_word=$2
19893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19894 $as_echo_n "checking for $ac_word... " >&6; }
19895 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19896   $as_echo_n "(cached) " >&6
19897 else
19898   if test -n "$BDEPS_UNZIP"; then
19899   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19900 else
19901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19902 for as_dir in $PATH
19903 do
19904   IFS=$as_save_IFS
19905   test -z "$as_dir" && as_dir=.
19906     for ac_exec_ext in '' $ac_executable_extensions; do
19907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19908     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19910     break 2
19911   fi
19912 done
19913   done
19914 IFS=$as_save_IFS
19915 
19916 fi
19917 fi
19918 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19919 if test -n "$BDEPS_UNZIP"; then
19920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19921 $as_echo "$BDEPS_UNZIP" >&6; }
19922 else
19923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19924 $as_echo "no" >&6; }
19925 fi
19926 
19927 
19928   test -n "$BDEPS_UNZIP" && break
19929 done
19930 
19931   if test "x$BDEPS_UNZIP" = x7z; then
19932     BDEPS_UNZIP="7z x"
19933   fi
19934 
19935   for ac_prog in wget lftp ftp
19936 do
19937   # Extract the first word of "$ac_prog", so it can be a program name with args.
19938 set dummy $ac_prog; ac_word=$2
19939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19940 $as_echo_n "checking for $ac_word... " >&6; }
19941 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19942   $as_echo_n "(cached) " >&6
19943 else
19944   if test -n "$BDEPS_FTP"; then
19945   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19946 else
19947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19948 for as_dir in $PATH
19949 do
19950   IFS=$as_save_IFS
19951   test -z "$as_dir" && as_dir=.
19952     for ac_exec_ext in '' $ac_executable_extensions; do
19953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19954     ac_cv_prog_BDEPS_FTP="$ac_prog"
19955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19956     break 2
19957   fi
19958 done
19959   done
19960 IFS=$as_save_IFS
19961 
19962 fi
19963 fi
19964 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19965 if test -n "$BDEPS_FTP"; then
19966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19967 $as_echo "$BDEPS_FTP" >&6; }
19968 else
19969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19970 $as_echo "no" >&6; }
19971 fi
19972 
19973 
19974   test -n "$BDEPS_FTP" && break
19975 done
19976 
19977 
19978 
19979 ###############################################################################
19980 #
19981 # Determine OpenJDK variants, options and version numbers.
19982 #
19983 ###############################################################################
19984 
19985 # We need build & target for this.
19986 
19987 
19988   ###############################################################################
19989   #
19990   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19991   # We always build headless support.
19992   #
19993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19994 $as_echo_n "checking headful support... " >&6; }
19995   # Check whether --enable-headful was given.
19996 if test "${enable_headful+set}" = set; then :
19997   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19998 else
19999   SUPPORT_HEADFUL=yes
20000 fi
20001 
20002 
20003   SUPPORT_HEADLESS=yes
20004   BUILD_HEADLESS="BUILD_HEADLESS:=true"
20005 
20006   if test "x$SUPPORT_HEADFUL" = xyes; then
20007     # We are building both headful and headless.
20008     headful_msg="include support for both headful and headless"
20009   fi
20010 
20011   if test "x$SUPPORT_HEADFUL" = xno; then
20012     # Thus we are building headless only.
20013     BUILD_HEADLESS="BUILD_HEADLESS:=true"
20014     headful_msg="headless only"
20015   fi
20016 
20017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20018 $as_echo "$headful_msg" >&6; }
20019 
20020 
20021 
20022 
20023 
20024   # Control wether Hotspot runs Queens test after build.
20025   # Check whether --enable-hotspot-test-in-build was given.
20026 if test "${enable_hotspot_test_in_build+set}" = set; then :
20027   enableval=$enable_hotspot_test_in_build;
20028 else
20029   enable_hotspot_test_in_build=no
20030 fi
20031 
20032   if test "x$enable_hotspot_test_in_build" = "xyes"; then
20033     TEST_IN_BUILD=true
20034   else
20035     TEST_IN_BUILD=false
20036   fi
20037 
20038 
20039   ###############################################################################
20040   #
20041   # Choose cacerts source file
20042   #
20043 
20044 # Check whether --with-cacerts-file was given.
20045 if test "${with_cacerts_file+set}" = set; then :
20046   withval=$with_cacerts_file;
20047 fi
20048 
20049   if test "x$with_cacerts_file" != x; then
20050     CACERTS_FILE=$with_cacerts_file
20051   fi
20052 
20053 
20054   ###############################################################################
20055   #
20056   # Enable or disable unlimited crypto
20057   #
20058   # Check whether --enable-unlimited-crypto was given.
20059 if test "${enable_unlimited_crypto+set}" = set; then :
20060   enableval=$enable_unlimited_crypto;
20061 else
20062   enable_unlimited_crypto=no
20063 fi
20064 
20065   if test "x$enable_unlimited_crypto" = "xyes"; then
20066     UNLIMITED_CRYPTO=true
20067   else
20068     UNLIMITED_CRYPTO=false
20069   fi
20070 
20071 
20072   ###############################################################################
20073   #
20074   # Enable or disable the elliptic curve crypto implementation
20075   #
20076 
20077 
20078   ###############################################################################
20079   #
20080   # --enable-rmiconnector-iiop
20081   #
20082   # Check whether --enable-rmiconnector-iiop was given.
20083 if test "${enable_rmiconnector_iiop+set}" = set; then :
20084   enableval=$enable_rmiconnector_iiop;
20085 fi
20086 
20087   if test "x$enable_rmiconnector_iiop" = "xyes"; then
20088     RMICONNECTOR_IIOP=true
20089   else
20090     RMICONNECTOR_IIOP=false
20091   fi
20092 
20093 
20094   ###############################################################################
20095   #
20096   # Compress jars
20097   #
20098   COMPRESS_JARS=false
20099 
20100 
20101 
20102 
20103   # Source the version numbers
20104   . $AUTOCONF_DIR/version-numbers
20105 
20106   # Get the settings from parameters
20107 
20108 # Check whether --with-milestone was given.
20109 if test "${with_milestone+set}" = set; then :
20110   withval=$with_milestone;
20111 fi
20112 
20113   if test "x$with_milestone" = xyes; then
20114     as_fn_error $? "Milestone must have a value" "$LINENO" 5
20115   elif test "x$with_milestone" != x; then
20116     MILESTONE="$with_milestone"
20117   fi
20118   if test "x$MILESTONE" = x; then
20119     MILESTONE=internal
20120   fi
20121 
20122 
20123 # Check whether --with-update-version was given.
20124 if test "${with_update_version+set}" = set; then :
20125   withval=$with_update_version;
20126 fi
20127 
20128   if test "x$with_update_version" = xyes; then
20129     as_fn_error $? "Update version must have a value" "$LINENO" 5
20130   elif test "x$with_update_version" != x; then
20131     JDK_UPDATE_VERSION="$with_update_version"
20132     # On macosx 10.7, it's not possible to set --with-update-version=0X due
20133     # to a bug in expr (which reduces it to just X). To work around this, we
20134     # always add a 0 to one digit update versions.
20135     if test "${#JDK_UPDATE_VERSION}" = "1"; then
20136       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20137     fi
20138   fi
20139 
20140 
20141 # Check whether --with-user-release-suffix was given.
20142 if test "${with_user_release_suffix+set}" = set; then :
20143   withval=$with_user_release_suffix;
20144 fi
20145 
20146   if test "x$with_user_release_suffix" = xyes; then
20147     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20148   elif test "x$with_user_release_suffix" != x; then
20149     USER_RELEASE_SUFFIX="$with_user_release_suffix"
20150   fi
20151 
20152 
20153 # Check whether --with-build-number was given.
20154 if test "${with_build_number+set}" = set; then :
20155   withval=$with_build_number;
20156 fi
20157 
20158   if test "x$with_build_number" = xyes; then
20159     as_fn_error $? "Build number must have a value" "$LINENO" 5
20160   elif test "x$with_build_number" != x; then
20161     JDK_BUILD_NUMBER="$with_build_number"
20162   fi
20163   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20164   if test "x$JDK_BUILD_NUMBER" = x; then
20165     JDK_BUILD_NUMBER=b00
20166     if test "x$USER_RELEASE_SUFFIX" = x; then
20167       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20168       # Avoid [:alnum:] since it depends on the locale.
20169       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20170       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20171     fi
20172   fi
20173 
20174   # Now set the JDK version, milestone, build number etc.
20175 
20176 
20177 
20178 
20179 
20180 
20181 
20182 
20183 
20184 
20185 
20186 
20187 
20188 
20189 
20190 
20191 # Check whether --with-copyright-year was given.
20192 if test "${with_copyright_year+set}" = set; then :
20193   withval=$with_copyright_year;
20194 fi
20195 
20196   if test "x$with_copyright_year" = xyes; then
20197     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20198   elif test "x$with_copyright_year" != x; then
20199     COPYRIGHT_YEAR="$with_copyright_year"
20200   else
20201     COPYRIGHT_YEAR=`date +'%Y'`
20202   fi
20203 
20204 
20205   if test "x$JDK_UPDATE_VERSION" != x; then
20206     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20207   else
20208     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20209   fi
20210 
20211 
20212   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20213 
20214 
20215 
20216 ###############################################################################
20217 #
20218 # Setup BootJDK, used to bootstrap the build.
20219 #
20220 ###############################################################################
20221 
20222 
20223   BOOT_JDK_FOUND=no
20224 
20225 # Check whether --with-boot-jdk was given.
20226 if test "${with_boot_jdk+set}" = set; then :
20227   withval=$with_boot_jdk;
20228 fi
20229 
20230 
20231   # We look for the Boot JDK through various means, going from more certain to
20232   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20233   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20234   # must check if this is indeed valid; otherwise we'll continue looking.
20235 
20236   # Test: Is bootjdk explicitely set by command line arguments?
20237 
20238   if test "x$BOOT_JDK_FOUND" = xno; then
20239     # Now execute the test
20240 
20241   if test "x$with_boot_jdk" != x; then
20242     BOOT_JDK=$with_boot_jdk
20243     BOOT_JDK_FOUND=maybe
20244     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20245 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20246   fi
20247 
20248 
20249     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20250     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20251       # Do we have a bin/java?
20252       if test ! -x "$BOOT_JDK/bin/java"; then
20253         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20254 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20255         BOOT_JDK_FOUND=no
20256       else
20257         # Do we have a bin/javac?
20258         if test ! -x "$BOOT_JDK/bin/javac"; then
20259           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20260 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20261           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20262 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20263           BOOT_JDK_FOUND=no
20264         else
20265           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20266           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20267 
20268           # Extra M4 quote needed to protect [] in grep expression.
20269           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20270           if test "x$FOUND_CORRECT_VERSION" = x; then
20271             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20272 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20273             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20274 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20275             BOOT_JDK_FOUND=no
20276           else
20277             # We're done! :-)
20278             BOOT_JDK_FOUND=yes
20279 
20280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20281 
20282   # Input might be given as Windows format, start by converting to
20283   # unix format.
20284   path="$BOOT_JDK"
20285   new_path=`$CYGPATH -u "$path"`
20286 
20287   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20288   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20289   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20290   # "foo.exe" is OK but "foo" is an error.
20291   #
20292   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20293   # It is also a way to make sure we got the proper file name for the real test later on.
20294   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20295   if test "x$test_shortpath" = x; then
20296     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20297 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20298     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20299   fi
20300 
20301   # Call helper function which possibly converts this using DOS-style short mode.
20302   # If so, the updated path is stored in $new_path.
20303 
20304   input_path="$new_path"
20305   # Check if we need to convert this using DOS-style short mode. If the path
20306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20307   # take no chances and rewrite it.
20308   # Note: m4 eats our [], so we need to use [ and ] instead.
20309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20310   if test "x$has_forbidden_chars" != x; then
20311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20315       # Going to short mode and back again did indeed matter. Since short mode is
20316       # case insensitive, let's make it lowercase to improve readability.
20317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20318       # Now convert it back to Unix-stile (cygpath)
20319       input_path=`$CYGPATH -u "$shortmode_path"`
20320       new_path="$input_path"
20321     fi
20322   fi
20323 
20324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20325   if test "x$test_cygdrive_prefix" = x; then
20326     # As a simple fix, exclude /usr/bin since it's not a real path.
20327     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20329       # a path prefixed by /cygdrive for fixpath to work.
20330       new_path="$CYGWIN_ROOT_PATH$input_path"
20331     fi
20332   fi
20333 
20334 
20335   if test "x$path" != "x$new_path"; then
20336     BOOT_JDK="$new_path"
20337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20338 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20339   fi
20340 
20341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20342 
20343   path="$BOOT_JDK"
20344   has_colon=`$ECHO $path | $GREP ^.:`
20345   new_path="$path"
20346   if test "x$has_colon" = x; then
20347     # Not in mixed or Windows style, start by that.
20348     new_path=`cmd //c echo $path`
20349   fi
20350 
20351 
20352   input_path="$new_path"
20353   # Check if we need to convert this using DOS-style short mode. If the path
20354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20355   # take no chances and rewrite it.
20356   # Note: m4 eats our [], so we need to use [ and ] instead.
20357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20358   if test "x$has_forbidden_chars" != x; then
20359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20360     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20361   fi
20362 
20363 
20364   windows_path="$new_path"
20365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20366     unix_path=`$CYGPATH -u "$windows_path"`
20367     new_path="$unix_path"
20368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20370     new_path="$unix_path"
20371   fi
20372 
20373   if test "x$path" != "x$new_path"; then
20374     BOOT_JDK="$new_path"
20375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20376 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20377   fi
20378 
20379   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20380   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20381 
20382   else
20383     # We're on a unix platform. Hooray! :)
20384     path="$BOOT_JDK"
20385     has_space=`$ECHO "$path" | $GREP " "`
20386     if test "x$has_space" != x; then
20387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20388 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20389       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20390     fi
20391 
20392     # Use eval to expand a potential ~
20393     eval path="$path"
20394     if test ! -f "$path" && test ! -d "$path"; then
20395       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20396     fi
20397 
20398     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20399   fi
20400 
20401             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20402 $as_echo_n "checking for Boot JDK... " >&6; }
20403             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20404 $as_echo "$BOOT_JDK" >&6; }
20405             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20406 $as_echo_n "checking Boot JDK version... " >&6; }
20407             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20408             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20409 $as_echo "$BOOT_JDK_VERSION" >&6; }
20410           fi # end check jdk version
20411         fi # end check javac
20412       fi # end check java
20413     fi # end check boot jdk found
20414   fi
20415 
20416   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20417     # Having specified an argument which is incorrect will produce an instant failure;
20418     # we should not go on looking
20419     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20420   fi
20421 
20422   # Test: Is bootjdk available from builddeps?
20423 
20424   if test "x$BOOT_JDK_FOUND" = xno; then
20425     # Now execute the test
20426 
20427 
20428 
20429   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20430     # Source the builddeps file again, to make sure it uses the latest variables!
20431     . $builddepsfile
20432     # Look for a target and build machine specific resource!
20433     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20434     if test "x$resource" = x; then
20435       # Ok, lets instead look for a target specific resource
20436       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20437     fi
20438     if test "x$resource" = x; then
20439       # Ok, lets instead look for a build specific resource
20440       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20441     fi
20442     if test "x$resource" = x; then
20443       # Ok, lets instead look for a generic resource
20444       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20445       resource=${builddep_bootjdk}
20446     fi
20447     if test "x$resource" != x; then
20448       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20449 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20450       # If the resource in the builddeps.conf file is an existing directory,
20451       # for example /java/linux/cups
20452       if test -d ${resource}; then
20453         depdir=${resource}
20454       else
20455 
20456   # bootjdk is for example mymodule
20457   # $resource is for example libs/general/libmymod_1_2_3.zip
20458   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20459   # $with_builddeps_dir is for example /localhome/builddeps
20460   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20461   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20462   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20463   filename=`basename $resource`
20464   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20465   filebase=${filename%%.*}
20466   extension=${filename#*.}
20467   installdir=$with_builddeps_dir/$filebase
20468   if test ! -f $installdir/$filename.unpacked; then
20469     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20470 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20471     if test ! -d $installdir; then
20472       mkdir -p $installdir
20473     fi
20474     if test ! -d $installdir; then
20475       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20476     fi
20477     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20478     touch $tmpfile
20479     if test ! -f $tmpfile; then
20480       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20481     fi
20482 
20483   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20484   # $tmpfile is the local file name for the downloaded file.
20485   VALID_TOOL=no
20486   if test "x$BDEPS_FTP" = xwget; then
20487     VALID_TOOL=yes
20488     wget -O $tmpfile $with_builddeps_server/$resource
20489   fi
20490   if test "x$BDEPS_FTP" = xlftp; then
20491     VALID_TOOL=yes
20492     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20493   fi
20494   if test "x$BDEPS_FTP" = xftp; then
20495     VALID_TOOL=yes
20496     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20497     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20498     FTPUSERPWD=${FTPSERVER%%@*}
20499     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20500       FTPUSER=${userpwd%%:*}
20501       FTPPWD=${userpwd#*@}
20502       FTPSERVER=${FTPSERVER#*@}
20503     else
20504       FTPUSER=ftp
20505       FTPPWD=ftp
20506     fi
20507     # the "pass" command does not work on some
20508     # ftp clients (read ftp.exe) but if it works,
20509     # passive mode is better!
20510     ( \
20511         echo "user $FTPUSER $FTPPWD"        ; \
20512         echo "pass"                         ; \
20513         echo "bin"                          ; \
20514         echo "get $FTPPATH $tmpfile"              ; \
20515     ) | ftp -in $FTPSERVER
20516   fi
20517   if test "x$VALID_TOOL" != xyes; then
20518     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20519   fi
20520 
20521     mv $tmpfile $installdir/$filename
20522     if test ! -s $installdir/$filename; then
20523       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20524     fi
20525     case "$extension" in
20526       zip)  echo "Unzipping $installdir/$filename..."
20527         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20528         ;;
20529       tar.gz) echo "Untaring $installdir/$filename..."
20530         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20531         ;;
20532       tgz) echo "Untaring $installdir/$filename..."
20533         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20534         ;;
20535       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20536         ;;
20537     esac
20538   fi
20539   if test -f $installdir/$filename.unpacked; then
20540     depdir=$installdir
20541   fi
20542 
20543       fi
20544       # Source the builddeps file again, because in the previous command, the depdir
20545       # was updated to point at the current build dependency install directory.
20546       . $builddepsfile
20547       # Now extract variables from the builddeps.conf files.
20548       theroot=${builddep_bootjdk_ROOT}
20549       thecflags=${builddep_bootjdk_CFLAGS}
20550       thelibs=${builddep_bootjdk_LIBS}
20551       if test "x$depdir" = x; then
20552         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20553       fi
20554       BOOT_JDK=$depdir
20555       if test "x$theroot" != x; then
20556         BOOT_JDK="$theroot"
20557       fi
20558       if test "x$thecflags" != x; then
20559         BOOT_JDK_CFLAGS="$thecflags"
20560       fi
20561       if test "x$thelibs" != x; then
20562         BOOT_JDK_LIBS="$thelibs"
20563       fi
20564       BOOT_JDK_FOUND=maybe
20565       else BOOT_JDK_FOUND=no
20566 
20567     fi
20568     else BOOT_JDK_FOUND=no
20569 
20570   fi
20571 
20572 
20573 
20574     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20575     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20576       # Do we have a bin/java?
20577       if test ! -x "$BOOT_JDK/bin/java"; then
20578         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20580         BOOT_JDK_FOUND=no
20581       else
20582         # Do we have a bin/javac?
20583         if test ! -x "$BOOT_JDK/bin/javac"; then
20584           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20586           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20587 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20588           BOOT_JDK_FOUND=no
20589         else
20590           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20591           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20592 
20593           # Extra M4 quote needed to protect [] in grep expression.
20594           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20595           if test "x$FOUND_CORRECT_VERSION" = x; then
20596             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20597 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20598             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20599 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20600             BOOT_JDK_FOUND=no
20601           else
20602             # We're done! :-)
20603             BOOT_JDK_FOUND=yes
20604 
20605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20606 
20607   # Input might be given as Windows format, start by converting to
20608   # unix format.
20609   path="$BOOT_JDK"
20610   new_path=`$CYGPATH -u "$path"`
20611 
20612   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20613   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20614   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20615   # "foo.exe" is OK but "foo" is an error.
20616   #
20617   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20618   # It is also a way to make sure we got the proper file name for the real test later on.
20619   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20620   if test "x$test_shortpath" = x; then
20621     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20622 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20623     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20624   fi
20625 
20626   # Call helper function which possibly converts this using DOS-style short mode.
20627   # If so, the updated path is stored in $new_path.
20628 
20629   input_path="$new_path"
20630   # Check if we need to convert this using DOS-style short mode. If the path
20631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20632   # take no chances and rewrite it.
20633   # Note: m4 eats our [], so we need to use [ and ] instead.
20634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20635   if test "x$has_forbidden_chars" != x; then
20636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20637     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20638     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20639     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20640       # Going to short mode and back again did indeed matter. Since short mode is
20641       # case insensitive, let's make it lowercase to improve readability.
20642       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20643       # Now convert it back to Unix-stile (cygpath)
20644       input_path=`$CYGPATH -u "$shortmode_path"`
20645       new_path="$input_path"
20646     fi
20647   fi
20648 
20649   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20650   if test "x$test_cygdrive_prefix" = x; then
20651     # As a simple fix, exclude /usr/bin since it's not a real path.
20652     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20653       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20654       # a path prefixed by /cygdrive for fixpath to work.
20655       new_path="$CYGWIN_ROOT_PATH$input_path"
20656     fi
20657   fi
20658 
20659 
20660   if test "x$path" != "x$new_path"; then
20661     BOOT_JDK="$new_path"
20662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20663 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20664   fi
20665 
20666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20667 
20668   path="$BOOT_JDK"
20669   has_colon=`$ECHO $path | $GREP ^.:`
20670   new_path="$path"
20671   if test "x$has_colon" = x; then
20672     # Not in mixed or Windows style, start by that.
20673     new_path=`cmd //c echo $path`
20674   fi
20675 
20676 
20677   input_path="$new_path"
20678   # Check if we need to convert this using DOS-style short mode. If the path
20679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20680   # take no chances and rewrite it.
20681   # Note: m4 eats our [], so we need to use [ and ] instead.
20682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20683   if test "x$has_forbidden_chars" != x; then
20684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20685     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20686   fi
20687 
20688 
20689   windows_path="$new_path"
20690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20691     unix_path=`$CYGPATH -u "$windows_path"`
20692     new_path="$unix_path"
20693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20695     new_path="$unix_path"
20696   fi
20697 
20698   if test "x$path" != "x$new_path"; then
20699     BOOT_JDK="$new_path"
20700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20701 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20702   fi
20703 
20704   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20705   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20706 
20707   else
20708     # We're on a unix platform. Hooray! :)
20709     path="$BOOT_JDK"
20710     has_space=`$ECHO "$path" | $GREP " "`
20711     if test "x$has_space" != x; then
20712       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20713 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20714       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20715     fi
20716 
20717     # Use eval to expand a potential ~
20718     eval path="$path"
20719     if test ! -f "$path" && test ! -d "$path"; then
20720       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20721     fi
20722 
20723     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20724   fi
20725 
20726             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20727 $as_echo_n "checking for Boot JDK... " >&6; }
20728             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20729 $as_echo "$BOOT_JDK" >&6; }
20730             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20731 $as_echo_n "checking Boot JDK version... " >&6; }
20732             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20733             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20734 $as_echo "$BOOT_JDK_VERSION" >&6; }
20735           fi # end check jdk version
20736         fi # end check javac
20737       fi # end check java
20738     fi # end check boot jdk found
20739   fi
20740 
20741 
20742   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20743 
20744   if test "x$BOOT_JDK_FOUND" = xno; then
20745     # Now execute the test
20746 
20747   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20748     # First check at user selected default
20749 
20750   if test "x$BOOT_JDK_FOUND" = xno; then
20751     # Now execute the test
20752 
20753   if test -x /usr/libexec/java_home; then
20754     BOOT_JDK=`/usr/libexec/java_home `
20755     BOOT_JDK_FOUND=maybe
20756     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20757 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20758   fi
20759 
20760 
20761     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20762     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20763       # Do we have a bin/java?
20764       if test ! -x "$BOOT_JDK/bin/java"; then
20765         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20766 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20767         BOOT_JDK_FOUND=no
20768       else
20769         # Do we have a bin/javac?
20770         if test ! -x "$BOOT_JDK/bin/javac"; then
20771           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20773           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20774 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20775           BOOT_JDK_FOUND=no
20776         else
20777           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20778           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20779 
20780           # Extra M4 quote needed to protect [] in grep expression.
20781           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20782           if test "x$FOUND_CORRECT_VERSION" = x; then
20783             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20785             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20786 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20787             BOOT_JDK_FOUND=no
20788           else
20789             # We're done! :-)
20790             BOOT_JDK_FOUND=yes
20791 
20792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20793 
20794   # Input might be given as Windows format, start by converting to
20795   # unix format.
20796   path="$BOOT_JDK"
20797   new_path=`$CYGPATH -u "$path"`
20798 
20799   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20800   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20801   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20802   # "foo.exe" is OK but "foo" is an error.
20803   #
20804   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20805   # It is also a way to make sure we got the proper file name for the real test later on.
20806   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20807   if test "x$test_shortpath" = x; then
20808     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20809 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20810     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20811   fi
20812 
20813   # Call helper function which possibly converts this using DOS-style short mode.
20814   # If so, the updated path is stored in $new_path.
20815 
20816   input_path="$new_path"
20817   # Check if we need to convert this using DOS-style short mode. If the path
20818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20819   # take no chances and rewrite it.
20820   # Note: m4 eats our [], so we need to use [ and ] instead.
20821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20822   if test "x$has_forbidden_chars" != x; then
20823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20824     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20825     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20826     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20827       # Going to short mode and back again did indeed matter. Since short mode is
20828       # case insensitive, let's make it lowercase to improve readability.
20829       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20830       # Now convert it back to Unix-stile (cygpath)
20831       input_path=`$CYGPATH -u "$shortmode_path"`
20832       new_path="$input_path"
20833     fi
20834   fi
20835 
20836   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20837   if test "x$test_cygdrive_prefix" = x; then
20838     # As a simple fix, exclude /usr/bin since it's not a real path.
20839     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20840       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20841       # a path prefixed by /cygdrive for fixpath to work.
20842       new_path="$CYGWIN_ROOT_PATH$input_path"
20843     fi
20844   fi
20845 
20846 
20847   if test "x$path" != "x$new_path"; then
20848     BOOT_JDK="$new_path"
20849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20850 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20851   fi
20852 
20853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20854 
20855   path="$BOOT_JDK"
20856   has_colon=`$ECHO $path | $GREP ^.:`
20857   new_path="$path"
20858   if test "x$has_colon" = x; then
20859     # Not in mixed or Windows style, start by that.
20860     new_path=`cmd //c echo $path`
20861   fi
20862 
20863 
20864   input_path="$new_path"
20865   # Check if we need to convert this using DOS-style short mode. If the path
20866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20867   # take no chances and rewrite it.
20868   # Note: m4 eats our [], so we need to use [ and ] instead.
20869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20870   if test "x$has_forbidden_chars" != x; then
20871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20872     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20873   fi
20874 
20875 
20876   windows_path="$new_path"
20877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20878     unix_path=`$CYGPATH -u "$windows_path"`
20879     new_path="$unix_path"
20880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20882     new_path="$unix_path"
20883   fi
20884 
20885   if test "x$path" != "x$new_path"; then
20886     BOOT_JDK="$new_path"
20887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20888 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20889   fi
20890 
20891   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20892   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20893 
20894   else
20895     # We're on a unix platform. Hooray! :)
20896     path="$BOOT_JDK"
20897     has_space=`$ECHO "$path" | $GREP " "`
20898     if test "x$has_space" != x; then
20899       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20900 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20901       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20902     fi
20903 
20904     # Use eval to expand a potential ~
20905     eval path="$path"
20906     if test ! -f "$path" && test ! -d "$path"; then
20907       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20908     fi
20909 
20910     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20911   fi
20912 
20913             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20914 $as_echo_n "checking for Boot JDK... " >&6; }
20915             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20916 $as_echo "$BOOT_JDK" >&6; }
20917             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20918 $as_echo_n "checking Boot JDK version... " >&6; }
20919             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20920             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20921 $as_echo "$BOOT_JDK_VERSION" >&6; }
20922           fi # end check jdk version
20923         fi # end check javac
20924       fi # end check java
20925     fi # end check boot jdk found
20926   fi
20927 
20928     # If that did not work out (e.g. too old), try explicit versions instead
20929 
20930   if test "x$BOOT_JDK_FOUND" = xno; then
20931     # Now execute the test
20932 
20933   if test -x /usr/libexec/java_home; then
20934     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20935     BOOT_JDK_FOUND=maybe
20936     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20937 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20938   fi
20939 
20940 
20941     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20942     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20943       # Do we have a bin/java?
20944       if test ! -x "$BOOT_JDK/bin/java"; then
20945         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20947         BOOT_JDK_FOUND=no
20948       else
20949         # Do we have a bin/javac?
20950         if test ! -x "$BOOT_JDK/bin/javac"; then
20951           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20952 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20953           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20954 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20955           BOOT_JDK_FOUND=no
20956         else
20957           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20958           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20959 
20960           # Extra M4 quote needed to protect [] in grep expression.
20961           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20962           if test "x$FOUND_CORRECT_VERSION" = x; then
20963             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20964 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20965             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20966 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20967             BOOT_JDK_FOUND=no
20968           else
20969             # We're done! :-)
20970             BOOT_JDK_FOUND=yes
20971 
20972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20973 
20974   # Input might be given as Windows format, start by converting to
20975   # unix format.
20976   path="$BOOT_JDK"
20977   new_path=`$CYGPATH -u "$path"`
20978 
20979   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20980   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20981   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20982   # "foo.exe" is OK but "foo" is an error.
20983   #
20984   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20985   # It is also a way to make sure we got the proper file name for the real test later on.
20986   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20987   if test "x$test_shortpath" = x; then
20988     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20989 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20990     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20991   fi
20992 
20993   # Call helper function which possibly converts this using DOS-style short mode.
20994   # If so, the updated path is stored in $new_path.
20995 
20996   input_path="$new_path"
20997   # Check if we need to convert this using DOS-style short mode. If the path
20998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20999   # take no chances and rewrite it.
21000   # Note: m4 eats our [], so we need to use [ and ] instead.
21001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21002   if test "x$has_forbidden_chars" != x; then
21003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21004     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21005     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21006     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21007       # Going to short mode and back again did indeed matter. Since short mode is
21008       # case insensitive, let's make it lowercase to improve readability.
21009       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21010       # Now convert it back to Unix-stile (cygpath)
21011       input_path=`$CYGPATH -u "$shortmode_path"`
21012       new_path="$input_path"
21013     fi
21014   fi
21015 
21016   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21017   if test "x$test_cygdrive_prefix" = x; then
21018     # As a simple fix, exclude /usr/bin since it's not a real path.
21019     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21020       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21021       # a path prefixed by /cygdrive for fixpath to work.
21022       new_path="$CYGWIN_ROOT_PATH$input_path"
21023     fi
21024   fi
21025 
21026 
21027   if test "x$path" != "x$new_path"; then
21028     BOOT_JDK="$new_path"
21029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21030 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21031   fi
21032 
21033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21034 
21035   path="$BOOT_JDK"
21036   has_colon=`$ECHO $path | $GREP ^.:`
21037   new_path="$path"
21038   if test "x$has_colon" = x; then
21039     # Not in mixed or Windows style, start by that.
21040     new_path=`cmd //c echo $path`
21041   fi
21042 
21043 
21044   input_path="$new_path"
21045   # Check if we need to convert this using DOS-style short mode. If the path
21046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21047   # take no chances and rewrite it.
21048   # Note: m4 eats our [], so we need to use [ and ] instead.
21049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21050   if test "x$has_forbidden_chars" != x; then
21051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21052     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21053   fi
21054 
21055 
21056   windows_path="$new_path"
21057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21058     unix_path=`$CYGPATH -u "$windows_path"`
21059     new_path="$unix_path"
21060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21062     new_path="$unix_path"
21063   fi
21064 
21065   if test "x$path" != "x$new_path"; then
21066     BOOT_JDK="$new_path"
21067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21068 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21069   fi
21070 
21071   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21072   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21073 
21074   else
21075     # We're on a unix platform. Hooray! :)
21076     path="$BOOT_JDK"
21077     has_space=`$ECHO "$path" | $GREP " "`
21078     if test "x$has_space" != x; then
21079       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21080 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21081       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21082     fi
21083 
21084     # Use eval to expand a potential ~
21085     eval path="$path"
21086     if test ! -f "$path" && test ! -d "$path"; then
21087       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21088     fi
21089 
21090     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21091   fi
21092 
21093             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21094 $as_echo_n "checking for Boot JDK... " >&6; }
21095             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21096 $as_echo "$BOOT_JDK" >&6; }
21097             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21098 $as_echo_n "checking Boot JDK version... " >&6; }
21099             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21100             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21101 $as_echo "$BOOT_JDK_VERSION" >&6; }
21102           fi # end check jdk version
21103         fi # end check javac
21104       fi # end check java
21105     fi # end check boot jdk found
21106   fi
21107 
21108 
21109   if test "x$BOOT_JDK_FOUND" = xno; then
21110     # Now execute the test
21111 
21112   if test -x /usr/libexec/java_home; then
21113     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21114     BOOT_JDK_FOUND=maybe
21115     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21116 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21117   fi
21118 
21119 
21120     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21121     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21122       # Do we have a bin/java?
21123       if test ! -x "$BOOT_JDK/bin/java"; then
21124         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21125 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21126         BOOT_JDK_FOUND=no
21127       else
21128         # Do we have a bin/javac?
21129         if test ! -x "$BOOT_JDK/bin/javac"; then
21130           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21131 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21132           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21133 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21134           BOOT_JDK_FOUND=no
21135         else
21136           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21137           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21138 
21139           # Extra M4 quote needed to protect [] in grep expression.
21140           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21141           if test "x$FOUND_CORRECT_VERSION" = x; then
21142             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21143 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21144             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21145 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21146             BOOT_JDK_FOUND=no
21147           else
21148             # We're done! :-)
21149             BOOT_JDK_FOUND=yes
21150 
21151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21152 
21153   # Input might be given as Windows format, start by converting to
21154   # unix format.
21155   path="$BOOT_JDK"
21156   new_path=`$CYGPATH -u "$path"`
21157 
21158   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21159   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21160   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21161   # "foo.exe" is OK but "foo" is an error.
21162   #
21163   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21164   # It is also a way to make sure we got the proper file name for the real test later on.
21165   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21166   if test "x$test_shortpath" = x; then
21167     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21168 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21169     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21170   fi
21171 
21172   # Call helper function which possibly converts this using DOS-style short mode.
21173   # If so, the updated path is stored in $new_path.
21174 
21175   input_path="$new_path"
21176   # Check if we need to convert this using DOS-style short mode. If the path
21177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21178   # take no chances and rewrite it.
21179   # Note: m4 eats our [], so we need to use [ and ] instead.
21180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21181   if test "x$has_forbidden_chars" != x; then
21182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21186       # Going to short mode and back again did indeed matter. Since short mode is
21187       # case insensitive, let's make it lowercase to improve readability.
21188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21189       # Now convert it back to Unix-stile (cygpath)
21190       input_path=`$CYGPATH -u "$shortmode_path"`
21191       new_path="$input_path"
21192     fi
21193   fi
21194 
21195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21196   if test "x$test_cygdrive_prefix" = x; then
21197     # As a simple fix, exclude /usr/bin since it's not a real path.
21198     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21200       # a path prefixed by /cygdrive for fixpath to work.
21201       new_path="$CYGWIN_ROOT_PATH$input_path"
21202     fi
21203   fi
21204 
21205 
21206   if test "x$path" != "x$new_path"; then
21207     BOOT_JDK="$new_path"
21208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21209 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21210   fi
21211 
21212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21213 
21214   path="$BOOT_JDK"
21215   has_colon=`$ECHO $path | $GREP ^.:`
21216   new_path="$path"
21217   if test "x$has_colon" = x; then
21218     # Not in mixed or Windows style, start by that.
21219     new_path=`cmd //c echo $path`
21220   fi
21221 
21222 
21223   input_path="$new_path"
21224   # Check if we need to convert this using DOS-style short mode. If the path
21225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21226   # take no chances and rewrite it.
21227   # Note: m4 eats our [], so we need to use [ and ] instead.
21228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21229   if test "x$has_forbidden_chars" != x; then
21230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21232   fi
21233 
21234 
21235   windows_path="$new_path"
21236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21237     unix_path=`$CYGPATH -u "$windows_path"`
21238     new_path="$unix_path"
21239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21241     new_path="$unix_path"
21242   fi
21243 
21244   if test "x$path" != "x$new_path"; then
21245     BOOT_JDK="$new_path"
21246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21247 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21248   fi
21249 
21250   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21251   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21252 
21253   else
21254     # We're on a unix platform. Hooray! :)
21255     path="$BOOT_JDK"
21256     has_space=`$ECHO "$path" | $GREP " "`
21257     if test "x$has_space" != x; then
21258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21259 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21260       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21261     fi
21262 
21263     # Use eval to expand a potential ~
21264     eval path="$path"
21265     if test ! -f "$path" && test ! -d "$path"; then
21266       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21267     fi
21268 
21269     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21270   fi
21271 
21272             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21273 $as_echo_n "checking for Boot JDK... " >&6; }
21274             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21275 $as_echo "$BOOT_JDK" >&6; }
21276             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21277 $as_echo_n "checking Boot JDK version... " >&6; }
21278             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21280 $as_echo "$BOOT_JDK_VERSION" >&6; }
21281           fi # end check jdk version
21282         fi # end check javac
21283       fi # end check java
21284     fi # end check boot jdk found
21285   fi
21286 
21287 
21288   if test "x$BOOT_JDK_FOUND" = xno; then
21289     # Now execute the test
21290 
21291   if test -x /usr/libexec/java_home; then
21292     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21293     BOOT_JDK_FOUND=maybe
21294     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21295 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21296   fi
21297 
21298 
21299     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21300     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21301       # Do we have a bin/java?
21302       if test ! -x "$BOOT_JDK/bin/java"; then
21303         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21304 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21305         BOOT_JDK_FOUND=no
21306       else
21307         # Do we have a bin/javac?
21308         if test ! -x "$BOOT_JDK/bin/javac"; then
21309           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21310 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21311           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21312 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21313           BOOT_JDK_FOUND=no
21314         else
21315           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21316           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21317 
21318           # Extra M4 quote needed to protect [] in grep expression.
21319           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21320           if test "x$FOUND_CORRECT_VERSION" = x; then
21321             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21322 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21323             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21324 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21325             BOOT_JDK_FOUND=no
21326           else
21327             # We're done! :-)
21328             BOOT_JDK_FOUND=yes
21329 
21330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21331 
21332   # Input might be given as Windows format, start by converting to
21333   # unix format.
21334   path="$BOOT_JDK"
21335   new_path=`$CYGPATH -u "$path"`
21336 
21337   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21338   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21339   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21340   # "foo.exe" is OK but "foo" is an error.
21341   #
21342   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21343   # It is also a way to make sure we got the proper file name for the real test later on.
21344   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21345   if test "x$test_shortpath" = x; then
21346     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21347 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21348     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21349   fi
21350 
21351   # Call helper function which possibly converts this using DOS-style short mode.
21352   # If so, the updated path is stored in $new_path.
21353 
21354   input_path="$new_path"
21355   # Check if we need to convert this using DOS-style short mode. If the path
21356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21357   # take no chances and rewrite it.
21358   # Note: m4 eats our [], so we need to use [ and ] instead.
21359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21360   if test "x$has_forbidden_chars" != x; then
21361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21365       # Going to short mode and back again did indeed matter. Since short mode is
21366       # case insensitive, let's make it lowercase to improve readability.
21367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21368       # Now convert it back to Unix-stile (cygpath)
21369       input_path=`$CYGPATH -u "$shortmode_path"`
21370       new_path="$input_path"
21371     fi
21372   fi
21373 
21374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21375   if test "x$test_cygdrive_prefix" = x; then
21376     # As a simple fix, exclude /usr/bin since it's not a real path.
21377     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21379       # a path prefixed by /cygdrive for fixpath to work.
21380       new_path="$CYGWIN_ROOT_PATH$input_path"
21381     fi
21382   fi
21383 
21384 
21385   if test "x$path" != "x$new_path"; then
21386     BOOT_JDK="$new_path"
21387     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21388 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21389   fi
21390 
21391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21392 
21393   path="$BOOT_JDK"
21394   has_colon=`$ECHO $path | $GREP ^.:`
21395   new_path="$path"
21396   if test "x$has_colon" = x; then
21397     # Not in mixed or Windows style, start by that.
21398     new_path=`cmd //c echo $path`
21399   fi
21400 
21401 
21402   input_path="$new_path"
21403   # Check if we need to convert this using DOS-style short mode. If the path
21404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21405   # take no chances and rewrite it.
21406   # Note: m4 eats our [], so we need to use [ and ] instead.
21407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21408   if test "x$has_forbidden_chars" != x; then
21409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21410     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21411   fi
21412 
21413 
21414   windows_path="$new_path"
21415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21416     unix_path=`$CYGPATH -u "$windows_path"`
21417     new_path="$unix_path"
21418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21420     new_path="$unix_path"
21421   fi
21422 
21423   if test "x$path" != "x$new_path"; then
21424     BOOT_JDK="$new_path"
21425     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21426 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21427   fi
21428 
21429   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21430   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21431 
21432   else
21433     # We're on a unix platform. Hooray! :)
21434     path="$BOOT_JDK"
21435     has_space=`$ECHO "$path" | $GREP " "`
21436     if test "x$has_space" != x; then
21437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21438 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21439       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21440     fi
21441 
21442     # Use eval to expand a potential ~
21443     eval path="$path"
21444     if test ! -f "$path" && test ! -d "$path"; then
21445       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21446     fi
21447 
21448     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21449   fi
21450 
21451             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21452 $as_echo_n "checking for Boot JDK... " >&6; }
21453             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21454 $as_echo "$BOOT_JDK" >&6; }
21455             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21456 $as_echo_n "checking Boot JDK version... " >&6; }
21457             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21458             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21459 $as_echo "$BOOT_JDK_VERSION" >&6; }
21460           fi # end check jdk version
21461         fi # end check javac
21462       fi # end check java
21463     fi # end check boot jdk found
21464   fi
21465 
21466   fi
21467 
21468 
21469     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21470     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21471       # Do we have a bin/java?
21472       if test ! -x "$BOOT_JDK/bin/java"; then
21473         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21474 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21475         BOOT_JDK_FOUND=no
21476       else
21477         # Do we have a bin/javac?
21478         if test ! -x "$BOOT_JDK/bin/javac"; then
21479           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21480 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21481           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21482 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21483           BOOT_JDK_FOUND=no
21484         else
21485           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21486           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21487 
21488           # Extra M4 quote needed to protect [] in grep expression.
21489           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21490           if test "x$FOUND_CORRECT_VERSION" = x; then
21491             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21492 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21493             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21494 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21495             BOOT_JDK_FOUND=no
21496           else
21497             # We're done! :-)
21498             BOOT_JDK_FOUND=yes
21499 
21500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21501 
21502   # Input might be given as Windows format, start by converting to
21503   # unix format.
21504   path="$BOOT_JDK"
21505   new_path=`$CYGPATH -u "$path"`
21506 
21507   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21508   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21509   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21510   # "foo.exe" is OK but "foo" is an error.
21511   #
21512   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21513   # It is also a way to make sure we got the proper file name for the real test later on.
21514   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21515   if test "x$test_shortpath" = x; then
21516     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21517 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21518     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21519   fi
21520 
21521   # Call helper function which possibly converts this using DOS-style short mode.
21522   # If so, the updated path is stored in $new_path.
21523 
21524   input_path="$new_path"
21525   # Check if we need to convert this using DOS-style short mode. If the path
21526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21527   # take no chances and rewrite it.
21528   # Note: m4 eats our [], so we need to use [ and ] instead.
21529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21530   if test "x$has_forbidden_chars" != x; then
21531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21535       # Going to short mode and back again did indeed matter. Since short mode is
21536       # case insensitive, let's make it lowercase to improve readability.
21537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21538       # Now convert it back to Unix-stile (cygpath)
21539       input_path=`$CYGPATH -u "$shortmode_path"`
21540       new_path="$input_path"
21541     fi
21542   fi
21543 
21544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21545   if test "x$test_cygdrive_prefix" = x; then
21546     # As a simple fix, exclude /usr/bin since it's not a real path.
21547     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21549       # a path prefixed by /cygdrive for fixpath to work.
21550       new_path="$CYGWIN_ROOT_PATH$input_path"
21551     fi
21552   fi
21553 
21554 
21555   if test "x$path" != "x$new_path"; then
21556     BOOT_JDK="$new_path"
21557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21558 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21559   fi
21560 
21561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21562 
21563   path="$BOOT_JDK"
21564   has_colon=`$ECHO $path | $GREP ^.:`
21565   new_path="$path"
21566   if test "x$has_colon" = x; then
21567     # Not in mixed or Windows style, start by that.
21568     new_path=`cmd //c echo $path`
21569   fi
21570 
21571 
21572   input_path="$new_path"
21573   # Check if we need to convert this using DOS-style short mode. If the path
21574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21575   # take no chances and rewrite it.
21576   # Note: m4 eats our [], so we need to use [ and ] instead.
21577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21578   if test "x$has_forbidden_chars" != x; then
21579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21580     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21581   fi
21582 
21583 
21584   windows_path="$new_path"
21585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21586     unix_path=`$CYGPATH -u "$windows_path"`
21587     new_path="$unix_path"
21588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21590     new_path="$unix_path"
21591   fi
21592 
21593   if test "x$path" != "x$new_path"; then
21594     BOOT_JDK="$new_path"
21595     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21596 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21597   fi
21598 
21599   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21600   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21601 
21602   else
21603     # We're on a unix platform. Hooray! :)
21604     path="$BOOT_JDK"
21605     has_space=`$ECHO "$path" | $GREP " "`
21606     if test "x$has_space" != x; then
21607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21608 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21609       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21610     fi
21611 
21612     # Use eval to expand a potential ~
21613     eval path="$path"
21614     if test ! -f "$path" && test ! -d "$path"; then
21615       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21616     fi
21617 
21618     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21619   fi
21620 
21621             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21622 $as_echo_n "checking for Boot JDK... " >&6; }
21623             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21624 $as_echo "$BOOT_JDK" >&6; }
21625             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21626 $as_echo_n "checking Boot JDK version... " >&6; }
21627             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21628             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21629 $as_echo "$BOOT_JDK_VERSION" >&6; }
21630           fi # end check jdk version
21631         fi # end check javac
21632       fi # end check java
21633     fi # end check boot jdk found
21634   fi
21635 
21636 
21637   # Test: Is $JAVA_HOME set?
21638 
21639   if test "x$BOOT_JDK_FOUND" = xno; then
21640     # Now execute the test
21641 
21642   if test "x$JAVA_HOME" != x; then
21643     JAVA_HOME_PROCESSED="$JAVA_HOME"
21644 
21645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21646 
21647   # Input might be given as Windows format, start by converting to
21648   # unix format.
21649   path="$JAVA_HOME_PROCESSED"
21650   new_path=`$CYGPATH -u "$path"`
21651 
21652   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21653   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21654   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21655   # "foo.exe" is OK but "foo" is an error.
21656   #
21657   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21658   # It is also a way to make sure we got the proper file name for the real test later on.
21659   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21660   if test "x$test_shortpath" = x; then
21661     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21662 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21663     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21664   fi
21665 
21666   # Call helper function which possibly converts this using DOS-style short mode.
21667   # If so, the updated path is stored in $new_path.
21668 
21669   input_path="$new_path"
21670   # Check if we need to convert this using DOS-style short mode. If the path
21671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21672   # take no chances and rewrite it.
21673   # Note: m4 eats our [], so we need to use [ and ] instead.
21674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21675   if test "x$has_forbidden_chars" != x; then
21676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21677     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21678     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21679     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21680       # Going to short mode and back again did indeed matter. Since short mode is
21681       # case insensitive, let's make it lowercase to improve readability.
21682       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21683       # Now convert it back to Unix-stile (cygpath)
21684       input_path=`$CYGPATH -u "$shortmode_path"`
21685       new_path="$input_path"
21686     fi
21687   fi
21688 
21689   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21690   if test "x$test_cygdrive_prefix" = x; then
21691     # As a simple fix, exclude /usr/bin since it's not a real path.
21692     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21693       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21694       # a path prefixed by /cygdrive for fixpath to work.
21695       new_path="$CYGWIN_ROOT_PATH$input_path"
21696     fi
21697   fi
21698 
21699 
21700   if test "x$path" != "x$new_path"; then
21701     JAVA_HOME_PROCESSED="$new_path"
21702     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21703 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21704   fi
21705 
21706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21707 
21708   path="$JAVA_HOME_PROCESSED"
21709   has_colon=`$ECHO $path | $GREP ^.:`
21710   new_path="$path"
21711   if test "x$has_colon" = x; then
21712     # Not in mixed or Windows style, start by that.
21713     new_path=`cmd //c echo $path`
21714   fi
21715 
21716 
21717   input_path="$new_path"
21718   # Check if we need to convert this using DOS-style short mode. If the path
21719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21720   # take no chances and rewrite it.
21721   # Note: m4 eats our [], so we need to use [ and ] instead.
21722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21723   if test "x$has_forbidden_chars" != x; then
21724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21725     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21726   fi
21727 
21728 
21729   windows_path="$new_path"
21730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21731     unix_path=`$CYGPATH -u "$windows_path"`
21732     new_path="$unix_path"
21733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21735     new_path="$unix_path"
21736   fi
21737 
21738   if test "x$path" != "x$new_path"; then
21739     JAVA_HOME_PROCESSED="$new_path"
21740     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21741 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21742   fi
21743 
21744   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21745   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21746 
21747   else
21748     # We're on a unix platform. Hooray! :)
21749     path="$JAVA_HOME_PROCESSED"
21750     has_space=`$ECHO "$path" | $GREP " "`
21751     if test "x$has_space" != x; then
21752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21753 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21754       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21755     fi
21756 
21757     # Use eval to expand a potential ~
21758     eval path="$path"
21759     if test ! -f "$path" && test ! -d "$path"; then
21760       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21761     fi
21762 
21763     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21764   fi
21765 
21766     if test ! -d "$JAVA_HOME_PROCESSED"; then
21767       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21768 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21769     else
21770       # Aha, the user has set a JAVA_HOME
21771       # let us use that as the Boot JDK.
21772       BOOT_JDK="$JAVA_HOME_PROCESSED"
21773       BOOT_JDK_FOUND=maybe
21774       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21775 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21776     fi
21777   fi
21778 
21779 
21780     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21781     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21782       # Do we have a bin/java?
21783       if test ! -x "$BOOT_JDK/bin/java"; then
21784         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21785 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21786         BOOT_JDK_FOUND=no
21787       else
21788         # Do we have a bin/javac?
21789         if test ! -x "$BOOT_JDK/bin/javac"; then
21790           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21791 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21792           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21793 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21794           BOOT_JDK_FOUND=no
21795         else
21796           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21797           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21798 
21799           # Extra M4 quote needed to protect [] in grep expression.
21800           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21801           if test "x$FOUND_CORRECT_VERSION" = x; then
21802             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21804             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21805 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21806             BOOT_JDK_FOUND=no
21807           else
21808             # We're done! :-)
21809             BOOT_JDK_FOUND=yes
21810 
21811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21812 
21813   # Input might be given as Windows format, start by converting to
21814   # unix format.
21815   path="$BOOT_JDK"
21816   new_path=`$CYGPATH -u "$path"`
21817 
21818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21821   # "foo.exe" is OK but "foo" is an error.
21822   #
21823   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21824   # It is also a way to make sure we got the proper file name for the real test later on.
21825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21826   if test "x$test_shortpath" = x; then
21827     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21828 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21829     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21830   fi
21831 
21832   # Call helper function which possibly converts this using DOS-style short mode.
21833   # If so, the updated path is stored in $new_path.
21834 
21835   input_path="$new_path"
21836   # Check if we need to convert this using DOS-style short mode. If the path
21837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21838   # take no chances and rewrite it.
21839   # Note: m4 eats our [], so we need to use [ and ] instead.
21840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21841   if test "x$has_forbidden_chars" != x; then
21842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21843     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21844     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21845     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21846       # Going to short mode and back again did indeed matter. Since short mode is
21847       # case insensitive, let's make it lowercase to improve readability.
21848       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21849       # Now convert it back to Unix-stile (cygpath)
21850       input_path=`$CYGPATH -u "$shortmode_path"`
21851       new_path="$input_path"
21852     fi
21853   fi
21854 
21855   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21856   if test "x$test_cygdrive_prefix" = x; then
21857     # As a simple fix, exclude /usr/bin since it's not a real path.
21858     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21859       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21860       # a path prefixed by /cygdrive for fixpath to work.
21861       new_path="$CYGWIN_ROOT_PATH$input_path"
21862     fi
21863   fi
21864 
21865 
21866   if test "x$path" != "x$new_path"; then
21867     BOOT_JDK="$new_path"
21868     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21869 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21870   fi
21871 
21872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21873 
21874   path="$BOOT_JDK"
21875   has_colon=`$ECHO $path | $GREP ^.:`
21876   new_path="$path"
21877   if test "x$has_colon" = x; then
21878     # Not in mixed or Windows style, start by that.
21879     new_path=`cmd //c echo $path`
21880   fi
21881 
21882 
21883   input_path="$new_path"
21884   # Check if we need to convert this using DOS-style short mode. If the path
21885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21886   # take no chances and rewrite it.
21887   # Note: m4 eats our [], so we need to use [ and ] instead.
21888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21889   if test "x$has_forbidden_chars" != x; then
21890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21891     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21892   fi
21893 
21894 
21895   windows_path="$new_path"
21896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21897     unix_path=`$CYGPATH -u "$windows_path"`
21898     new_path="$unix_path"
21899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21901     new_path="$unix_path"
21902   fi
21903 
21904   if test "x$path" != "x$new_path"; then
21905     BOOT_JDK="$new_path"
21906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21907 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21908   fi
21909 
21910   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21911   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21912 
21913   else
21914     # We're on a unix platform. Hooray! :)
21915     path="$BOOT_JDK"
21916     has_space=`$ECHO "$path" | $GREP " "`
21917     if test "x$has_space" != x; then
21918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21919 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21920       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21921     fi
21922 
21923     # Use eval to expand a potential ~
21924     eval path="$path"
21925     if test ! -f "$path" && test ! -d "$path"; then
21926       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21927     fi
21928 
21929     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21930   fi
21931 
21932             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21933 $as_echo_n "checking for Boot JDK... " >&6; }
21934             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21935 $as_echo "$BOOT_JDK" >&6; }
21936             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21937 $as_echo_n "checking Boot JDK version... " >&6; }
21938             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21939             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21940 $as_echo "$BOOT_JDK_VERSION" >&6; }
21941           fi # end check jdk version
21942         fi # end check javac
21943       fi # end check java
21944     fi # end check boot jdk found
21945   fi
21946 
21947 
21948   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21949 
21950   if test "x$BOOT_JDK_FOUND" = xno; then
21951     # Now execute the test
21952 
21953   # Extract the first word of "javac", so it can be a program name with args.
21954 set dummy javac; ac_word=$2
21955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21956 $as_echo_n "checking for $ac_word... " >&6; }
21957 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21958   $as_echo_n "(cached) " >&6
21959 else
21960   case $JAVAC_CHECK in
21961   [\\/]* | ?:[\\/]*)
21962   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21963   ;;
21964   *)
21965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21966 for as_dir in $PATH
21967 do
21968   IFS=$as_save_IFS
21969   test -z "$as_dir" && as_dir=.
21970     for ac_exec_ext in '' $ac_executable_extensions; do
21971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21972     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21974     break 2
21975   fi
21976 done
21977   done
21978 IFS=$as_save_IFS
21979 
21980   ;;
21981 esac
21982 fi
21983 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21984 if test -n "$JAVAC_CHECK"; then
21985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21986 $as_echo "$JAVAC_CHECK" >&6; }
21987 else
21988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21989 $as_echo "no" >&6; }
21990 fi
21991 
21992 
21993   # Extract the first word of "java", so it can be a program name with args.
21994 set dummy java; ac_word=$2
21995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21996 $as_echo_n "checking for $ac_word... " >&6; }
21997 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21998   $as_echo_n "(cached) " >&6
21999 else
22000   case $JAVA_CHECK in
22001   [\\/]* | ?:[\\/]*)
22002   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22003   ;;
22004   *)
22005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22006 for as_dir in $PATH
22007 do
22008   IFS=$as_save_IFS
22009   test -z "$as_dir" && as_dir=.
22010     for ac_exec_ext in '' $ac_executable_extensions; do
22011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22012     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22014     break 2
22015   fi
22016 done
22017   done
22018 IFS=$as_save_IFS
22019 
22020   ;;
22021 esac
22022 fi
22023 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22024 if test -n "$JAVA_CHECK"; then
22025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22026 $as_echo "$JAVA_CHECK" >&6; }
22027 else
22028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22029 $as_echo "no" >&6; }
22030 fi
22031 
22032 
22033   BINARY="$JAVAC_CHECK"
22034   if test "x$JAVAC_CHECK" = x; then
22035     BINARY="$JAVA_CHECK"
22036   fi
22037   if test "x$BINARY" != x; then
22038     # So there is a java(c) binary, it might be part of a JDK.
22039     # Lets find the JDK/JRE directory by following symbolic links.
22040     # Linux/GNU systems often have links from /usr/bin/java to
22041     # /etc/alternatives/java to the real JDK binary.
22042 
22043   if test "x$OPENJDK_BUILD_OS" != xwindows; then
22044     # Follow a chain of symbolic links. Use readlink
22045     # where it exists, else fall back to horribly
22046     # complicated shell code.
22047     if test "x$READLINK_TESTED" != yes; then
22048       # On MacOSX there is a readlink tool with a different
22049       # purpose than the GNU readlink tool. Check the found readlink.
22050       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22051       if test "x$ISGNU" = x; then
22052         # A readlink that we do not know how to use.
22053         # Are there other non-GNU readlinks out there?
22054         READLINK_TESTED=yes
22055         READLINK=
22056       fi
22057     fi
22058 
22059     if test "x$READLINK" != x; then
22060       BINARY=`$READLINK -f $BINARY`
22061     else
22062       # Save the current directory for restoring afterwards
22063       STARTDIR=$PWD
22064       COUNTER=0
22065       sym_link_dir=`$DIRNAME $BINARY`
22066       sym_link_file=`$BASENAME $BINARY`
22067       cd $sym_link_dir
22068       # Use -P flag to resolve symlinks in directories.
22069       cd `$THEPWDCMD -P`
22070       sym_link_dir=`$THEPWDCMD -P`
22071       # Resolve file symlinks
22072       while test $COUNTER -lt 20; do
22073         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22074         if test "x$ISLINK" == x; then
22075           # This is not a symbolic link! We are done!
22076           break
22077         fi
22078         # Again resolve directory symlinks since the target of the just found
22079         # link could be in a different directory
22080         cd `$DIRNAME $ISLINK`
22081         sym_link_dir=`$THEPWDCMD -P`
22082         sym_link_file=`$BASENAME $ISLINK`
22083         let COUNTER=COUNTER+1
22084       done
22085       cd $STARTDIR
22086       BINARY=$sym_link_dir/$sym_link_file
22087     fi
22088   fi
22089 
22090     BOOT_JDK=`dirname "$BINARY"`
22091     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22092     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22093       # Looks like we found ourselves an JDK
22094       BOOT_JDK_FOUND=maybe
22095       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22096 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22097     fi
22098   fi
22099 
22100 
22101     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22102     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22103       # Do we have a bin/java?
22104       if test ! -x "$BOOT_JDK/bin/java"; then
22105         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22106 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22107         BOOT_JDK_FOUND=no
22108       else
22109         # Do we have a bin/javac?
22110         if test ! -x "$BOOT_JDK/bin/javac"; then
22111           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22112 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22113           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22114 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22115           BOOT_JDK_FOUND=no
22116         else
22117           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22118           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22119 
22120           # Extra M4 quote needed to protect [] in grep expression.
22121           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22122           if test "x$FOUND_CORRECT_VERSION" = x; then
22123             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22124 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22125             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22126 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22127             BOOT_JDK_FOUND=no
22128           else
22129             # We're done! :-)
22130             BOOT_JDK_FOUND=yes
22131 
22132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22133 
22134   # Input might be given as Windows format, start by converting to
22135   # unix format.
22136   path="$BOOT_JDK"
22137   new_path=`$CYGPATH -u "$path"`
22138 
22139   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22140   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22141   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22142   # "foo.exe" is OK but "foo" is an error.
22143   #
22144   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22145   # It is also a way to make sure we got the proper file name for the real test later on.
22146   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22147   if test "x$test_shortpath" = x; then
22148     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22149 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22150     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22151   fi
22152 
22153   # Call helper function which possibly converts this using DOS-style short mode.
22154   # If so, the updated path is stored in $new_path.
22155 
22156   input_path="$new_path"
22157   # Check if we need to convert this using DOS-style short mode. If the path
22158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22159   # take no chances and rewrite it.
22160   # Note: m4 eats our [], so we need to use [ and ] instead.
22161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22162   if test "x$has_forbidden_chars" != x; then
22163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22164     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22165     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22166     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22167       # Going to short mode and back again did indeed matter. Since short mode is
22168       # case insensitive, let's make it lowercase to improve readability.
22169       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22170       # Now convert it back to Unix-stile (cygpath)
22171       input_path=`$CYGPATH -u "$shortmode_path"`
22172       new_path="$input_path"
22173     fi
22174   fi
22175 
22176   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22177   if test "x$test_cygdrive_prefix" = x; then
22178     # As a simple fix, exclude /usr/bin since it's not a real path.
22179     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22180       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22181       # a path prefixed by /cygdrive for fixpath to work.
22182       new_path="$CYGWIN_ROOT_PATH$input_path"
22183     fi
22184   fi
22185 
22186 
22187   if test "x$path" != "x$new_path"; then
22188     BOOT_JDK="$new_path"
22189     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22190 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22191   fi
22192 
22193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22194 
22195   path="$BOOT_JDK"
22196   has_colon=`$ECHO $path | $GREP ^.:`
22197   new_path="$path"
22198   if test "x$has_colon" = x; then
22199     # Not in mixed or Windows style, start by that.
22200     new_path=`cmd //c echo $path`
22201   fi
22202 
22203 
22204   input_path="$new_path"
22205   # Check if we need to convert this using DOS-style short mode. If the path
22206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22207   # take no chances and rewrite it.
22208   # Note: m4 eats our [], so we need to use [ and ] instead.
22209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22210   if test "x$has_forbidden_chars" != x; then
22211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22213   fi
22214 
22215 
22216   windows_path="$new_path"
22217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22218     unix_path=`$CYGPATH -u "$windows_path"`
22219     new_path="$unix_path"
22220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22222     new_path="$unix_path"
22223   fi
22224 
22225   if test "x$path" != "x$new_path"; then
22226     BOOT_JDK="$new_path"
22227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22228 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22229   fi
22230 
22231   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22232   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22233 
22234   else
22235     # We're on a unix platform. Hooray! :)
22236     path="$BOOT_JDK"
22237     has_space=`$ECHO "$path" | $GREP " "`
22238     if test "x$has_space" != x; then
22239       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22240 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22241       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22242     fi
22243 
22244     # Use eval to expand a potential ~
22245     eval path="$path"
22246     if test ! -f "$path" && test ! -d "$path"; then
22247       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22248     fi
22249 
22250     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22251   fi
22252 
22253             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22254 $as_echo_n "checking for Boot JDK... " >&6; }
22255             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22256 $as_echo "$BOOT_JDK" >&6; }
22257             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22258 $as_echo_n "checking Boot JDK version... " >&6; }
22259             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22260             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22261 $as_echo "$BOOT_JDK_VERSION" >&6; }
22262           fi # end check jdk version
22263         fi # end check javac
22264       fi # end check java
22265     fi # end check boot jdk found
22266   fi
22267 
22268 
22269   # Test: Is there a JDK installed in default, well-known locations?
22270 
22271   if test "x$BOOT_JDK_FOUND" = xno; then
22272     # Now execute the test
22273 
22274   if test "x$OPENJDK_TARGET_OS" = xwindows; then
22275 
22276   if test "x$BOOT_JDK_FOUND" = xno; then
22277     # Now execute the test
22278 
22279   if test "x$ProgramW6432" != x; then
22280     VIRTUAL_DIR="$ProgramW6432/Java"
22281 
22282   windows_path="$VIRTUAL_DIR"
22283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22284     unix_path=`$CYGPATH -u "$windows_path"`
22285     VIRTUAL_DIR="$unix_path"
22286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22288     VIRTUAL_DIR="$unix_path"
22289   fi
22290 
22291 
22292   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22293   BOOT_JDK_SUFFIX=""
22294   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22295   if test "x$ALL_JDKS_FOUND" != x; then
22296     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22297 
22298   if test "x$BOOT_JDK_FOUND" = xno; then
22299     # Now execute the test
22300 
22301         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22302         if test -d "$BOOT_JDK"; then
22303           BOOT_JDK_FOUND=maybe
22304           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22305 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22306         fi
22307 
22308 
22309     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22310     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22311       # Do we have a bin/java?
22312       if test ! -x "$BOOT_JDK/bin/java"; then
22313         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22314 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22315         BOOT_JDK_FOUND=no
22316       else
22317         # Do we have a bin/javac?
22318         if test ! -x "$BOOT_JDK/bin/javac"; then
22319           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22320 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22321           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22322 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22323           BOOT_JDK_FOUND=no
22324         else
22325           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22326           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22327 
22328           # Extra M4 quote needed to protect [] in grep expression.
22329           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22330           if test "x$FOUND_CORRECT_VERSION" = x; then
22331             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22332 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22333             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22334 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22335             BOOT_JDK_FOUND=no
22336           else
22337             # We're done! :-)
22338             BOOT_JDK_FOUND=yes
22339 
22340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22341 
22342   # Input might be given as Windows format, start by converting to
22343   # unix format.
22344   path="$BOOT_JDK"
22345   new_path=`$CYGPATH -u "$path"`
22346 
22347   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22348   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22349   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22350   # "foo.exe" is OK but "foo" is an error.
22351   #
22352   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22353   # It is also a way to make sure we got the proper file name for the real test later on.
22354   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22355   if test "x$test_shortpath" = x; then
22356     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22357 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22358     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22359   fi
22360 
22361   # Call helper function which possibly converts this using DOS-style short mode.
22362   # If so, the updated path is stored in $new_path.
22363 
22364   input_path="$new_path"
22365   # Check if we need to convert this using DOS-style short mode. If the path
22366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22367   # take no chances and rewrite it.
22368   # Note: m4 eats our [], so we need to use [ and ] instead.
22369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22370   if test "x$has_forbidden_chars" != x; then
22371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22375       # Going to short mode and back again did indeed matter. Since short mode is
22376       # case insensitive, let's make it lowercase to improve readability.
22377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22378       # Now convert it back to Unix-stile (cygpath)
22379       input_path=`$CYGPATH -u "$shortmode_path"`
22380       new_path="$input_path"
22381     fi
22382   fi
22383 
22384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22385   if test "x$test_cygdrive_prefix" = x; then
22386     # As a simple fix, exclude /usr/bin since it's not a real path.
22387     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22389       # a path prefixed by /cygdrive for fixpath to work.
22390       new_path="$CYGWIN_ROOT_PATH$input_path"
22391     fi
22392   fi
22393 
22394 
22395   if test "x$path" != "x$new_path"; then
22396     BOOT_JDK="$new_path"
22397     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22398 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22399   fi
22400 
22401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22402 
22403   path="$BOOT_JDK"
22404   has_colon=`$ECHO $path | $GREP ^.:`
22405   new_path="$path"
22406   if test "x$has_colon" = x; then
22407     # Not in mixed or Windows style, start by that.
22408     new_path=`cmd //c echo $path`
22409   fi
22410 
22411 
22412   input_path="$new_path"
22413   # Check if we need to convert this using DOS-style short mode. If the path
22414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22415   # take no chances and rewrite it.
22416   # Note: m4 eats our [], so we need to use [ and ] instead.
22417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22418   if test "x$has_forbidden_chars" != x; then
22419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22420     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22421   fi
22422 
22423 
22424   windows_path="$new_path"
22425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22426     unix_path=`$CYGPATH -u "$windows_path"`
22427     new_path="$unix_path"
22428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22430     new_path="$unix_path"
22431   fi
22432 
22433   if test "x$path" != "x$new_path"; then
22434     BOOT_JDK="$new_path"
22435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22436 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22437   fi
22438 
22439   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22440   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22441 
22442   else
22443     # We're on a unix platform. Hooray! :)
22444     path="$BOOT_JDK"
22445     has_space=`$ECHO "$path" | $GREP " "`
22446     if test "x$has_space" != x; then
22447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22448 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22449       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22450     fi
22451 
22452     # Use eval to expand a potential ~
22453     eval path="$path"
22454     if test ! -f "$path" && test ! -d "$path"; then
22455       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22456     fi
22457 
22458     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22459   fi
22460 
22461             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22462 $as_echo_n "checking for Boot JDK... " >&6; }
22463             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22464 $as_echo "$BOOT_JDK" >&6; }
22465             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22466 $as_echo_n "checking Boot JDK version... " >&6; }
22467             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22468             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22469 $as_echo "$BOOT_JDK_VERSION" >&6; }
22470           fi # end check jdk version
22471         fi # end check javac
22472       fi # end check java
22473     fi # end check boot jdk found
22474   fi
22475 
22476     done
22477   fi
22478 
22479   fi
22480 
22481 
22482     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22483     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22484       # Do we have a bin/java?
22485       if test ! -x "$BOOT_JDK/bin/java"; then
22486         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22487 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22488         BOOT_JDK_FOUND=no
22489       else
22490         # Do we have a bin/javac?
22491         if test ! -x "$BOOT_JDK/bin/javac"; then
22492           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22493 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22494           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22495 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22496           BOOT_JDK_FOUND=no
22497         else
22498           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22499           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22500 
22501           # Extra M4 quote needed to protect [] in grep expression.
22502           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22503           if test "x$FOUND_CORRECT_VERSION" = x; then
22504             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22505 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22506             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22507 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22508             BOOT_JDK_FOUND=no
22509           else
22510             # We're done! :-)
22511             BOOT_JDK_FOUND=yes
22512 
22513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22514 
22515   # Input might be given as Windows format, start by converting to
22516   # unix format.
22517   path="$BOOT_JDK"
22518   new_path=`$CYGPATH -u "$path"`
22519 
22520   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22521   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22522   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22523   # "foo.exe" is OK but "foo" is an error.
22524   #
22525   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22526   # It is also a way to make sure we got the proper file name for the real test later on.
22527   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22528   if test "x$test_shortpath" = x; then
22529     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22530 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22531     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22532   fi
22533 
22534   # Call helper function which possibly converts this using DOS-style short mode.
22535   # If so, the updated path is stored in $new_path.
22536 
22537   input_path="$new_path"
22538   # Check if we need to convert this using DOS-style short mode. If the path
22539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22540   # take no chances and rewrite it.
22541   # Note: m4 eats our [], so we need to use [ and ] instead.
22542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22543   if test "x$has_forbidden_chars" != x; then
22544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22545     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22546     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22547     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22548       # Going to short mode and back again did indeed matter. Since short mode is
22549       # case insensitive, let's make it lowercase to improve readability.
22550       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22551       # Now convert it back to Unix-stile (cygpath)
22552       input_path=`$CYGPATH -u "$shortmode_path"`
22553       new_path="$input_path"
22554     fi
22555   fi
22556 
22557   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22558   if test "x$test_cygdrive_prefix" = x; then
22559     # As a simple fix, exclude /usr/bin since it's not a real path.
22560     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22561       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22562       # a path prefixed by /cygdrive for fixpath to work.
22563       new_path="$CYGWIN_ROOT_PATH$input_path"
22564     fi
22565   fi
22566 
22567 
22568   if test "x$path" != "x$new_path"; then
22569     BOOT_JDK="$new_path"
22570     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22571 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22572   fi
22573 
22574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22575 
22576   path="$BOOT_JDK"
22577   has_colon=`$ECHO $path | $GREP ^.:`
22578   new_path="$path"
22579   if test "x$has_colon" = x; then
22580     # Not in mixed or Windows style, start by that.
22581     new_path=`cmd //c echo $path`
22582   fi
22583 
22584 
22585   input_path="$new_path"
22586   # Check if we need to convert this using DOS-style short mode. If the path
22587   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22588   # take no chances and rewrite it.
22589   # Note: m4 eats our [], so we need to use [ and ] instead.
22590   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22591   if test "x$has_forbidden_chars" != x; then
22592     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22593     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22594   fi
22595 
22596 
22597   windows_path="$new_path"
22598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22599     unix_path=`$CYGPATH -u "$windows_path"`
22600     new_path="$unix_path"
22601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22603     new_path="$unix_path"
22604   fi
22605 
22606   if test "x$path" != "x$new_path"; then
22607     BOOT_JDK="$new_path"
22608     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22609 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22610   fi
22611 
22612   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22613   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22614 
22615   else
22616     # We're on a unix platform. Hooray! :)
22617     path="$BOOT_JDK"
22618     has_space=`$ECHO "$path" | $GREP " "`
22619     if test "x$has_space" != x; then
22620       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22621 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22622       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22623     fi
22624 
22625     # Use eval to expand a potential ~
22626     eval path="$path"
22627     if test ! -f "$path" && test ! -d "$path"; then
22628       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22629     fi
22630 
22631     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22632   fi
22633 
22634             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22635 $as_echo_n "checking for Boot JDK... " >&6; }
22636             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22637 $as_echo "$BOOT_JDK" >&6; }
22638             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22639 $as_echo_n "checking Boot JDK version... " >&6; }
22640             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22641             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22642 $as_echo "$BOOT_JDK_VERSION" >&6; }
22643           fi # end check jdk version
22644         fi # end check javac
22645       fi # end check java
22646     fi # end check boot jdk found
22647   fi
22648 
22649 
22650   if test "x$BOOT_JDK_FOUND" = xno; then
22651     # Now execute the test
22652 
22653   if test "x$PROGRAMW6432" != x; then
22654     VIRTUAL_DIR="$PROGRAMW6432/Java"
22655 
22656   windows_path="$VIRTUAL_DIR"
22657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22658     unix_path=`$CYGPATH -u "$windows_path"`
22659     VIRTUAL_DIR="$unix_path"
22660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22662     VIRTUAL_DIR="$unix_path"
22663   fi
22664 
22665 
22666   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22667   BOOT_JDK_SUFFIX=""
22668   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22669   if test "x$ALL_JDKS_FOUND" != x; then
22670     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22671 
22672   if test "x$BOOT_JDK_FOUND" = xno; then
22673     # Now execute the test
22674 
22675         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22676         if test -d "$BOOT_JDK"; then
22677           BOOT_JDK_FOUND=maybe
22678           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22679 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22680         fi
22681 
22682 
22683     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22684     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22685       # Do we have a bin/java?
22686       if test ! -x "$BOOT_JDK/bin/java"; then
22687         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22689         BOOT_JDK_FOUND=no
22690       else
22691         # Do we have a bin/javac?
22692         if test ! -x "$BOOT_JDK/bin/javac"; then
22693           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22695           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22696 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22697           BOOT_JDK_FOUND=no
22698         else
22699           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22700           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22701 
22702           # Extra M4 quote needed to protect [] in grep expression.
22703           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22704           if test "x$FOUND_CORRECT_VERSION" = x; then
22705             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22707             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22708 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22709             BOOT_JDK_FOUND=no
22710           else
22711             # We're done! :-)
22712             BOOT_JDK_FOUND=yes
22713 
22714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22715 
22716   # Input might be given as Windows format, start by converting to
22717   # unix format.
22718   path="$BOOT_JDK"
22719   new_path=`$CYGPATH -u "$path"`
22720 
22721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22724   # "foo.exe" is OK but "foo" is an error.
22725   #
22726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22727   # It is also a way to make sure we got the proper file name for the real test later on.
22728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22729   if test "x$test_shortpath" = x; then
22730     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22731 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22732     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22733   fi
22734 
22735   # Call helper function which possibly converts this using DOS-style short mode.
22736   # If so, the updated path is stored in $new_path.
22737 
22738   input_path="$new_path"
22739   # Check if we need to convert this using DOS-style short mode. If the path
22740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22741   # take no chances and rewrite it.
22742   # Note: m4 eats our [], so we need to use [ and ] instead.
22743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22744   if test "x$has_forbidden_chars" != x; then
22745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22749       # Going to short mode and back again did indeed matter. Since short mode is
22750       # case insensitive, let's make it lowercase to improve readability.
22751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22752       # Now convert it back to Unix-stile (cygpath)
22753       input_path=`$CYGPATH -u "$shortmode_path"`
22754       new_path="$input_path"
22755     fi
22756   fi
22757 
22758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22759   if test "x$test_cygdrive_prefix" = x; then
22760     # As a simple fix, exclude /usr/bin since it's not a real path.
22761     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22763       # a path prefixed by /cygdrive for fixpath to work.
22764       new_path="$CYGWIN_ROOT_PATH$input_path"
22765     fi
22766   fi
22767 
22768 
22769   if test "x$path" != "x$new_path"; then
22770     BOOT_JDK="$new_path"
22771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22772 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22773   fi
22774 
22775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22776 
22777   path="$BOOT_JDK"
22778   has_colon=`$ECHO $path | $GREP ^.:`
22779   new_path="$path"
22780   if test "x$has_colon" = x; then
22781     # Not in mixed or Windows style, start by that.
22782     new_path=`cmd //c echo $path`
22783   fi
22784 
22785 
22786   input_path="$new_path"
22787   # Check if we need to convert this using DOS-style short mode. If the path
22788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22789   # take no chances and rewrite it.
22790   # Note: m4 eats our [], so we need to use [ and ] instead.
22791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22792   if test "x$has_forbidden_chars" != x; then
22793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22795   fi
22796 
22797 
22798   windows_path="$new_path"
22799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22800     unix_path=`$CYGPATH -u "$windows_path"`
22801     new_path="$unix_path"
22802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22804     new_path="$unix_path"
22805   fi
22806 
22807   if test "x$path" != "x$new_path"; then
22808     BOOT_JDK="$new_path"
22809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22810 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22811   fi
22812 
22813   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22814   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22815 
22816   else
22817     # We're on a unix platform. Hooray! :)
22818     path="$BOOT_JDK"
22819     has_space=`$ECHO "$path" | $GREP " "`
22820     if test "x$has_space" != x; then
22821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22822 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22823       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22824     fi
22825 
22826     # Use eval to expand a potential ~
22827     eval path="$path"
22828     if test ! -f "$path" && test ! -d "$path"; then
22829       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22830     fi
22831 
22832     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22833   fi
22834 
22835             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22836 $as_echo_n "checking for Boot JDK... " >&6; }
22837             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22838 $as_echo "$BOOT_JDK" >&6; }
22839             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22840 $as_echo_n "checking Boot JDK version... " >&6; }
22841             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22842             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22843 $as_echo "$BOOT_JDK_VERSION" >&6; }
22844           fi # end check jdk version
22845         fi # end check javac
22846       fi # end check java
22847     fi # end check boot jdk found
22848   fi
22849 
22850     done
22851   fi
22852 
22853   fi
22854 
22855 
22856     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22857     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22858       # Do we have a bin/java?
22859       if test ! -x "$BOOT_JDK/bin/java"; then
22860         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22861 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22862         BOOT_JDK_FOUND=no
22863       else
22864         # Do we have a bin/javac?
22865         if test ! -x "$BOOT_JDK/bin/javac"; then
22866           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22868           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22869 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22870           BOOT_JDK_FOUND=no
22871         else
22872           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22873           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22874 
22875           # Extra M4 quote needed to protect [] in grep expression.
22876           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22877           if test "x$FOUND_CORRECT_VERSION" = x; then
22878             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22879 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22880             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22881 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22882             BOOT_JDK_FOUND=no
22883           else
22884             # We're done! :-)
22885             BOOT_JDK_FOUND=yes
22886 
22887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22888 
22889   # Input might be given as Windows format, start by converting to
22890   # unix format.
22891   path="$BOOT_JDK"
22892   new_path=`$CYGPATH -u "$path"`
22893 
22894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22897   # "foo.exe" is OK but "foo" is an error.
22898   #
22899   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22900   # It is also a way to make sure we got the proper file name for the real test later on.
22901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22902   if test "x$test_shortpath" = x; then
22903     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22904 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22905     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22906   fi
22907 
22908   # Call helper function which possibly converts this using DOS-style short mode.
22909   # If so, the updated path is stored in $new_path.
22910 
22911   input_path="$new_path"
22912   # Check if we need to convert this using DOS-style short mode. If the path
22913   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22914   # take no chances and rewrite it.
22915   # Note: m4 eats our [], so we need to use [ and ] instead.
22916   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22917   if test "x$has_forbidden_chars" != x; then
22918     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22919     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22920     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22921     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22922       # Going to short mode and back again did indeed matter. Since short mode is
22923       # case insensitive, let's make it lowercase to improve readability.
22924       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22925       # Now convert it back to Unix-stile (cygpath)
22926       input_path=`$CYGPATH -u "$shortmode_path"`
22927       new_path="$input_path"
22928     fi
22929   fi
22930 
22931   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22932   if test "x$test_cygdrive_prefix" = x; then
22933     # As a simple fix, exclude /usr/bin since it's not a real path.
22934     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22935       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22936       # a path prefixed by /cygdrive for fixpath to work.
22937       new_path="$CYGWIN_ROOT_PATH$input_path"
22938     fi
22939   fi
22940 
22941 
22942   if test "x$path" != "x$new_path"; then
22943     BOOT_JDK="$new_path"
22944     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22945 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22946   fi
22947 
22948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22949 
22950   path="$BOOT_JDK"
22951   has_colon=`$ECHO $path | $GREP ^.:`
22952   new_path="$path"
22953   if test "x$has_colon" = x; then
22954     # Not in mixed or Windows style, start by that.
22955     new_path=`cmd //c echo $path`
22956   fi
22957 
22958 
22959   input_path="$new_path"
22960   # Check if we need to convert this using DOS-style short mode. If the path
22961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22962   # take no chances and rewrite it.
22963   # Note: m4 eats our [], so we need to use [ and ] instead.
22964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22965   if test "x$has_forbidden_chars" != x; then
22966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22967     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22968   fi
22969 
22970 
22971   windows_path="$new_path"
22972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22973     unix_path=`$CYGPATH -u "$windows_path"`
22974     new_path="$unix_path"
22975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22977     new_path="$unix_path"
22978   fi
22979 
22980   if test "x$path" != "x$new_path"; then
22981     BOOT_JDK="$new_path"
22982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22983 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22984   fi
22985 
22986   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22987   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22988 
22989   else
22990     # We're on a unix platform. Hooray! :)
22991     path="$BOOT_JDK"
22992     has_space=`$ECHO "$path" | $GREP " "`
22993     if test "x$has_space" != x; then
22994       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22995 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22996       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22997     fi
22998 
22999     # Use eval to expand a potential ~
23000     eval path="$path"
23001     if test ! -f "$path" && test ! -d "$path"; then
23002       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23003     fi
23004 
23005     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23006   fi
23007 
23008             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23009 $as_echo_n "checking for Boot JDK... " >&6; }
23010             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23011 $as_echo "$BOOT_JDK" >&6; }
23012             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23013 $as_echo_n "checking Boot JDK version... " >&6; }
23014             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23015             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23016 $as_echo "$BOOT_JDK_VERSION" >&6; }
23017           fi # end check jdk version
23018         fi # end check javac
23019       fi # end check java
23020     fi # end check boot jdk found
23021   fi
23022 
23023 
23024   if test "x$BOOT_JDK_FOUND" = xno; then
23025     # Now execute the test
23026 
23027   if test "x$PROGRAMFILES" != x; then
23028     VIRTUAL_DIR="$PROGRAMFILES/Java"
23029 
23030   windows_path="$VIRTUAL_DIR"
23031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23032     unix_path=`$CYGPATH -u "$windows_path"`
23033     VIRTUAL_DIR="$unix_path"
23034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23036     VIRTUAL_DIR="$unix_path"
23037   fi
23038 
23039 
23040   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23041   BOOT_JDK_SUFFIX=""
23042   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23043   if test "x$ALL_JDKS_FOUND" != x; then
23044     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23045 
23046   if test "x$BOOT_JDK_FOUND" = xno; then
23047     # Now execute the test
23048 
23049         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23050         if test -d "$BOOT_JDK"; then
23051           BOOT_JDK_FOUND=maybe
23052           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23053 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23054         fi
23055 
23056 
23057     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23058     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23059       # Do we have a bin/java?
23060       if test ! -x "$BOOT_JDK/bin/java"; then
23061         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23063         BOOT_JDK_FOUND=no
23064       else
23065         # Do we have a bin/javac?
23066         if test ! -x "$BOOT_JDK/bin/javac"; then
23067           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23068 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23069           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23070 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23071           BOOT_JDK_FOUND=no
23072         else
23073           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23074           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23075 
23076           # Extra M4 quote needed to protect [] in grep expression.
23077           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23078           if test "x$FOUND_CORRECT_VERSION" = x; then
23079             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23081             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23082 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23083             BOOT_JDK_FOUND=no
23084           else
23085             # We're done! :-)
23086             BOOT_JDK_FOUND=yes
23087 
23088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23089 
23090   # Input might be given as Windows format, start by converting to
23091   # unix format.
23092   path="$BOOT_JDK"
23093   new_path=`$CYGPATH -u "$path"`
23094 
23095   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23096   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23097   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23098   # "foo.exe" is OK but "foo" is an error.
23099   #
23100   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23101   # It is also a way to make sure we got the proper file name for the real test later on.
23102   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23103   if test "x$test_shortpath" = x; then
23104     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23105 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23106     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23107   fi
23108 
23109   # Call helper function which possibly converts this using DOS-style short mode.
23110   # If so, the updated path is stored in $new_path.
23111 
23112   input_path="$new_path"
23113   # Check if we need to convert this using DOS-style short mode. If the path
23114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23115   # take no chances and rewrite it.
23116   # Note: m4 eats our [], so we need to use [ and ] instead.
23117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23118   if test "x$has_forbidden_chars" != x; then
23119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23123       # Going to short mode and back again did indeed matter. Since short mode is
23124       # case insensitive, let's make it lowercase to improve readability.
23125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23126       # Now convert it back to Unix-stile (cygpath)
23127       input_path=`$CYGPATH -u "$shortmode_path"`
23128       new_path="$input_path"
23129     fi
23130   fi
23131 
23132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23133   if test "x$test_cygdrive_prefix" = x; then
23134     # As a simple fix, exclude /usr/bin since it's not a real path.
23135     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23137       # a path prefixed by /cygdrive for fixpath to work.
23138       new_path="$CYGWIN_ROOT_PATH$input_path"
23139     fi
23140   fi
23141 
23142 
23143   if test "x$path" != "x$new_path"; then
23144     BOOT_JDK="$new_path"
23145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23146 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23147   fi
23148 
23149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23150 
23151   path="$BOOT_JDK"
23152   has_colon=`$ECHO $path | $GREP ^.:`
23153   new_path="$path"
23154   if test "x$has_colon" = x; then
23155     # Not in mixed or Windows style, start by that.
23156     new_path=`cmd //c echo $path`
23157   fi
23158 
23159 
23160   input_path="$new_path"
23161   # Check if we need to convert this using DOS-style short mode. If the path
23162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23163   # take no chances and rewrite it.
23164   # Note: m4 eats our [], so we need to use [ and ] instead.
23165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23166   if test "x$has_forbidden_chars" != x; then
23167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23169   fi
23170 
23171 
23172   windows_path="$new_path"
23173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23174     unix_path=`$CYGPATH -u "$windows_path"`
23175     new_path="$unix_path"
23176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23178     new_path="$unix_path"
23179   fi
23180 
23181   if test "x$path" != "x$new_path"; then
23182     BOOT_JDK="$new_path"
23183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23184 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23185   fi
23186 
23187   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23188   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23189 
23190   else
23191     # We're on a unix platform. Hooray! :)
23192     path="$BOOT_JDK"
23193     has_space=`$ECHO "$path" | $GREP " "`
23194     if test "x$has_space" != x; then
23195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23196 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23197       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23198     fi
23199 
23200     # Use eval to expand a potential ~
23201     eval path="$path"
23202     if test ! -f "$path" && test ! -d "$path"; then
23203       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23204     fi
23205 
23206     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23207   fi
23208 
23209             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23210 $as_echo_n "checking for Boot JDK... " >&6; }
23211             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23212 $as_echo "$BOOT_JDK" >&6; }
23213             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23214 $as_echo_n "checking Boot JDK version... " >&6; }
23215             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23216             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23217 $as_echo "$BOOT_JDK_VERSION" >&6; }
23218           fi # end check jdk version
23219         fi # end check javac
23220       fi # end check java
23221     fi # end check boot jdk found
23222   fi
23223 
23224     done
23225   fi
23226 
23227   fi
23228 
23229 
23230     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23231     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23232       # Do we have a bin/java?
23233       if test ! -x "$BOOT_JDK/bin/java"; then
23234         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23235 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23236         BOOT_JDK_FOUND=no
23237       else
23238         # Do we have a bin/javac?
23239         if test ! -x "$BOOT_JDK/bin/javac"; then
23240           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23241 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23242           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23243 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23244           BOOT_JDK_FOUND=no
23245         else
23246           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23247           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23248 
23249           # Extra M4 quote needed to protect [] in grep expression.
23250           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23251           if test "x$FOUND_CORRECT_VERSION" = x; then
23252             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23253 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23254             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23255 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23256             BOOT_JDK_FOUND=no
23257           else
23258             # We're done! :-)
23259             BOOT_JDK_FOUND=yes
23260 
23261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23262 
23263   # Input might be given as Windows format, start by converting to
23264   # unix format.
23265   path="$BOOT_JDK"
23266   new_path=`$CYGPATH -u "$path"`
23267 
23268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23271   # "foo.exe" is OK but "foo" is an error.
23272   #
23273   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23274   # It is also a way to make sure we got the proper file name for the real test later on.
23275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23276   if test "x$test_shortpath" = x; then
23277     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23278 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23279     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23280   fi
23281 
23282   # Call helper function which possibly converts this using DOS-style short mode.
23283   # If so, the updated path is stored in $new_path.
23284 
23285   input_path="$new_path"
23286   # Check if we need to convert this using DOS-style short mode. If the path
23287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23288   # take no chances and rewrite it.
23289   # Note: m4 eats our [], so we need to use [ and ] instead.
23290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23291   if test "x$has_forbidden_chars" != x; then
23292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23296       # Going to short mode and back again did indeed matter. Since short mode is
23297       # case insensitive, let's make it lowercase to improve readability.
23298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23299       # Now convert it back to Unix-stile (cygpath)
23300       input_path=`$CYGPATH -u "$shortmode_path"`
23301       new_path="$input_path"
23302     fi
23303   fi
23304 
23305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23306   if test "x$test_cygdrive_prefix" = x; then
23307     # As a simple fix, exclude /usr/bin since it's not a real path.
23308     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23310       # a path prefixed by /cygdrive for fixpath to work.
23311       new_path="$CYGWIN_ROOT_PATH$input_path"
23312     fi
23313   fi
23314 
23315 
23316   if test "x$path" != "x$new_path"; then
23317     BOOT_JDK="$new_path"
23318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23319 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23320   fi
23321 
23322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23323 
23324   path="$BOOT_JDK"
23325   has_colon=`$ECHO $path | $GREP ^.:`
23326   new_path="$path"
23327   if test "x$has_colon" = x; then
23328     # Not in mixed or Windows style, start by that.
23329     new_path=`cmd //c echo $path`
23330   fi
23331 
23332 
23333   input_path="$new_path"
23334   # Check if we need to convert this using DOS-style short mode. If the path
23335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23336   # take no chances and rewrite it.
23337   # Note: m4 eats our [], so we need to use [ and ] instead.
23338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23339   if test "x$has_forbidden_chars" != x; then
23340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23342   fi
23343 
23344 
23345   windows_path="$new_path"
23346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23347     unix_path=`$CYGPATH -u "$windows_path"`
23348     new_path="$unix_path"
23349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23351     new_path="$unix_path"
23352   fi
23353 
23354   if test "x$path" != "x$new_path"; then
23355     BOOT_JDK="$new_path"
23356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23357 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23358   fi
23359 
23360   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23361   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23362 
23363   else
23364     # We're on a unix platform. Hooray! :)
23365     path="$BOOT_JDK"
23366     has_space=`$ECHO "$path" | $GREP " "`
23367     if test "x$has_space" != x; then
23368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23369 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23370       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23371     fi
23372 
23373     # Use eval to expand a potential ~
23374     eval path="$path"
23375     if test ! -f "$path" && test ! -d "$path"; then
23376       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23377     fi
23378 
23379     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23380   fi
23381 
23382             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23383 $as_echo_n "checking for Boot JDK... " >&6; }
23384             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23385 $as_echo "$BOOT_JDK" >&6; }
23386             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23387 $as_echo_n "checking Boot JDK version... " >&6; }
23388             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23389             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23390 $as_echo "$BOOT_JDK_VERSION" >&6; }
23391           fi # end check jdk version
23392         fi # end check javac
23393       fi # end check java
23394     fi # end check boot jdk found
23395   fi
23396 
23397 
23398   if test "x$BOOT_JDK_FOUND" = xno; then
23399     # Now execute the test
23400 
23401   if test "x$ProgramFiles" != x; then
23402     VIRTUAL_DIR="$ProgramFiles/Java"
23403 
23404   windows_path="$VIRTUAL_DIR"
23405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23406     unix_path=`$CYGPATH -u "$windows_path"`
23407     VIRTUAL_DIR="$unix_path"
23408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23410     VIRTUAL_DIR="$unix_path"
23411   fi
23412 
23413 
23414   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23415   BOOT_JDK_SUFFIX=""
23416   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23417   if test "x$ALL_JDKS_FOUND" != x; then
23418     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23419 
23420   if test "x$BOOT_JDK_FOUND" = xno; then
23421     # Now execute the test
23422 
23423         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23424         if test -d "$BOOT_JDK"; then
23425           BOOT_JDK_FOUND=maybe
23426           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23427 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23428         fi
23429 
23430 
23431     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23432     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23433       # Do we have a bin/java?
23434       if test ! -x "$BOOT_JDK/bin/java"; then
23435         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23436 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23437         BOOT_JDK_FOUND=no
23438       else
23439         # Do we have a bin/javac?
23440         if test ! -x "$BOOT_JDK/bin/javac"; then
23441           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23442 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23443           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23444 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23445           BOOT_JDK_FOUND=no
23446         else
23447           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23448           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23449 
23450           # Extra M4 quote needed to protect [] in grep expression.
23451           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23452           if test "x$FOUND_CORRECT_VERSION" = x; then
23453             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23455             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23456 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23457             BOOT_JDK_FOUND=no
23458           else
23459             # We're done! :-)
23460             BOOT_JDK_FOUND=yes
23461 
23462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23463 
23464   # Input might be given as Windows format, start by converting to
23465   # unix format.
23466   path="$BOOT_JDK"
23467   new_path=`$CYGPATH -u "$path"`
23468 
23469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23472   # "foo.exe" is OK but "foo" is an error.
23473   #
23474   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23475   # It is also a way to make sure we got the proper file name for the real test later on.
23476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23477   if test "x$test_shortpath" = x; then
23478     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23479 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23480     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23481   fi
23482 
23483   # Call helper function which possibly converts this using DOS-style short mode.
23484   # If so, the updated path is stored in $new_path.
23485 
23486   input_path="$new_path"
23487   # Check if we need to convert this using DOS-style short mode. If the path
23488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23489   # take no chances and rewrite it.
23490   # Note: m4 eats our [], so we need to use [ and ] instead.
23491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23492   if test "x$has_forbidden_chars" != x; then
23493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23497       # Going to short mode and back again did indeed matter. Since short mode is
23498       # case insensitive, let's make it lowercase to improve readability.
23499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23500       # Now convert it back to Unix-stile (cygpath)
23501       input_path=`$CYGPATH -u "$shortmode_path"`
23502       new_path="$input_path"
23503     fi
23504   fi
23505 
23506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23507   if test "x$test_cygdrive_prefix" = x; then
23508     # As a simple fix, exclude /usr/bin since it's not a real path.
23509     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23511       # a path prefixed by /cygdrive for fixpath to work.
23512       new_path="$CYGWIN_ROOT_PATH$input_path"
23513     fi
23514   fi
23515 
23516 
23517   if test "x$path" != "x$new_path"; then
23518     BOOT_JDK="$new_path"
23519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23520 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23521   fi
23522 
23523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23524 
23525   path="$BOOT_JDK"
23526   has_colon=`$ECHO $path | $GREP ^.:`
23527   new_path="$path"
23528   if test "x$has_colon" = x; then
23529     # Not in mixed or Windows style, start by that.
23530     new_path=`cmd //c echo $path`
23531   fi
23532 
23533 
23534   input_path="$new_path"
23535   # Check if we need to convert this using DOS-style short mode. If the path
23536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23537   # take no chances and rewrite it.
23538   # Note: m4 eats our [], so we need to use [ and ] instead.
23539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23540   if test "x$has_forbidden_chars" != x; then
23541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23543   fi
23544 
23545 
23546   windows_path="$new_path"
23547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23548     unix_path=`$CYGPATH -u "$windows_path"`
23549     new_path="$unix_path"
23550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23552     new_path="$unix_path"
23553   fi
23554 
23555   if test "x$path" != "x$new_path"; then
23556     BOOT_JDK="$new_path"
23557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23558 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23559   fi
23560 
23561   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23562   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23563 
23564   else
23565     # We're on a unix platform. Hooray! :)
23566     path="$BOOT_JDK"
23567     has_space=`$ECHO "$path" | $GREP " "`
23568     if test "x$has_space" != x; then
23569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23570 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23571       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23572     fi
23573 
23574     # Use eval to expand a potential ~
23575     eval path="$path"
23576     if test ! -f "$path" && test ! -d "$path"; then
23577       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23578     fi
23579 
23580     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23581   fi
23582 
23583             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23584 $as_echo_n "checking for Boot JDK... " >&6; }
23585             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23586 $as_echo "$BOOT_JDK" >&6; }
23587             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23588 $as_echo_n "checking Boot JDK version... " >&6; }
23589             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23590             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23591 $as_echo "$BOOT_JDK_VERSION" >&6; }
23592           fi # end check jdk version
23593         fi # end check javac
23594       fi # end check java
23595     fi # end check boot jdk found
23596   fi
23597 
23598     done
23599   fi
23600 
23601   fi
23602 
23603 
23604     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23605     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23606       # Do we have a bin/java?
23607       if test ! -x "$BOOT_JDK/bin/java"; then
23608         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23609 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23610         BOOT_JDK_FOUND=no
23611       else
23612         # Do we have a bin/javac?
23613         if test ! -x "$BOOT_JDK/bin/javac"; then
23614           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23615 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23616           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23617 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23618           BOOT_JDK_FOUND=no
23619         else
23620           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23621           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23622 
23623           # Extra M4 quote needed to protect [] in grep expression.
23624           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23625           if test "x$FOUND_CORRECT_VERSION" = x; then
23626             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23627 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23628             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23629 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23630             BOOT_JDK_FOUND=no
23631           else
23632             # We're done! :-)
23633             BOOT_JDK_FOUND=yes
23634 
23635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23636 
23637   # Input might be given as Windows format, start by converting to
23638   # unix format.
23639   path="$BOOT_JDK"
23640   new_path=`$CYGPATH -u "$path"`
23641 
23642   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23643   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23644   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23645   # "foo.exe" is OK but "foo" is an error.
23646   #
23647   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23648   # It is also a way to make sure we got the proper file name for the real test later on.
23649   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23650   if test "x$test_shortpath" = x; then
23651     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23652 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23653     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23654   fi
23655 
23656   # Call helper function which possibly converts this using DOS-style short mode.
23657   # If so, the updated path is stored in $new_path.
23658 
23659   input_path="$new_path"
23660   # Check if we need to convert this using DOS-style short mode. If the path
23661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23662   # take no chances and rewrite it.
23663   # Note: m4 eats our [], so we need to use [ and ] instead.
23664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23665   if test "x$has_forbidden_chars" != x; then
23666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23667     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23668     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23669     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23670       # Going to short mode and back again did indeed matter. Since short mode is
23671       # case insensitive, let's make it lowercase to improve readability.
23672       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23673       # Now convert it back to Unix-stile (cygpath)
23674       input_path=`$CYGPATH -u "$shortmode_path"`
23675       new_path="$input_path"
23676     fi
23677   fi
23678 
23679   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23680   if test "x$test_cygdrive_prefix" = x; then
23681     # As a simple fix, exclude /usr/bin since it's not a real path.
23682     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23683       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23684       # a path prefixed by /cygdrive for fixpath to work.
23685       new_path="$CYGWIN_ROOT_PATH$input_path"
23686     fi
23687   fi
23688 
23689 
23690   if test "x$path" != "x$new_path"; then
23691     BOOT_JDK="$new_path"
23692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23693 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23694   fi
23695 
23696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23697 
23698   path="$BOOT_JDK"
23699   has_colon=`$ECHO $path | $GREP ^.:`
23700   new_path="$path"
23701   if test "x$has_colon" = x; then
23702     # Not in mixed or Windows style, start by that.
23703     new_path=`cmd //c echo $path`
23704   fi
23705 
23706 
23707   input_path="$new_path"
23708   # Check if we need to convert this using DOS-style short mode. If the path
23709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23710   # take no chances and rewrite it.
23711   # Note: m4 eats our [], so we need to use [ and ] instead.
23712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23713   if test "x$has_forbidden_chars" != x; then
23714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23715     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23716   fi
23717 
23718 
23719   windows_path="$new_path"
23720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23721     unix_path=`$CYGPATH -u "$windows_path"`
23722     new_path="$unix_path"
23723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23725     new_path="$unix_path"
23726   fi
23727 
23728   if test "x$path" != "x$new_path"; then
23729     BOOT_JDK="$new_path"
23730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23731 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23732   fi
23733 
23734   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23735   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23736 
23737   else
23738     # We're on a unix platform. Hooray! :)
23739     path="$BOOT_JDK"
23740     has_space=`$ECHO "$path" | $GREP " "`
23741     if test "x$has_space" != x; then
23742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23743 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23744       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23745     fi
23746 
23747     # Use eval to expand a potential ~
23748     eval path="$path"
23749     if test ! -f "$path" && test ! -d "$path"; then
23750       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23751     fi
23752 
23753     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23754   fi
23755 
23756             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23757 $as_echo_n "checking for Boot JDK... " >&6; }
23758             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23759 $as_echo "$BOOT_JDK" >&6; }
23760             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23761 $as_echo_n "checking Boot JDK version... " >&6; }
23762             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23763             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23764 $as_echo "$BOOT_JDK_VERSION" >&6; }
23765           fi # end check jdk version
23766         fi # end check javac
23767       fi # end check java
23768     fi # end check boot jdk found
23769   fi
23770 
23771 
23772   if test "x$BOOT_JDK_FOUND" = xno; then
23773     # Now execute the test
23774 
23775   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23776   BOOT_JDK_SUFFIX=""
23777   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23778   if test "x$ALL_JDKS_FOUND" != x; then
23779     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23780 
23781   if test "x$BOOT_JDK_FOUND" = xno; then
23782     # Now execute the test
23783 
23784         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23785         if test -d "$BOOT_JDK"; then
23786           BOOT_JDK_FOUND=maybe
23787           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23788 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23789         fi
23790 
23791 
23792     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23793     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23794       # Do we have a bin/java?
23795       if test ! -x "$BOOT_JDK/bin/java"; then
23796         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23797 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23798         BOOT_JDK_FOUND=no
23799       else
23800         # Do we have a bin/javac?
23801         if test ! -x "$BOOT_JDK/bin/javac"; then
23802           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23804           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23805 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23806           BOOT_JDK_FOUND=no
23807         else
23808           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23809           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23810 
23811           # Extra M4 quote needed to protect [] in grep expression.
23812           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23813           if test "x$FOUND_CORRECT_VERSION" = x; then
23814             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23816             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23817 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23818             BOOT_JDK_FOUND=no
23819           else
23820             # We're done! :-)
23821             BOOT_JDK_FOUND=yes
23822 
23823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23824 
23825   # Input might be given as Windows format, start by converting to
23826   # unix format.
23827   path="$BOOT_JDK"
23828   new_path=`$CYGPATH -u "$path"`
23829 
23830   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23831   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23832   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23833   # "foo.exe" is OK but "foo" is an error.
23834   #
23835   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23836   # It is also a way to make sure we got the proper file name for the real test later on.
23837   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23838   if test "x$test_shortpath" = x; then
23839     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23840 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23841     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23842   fi
23843 
23844   # Call helper function which possibly converts this using DOS-style short mode.
23845   # If so, the updated path is stored in $new_path.
23846 
23847   input_path="$new_path"
23848   # Check if we need to convert this using DOS-style short mode. If the path
23849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23850   # take no chances and rewrite it.
23851   # Note: m4 eats our [], so we need to use [ and ] instead.
23852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23853   if test "x$has_forbidden_chars" != x; then
23854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23858       # Going to short mode and back again did indeed matter. Since short mode is
23859       # case insensitive, let's make it lowercase to improve readability.
23860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23861       # Now convert it back to Unix-stile (cygpath)
23862       input_path=`$CYGPATH -u "$shortmode_path"`
23863       new_path="$input_path"
23864     fi
23865   fi
23866 
23867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23868   if test "x$test_cygdrive_prefix" = x; then
23869     # As a simple fix, exclude /usr/bin since it's not a real path.
23870     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23872       # a path prefixed by /cygdrive for fixpath to work.
23873       new_path="$CYGWIN_ROOT_PATH$input_path"
23874     fi
23875   fi
23876 
23877 
23878   if test "x$path" != "x$new_path"; then
23879     BOOT_JDK="$new_path"
23880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23881 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23882   fi
23883 
23884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23885 
23886   path="$BOOT_JDK"
23887   has_colon=`$ECHO $path | $GREP ^.:`
23888   new_path="$path"
23889   if test "x$has_colon" = x; then
23890     # Not in mixed or Windows style, start by that.
23891     new_path=`cmd //c echo $path`
23892   fi
23893 
23894 
23895   input_path="$new_path"
23896   # Check if we need to convert this using DOS-style short mode. If the path
23897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23898   # take no chances and rewrite it.
23899   # Note: m4 eats our [], so we need to use [ and ] instead.
23900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23901   if test "x$has_forbidden_chars" != x; then
23902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23903     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23904   fi
23905 
23906 
23907   windows_path="$new_path"
23908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23909     unix_path=`$CYGPATH -u "$windows_path"`
23910     new_path="$unix_path"
23911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23913     new_path="$unix_path"
23914   fi
23915 
23916   if test "x$path" != "x$new_path"; then
23917     BOOT_JDK="$new_path"
23918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23919 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23920   fi
23921 
23922   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23923   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23924 
23925   else
23926     # We're on a unix platform. Hooray! :)
23927     path="$BOOT_JDK"
23928     has_space=`$ECHO "$path" | $GREP " "`
23929     if test "x$has_space" != x; then
23930       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23931 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23932       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23933     fi
23934 
23935     # Use eval to expand a potential ~
23936     eval path="$path"
23937     if test ! -f "$path" && test ! -d "$path"; then
23938       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23939     fi
23940 
23941     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23942   fi
23943 
23944             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23945 $as_echo_n "checking for Boot JDK... " >&6; }
23946             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23947 $as_echo "$BOOT_JDK" >&6; }
23948             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23949 $as_echo_n "checking Boot JDK version... " >&6; }
23950             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23951             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23952 $as_echo "$BOOT_JDK_VERSION" >&6; }
23953           fi # end check jdk version
23954         fi # end check javac
23955       fi # end check java
23956     fi # end check boot jdk found
23957   fi
23958 
23959     done
23960   fi
23961 
23962 
23963     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23964     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23965       # Do we have a bin/java?
23966       if test ! -x "$BOOT_JDK/bin/java"; then
23967         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23968 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23969         BOOT_JDK_FOUND=no
23970       else
23971         # Do we have a bin/javac?
23972         if test ! -x "$BOOT_JDK/bin/javac"; then
23973           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23974 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23975           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23976 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23977           BOOT_JDK_FOUND=no
23978         else
23979           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23980           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23981 
23982           # Extra M4 quote needed to protect [] in grep expression.
23983           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23984           if test "x$FOUND_CORRECT_VERSION" = x; then
23985             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23986 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23987             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23988 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23989             BOOT_JDK_FOUND=no
23990           else
23991             # We're done! :-)
23992             BOOT_JDK_FOUND=yes
23993 
23994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23995 
23996   # Input might be given as Windows format, start by converting to
23997   # unix format.
23998   path="$BOOT_JDK"
23999   new_path=`$CYGPATH -u "$path"`
24000 
24001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24004   # "foo.exe" is OK but "foo" is an error.
24005   #
24006   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24007   # It is also a way to make sure we got the proper file name for the real test later on.
24008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24009   if test "x$test_shortpath" = x; then
24010     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24011 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24012     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24013   fi
24014 
24015   # Call helper function which possibly converts this using DOS-style short mode.
24016   # If so, the updated path is stored in $new_path.
24017 
24018   input_path="$new_path"
24019   # Check if we need to convert this using DOS-style short mode. If the path
24020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24021   # take no chances and rewrite it.
24022   # Note: m4 eats our [], so we need to use [ and ] instead.
24023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24024   if test "x$has_forbidden_chars" != x; then
24025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24026     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24027     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24028     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24029       # Going to short mode and back again did indeed matter. Since short mode is
24030       # case insensitive, let's make it lowercase to improve readability.
24031       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24032       # Now convert it back to Unix-stile (cygpath)
24033       input_path=`$CYGPATH -u "$shortmode_path"`
24034       new_path="$input_path"
24035     fi
24036   fi
24037 
24038   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24039   if test "x$test_cygdrive_prefix" = x; then
24040     # As a simple fix, exclude /usr/bin since it's not a real path.
24041     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24042       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24043       # a path prefixed by /cygdrive for fixpath to work.
24044       new_path="$CYGWIN_ROOT_PATH$input_path"
24045     fi
24046   fi
24047 
24048 
24049   if test "x$path" != "x$new_path"; then
24050     BOOT_JDK="$new_path"
24051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24052 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24053   fi
24054 
24055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24056 
24057   path="$BOOT_JDK"
24058   has_colon=`$ECHO $path | $GREP ^.:`
24059   new_path="$path"
24060   if test "x$has_colon" = x; then
24061     # Not in mixed or Windows style, start by that.
24062     new_path=`cmd //c echo $path`
24063   fi
24064 
24065 
24066   input_path="$new_path"
24067   # Check if we need to convert this using DOS-style short mode. If the path
24068   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24069   # take no chances and rewrite it.
24070   # Note: m4 eats our [], so we need to use [ and ] instead.
24071   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24072   if test "x$has_forbidden_chars" != x; then
24073     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24074     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24075   fi
24076 
24077 
24078   windows_path="$new_path"
24079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24080     unix_path=`$CYGPATH -u "$windows_path"`
24081     new_path="$unix_path"
24082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24084     new_path="$unix_path"
24085   fi
24086 
24087   if test "x$path" != "x$new_path"; then
24088     BOOT_JDK="$new_path"
24089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24090 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24091   fi
24092 
24093   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24094   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24095 
24096   else
24097     # We're on a unix platform. Hooray! :)
24098     path="$BOOT_JDK"
24099     has_space=`$ECHO "$path" | $GREP " "`
24100     if test "x$has_space" != x; then
24101       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24102 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24103       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24104     fi
24105 
24106     # Use eval to expand a potential ~
24107     eval path="$path"
24108     if test ! -f "$path" && test ! -d "$path"; then
24109       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24110     fi
24111 
24112     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24113   fi
24114 
24115             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24116 $as_echo_n "checking for Boot JDK... " >&6; }
24117             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24118 $as_echo "$BOOT_JDK" >&6; }
24119             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24120 $as_echo_n "checking Boot JDK version... " >&6; }
24121             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24122             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24123 $as_echo "$BOOT_JDK_VERSION" >&6; }
24124           fi # end check jdk version
24125         fi # end check javac
24126       fi # end check java
24127     fi # end check boot jdk found
24128   fi
24129 
24130   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24131 
24132   if test "x$BOOT_JDK_FOUND" = xno; then
24133     # Now execute the test
24134 
24135   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24136   BOOT_JDK_SUFFIX="/Contents/Home"
24137   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24138   if test "x$ALL_JDKS_FOUND" != x; then
24139     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24140 
24141   if test "x$BOOT_JDK_FOUND" = xno; then
24142     # Now execute the test
24143 
24144         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24145         if test -d "$BOOT_JDK"; then
24146           BOOT_JDK_FOUND=maybe
24147           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24148 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24149         fi
24150 
24151 
24152     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24153     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24154       # Do we have a bin/java?
24155       if test ! -x "$BOOT_JDK/bin/java"; then
24156         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24157 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24158         BOOT_JDK_FOUND=no
24159       else
24160         # Do we have a bin/javac?
24161         if test ! -x "$BOOT_JDK/bin/javac"; then
24162           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24163 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24164           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24165 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24166           BOOT_JDK_FOUND=no
24167         else
24168           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24169           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24170 
24171           # Extra M4 quote needed to protect [] in grep expression.
24172           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24173           if test "x$FOUND_CORRECT_VERSION" = x; then
24174             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24175 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24176             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24177 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24178             BOOT_JDK_FOUND=no
24179           else
24180             # We're done! :-)
24181             BOOT_JDK_FOUND=yes
24182 
24183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24184 
24185   # Input might be given as Windows format, start by converting to
24186   # unix format.
24187   path="$BOOT_JDK"
24188   new_path=`$CYGPATH -u "$path"`
24189 
24190   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24191   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24192   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24193   # "foo.exe" is OK but "foo" is an error.
24194   #
24195   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24196   # It is also a way to make sure we got the proper file name for the real test later on.
24197   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24198   if test "x$test_shortpath" = x; then
24199     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24200 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24201     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24202   fi
24203 
24204   # Call helper function which possibly converts this using DOS-style short mode.
24205   # If so, the updated path is stored in $new_path.
24206 
24207   input_path="$new_path"
24208   # Check if we need to convert this using DOS-style short mode. If the path
24209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24210   # take no chances and rewrite it.
24211   # Note: m4 eats our [], so we need to use [ and ] instead.
24212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24213   if test "x$has_forbidden_chars" != x; then
24214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24215     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24216     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24217     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24218       # Going to short mode and back again did indeed matter. Since short mode is
24219       # case insensitive, let's make it lowercase to improve readability.
24220       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24221       # Now convert it back to Unix-stile (cygpath)
24222       input_path=`$CYGPATH -u "$shortmode_path"`
24223       new_path="$input_path"
24224     fi
24225   fi
24226 
24227   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24228   if test "x$test_cygdrive_prefix" = x; then
24229     # As a simple fix, exclude /usr/bin since it's not a real path.
24230     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24231       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24232       # a path prefixed by /cygdrive for fixpath to work.
24233       new_path="$CYGWIN_ROOT_PATH$input_path"
24234     fi
24235   fi
24236 
24237 
24238   if test "x$path" != "x$new_path"; then
24239     BOOT_JDK="$new_path"
24240     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24241 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24242   fi
24243 
24244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24245 
24246   path="$BOOT_JDK"
24247   has_colon=`$ECHO $path | $GREP ^.:`
24248   new_path="$path"
24249   if test "x$has_colon" = x; then
24250     # Not in mixed or Windows style, start by that.
24251     new_path=`cmd //c echo $path`
24252   fi
24253 
24254 
24255   input_path="$new_path"
24256   # Check if we need to convert this using DOS-style short mode. If the path
24257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24258   # take no chances and rewrite it.
24259   # Note: m4 eats our [], so we need to use [ and ] instead.
24260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24261   if test "x$has_forbidden_chars" != x; then
24262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24264   fi
24265 
24266 
24267   windows_path="$new_path"
24268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24269     unix_path=`$CYGPATH -u "$windows_path"`
24270     new_path="$unix_path"
24271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24273     new_path="$unix_path"
24274   fi
24275 
24276   if test "x$path" != "x$new_path"; then
24277     BOOT_JDK="$new_path"
24278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24279 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24280   fi
24281 
24282   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24283   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24284 
24285   else
24286     # We're on a unix platform. Hooray! :)
24287     path="$BOOT_JDK"
24288     has_space=`$ECHO "$path" | $GREP " "`
24289     if test "x$has_space" != x; then
24290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24291 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24292       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24293     fi
24294 
24295     # Use eval to expand a potential ~
24296     eval path="$path"
24297     if test ! -f "$path" && test ! -d "$path"; then
24298       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24299     fi
24300 
24301     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24302   fi
24303 
24304             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24305 $as_echo_n "checking for Boot JDK... " >&6; }
24306             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24307 $as_echo "$BOOT_JDK" >&6; }
24308             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24309 $as_echo_n "checking Boot JDK version... " >&6; }
24310             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24311             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24312 $as_echo "$BOOT_JDK_VERSION" >&6; }
24313           fi # end check jdk version
24314         fi # end check javac
24315       fi # end check java
24316     fi # end check boot jdk found
24317   fi
24318 
24319     done
24320   fi
24321 
24322 
24323     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24324     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24325       # Do we have a bin/java?
24326       if test ! -x "$BOOT_JDK/bin/java"; then
24327         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24329         BOOT_JDK_FOUND=no
24330       else
24331         # Do we have a bin/javac?
24332         if test ! -x "$BOOT_JDK/bin/javac"; then
24333           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24334 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24335           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24336 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24337           BOOT_JDK_FOUND=no
24338         else
24339           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24340           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24341 
24342           # Extra M4 quote needed to protect [] in grep expression.
24343           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24344           if test "x$FOUND_CORRECT_VERSION" = x; then
24345             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24346 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24347             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24348 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24349             BOOT_JDK_FOUND=no
24350           else
24351             # We're done! :-)
24352             BOOT_JDK_FOUND=yes
24353 
24354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24355 
24356   # Input might be given as Windows format, start by converting to
24357   # unix format.
24358   path="$BOOT_JDK"
24359   new_path=`$CYGPATH -u "$path"`
24360 
24361   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24362   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24363   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24364   # "foo.exe" is OK but "foo" is an error.
24365   #
24366   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24367   # It is also a way to make sure we got the proper file name for the real test later on.
24368   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24369   if test "x$test_shortpath" = x; then
24370     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24371 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24372     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24373   fi
24374 
24375   # Call helper function which possibly converts this using DOS-style short mode.
24376   # If so, the updated path is stored in $new_path.
24377 
24378   input_path="$new_path"
24379   # Check if we need to convert this using DOS-style short mode. If the path
24380   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24381   # take no chances and rewrite it.
24382   # Note: m4 eats our [], so we need to use [ and ] instead.
24383   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24384   if test "x$has_forbidden_chars" != x; then
24385     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24386     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24387     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24388     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24389       # Going to short mode and back again did indeed matter. Since short mode is
24390       # case insensitive, let's make it lowercase to improve readability.
24391       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24392       # Now convert it back to Unix-stile (cygpath)
24393       input_path=`$CYGPATH -u "$shortmode_path"`
24394       new_path="$input_path"
24395     fi
24396   fi
24397 
24398   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24399   if test "x$test_cygdrive_prefix" = x; then
24400     # As a simple fix, exclude /usr/bin since it's not a real path.
24401     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24402       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24403       # a path prefixed by /cygdrive for fixpath to work.
24404       new_path="$CYGWIN_ROOT_PATH$input_path"
24405     fi
24406   fi
24407 
24408 
24409   if test "x$path" != "x$new_path"; then
24410     BOOT_JDK="$new_path"
24411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24412 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24413   fi
24414 
24415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24416 
24417   path="$BOOT_JDK"
24418   has_colon=`$ECHO $path | $GREP ^.:`
24419   new_path="$path"
24420   if test "x$has_colon" = x; then
24421     # Not in mixed or Windows style, start by that.
24422     new_path=`cmd //c echo $path`
24423   fi
24424 
24425 
24426   input_path="$new_path"
24427   # Check if we need to convert this using DOS-style short mode. If the path
24428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24429   # take no chances and rewrite it.
24430   # Note: m4 eats our [], so we need to use [ and ] instead.
24431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24432   if test "x$has_forbidden_chars" != x; then
24433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24434     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24435   fi
24436 
24437 
24438   windows_path="$new_path"
24439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24440     unix_path=`$CYGPATH -u "$windows_path"`
24441     new_path="$unix_path"
24442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24444     new_path="$unix_path"
24445   fi
24446 
24447   if test "x$path" != "x$new_path"; then
24448     BOOT_JDK="$new_path"
24449     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24450 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24451   fi
24452 
24453   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24454   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24455 
24456   else
24457     # We're on a unix platform. Hooray! :)
24458     path="$BOOT_JDK"
24459     has_space=`$ECHO "$path" | $GREP " "`
24460     if test "x$has_space" != x; then
24461       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24462 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24463       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24464     fi
24465 
24466     # Use eval to expand a potential ~
24467     eval path="$path"
24468     if test ! -f "$path" && test ! -d "$path"; then
24469       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24470     fi
24471 
24472     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24473   fi
24474 
24475             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24476 $as_echo_n "checking for Boot JDK... " >&6; }
24477             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24478 $as_echo "$BOOT_JDK" >&6; }
24479             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24480 $as_echo_n "checking Boot JDK version... " >&6; }
24481             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24482             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24483 $as_echo "$BOOT_JDK_VERSION" >&6; }
24484           fi # end check jdk version
24485         fi # end check javac
24486       fi # end check java
24487     fi # end check boot jdk found
24488   fi
24489 
24490 
24491   if test "x$BOOT_JDK_FOUND" = xno; then
24492     # Now execute the test
24493 
24494   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24495   BOOT_JDK_SUFFIX="/Contents/Home"
24496   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24497   if test "x$ALL_JDKS_FOUND" != x; then
24498     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24499 
24500   if test "x$BOOT_JDK_FOUND" = xno; then
24501     # Now execute the test
24502 
24503         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24504         if test -d "$BOOT_JDK"; then
24505           BOOT_JDK_FOUND=maybe
24506           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24507 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24508         fi
24509 
24510 
24511     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24512     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24513       # Do we have a bin/java?
24514       if test ! -x "$BOOT_JDK/bin/java"; then
24515         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24516 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24517         BOOT_JDK_FOUND=no
24518       else
24519         # Do we have a bin/javac?
24520         if test ! -x "$BOOT_JDK/bin/javac"; then
24521           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24522 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24523           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24524 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24525           BOOT_JDK_FOUND=no
24526         else
24527           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24528           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24529 
24530           # Extra M4 quote needed to protect [] in grep expression.
24531           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24532           if test "x$FOUND_CORRECT_VERSION" = x; then
24533             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24534 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24535             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24536 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24537             BOOT_JDK_FOUND=no
24538           else
24539             # We're done! :-)
24540             BOOT_JDK_FOUND=yes
24541 
24542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24543 
24544   # Input might be given as Windows format, start by converting to
24545   # unix format.
24546   path="$BOOT_JDK"
24547   new_path=`$CYGPATH -u "$path"`
24548 
24549   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24550   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24551   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24552   # "foo.exe" is OK but "foo" is an error.
24553   #
24554   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24555   # It is also a way to make sure we got the proper file name for the real test later on.
24556   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24557   if test "x$test_shortpath" = x; then
24558     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24559 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24560     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24561   fi
24562 
24563   # Call helper function which possibly converts this using DOS-style short mode.
24564   # If so, the updated path is stored in $new_path.
24565 
24566   input_path="$new_path"
24567   # Check if we need to convert this using DOS-style short mode. If the path
24568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24569   # take no chances and rewrite it.
24570   # Note: m4 eats our [], so we need to use [ and ] instead.
24571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24572   if test "x$has_forbidden_chars" != x; then
24573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24577       # Going to short mode and back again did indeed matter. Since short mode is
24578       # case insensitive, let's make it lowercase to improve readability.
24579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24580       # Now convert it back to Unix-stile (cygpath)
24581       input_path=`$CYGPATH -u "$shortmode_path"`
24582       new_path="$input_path"
24583     fi
24584   fi
24585 
24586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24587   if test "x$test_cygdrive_prefix" = x; then
24588     # As a simple fix, exclude /usr/bin since it's not a real path.
24589     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24591       # a path prefixed by /cygdrive for fixpath to work.
24592       new_path="$CYGWIN_ROOT_PATH$input_path"
24593     fi
24594   fi
24595 
24596 
24597   if test "x$path" != "x$new_path"; then
24598     BOOT_JDK="$new_path"
24599     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24600 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24601   fi
24602 
24603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24604 
24605   path="$BOOT_JDK"
24606   has_colon=`$ECHO $path | $GREP ^.:`
24607   new_path="$path"
24608   if test "x$has_colon" = x; then
24609     # Not in mixed or Windows style, start by that.
24610     new_path=`cmd //c echo $path`
24611   fi
24612 
24613 
24614   input_path="$new_path"
24615   # Check if we need to convert this using DOS-style short mode. If the path
24616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24617   # take no chances and rewrite it.
24618   # Note: m4 eats our [], so we need to use [ and ] instead.
24619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24620   if test "x$has_forbidden_chars" != x; then
24621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24622     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24623   fi
24624 
24625 
24626   windows_path="$new_path"
24627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24628     unix_path=`$CYGPATH -u "$windows_path"`
24629     new_path="$unix_path"
24630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24632     new_path="$unix_path"
24633   fi
24634 
24635   if test "x$path" != "x$new_path"; then
24636     BOOT_JDK="$new_path"
24637     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24638 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24639   fi
24640 
24641   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24642   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24643 
24644   else
24645     # We're on a unix platform. Hooray! :)
24646     path="$BOOT_JDK"
24647     has_space=`$ECHO "$path" | $GREP " "`
24648     if test "x$has_space" != x; then
24649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24650 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24651       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24652     fi
24653 
24654     # Use eval to expand a potential ~
24655     eval path="$path"
24656     if test ! -f "$path" && test ! -d "$path"; then
24657       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24658     fi
24659 
24660     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24661   fi
24662 
24663             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24664 $as_echo_n "checking for Boot JDK... " >&6; }
24665             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24666 $as_echo "$BOOT_JDK" >&6; }
24667             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24668 $as_echo_n "checking Boot JDK version... " >&6; }
24669             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24670             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24671 $as_echo "$BOOT_JDK_VERSION" >&6; }
24672           fi # end check jdk version
24673         fi # end check javac
24674       fi # end check java
24675     fi # end check boot jdk found
24676   fi
24677 
24678     done
24679   fi
24680 
24681 
24682     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24683     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24684       # Do we have a bin/java?
24685       if test ! -x "$BOOT_JDK/bin/java"; then
24686         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24688         BOOT_JDK_FOUND=no
24689       else
24690         # Do we have a bin/javac?
24691         if test ! -x "$BOOT_JDK/bin/javac"; then
24692           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24693 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24694           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24695 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24696           BOOT_JDK_FOUND=no
24697         else
24698           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24699           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24700 
24701           # Extra M4 quote needed to protect [] in grep expression.
24702           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24703           if test "x$FOUND_CORRECT_VERSION" = x; then
24704             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24705 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24706             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24707 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24708             BOOT_JDK_FOUND=no
24709           else
24710             # We're done! :-)
24711             BOOT_JDK_FOUND=yes
24712 
24713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24714 
24715   # Input might be given as Windows format, start by converting to
24716   # unix format.
24717   path="$BOOT_JDK"
24718   new_path=`$CYGPATH -u "$path"`
24719 
24720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24723   # "foo.exe" is OK but "foo" is an error.
24724   #
24725   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24726   # It is also a way to make sure we got the proper file name for the real test later on.
24727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24728   if test "x$test_shortpath" = x; then
24729     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24730 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24731     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24732   fi
24733 
24734   # Call helper function which possibly converts this using DOS-style short mode.
24735   # If so, the updated path is stored in $new_path.
24736 
24737   input_path="$new_path"
24738   # Check if we need to convert this using DOS-style short mode. If the path
24739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24740   # take no chances and rewrite it.
24741   # Note: m4 eats our [], so we need to use [ and ] instead.
24742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24743   if test "x$has_forbidden_chars" != x; then
24744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24745     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24746     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24747     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24748       # Going to short mode and back again did indeed matter. Since short mode is
24749       # case insensitive, let's make it lowercase to improve readability.
24750       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24751       # Now convert it back to Unix-stile (cygpath)
24752       input_path=`$CYGPATH -u "$shortmode_path"`
24753       new_path="$input_path"
24754     fi
24755   fi
24756 
24757   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24758   if test "x$test_cygdrive_prefix" = x; then
24759     # As a simple fix, exclude /usr/bin since it's not a real path.
24760     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24761       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24762       # a path prefixed by /cygdrive for fixpath to work.
24763       new_path="$CYGWIN_ROOT_PATH$input_path"
24764     fi
24765   fi
24766 
24767 
24768   if test "x$path" != "x$new_path"; then
24769     BOOT_JDK="$new_path"
24770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24771 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24772   fi
24773 
24774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24775 
24776   path="$BOOT_JDK"
24777   has_colon=`$ECHO $path | $GREP ^.:`
24778   new_path="$path"
24779   if test "x$has_colon" = x; then
24780     # Not in mixed or Windows style, start by that.
24781     new_path=`cmd //c echo $path`
24782   fi
24783 
24784 
24785   input_path="$new_path"
24786   # Check if we need to convert this using DOS-style short mode. If the path
24787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24788   # take no chances and rewrite it.
24789   # Note: m4 eats our [], so we need to use [ and ] instead.
24790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24791   if test "x$has_forbidden_chars" != x; then
24792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24794   fi
24795 
24796 
24797   windows_path="$new_path"
24798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24799     unix_path=`$CYGPATH -u "$windows_path"`
24800     new_path="$unix_path"
24801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24803     new_path="$unix_path"
24804   fi
24805 
24806   if test "x$path" != "x$new_path"; then
24807     BOOT_JDK="$new_path"
24808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24809 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24810   fi
24811 
24812   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24813   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24814 
24815   else
24816     # We're on a unix platform. Hooray! :)
24817     path="$BOOT_JDK"
24818     has_space=`$ECHO "$path" | $GREP " "`
24819     if test "x$has_space" != x; then
24820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24821 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24822       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24823     fi
24824 
24825     # Use eval to expand a potential ~
24826     eval path="$path"
24827     if test ! -f "$path" && test ! -d "$path"; then
24828       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24829     fi
24830 
24831     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24832   fi
24833 
24834             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24835 $as_echo_n "checking for Boot JDK... " >&6; }
24836             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24837 $as_echo "$BOOT_JDK" >&6; }
24838             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24839 $as_echo_n "checking Boot JDK version... " >&6; }
24840             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24842 $as_echo "$BOOT_JDK_VERSION" >&6; }
24843           fi # end check jdk version
24844         fi # end check javac
24845       fi # end check java
24846     fi # end check boot jdk found
24847   fi
24848 
24849   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24850 
24851   if test "x$BOOT_JDK_FOUND" = xno; then
24852     # Now execute the test
24853 
24854   BOOT_JDK_PREFIX="/usr/lib/jvm"
24855   BOOT_JDK_SUFFIX=""
24856   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24857   if test "x$ALL_JDKS_FOUND" != x; then
24858     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24859 
24860   if test "x$BOOT_JDK_FOUND" = xno; then
24861     # Now execute the test
24862 
24863         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24864         if test -d "$BOOT_JDK"; then
24865           BOOT_JDK_FOUND=maybe
24866           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24867 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24868         fi
24869 
24870 
24871     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24872     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24873       # Do we have a bin/java?
24874       if test ! -x "$BOOT_JDK/bin/java"; then
24875         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24876 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24877         BOOT_JDK_FOUND=no
24878       else
24879         # Do we have a bin/javac?
24880         if test ! -x "$BOOT_JDK/bin/javac"; then
24881           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24882 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24883           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24884 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24885           BOOT_JDK_FOUND=no
24886         else
24887           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24888           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24889 
24890           # Extra M4 quote needed to protect [] in grep expression.
24891           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24892           if test "x$FOUND_CORRECT_VERSION" = x; then
24893             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24894 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24895             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24896 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24897             BOOT_JDK_FOUND=no
24898           else
24899             # We're done! :-)
24900             BOOT_JDK_FOUND=yes
24901 
24902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24903 
24904   # Input might be given as Windows format, start by converting to
24905   # unix format.
24906   path="$BOOT_JDK"
24907   new_path=`$CYGPATH -u "$path"`
24908 
24909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24912   # "foo.exe" is OK but "foo" is an error.
24913   #
24914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24915   # It is also a way to make sure we got the proper file name for the real test later on.
24916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24917   if test "x$test_shortpath" = x; then
24918     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24919 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24920     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24921   fi
24922 
24923   # Call helper function which possibly converts this using DOS-style short mode.
24924   # If so, the updated path is stored in $new_path.
24925 
24926   input_path="$new_path"
24927   # Check if we need to convert this using DOS-style short mode. If the path
24928   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24929   # take no chances and rewrite it.
24930   # Note: m4 eats our [], so we need to use [ and ] instead.
24931   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24932   if test "x$has_forbidden_chars" != x; then
24933     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24934     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24935     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24936     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24937       # Going to short mode and back again did indeed matter. Since short mode is
24938       # case insensitive, let's make it lowercase to improve readability.
24939       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24940       # Now convert it back to Unix-stile (cygpath)
24941       input_path=`$CYGPATH -u "$shortmode_path"`
24942       new_path="$input_path"
24943     fi
24944   fi
24945 
24946   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24947   if test "x$test_cygdrive_prefix" = x; then
24948     # As a simple fix, exclude /usr/bin since it's not a real path.
24949     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24950       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24951       # a path prefixed by /cygdrive for fixpath to work.
24952       new_path="$CYGWIN_ROOT_PATH$input_path"
24953     fi
24954   fi
24955 
24956 
24957   if test "x$path" != "x$new_path"; then
24958     BOOT_JDK="$new_path"
24959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24960 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24961   fi
24962 
24963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24964 
24965   path="$BOOT_JDK"
24966   has_colon=`$ECHO $path | $GREP ^.:`
24967   new_path="$path"
24968   if test "x$has_colon" = x; then
24969     # Not in mixed or Windows style, start by that.
24970     new_path=`cmd //c echo $path`
24971   fi
24972 
24973 
24974   input_path="$new_path"
24975   # Check if we need to convert this using DOS-style short mode. If the path
24976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24977   # take no chances and rewrite it.
24978   # Note: m4 eats our [], so we need to use [ and ] instead.
24979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24980   if test "x$has_forbidden_chars" != x; then
24981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24983   fi
24984 
24985 
24986   windows_path="$new_path"
24987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24988     unix_path=`$CYGPATH -u "$windows_path"`
24989     new_path="$unix_path"
24990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24992     new_path="$unix_path"
24993   fi
24994 
24995   if test "x$path" != "x$new_path"; then
24996     BOOT_JDK="$new_path"
24997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24998 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24999   fi
25000 
25001   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25002   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25003 
25004   else
25005     # We're on a unix platform. Hooray! :)
25006     path="$BOOT_JDK"
25007     has_space=`$ECHO "$path" | $GREP " "`
25008     if test "x$has_space" != x; then
25009       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25010 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25011       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25012     fi
25013 
25014     # Use eval to expand a potential ~
25015     eval path="$path"
25016     if test ! -f "$path" && test ! -d "$path"; then
25017       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25018     fi
25019 
25020     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25021   fi
25022 
25023             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25024 $as_echo_n "checking for Boot JDK... " >&6; }
25025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25026 $as_echo "$BOOT_JDK" >&6; }
25027             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25028 $as_echo_n "checking Boot JDK version... " >&6; }
25029             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25030             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25031 $as_echo "$BOOT_JDK_VERSION" >&6; }
25032           fi # end check jdk version
25033         fi # end check javac
25034       fi # end check java
25035     fi # end check boot jdk found
25036   fi
25037 
25038     done
25039   fi
25040 
25041 
25042     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25043     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25044       # Do we have a bin/java?
25045       if test ! -x "$BOOT_JDK/bin/java"; then
25046         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25047 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25048         BOOT_JDK_FOUND=no
25049       else
25050         # Do we have a bin/javac?
25051         if test ! -x "$BOOT_JDK/bin/javac"; then
25052           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25053 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25054           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25055 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25056           BOOT_JDK_FOUND=no
25057         else
25058           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25059           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25060 
25061           # Extra M4 quote needed to protect [] in grep expression.
25062           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25063           if test "x$FOUND_CORRECT_VERSION" = x; then
25064             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25065 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25066             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25067 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25068             BOOT_JDK_FOUND=no
25069           else
25070             # We're done! :-)
25071             BOOT_JDK_FOUND=yes
25072 
25073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25074 
25075   # Input might be given as Windows format, start by converting to
25076   # unix format.
25077   path="$BOOT_JDK"
25078   new_path=`$CYGPATH -u "$path"`
25079 
25080   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25081   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25082   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25083   # "foo.exe" is OK but "foo" is an error.
25084   #
25085   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25086   # It is also a way to make sure we got the proper file name for the real test later on.
25087   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25088   if test "x$test_shortpath" = x; then
25089     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25090 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25091     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25092   fi
25093 
25094   # Call helper function which possibly converts this using DOS-style short mode.
25095   # If so, the updated path is stored in $new_path.
25096 
25097   input_path="$new_path"
25098   # Check if we need to convert this using DOS-style short mode. If the path
25099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25100   # take no chances and rewrite it.
25101   # Note: m4 eats our [], so we need to use [ and ] instead.
25102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25103   if test "x$has_forbidden_chars" != x; then
25104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25105     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25106     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25107     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25108       # Going to short mode and back again did indeed matter. Since short mode is
25109       # case insensitive, let's make it lowercase to improve readability.
25110       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25111       # Now convert it back to Unix-stile (cygpath)
25112       input_path=`$CYGPATH -u "$shortmode_path"`
25113       new_path="$input_path"
25114     fi
25115   fi
25116 
25117   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25118   if test "x$test_cygdrive_prefix" = x; then
25119     # As a simple fix, exclude /usr/bin since it's not a real path.
25120     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25121       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25122       # a path prefixed by /cygdrive for fixpath to work.
25123       new_path="$CYGWIN_ROOT_PATH$input_path"
25124     fi
25125   fi
25126 
25127 
25128   if test "x$path" != "x$new_path"; then
25129     BOOT_JDK="$new_path"
25130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25131 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25132   fi
25133 
25134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25135 
25136   path="$BOOT_JDK"
25137   has_colon=`$ECHO $path | $GREP ^.:`
25138   new_path="$path"
25139   if test "x$has_colon" = x; then
25140     # Not in mixed or Windows style, start by that.
25141     new_path=`cmd //c echo $path`
25142   fi
25143 
25144 
25145   input_path="$new_path"
25146   # Check if we need to convert this using DOS-style short mode. If the path
25147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25148   # take no chances and rewrite it.
25149   # Note: m4 eats our [], so we need to use [ and ] instead.
25150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25151   if test "x$has_forbidden_chars" != x; then
25152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25154   fi
25155 
25156 
25157   windows_path="$new_path"
25158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25159     unix_path=`$CYGPATH -u "$windows_path"`
25160     new_path="$unix_path"
25161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25163     new_path="$unix_path"
25164   fi
25165 
25166   if test "x$path" != "x$new_path"; then
25167     BOOT_JDK="$new_path"
25168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25169 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25170   fi
25171 
25172   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25173   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25174 
25175   else
25176     # We're on a unix platform. Hooray! :)
25177     path="$BOOT_JDK"
25178     has_space=`$ECHO "$path" | $GREP " "`
25179     if test "x$has_space" != x; then
25180       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25181 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25182       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25183     fi
25184 
25185     # Use eval to expand a potential ~
25186     eval path="$path"
25187     if test ! -f "$path" && test ! -d "$path"; then
25188       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25189     fi
25190 
25191     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25192   fi
25193 
25194             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25195 $as_echo_n "checking for Boot JDK... " >&6; }
25196             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25197 $as_echo "$BOOT_JDK" >&6; }
25198             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25199 $as_echo_n "checking Boot JDK version... " >&6; }
25200             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25201             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25202 $as_echo "$BOOT_JDK_VERSION" >&6; }
25203           fi # end check jdk version
25204         fi # end check javac
25205       fi # end check java
25206     fi # end check boot jdk found
25207   fi
25208 
25209   fi
25210 
25211 
25212     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25213     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25214       # Do we have a bin/java?
25215       if test ! -x "$BOOT_JDK/bin/java"; then
25216         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25217 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25218         BOOT_JDK_FOUND=no
25219       else
25220         # Do we have a bin/javac?
25221         if test ! -x "$BOOT_JDK/bin/javac"; then
25222           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25223 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25224           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25225 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25226           BOOT_JDK_FOUND=no
25227         else
25228           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25229           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25230 
25231           # Extra M4 quote needed to protect [] in grep expression.
25232           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25233           if test "x$FOUND_CORRECT_VERSION" = x; then
25234             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25235 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25236             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25237 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25238             BOOT_JDK_FOUND=no
25239           else
25240             # We're done! :-)
25241             BOOT_JDK_FOUND=yes
25242 
25243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25244 
25245   # Input might be given as Windows format, start by converting to
25246   # unix format.
25247   path="$BOOT_JDK"
25248   new_path=`$CYGPATH -u "$path"`
25249 
25250   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25251   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25252   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25253   # "foo.exe" is OK but "foo" is an error.
25254   #
25255   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25256   # It is also a way to make sure we got the proper file name for the real test later on.
25257   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25258   if test "x$test_shortpath" = x; then
25259     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25260 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25261     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25262   fi
25263 
25264   # Call helper function which possibly converts this using DOS-style short mode.
25265   # If so, the updated path is stored in $new_path.
25266 
25267   input_path="$new_path"
25268   # Check if we need to convert this using DOS-style short mode. If the path
25269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25270   # take no chances and rewrite it.
25271   # Note: m4 eats our [], so we need to use [ and ] instead.
25272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25273   if test "x$has_forbidden_chars" != x; then
25274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25275     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25276     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25277     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25278       # Going to short mode and back again did indeed matter. Since short mode is
25279       # case insensitive, let's make it lowercase to improve readability.
25280       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25281       # Now convert it back to Unix-stile (cygpath)
25282       input_path=`$CYGPATH -u "$shortmode_path"`
25283       new_path="$input_path"
25284     fi
25285   fi
25286 
25287   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25288   if test "x$test_cygdrive_prefix" = x; then
25289     # As a simple fix, exclude /usr/bin since it's not a real path.
25290     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25291       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25292       # a path prefixed by /cygdrive for fixpath to work.
25293       new_path="$CYGWIN_ROOT_PATH$input_path"
25294     fi
25295   fi
25296 
25297 
25298   if test "x$path" != "x$new_path"; then
25299     BOOT_JDK="$new_path"
25300     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25301 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25302   fi
25303 
25304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25305 
25306   path="$BOOT_JDK"
25307   has_colon=`$ECHO $path | $GREP ^.:`
25308   new_path="$path"
25309   if test "x$has_colon" = x; then
25310     # Not in mixed or Windows style, start by that.
25311     new_path=`cmd //c echo $path`
25312   fi
25313 
25314 
25315   input_path="$new_path"
25316   # Check if we need to convert this using DOS-style short mode. If the path
25317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25318   # take no chances and rewrite it.
25319   # Note: m4 eats our [], so we need to use [ and ] instead.
25320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25321   if test "x$has_forbidden_chars" != x; then
25322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25323     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25324   fi
25325 
25326 
25327   windows_path="$new_path"
25328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25329     unix_path=`$CYGPATH -u "$windows_path"`
25330     new_path="$unix_path"
25331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25332     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25333     new_path="$unix_path"
25334   fi
25335 
25336   if test "x$path" != "x$new_path"; then
25337     BOOT_JDK="$new_path"
25338     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25339 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25340   fi
25341 
25342   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25343   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25344 
25345   else
25346     # We're on a unix platform. Hooray! :)
25347     path="$BOOT_JDK"
25348     has_space=`$ECHO "$path" | $GREP " "`
25349     if test "x$has_space" != x; then
25350       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25351 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25352       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25353     fi
25354 
25355     # Use eval to expand a potential ~
25356     eval path="$path"
25357     if test ! -f "$path" && test ! -d "$path"; then
25358       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25359     fi
25360 
25361     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25362   fi
25363 
25364             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25365 $as_echo_n "checking for Boot JDK... " >&6; }
25366             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25367 $as_echo "$BOOT_JDK" >&6; }
25368             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25369 $as_echo_n "checking Boot JDK version... " >&6; }
25370             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25371             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25372 $as_echo "$BOOT_JDK_VERSION" >&6; }
25373           fi # end check jdk version
25374         fi # end check javac
25375       fi # end check java
25376     fi # end check boot jdk found
25377   fi
25378 
25379 
25380   # If we haven't found anything yet, we've truly lost. Give up.
25381   if test "x$BOOT_JDK_FOUND" = xno; then
25382 
25383   # Print a helpful message on how to acquire the necessary build dependency.
25384   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25385   MISSING_DEPENDENCY=openjdk
25386 
25387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25388     cygwin_help $MISSING_DEPENDENCY
25389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25390     msys_help $MISSING_DEPENDENCY
25391   else
25392     PKGHANDLER_COMMAND=
25393 
25394     case $PKGHANDLER in
25395       apt-get)
25396         apt_help     $MISSING_DEPENDENCY ;;
25397       yum)
25398         yum_help     $MISSING_DEPENDENCY ;;
25399       port)
25400         port_help    $MISSING_DEPENDENCY ;;
25401       pkgutil)
25402         pkgutil_help $MISSING_DEPENDENCY ;;
25403       pkgadd)
25404         pkgadd_help  $MISSING_DEPENDENCY ;;
25405     esac
25406 
25407     if test "x$PKGHANDLER_COMMAND" != x; then
25408       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25409     fi
25410   fi
25411 
25412     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25413 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25414     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25415 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25416     as_fn_error $? "Cannot continue" "$LINENO" 5
25417   fi
25418 
25419 
25420 
25421   # Setup tools from the Boot JDK.
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$JAVA" = 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 java in Boot JDK" >&5
25432 $as_echo_n "checking for java in Boot JDK... " >&6; }
25433       JAVA=$BOOT_JDK/bin/java
25434       if test ! -x $JAVA; 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 java 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 !JAVA! from our list.
25449     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
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 "xJAVA" != xBASH; then
25454         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25455 $as_echo "$as_me: WARNING: Ignoring value of JAVA 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 java in Boot JDK" >&5
25460 $as_echo_n "checking for java in Boot JDK... " >&6; }
25461       JAVA=$BOOT_JDK/bin/java
25462       if test ! -x $JAVA; 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 java 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="$JAVA"
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 JAVA=$tool_basename" >&5
25487 $as_echo "$as_me: Will search for user supplied tool JAVA=$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_JAVA+:} false; then :
25493   $as_echo_n "(cached) " >&6
25494 else
25495   case $JAVA in
25496   [\\/]* | ?:[\\/]*)
25497   ac_cv_path_JAVA="$JAVA" # 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_JAVA="$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 JAVA=$ac_cv_path_JAVA
25519 if test -n "$JAVA"; then
25520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25521 $as_echo "$JAVA" >&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$JAVA" = 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 JAVA=$tool_specified" >&5
25534 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25536 $as_echo_n "checking for JAVA... " >&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 JAVA=$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$JAVAC" = 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 javac in Boot JDK" >&5
25559 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25560       JAVAC=$BOOT_JDK/bin/javac
25561       if test ! -x $JAVAC; 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 javac 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 !JAVAC! from our list.
25576     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
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 "xJAVAC" != xBASH; then
25581         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25582 $as_echo "$as_me: WARNING: Ignoring value of JAVAC 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 javac in Boot JDK" >&5
25587 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25588       JAVAC=$BOOT_JDK/bin/javac
25589       if test ! -x $JAVAC; 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 javac 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="$JAVAC"
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 JAVAC=$tool_basename" >&5
25614 $as_echo "$as_me: Will search for user supplied tool JAVAC=$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_JAVAC+:} false; then :
25620   $as_echo_n "(cached) " >&6
25621 else
25622   case $JAVAC in
25623   [\\/]* | ?:[\\/]*)
25624   ac_cv_path_JAVAC="$JAVAC" # 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_JAVAC="$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 JAVAC=$ac_cv_path_JAVAC
25646 if test -n "$JAVAC"; then
25647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25648 $as_echo "$JAVAC" >&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$JAVAC" = 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 JAVAC=$tool_specified" >&5
25661 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25662         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25663 $as_echo_n "checking for JAVAC... " >&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 JAVAC=$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$JAVAH" = 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 javah in Boot JDK" >&5
25686 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25687       JAVAH=$BOOT_JDK/bin/javah
25688       if test ! -x $JAVAH; 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 javah 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 !JAVAH! from our list.
25703     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
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 "xJAVAH" != xBASH; then
25708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25709 $as_echo "$as_me: WARNING: Ignoring value of JAVAH 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 javah in Boot JDK" >&5
25714 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25715       JAVAH=$BOOT_JDK/bin/javah
25716       if test ! -x $JAVAH; 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 javah 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="$JAVAH"
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 JAVAH=$tool_basename" >&5
25741 $as_echo "$as_me: Will search for user supplied tool JAVAH=$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_JAVAH+:} false; then :
25747   $as_echo_n "(cached) " >&6
25748 else
25749   case $JAVAH in
25750   [\\/]* | ?:[\\/]*)
25751   ac_cv_path_JAVAH="$JAVAH" # 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_JAVAH="$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 JAVAH=$ac_cv_path_JAVAH
25773 if test -n "$JAVAH"; then
25774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25775 $as_echo "$JAVAH" >&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$JAVAH" = 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 JAVAH=$tool_specified" >&5
25788 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25789         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25790 $as_echo_n "checking for JAVAH... " >&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 JAVAH=$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$JAR" = 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 jar in Boot JDK" >&5
25813 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25814       JAR=$BOOT_JDK/bin/jar
25815       if test ! -x $JAR; 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 jar 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 !JAR! from our list.
25830     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
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 "xJAR" != xBASH; then
25835         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25836 $as_echo "$as_me: WARNING: Ignoring value of JAR 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 jar in Boot JDK" >&5
25841 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25842       JAR=$BOOT_JDK/bin/jar
25843       if test ! -x $JAR; 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 jar 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="$JAR"
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 JAR=$tool_basename" >&5
25868 $as_echo "$as_me: Will search for user supplied tool JAR=$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_JAR+:} false; then :
25874   $as_echo_n "(cached) " >&6
25875 else
25876   case $JAR in
25877   [\\/]* | ?:[\\/]*)
25878   ac_cv_path_JAR="$JAR" # 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_JAR="$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 JAR=$ac_cv_path_JAR
25900 if test -n "$JAR"; then
25901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25902 $as_echo "$JAR" >&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$JAR" = 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 JAR=$tool_specified" >&5
25915 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25916         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25917 $as_echo_n "checking for JAR... " >&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 JAR=$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   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25932 
25933   # Publish this variable in the help.
25934 
25935 
25936   if test "x$NATIVE2ASCII" = x; then
25937     # The variable is not set by user, try to locate tool using the code snippet
25938 
25939       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25940 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25941       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25942       if test ! -x $NATIVE2ASCII; then
25943         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25944 $as_echo "not found" >&6; }
25945         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25946 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25947         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25948       fi
25949       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25950 $as_echo "ok" >&6; }
25951 
25952 
25953   else
25954     # The variable is set, but is it from the command line or the environment?
25955 
25956     # Try to remove the string !NATIVE2ASCII! from our list.
25957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25959       # If it failed, the variable was not from the command line. Ignore it,
25960       # but warn the user (except for BASH, which is always set by the calling BASH).
25961       if test "xNATIVE2ASCII" != xBASH; then
25962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25963 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25964       fi
25965       # Try to locate tool using the code snippet
25966 
25967       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25968 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25969       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25970       if test ! -x $NATIVE2ASCII; then
25971         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25972 $as_echo "not found" >&6; }
25973         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25974 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25975         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25976       fi
25977       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25978 $as_echo "ok" >&6; }
25979 
25980 
25981     else
25982       # If it succeeded, then it was overridden by the user. We will use it
25983       # for the tool.
25984 
25985       # First remove it from the list of overridden variables, so we can test
25986       # for unknown variables in the end.
25987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25988 
25989       # Check if the provided tool contains a complete path.
25990       tool_specified="$NATIVE2ASCII"
25991       tool_basename="${tool_specified##*/}"
25992       if test "x$tool_basename" = "x$tool_specified"; then
25993         # A command without a complete path is provided, search $PATH.
25994         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25995 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25996         # Extract the first word of "$tool_basename", so it can be a program name with args.
25997 set dummy $tool_basename; ac_word=$2
25998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25999 $as_echo_n "checking for $ac_word... " >&6; }
26000 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26001   $as_echo_n "(cached) " >&6
26002 else
26003   case $NATIVE2ASCII in
26004   [\\/]* | ?:[\\/]*)
26005   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26006   ;;
26007   *)
26008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26009 for as_dir in $PATH
26010 do
26011   IFS=$as_save_IFS
26012   test -z "$as_dir" && as_dir=.
26013     for ac_exec_ext in '' $ac_executable_extensions; do
26014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26015     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26017     break 2
26018   fi
26019 done
26020   done
26021 IFS=$as_save_IFS
26022 
26023   ;;
26024 esac
26025 fi
26026 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26027 if test -n "$NATIVE2ASCII"; then
26028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26029 $as_echo "$NATIVE2ASCII" >&6; }
26030 else
26031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26032 $as_echo "no" >&6; }
26033 fi
26034 
26035 
26036         if test "x$NATIVE2ASCII" = x; then
26037           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26038         fi
26039       else
26040         # Otherwise we believe it is a complete path. Use it as it is.
26041         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26042 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26044 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
26045         if test ! -x "$tool_specified"; then
26046           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26047 $as_echo "not found" >&6; }
26048           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26049         fi
26050         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26051 $as_echo "$tool_specified" >&6; }
26052       fi
26053     fi
26054   fi
26055 
26056 
26057 
26058   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26059 
26060   # Publish this variable in the help.
26061 
26062 
26063   if test "x$JARSIGNER" = x; then
26064     # The variable is not set by user, try to locate tool using the code snippet
26065 
26066       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26067 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26068       JARSIGNER=$BOOT_JDK/bin/jarsigner
26069       if test ! -x $JARSIGNER; then
26070         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26071 $as_echo "not found" >&6; }
26072         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26073 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26074         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26075       fi
26076       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26077 $as_echo "ok" >&6; }
26078 
26079 
26080   else
26081     # The variable is set, but is it from the command line or the environment?
26082 
26083     # Try to remove the string !JARSIGNER! from our list.
26084     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26085     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26086       # If it failed, the variable was not from the command line. Ignore it,
26087       # but warn the user (except for BASH, which is always set by the calling BASH).
26088       if test "xJARSIGNER" != xBASH; then
26089         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26090 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26091       fi
26092       # Try to locate tool using the code snippet
26093 
26094       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26095 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26096       JARSIGNER=$BOOT_JDK/bin/jarsigner
26097       if test ! -x $JARSIGNER; then
26098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26099 $as_echo "not found" >&6; }
26100         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26101 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26102         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26103       fi
26104       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26105 $as_echo "ok" >&6; }
26106 
26107 
26108     else
26109       # If it succeeded, then it was overridden by the user. We will use it
26110       # for the tool.
26111 
26112       # First remove it from the list of overridden variables, so we can test
26113       # for unknown variables in the end.
26114       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26115 
26116       # Check if the provided tool contains a complete path.
26117       tool_specified="$JARSIGNER"
26118       tool_basename="${tool_specified##*/}"
26119       if test "x$tool_basename" = "x$tool_specified"; then
26120         # A command without a complete path is provided, search $PATH.
26121         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26122 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26123         # Extract the first word of "$tool_basename", so it can be a program name with args.
26124 set dummy $tool_basename; ac_word=$2
26125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26126 $as_echo_n "checking for $ac_word... " >&6; }
26127 if ${ac_cv_path_JARSIGNER+:} false; then :
26128   $as_echo_n "(cached) " >&6
26129 else
26130   case $JARSIGNER in
26131   [\\/]* | ?:[\\/]*)
26132   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26133   ;;
26134   *)
26135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26136 for as_dir in $PATH
26137 do
26138   IFS=$as_save_IFS
26139   test -z "$as_dir" && as_dir=.
26140     for ac_exec_ext in '' $ac_executable_extensions; do
26141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26142     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26144     break 2
26145   fi
26146 done
26147   done
26148 IFS=$as_save_IFS
26149 
26150   ;;
26151 esac
26152 fi
26153 JARSIGNER=$ac_cv_path_JARSIGNER
26154 if test -n "$JARSIGNER"; then
26155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26156 $as_echo "$JARSIGNER" >&6; }
26157 else
26158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26159 $as_echo "no" >&6; }
26160 fi
26161 
26162 
26163         if test "x$JARSIGNER" = x; then
26164           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26165         fi
26166       else
26167         # Otherwise we believe it is a complete path. Use it as it is.
26168         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26169 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26170         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26171 $as_echo_n "checking for JARSIGNER... " >&6; }
26172         if test ! -x "$tool_specified"; then
26173           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26174 $as_echo "not found" >&6; }
26175           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26176         fi
26177         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26178 $as_echo "$tool_specified" >&6; }
26179       fi
26180     fi
26181   fi
26182 
26183 
26184 
26185   # Finally, set some other options...
26186 
26187   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26188   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26189 
26190 
26191 
26192 
26193 ###############################################################################
26194 #
26195 # Configure the sources to use. We can add or override individual directories.
26196 #
26197 ###############################################################################
26198 
26199 
26200   # Where are the sources. Any of these can be overridden
26201   # using --with-override-corba and the likes.
26202   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26203   CORBA_TOPDIR="$SRC_ROOT/corba"
26204   JAXP_TOPDIR="$SRC_ROOT/jaxp"
26205   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26206   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26207   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26208   JDK_TOPDIR="$SRC_ROOT/jdk"
26209 
26210 
26211 
26212 
26213 
26214 
26215 
26216 
26217 
26218 
26219   ###############################################################################
26220   #
26221   # Pickup additional source for a component from outside of the source root
26222   # or override source for a component.
26223   #
26224 
26225 # Check whether --with-add-source-root was given.
26226 if test "${with_add_source_root+set}" = set; then :
26227   withval=$with_add_source_root;
26228 fi
26229 
26230 
26231 
26232 # Check whether --with-override-source-root was given.
26233 if test "${with_override_source_root+set}" = set; then :
26234   withval=$with_override_source_root;
26235 fi
26236 
26237 
26238 
26239 # Check whether --with-adds-and-overrides was given.
26240 if test "${with_adds_and_overrides+set}" = set; then :
26241   withval=$with_adds_and_overrides;
26242 fi
26243 
26244 
26245   if test "x$with_adds_and_overrides" != x; then
26246     with_add_source_root="$with_adds_and_overrides/adds"
26247     with_override_source_root="$with_adds_and_overrides/overrides"
26248   fi
26249 
26250   if test "x$with_add_source_root" != x; then
26251     if ! test -d $with_add_source_root; then
26252       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26253     fi
26254     CURDIR="$PWD"
26255     cd "$with_add_source_root"
26256     ADD_SRC_ROOT="`pwd`"
26257     cd "$CURDIR"
26258     # Verify that the addon source root does not have any root makefiles.
26259     # If it does, then it is usually an error, prevent this.
26260     if test -f $with_add_source_root/langtools/make/Makefile; then
26261       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
26262     fi
26263     if test -f $with_add_source_root/corba/make/Makefile; then
26264       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
26265     fi
26266     if test -f $with_add_source_root/jaxp/make/Makefile; then
26267       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
26268     fi
26269     if test -f $with_add_source_root/jaxws/make/Makefile; then
26270       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
26271     fi
26272     if test -f $with_add_source_root/hotspot/make/Makefile; then
26273       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
26274     fi
26275     if test -f $with_add_source_root/nashorn/make/Makefile; then
26276       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
26277     fi
26278     if test -f $with_add_source_root/jdk/make/Makefile; then
26279       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
26280     fi
26281   fi
26282 
26283 
26284   if test "x$with_override_source_root" != x; then
26285     if ! test -d $with_override_source_root; then
26286       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26287     fi
26288     CURDIR="$PWD"
26289     cd "$with_override_source_root"
26290     OVERRIDE_SRC_ROOT="`pwd`"
26291     cd "$CURDIR"
26292     if test -f $with_override_source_root/langtools/make/Makefile; then
26293       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
26294     fi
26295     if test -f $with_override_source_root/corba/make/Makefile; then
26296       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
26297     fi
26298     if test -f $with_override_source_root/jaxp/make/Makefile; then
26299       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
26300     fi
26301     if test -f $with_override_source_root/jaxws/make/Makefile; then
26302       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
26303     fi
26304     if test -f $with_override_source_root/hotspot/make/Makefile; then
26305       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
26306     fi
26307     if test -f $with_override_source_root/nashorn/make/Makefile; then
26308       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
26309     fi
26310     if test -f $with_override_source_root/jdk/make/Makefile; then
26311       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
26312     fi
26313   fi
26314 
26315 
26316   ###############################################################################
26317   #
26318   # Override a repo completely, this is used for example when you have 3 small
26319   # development sandboxes of the langtools sources and want to avoid having 3 full
26320   # OpenJDK sources checked out on disk.
26321   #
26322   # Assuming that the 3 langtools sandboxes are located here:
26323   # /home/fredrik/sandbox1/langtools
26324   # /home/fredrik/sandbox2/langtools
26325   # /home/fredrik/sandbox3/langtools
26326   #
26327   # From the source root you create build subdirs manually:
26328   #     mkdir -p build1 build2 build3
26329   # in each build directory run:
26330   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26331   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26332   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26333   #
26334 
26335 
26336 # Check whether --with-override-langtools was given.
26337 if test "${with_override_langtools+set}" = set; then :
26338   withval=$with_override_langtools;
26339 fi
26340 
26341 
26342 
26343 # Check whether --with-override-corba was given.
26344 if test "${with_override_corba+set}" = set; then :
26345   withval=$with_override_corba;
26346 fi
26347 
26348 
26349 
26350 # Check whether --with-override-jaxp was given.
26351 if test "${with_override_jaxp+set}" = set; then :
26352   withval=$with_override_jaxp;
26353 fi
26354 
26355 
26356 
26357 # Check whether --with-override-jaxws was given.
26358 if test "${with_override_jaxws+set}" = set; then :
26359   withval=$with_override_jaxws;
26360 fi
26361 
26362 
26363 
26364 # Check whether --with-override-hotspot was given.
26365 if test "${with_override_hotspot+set}" = set; then :
26366   withval=$with_override_hotspot;
26367 fi
26368 
26369 
26370 
26371 # Check whether --with-override-nashorn was given.
26372 if test "${with_override_nashorn+set}" = set; then :
26373   withval=$with_override_nashorn;
26374 fi
26375 
26376 
26377 
26378 # Check whether --with-override-jdk was given.
26379 if test "${with_override_jdk+set}" = set; then :
26380   withval=$with_override_jdk;
26381 fi
26382 
26383 
26384   if test "x$with_override_langtools" != x; then
26385     CURDIR="$PWD"
26386     cd "$with_override_langtools"
26387     LANGTOOLS_TOPDIR="`pwd`"
26388     cd "$CURDIR"
26389     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26390       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26391     fi
26392     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26393 $as_echo_n "checking if langtools should be overridden... " >&6; }
26394     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26395 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26396   fi
26397   if test "x$with_override_corba" != x; then
26398     CURDIR="$PWD"
26399     cd "$with_override_corba"
26400     CORBA_TOPDIR="`pwd`"
26401     cd "$CURDIR"
26402     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26403       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26404     fi
26405     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26406 $as_echo_n "checking if corba should be overridden... " >&6; }
26407     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26408 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26409   fi
26410   if test "x$with_override_jaxp" != x; then
26411     CURDIR="$PWD"
26412     cd "$with_override_jaxp"
26413     JAXP_TOPDIR="`pwd`"
26414     cd "$CURDIR"
26415     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26416       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26417     fi
26418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26419 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26420     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26421 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26422   fi
26423   if test "x$with_override_jaxws" != x; then
26424     CURDIR="$PWD"
26425     cd "$with_override_jaxws"
26426     JAXWS_TOPDIR="`pwd`"
26427     cd "$CURDIR"
26428     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26429       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26430     fi
26431     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26432 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26433     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26434 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26435   fi
26436   if test "x$with_override_hotspot" != x; then
26437     CURDIR="$PWD"
26438     cd "$with_override_hotspot"
26439     HOTSPOT_TOPDIR="`pwd`"
26440     cd "$CURDIR"
26441     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26442       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26443     fi
26444     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26445 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26446     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26447 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26448   fi
26449   if test "x$with_override_nashorn" != x; then
26450     CURDIR="$PWD"
26451     cd "$with_override_nashorn"
26452     NASHORN_TOPDIR="`pwd`"
26453     cd "$CURDIR"
26454     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26455       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26456     fi
26457     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26458 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26459     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26460 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26461   fi
26462   if test "x$with_override_jdk" != x; then
26463     CURDIR="$PWD"
26464     cd "$with_override_jdk"
26465     JDK_TOPDIR="`pwd`"
26466     cd "$CURDIR"
26467     if ! test -f $JDK_TOPDIR/make/Makefile; then
26468       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26469     fi
26470     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26471 $as_echo_n "checking if JDK should be overridden... " >&6; }
26472     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26473 $as_echo "yes with $JDK_TOPDIR" >&6; }
26474   fi
26475 
26476 
26477   BUILD_OUTPUT="$OUTPUT_ROOT"
26478 
26479 
26480   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26481   BUILD_HOTSPOT=true
26482 
26483 
26484 
26485 # Check whether --with-import-hotspot was given.
26486 if test "${with_import_hotspot+set}" = set; then :
26487   withval=$with_import_hotspot;
26488 fi
26489 
26490   if test "x$with_import_hotspot" != x; then
26491     CURDIR="$PWD"
26492     cd "$with_import_hotspot"
26493     HOTSPOT_DIST="`pwd`"
26494     cd "$CURDIR"
26495     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26496       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26497     fi
26498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26499 $as_echo_n "checking if hotspot should be imported... " >&6; }
26500     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26501 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26502     BUILD_HOTSPOT=false
26503   fi
26504 
26505   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26506 
26507 
26508 ###############################################################################
26509 #
26510 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26511 # native code.
26512 #
26513 ###############################################################################
26514 
26515 # First determine the toolchain type (compiler family)
26516 
26517 
26518 # Check whether --with-toolchain-type was given.
26519 if test "${with_toolchain_type+set}" = set; then :
26520   withval=$with_toolchain_type;
26521 fi
26522 
26523 
26524   # Use indirect variable referencing
26525   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26526   VALID_TOOLCHAINS=${!toolchain_var_name}
26527 
26528   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26529     if test -n "$XCODEBUILD"; then
26530       # On Mac OS X, default toolchain to clang after Xcode 5
26531       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26532       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26533       if test $? -ne 0; then
26534         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26535       fi
26536       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26537           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26538           $CUT -f 1 -d .`
26539       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26540 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26541       if test $XCODE_MAJOR_VERSION -ge 5; then
26542           DEFAULT_TOOLCHAIN="clang"
26543       else
26544           DEFAULT_TOOLCHAIN="gcc"
26545       fi
26546     else
26547       # If Xcode is not installed, but the command line tools are
26548       # then we can't run xcodebuild. On these systems we should
26549       # default to clang
26550       DEFAULT_TOOLCHAIN="clang"
26551     fi
26552   else
26553     # First toolchain type in the list is the default
26554     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26555   fi
26556 
26557   if test "x$with_toolchain_type" = xlist; then
26558     # List all toolchains
26559     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26560 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26561     for toolchain in $VALID_TOOLCHAINS; do
26562       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26563       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26564       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26565     done
26566 
26567     exit 0
26568   elif test "x$with_toolchain_type" != x; then
26569     # User override; check that it is valid
26570     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26571       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26572 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26573       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26574 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26575       as_fn_error $? "Cannot continue." "$LINENO" 5
26576     fi
26577     TOOLCHAIN_TYPE=$with_toolchain_type
26578   else
26579     # No flag given, use default
26580     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26581   fi
26582 
26583 
26584   TOOLCHAIN_CC_BINARY_clang="clang"
26585   TOOLCHAIN_CC_BINARY_gcc="gcc"
26586   TOOLCHAIN_CC_BINARY_microsoft="cl"
26587   TOOLCHAIN_CC_BINARY_solstudio="cc"
26588   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26589 
26590   TOOLCHAIN_CXX_BINARY_clang="clang++"
26591   TOOLCHAIN_CXX_BINARY_gcc="g++"
26592   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26593   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26594   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26595 
26596   # Use indirect variable referencing
26597   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26598   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26599   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26600   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26601   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26602   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26603 
26604 
26605   # Define filename patterns
26606   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26607     LIBRARY_PREFIX=
26608     SHARED_LIBRARY_SUFFIX='.dll'
26609     STATIC_LIBRARY_SUFFIX='.lib'
26610     SHARED_LIBRARY='$1.dll'
26611     STATIC_LIBRARY='$1.lib'
26612     OBJ_SUFFIX='.obj'
26613     EXE_SUFFIX='.exe'
26614   else
26615     LIBRARY_PREFIX=lib
26616     SHARED_LIBRARY_SUFFIX='.so'
26617     STATIC_LIBRARY_SUFFIX='.a'
26618     SHARED_LIBRARY='lib$1.so'
26619     STATIC_LIBRARY='lib$1.a'
26620     OBJ_SUFFIX='.o'
26621     EXE_SUFFIX=''
26622     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26623       SHARED_LIBRARY='lib$1.dylib'
26624       SHARED_LIBRARY_SUFFIX='.dylib'
26625     fi
26626   fi
26627 
26628 
26629 
26630 
26631 
26632 
26633 
26634 
26635 
26636 
26637   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26638     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26639 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26640   else
26641     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26642 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26643   fi
26644 
26645 
26646 # Then detect the actual binaries needed
26647 
26648   # FIXME: Is this needed?
26649   ac_ext=cpp
26650 ac_cpp='$CXXCPP $CPPFLAGS'
26651 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26652 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26653 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26654 
26655 
26656   # Store the CFLAGS etc passed to the configure script.
26657   ORG_CFLAGS="$CFLAGS"
26658   ORG_CXXFLAGS="$CXXFLAGS"
26659   ORG_OBJCFLAGS="$OBJCFLAGS"
26660 
26661   # On Windows, we need to detect the visual studio installation first.
26662   # This will change the PATH, but we need to keep that new PATH even
26663   # after toolchain detection is done, since the compiler (on x86) uses
26664   # it for DLL resolution in runtime.
26665   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26666 
26667   # Store path to cygwin link.exe to help excluding it when searching for
26668   # VS linker. This must be done before changing the PATH when looking for VS.
26669   # Extract the first word of "link", so it can be a program name with args.
26670 set dummy link; ac_word=$2
26671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26672 $as_echo_n "checking for $ac_word... " >&6; }
26673 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26674   $as_echo_n "(cached) " >&6
26675 else
26676   case $CYGWIN_LINK in
26677   [\\/]* | ?:[\\/]*)
26678   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26679   ;;
26680   *)
26681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26682 for as_dir in $PATH
26683 do
26684   IFS=$as_save_IFS
26685   test -z "$as_dir" && as_dir=.
26686     for ac_exec_ext in '' $ac_executable_extensions; do
26687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26688     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26690     break 2
26691   fi
26692 done
26693   done
26694 IFS=$as_save_IFS
26695 
26696   ;;
26697 esac
26698 fi
26699 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26700 if test -n "$CYGWIN_LINK"; then
26701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26702 $as_echo "$CYGWIN_LINK" >&6; }
26703 else
26704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26705 $as_echo "no" >&6; }
26706 fi
26707 
26708 
26709   if test "x$CYGWIN_LINK" != x; then
26710     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26711 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26712     "$CYGWIN_LINK" --version > /dev/null
26713     if test $? -eq 0 ; then
26714       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26715 $as_echo "yes" >&6; }
26716     else
26717       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26718 $as_echo "no" >&6; }
26719       # This might be the VS linker. Don't exclude it later on.
26720       CYGWIN_LINK=""
26721     fi
26722   fi
26723 
26724   # First-hand choice is to locate and run the vsvars bat file.
26725 
26726 
26727 # Check whether --with-toolchain-version was given.
26728 if test "${with_toolchain_version+set}" = set; then :
26729   withval=$with_toolchain_version;
26730 fi
26731 
26732 
26733   if test "x$with_toolchain_version" = xlist; then
26734     # List all toolchains
26735     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26736 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26737     for version in $VALID_VS_VERSIONS; do
26738       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26739       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26740     done
26741 
26742     exit 0
26743   elif test "x$with_toolchain_version" != x; then
26744     # User override; check that it is valid
26745     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26746       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26747 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26748       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26749 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26750       as_fn_error $? "Cannot continue." "$LINENO" 5
26751     fi
26752     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26753   else
26754     # No flag given, use default
26755     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26756   fi
26757 
26758   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26759 
26760   VS_VERSION="$VS_VERSION"
26761   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26762   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26763   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26764   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26765 
26766   # When using --with-tools-dir, assume it points to the correct and default
26767   # version of Visual Studio or that --with-toolchain-version was also set.
26768   if test "x$with_tools_dir" != x; then
26769 
26770   if test "x$VS_ENV_CMD" = x; then
26771     VS_VERSION="${VS_VERSION}"
26772     VS_BASE="$with_tools_dir/../.."
26773     METHOD="--with-tools-dir"
26774 
26775     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26776       VCVARSFILE="vc/bin/vcvars32.bat"
26777     else
26778       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26779     fi
26780 
26781 
26782   windows_path="$VS_BASE"
26783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26784     unix_path=`$CYGPATH -u "$windows_path"`
26785     VS_BASE="$unix_path"
26786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26788     VS_BASE="$unix_path"
26789   fi
26790 
26791     if test -d "$VS_BASE"; then
26792       if test -f "$VS_BASE/$VCVARSFILE"; then
26793         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26794 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26795         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26796         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26797         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26798         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26799       else
26800         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26801 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26802         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26803 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26804       fi
26805     fi
26806   fi
26807 
26808 
26809   if test "x$VS_ENV_CMD" = x; then
26810     VS_VERSION="${VS_VERSION}"
26811     VS_BASE="$with_tools_dir/../../.."
26812     METHOD="--with-tools-dir"
26813 
26814     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26815       VCVARSFILE="vc/bin/vcvars32.bat"
26816     else
26817       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26818     fi
26819 
26820 
26821   windows_path="$VS_BASE"
26822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26823     unix_path=`$CYGPATH -u "$windows_path"`
26824     VS_BASE="$unix_path"
26825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26827     VS_BASE="$unix_path"
26828   fi
26829 
26830     if test -d "$VS_BASE"; then
26831       if test -f "$VS_BASE/$VCVARSFILE"; then
26832         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26833 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26834         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26835         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26836         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26837         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26838       else
26839         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26840 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26841         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26842 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26843       fi
26844     fi
26845   fi
26846 
26847     if test "x$VS_ENV_CMD" = x; then
26848       # Having specified an argument which is incorrect will produce an instant failure;
26849       # we should not go on looking
26850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26851 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26852       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26853 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26854       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26855 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26856       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26857     fi
26858   fi
26859 
26860   VS_ENV_CMD=""
26861   VS_ENV_ARGS=""
26862 
26863   if test "x$VS_COMNTOOLS" != x; then
26864 
26865   if test "x$VS_ENV_CMD" = x; then
26866     VS_VERSION="${VS_VERSION}"
26867     VS_BASE="$VS_COMNTOOLS/../.."
26868     METHOD="$VS_COMNTOOLS_VAR variable"
26869 
26870     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26871       VCVARSFILE="vc/bin/vcvars32.bat"
26872     else
26873       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26874     fi
26875 
26876 
26877   windows_path="$VS_BASE"
26878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26879     unix_path=`$CYGPATH -u "$windows_path"`
26880     VS_BASE="$unix_path"
26881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26883     VS_BASE="$unix_path"
26884   fi
26885 
26886     if test -d "$VS_BASE"; then
26887       if test -f "$VS_BASE/$VCVARSFILE"; then
26888         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26889 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26890         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26891         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26892         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26893         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26894       else
26895         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26896 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26897         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26898 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26899       fi
26900     fi
26901   fi
26902 
26903   fi
26904   if test "x$PROGRAMFILES" != x; then
26905 
26906   if test "x$VS_ENV_CMD" = x; then
26907     VS_VERSION="${VS_VERSION}"
26908     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26909     METHOD="well-known name"
26910 
26911     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26912       VCVARSFILE="vc/bin/vcvars32.bat"
26913     else
26914       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26915     fi
26916 
26917 
26918   windows_path="$VS_BASE"
26919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26920     unix_path=`$CYGPATH -u "$windows_path"`
26921     VS_BASE="$unix_path"
26922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26924     VS_BASE="$unix_path"
26925   fi
26926 
26927     if test -d "$VS_BASE"; then
26928       if test -f "$VS_BASE/$VCVARSFILE"; then
26929         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26930 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26931         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26932         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26933         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26934         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26935       else
26936         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26937 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26938         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26939 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26940       fi
26941     fi
26942   fi
26943 
26944   fi
26945   # Work around the insanely named ProgramFiles(x86) env variable
26946   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26947   if test "x$PROGRAMFILES_X86" != x; then
26948 
26949   if test "x$VS_ENV_CMD" = x; then
26950     VS_VERSION="${VS_VERSION}"
26951     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26952     METHOD="well-known name"
26953 
26954     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26955       VCVARSFILE="vc/bin/vcvars32.bat"
26956     else
26957       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26958     fi
26959 
26960 
26961   windows_path="$VS_BASE"
26962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26963     unix_path=`$CYGPATH -u "$windows_path"`
26964     VS_BASE="$unix_path"
26965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26967     VS_BASE="$unix_path"
26968   fi
26969 
26970     if test -d "$VS_BASE"; then
26971       if test -f "$VS_BASE/$VCVARSFILE"; then
26972         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26973 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26974         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26975         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26976         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26977         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26978       else
26979         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26980 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26981         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26982 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26983       fi
26984     fi
26985   fi
26986 
26987   fi
26988 
26989   if test "x$VS_ENV_CMD" = x; then
26990     VS_VERSION="${VS_VERSION}"
26991     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26992     METHOD="well-known name"
26993 
26994     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26995       VCVARSFILE="vc/bin/vcvars32.bat"
26996     else
26997       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26998     fi
26999 
27000 
27001   windows_path="$VS_BASE"
27002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27003     unix_path=`$CYGPATH -u "$windows_path"`
27004     VS_BASE="$unix_path"
27005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27007     VS_BASE="$unix_path"
27008   fi
27009 
27010     if test -d "$VS_BASE"; then
27011       if test -f "$VS_BASE/$VCVARSFILE"; then
27012         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27013 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27014         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27015         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27016         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27017         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27018       else
27019         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27020 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27021         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27022 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27023       fi
27024     fi
27025   fi
27026 
27027 
27028   if test "x$VS_ENV_CMD" = x; then
27029     VS_VERSION="${VS_VERSION}"
27030     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27031     METHOD="well-known name"
27032 
27033     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27034       VCVARSFILE="vc/bin/vcvars32.bat"
27035     else
27036       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27037     fi
27038 
27039 
27040   windows_path="$VS_BASE"
27041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042     unix_path=`$CYGPATH -u "$windows_path"`
27043     VS_BASE="$unix_path"
27044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27046     VS_BASE="$unix_path"
27047   fi
27048 
27049     if test -d "$VS_BASE"; then
27050       if test -f "$VS_BASE/$VCVARSFILE"; then
27051         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27052 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27053         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27054         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27055         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27056         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27057       else
27058         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27059 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27060         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27061 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27062       fi
27063     fi
27064   fi
27065 
27066 
27067   if test "x$SDK_INSTALL_DIR" != x; then
27068     if test "x$ProgramW6432" != x; then
27069 
27070   if test "x$VS_ENV_CMD" = x; then
27071     VS_VERSION="${VS_VERSION}"
27072     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27073     METHOD="well-known name"
27074 
27075   windows_path="$WIN_SDK_BASE"
27076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27077     unix_path=`$CYGPATH -u "$windows_path"`
27078     WIN_SDK_BASE="$unix_path"
27079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27081     WIN_SDK_BASE="$unix_path"
27082   fi
27083 
27084     if test -d "$WIN_SDK_BASE"; then
27085       # There have been cases of partial or broken SDK installations. A missing
27086       # lib dir is not going to work.
27087       if test ! -d "$WIN_SDK_BASE/lib"; then
27088         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27089 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27090         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27091 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27092       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27093         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27094 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27095         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27096         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27097           VS_ENV_ARGS="/x86"
27098         else
27099           VS_ENV_ARGS="/x64"
27100         fi
27101         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27102         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27103         # TODO: improve detection for other versions of SDK
27104         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27105       else
27106         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27107 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27108         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27109 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27110       fi
27111     fi
27112   fi
27113 
27114     fi
27115     if test "x$PROGRAMW6432" != x; then
27116 
27117   if test "x$VS_ENV_CMD" = x; then
27118     VS_VERSION="${VS_VERSION}"
27119     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27120     METHOD="well-known name"
27121 
27122   windows_path="$WIN_SDK_BASE"
27123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27124     unix_path=`$CYGPATH -u "$windows_path"`
27125     WIN_SDK_BASE="$unix_path"
27126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27128     WIN_SDK_BASE="$unix_path"
27129   fi
27130 
27131     if test -d "$WIN_SDK_BASE"; then
27132       # There have been cases of partial or broken SDK installations. A missing
27133       # lib dir is not going to work.
27134       if test ! -d "$WIN_SDK_BASE/lib"; then
27135         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27136 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27137         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27138 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27139       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27140         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27141 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27142         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27143         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27144           VS_ENV_ARGS="/x86"
27145         else
27146           VS_ENV_ARGS="/x64"
27147         fi
27148         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27149         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27150         # TODO: improve detection for other versions of SDK
27151         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27152       else
27153         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27154 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27155         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27156 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27157       fi
27158     fi
27159   fi
27160 
27161     fi
27162     if test "x$PROGRAMFILES" != x; then
27163 
27164   if test "x$VS_ENV_CMD" = x; then
27165     VS_VERSION="${VS_VERSION}"
27166     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27167     METHOD="well-known name"
27168 
27169   windows_path="$WIN_SDK_BASE"
27170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27171     unix_path=`$CYGPATH -u "$windows_path"`
27172     WIN_SDK_BASE="$unix_path"
27173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27175     WIN_SDK_BASE="$unix_path"
27176   fi
27177 
27178     if test -d "$WIN_SDK_BASE"; then
27179       # There have been cases of partial or broken SDK installations. A missing
27180       # lib dir is not going to work.
27181       if test ! -d "$WIN_SDK_BASE/lib"; then
27182         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27183 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27184         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27185 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27186       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27187         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27188 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27189         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27190         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27191           VS_ENV_ARGS="/x86"
27192         else
27193           VS_ENV_ARGS="/x64"
27194         fi
27195         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27196         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27197         # TODO: improve detection for other versions of SDK
27198         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27199       else
27200         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27201 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27202         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27203 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27204       fi
27205     fi
27206   fi
27207 
27208     fi
27209 
27210   if test "x$VS_ENV_CMD" = x; then
27211     VS_VERSION="${VS_VERSION}"
27212     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27213     METHOD="well-known name"
27214 
27215   windows_path="$WIN_SDK_BASE"
27216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27217     unix_path=`$CYGPATH -u "$windows_path"`
27218     WIN_SDK_BASE="$unix_path"
27219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27221     WIN_SDK_BASE="$unix_path"
27222   fi
27223 
27224     if test -d "$WIN_SDK_BASE"; then
27225       # There have been cases of partial or broken SDK installations. A missing
27226       # lib dir is not going to work.
27227       if test ! -d "$WIN_SDK_BASE/lib"; then
27228         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27229 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27230         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27231 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27232       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27233         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27234 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27235         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27236         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27237           VS_ENV_ARGS="/x86"
27238         else
27239           VS_ENV_ARGS="/x64"
27240         fi
27241         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27242         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27243         # TODO: improve detection for other versions of SDK
27244         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27245       else
27246         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27247 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27248         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27249 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27250       fi
27251     fi
27252   fi
27253 
27254 
27255   if test "x$VS_ENV_CMD" = x; then
27256     VS_VERSION="${VS_VERSION}"
27257     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27258     METHOD="well-known name"
27259 
27260   windows_path="$WIN_SDK_BASE"
27261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27262     unix_path=`$CYGPATH -u "$windows_path"`
27263     WIN_SDK_BASE="$unix_path"
27264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27266     WIN_SDK_BASE="$unix_path"
27267   fi
27268 
27269     if test -d "$WIN_SDK_BASE"; then
27270       # There have been cases of partial or broken SDK installations. A missing
27271       # lib dir is not going to work.
27272       if test ! -d "$WIN_SDK_BASE/lib"; then
27273         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27274 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27275         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27276 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27277       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27278         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27279 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27280         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27281         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27282           VS_ENV_ARGS="/x86"
27283         else
27284           VS_ENV_ARGS="/x64"
27285         fi
27286         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27287         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27288         # TODO: improve detection for other versions of SDK
27289         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27290       else
27291         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27292 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27293         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27294 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27295       fi
27296     fi
27297   fi
27298 
27299   fi
27300 
27301     if test "x$VS_ENV_CMD" != x; then
27302       TOOLCHAIN_VERSION=$VS_VERSION
27303       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27304       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27305       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27306       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27307       # The rest of the variables are already evaled while probing
27308       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27309 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27310       break
27311     fi
27312   done
27313 
27314 
27315   if test "x$VS_ENV_CMD" != x; then
27316     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27317 
27318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27319 
27320   # First separate the path from the arguments. This will split at the first
27321   # space.
27322   complete="$VS_ENV_CMD"
27323   path="${complete%% *}"
27324   tmp="$complete EOL"
27325   arguments="${tmp#* }"
27326 
27327   # Input might be given as Windows format, start by converting to
27328   # unix format.
27329   new_path=`$CYGPATH -u "$path"`
27330 
27331   # Now try to locate executable using which
27332   new_path=`$WHICH "$new_path" 2> /dev/null`
27333   # bat and cmd files are not always considered executable in cygwin causing which
27334   # to not find them
27335   if test "x$new_path" = x \
27336       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27337       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27338     new_path=`$CYGPATH -u "$path"`
27339   fi
27340   if test "x$new_path" = x; then
27341     # Oops. Which didn't find the executable.
27342     # The splitting of arguments from the executable at a space might have been incorrect,
27343     # since paths with space are more likely in Windows. Give it another try with the whole
27344     # argument.
27345     path="$complete"
27346     arguments="EOL"
27347     new_path=`$CYGPATH -u "$path"`
27348     new_path=`$WHICH "$new_path" 2> /dev/null`
27349     # bat and cmd files are not always considered executable in cygwin causing which
27350     # to not find them
27351     if test "x$new_path" = x \
27352         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27353         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27354       new_path=`$CYGPATH -u "$path"`
27355     fi
27356     if test "x$new_path" = x; then
27357       # It's still not found. Now this is an unrecoverable error.
27358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27359 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27360       has_space=`$ECHO "$complete" | $GREP " "`
27361       if test "x$has_space" != x; then
27362         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27363 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27364       fi
27365       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27366     fi
27367   fi
27368 
27369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27372   # "foo.exe" is OK but "foo" is an error.
27373   #
27374   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27375   # It is also a way to make sure we got the proper file name for the real test later on.
27376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27377   if test "x$test_shortpath" = x; then
27378     # Short path failed, file does not exist as specified.
27379     # Try adding .exe or .cmd
27380     if test -f "${new_path}.exe"; then
27381       input_to_shortpath="${new_path}.exe"
27382     elif test -f "${new_path}.cmd"; then
27383       input_to_shortpath="${new_path}.cmd"
27384     else
27385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27386 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27387       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27388 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27389       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27390     fi
27391   else
27392     input_to_shortpath="$new_path"
27393   fi
27394 
27395   # Call helper function which possibly converts this using DOS-style short mode.
27396   # If so, the updated path is stored in $new_path.
27397   new_path="$input_to_shortpath"
27398 
27399   input_path="$input_to_shortpath"
27400   # Check if we need to convert this using DOS-style short mode. If the path
27401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27402   # take no chances and rewrite it.
27403   # Note: m4 eats our [], so we need to use [ and ] instead.
27404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27405   if test "x$has_forbidden_chars" != x; then
27406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27407     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27408     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27409     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27410       # Going to short mode and back again did indeed matter. Since short mode is
27411       # case insensitive, let's make it lowercase to improve readability.
27412       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27413       # Now convert it back to Unix-stile (cygpath)
27414       input_path=`$CYGPATH -u "$shortmode_path"`
27415       new_path="$input_path"
27416     fi
27417   fi
27418 
27419   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27420   if test "x$test_cygdrive_prefix" = x; then
27421     # As a simple fix, exclude /usr/bin since it's not a real path.
27422     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27423       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27424       # a path prefixed by /cygdrive for fixpath to work.
27425       new_path="$CYGWIN_ROOT_PATH$input_path"
27426     fi
27427   fi
27428 
27429   # remove trailing .exe if any
27430   new_path="${new_path/%.exe/}"
27431 
27432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27433 
27434   # First separate the path from the arguments. This will split at the first
27435   # space.
27436   complete="$VS_ENV_CMD"
27437   path="${complete%% *}"
27438   tmp="$complete EOL"
27439   arguments="${tmp#* }"
27440 
27441   # Input might be given as Windows format, start by converting to
27442   # unix format.
27443   new_path="$path"
27444 
27445   windows_path="$new_path"
27446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447     unix_path=`$CYGPATH -u "$windows_path"`
27448     new_path="$unix_path"
27449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27451     new_path="$unix_path"
27452   fi
27453 
27454 
27455   # Now try to locate executable using which
27456   new_path=`$WHICH "$new_path" 2> /dev/null`
27457 
27458   if test "x$new_path" = x; then
27459     # Oops. Which didn't find the executable.
27460     # The splitting of arguments from the executable at a space might have been incorrect,
27461     # since paths with space are more likely in Windows. Give it another try with the whole
27462     # argument.
27463     path="$complete"
27464     arguments="EOL"
27465     new_path="$path"
27466 
27467   windows_path="$new_path"
27468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27469     unix_path=`$CYGPATH -u "$windows_path"`
27470     new_path="$unix_path"
27471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27473     new_path="$unix_path"
27474   fi
27475 
27476 
27477     new_path=`$WHICH "$new_path" 2> /dev/null`
27478     # bat and cmd files are not always considered executable in MSYS causing which
27479     # to not find them
27480     if test "x$new_path" = x \
27481         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27482         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27483       new_path="$path"
27484 
27485   windows_path="$new_path"
27486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27487     unix_path=`$CYGPATH -u "$windows_path"`
27488     new_path="$unix_path"
27489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27491     new_path="$unix_path"
27492   fi
27493 
27494     fi
27495 
27496     if test "x$new_path" = x; then
27497       # It's still not found. Now this is an unrecoverable error.
27498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27499 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27500       has_space=`$ECHO "$complete" | $GREP " "`
27501       if test "x$has_space" != x; then
27502         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27503 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27504       fi
27505       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27506     fi
27507   fi
27508 
27509   # Now new_path has a complete unix path to the binary
27510   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27511     # Keep paths in /bin as-is, but remove trailing .exe if any
27512     new_path="${new_path/%.exe/}"
27513     # Do not save /bin paths to all_fixpath_prefixes!
27514   else
27515     # Not in mixed or Windows style, start by that.
27516     new_path=`cmd //c echo $new_path`
27517 
27518   input_path="$new_path"
27519   # Check if we need to convert this using DOS-style short mode. If the path
27520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27521   # take no chances and rewrite it.
27522   # Note: m4 eats our [], so we need to use [ and ] instead.
27523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27524   if test "x$has_forbidden_chars" != x; then
27525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27527   fi
27528 
27529     # Output is in $new_path
27530 
27531   windows_path="$new_path"
27532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27533     unix_path=`$CYGPATH -u "$windows_path"`
27534     new_path="$unix_path"
27535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27537     new_path="$unix_path"
27538   fi
27539 
27540     # remove trailing .exe if any
27541     new_path="${new_path/%.exe/}"
27542 
27543     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27544     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27545   fi
27546 
27547   else
27548     # We're on a unix platform. Hooray! :)
27549     # First separate the path from the arguments. This will split at the first
27550     # space.
27551     complete="$VS_ENV_CMD"
27552     path="${complete%% *}"
27553     tmp="$complete EOL"
27554     arguments="${tmp#* }"
27555 
27556     # Cannot rely on the command "which" here since it doesn't always work.
27557     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27558     if test -z "$is_absolute_path"; then
27559       # Path to executable is not absolute. Find it.
27560       IFS_save="$IFS"
27561       IFS=:
27562       for p in $PATH; do
27563         if test -f "$p/$path" && test -x "$p/$path"; then
27564           new_path="$p/$path"
27565           break
27566         fi
27567       done
27568       IFS="$IFS_save"
27569     else
27570       # This is an absolute path, we can use it without further modifications.
27571       new_path="$path"
27572     fi
27573 
27574     if test "x$new_path" = x; then
27575       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27576 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27577       has_space=`$ECHO "$complete" | $GREP " "`
27578       if test "x$has_space" != x; then
27579         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27580 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27581       fi
27582       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27583     fi
27584   fi
27585 
27586   # Now join together the path and the arguments once again
27587   if test "x$arguments" != xEOL; then
27588     new_complete="$new_path ${arguments% *}"
27589   else
27590     new_complete="$new_path"
27591   fi
27592 
27593   if test "x$complete" != "x$new_complete"; then
27594     VS_ENV_CMD="$new_complete"
27595     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27596 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27597   fi
27598 
27599 
27600     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27601     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27602 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27603 
27604     # We need to create a couple of temporary files.
27605     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27606     $MKDIR -p $VS_ENV_TMP_DIR
27607 
27608     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27609     # Instead create a shell script which will set the relevant variables when run.
27610     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27611 
27612   unix_path="$WINPATH_VS_ENV_CMD"
27613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27614     windows_path=`$CYGPATH -m "$unix_path"`
27615     WINPATH_VS_ENV_CMD="$windows_path"
27616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27617     windows_path=`cmd //c echo $unix_path`
27618     WINPATH_VS_ENV_CMD="$windows_path"
27619   fi
27620 
27621     WINPATH_BASH="$BASH"
27622 
27623   unix_path="$WINPATH_BASH"
27624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625     windows_path=`$CYGPATH -m "$unix_path"`
27626     WINPATH_BASH="$windows_path"
27627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27628     windows_path=`cmd //c echo $unix_path`
27629     WINPATH_BASH="$windows_path"
27630   fi
27631 
27632 
27633     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27634     # script (executable by bash) that will setup the important variables.
27635     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27636     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27637     # This will end up something like:
27638     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27639     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27640     # These will end up something like:
27641     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27642     # The trailing space for everyone except PATH is no typo, but is needed due
27643     # to trailing \ in the Windows paths. These will be stripped later.
27644     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27645     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27646     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27647     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27648     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27649     $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27650 
27651     # Now execute the newly created bat file.
27652     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27653     # Change directory so we don't need to mess with Windows paths in redirects.
27654     cd $VS_ENV_TMP_DIR
27655     cmd /c extract-vs-env.bat | $CAT
27656     cd $CURDIR
27657 
27658     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27659       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27660 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27661       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27662 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27663       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27664 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27665       as_fn_error $? "Cannot continue" "$LINENO" 5
27666     fi
27667 
27668     # Now set all paths and other env variables. This will allow the rest of
27669     # the configure script to find and run the compiler in the proper way.
27670     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27671 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27672     . $VS_ENV_TMP_DIR/set-vs-env.sh
27673     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27674     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27675   else
27676     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27677     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27678 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27679   fi
27680 
27681   # At this point, we should have correct variables in the environment, or we can't continue.
27682   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27683 $as_echo_n "checking for Visual Studio variables... " >&6; }
27684 
27685   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27686     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27687       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27688 $as_echo "present but broken" >&6; }
27689       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27690     else
27691       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27692 $as_echo "ok" >&6; }
27693       # Remove any trailing "\" and " " from the variables.
27694       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27695       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27696       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27697       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27698       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27699       # Remove any paths containing # (typically F#) as that messes up make. This
27700       # is needed if visual studio was installed with F# support.
27701       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27702 
27703 
27704 
27705 
27706     fi
27707   else
27708     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27709 $as_echo "not found" >&6; }
27710 
27711     if test "x$VS_ENV_CMD" = x; then
27712       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27713 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27714       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27715 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27716     else
27717       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27718 $as_echo "$as_me: Running the extraction script failed." >&6;}
27719     fi
27720     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27721 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27722     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27723 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27724     as_fn_error $? "Cannot continue" "$LINENO" 5
27725   fi
27726 
27727     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27728     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27729     PATH="$VS_PATH"
27730     # The microsoft toolchain also requires INCLUDE and LIB to be set.
27731     export INCLUDE="$VS_INCLUDE"
27732     export LIB="$VS_LIB"
27733   fi
27734 
27735   # autoconf magic only relies on PATH, so update it if tools dir is specified
27736   OLD_PATH="$PATH"
27737 
27738   # For solaris we really need solaris tools, and not the GNU equivalent.
27739   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27740   # so add that to path before starting to probe.
27741   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27742   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27743     PATH="/usr/ccs/bin:$PATH"
27744   fi
27745 
27746   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27747   # override all other locations.
27748   if test "x$TOOLCHAIN_PATH" != x; then
27749     PATH=$TOOLCHAIN_PATH:$PATH
27750   fi
27751 
27752 
27753   #
27754   # Setup the compilers (CC and CXX)
27755   #
27756 
27757   COMPILER_NAME=C
27758   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27759 
27760   if test "x$CC" != x; then
27761     # User has supplied compiler name already, always let that override.
27762     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27763 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27764     if test "x`basename $CC`" = "x$CC"; then
27765       # A command without a complete path is provided, search $PATH.
27766 
27767       for ac_prog in $CC
27768 do
27769   # Extract the first word of "$ac_prog", so it can be a program name with args.
27770 set dummy $ac_prog; ac_word=$2
27771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27772 $as_echo_n "checking for $ac_word... " >&6; }
27773 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27774   $as_echo_n "(cached) " >&6
27775 else
27776   case $POTENTIAL_CC in
27777   [\\/]* | ?:[\\/]*)
27778   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27779   ;;
27780   *)
27781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27782 for as_dir in $PATH
27783 do
27784   IFS=$as_save_IFS
27785   test -z "$as_dir" && as_dir=.
27786     for ac_exec_ext in '' $ac_executable_extensions; do
27787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27788     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27790     break 2
27791   fi
27792 done
27793   done
27794 IFS=$as_save_IFS
27795 
27796   ;;
27797 esac
27798 fi
27799 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27800 if test -n "$POTENTIAL_CC"; then
27801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27802 $as_echo "$POTENTIAL_CC" >&6; }
27803 else
27804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27805 $as_echo "no" >&6; }
27806 fi
27807 
27808 
27809   test -n "$POTENTIAL_CC" && break
27810 done
27811 
27812       if test "x$POTENTIAL_CC" != x; then
27813         CC=$POTENTIAL_CC
27814       else
27815         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27816       fi
27817     else
27818       # Otherwise it might already be a complete path
27819       if test ! -x "$CC"; then
27820         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27821       fi
27822     fi
27823   else
27824     # No user supplied value. Locate compiler ourselves.
27825 
27826     # If we are cross compiling, assume cross compilation tools follows the
27827     # cross compilation standard where they are prefixed with the autoconf
27828     # standard name for the target. For example the binary
27829     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27830     # If we are not cross compiling, then the default compiler name will be
27831     # used.
27832 
27833     CC=
27834     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27835     # before checking the rest of the PATH.
27836     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27837     # step, this should not be necessary.
27838     if test -n "$TOOLCHAIN_PATH"; then
27839       PATH_save="$PATH"
27840       PATH="$TOOLCHAIN_PATH"
27841       for ac_prog in $SEARCH_LIST
27842 do
27843   # Extract the first word of "$ac_prog", so it can be a program name with args.
27844 set dummy $ac_prog; ac_word=$2
27845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27846 $as_echo_n "checking for $ac_word... " >&6; }
27847 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27848   $as_echo_n "(cached) " >&6
27849 else
27850   case $TOOLCHAIN_PATH_CC in
27851   [\\/]* | ?:[\\/]*)
27852   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27853   ;;
27854   *)
27855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27856 for as_dir in $PATH
27857 do
27858   IFS=$as_save_IFS
27859   test -z "$as_dir" && as_dir=.
27860     for ac_exec_ext in '' $ac_executable_extensions; do
27861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27862     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27864     break 2
27865   fi
27866 done
27867   done
27868 IFS=$as_save_IFS
27869 
27870   ;;
27871 esac
27872 fi
27873 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27874 if test -n "$TOOLCHAIN_PATH_CC"; then
27875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27876 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27877 else
27878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27879 $as_echo "no" >&6; }
27880 fi
27881 
27882 
27883   test -n "$TOOLCHAIN_PATH_CC" && break
27884 done
27885 
27886       CC=$TOOLCHAIN_PATH_CC
27887       PATH="$PATH_save"
27888     fi
27889 
27890     # AC_PATH_PROGS can't be run multiple times with the same variable,
27891     # so create a new name for this run.
27892     if test "x$CC" = x; then
27893       for ac_prog in $SEARCH_LIST
27894 do
27895   # Extract the first word of "$ac_prog", so it can be a program name with args.
27896 set dummy $ac_prog; ac_word=$2
27897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27898 $as_echo_n "checking for $ac_word... " >&6; }
27899 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27900   $as_echo_n "(cached) " >&6
27901 else
27902   case $POTENTIAL_CC in
27903   [\\/]* | ?:[\\/]*)
27904   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27905   ;;
27906   *)
27907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27908 for as_dir in $PATH
27909 do
27910   IFS=$as_save_IFS
27911   test -z "$as_dir" && as_dir=.
27912     for ac_exec_ext in '' $ac_executable_extensions; do
27913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27914     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27916     break 2
27917   fi
27918 done
27919   done
27920 IFS=$as_save_IFS
27921 
27922   ;;
27923 esac
27924 fi
27925 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27926 if test -n "$POTENTIAL_CC"; then
27927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27928 $as_echo "$POTENTIAL_CC" >&6; }
27929 else
27930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27931 $as_echo "no" >&6; }
27932 fi
27933 
27934 
27935   test -n "$POTENTIAL_CC" && break
27936 done
27937 
27938       CC=$POTENTIAL_CC
27939     fi
27940 
27941     if test "x$CC" = x; then
27942 
27943   # Print a helpful message on how to acquire the necessary build dependency.
27944   # devkit is the help tag: freetype, cups, pulse, alsa etc
27945   MISSING_DEPENDENCY=devkit
27946 
27947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27948     cygwin_help $MISSING_DEPENDENCY
27949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27950     msys_help $MISSING_DEPENDENCY
27951   else
27952     PKGHANDLER_COMMAND=
27953 
27954     case $PKGHANDLER in
27955       apt-get)
27956         apt_help     $MISSING_DEPENDENCY ;;
27957       yum)
27958         yum_help     $MISSING_DEPENDENCY ;;
27959       port)
27960         port_help    $MISSING_DEPENDENCY ;;
27961       pkgutil)
27962         pkgutil_help $MISSING_DEPENDENCY ;;
27963       pkgadd)
27964         pkgadd_help  $MISSING_DEPENDENCY ;;
27965     esac
27966 
27967     if test "x$PKGHANDLER_COMMAND" != x; then
27968       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27969     fi
27970   fi
27971 
27972       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27973     fi
27974   fi
27975 
27976   # Now we have a compiler binary in CC. Make sure it's okay.
27977 
27978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27979 
27980   # First separate the path from the arguments. This will split at the first
27981   # space.
27982   complete="$CC"
27983   path="${complete%% *}"
27984   tmp="$complete EOL"
27985   arguments="${tmp#* }"
27986 
27987   # Input might be given as Windows format, start by converting to
27988   # unix format.
27989   new_path=`$CYGPATH -u "$path"`
27990 
27991   # Now try to locate executable using which
27992   new_path=`$WHICH "$new_path" 2> /dev/null`
27993   # bat and cmd files are not always considered executable in cygwin causing which
27994   # to not find them
27995   if test "x$new_path" = x \
27996       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27997       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27998     new_path=`$CYGPATH -u "$path"`
27999   fi
28000   if test "x$new_path" = x; then
28001     # Oops. Which didn't find the executable.
28002     # The splitting of arguments from the executable at a space might have been incorrect,
28003     # since paths with space are more likely in Windows. Give it another try with the whole
28004     # argument.
28005     path="$complete"
28006     arguments="EOL"
28007     new_path=`$CYGPATH -u "$path"`
28008     new_path=`$WHICH "$new_path" 2> /dev/null`
28009     # bat and cmd files are not always considered executable in cygwin causing which
28010     # to not find them
28011     if test "x$new_path" = x \
28012         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28013         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28014       new_path=`$CYGPATH -u "$path"`
28015     fi
28016     if test "x$new_path" = x; then
28017       # It's still not found. Now this is an unrecoverable error.
28018       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28019 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28020       has_space=`$ECHO "$complete" | $GREP " "`
28021       if test "x$has_space" != x; then
28022         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28023 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28024       fi
28025       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28026     fi
28027   fi
28028 
28029   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28030   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28031   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28032   # "foo.exe" is OK but "foo" is an error.
28033   #
28034   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28035   # It is also a way to make sure we got the proper file name for the real test later on.
28036   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28037   if test "x$test_shortpath" = x; then
28038     # Short path failed, file does not exist as specified.
28039     # Try adding .exe or .cmd
28040     if test -f "${new_path}.exe"; then
28041       input_to_shortpath="${new_path}.exe"
28042     elif test -f "${new_path}.cmd"; then
28043       input_to_shortpath="${new_path}.cmd"
28044     else
28045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28046 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28047       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28048 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28049       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28050     fi
28051   else
28052     input_to_shortpath="$new_path"
28053   fi
28054 
28055   # Call helper function which possibly converts this using DOS-style short mode.
28056   # If so, the updated path is stored in $new_path.
28057   new_path="$input_to_shortpath"
28058 
28059   input_path="$input_to_shortpath"
28060   # Check if we need to convert this using DOS-style short mode. If the path
28061   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28062   # take no chances and rewrite it.
28063   # Note: m4 eats our [], so we need to use [ and ] instead.
28064   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28065   if test "x$has_forbidden_chars" != x; then
28066     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28067     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28068     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28069     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28070       # Going to short mode and back again did indeed matter. Since short mode is
28071       # case insensitive, let's make it lowercase to improve readability.
28072       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28073       # Now convert it back to Unix-stile (cygpath)
28074       input_path=`$CYGPATH -u "$shortmode_path"`
28075       new_path="$input_path"
28076     fi
28077   fi
28078 
28079   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28080   if test "x$test_cygdrive_prefix" = x; then
28081     # As a simple fix, exclude /usr/bin since it's not a real path.
28082     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28083       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28084       # a path prefixed by /cygdrive for fixpath to work.
28085       new_path="$CYGWIN_ROOT_PATH$input_path"
28086     fi
28087   fi
28088 
28089   # remove trailing .exe if any
28090   new_path="${new_path/%.exe/}"
28091 
28092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28093 
28094   # First separate the path from the arguments. This will split at the first
28095   # space.
28096   complete="$CC"
28097   path="${complete%% *}"
28098   tmp="$complete EOL"
28099   arguments="${tmp#* }"
28100 
28101   # Input might be given as Windows format, start by converting to
28102   # unix format.
28103   new_path="$path"
28104 
28105   windows_path="$new_path"
28106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107     unix_path=`$CYGPATH -u "$windows_path"`
28108     new_path="$unix_path"
28109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111     new_path="$unix_path"
28112   fi
28113 
28114 
28115   # Now try to locate executable using which
28116   new_path=`$WHICH "$new_path" 2> /dev/null`
28117 
28118   if test "x$new_path" = x; then
28119     # Oops. Which didn't find the executable.
28120     # The splitting of arguments from the executable at a space might have been incorrect,
28121     # since paths with space are more likely in Windows. Give it another try with the whole
28122     # argument.
28123     path="$complete"
28124     arguments="EOL"
28125     new_path="$path"
28126 
28127   windows_path="$new_path"
28128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28129     unix_path=`$CYGPATH -u "$windows_path"`
28130     new_path="$unix_path"
28131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28133     new_path="$unix_path"
28134   fi
28135 
28136 
28137     new_path=`$WHICH "$new_path" 2> /dev/null`
28138     # bat and cmd files are not always considered executable in MSYS causing which
28139     # to not find them
28140     if test "x$new_path" = x \
28141         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28142         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28143       new_path="$path"
28144 
28145   windows_path="$new_path"
28146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28147     unix_path=`$CYGPATH -u "$windows_path"`
28148     new_path="$unix_path"
28149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28151     new_path="$unix_path"
28152   fi
28153 
28154     fi
28155 
28156     if test "x$new_path" = x; then
28157       # It's still not found. Now this is an unrecoverable error.
28158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28159 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28160       has_space=`$ECHO "$complete" | $GREP " "`
28161       if test "x$has_space" != x; then
28162         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28163 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28164       fi
28165       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28166     fi
28167   fi
28168 
28169   # Now new_path has a complete unix path to the binary
28170   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28171     # Keep paths in /bin as-is, but remove trailing .exe if any
28172     new_path="${new_path/%.exe/}"
28173     # Do not save /bin paths to all_fixpath_prefixes!
28174   else
28175     # Not in mixed or Windows style, start by that.
28176     new_path=`cmd //c echo $new_path`
28177 
28178   input_path="$new_path"
28179   # Check if we need to convert this using DOS-style short mode. If the path
28180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28181   # take no chances and rewrite it.
28182   # Note: m4 eats our [], so we need to use [ and ] instead.
28183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28184   if test "x$has_forbidden_chars" != x; then
28185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28186     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28187   fi
28188 
28189     # Output is in $new_path
28190 
28191   windows_path="$new_path"
28192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28193     unix_path=`$CYGPATH -u "$windows_path"`
28194     new_path="$unix_path"
28195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28197     new_path="$unix_path"
28198   fi
28199 
28200     # remove trailing .exe if any
28201     new_path="${new_path/%.exe/}"
28202 
28203     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28204     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28205   fi
28206 
28207   else
28208     # We're on a unix platform. Hooray! :)
28209     # First separate the path from the arguments. This will split at the first
28210     # space.
28211     complete="$CC"
28212     path="${complete%% *}"
28213     tmp="$complete EOL"
28214     arguments="${tmp#* }"
28215 
28216     # Cannot rely on the command "which" here since it doesn't always work.
28217     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28218     if test -z "$is_absolute_path"; then
28219       # Path to executable is not absolute. Find it.
28220       IFS_save="$IFS"
28221       IFS=:
28222       for p in $PATH; do
28223         if test -f "$p/$path" && test -x "$p/$path"; then
28224           new_path="$p/$path"
28225           break
28226         fi
28227       done
28228       IFS="$IFS_save"
28229     else
28230       # This is an absolute path, we can use it without further modifications.
28231       new_path="$path"
28232     fi
28233 
28234     if test "x$new_path" = x; then
28235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28236 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28237       has_space=`$ECHO "$complete" | $GREP " "`
28238       if test "x$has_space" != x; then
28239         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28240 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28241       fi
28242       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28243     fi
28244   fi
28245 
28246   # Now join together the path and the arguments once again
28247   if test "x$arguments" != xEOL; then
28248     new_complete="$new_path ${arguments% *}"
28249   else
28250     new_complete="$new_path"
28251   fi
28252 
28253   if test "x$complete" != "x$new_complete"; then
28254     CC="$new_complete"
28255     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28256 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28257   fi
28258 
28259   TEST_COMPILER="$CC"
28260   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28261   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28262   if test "x$OPENJDK_BUILD_OS" != xaix; then
28263     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28265 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
28266 
28267   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28268     # Follow a chain of symbolic links. Use readlink
28269     # where it exists, else fall back to horribly
28270     # complicated shell code.
28271     if test "x$READLINK_TESTED" != yes; then
28272       # On MacOSX there is a readlink tool with a different
28273       # purpose than the GNU readlink tool. Check the found readlink.
28274       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28275       if test "x$ISGNU" = x; then
28276         # A readlink that we do not know how to use.
28277         # Are there other non-GNU readlinks out there?
28278         READLINK_TESTED=yes
28279         READLINK=
28280       fi
28281     fi
28282 
28283     if test "x$READLINK" != x; then
28284       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28285     else
28286       # Save the current directory for restoring afterwards
28287       STARTDIR=$PWD
28288       COUNTER=0
28289       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28290       sym_link_file=`$BASENAME $TEST_COMPILER`
28291       cd $sym_link_dir
28292       # Use -P flag to resolve symlinks in directories.
28293       cd `$THEPWDCMD -P`
28294       sym_link_dir=`$THEPWDCMD -P`
28295       # Resolve file symlinks
28296       while test $COUNTER -lt 20; do
28297         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28298         if test "x$ISLINK" == x; then
28299           # This is not a symbolic link! We are done!
28300           break
28301         fi
28302         # Again resolve directory symlinks since the target of the just found
28303         # link could be in a different directory
28304         cd `$DIRNAME $ISLINK`
28305         sym_link_dir=`$THEPWDCMD -P`
28306         sym_link_file=`$BASENAME $ISLINK`
28307         let COUNTER=COUNTER+1
28308       done
28309       cd $STARTDIR
28310       TEST_COMPILER=$sym_link_dir/$sym_link_file
28311     fi
28312   fi
28313 
28314     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28315 $as_echo "$TEST_COMPILER" >&6; }
28316   fi
28317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28318 $as_echo_n "checking if CC is disguised ccache... " >&6; }
28319 
28320   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28321   if test "x$COMPILER_BASENAME" = "xccache"; then
28322     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28323 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28324     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28325     # We want to control ccache invocation ourselves, so ignore this cc and try
28326     # searching again.
28327 
28328     # Remove the path to the fake ccache cc from the PATH
28329     RETRY_COMPILER_SAVED_PATH="$PATH"
28330     COMPILER_DIRNAME=`$DIRNAME $CC`
28331     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28332 
28333     # Try again looking for our compiler
28334     if test -n "$ac_tool_prefix"; then
28335   for ac_prog in $TOOLCHAIN_CC_BINARY
28336   do
28337     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28338 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28340 $as_echo_n "checking for $ac_word... " >&6; }
28341 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28342   $as_echo_n "(cached) " >&6
28343 else
28344   if test -n "$PROPER_COMPILER_CC"; then
28345   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28346 else
28347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28348 for as_dir in $PATH
28349 do
28350   IFS=$as_save_IFS
28351   test -z "$as_dir" && as_dir=.
28352     for ac_exec_ext in '' $ac_executable_extensions; do
28353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28354     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28356     break 2
28357   fi
28358 done
28359   done
28360 IFS=$as_save_IFS
28361 
28362 fi
28363 fi
28364 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28365 if test -n "$PROPER_COMPILER_CC"; then
28366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28367 $as_echo "$PROPER_COMPILER_CC" >&6; }
28368 else
28369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28370 $as_echo "no" >&6; }
28371 fi
28372 
28373 
28374     test -n "$PROPER_COMPILER_CC" && break
28375   done
28376 fi
28377 if test -z "$PROPER_COMPILER_CC"; then
28378   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28379   for ac_prog in $TOOLCHAIN_CC_BINARY
28380 do
28381   # Extract the first word of "$ac_prog", so it can be a program name with args.
28382 set dummy $ac_prog; ac_word=$2
28383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28384 $as_echo_n "checking for $ac_word... " >&6; }
28385 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28386   $as_echo_n "(cached) " >&6
28387 else
28388   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28389   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28390 else
28391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28392 for as_dir in $PATH
28393 do
28394   IFS=$as_save_IFS
28395   test -z "$as_dir" && as_dir=.
28396     for ac_exec_ext in '' $ac_executable_extensions; do
28397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28398     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28400     break 2
28401   fi
28402 done
28403   done
28404 IFS=$as_save_IFS
28405 
28406 fi
28407 fi
28408 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28409 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28411 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28412 else
28413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28414 $as_echo "no" >&6; }
28415 fi
28416 
28417 
28418   test -n "$ac_ct_PROPER_COMPILER_CC" && break
28419 done
28420 
28421   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28422     PROPER_COMPILER_CC=""
28423   else
28424     case $cross_compiling:$ac_tool_warned in
28425 yes:)
28426 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28427 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28428 ac_tool_warned=yes ;;
28429 esac
28430     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28431   fi
28432 fi
28433 
28434 
28435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28436 
28437   # First separate the path from the arguments. This will split at the first
28438   # space.
28439   complete="$PROPER_COMPILER_CC"
28440   path="${complete%% *}"
28441   tmp="$complete EOL"
28442   arguments="${tmp#* }"
28443 
28444   # Input might be given as Windows format, start by converting to
28445   # unix format.
28446   new_path=`$CYGPATH -u "$path"`
28447 
28448   # Now try to locate executable using which
28449   new_path=`$WHICH "$new_path" 2> /dev/null`
28450   # bat and cmd files are not always considered executable in cygwin causing which
28451   # to not find them
28452   if test "x$new_path" = x \
28453       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28454       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28455     new_path=`$CYGPATH -u "$path"`
28456   fi
28457   if test "x$new_path" = x; then
28458     # Oops. Which didn't find the executable.
28459     # The splitting of arguments from the executable at a space might have been incorrect,
28460     # since paths with space are more likely in Windows. Give it another try with the whole
28461     # argument.
28462     path="$complete"
28463     arguments="EOL"
28464     new_path=`$CYGPATH -u "$path"`
28465     new_path=`$WHICH "$new_path" 2> /dev/null`
28466     # bat and cmd files are not always considered executable in cygwin causing which
28467     # to not find them
28468     if test "x$new_path" = x \
28469         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28470         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28471       new_path=`$CYGPATH -u "$path"`
28472     fi
28473     if test "x$new_path" = x; then
28474       # It's still not found. Now this is an unrecoverable error.
28475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28476 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28477       has_space=`$ECHO "$complete" | $GREP " "`
28478       if test "x$has_space" != x; then
28479         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28480 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28481       fi
28482       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28483     fi
28484   fi
28485 
28486   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28487   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28488   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28489   # "foo.exe" is OK but "foo" is an error.
28490   #
28491   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28492   # It is also a way to make sure we got the proper file name for the real test later on.
28493   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28494   if test "x$test_shortpath" = x; then
28495     # Short path failed, file does not exist as specified.
28496     # Try adding .exe or .cmd
28497     if test -f "${new_path}.exe"; then
28498       input_to_shortpath="${new_path}.exe"
28499     elif test -f "${new_path}.cmd"; then
28500       input_to_shortpath="${new_path}.cmd"
28501     else
28502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28503 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28504       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28505 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28506       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28507     fi
28508   else
28509     input_to_shortpath="$new_path"
28510   fi
28511 
28512   # Call helper function which possibly converts this using DOS-style short mode.
28513   # If so, the updated path is stored in $new_path.
28514   new_path="$input_to_shortpath"
28515 
28516   input_path="$input_to_shortpath"
28517   # Check if we need to convert this using DOS-style short mode. If the path
28518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28519   # take no chances and rewrite it.
28520   # Note: m4 eats our [], so we need to use [ and ] instead.
28521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28522   if test "x$has_forbidden_chars" != x; then
28523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28524     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28525     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28526     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28527       # Going to short mode and back again did indeed matter. Since short mode is
28528       # case insensitive, let's make it lowercase to improve readability.
28529       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28530       # Now convert it back to Unix-stile (cygpath)
28531       input_path=`$CYGPATH -u "$shortmode_path"`
28532       new_path="$input_path"
28533     fi
28534   fi
28535 
28536   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28537   if test "x$test_cygdrive_prefix" = x; then
28538     # As a simple fix, exclude /usr/bin since it's not a real path.
28539     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28540       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28541       # a path prefixed by /cygdrive for fixpath to work.
28542       new_path="$CYGWIN_ROOT_PATH$input_path"
28543     fi
28544   fi
28545 
28546   # remove trailing .exe if any
28547   new_path="${new_path/%.exe/}"
28548 
28549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28550 
28551   # First separate the path from the arguments. This will split at the first
28552   # space.
28553   complete="$PROPER_COMPILER_CC"
28554   path="${complete%% *}"
28555   tmp="$complete EOL"
28556   arguments="${tmp#* }"
28557 
28558   # Input might be given as Windows format, start by converting to
28559   # unix format.
28560   new_path="$path"
28561 
28562   windows_path="$new_path"
28563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28564     unix_path=`$CYGPATH -u "$windows_path"`
28565     new_path="$unix_path"
28566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28568     new_path="$unix_path"
28569   fi
28570 
28571 
28572   # Now try to locate executable using which
28573   new_path=`$WHICH "$new_path" 2> /dev/null`
28574 
28575   if test "x$new_path" = x; then
28576     # Oops. Which didn't find the executable.
28577     # The splitting of arguments from the executable at a space might have been incorrect,
28578     # since paths with space are more likely in Windows. Give it another try with the whole
28579     # argument.
28580     path="$complete"
28581     arguments="EOL"
28582     new_path="$path"
28583 
28584   windows_path="$new_path"
28585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28586     unix_path=`$CYGPATH -u "$windows_path"`
28587     new_path="$unix_path"
28588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28590     new_path="$unix_path"
28591   fi
28592 
28593 
28594     new_path=`$WHICH "$new_path" 2> /dev/null`
28595     # bat and cmd files are not always considered executable in MSYS causing which
28596     # to not find them
28597     if test "x$new_path" = x \
28598         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28599         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28600       new_path="$path"
28601 
28602   windows_path="$new_path"
28603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28604     unix_path=`$CYGPATH -u "$windows_path"`
28605     new_path="$unix_path"
28606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28608     new_path="$unix_path"
28609   fi
28610 
28611     fi
28612 
28613     if test "x$new_path" = x; then
28614       # It's still not found. Now this is an unrecoverable error.
28615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28616 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28617       has_space=`$ECHO "$complete" | $GREP " "`
28618       if test "x$has_space" != x; then
28619         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28620 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28621       fi
28622       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28623     fi
28624   fi
28625 
28626   # Now new_path has a complete unix path to the binary
28627   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28628     # Keep paths in /bin as-is, but remove trailing .exe if any
28629     new_path="${new_path/%.exe/}"
28630     # Do not save /bin paths to all_fixpath_prefixes!
28631   else
28632     # Not in mixed or Windows style, start by that.
28633     new_path=`cmd //c echo $new_path`
28634 
28635   input_path="$new_path"
28636   # Check if we need to convert this using DOS-style short mode. If the path
28637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28638   # take no chances and rewrite it.
28639   # Note: m4 eats our [], so we need to use [ and ] instead.
28640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28641   if test "x$has_forbidden_chars" != x; then
28642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28644   fi
28645 
28646     # Output is in $new_path
28647 
28648   windows_path="$new_path"
28649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28650     unix_path=`$CYGPATH -u "$windows_path"`
28651     new_path="$unix_path"
28652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28654     new_path="$unix_path"
28655   fi
28656 
28657     # remove trailing .exe if any
28658     new_path="${new_path/%.exe/}"
28659 
28660     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28661     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28662   fi
28663 
28664   else
28665     # We're on a unix platform. Hooray! :)
28666     # First separate the path from the arguments. This will split at the first
28667     # space.
28668     complete="$PROPER_COMPILER_CC"
28669     path="${complete%% *}"
28670     tmp="$complete EOL"
28671     arguments="${tmp#* }"
28672 
28673     # Cannot rely on the command "which" here since it doesn't always work.
28674     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28675     if test -z "$is_absolute_path"; then
28676       # Path to executable is not absolute. Find it.
28677       IFS_save="$IFS"
28678       IFS=:
28679       for p in $PATH; do
28680         if test -f "$p/$path" && test -x "$p/$path"; then
28681           new_path="$p/$path"
28682           break
28683         fi
28684       done
28685       IFS="$IFS_save"
28686     else
28687       # This is an absolute path, we can use it without further modifications.
28688       new_path="$path"
28689     fi
28690 
28691     if test "x$new_path" = x; then
28692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28693 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28694       has_space=`$ECHO "$complete" | $GREP " "`
28695       if test "x$has_space" != x; then
28696         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28697 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28698       fi
28699       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28700     fi
28701   fi
28702 
28703   # Now join together the path and the arguments once again
28704   if test "x$arguments" != xEOL; then
28705     new_complete="$new_path ${arguments% *}"
28706   else
28707     new_complete="$new_path"
28708   fi
28709 
28710   if test "x$complete" != "x$new_complete"; then
28711     PROPER_COMPILER_CC="$new_complete"
28712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28713 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28714   fi
28715 
28716     PATH="$RETRY_COMPILER_SAVED_PATH"
28717 
28718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28719 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28720 
28721   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28722     # Follow a chain of symbolic links. Use readlink
28723     # where it exists, else fall back to horribly
28724     # complicated shell code.
28725     if test "x$READLINK_TESTED" != yes; then
28726       # On MacOSX there is a readlink tool with a different
28727       # purpose than the GNU readlink tool. Check the found readlink.
28728       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28729       if test "x$ISGNU" = x; then
28730         # A readlink that we do not know how to use.
28731         # Are there other non-GNU readlinks out there?
28732         READLINK_TESTED=yes
28733         READLINK=
28734       fi
28735     fi
28736 
28737     if test "x$READLINK" != x; then
28738       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28739     else
28740       # Save the current directory for restoring afterwards
28741       STARTDIR=$PWD
28742       COUNTER=0
28743       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28744       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28745       cd $sym_link_dir
28746       # Use -P flag to resolve symlinks in directories.
28747       cd `$THEPWDCMD -P`
28748       sym_link_dir=`$THEPWDCMD -P`
28749       # Resolve file symlinks
28750       while test $COUNTER -lt 20; do
28751         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28752         if test "x$ISLINK" == x; then
28753           # This is not a symbolic link! We are done!
28754           break
28755         fi
28756         # Again resolve directory symlinks since the target of the just found
28757         # link could be in a different directory
28758         cd `$DIRNAME $ISLINK`
28759         sym_link_dir=`$THEPWDCMD -P`
28760         sym_link_file=`$BASENAME $ISLINK`
28761         let COUNTER=COUNTER+1
28762       done
28763       cd $STARTDIR
28764       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28765     fi
28766   fi
28767 
28768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28769 $as_echo "$PROPER_COMPILER_CC" >&6; }
28770     CC="$PROPER_COMPILER_CC"
28771   else
28772     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28773 $as_echo "no, keeping CC" >&6; }
28774   fi
28775 
28776 
28777   COMPILER=$CC
28778   COMPILER_NAME=$COMPILER_NAME
28779 
28780   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28781     # cc -V output typically looks like
28782     #     cc: Sun C 5.12 Linux_i386 2011/11/16
28783     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28784     # Check that this is likely to be the Solaris Studio cc.
28785     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28786     if test $? -ne 0; then
28787       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28788       { $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
28789 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28790       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28791 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28792       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28793 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28794       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28795     fi
28796     # Remove usage instructions (if present), and
28797     # collapse compiler output into a single line
28798     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28799         $SED -e 's/ *[Uu]sage:.*//'`
28800     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28801         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28802   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28803     # xlc -qversion output typically looks like
28804     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28805     #     Version: 11.01.0000.0015
28806     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28807     # Check that this is likely to be the IBM XL C compiler.
28808     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28809     if test $? -ne 0; then
28810       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28811       { $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
28812 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28813       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28814 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28815       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28816 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28817       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28818     fi
28819     # Collapse compiler output into a single line
28820     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28821     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28822         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28823   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28824     # There is no specific version flag, but all output starts with a version string.
28825     # First line typically looks something like:
28826     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28827     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28828     # Check that this is likely to be Microsoft CL.EXE.
28829     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28830     if test $? -ne 0; then
28831       { $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
28832 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28833       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28834 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28835       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28836     fi
28837     # Collapse compiler output into a single line
28838     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28839     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28840         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28841   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28842     # gcc --version output typically looks like
28843     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28844     #     Copyright (C) 2013 Free Software Foundation, Inc.
28845     #     This is free software; see the source for copying conditions.  There is NO
28846     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28847     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28848     # Check that this is likely to be GCC.
28849     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28850     if test $? -ne 0; then
28851       { $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
28852 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28853       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28854 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28855       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28856     fi
28857     # Remove Copyright and legalese from version string, and
28858     # collapse into a single line
28859     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28860         $SED -e 's/ *Copyright .*//'`
28861     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28862         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28863   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28864     # clang --version output typically looks like
28865     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28866     #    clang version 3.3 (tags/RELEASE_33/final)
28867     # or
28868     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28869     #    Target: x86_64-pc-linux-gnu
28870     #    Thread model: posix
28871     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28872     # Check that this is likely to be clang
28873     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28874     if test $? -ne 0; then
28875       { $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
28876 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28877       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28878 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28879       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28880     fi
28881     # Collapse compiler output into a single line
28882     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28883     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28884         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28885   else
28886       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28887   fi
28888   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28889   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28890   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28891   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28892 
28893   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28894 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28895 
28896 
28897   # Now that we have resolved CC ourself, let autoconf have its go at it
28898   ac_ext=c
28899 ac_cpp='$CPP $CPPFLAGS'
28900 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28901 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28902 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28903 if test -n "$ac_tool_prefix"; then
28904   for ac_prog in $CC
28905   do
28906     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28907 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28909 $as_echo_n "checking for $ac_word... " >&6; }
28910 if ${ac_cv_prog_CC+:} false; then :
28911   $as_echo_n "(cached) " >&6
28912 else
28913   if test -n "$CC"; then
28914   ac_cv_prog_CC="$CC" # Let the user override the test.
28915 else
28916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28917 for as_dir in $PATH
28918 do
28919   IFS=$as_save_IFS
28920   test -z "$as_dir" && as_dir=.
28921     for ac_exec_ext in '' $ac_executable_extensions; do
28922   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28923     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28925     break 2
28926   fi
28927 done
28928   done
28929 IFS=$as_save_IFS
28930 
28931 fi
28932 fi
28933 CC=$ac_cv_prog_CC
28934 if test -n "$CC"; then
28935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28936 $as_echo "$CC" >&6; }
28937 else
28938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28939 $as_echo "no" >&6; }
28940 fi
28941 
28942 
28943     test -n "$CC" && break
28944   done
28945 fi
28946 if test -z "$CC"; then
28947   ac_ct_CC=$CC
28948   for ac_prog in $CC
28949 do
28950   # Extract the first word of "$ac_prog", so it can be a program name with args.
28951 set dummy $ac_prog; ac_word=$2
28952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28953 $as_echo_n "checking for $ac_word... " >&6; }
28954 if ${ac_cv_prog_ac_ct_CC+:} false; then :
28955   $as_echo_n "(cached) " >&6
28956 else
28957   if test -n "$ac_ct_CC"; then
28958   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28959 else
28960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28961 for as_dir in $PATH
28962 do
28963   IFS=$as_save_IFS
28964   test -z "$as_dir" && as_dir=.
28965     for ac_exec_ext in '' $ac_executable_extensions; do
28966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28967     ac_cv_prog_ac_ct_CC="$ac_prog"
28968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28969     break 2
28970   fi
28971 done
28972   done
28973 IFS=$as_save_IFS
28974 
28975 fi
28976 fi
28977 ac_ct_CC=$ac_cv_prog_ac_ct_CC
28978 if test -n "$ac_ct_CC"; then
28979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28980 $as_echo "$ac_ct_CC" >&6; }
28981 else
28982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28983 $as_echo "no" >&6; }
28984 fi
28985 
28986 
28987   test -n "$ac_ct_CC" && break
28988 done
28989 
28990   if test "x$ac_ct_CC" = x; then
28991     CC=""
28992   else
28993     case $cross_compiling:$ac_tool_warned in
28994 yes:)
28995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28996 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28997 ac_tool_warned=yes ;;
28998 esac
28999     CC=$ac_ct_CC
29000   fi
29001 fi
29002 
29003 
29004 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29006 as_fn_error $? "no acceptable C compiler found in \$PATH
29007 See \`config.log' for more details" "$LINENO" 5; }
29008 
29009 # Provide some information about the compiler.
29010 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29011 set X $ac_compile
29012 ac_compiler=$2
29013 for ac_option in --version -v -V -qversion; do
29014   { { ac_try="$ac_compiler $ac_option >&5"
29015 case "(($ac_try" in
29016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29017   *) ac_try_echo=$ac_try;;
29018 esac
29019 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29020 $as_echo "$ac_try_echo"; } >&5
29021   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29022   ac_status=$?
29023   if test -s conftest.err; then
29024     sed '10a\
29025 ... rest of stderr output deleted ...
29026          10q' conftest.err >conftest.er1
29027     cat conftest.er1 >&5
29028   fi
29029   rm -f conftest.er1 conftest.err
29030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29031   test $ac_status = 0; }
29032 done
29033 
29034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29035 /* end confdefs.h.  */
29036 
29037 int
29038 main ()
29039 {
29040 
29041   ;
29042   return 0;
29043 }
29044 _ACEOF
29045 ac_clean_files_save=$ac_clean_files
29046 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29047 # Try to create an executable without -o first, disregard a.out.
29048 # It will help us diagnose broken compilers, and finding out an intuition
29049 # of exeext.
29050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29051 $as_echo_n "checking whether the C compiler works... " >&6; }
29052 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29053 
29054 # The possible output files:
29055 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29056 
29057 ac_rmfiles=
29058 for ac_file in $ac_files
29059 do
29060   case $ac_file in
29061     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29062     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29063   esac
29064 done
29065 rm -f $ac_rmfiles
29066 
29067 if { { ac_try="$ac_link_default"
29068 case "(($ac_try" in
29069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29070   *) ac_try_echo=$ac_try;;
29071 esac
29072 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29073 $as_echo "$ac_try_echo"; } >&5
29074   (eval "$ac_link_default") 2>&5
29075   ac_status=$?
29076   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29077   test $ac_status = 0; }; then :
29078   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29079 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29080 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
29081 # so that the user can short-circuit this test for compilers unknown to
29082 # Autoconf.
29083 for ac_file in $ac_files ''
29084 do
29085   test -f "$ac_file" || continue
29086   case $ac_file in
29087     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29088         ;;
29089     [ab].out )
29090         # We found the default executable, but exeext='' is most
29091         # certainly right.
29092         break;;
29093     *.* )
29094         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29095         then :; else
29096            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29097         fi
29098         # We set ac_cv_exeext here because the later test for it is not
29099         # safe: cross compilers may not add the suffix if given an `-o'
29100         # argument, so we may need to know it at that point already.
29101         # Even if this section looks crufty: it has the advantage of
29102         # actually working.
29103         break;;
29104     * )
29105         break;;
29106   esac
29107 done
29108 test "$ac_cv_exeext" = no && ac_cv_exeext=
29109 
29110 else
29111   ac_file=''
29112 fi
29113 if test -z "$ac_file"; then :
29114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29115 $as_echo "no" >&6; }
29116 $as_echo "$as_me: failed program was:" >&5
29117 sed 's/^/| /' conftest.$ac_ext >&5
29118 
29119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29120 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29121 as_fn_error 77 "C compiler cannot create executables
29122 See \`config.log' for more details" "$LINENO" 5; }
29123 else
29124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29125 $as_echo "yes" >&6; }
29126 fi
29127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29128 $as_echo_n "checking for C compiler default output file name... " >&6; }
29129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29130 $as_echo "$ac_file" >&6; }
29131 ac_exeext=$ac_cv_exeext
29132 
29133 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29134 ac_clean_files=$ac_clean_files_save
29135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29136 $as_echo_n "checking for suffix of executables... " >&6; }
29137 if { { ac_try="$ac_link"
29138 case "(($ac_try" in
29139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29140   *) ac_try_echo=$ac_try;;
29141 esac
29142 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29143 $as_echo "$ac_try_echo"; } >&5
29144   (eval "$ac_link") 2>&5
29145   ac_status=$?
29146   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29147   test $ac_status = 0; }; then :
29148   # If both `conftest.exe' and `conftest' are `present' (well, observable)
29149 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29150 # work properly (i.e., refer to `conftest.exe'), while it won't with
29151 # `rm'.
29152 for ac_file in conftest.exe conftest conftest.*; do
29153   test -f "$ac_file" || continue
29154   case $ac_file in
29155     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29156     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29157           break;;
29158     * ) break;;
29159   esac
29160 done
29161 else
29162   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29163 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29164 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29165 See \`config.log' for more details" "$LINENO" 5; }
29166 fi
29167 rm -f conftest conftest$ac_cv_exeext
29168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29169 $as_echo "$ac_cv_exeext" >&6; }
29170 
29171 rm -f conftest.$ac_ext
29172 EXEEXT=$ac_cv_exeext
29173 ac_exeext=$EXEEXT
29174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29175 /* end confdefs.h.  */
29176 #include <stdio.h>
29177 int
29178 main ()
29179 {
29180 FILE *f = fopen ("conftest.out", "w");
29181  return ferror (f) || fclose (f) != 0;
29182 
29183   ;
29184   return 0;
29185 }
29186 _ACEOF
29187 ac_clean_files="$ac_clean_files conftest.out"
29188 # Check that the compiler produces executables we can run.  If not, either
29189 # the compiler is broken, or we cross compile.
29190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29191 $as_echo_n "checking whether we are cross compiling... " >&6; }
29192 if test "$cross_compiling" != yes; then
29193   { { ac_try="$ac_link"
29194 case "(($ac_try" in
29195   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29196   *) ac_try_echo=$ac_try;;
29197 esac
29198 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29199 $as_echo "$ac_try_echo"; } >&5
29200   (eval "$ac_link") 2>&5
29201   ac_status=$?
29202   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29203   test $ac_status = 0; }
29204   if { ac_try='./conftest$ac_cv_exeext'
29205   { { case "(($ac_try" in
29206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29207   *) ac_try_echo=$ac_try;;
29208 esac
29209 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29210 $as_echo "$ac_try_echo"; } >&5
29211   (eval "$ac_try") 2>&5
29212   ac_status=$?
29213   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29214   test $ac_status = 0; }; }; then
29215     cross_compiling=no
29216   else
29217     if test "$cross_compiling" = maybe; then
29218         cross_compiling=yes
29219     else
29220         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29222 as_fn_error $? "cannot run C compiled programs.
29223 If you meant to cross compile, use \`--host'.
29224 See \`config.log' for more details" "$LINENO" 5; }
29225     fi
29226   fi
29227 fi
29228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29229 $as_echo "$cross_compiling" >&6; }
29230 
29231 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29232 ac_clean_files=$ac_clean_files_save
29233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29234 $as_echo_n "checking for suffix of object files... " >&6; }
29235 if ${ac_cv_objext+:} false; then :
29236   $as_echo_n "(cached) " >&6
29237 else
29238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29239 /* end confdefs.h.  */
29240 
29241 int
29242 main ()
29243 {
29244 
29245   ;
29246   return 0;
29247 }
29248 _ACEOF
29249 rm -f conftest.o conftest.obj
29250 if { { ac_try="$ac_compile"
29251 case "(($ac_try" in
29252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29253   *) ac_try_echo=$ac_try;;
29254 esac
29255 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29256 $as_echo "$ac_try_echo"; } >&5
29257   (eval "$ac_compile") 2>&5
29258   ac_status=$?
29259   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29260   test $ac_status = 0; }; then :
29261   for ac_file in conftest.o conftest.obj conftest.*; do
29262   test -f "$ac_file" || continue;
29263   case $ac_file in
29264     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29265     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29266        break;;
29267   esac
29268 done
29269 else
29270   $as_echo "$as_me: failed program was:" >&5
29271 sed 's/^/| /' conftest.$ac_ext >&5
29272 
29273 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29274 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29275 as_fn_error $? "cannot compute suffix of object files: cannot compile
29276 See \`config.log' for more details" "$LINENO" 5; }
29277 fi
29278 rm -f conftest.$ac_cv_objext conftest.$ac_ext
29279 fi
29280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29281 $as_echo "$ac_cv_objext" >&6; }
29282 OBJEXT=$ac_cv_objext
29283 ac_objext=$OBJEXT
29284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29285 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29286 if ${ac_cv_c_compiler_gnu+:} false; then :
29287   $as_echo_n "(cached) " >&6
29288 else
29289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29290 /* end confdefs.h.  */
29291 
29292 int
29293 main ()
29294 {
29295 #ifndef __GNUC__
29296        choke me
29297 #endif
29298 
29299   ;
29300   return 0;
29301 }
29302 _ACEOF
29303 if ac_fn_c_try_compile "$LINENO"; then :
29304   ac_compiler_gnu=yes
29305 else
29306   ac_compiler_gnu=no
29307 fi
29308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29309 ac_cv_c_compiler_gnu=$ac_compiler_gnu
29310 
29311 fi
29312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29313 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
29314 if test $ac_compiler_gnu = yes; then
29315   GCC=yes
29316 else
29317   GCC=
29318 fi
29319 ac_test_CFLAGS=${CFLAGS+set}
29320 ac_save_CFLAGS=$CFLAGS
29321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29322 $as_echo_n "checking whether $CC accepts -g... " >&6; }
29323 if ${ac_cv_prog_cc_g+:} false; then :
29324   $as_echo_n "(cached) " >&6
29325 else
29326   ac_save_c_werror_flag=$ac_c_werror_flag
29327    ac_c_werror_flag=yes
29328    ac_cv_prog_cc_g=no
29329    CFLAGS="-g"
29330    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29331 /* end confdefs.h.  */
29332 
29333 int
29334 main ()
29335 {
29336 
29337   ;
29338   return 0;
29339 }
29340 _ACEOF
29341 if ac_fn_c_try_compile "$LINENO"; then :
29342   ac_cv_prog_cc_g=yes
29343 else
29344   CFLAGS=""
29345       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29346 /* end confdefs.h.  */
29347 
29348 int
29349 main ()
29350 {
29351 
29352   ;
29353   return 0;
29354 }
29355 _ACEOF
29356 if ac_fn_c_try_compile "$LINENO"; then :
29357 
29358 else
29359   ac_c_werror_flag=$ac_save_c_werror_flag
29360          CFLAGS="-g"
29361          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29362 /* end confdefs.h.  */
29363 
29364 int
29365 main ()
29366 {
29367 
29368   ;
29369   return 0;
29370 }
29371 _ACEOF
29372 if ac_fn_c_try_compile "$LINENO"; then :
29373   ac_cv_prog_cc_g=yes
29374 fi
29375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29376 fi
29377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29378 fi
29379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29380    ac_c_werror_flag=$ac_save_c_werror_flag
29381 fi
29382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29383 $as_echo "$ac_cv_prog_cc_g" >&6; }
29384 if test "$ac_test_CFLAGS" = set; then
29385   CFLAGS=$ac_save_CFLAGS
29386 elif test $ac_cv_prog_cc_g = yes; then
29387   if test "$GCC" = yes; then
29388     CFLAGS="-g -O2"
29389   else
29390     CFLAGS="-g"
29391   fi
29392 else
29393   if test "$GCC" = yes; then
29394     CFLAGS="-O2"
29395   else
29396     CFLAGS=
29397   fi
29398 fi
29399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29400 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29401 if ${ac_cv_prog_cc_c89+:} false; then :
29402   $as_echo_n "(cached) " >&6
29403 else
29404   ac_cv_prog_cc_c89=no
29405 ac_save_CC=$CC
29406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29407 /* end confdefs.h.  */
29408 #include <stdarg.h>
29409 #include <stdio.h>
29410 struct stat;
29411 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29412 struct buf { int x; };
29413 FILE * (*rcsopen) (struct buf *, struct stat *, int);
29414 static char *e (p, i)
29415      char **p;
29416      int i;
29417 {
29418   return p[i];
29419 }
29420 static char *f (char * (*g) (char **, int), char **p, ...)
29421 {
29422   char *s;
29423   va_list v;
29424   va_start (v,p);
29425   s = g (p, va_arg (v,int));
29426   va_end (v);
29427   return s;
29428 }
29429 
29430 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29431    function prototypes and stuff, but not '\xHH' hex character constants.
29432    These don't provoke an error unfortunately, instead are silently treated
29433    as 'x'.  The following induces an error, until -std is added to get
29434    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29435    array size at least.  It's necessary to write '\x00'==0 to get something
29436    that's true only with -std.  */
29437 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29438 
29439 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29440    inside strings and character constants.  */
29441 #define FOO(x) 'x'
29442 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29443 
29444 int test (int i, double x);
29445 struct s1 {int (*f) (int a);};
29446 struct s2 {int (*f) (double a);};
29447 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29448 int argc;
29449 char **argv;
29450 int
29451 main ()
29452 {
29453 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29454   ;
29455   return 0;
29456 }
29457 _ACEOF
29458 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29459         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29460 do
29461   CC="$ac_save_CC $ac_arg"
29462   if ac_fn_c_try_compile "$LINENO"; then :
29463   ac_cv_prog_cc_c89=$ac_arg
29464 fi
29465 rm -f core conftest.err conftest.$ac_objext
29466   test "x$ac_cv_prog_cc_c89" != "xno" && break
29467 done
29468 rm -f conftest.$ac_ext
29469 CC=$ac_save_CC
29470 
29471 fi
29472 # AC_CACHE_VAL
29473 case "x$ac_cv_prog_cc_c89" in
29474   x)
29475     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29476 $as_echo "none needed" >&6; } ;;
29477   xno)
29478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29479 $as_echo "unsupported" >&6; } ;;
29480   *)
29481     CC="$CC $ac_cv_prog_cc_c89"
29482     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29483 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29484 esac
29485 if test "x$ac_cv_prog_cc_c89" != xno; then :
29486 
29487 fi
29488 
29489 ac_ext=cpp
29490 ac_cpp='$CXXCPP $CPPFLAGS'
29491 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29492 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29493 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29494 
29495 
29496 
29497   COMPILER_NAME=C++
29498   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29499 
29500   if test "x$CXX" != x; then
29501     # User has supplied compiler name already, always let that override.
29502     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29503 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29504     if test "x`basename $CXX`" = "x$CXX"; then
29505       # A command without a complete path is provided, search $PATH.
29506 
29507       for ac_prog in $CXX
29508 do
29509   # Extract the first word of "$ac_prog", so it can be a program name with args.
29510 set dummy $ac_prog; ac_word=$2
29511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29512 $as_echo_n "checking for $ac_word... " >&6; }
29513 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29514   $as_echo_n "(cached) " >&6
29515 else
29516   case $POTENTIAL_CXX in
29517   [\\/]* | ?:[\\/]*)
29518   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29519   ;;
29520   *)
29521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29522 for as_dir in $PATH
29523 do
29524   IFS=$as_save_IFS
29525   test -z "$as_dir" && as_dir=.
29526     for ac_exec_ext in '' $ac_executable_extensions; do
29527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29528     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29530     break 2
29531   fi
29532 done
29533   done
29534 IFS=$as_save_IFS
29535 
29536   ;;
29537 esac
29538 fi
29539 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29540 if test -n "$POTENTIAL_CXX"; then
29541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29542 $as_echo "$POTENTIAL_CXX" >&6; }
29543 else
29544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29545 $as_echo "no" >&6; }
29546 fi
29547 
29548 
29549   test -n "$POTENTIAL_CXX" && break
29550 done
29551 
29552       if test "x$POTENTIAL_CXX" != x; then
29553         CXX=$POTENTIAL_CXX
29554       else
29555         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29556       fi
29557     else
29558       # Otherwise it might already be a complete path
29559       if test ! -x "$CXX"; then
29560         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29561       fi
29562     fi
29563   else
29564     # No user supplied value. Locate compiler ourselves.
29565 
29566     # If we are cross compiling, assume cross compilation tools follows the
29567     # cross compilation standard where they are prefixed with the autoconf
29568     # standard name for the target. For example the binary
29569     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29570     # If we are not cross compiling, then the default compiler name will be
29571     # used.
29572 
29573     CXX=
29574     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29575     # before checking the rest of the PATH.
29576     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29577     # step, this should not be necessary.
29578     if test -n "$TOOLCHAIN_PATH"; then
29579       PATH_save="$PATH"
29580       PATH="$TOOLCHAIN_PATH"
29581       for ac_prog in $SEARCH_LIST
29582 do
29583   # Extract the first word of "$ac_prog", so it can be a program name with args.
29584 set dummy $ac_prog; ac_word=$2
29585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29586 $as_echo_n "checking for $ac_word... " >&6; }
29587 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29588   $as_echo_n "(cached) " >&6
29589 else
29590   case $TOOLCHAIN_PATH_CXX in
29591   [\\/]* | ?:[\\/]*)
29592   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29593   ;;
29594   *)
29595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29596 for as_dir in $PATH
29597 do
29598   IFS=$as_save_IFS
29599   test -z "$as_dir" && as_dir=.
29600     for ac_exec_ext in '' $ac_executable_extensions; do
29601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29602     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29604     break 2
29605   fi
29606 done
29607   done
29608 IFS=$as_save_IFS
29609 
29610   ;;
29611 esac
29612 fi
29613 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29614 if test -n "$TOOLCHAIN_PATH_CXX"; then
29615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29616 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29617 else
29618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29619 $as_echo "no" >&6; }
29620 fi
29621 
29622 
29623   test -n "$TOOLCHAIN_PATH_CXX" && break
29624 done
29625 
29626       CXX=$TOOLCHAIN_PATH_CXX
29627       PATH="$PATH_save"
29628     fi
29629 
29630     # AC_PATH_PROGS can't be run multiple times with the same variable,
29631     # so create a new name for this run.
29632     if test "x$CXX" = x; then
29633       for ac_prog in $SEARCH_LIST
29634 do
29635   # Extract the first word of "$ac_prog", so it can be a program name with args.
29636 set dummy $ac_prog; ac_word=$2
29637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29638 $as_echo_n "checking for $ac_word... " >&6; }
29639 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29640   $as_echo_n "(cached) " >&6
29641 else
29642   case $POTENTIAL_CXX in
29643   [\\/]* | ?:[\\/]*)
29644   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29645   ;;
29646   *)
29647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29648 for as_dir in $PATH
29649 do
29650   IFS=$as_save_IFS
29651   test -z "$as_dir" && as_dir=.
29652     for ac_exec_ext in '' $ac_executable_extensions; do
29653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29654     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29656     break 2
29657   fi
29658 done
29659   done
29660 IFS=$as_save_IFS
29661 
29662   ;;
29663 esac
29664 fi
29665 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29666 if test -n "$POTENTIAL_CXX"; then
29667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29668 $as_echo "$POTENTIAL_CXX" >&6; }
29669 else
29670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29671 $as_echo "no" >&6; }
29672 fi
29673 
29674 
29675   test -n "$POTENTIAL_CXX" && break
29676 done
29677 
29678       CXX=$POTENTIAL_CXX
29679     fi
29680 
29681     if test "x$CXX" = x; then
29682 
29683   # Print a helpful message on how to acquire the necessary build dependency.
29684   # devkit is the help tag: freetype, cups, pulse, alsa etc
29685   MISSING_DEPENDENCY=devkit
29686 
29687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29688     cygwin_help $MISSING_DEPENDENCY
29689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29690     msys_help $MISSING_DEPENDENCY
29691   else
29692     PKGHANDLER_COMMAND=
29693 
29694     case $PKGHANDLER in
29695       apt-get)
29696         apt_help     $MISSING_DEPENDENCY ;;
29697       yum)
29698         yum_help     $MISSING_DEPENDENCY ;;
29699       port)
29700         port_help    $MISSING_DEPENDENCY ;;
29701       pkgutil)
29702         pkgutil_help $MISSING_DEPENDENCY ;;
29703       pkgadd)
29704         pkgadd_help  $MISSING_DEPENDENCY ;;
29705     esac
29706 
29707     if test "x$PKGHANDLER_COMMAND" != x; then
29708       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29709     fi
29710   fi
29711 
29712       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29713     fi
29714   fi
29715 
29716   # Now we have a compiler binary in CXX. Make sure it's okay.
29717 
29718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29719 
29720   # First separate the path from the arguments. This will split at the first
29721   # space.
29722   complete="$CXX"
29723   path="${complete%% *}"
29724   tmp="$complete EOL"
29725   arguments="${tmp#* }"
29726 
29727   # Input might be given as Windows format, start by converting to
29728   # unix format.
29729   new_path=`$CYGPATH -u "$path"`
29730 
29731   # Now try to locate executable using which
29732   new_path=`$WHICH "$new_path" 2> /dev/null`
29733   # bat and cmd files are not always considered executable in cygwin causing which
29734   # to not find them
29735   if test "x$new_path" = x \
29736       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29737       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29738     new_path=`$CYGPATH -u "$path"`
29739   fi
29740   if test "x$new_path" = x; then
29741     # Oops. Which didn't find the executable.
29742     # The splitting of arguments from the executable at a space might have been incorrect,
29743     # since paths with space are more likely in Windows. Give it another try with the whole
29744     # argument.
29745     path="$complete"
29746     arguments="EOL"
29747     new_path=`$CYGPATH -u "$path"`
29748     new_path=`$WHICH "$new_path" 2> /dev/null`
29749     # bat and cmd files are not always considered executable in cygwin causing which
29750     # to not find them
29751     if test "x$new_path" = x \
29752         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29753         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29754       new_path=`$CYGPATH -u "$path"`
29755     fi
29756     if test "x$new_path" = x; then
29757       # It's still not found. Now this is an unrecoverable error.
29758       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29759 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29760       has_space=`$ECHO "$complete" | $GREP " "`
29761       if test "x$has_space" != x; then
29762         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29763 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29764       fi
29765       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29766     fi
29767   fi
29768 
29769   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29770   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29771   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29772   # "foo.exe" is OK but "foo" is an error.
29773   #
29774   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29775   # It is also a way to make sure we got the proper file name for the real test later on.
29776   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29777   if test "x$test_shortpath" = x; then
29778     # Short path failed, file does not exist as specified.
29779     # Try adding .exe or .cmd
29780     if test -f "${new_path}.exe"; then
29781       input_to_shortpath="${new_path}.exe"
29782     elif test -f "${new_path}.cmd"; then
29783       input_to_shortpath="${new_path}.cmd"
29784     else
29785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29786 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29787       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29788 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29789       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29790     fi
29791   else
29792     input_to_shortpath="$new_path"
29793   fi
29794 
29795   # Call helper function which possibly converts this using DOS-style short mode.
29796   # If so, the updated path is stored in $new_path.
29797   new_path="$input_to_shortpath"
29798 
29799   input_path="$input_to_shortpath"
29800   # Check if we need to convert this using DOS-style short mode. If the path
29801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29802   # take no chances and rewrite it.
29803   # Note: m4 eats our [], so we need to use [ and ] instead.
29804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29805   if test "x$has_forbidden_chars" != x; then
29806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29810       # Going to short mode and back again did indeed matter. Since short mode is
29811       # case insensitive, let's make it lowercase to improve readability.
29812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29813       # Now convert it back to Unix-stile (cygpath)
29814       input_path=`$CYGPATH -u "$shortmode_path"`
29815       new_path="$input_path"
29816     fi
29817   fi
29818 
29819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29820   if test "x$test_cygdrive_prefix" = x; then
29821     # As a simple fix, exclude /usr/bin since it's not a real path.
29822     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29824       # a path prefixed by /cygdrive for fixpath to work.
29825       new_path="$CYGWIN_ROOT_PATH$input_path"
29826     fi
29827   fi
29828 
29829   # remove trailing .exe if any
29830   new_path="${new_path/%.exe/}"
29831 
29832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29833 
29834   # First separate the path from the arguments. This will split at the first
29835   # space.
29836   complete="$CXX"
29837   path="${complete%% *}"
29838   tmp="$complete EOL"
29839   arguments="${tmp#* }"
29840 
29841   # Input might be given as Windows format, start by converting to
29842   # unix format.
29843   new_path="$path"
29844 
29845   windows_path="$new_path"
29846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29847     unix_path=`$CYGPATH -u "$windows_path"`
29848     new_path="$unix_path"
29849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29851     new_path="$unix_path"
29852   fi
29853 
29854 
29855   # Now try to locate executable using which
29856   new_path=`$WHICH "$new_path" 2> /dev/null`
29857 
29858   if test "x$new_path" = x; then
29859     # Oops. Which didn't find the executable.
29860     # The splitting of arguments from the executable at a space might have been incorrect,
29861     # since paths with space are more likely in Windows. Give it another try with the whole
29862     # argument.
29863     path="$complete"
29864     arguments="EOL"
29865     new_path="$path"
29866 
29867   windows_path="$new_path"
29868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29869     unix_path=`$CYGPATH -u "$windows_path"`
29870     new_path="$unix_path"
29871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29873     new_path="$unix_path"
29874   fi
29875 
29876 
29877     new_path=`$WHICH "$new_path" 2> /dev/null`
29878     # bat and cmd files are not always considered executable in MSYS causing which
29879     # to not find them
29880     if test "x$new_path" = x \
29881         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29882         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29883       new_path="$path"
29884 
29885   windows_path="$new_path"
29886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29887     unix_path=`$CYGPATH -u "$windows_path"`
29888     new_path="$unix_path"
29889   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29890     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29891     new_path="$unix_path"
29892   fi
29893 
29894     fi
29895 
29896     if test "x$new_path" = x; then
29897       # It's still not found. Now this is an unrecoverable error.
29898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29899 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29900       has_space=`$ECHO "$complete" | $GREP " "`
29901       if test "x$has_space" != x; then
29902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29904       fi
29905       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29906     fi
29907   fi
29908 
29909   # Now new_path has a complete unix path to the binary
29910   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29911     # Keep paths in /bin as-is, but remove trailing .exe if any
29912     new_path="${new_path/%.exe/}"
29913     # Do not save /bin paths to all_fixpath_prefixes!
29914   else
29915     # Not in mixed or Windows style, start by that.
29916     new_path=`cmd //c echo $new_path`
29917 
29918   input_path="$new_path"
29919   # Check if we need to convert this using DOS-style short mode. If the path
29920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29921   # take no chances and rewrite it.
29922   # Note: m4 eats our [], so we need to use [ and ] instead.
29923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29924   if test "x$has_forbidden_chars" != x; then
29925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29927   fi
29928 
29929     # Output is in $new_path
29930 
29931   windows_path="$new_path"
29932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29933     unix_path=`$CYGPATH -u "$windows_path"`
29934     new_path="$unix_path"
29935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29937     new_path="$unix_path"
29938   fi
29939 
29940     # remove trailing .exe if any
29941     new_path="${new_path/%.exe/}"
29942 
29943     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29944     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29945   fi
29946 
29947   else
29948     # We're on a unix platform. Hooray! :)
29949     # First separate the path from the arguments. This will split at the first
29950     # space.
29951     complete="$CXX"
29952     path="${complete%% *}"
29953     tmp="$complete EOL"
29954     arguments="${tmp#* }"
29955 
29956     # Cannot rely on the command "which" here since it doesn't always work.
29957     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29958     if test -z "$is_absolute_path"; then
29959       # Path to executable is not absolute. Find it.
29960       IFS_save="$IFS"
29961       IFS=:
29962       for p in $PATH; do
29963         if test -f "$p/$path" && test -x "$p/$path"; then
29964           new_path="$p/$path"
29965           break
29966         fi
29967       done
29968       IFS="$IFS_save"
29969     else
29970       # This is an absolute path, we can use it without further modifications.
29971       new_path="$path"
29972     fi
29973 
29974     if test "x$new_path" = x; then
29975       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29976 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29977       has_space=`$ECHO "$complete" | $GREP " "`
29978       if test "x$has_space" != x; then
29979         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29980 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29981       fi
29982       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29983     fi
29984   fi
29985 
29986   # Now join together the path and the arguments once again
29987   if test "x$arguments" != xEOL; then
29988     new_complete="$new_path ${arguments% *}"
29989   else
29990     new_complete="$new_path"
29991   fi
29992 
29993   if test "x$complete" != "x$new_complete"; then
29994     CXX="$new_complete"
29995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29996 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29997   fi
29998 
29999   TEST_COMPILER="$CXX"
30000   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30001   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30002   if test "x$OPENJDK_BUILD_OS" != xaix; then
30003     # FIXME: This test should not be needed anymore; we don't do that for any platform.
30004     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30005 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30006 
30007   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30008     # Follow a chain of symbolic links. Use readlink
30009     # where it exists, else fall back to horribly
30010     # complicated shell code.
30011     if test "x$READLINK_TESTED" != yes; then
30012       # On MacOSX there is a readlink tool with a different
30013       # purpose than the GNU readlink tool. Check the found readlink.
30014       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30015       if test "x$ISGNU" = x; then
30016         # A readlink that we do not know how to use.
30017         # Are there other non-GNU readlinks out there?
30018         READLINK_TESTED=yes
30019         READLINK=
30020       fi
30021     fi
30022 
30023     if test "x$READLINK" != x; then
30024       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30025     else
30026       # Save the current directory for restoring afterwards
30027       STARTDIR=$PWD
30028       COUNTER=0
30029       sym_link_dir=`$DIRNAME $TEST_COMPILER`
30030       sym_link_file=`$BASENAME $TEST_COMPILER`
30031       cd $sym_link_dir
30032       # Use -P flag to resolve symlinks in directories.
30033       cd `$THEPWDCMD -P`
30034       sym_link_dir=`$THEPWDCMD -P`
30035       # Resolve file symlinks
30036       while test $COUNTER -lt 20; do
30037         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30038         if test "x$ISLINK" == x; then
30039           # This is not a symbolic link! We are done!
30040           break
30041         fi
30042         # Again resolve directory symlinks since the target of the just found
30043         # link could be in a different directory
30044         cd `$DIRNAME $ISLINK`
30045         sym_link_dir=`$THEPWDCMD -P`
30046         sym_link_file=`$BASENAME $ISLINK`
30047         let COUNTER=COUNTER+1
30048       done
30049       cd $STARTDIR
30050       TEST_COMPILER=$sym_link_dir/$sym_link_file
30051     fi
30052   fi
30053 
30054     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30055 $as_echo "$TEST_COMPILER" >&6; }
30056   fi
30057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30058 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
30059 
30060   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30061   if test "x$COMPILER_BASENAME" = "xccache"; then
30062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30063 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30064     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30065     # We want to control ccache invocation ourselves, so ignore this cc and try
30066     # searching again.
30067 
30068     # Remove the path to the fake ccache cc from the PATH
30069     RETRY_COMPILER_SAVED_PATH="$PATH"
30070     COMPILER_DIRNAME=`$DIRNAME $CXX`
30071     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30072 
30073     # Try again looking for our compiler
30074     if test -n "$ac_tool_prefix"; then
30075   for ac_prog in $TOOLCHAIN_CXX_BINARY
30076   do
30077     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30078 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30080 $as_echo_n "checking for $ac_word... " >&6; }
30081 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30082   $as_echo_n "(cached) " >&6
30083 else
30084   if test -n "$PROPER_COMPILER_CXX"; then
30085   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30086 else
30087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30088 for as_dir in $PATH
30089 do
30090   IFS=$as_save_IFS
30091   test -z "$as_dir" && as_dir=.
30092     for ac_exec_ext in '' $ac_executable_extensions; do
30093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30094     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30096     break 2
30097   fi
30098 done
30099   done
30100 IFS=$as_save_IFS
30101 
30102 fi
30103 fi
30104 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30105 if test -n "$PROPER_COMPILER_CXX"; then
30106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30107 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30108 else
30109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30110 $as_echo "no" >&6; }
30111 fi
30112 
30113 
30114     test -n "$PROPER_COMPILER_CXX" && break
30115   done
30116 fi
30117 if test -z "$PROPER_COMPILER_CXX"; then
30118   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30119   for ac_prog in $TOOLCHAIN_CXX_BINARY
30120 do
30121   # Extract the first word of "$ac_prog", so it can be a program name with args.
30122 set dummy $ac_prog; ac_word=$2
30123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30124 $as_echo_n "checking for $ac_word... " >&6; }
30125 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30126   $as_echo_n "(cached) " >&6
30127 else
30128   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30129   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30130 else
30131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30132 for as_dir in $PATH
30133 do
30134   IFS=$as_save_IFS
30135   test -z "$as_dir" && as_dir=.
30136     for ac_exec_ext in '' $ac_executable_extensions; do
30137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30138     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30140     break 2
30141   fi
30142 done
30143   done
30144 IFS=$as_save_IFS
30145 
30146 fi
30147 fi
30148 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30149 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30151 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30152 else
30153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30154 $as_echo "no" >&6; }
30155 fi
30156 
30157 
30158   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30159 done
30160 
30161   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30162     PROPER_COMPILER_CXX=""
30163   else
30164     case $cross_compiling:$ac_tool_warned in
30165 yes:)
30166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30167 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30168 ac_tool_warned=yes ;;
30169 esac
30170     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30171   fi
30172 fi
30173 
30174 
30175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30176 
30177   # First separate the path from the arguments. This will split at the first
30178   # space.
30179   complete="$PROPER_COMPILER_CXX"
30180   path="${complete%% *}"
30181   tmp="$complete EOL"
30182   arguments="${tmp#* }"
30183 
30184   # Input might be given as Windows format, start by converting to
30185   # unix format.
30186   new_path=`$CYGPATH -u "$path"`
30187 
30188   # Now try to locate executable using which
30189   new_path=`$WHICH "$new_path" 2> /dev/null`
30190   # bat and cmd files are not always considered executable in cygwin causing which
30191   # to not find them
30192   if test "x$new_path" = x \
30193       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30194       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30195     new_path=`$CYGPATH -u "$path"`
30196   fi
30197   if test "x$new_path" = x; then
30198     # Oops. Which didn't find the executable.
30199     # The splitting of arguments from the executable at a space might have been incorrect,
30200     # since paths with space are more likely in Windows. Give it another try with the whole
30201     # argument.
30202     path="$complete"
30203     arguments="EOL"
30204     new_path=`$CYGPATH -u "$path"`
30205     new_path=`$WHICH "$new_path" 2> /dev/null`
30206     # bat and cmd files are not always considered executable in cygwin causing which
30207     # to not find them
30208     if test "x$new_path" = x \
30209         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30210         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30211       new_path=`$CYGPATH -u "$path"`
30212     fi
30213     if test "x$new_path" = x; then
30214       # It's still not found. Now this is an unrecoverable error.
30215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30216 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30217       has_space=`$ECHO "$complete" | $GREP " "`
30218       if test "x$has_space" != x; then
30219         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30220 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30221       fi
30222       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30223     fi
30224   fi
30225 
30226   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30227   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30228   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30229   # "foo.exe" is OK but "foo" is an error.
30230   #
30231   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30232   # It is also a way to make sure we got the proper file name for the real test later on.
30233   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30234   if test "x$test_shortpath" = x; then
30235     # Short path failed, file does not exist as specified.
30236     # Try adding .exe or .cmd
30237     if test -f "${new_path}.exe"; then
30238       input_to_shortpath="${new_path}.exe"
30239     elif test -f "${new_path}.cmd"; then
30240       input_to_shortpath="${new_path}.cmd"
30241     else
30242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30243 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30244       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30245 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30246       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30247     fi
30248   else
30249     input_to_shortpath="$new_path"
30250   fi
30251 
30252   # Call helper function which possibly converts this using DOS-style short mode.
30253   # If so, the updated path is stored in $new_path.
30254   new_path="$input_to_shortpath"
30255 
30256   input_path="$input_to_shortpath"
30257   # Check if we need to convert this using DOS-style short mode. If the path
30258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30259   # take no chances and rewrite it.
30260   # Note: m4 eats our [], so we need to use [ and ] instead.
30261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30262   if test "x$has_forbidden_chars" != x; then
30263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30264     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30265     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30266     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30267       # Going to short mode and back again did indeed matter. Since short mode is
30268       # case insensitive, let's make it lowercase to improve readability.
30269       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30270       # Now convert it back to Unix-stile (cygpath)
30271       input_path=`$CYGPATH -u "$shortmode_path"`
30272       new_path="$input_path"
30273     fi
30274   fi
30275 
30276   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30277   if test "x$test_cygdrive_prefix" = x; then
30278     # As a simple fix, exclude /usr/bin since it's not a real path.
30279     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30280       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30281       # a path prefixed by /cygdrive for fixpath to work.
30282       new_path="$CYGWIN_ROOT_PATH$input_path"
30283     fi
30284   fi
30285 
30286   # remove trailing .exe if any
30287   new_path="${new_path/%.exe/}"
30288 
30289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30290 
30291   # First separate the path from the arguments. This will split at the first
30292   # space.
30293   complete="$PROPER_COMPILER_CXX"
30294   path="${complete%% *}"
30295   tmp="$complete EOL"
30296   arguments="${tmp#* }"
30297 
30298   # Input might be given as Windows format, start by converting to
30299   # unix format.
30300   new_path="$path"
30301 
30302   windows_path="$new_path"
30303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30304     unix_path=`$CYGPATH -u "$windows_path"`
30305     new_path="$unix_path"
30306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30308     new_path="$unix_path"
30309   fi
30310 
30311 
30312   # Now try to locate executable using which
30313   new_path=`$WHICH "$new_path" 2> /dev/null`
30314 
30315   if test "x$new_path" = x; then
30316     # Oops. Which didn't find the executable.
30317     # The splitting of arguments from the executable at a space might have been incorrect,
30318     # since paths with space are more likely in Windows. Give it another try with the whole
30319     # argument.
30320     path="$complete"
30321     arguments="EOL"
30322     new_path="$path"
30323 
30324   windows_path="$new_path"
30325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30326     unix_path=`$CYGPATH -u "$windows_path"`
30327     new_path="$unix_path"
30328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30330     new_path="$unix_path"
30331   fi
30332 
30333 
30334     new_path=`$WHICH "$new_path" 2> /dev/null`
30335     # bat and cmd files are not always considered executable in MSYS causing which
30336     # to not find them
30337     if test "x$new_path" = x \
30338         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30339         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30340       new_path="$path"
30341 
30342   windows_path="$new_path"
30343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30344     unix_path=`$CYGPATH -u "$windows_path"`
30345     new_path="$unix_path"
30346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30348     new_path="$unix_path"
30349   fi
30350 
30351     fi
30352 
30353     if test "x$new_path" = x; then
30354       # It's still not found. Now this is an unrecoverable error.
30355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30356 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30357       has_space=`$ECHO "$complete" | $GREP " "`
30358       if test "x$has_space" != x; then
30359         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30360 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30361       fi
30362       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30363     fi
30364   fi
30365 
30366   # Now new_path has a complete unix path to the binary
30367   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30368     # Keep paths in /bin as-is, but remove trailing .exe if any
30369     new_path="${new_path/%.exe/}"
30370     # Do not save /bin paths to all_fixpath_prefixes!
30371   else
30372     # Not in mixed or Windows style, start by that.
30373     new_path=`cmd //c echo $new_path`
30374 
30375   input_path="$new_path"
30376   # Check if we need to convert this using DOS-style short mode. If the path
30377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30378   # take no chances and rewrite it.
30379   # Note: m4 eats our [], so we need to use [ and ] instead.
30380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30381   if test "x$has_forbidden_chars" != x; then
30382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30384   fi
30385 
30386     # Output is in $new_path
30387 
30388   windows_path="$new_path"
30389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30390     unix_path=`$CYGPATH -u "$windows_path"`
30391     new_path="$unix_path"
30392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30394     new_path="$unix_path"
30395   fi
30396 
30397     # remove trailing .exe if any
30398     new_path="${new_path/%.exe/}"
30399 
30400     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30401     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30402   fi
30403 
30404   else
30405     # We're on a unix platform. Hooray! :)
30406     # First separate the path from the arguments. This will split at the first
30407     # space.
30408     complete="$PROPER_COMPILER_CXX"
30409     path="${complete%% *}"
30410     tmp="$complete EOL"
30411     arguments="${tmp#* }"
30412 
30413     # Cannot rely on the command "which" here since it doesn't always work.
30414     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30415     if test -z "$is_absolute_path"; then
30416       # Path to executable is not absolute. Find it.
30417       IFS_save="$IFS"
30418       IFS=:
30419       for p in $PATH; do
30420         if test -f "$p/$path" && test -x "$p/$path"; then
30421           new_path="$p/$path"
30422           break
30423         fi
30424       done
30425       IFS="$IFS_save"
30426     else
30427       # This is an absolute path, we can use it without further modifications.
30428       new_path="$path"
30429     fi
30430 
30431     if test "x$new_path" = x; then
30432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30433 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30434       has_space=`$ECHO "$complete" | $GREP " "`
30435       if test "x$has_space" != x; then
30436         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30437 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30438       fi
30439       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30440     fi
30441   fi
30442 
30443   # Now join together the path and the arguments once again
30444   if test "x$arguments" != xEOL; then
30445     new_complete="$new_path ${arguments% *}"
30446   else
30447     new_complete="$new_path"
30448   fi
30449 
30450   if test "x$complete" != "x$new_complete"; then
30451     PROPER_COMPILER_CXX="$new_complete"
30452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30453 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30454   fi
30455 
30456     PATH="$RETRY_COMPILER_SAVED_PATH"
30457 
30458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30459 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30460 
30461   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30462     # Follow a chain of symbolic links. Use readlink
30463     # where it exists, else fall back to horribly
30464     # complicated shell code.
30465     if test "x$READLINK_TESTED" != yes; then
30466       # On MacOSX there is a readlink tool with a different
30467       # purpose than the GNU readlink tool. Check the found readlink.
30468       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30469       if test "x$ISGNU" = x; then
30470         # A readlink that we do not know how to use.
30471         # Are there other non-GNU readlinks out there?
30472         READLINK_TESTED=yes
30473         READLINK=
30474       fi
30475     fi
30476 
30477     if test "x$READLINK" != x; then
30478       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30479     else
30480       # Save the current directory for restoring afterwards
30481       STARTDIR=$PWD
30482       COUNTER=0
30483       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30484       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30485       cd $sym_link_dir
30486       # Use -P flag to resolve symlinks in directories.
30487       cd `$THEPWDCMD -P`
30488       sym_link_dir=`$THEPWDCMD -P`
30489       # Resolve file symlinks
30490       while test $COUNTER -lt 20; do
30491         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30492         if test "x$ISLINK" == x; then
30493           # This is not a symbolic link! We are done!
30494           break
30495         fi
30496         # Again resolve directory symlinks since the target of the just found
30497         # link could be in a different directory
30498         cd `$DIRNAME $ISLINK`
30499         sym_link_dir=`$THEPWDCMD -P`
30500         sym_link_file=`$BASENAME $ISLINK`
30501         let COUNTER=COUNTER+1
30502       done
30503       cd $STARTDIR
30504       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30505     fi
30506   fi
30507 
30508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30509 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30510     CXX="$PROPER_COMPILER_CXX"
30511   else
30512     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30513 $as_echo "no, keeping CXX" >&6; }
30514   fi
30515 
30516 
30517   COMPILER=$CXX
30518   COMPILER_NAME=$COMPILER_NAME
30519 
30520   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30521     # cc -V output typically looks like
30522     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30523     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30524     # Check that this is likely to be the Solaris Studio cc.
30525     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30526     if test $? -ne 0; then
30527       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30528       { $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
30529 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30530       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30531 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30532       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30533 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30534       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30535     fi
30536     # Remove usage instructions (if present), and
30537     # collapse compiler output into a single line
30538     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30539         $SED -e 's/ *[Uu]sage:.*//'`
30540     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30541         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30542   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30543     # xlc -qversion output typically looks like
30544     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30545     #     Version: 11.01.0000.0015
30546     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30547     # Check that this is likely to be the IBM XL C compiler.
30548     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30549     if test $? -ne 0; then
30550       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30551       { $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
30552 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30553       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30554 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30555       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30556 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30557       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30558     fi
30559     # Collapse compiler output into a single line
30560     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30561     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30562         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30563   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30564     # There is no specific version flag, but all output starts with a version string.
30565     # First line typically looks something like:
30566     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30567     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30568     # Check that this is likely to be Microsoft CL.EXE.
30569     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30570     if test $? -ne 0; then
30571       { $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
30572 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30573       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30574 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30575       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30576     fi
30577     # Collapse compiler output into a single line
30578     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30579     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30580         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30581   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30582     # gcc --version output typically looks like
30583     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30584     #     Copyright (C) 2013 Free Software Foundation, Inc.
30585     #     This is free software; see the source for copying conditions.  There is NO
30586     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30587     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30588     # Check that this is likely to be GCC.
30589     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30590     if test $? -ne 0; then
30591       { $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
30592 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30593       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30594 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30595       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30596     fi
30597     # Remove Copyright and legalese from version string, and
30598     # collapse into a single line
30599     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30600         $SED -e 's/ *Copyright .*//'`
30601     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30602         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30603   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30604     # clang --version output typically looks like
30605     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30606     #    clang version 3.3 (tags/RELEASE_33/final)
30607     # or
30608     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30609     #    Target: x86_64-pc-linux-gnu
30610     #    Thread model: posix
30611     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30612     # Check that this is likely to be clang
30613     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30614     if test $? -ne 0; then
30615       { $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
30616 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30617       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30618 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30619       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30620     fi
30621     # Collapse compiler output into a single line
30622     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30623     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30624         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30625   else
30626       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30627   fi
30628   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30629   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30630   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30631   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30632 
30633   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30634 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30635 
30636 
30637   # Now that we have resolved CXX ourself, let autoconf have its go at it
30638   ac_ext=cpp
30639 ac_cpp='$CXXCPP $CPPFLAGS'
30640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30641 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30643 if test -z "$CXX"; then
30644   if test -n "$CCC"; then
30645     CXX=$CCC
30646   else
30647     if test -n "$ac_tool_prefix"; then
30648   for ac_prog in $CXX
30649   do
30650     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30651 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30653 $as_echo_n "checking for $ac_word... " >&6; }
30654 if ${ac_cv_prog_CXX+:} false; then :
30655   $as_echo_n "(cached) " >&6
30656 else
30657   if test -n "$CXX"; then
30658   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30659 else
30660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30661 for as_dir in $PATH
30662 do
30663   IFS=$as_save_IFS
30664   test -z "$as_dir" && as_dir=.
30665     for ac_exec_ext in '' $ac_executable_extensions; do
30666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30667     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30669     break 2
30670   fi
30671 done
30672   done
30673 IFS=$as_save_IFS
30674 
30675 fi
30676 fi
30677 CXX=$ac_cv_prog_CXX
30678 if test -n "$CXX"; then
30679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30680 $as_echo "$CXX" >&6; }
30681 else
30682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30683 $as_echo "no" >&6; }
30684 fi
30685 
30686 
30687     test -n "$CXX" && break
30688   done
30689 fi
30690 if test -z "$CXX"; then
30691   ac_ct_CXX=$CXX
30692   for ac_prog in $CXX
30693 do
30694   # Extract the first word of "$ac_prog", so it can be a program name with args.
30695 set dummy $ac_prog; ac_word=$2
30696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30697 $as_echo_n "checking for $ac_word... " >&6; }
30698 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30699   $as_echo_n "(cached) " >&6
30700 else
30701   if test -n "$ac_ct_CXX"; then
30702   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30703 else
30704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30705 for as_dir in $PATH
30706 do
30707   IFS=$as_save_IFS
30708   test -z "$as_dir" && as_dir=.
30709     for ac_exec_ext in '' $ac_executable_extensions; do
30710   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30711     ac_cv_prog_ac_ct_CXX="$ac_prog"
30712     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30713     break 2
30714   fi
30715 done
30716   done
30717 IFS=$as_save_IFS
30718 
30719 fi
30720 fi
30721 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30722 if test -n "$ac_ct_CXX"; then
30723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30724 $as_echo "$ac_ct_CXX" >&6; }
30725 else
30726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30727 $as_echo "no" >&6; }
30728 fi
30729 
30730 
30731   test -n "$ac_ct_CXX" && break
30732 done
30733 
30734   if test "x$ac_ct_CXX" = x; then
30735     CXX="g++"
30736   else
30737     case $cross_compiling:$ac_tool_warned in
30738 yes:)
30739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30740 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30741 ac_tool_warned=yes ;;
30742 esac
30743     CXX=$ac_ct_CXX
30744   fi
30745 fi
30746 
30747   fi
30748 fi
30749 # Provide some information about the compiler.
30750 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30751 set X $ac_compile
30752 ac_compiler=$2
30753 for ac_option in --version -v -V -qversion; do
30754   { { ac_try="$ac_compiler $ac_option >&5"
30755 case "(($ac_try" in
30756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30757   *) ac_try_echo=$ac_try;;
30758 esac
30759 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30760 $as_echo "$ac_try_echo"; } >&5
30761   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30762   ac_status=$?
30763   if test -s conftest.err; then
30764     sed '10a\
30765 ... rest of stderr output deleted ...
30766          10q' conftest.err >conftest.er1
30767     cat conftest.er1 >&5
30768   fi
30769   rm -f conftest.er1 conftest.err
30770   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30771   test $ac_status = 0; }
30772 done
30773 
30774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30775 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30776 if ${ac_cv_cxx_compiler_gnu+:} false; then :
30777   $as_echo_n "(cached) " >&6
30778 else
30779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30780 /* end confdefs.h.  */
30781 
30782 int
30783 main ()
30784 {
30785 #ifndef __GNUC__
30786        choke me
30787 #endif
30788 
30789   ;
30790   return 0;
30791 }
30792 _ACEOF
30793 if ac_fn_cxx_try_compile "$LINENO"; then :
30794   ac_compiler_gnu=yes
30795 else
30796   ac_compiler_gnu=no
30797 fi
30798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30799 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30800 
30801 fi
30802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30803 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30804 if test $ac_compiler_gnu = yes; then
30805   GXX=yes
30806 else
30807   GXX=
30808 fi
30809 ac_test_CXXFLAGS=${CXXFLAGS+set}
30810 ac_save_CXXFLAGS=$CXXFLAGS
30811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30812 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
30813 if ${ac_cv_prog_cxx_g+:} false; then :
30814   $as_echo_n "(cached) " >&6
30815 else
30816   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30817    ac_cxx_werror_flag=yes
30818    ac_cv_prog_cxx_g=no
30819    CXXFLAGS="-g"
30820    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30821 /* end confdefs.h.  */
30822 
30823 int
30824 main ()
30825 {
30826 
30827   ;
30828   return 0;
30829 }
30830 _ACEOF
30831 if ac_fn_cxx_try_compile "$LINENO"; then :
30832   ac_cv_prog_cxx_g=yes
30833 else
30834   CXXFLAGS=""
30835       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30836 /* end confdefs.h.  */
30837 
30838 int
30839 main ()
30840 {
30841 
30842   ;
30843   return 0;
30844 }
30845 _ACEOF
30846 if ac_fn_cxx_try_compile "$LINENO"; then :
30847 
30848 else
30849   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30850          CXXFLAGS="-g"
30851          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30852 /* end confdefs.h.  */
30853 
30854 int
30855 main ()
30856 {
30857 
30858   ;
30859   return 0;
30860 }
30861 _ACEOF
30862 if ac_fn_cxx_try_compile "$LINENO"; then :
30863   ac_cv_prog_cxx_g=yes
30864 fi
30865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30866 fi
30867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30868 fi
30869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30870    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30871 fi
30872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30873 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30874 if test "$ac_test_CXXFLAGS" = set; then
30875   CXXFLAGS=$ac_save_CXXFLAGS
30876 elif test $ac_cv_prog_cxx_g = yes; then
30877   if test "$GXX" = yes; then
30878     CXXFLAGS="-g -O2"
30879   else
30880     CXXFLAGS="-g"
30881   fi
30882 else
30883   if test "$GXX" = yes; then
30884     CXXFLAGS="-O2"
30885   else
30886     CXXFLAGS=
30887   fi
30888 fi
30889 ac_ext=cpp
30890 ac_cpp='$CXXCPP $CPPFLAGS'
30891 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30892 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30893 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30894 
30895 
30896   #
30897   # Setup the preprocessor (CPP and CXXCPP)
30898   #
30899   ac_ext=c
30900 ac_cpp='$CPP $CPPFLAGS'
30901 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30902 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30903 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30905 $as_echo_n "checking how to run the C preprocessor... " >&6; }
30906 # On Suns, sometimes $CPP names a directory.
30907 if test -n "$CPP" && test -d "$CPP"; then
30908   CPP=
30909 fi
30910 if test -z "$CPP"; then
30911   if ${ac_cv_prog_CPP+:} false; then :
30912   $as_echo_n "(cached) " >&6
30913 else
30914       # Double quotes because CPP needs to be expanded
30915     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30916     do
30917       ac_preproc_ok=false
30918 for ac_c_preproc_warn_flag in '' yes
30919 do
30920   # Use a header file that comes with gcc, so configuring glibc
30921   # with a fresh cross-compiler works.
30922   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30923   # <limits.h> exists even on freestanding compilers.
30924   # On the NeXT, cc -E runs the code through the compiler's parser,
30925   # not just through cpp. "Syntax error" is here to catch this case.
30926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30927 /* end confdefs.h.  */
30928 #ifdef __STDC__
30929 # include <limits.h>
30930 #else
30931 # include <assert.h>
30932 #endif
30933                      Syntax error
30934 _ACEOF
30935 if ac_fn_c_try_cpp "$LINENO"; then :
30936 
30937 else
30938   # Broken: fails on valid input.
30939 continue
30940 fi
30941 rm -f conftest.err conftest.i conftest.$ac_ext
30942 
30943   # OK, works on sane cases.  Now check whether nonexistent headers
30944   # can be detected and how.
30945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30946 /* end confdefs.h.  */
30947 #include <ac_nonexistent.h>
30948 _ACEOF
30949 if ac_fn_c_try_cpp "$LINENO"; then :
30950   # Broken: success on invalid input.
30951 continue
30952 else
30953   # Passes both tests.
30954 ac_preproc_ok=:
30955 break
30956 fi
30957 rm -f conftest.err conftest.i conftest.$ac_ext
30958 
30959 done
30960 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30961 rm -f conftest.i conftest.err conftest.$ac_ext
30962 if $ac_preproc_ok; then :
30963   break
30964 fi
30965 
30966     done
30967     ac_cv_prog_CPP=$CPP
30968 
30969 fi
30970   CPP=$ac_cv_prog_CPP
30971 else
30972   ac_cv_prog_CPP=$CPP
30973 fi
30974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30975 $as_echo "$CPP" >&6; }
30976 ac_preproc_ok=false
30977 for ac_c_preproc_warn_flag in '' yes
30978 do
30979   # Use a header file that comes with gcc, so configuring glibc
30980   # with a fresh cross-compiler works.
30981   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30982   # <limits.h> exists even on freestanding compilers.
30983   # On the NeXT, cc -E runs the code through the compiler's parser,
30984   # not just through cpp. "Syntax error" is here to catch this case.
30985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30986 /* end confdefs.h.  */
30987 #ifdef __STDC__
30988 # include <limits.h>
30989 #else
30990 # include <assert.h>
30991 #endif
30992                      Syntax error
30993 _ACEOF
30994 if ac_fn_c_try_cpp "$LINENO"; then :
30995 
30996 else
30997   # Broken: fails on valid input.
30998 continue
30999 fi
31000 rm -f conftest.err conftest.i conftest.$ac_ext
31001 
31002   # OK, works on sane cases.  Now check whether nonexistent headers
31003   # can be detected and how.
31004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31005 /* end confdefs.h.  */
31006 #include <ac_nonexistent.h>
31007 _ACEOF
31008 if ac_fn_c_try_cpp "$LINENO"; then :
31009   # Broken: success on invalid input.
31010 continue
31011 else
31012   # Passes both tests.
31013 ac_preproc_ok=:
31014 break
31015 fi
31016 rm -f conftest.err conftest.i conftest.$ac_ext
31017 
31018 done
31019 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31020 rm -f conftest.i conftest.err conftest.$ac_ext
31021 if $ac_preproc_ok; then :
31022 
31023 else
31024   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31026 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31027 See \`config.log' for more details" "$LINENO" 5; }
31028 fi
31029 
31030 ac_ext=cpp
31031 ac_cpp='$CXXCPP $CPPFLAGS'
31032 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31033 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31034 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31035 
31036 
31037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31038 
31039   # First separate the path from the arguments. This will split at the first
31040   # space.
31041   complete="$CPP"
31042   path="${complete%% *}"
31043   tmp="$complete EOL"
31044   arguments="${tmp#* }"
31045 
31046   # Input might be given as Windows format, start by converting to
31047   # unix format.
31048   new_path=`$CYGPATH -u "$path"`
31049 
31050   # Now try to locate executable using which
31051   new_path=`$WHICH "$new_path" 2> /dev/null`
31052   # bat and cmd files are not always considered executable in cygwin causing which
31053   # to not find them
31054   if test "x$new_path" = x \
31055       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31056       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31057     new_path=`$CYGPATH -u "$path"`
31058   fi
31059   if test "x$new_path" = x; then
31060     # Oops. Which didn't find the executable.
31061     # The splitting of arguments from the executable at a space might have been incorrect,
31062     # since paths with space are more likely in Windows. Give it another try with the whole
31063     # argument.
31064     path="$complete"
31065     arguments="EOL"
31066     new_path=`$CYGPATH -u "$path"`
31067     new_path=`$WHICH "$new_path" 2> /dev/null`
31068     # bat and cmd files are not always considered executable in cygwin causing which
31069     # to not find them
31070     if test "x$new_path" = x \
31071         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31072         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31073       new_path=`$CYGPATH -u "$path"`
31074     fi
31075     if test "x$new_path" = x; then
31076       # It's still not found. Now this is an unrecoverable error.
31077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31078 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31079       has_space=`$ECHO "$complete" | $GREP " "`
31080       if test "x$has_space" != x; then
31081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31083       fi
31084       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31085     fi
31086   fi
31087 
31088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31091   # "foo.exe" is OK but "foo" is an error.
31092   #
31093   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31094   # It is also a way to make sure we got the proper file name for the real test later on.
31095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31096   if test "x$test_shortpath" = x; then
31097     # Short path failed, file does not exist as specified.
31098     # Try adding .exe or .cmd
31099     if test -f "${new_path}.exe"; then
31100       input_to_shortpath="${new_path}.exe"
31101     elif test -f "${new_path}.cmd"; then
31102       input_to_shortpath="${new_path}.cmd"
31103     else
31104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31105 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31106       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31107 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31108       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31109     fi
31110   else
31111     input_to_shortpath="$new_path"
31112   fi
31113 
31114   # Call helper function which possibly converts this using DOS-style short mode.
31115   # If so, the updated path is stored in $new_path.
31116   new_path="$input_to_shortpath"
31117 
31118   input_path="$input_to_shortpath"
31119   # Check if we need to convert this using DOS-style short mode. If the path
31120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31121   # take no chances and rewrite it.
31122   # Note: m4 eats our [], so we need to use [ and ] instead.
31123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31124   if test "x$has_forbidden_chars" != x; then
31125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31126     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31127     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31128     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31129       # Going to short mode and back again did indeed matter. Since short mode is
31130       # case insensitive, let's make it lowercase to improve readability.
31131       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31132       # Now convert it back to Unix-stile (cygpath)
31133       input_path=`$CYGPATH -u "$shortmode_path"`
31134       new_path="$input_path"
31135     fi
31136   fi
31137 
31138   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31139   if test "x$test_cygdrive_prefix" = x; then
31140     # As a simple fix, exclude /usr/bin since it's not a real path.
31141     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31142       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31143       # a path prefixed by /cygdrive for fixpath to work.
31144       new_path="$CYGWIN_ROOT_PATH$input_path"
31145     fi
31146   fi
31147 
31148   # remove trailing .exe if any
31149   new_path="${new_path/%.exe/}"
31150 
31151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31152 
31153   # First separate the path from the arguments. This will split at the first
31154   # space.
31155   complete="$CPP"
31156   path="${complete%% *}"
31157   tmp="$complete EOL"
31158   arguments="${tmp#* }"
31159 
31160   # Input might be given as Windows format, start by converting to
31161   # unix format.
31162   new_path="$path"
31163 
31164   windows_path="$new_path"
31165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31166     unix_path=`$CYGPATH -u "$windows_path"`
31167     new_path="$unix_path"
31168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31170     new_path="$unix_path"
31171   fi
31172 
31173 
31174   # Now try to locate executable using which
31175   new_path=`$WHICH "$new_path" 2> /dev/null`
31176 
31177   if test "x$new_path" = x; then
31178     # Oops. Which didn't find the executable.
31179     # The splitting of arguments from the executable at a space might have been incorrect,
31180     # since paths with space are more likely in Windows. Give it another try with the whole
31181     # argument.
31182     path="$complete"
31183     arguments="EOL"
31184     new_path="$path"
31185 
31186   windows_path="$new_path"
31187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31188     unix_path=`$CYGPATH -u "$windows_path"`
31189     new_path="$unix_path"
31190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31192     new_path="$unix_path"
31193   fi
31194 
31195 
31196     new_path=`$WHICH "$new_path" 2> /dev/null`
31197     # bat and cmd files are not always considered executable in MSYS causing which
31198     # to not find them
31199     if test "x$new_path" = x \
31200         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31201         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31202       new_path="$path"
31203 
31204   windows_path="$new_path"
31205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31206     unix_path=`$CYGPATH -u "$windows_path"`
31207     new_path="$unix_path"
31208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31210     new_path="$unix_path"
31211   fi
31212 
31213     fi
31214 
31215     if test "x$new_path" = x; then
31216       # It's still not found. Now this is an unrecoverable error.
31217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31218 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31219       has_space=`$ECHO "$complete" | $GREP " "`
31220       if test "x$has_space" != x; then
31221         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31222 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31223       fi
31224       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31225     fi
31226   fi
31227 
31228   # Now new_path has a complete unix path to the binary
31229   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31230     # Keep paths in /bin as-is, but remove trailing .exe if any
31231     new_path="${new_path/%.exe/}"
31232     # Do not save /bin paths to all_fixpath_prefixes!
31233   else
31234     # Not in mixed or Windows style, start by that.
31235     new_path=`cmd //c echo $new_path`
31236 
31237   input_path="$new_path"
31238   # Check if we need to convert this using DOS-style short mode. If the path
31239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31240   # take no chances and rewrite it.
31241   # Note: m4 eats our [], so we need to use [ and ] instead.
31242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31243   if test "x$has_forbidden_chars" != x; then
31244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31245     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31246   fi
31247 
31248     # Output is in $new_path
31249 
31250   windows_path="$new_path"
31251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31252     unix_path=`$CYGPATH -u "$windows_path"`
31253     new_path="$unix_path"
31254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31255     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31256     new_path="$unix_path"
31257   fi
31258 
31259     # remove trailing .exe if any
31260     new_path="${new_path/%.exe/}"
31261 
31262     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31263     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31264   fi
31265 
31266   else
31267     # We're on a unix platform. Hooray! :)
31268     # First separate the path from the arguments. This will split at the first
31269     # space.
31270     complete="$CPP"
31271     path="${complete%% *}"
31272     tmp="$complete EOL"
31273     arguments="${tmp#* }"
31274 
31275     # Cannot rely on the command "which" here since it doesn't always work.
31276     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31277     if test -z "$is_absolute_path"; then
31278       # Path to executable is not absolute. Find it.
31279       IFS_save="$IFS"
31280       IFS=:
31281       for p in $PATH; do
31282         if test -f "$p/$path" && test -x "$p/$path"; then
31283           new_path="$p/$path"
31284           break
31285         fi
31286       done
31287       IFS="$IFS_save"
31288     else
31289       # This is an absolute path, we can use it without further modifications.
31290       new_path="$path"
31291     fi
31292 
31293     if test "x$new_path" = x; then
31294       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31295 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31296       has_space=`$ECHO "$complete" | $GREP " "`
31297       if test "x$has_space" != x; then
31298         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31299 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31300       fi
31301       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31302     fi
31303   fi
31304 
31305   # Now join together the path and the arguments once again
31306   if test "x$arguments" != xEOL; then
31307     new_complete="$new_path ${arguments% *}"
31308   else
31309     new_complete="$new_path"
31310   fi
31311 
31312   if test "x$complete" != "x$new_complete"; then
31313     CPP="$new_complete"
31314     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31315 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31316   fi
31317 
31318   ac_ext=cpp
31319 ac_cpp='$CXXCPP $CPPFLAGS'
31320 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31321 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31322 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31324 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31325 if test -z "$CXXCPP"; then
31326   if ${ac_cv_prog_CXXCPP+:} false; then :
31327   $as_echo_n "(cached) " >&6
31328 else
31329       # Double quotes because CXXCPP needs to be expanded
31330     for CXXCPP in "$CXX -E" "/lib/cpp"
31331     do
31332       ac_preproc_ok=false
31333 for ac_cxx_preproc_warn_flag in '' yes
31334 do
31335   # Use a header file that comes with gcc, so configuring glibc
31336   # with a fresh cross-compiler works.
31337   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31338   # <limits.h> exists even on freestanding compilers.
31339   # On the NeXT, cc -E runs the code through the compiler's parser,
31340   # not just through cpp. "Syntax error" is here to catch this case.
31341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31342 /* end confdefs.h.  */
31343 #ifdef __STDC__
31344 # include <limits.h>
31345 #else
31346 # include <assert.h>
31347 #endif
31348                      Syntax error
31349 _ACEOF
31350 if ac_fn_cxx_try_cpp "$LINENO"; then :
31351 
31352 else
31353   # Broken: fails on valid input.
31354 continue
31355 fi
31356 rm -f conftest.err conftest.i conftest.$ac_ext
31357 
31358   # OK, works on sane cases.  Now check whether nonexistent headers
31359   # can be detected and how.
31360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31361 /* end confdefs.h.  */
31362 #include <ac_nonexistent.h>
31363 _ACEOF
31364 if ac_fn_cxx_try_cpp "$LINENO"; then :
31365   # Broken: success on invalid input.
31366 continue
31367 else
31368   # Passes both tests.
31369 ac_preproc_ok=:
31370 break
31371 fi
31372 rm -f conftest.err conftest.i conftest.$ac_ext
31373 
31374 done
31375 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31376 rm -f conftest.i conftest.err conftest.$ac_ext
31377 if $ac_preproc_ok; then :
31378   break
31379 fi
31380 
31381     done
31382     ac_cv_prog_CXXCPP=$CXXCPP
31383 
31384 fi
31385   CXXCPP=$ac_cv_prog_CXXCPP
31386 else
31387   ac_cv_prog_CXXCPP=$CXXCPP
31388 fi
31389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31390 $as_echo "$CXXCPP" >&6; }
31391 ac_preproc_ok=false
31392 for ac_cxx_preproc_warn_flag in '' yes
31393 do
31394   # Use a header file that comes with gcc, so configuring glibc
31395   # with a fresh cross-compiler works.
31396   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31397   # <limits.h> exists even on freestanding compilers.
31398   # On the NeXT, cc -E runs the code through the compiler's parser,
31399   # not just through cpp. "Syntax error" is here to catch this case.
31400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31401 /* end confdefs.h.  */
31402 #ifdef __STDC__
31403 # include <limits.h>
31404 #else
31405 # include <assert.h>
31406 #endif
31407                      Syntax error
31408 _ACEOF
31409 if ac_fn_cxx_try_cpp "$LINENO"; then :
31410 
31411 else
31412   # Broken: fails on valid input.
31413 continue
31414 fi
31415 rm -f conftest.err conftest.i conftest.$ac_ext
31416 
31417   # OK, works on sane cases.  Now check whether nonexistent headers
31418   # can be detected and how.
31419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31420 /* end confdefs.h.  */
31421 #include <ac_nonexistent.h>
31422 _ACEOF
31423 if ac_fn_cxx_try_cpp "$LINENO"; then :
31424   # Broken: success on invalid input.
31425 continue
31426 else
31427   # Passes both tests.
31428 ac_preproc_ok=:
31429 break
31430 fi
31431 rm -f conftest.err conftest.i conftest.$ac_ext
31432 
31433 done
31434 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31435 rm -f conftest.i conftest.err conftest.$ac_ext
31436 if $ac_preproc_ok; then :
31437 
31438 else
31439   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31440 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31441 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31442 See \`config.log' for more details" "$LINENO" 5; }
31443 fi
31444 
31445 ac_ext=cpp
31446 ac_cpp='$CXXCPP $CPPFLAGS'
31447 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31448 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31449 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31450 
31451 
31452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31453 
31454   # First separate the path from the arguments. This will split at the first
31455   # space.
31456   complete="$CXXCPP"
31457   path="${complete%% *}"
31458   tmp="$complete EOL"
31459   arguments="${tmp#* }"
31460 
31461   # Input might be given as Windows format, start by converting to
31462   # unix format.
31463   new_path=`$CYGPATH -u "$path"`
31464 
31465   # Now try to locate executable using which
31466   new_path=`$WHICH "$new_path" 2> /dev/null`
31467   # bat and cmd files are not always considered executable in cygwin causing which
31468   # to not find them
31469   if test "x$new_path" = x \
31470       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31471       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31472     new_path=`$CYGPATH -u "$path"`
31473   fi
31474   if test "x$new_path" = x; then
31475     # Oops. Which didn't find the executable.
31476     # The splitting of arguments from the executable at a space might have been incorrect,
31477     # since paths with space are more likely in Windows. Give it another try with the whole
31478     # argument.
31479     path="$complete"
31480     arguments="EOL"
31481     new_path=`$CYGPATH -u "$path"`
31482     new_path=`$WHICH "$new_path" 2> /dev/null`
31483     # bat and cmd files are not always considered executable in cygwin causing which
31484     # to not find them
31485     if test "x$new_path" = x \
31486         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31487         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31488       new_path=`$CYGPATH -u "$path"`
31489     fi
31490     if test "x$new_path" = x; then
31491       # It's still not found. Now this is an unrecoverable error.
31492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31493 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31494       has_space=`$ECHO "$complete" | $GREP " "`
31495       if test "x$has_space" != x; then
31496         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31497 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31498       fi
31499       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31500     fi
31501   fi
31502 
31503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31506   # "foo.exe" is OK but "foo" is an error.
31507   #
31508   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31509   # It is also a way to make sure we got the proper file name for the real test later on.
31510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31511   if test "x$test_shortpath" = x; then
31512     # Short path failed, file does not exist as specified.
31513     # Try adding .exe or .cmd
31514     if test -f "${new_path}.exe"; then
31515       input_to_shortpath="${new_path}.exe"
31516     elif test -f "${new_path}.cmd"; then
31517       input_to_shortpath="${new_path}.cmd"
31518     else
31519       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31520 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31521       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31522 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31523       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31524     fi
31525   else
31526     input_to_shortpath="$new_path"
31527   fi
31528 
31529   # Call helper function which possibly converts this using DOS-style short mode.
31530   # If so, the updated path is stored in $new_path.
31531   new_path="$input_to_shortpath"
31532 
31533   input_path="$input_to_shortpath"
31534   # Check if we need to convert this using DOS-style short mode. If the path
31535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31536   # take no chances and rewrite it.
31537   # Note: m4 eats our [], so we need to use [ and ] instead.
31538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31539   if test "x$has_forbidden_chars" != x; then
31540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31541     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31542     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31543     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31544       # Going to short mode and back again did indeed matter. Since short mode is
31545       # case insensitive, let's make it lowercase to improve readability.
31546       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31547       # Now convert it back to Unix-stile (cygpath)
31548       input_path=`$CYGPATH -u "$shortmode_path"`
31549       new_path="$input_path"
31550     fi
31551   fi
31552 
31553   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31554   if test "x$test_cygdrive_prefix" = x; then
31555     # As a simple fix, exclude /usr/bin since it's not a real path.
31556     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31557       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31558       # a path prefixed by /cygdrive for fixpath to work.
31559       new_path="$CYGWIN_ROOT_PATH$input_path"
31560     fi
31561   fi
31562 
31563   # remove trailing .exe if any
31564   new_path="${new_path/%.exe/}"
31565 
31566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31567 
31568   # First separate the path from the arguments. This will split at the first
31569   # space.
31570   complete="$CXXCPP"
31571   path="${complete%% *}"
31572   tmp="$complete EOL"
31573   arguments="${tmp#* }"
31574 
31575   # Input might be given as Windows format, start by converting to
31576   # unix format.
31577   new_path="$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 
31589   # Now try to locate executable using which
31590   new_path=`$WHICH "$new_path" 2> /dev/null`
31591 
31592   if test "x$new_path" = x; then
31593     # Oops. Which didn't find the executable.
31594     # The splitting of arguments from the executable at a space might have been incorrect,
31595     # since paths with space are more likely in Windows. Give it another try with the whole
31596     # argument.
31597     path="$complete"
31598     arguments="EOL"
31599     new_path="$path"
31600 
31601   windows_path="$new_path"
31602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31603     unix_path=`$CYGPATH -u "$windows_path"`
31604     new_path="$unix_path"
31605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31607     new_path="$unix_path"
31608   fi
31609 
31610 
31611     new_path=`$WHICH "$new_path" 2> /dev/null`
31612     # bat and cmd files are not always considered executable in MSYS causing which
31613     # to not find them
31614     if test "x$new_path" = x \
31615         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31616         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31617       new_path="$path"
31618 
31619   windows_path="$new_path"
31620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31621     unix_path=`$CYGPATH -u "$windows_path"`
31622     new_path="$unix_path"
31623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31625     new_path="$unix_path"
31626   fi
31627 
31628     fi
31629 
31630     if test "x$new_path" = x; then
31631       # It's still not found. Now this is an unrecoverable error.
31632       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31633 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31634       has_space=`$ECHO "$complete" | $GREP " "`
31635       if test "x$has_space" != x; then
31636         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31637 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31638       fi
31639       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31640     fi
31641   fi
31642 
31643   # Now new_path has a complete unix path to the binary
31644   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31645     # Keep paths in /bin as-is, but remove trailing .exe if any
31646     new_path="${new_path/%.exe/}"
31647     # Do not save /bin paths to all_fixpath_prefixes!
31648   else
31649     # Not in mixed or Windows style, start by that.
31650     new_path=`cmd //c echo $new_path`
31651 
31652   input_path="$new_path"
31653   # Check if we need to convert this using DOS-style short mode. If the path
31654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31655   # take no chances and rewrite it.
31656   # Note: m4 eats our [], so we need to use [ and ] instead.
31657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31658   if test "x$has_forbidden_chars" != x; then
31659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31660     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31661   fi
31662 
31663     # Output is in $new_path
31664 
31665   windows_path="$new_path"
31666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31667     unix_path=`$CYGPATH -u "$windows_path"`
31668     new_path="$unix_path"
31669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31671     new_path="$unix_path"
31672   fi
31673 
31674     # remove trailing .exe if any
31675     new_path="${new_path/%.exe/}"
31676 
31677     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31678     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31679   fi
31680 
31681   else
31682     # We're on a unix platform. Hooray! :)
31683     # First separate the path from the arguments. This will split at the first
31684     # space.
31685     complete="$CXXCPP"
31686     path="${complete%% *}"
31687     tmp="$complete EOL"
31688     arguments="${tmp#* }"
31689 
31690     # Cannot rely on the command "which" here since it doesn't always work.
31691     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31692     if test -z "$is_absolute_path"; then
31693       # Path to executable is not absolute. Find it.
31694       IFS_save="$IFS"
31695       IFS=:
31696       for p in $PATH; do
31697         if test -f "$p/$path" && test -x "$p/$path"; then
31698           new_path="$p/$path"
31699           break
31700         fi
31701       done
31702       IFS="$IFS_save"
31703     else
31704       # This is an absolute path, we can use it without further modifications.
31705       new_path="$path"
31706     fi
31707 
31708     if test "x$new_path" = x; then
31709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31710 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31711       has_space=`$ECHO "$complete" | $GREP " "`
31712       if test "x$has_space" != x; then
31713         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31714 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31715       fi
31716       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31717     fi
31718   fi
31719 
31720   # Now join together the path and the arguments once again
31721   if test "x$arguments" != xEOL; then
31722     new_complete="$new_path ${arguments% *}"
31723   else
31724     new_complete="$new_path"
31725   fi
31726 
31727   if test "x$complete" != "x$new_complete"; then
31728     CXXCPP="$new_complete"
31729     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31730 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31731   fi
31732 
31733 
31734   #
31735   # Setup the linker (LD)
31736   #
31737   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31738     # In the Microsoft toolchain we have a separate LD command "link".
31739     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31740     # a cygwin program for something completely different.
31741     # Extract the first word of "link", so it can be a program name with args.
31742 set dummy link; 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_prog_LD+:} false; then :
31746   $as_echo_n "(cached) " >&6
31747 else
31748   if test -n "$LD"; then
31749   ac_cv_prog_LD="$LD" # Let the user override the test.
31750 else
31751   ac_prog_rejected=no
31752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31753 for as_dir in $PATH
31754 do
31755   IFS=$as_save_IFS
31756   test -z "$as_dir" && as_dir=.
31757     for ac_exec_ext in '' $ac_executable_extensions; do
31758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31759     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31760        ac_prog_rejected=yes
31761        continue
31762      fi
31763     ac_cv_prog_LD="link"
31764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31765     break 2
31766   fi
31767 done
31768   done
31769 IFS=$as_save_IFS
31770 
31771 if test $ac_prog_rejected = yes; then
31772   # We found a bogon in the path, so make sure we never use it.
31773   set dummy $ac_cv_prog_LD
31774   shift
31775   if test $# != 0; then
31776     # We chose a different compiler from the bogus one.
31777     # However, it has the same basename, so the bogon will be chosen
31778     # first if we set LD to just the basename; use the full file name.
31779     shift
31780     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31781   fi
31782 fi
31783 fi
31784 fi
31785 LD=$ac_cv_prog_LD
31786 if test -n "$LD"; then
31787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31788 $as_echo "$LD" >&6; }
31789 else
31790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31791 $as_echo "no" >&6; }
31792 fi
31793 
31794 
31795 
31796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31797 
31798   # First separate the path from the arguments. This will split at the first
31799   # space.
31800   complete="$LD"
31801   path="${complete%% *}"
31802   tmp="$complete EOL"
31803   arguments="${tmp#* }"
31804 
31805   # Input might be given as Windows format, start by converting to
31806   # unix format.
31807   new_path=`$CYGPATH -u "$path"`
31808 
31809   # Now try to locate executable using which
31810   new_path=`$WHICH "$new_path" 2> /dev/null`
31811   # bat and cmd files are not always considered executable in cygwin causing which
31812   # to not find them
31813   if test "x$new_path" = x \
31814       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31815       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31816     new_path=`$CYGPATH -u "$path"`
31817   fi
31818   if test "x$new_path" = x; then
31819     # Oops. Which didn't find the executable.
31820     # The splitting of arguments from the executable at a space might have been incorrect,
31821     # since paths with space are more likely in Windows. Give it another try with the whole
31822     # argument.
31823     path="$complete"
31824     arguments="EOL"
31825     new_path=`$CYGPATH -u "$path"`
31826     new_path=`$WHICH "$new_path" 2> /dev/null`
31827     # bat and cmd files are not always considered executable in cygwin causing which
31828     # to not find them
31829     if test "x$new_path" = x \
31830         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31831         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31832       new_path=`$CYGPATH -u "$path"`
31833     fi
31834     if test "x$new_path" = x; then
31835       # It's still not found. Now this is an unrecoverable error.
31836       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31837 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31838       has_space=`$ECHO "$complete" | $GREP " "`
31839       if test "x$has_space" != x; then
31840         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31841 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31842       fi
31843       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31844     fi
31845   fi
31846 
31847   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31848   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31849   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31850   # "foo.exe" is OK but "foo" is an error.
31851   #
31852   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31853   # It is also a way to make sure we got the proper file name for the real test later on.
31854   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31855   if test "x$test_shortpath" = x; then
31856     # Short path failed, file does not exist as specified.
31857     # Try adding .exe or .cmd
31858     if test -f "${new_path}.exe"; then
31859       input_to_shortpath="${new_path}.exe"
31860     elif test -f "${new_path}.cmd"; then
31861       input_to_shortpath="${new_path}.cmd"
31862     else
31863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31864 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31865       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31866 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31867       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31868     fi
31869   else
31870     input_to_shortpath="$new_path"
31871   fi
31872 
31873   # Call helper function which possibly converts this using DOS-style short mode.
31874   # If so, the updated path is stored in $new_path.
31875   new_path="$input_to_shortpath"
31876 
31877   input_path="$input_to_shortpath"
31878   # Check if we need to convert this using DOS-style short mode. If the path
31879   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31880   # take no chances and rewrite it.
31881   # Note: m4 eats our [], so we need to use [ and ] instead.
31882   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31883   if test "x$has_forbidden_chars" != x; then
31884     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31885     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31886     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31887     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31888       # Going to short mode and back again did indeed matter. Since short mode is
31889       # case insensitive, let's make it lowercase to improve readability.
31890       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31891       # Now convert it back to Unix-stile (cygpath)
31892       input_path=`$CYGPATH -u "$shortmode_path"`
31893       new_path="$input_path"
31894     fi
31895   fi
31896 
31897   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31898   if test "x$test_cygdrive_prefix" = x; then
31899     # As a simple fix, exclude /usr/bin since it's not a real path.
31900     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31901       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31902       # a path prefixed by /cygdrive for fixpath to work.
31903       new_path="$CYGWIN_ROOT_PATH$input_path"
31904     fi
31905   fi
31906 
31907   # remove trailing .exe if any
31908   new_path="${new_path/%.exe/}"
31909 
31910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31911 
31912   # First separate the path from the arguments. This will split at the first
31913   # space.
31914   complete="$LD"
31915   path="${complete%% *}"
31916   tmp="$complete EOL"
31917   arguments="${tmp#* }"
31918 
31919   # Input might be given as Windows format, start by converting to
31920   # unix format.
31921   new_path="$path"
31922 
31923   windows_path="$new_path"
31924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31925     unix_path=`$CYGPATH -u "$windows_path"`
31926     new_path="$unix_path"
31927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31929     new_path="$unix_path"
31930   fi
31931 
31932 
31933   # Now try to locate executable using which
31934   new_path=`$WHICH "$new_path" 2> /dev/null`
31935 
31936   if test "x$new_path" = x; then
31937     # Oops. Which didn't find the executable.
31938     # The splitting of arguments from the executable at a space might have been incorrect,
31939     # since paths with space are more likely in Windows. Give it another try with the whole
31940     # argument.
31941     path="$complete"
31942     arguments="EOL"
31943     new_path="$path"
31944 
31945   windows_path="$new_path"
31946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31947     unix_path=`$CYGPATH -u "$windows_path"`
31948     new_path="$unix_path"
31949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31951     new_path="$unix_path"
31952   fi
31953 
31954 
31955     new_path=`$WHICH "$new_path" 2> /dev/null`
31956     # bat and cmd files are not always considered executable in MSYS causing which
31957     # to not find them
31958     if test "x$new_path" = x \
31959         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31960         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31961       new_path="$path"
31962 
31963   windows_path="$new_path"
31964   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31965     unix_path=`$CYGPATH -u "$windows_path"`
31966     new_path="$unix_path"
31967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31968     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31969     new_path="$unix_path"
31970   fi
31971 
31972     fi
31973 
31974     if test "x$new_path" = x; then
31975       # It's still not found. Now this is an unrecoverable error.
31976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31977 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31978       has_space=`$ECHO "$complete" | $GREP " "`
31979       if test "x$has_space" != x; then
31980         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31981 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31982       fi
31983       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31984     fi
31985   fi
31986 
31987   # Now new_path has a complete unix path to the binary
31988   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31989     # Keep paths in /bin as-is, but remove trailing .exe if any
31990     new_path="${new_path/%.exe/}"
31991     # Do not save /bin paths to all_fixpath_prefixes!
31992   else
31993     # Not in mixed or Windows style, start by that.
31994     new_path=`cmd //c echo $new_path`
31995 
31996   input_path="$new_path"
31997   # Check if we need to convert this using DOS-style short mode. If the path
31998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31999   # take no chances and rewrite it.
32000   # Note: m4 eats our [], so we need to use [ and ] instead.
32001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32002   if test "x$has_forbidden_chars" != x; then
32003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32004     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32005   fi
32006 
32007     # Output is in $new_path
32008 
32009   windows_path="$new_path"
32010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32011     unix_path=`$CYGPATH -u "$windows_path"`
32012     new_path="$unix_path"
32013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32015     new_path="$unix_path"
32016   fi
32017 
32018     # remove trailing .exe if any
32019     new_path="${new_path/%.exe/}"
32020 
32021     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32022     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32023   fi
32024 
32025   else
32026     # We're on a unix platform. Hooray! :)
32027     # First separate the path from the arguments. This will split at the first
32028     # space.
32029     complete="$LD"
32030     path="${complete%% *}"
32031     tmp="$complete EOL"
32032     arguments="${tmp#* }"
32033 
32034     # Cannot rely on the command "which" here since it doesn't always work.
32035     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32036     if test -z "$is_absolute_path"; then
32037       # Path to executable is not absolute. Find it.
32038       IFS_save="$IFS"
32039       IFS=:
32040       for p in $PATH; do
32041         if test -f "$p/$path" && test -x "$p/$path"; then
32042           new_path="$p/$path"
32043           break
32044         fi
32045       done
32046       IFS="$IFS_save"
32047     else
32048       # This is an absolute path, we can use it without further modifications.
32049       new_path="$path"
32050     fi
32051 
32052     if test "x$new_path" = x; then
32053       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32054 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32055       has_space=`$ECHO "$complete" | $GREP " "`
32056       if test "x$has_space" != x; then
32057         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32058 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32059       fi
32060       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32061     fi
32062   fi
32063 
32064   # Now join together the path and the arguments once again
32065   if test "x$arguments" != xEOL; then
32066     new_complete="$new_path ${arguments% *}"
32067   else
32068     new_complete="$new_path"
32069   fi
32070 
32071   if test "x$complete" != "x$new_complete"; then
32072     LD="$new_complete"
32073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32074 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32075   fi
32076 
32077     # Verify that we indeed succeeded with this trick.
32078     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32079 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32080     "$LD" --version > /dev/null
32081     if test $? -eq 0 ; then
32082       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32083 $as_echo "no" >&6; }
32084       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32085     else
32086       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32087 $as_echo "yes" >&6; }
32088     fi
32089     LDCXX="$LD"
32090   else
32091     # All other toolchains use the compiler to link.
32092     LD="$CC"
32093     LDCXX="$CXX"
32094   fi
32095 
32096   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32097 
32098 
32099   #
32100   # Setup the assembler (AS)
32101   #
32102   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32103     # FIXME: should this really be solaris, or solstudio?
32104 
32105 
32106   # Publish this variable in the help.
32107 
32108 
32109   if test "x$AS" = x; then
32110     # The variable is not set by user, try to locate tool using the code snippet
32111     for ac_prog in as
32112 do
32113   # Extract the first word of "$ac_prog", so it can be a program name with args.
32114 set dummy $ac_prog; ac_word=$2
32115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32116 $as_echo_n "checking for $ac_word... " >&6; }
32117 if ${ac_cv_path_AS+:} false; then :
32118   $as_echo_n "(cached) " >&6
32119 else
32120   case $AS in
32121   [\\/]* | ?:[\\/]*)
32122   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32123   ;;
32124   *)
32125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32126 for as_dir in $PATH
32127 do
32128   IFS=$as_save_IFS
32129   test -z "$as_dir" && as_dir=.
32130     for ac_exec_ext in '' $ac_executable_extensions; do
32131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32132     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32134     break 2
32135   fi
32136 done
32137   done
32138 IFS=$as_save_IFS
32139 
32140   ;;
32141 esac
32142 fi
32143 AS=$ac_cv_path_AS
32144 if test -n "$AS"; then
32145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32146 $as_echo "$AS" >&6; }
32147 else
32148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32149 $as_echo "no" >&6; }
32150 fi
32151 
32152 
32153   test -n "$AS" && break
32154 done
32155 
32156   else
32157     # The variable is set, but is it from the command line or the environment?
32158 
32159     # Try to remove the string !AS! from our list.
32160     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32161     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32162       # If it failed, the variable was not from the command line. Ignore it,
32163       # but warn the user (except for BASH, which is always set by the calling BASH).
32164       if test "xAS" != xBASH; then
32165         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32166 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32167       fi
32168       # Try to locate tool using the code snippet
32169       for ac_prog in as
32170 do
32171   # Extract the first word of "$ac_prog", so it can be a program name with args.
32172 set dummy $ac_prog; ac_word=$2
32173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32174 $as_echo_n "checking for $ac_word... " >&6; }
32175 if ${ac_cv_path_AS+:} false; then :
32176   $as_echo_n "(cached) " >&6
32177 else
32178   case $AS in
32179   [\\/]* | ?:[\\/]*)
32180   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32181   ;;
32182   *)
32183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32184 for as_dir in $PATH
32185 do
32186   IFS=$as_save_IFS
32187   test -z "$as_dir" && as_dir=.
32188     for ac_exec_ext in '' $ac_executable_extensions; do
32189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32190     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32192     break 2
32193   fi
32194 done
32195   done
32196 IFS=$as_save_IFS
32197 
32198   ;;
32199 esac
32200 fi
32201 AS=$ac_cv_path_AS
32202 if test -n "$AS"; then
32203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32204 $as_echo "$AS" >&6; }
32205 else
32206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32207 $as_echo "no" >&6; }
32208 fi
32209 
32210 
32211   test -n "$AS" && break
32212 done
32213 
32214     else
32215       # If it succeeded, then it was overridden by the user. We will use it
32216       # for the tool.
32217 
32218       # First remove it from the list of overridden variables, so we can test
32219       # for unknown variables in the end.
32220       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32221 
32222       # Check if the provided tool contains a complete path.
32223       tool_specified="$AS"
32224       tool_basename="${tool_specified##*/}"
32225       if test "x$tool_basename" = "x$tool_specified"; then
32226         # A command without a complete path is provided, search $PATH.
32227         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32228 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32229         # Extract the first word of "$tool_basename", so it can be a program name with args.
32230 set dummy $tool_basename; ac_word=$2
32231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32232 $as_echo_n "checking for $ac_word... " >&6; }
32233 if ${ac_cv_path_AS+:} false; then :
32234   $as_echo_n "(cached) " >&6
32235 else
32236   case $AS in
32237   [\\/]* | ?:[\\/]*)
32238   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32239   ;;
32240   *)
32241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32242 for as_dir in $PATH
32243 do
32244   IFS=$as_save_IFS
32245   test -z "$as_dir" && as_dir=.
32246     for ac_exec_ext in '' $ac_executable_extensions; do
32247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32248     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32250     break 2
32251   fi
32252 done
32253   done
32254 IFS=$as_save_IFS
32255 
32256   ;;
32257 esac
32258 fi
32259 AS=$ac_cv_path_AS
32260 if test -n "$AS"; then
32261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32262 $as_echo "$AS" >&6; }
32263 else
32264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32265 $as_echo "no" >&6; }
32266 fi
32267 
32268 
32269         if test "x$AS" = x; then
32270           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32271         fi
32272       else
32273         # Otherwise we believe it is a complete path. Use it as it is.
32274         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32275 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32277 $as_echo_n "checking for AS... " >&6; }
32278         if test ! -x "$tool_specified"; then
32279           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32280 $as_echo "not found" >&6; }
32281           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32282         fi
32283         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32284 $as_echo "$tool_specified" >&6; }
32285       fi
32286     fi
32287   fi
32288 
32289 
32290 
32291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32292 
32293   # First separate the path from the arguments. This will split at the first
32294   # space.
32295   complete="$AS"
32296   path="${complete%% *}"
32297   tmp="$complete EOL"
32298   arguments="${tmp#* }"
32299 
32300   # Input might be given as Windows format, start by converting to
32301   # unix format.
32302   new_path=`$CYGPATH -u "$path"`
32303 
32304   # Now try to locate executable using which
32305   new_path=`$WHICH "$new_path" 2> /dev/null`
32306   # bat and cmd files are not always considered executable in cygwin causing which
32307   # to not find them
32308   if test "x$new_path" = x \
32309       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32310       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32311     new_path=`$CYGPATH -u "$path"`
32312   fi
32313   if test "x$new_path" = x; then
32314     # Oops. Which didn't find the executable.
32315     # The splitting of arguments from the executable at a space might have been incorrect,
32316     # since paths with space are more likely in Windows. Give it another try with the whole
32317     # argument.
32318     path="$complete"
32319     arguments="EOL"
32320     new_path=`$CYGPATH -u "$path"`
32321     new_path=`$WHICH "$new_path" 2> /dev/null`
32322     # bat and cmd files are not always considered executable in cygwin causing which
32323     # to not find them
32324     if test "x$new_path" = x \
32325         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32326         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32327       new_path=`$CYGPATH -u "$path"`
32328     fi
32329     if test "x$new_path" = x; then
32330       # It's still not found. Now this is an unrecoverable error.
32331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32332 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32333       has_space=`$ECHO "$complete" | $GREP " "`
32334       if test "x$has_space" != x; then
32335         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32336 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32337       fi
32338       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32339     fi
32340   fi
32341 
32342   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32343   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32344   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32345   # "foo.exe" is OK but "foo" is an error.
32346   #
32347   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32348   # It is also a way to make sure we got the proper file name for the real test later on.
32349   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32350   if test "x$test_shortpath" = x; then
32351     # Short path failed, file does not exist as specified.
32352     # Try adding .exe or .cmd
32353     if test -f "${new_path}.exe"; then
32354       input_to_shortpath="${new_path}.exe"
32355     elif test -f "${new_path}.cmd"; then
32356       input_to_shortpath="${new_path}.cmd"
32357     else
32358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32359 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32360       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32361 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32362       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32363     fi
32364   else
32365     input_to_shortpath="$new_path"
32366   fi
32367 
32368   # Call helper function which possibly converts this using DOS-style short mode.
32369   # If so, the updated path is stored in $new_path.
32370   new_path="$input_to_shortpath"
32371 
32372   input_path="$input_to_shortpath"
32373   # Check if we need to convert this using DOS-style short mode. If the path
32374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32375   # take no chances and rewrite it.
32376   # Note: m4 eats our [], so we need to use [ and ] instead.
32377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32378   if test "x$has_forbidden_chars" != x; then
32379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32380     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32381     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32382     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32383       # Going to short mode and back again did indeed matter. Since short mode is
32384       # case insensitive, let's make it lowercase to improve readability.
32385       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32386       # Now convert it back to Unix-stile (cygpath)
32387       input_path=`$CYGPATH -u "$shortmode_path"`
32388       new_path="$input_path"
32389     fi
32390   fi
32391 
32392   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32393   if test "x$test_cygdrive_prefix" = x; then
32394     # As a simple fix, exclude /usr/bin since it's not a real path.
32395     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32396       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32397       # a path prefixed by /cygdrive for fixpath to work.
32398       new_path="$CYGWIN_ROOT_PATH$input_path"
32399     fi
32400   fi
32401 
32402   # remove trailing .exe if any
32403   new_path="${new_path/%.exe/}"
32404 
32405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32406 
32407   # First separate the path from the arguments. This will split at the first
32408   # space.
32409   complete="$AS"
32410   path="${complete%% *}"
32411   tmp="$complete EOL"
32412   arguments="${tmp#* }"
32413 
32414   # Input might be given as Windows format, start by converting to
32415   # unix format.
32416   new_path="$path"
32417 
32418   windows_path="$new_path"
32419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420     unix_path=`$CYGPATH -u "$windows_path"`
32421     new_path="$unix_path"
32422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424     new_path="$unix_path"
32425   fi
32426 
32427 
32428   # Now try to locate executable using which
32429   new_path=`$WHICH "$new_path" 2> /dev/null`
32430 
32431   if test "x$new_path" = x; then
32432     # Oops. Which didn't find the executable.
32433     # The splitting of arguments from the executable at a space might have been incorrect,
32434     # since paths with space are more likely in Windows. Give it another try with the whole
32435     # argument.
32436     path="$complete"
32437     arguments="EOL"
32438     new_path="$path"
32439 
32440   windows_path="$new_path"
32441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442     unix_path=`$CYGPATH -u "$windows_path"`
32443     new_path="$unix_path"
32444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446     new_path="$unix_path"
32447   fi
32448 
32449 
32450     new_path=`$WHICH "$new_path" 2> /dev/null`
32451     # bat and cmd files are not always considered executable in MSYS causing which
32452     # to not find them
32453     if test "x$new_path" = x \
32454         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32455         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32456       new_path="$path"
32457 
32458   windows_path="$new_path"
32459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32460     unix_path=`$CYGPATH -u "$windows_path"`
32461     new_path="$unix_path"
32462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32464     new_path="$unix_path"
32465   fi
32466 
32467     fi
32468 
32469     if test "x$new_path" = x; then
32470       # It's still not found. Now this is an unrecoverable error.
32471       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32472 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32473       has_space=`$ECHO "$complete" | $GREP " "`
32474       if test "x$has_space" != x; then
32475         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32476 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32477       fi
32478       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32479     fi
32480   fi
32481 
32482   # Now new_path has a complete unix path to the binary
32483   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32484     # Keep paths in /bin as-is, but remove trailing .exe if any
32485     new_path="${new_path/%.exe/}"
32486     # Do not save /bin paths to all_fixpath_prefixes!
32487   else
32488     # Not in mixed or Windows style, start by that.
32489     new_path=`cmd //c echo $new_path`
32490 
32491   input_path="$new_path"
32492   # Check if we need to convert this using DOS-style short mode. If the path
32493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32494   # take no chances and rewrite it.
32495   # Note: m4 eats our [], so we need to use [ and ] instead.
32496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32497   if test "x$has_forbidden_chars" != x; then
32498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32499     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32500   fi
32501 
32502     # Output is in $new_path
32503 
32504   windows_path="$new_path"
32505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32506     unix_path=`$CYGPATH -u "$windows_path"`
32507     new_path="$unix_path"
32508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32510     new_path="$unix_path"
32511   fi
32512 
32513     # remove trailing .exe if any
32514     new_path="${new_path/%.exe/}"
32515 
32516     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32517     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32518   fi
32519 
32520   else
32521     # We're on a unix platform. Hooray! :)
32522     # First separate the path from the arguments. This will split at the first
32523     # space.
32524     complete="$AS"
32525     path="${complete%% *}"
32526     tmp="$complete EOL"
32527     arguments="${tmp#* }"
32528 
32529     # Cannot rely on the command "which" here since it doesn't always work.
32530     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32531     if test -z "$is_absolute_path"; then
32532       # Path to executable is not absolute. Find it.
32533       IFS_save="$IFS"
32534       IFS=:
32535       for p in $PATH; do
32536         if test -f "$p/$path" && test -x "$p/$path"; then
32537           new_path="$p/$path"
32538           break
32539         fi
32540       done
32541       IFS="$IFS_save"
32542     else
32543       # This is an absolute path, we can use it without further modifications.
32544       new_path="$path"
32545     fi
32546 
32547     if test "x$new_path" = x; then
32548       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32549 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32550       has_space=`$ECHO "$complete" | $GREP " "`
32551       if test "x$has_space" != x; then
32552         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32553 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32554       fi
32555       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32556     fi
32557   fi
32558 
32559   # Now join together the path and the arguments once again
32560   if test "x$arguments" != xEOL; then
32561     new_complete="$new_path ${arguments% *}"
32562   else
32563     new_complete="$new_path"
32564   fi
32565 
32566   if test "x$complete" != "x$new_complete"; then
32567     AS="$new_complete"
32568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32569 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32570   fi
32571 
32572   else
32573     # FIXME: is this correct for microsoft?
32574     AS="$CC -c"
32575   fi
32576 
32577 
32578   #
32579   # Setup the archiver (AR)
32580   #
32581   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32582     # The corresponding ar tool is lib.exe (used to create static libraries)
32583     # Extract the first word of "lib", so it can be a program name with args.
32584 set dummy lib; ac_word=$2
32585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32586 $as_echo_n "checking for $ac_word... " >&6; }
32587 if ${ac_cv_prog_AR+:} false; then :
32588   $as_echo_n "(cached) " >&6
32589 else
32590   if test -n "$AR"; then
32591   ac_cv_prog_AR="$AR" # Let the user override the test.
32592 else
32593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32594 for as_dir in $PATH
32595 do
32596   IFS=$as_save_IFS
32597   test -z "$as_dir" && as_dir=.
32598     for ac_exec_ext in '' $ac_executable_extensions; do
32599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32600     ac_cv_prog_AR="lib"
32601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32602     break 2
32603   fi
32604 done
32605   done
32606 IFS=$as_save_IFS
32607 
32608 fi
32609 fi
32610 AR=$ac_cv_prog_AR
32611 if test -n "$AR"; then
32612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32613 $as_echo "$AR" >&6; }
32614 else
32615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32616 $as_echo "no" >&6; }
32617 fi
32618 
32619 
32620   else
32621 
32622 
32623   # Publish this variable in the help.
32624 
32625 
32626   if test "x$AR" = x; then
32627     # The variable is not set by user, try to locate tool using the code snippet
32628     if test -n "$ac_tool_prefix"; then
32629   for ac_prog in ar
32630   do
32631     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32632 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32634 $as_echo_n "checking for $ac_word... " >&6; }
32635 if ${ac_cv_prog_AR+:} false; then :
32636   $as_echo_n "(cached) " >&6
32637 else
32638   if test -n "$AR"; then
32639   ac_cv_prog_AR="$AR" # Let the user override the test.
32640 else
32641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32642 for as_dir in $PATH
32643 do
32644   IFS=$as_save_IFS
32645   test -z "$as_dir" && as_dir=.
32646     for ac_exec_ext in '' $ac_executable_extensions; do
32647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32648     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32650     break 2
32651   fi
32652 done
32653   done
32654 IFS=$as_save_IFS
32655 
32656 fi
32657 fi
32658 AR=$ac_cv_prog_AR
32659 if test -n "$AR"; then
32660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32661 $as_echo "$AR" >&6; }
32662 else
32663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32664 $as_echo "no" >&6; }
32665 fi
32666 
32667 
32668     test -n "$AR" && break
32669   done
32670 fi
32671 if test -z "$AR"; then
32672   ac_ct_AR=$AR
32673   for ac_prog in ar
32674 do
32675   # Extract the first word of "$ac_prog", so it can be a program name with args.
32676 set dummy $ac_prog; ac_word=$2
32677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32678 $as_echo_n "checking for $ac_word... " >&6; }
32679 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32680   $as_echo_n "(cached) " >&6
32681 else
32682   if test -n "$ac_ct_AR"; then
32683   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32684 else
32685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32686 for as_dir in $PATH
32687 do
32688   IFS=$as_save_IFS
32689   test -z "$as_dir" && as_dir=.
32690     for ac_exec_ext in '' $ac_executable_extensions; do
32691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32692     ac_cv_prog_ac_ct_AR="$ac_prog"
32693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32694     break 2
32695   fi
32696 done
32697   done
32698 IFS=$as_save_IFS
32699 
32700 fi
32701 fi
32702 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32703 if test -n "$ac_ct_AR"; then
32704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32705 $as_echo "$ac_ct_AR" >&6; }
32706 else
32707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32708 $as_echo "no" >&6; }
32709 fi
32710 
32711 
32712   test -n "$ac_ct_AR" && break
32713 done
32714 
32715   if test "x$ac_ct_AR" = x; then
32716     AR=""
32717   else
32718     case $cross_compiling:$ac_tool_warned in
32719 yes:)
32720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32721 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32722 ac_tool_warned=yes ;;
32723 esac
32724     AR=$ac_ct_AR
32725   fi
32726 fi
32727 
32728   else
32729     # The variable is set, but is it from the command line or the environment?
32730 
32731     # Try to remove the string !AR! from our list.
32732     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32733     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32734       # If it failed, the variable was not from the command line. Ignore it,
32735       # but warn the user (except for BASH, which is always set by the calling BASH).
32736       if test "xAR" != xBASH; then
32737         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32738 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32739       fi
32740       # Try to locate tool using the code snippet
32741       if test -n "$ac_tool_prefix"; then
32742   for ac_prog in ar
32743   do
32744     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32745 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32747 $as_echo_n "checking for $ac_word... " >&6; }
32748 if ${ac_cv_prog_AR+:} false; then :
32749   $as_echo_n "(cached) " >&6
32750 else
32751   if test -n "$AR"; then
32752   ac_cv_prog_AR="$AR" # Let the user override the test.
32753 else
32754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32755 for as_dir in $PATH
32756 do
32757   IFS=$as_save_IFS
32758   test -z "$as_dir" && as_dir=.
32759     for ac_exec_ext in '' $ac_executable_extensions; do
32760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32761     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32763     break 2
32764   fi
32765 done
32766   done
32767 IFS=$as_save_IFS
32768 
32769 fi
32770 fi
32771 AR=$ac_cv_prog_AR
32772 if test -n "$AR"; then
32773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32774 $as_echo "$AR" >&6; }
32775 else
32776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32777 $as_echo "no" >&6; }
32778 fi
32779 
32780 
32781     test -n "$AR" && break
32782   done
32783 fi
32784 if test -z "$AR"; then
32785   ac_ct_AR=$AR
32786   for ac_prog in ar
32787 do
32788   # Extract the first word of "$ac_prog", so it can be a program name with args.
32789 set dummy $ac_prog; ac_word=$2
32790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32791 $as_echo_n "checking for $ac_word... " >&6; }
32792 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32793   $as_echo_n "(cached) " >&6
32794 else
32795   if test -n "$ac_ct_AR"; then
32796   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32797 else
32798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32799 for as_dir in $PATH
32800 do
32801   IFS=$as_save_IFS
32802   test -z "$as_dir" && as_dir=.
32803     for ac_exec_ext in '' $ac_executable_extensions; do
32804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32805     ac_cv_prog_ac_ct_AR="$ac_prog"
32806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32807     break 2
32808   fi
32809 done
32810   done
32811 IFS=$as_save_IFS
32812 
32813 fi
32814 fi
32815 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32816 if test -n "$ac_ct_AR"; then
32817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32818 $as_echo "$ac_ct_AR" >&6; }
32819 else
32820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32821 $as_echo "no" >&6; }
32822 fi
32823 
32824 
32825   test -n "$ac_ct_AR" && break
32826 done
32827 
32828   if test "x$ac_ct_AR" = x; then
32829     AR=""
32830   else
32831     case $cross_compiling:$ac_tool_warned in
32832 yes:)
32833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32834 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32835 ac_tool_warned=yes ;;
32836 esac
32837     AR=$ac_ct_AR
32838   fi
32839 fi
32840 
32841     else
32842       # If it succeeded, then it was overridden by the user. We will use it
32843       # for the tool.
32844 
32845       # First remove it from the list of overridden variables, so we can test
32846       # for unknown variables in the end.
32847       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32848 
32849       # Check if the provided tool contains a complete path.
32850       tool_specified="$AR"
32851       tool_basename="${tool_specified##*/}"
32852       if test "x$tool_basename" = "x$tool_specified"; then
32853         # A command without a complete path is provided, search $PATH.
32854         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32855 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32856         # Extract the first word of "$tool_basename", so it can be a program name with args.
32857 set dummy $tool_basename; ac_word=$2
32858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32859 $as_echo_n "checking for $ac_word... " >&6; }
32860 if ${ac_cv_path_AR+:} false; then :
32861   $as_echo_n "(cached) " >&6
32862 else
32863   case $AR in
32864   [\\/]* | ?:[\\/]*)
32865   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32866   ;;
32867   *)
32868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32869 for as_dir in $PATH
32870 do
32871   IFS=$as_save_IFS
32872   test -z "$as_dir" && as_dir=.
32873     for ac_exec_ext in '' $ac_executable_extensions; do
32874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32875     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32877     break 2
32878   fi
32879 done
32880   done
32881 IFS=$as_save_IFS
32882 
32883   ;;
32884 esac
32885 fi
32886 AR=$ac_cv_path_AR
32887 if test -n "$AR"; then
32888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32889 $as_echo "$AR" >&6; }
32890 else
32891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32892 $as_echo "no" >&6; }
32893 fi
32894 
32895 
32896         if test "x$AR" = x; then
32897           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32898         fi
32899       else
32900         # Otherwise we believe it is a complete path. Use it as it is.
32901         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32902 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32903         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32904 $as_echo_n "checking for AR... " >&6; }
32905         if test ! -x "$tool_specified"; then
32906           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32907 $as_echo "not found" >&6; }
32908           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32909         fi
32910         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32911 $as_echo "$tool_specified" >&6; }
32912       fi
32913     fi
32914   fi
32915 
32916 
32917   fi
32918 
32919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32920 
32921   # First separate the path from the arguments. This will split at the first
32922   # space.
32923   complete="$AR"
32924   path="${complete%% *}"
32925   tmp="$complete EOL"
32926   arguments="${tmp#* }"
32927 
32928   # Input might be given as Windows format, start by converting to
32929   # unix format.
32930   new_path=`$CYGPATH -u "$path"`
32931 
32932   # Now try to locate executable using which
32933   new_path=`$WHICH "$new_path" 2> /dev/null`
32934   # bat and cmd files are not always considered executable in cygwin causing which
32935   # to not find them
32936   if test "x$new_path" = x \
32937       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32938       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32939     new_path=`$CYGPATH -u "$path"`
32940   fi
32941   if test "x$new_path" = x; then
32942     # Oops. Which didn't find the executable.
32943     # The splitting of arguments from the executable at a space might have been incorrect,
32944     # since paths with space are more likely in Windows. Give it another try with the whole
32945     # argument.
32946     path="$complete"
32947     arguments="EOL"
32948     new_path=`$CYGPATH -u "$path"`
32949     new_path=`$WHICH "$new_path" 2> /dev/null`
32950     # bat and cmd files are not always considered executable in cygwin causing which
32951     # to not find them
32952     if test "x$new_path" = x \
32953         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32954         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32955       new_path=`$CYGPATH -u "$path"`
32956     fi
32957     if test "x$new_path" = x; then
32958       # It's still not found. Now this is an unrecoverable error.
32959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32960 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32961       has_space=`$ECHO "$complete" | $GREP " "`
32962       if test "x$has_space" != x; then
32963         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32964 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32965       fi
32966       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32967     fi
32968   fi
32969 
32970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32973   # "foo.exe" is OK but "foo" is an error.
32974   #
32975   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32976   # It is also a way to make sure we got the proper file name for the real test later on.
32977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32978   if test "x$test_shortpath" = x; then
32979     # Short path failed, file does not exist as specified.
32980     # Try adding .exe or .cmd
32981     if test -f "${new_path}.exe"; then
32982       input_to_shortpath="${new_path}.exe"
32983     elif test -f "${new_path}.cmd"; then
32984       input_to_shortpath="${new_path}.cmd"
32985     else
32986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32987 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32988       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32989 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32990       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32991     fi
32992   else
32993     input_to_shortpath="$new_path"
32994   fi
32995 
32996   # Call helper function which possibly converts this using DOS-style short mode.
32997   # If so, the updated path is stored in $new_path.
32998   new_path="$input_to_shortpath"
32999 
33000   input_path="$input_to_shortpath"
33001   # Check if we need to convert this using DOS-style short mode. If the path
33002   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33003   # take no chances and rewrite it.
33004   # Note: m4 eats our [], so we need to use [ and ] instead.
33005   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33006   if test "x$has_forbidden_chars" != x; then
33007     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33008     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33009     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33010     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33011       # Going to short mode and back again did indeed matter. Since short mode is
33012       # case insensitive, let's make it lowercase to improve readability.
33013       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33014       # Now convert it back to Unix-stile (cygpath)
33015       input_path=`$CYGPATH -u "$shortmode_path"`
33016       new_path="$input_path"
33017     fi
33018   fi
33019 
33020   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33021   if test "x$test_cygdrive_prefix" = x; then
33022     # As a simple fix, exclude /usr/bin since it's not a real path.
33023     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33024       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33025       # a path prefixed by /cygdrive for fixpath to work.
33026       new_path="$CYGWIN_ROOT_PATH$input_path"
33027     fi
33028   fi
33029 
33030   # remove trailing .exe if any
33031   new_path="${new_path/%.exe/}"
33032 
33033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33034 
33035   # First separate the path from the arguments. This will split at the first
33036   # space.
33037   complete="$AR"
33038   path="${complete%% *}"
33039   tmp="$complete EOL"
33040   arguments="${tmp#* }"
33041 
33042   # Input might be given as Windows format, start by converting to
33043   # unix format.
33044   new_path="$path"
33045 
33046   windows_path="$new_path"
33047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33048     unix_path=`$CYGPATH -u "$windows_path"`
33049     new_path="$unix_path"
33050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33052     new_path="$unix_path"
33053   fi
33054 
33055 
33056   # Now try to locate executable using which
33057   new_path=`$WHICH "$new_path" 2> /dev/null`
33058 
33059   if test "x$new_path" = x; then
33060     # Oops. Which didn't find the executable.
33061     # The splitting of arguments from the executable at a space might have been incorrect,
33062     # since paths with space are more likely in Windows. Give it another try with the whole
33063     # argument.
33064     path="$complete"
33065     arguments="EOL"
33066     new_path="$path"
33067 
33068   windows_path="$new_path"
33069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33070     unix_path=`$CYGPATH -u "$windows_path"`
33071     new_path="$unix_path"
33072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33074     new_path="$unix_path"
33075   fi
33076 
33077 
33078     new_path=`$WHICH "$new_path" 2> /dev/null`
33079     # bat and cmd files are not always considered executable in MSYS causing which
33080     # to not find them
33081     if test "x$new_path" = x \
33082         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33083         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33084       new_path="$path"
33085 
33086   windows_path="$new_path"
33087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33088     unix_path=`$CYGPATH -u "$windows_path"`
33089     new_path="$unix_path"
33090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33092     new_path="$unix_path"
33093   fi
33094 
33095     fi
33096 
33097     if test "x$new_path" = x; then
33098       # It's still not found. Now this is an unrecoverable error.
33099       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33100 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33101       has_space=`$ECHO "$complete" | $GREP " "`
33102       if test "x$has_space" != x; then
33103         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33104 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33105       fi
33106       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33107     fi
33108   fi
33109 
33110   # Now new_path has a complete unix path to the binary
33111   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33112     # Keep paths in /bin as-is, but remove trailing .exe if any
33113     new_path="${new_path/%.exe/}"
33114     # Do not save /bin paths to all_fixpath_prefixes!
33115   else
33116     # Not in mixed or Windows style, start by that.
33117     new_path=`cmd //c echo $new_path`
33118 
33119   input_path="$new_path"
33120   # Check if we need to convert this using DOS-style short mode. If the path
33121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33122   # take no chances and rewrite it.
33123   # Note: m4 eats our [], so we need to use [ and ] instead.
33124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33125   if test "x$has_forbidden_chars" != x; then
33126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33127     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33128   fi
33129 
33130     # Output is in $new_path
33131 
33132   windows_path="$new_path"
33133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33134     unix_path=`$CYGPATH -u "$windows_path"`
33135     new_path="$unix_path"
33136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33137     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33138     new_path="$unix_path"
33139   fi
33140 
33141     # remove trailing .exe if any
33142     new_path="${new_path/%.exe/}"
33143 
33144     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33145     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33146   fi
33147 
33148   else
33149     # We're on a unix platform. Hooray! :)
33150     # First separate the path from the arguments. This will split at the first
33151     # space.
33152     complete="$AR"
33153     path="${complete%% *}"
33154     tmp="$complete EOL"
33155     arguments="${tmp#* }"
33156 
33157     # Cannot rely on the command "which" here since it doesn't always work.
33158     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33159     if test -z "$is_absolute_path"; then
33160       # Path to executable is not absolute. Find it.
33161       IFS_save="$IFS"
33162       IFS=:
33163       for p in $PATH; do
33164         if test -f "$p/$path" && test -x "$p/$path"; then
33165           new_path="$p/$path"
33166           break
33167         fi
33168       done
33169       IFS="$IFS_save"
33170     else
33171       # This is an absolute path, we can use it without further modifications.
33172       new_path="$path"
33173     fi
33174 
33175     if test "x$new_path" = x; then
33176       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33177 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33178       has_space=`$ECHO "$complete" | $GREP " "`
33179       if test "x$has_space" != x; then
33180         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33181 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33182       fi
33183       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33184     fi
33185   fi
33186 
33187   # Now join together the path and the arguments once again
33188   if test "x$arguments" != xEOL; then
33189     new_complete="$new_path ${arguments% *}"
33190   else
33191     new_complete="$new_path"
33192   fi
33193 
33194   if test "x$complete" != "x$new_complete"; then
33195     AR="$new_complete"
33196     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33197 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33198   fi
33199 
33200 
33201 
33202   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33203     ac_ext=m
33204 ac_cpp='$OBJCPP $CPPFLAGS'
33205 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33206 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33207 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33208 if test -n "$ac_tool_prefix"; then
33209   for ac_prog in gcc objcc objc cc CC
33210   do
33211     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33212 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33214 $as_echo_n "checking for $ac_word... " >&6; }
33215 if ${ac_cv_prog_OBJC+:} false; then :
33216   $as_echo_n "(cached) " >&6
33217 else
33218   if test -n "$OBJC"; then
33219   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33220 else
33221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33222 for as_dir in $PATH
33223 do
33224   IFS=$as_save_IFS
33225   test -z "$as_dir" && as_dir=.
33226     for ac_exec_ext in '' $ac_executable_extensions; do
33227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33228     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33230     break 2
33231   fi
33232 done
33233   done
33234 IFS=$as_save_IFS
33235 
33236 fi
33237 fi
33238 OBJC=$ac_cv_prog_OBJC
33239 if test -n "$OBJC"; then
33240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33241 $as_echo "$OBJC" >&6; }
33242 else
33243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33244 $as_echo "no" >&6; }
33245 fi
33246 
33247 
33248     test -n "$OBJC" && break
33249   done
33250 fi
33251 if test -z "$OBJC"; then
33252   ac_ct_OBJC=$OBJC
33253   for ac_prog in gcc objcc objc cc CC
33254 do
33255   # Extract the first word of "$ac_prog", so it can be a program name with args.
33256 set dummy $ac_prog; ac_word=$2
33257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33258 $as_echo_n "checking for $ac_word... " >&6; }
33259 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33260   $as_echo_n "(cached) " >&6
33261 else
33262   if test -n "$ac_ct_OBJC"; then
33263   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33264 else
33265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33266 for as_dir in $PATH
33267 do
33268   IFS=$as_save_IFS
33269   test -z "$as_dir" && as_dir=.
33270     for ac_exec_ext in '' $ac_executable_extensions; do
33271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33272     ac_cv_prog_ac_ct_OBJC="$ac_prog"
33273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33274     break 2
33275   fi
33276 done
33277   done
33278 IFS=$as_save_IFS
33279 
33280 fi
33281 fi
33282 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33283 if test -n "$ac_ct_OBJC"; then
33284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33285 $as_echo "$ac_ct_OBJC" >&6; }
33286 else
33287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33288 $as_echo "no" >&6; }
33289 fi
33290 
33291 
33292   test -n "$ac_ct_OBJC" && break
33293 done
33294 
33295   if test "x$ac_ct_OBJC" = x; then
33296     OBJC="gcc"
33297   else
33298     case $cross_compiling:$ac_tool_warned in
33299 yes:)
33300 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33301 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33302 ac_tool_warned=yes ;;
33303 esac
33304     OBJC=$ac_ct_OBJC
33305   fi
33306 fi
33307 
33308 # Provide some information about the compiler.
33309 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33310 set X $ac_compile
33311 ac_compiler=$2
33312 for ac_option in --version -v -V -qversion; do
33313   { { ac_try="$ac_compiler $ac_option >&5"
33314 case "(($ac_try" in
33315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33316   *) ac_try_echo=$ac_try;;
33317 esac
33318 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33319 $as_echo "$ac_try_echo"; } >&5
33320   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33321   ac_status=$?
33322   if test -s conftest.err; then
33323     sed '10a\
33324 ... rest of stderr output deleted ...
33325          10q' conftest.err >conftest.er1
33326     cat conftest.er1 >&5
33327   fi
33328   rm -f conftest.er1 conftest.err
33329   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33330   test $ac_status = 0; }
33331 done
33332 
33333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33334 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33335 if ${ac_cv_objc_compiler_gnu+:} false; then :
33336   $as_echo_n "(cached) " >&6
33337 else
33338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33339 /* end confdefs.h.  */
33340 
33341 int
33342 main ()
33343 {
33344 #ifndef __GNUC__
33345        choke me
33346 #endif
33347 
33348   ;
33349   return 0;
33350 }
33351 _ACEOF
33352 if ac_fn_objc_try_compile "$LINENO"; then :
33353   ac_compiler_gnu=yes
33354 else
33355   ac_compiler_gnu=no
33356 fi
33357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33358 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33359 
33360 fi
33361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33362 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33363 if test $ac_compiler_gnu = yes; then
33364   GOBJC=yes
33365 else
33366   GOBJC=
33367 fi
33368 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33369 ac_save_OBJCFLAGS=$OBJCFLAGS
33370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33371 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33372 if ${ac_cv_prog_objc_g+:} false; then :
33373   $as_echo_n "(cached) " >&6
33374 else
33375   ac_save_objc_werror_flag=$ac_objc_werror_flag
33376    ac_objc_werror_flag=yes
33377    ac_cv_prog_objc_g=no
33378    OBJCFLAGS="-g"
33379    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33380 /* end confdefs.h.  */
33381 
33382 int
33383 main ()
33384 {
33385 
33386   ;
33387   return 0;
33388 }
33389 _ACEOF
33390 if ac_fn_objc_try_compile "$LINENO"; then :
33391   ac_cv_prog_objc_g=yes
33392 else
33393   OBJCFLAGS=""
33394       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33395 /* end confdefs.h.  */
33396 
33397 int
33398 main ()
33399 {
33400 
33401   ;
33402   return 0;
33403 }
33404 _ACEOF
33405 if ac_fn_objc_try_compile "$LINENO"; then :
33406 
33407 else
33408   ac_objc_werror_flag=$ac_save_objc_werror_flag
33409          OBJCFLAGS="-g"
33410          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33411 /* end confdefs.h.  */
33412 
33413 int
33414 main ()
33415 {
33416 
33417   ;
33418   return 0;
33419 }
33420 _ACEOF
33421 if ac_fn_objc_try_compile "$LINENO"; then :
33422   ac_cv_prog_objc_g=yes
33423 fi
33424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33425 fi
33426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33427 fi
33428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33429    ac_objc_werror_flag=$ac_save_objc_werror_flag
33430 fi
33431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33432 $as_echo "$ac_cv_prog_objc_g" >&6; }
33433 if test "$ac_test_OBJCFLAGS" = set; then
33434   OBJCFLAGS=$ac_save_OBJCFLAGS
33435 elif test $ac_cv_prog_objc_g = yes; then
33436   if test "$GOBJC" = yes; then
33437     OBJCFLAGS="-g -O2"
33438   else
33439     OBJCFLAGS="-g"
33440   fi
33441 else
33442   if test "$GOBJC" = yes; then
33443     OBJCFLAGS="-O2"
33444   else
33445     OBJCFLAGS=
33446   fi
33447 fi
33448 ac_ext=cpp
33449 ac_cpp='$CXXCPP $CPPFLAGS'
33450 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33451 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33452 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33453 
33454 
33455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33456 
33457   # First separate the path from the arguments. This will split at the first
33458   # space.
33459   complete="$OBJC"
33460   path="${complete%% *}"
33461   tmp="$complete EOL"
33462   arguments="${tmp#* }"
33463 
33464   # Input might be given as Windows format, start by converting to
33465   # unix format.
33466   new_path=`$CYGPATH -u "$path"`
33467 
33468   # Now try to locate executable using which
33469   new_path=`$WHICH "$new_path" 2> /dev/null`
33470   # bat and cmd files are not always considered executable in cygwin causing which
33471   # to not find them
33472   if test "x$new_path" = x \
33473       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33474       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33475     new_path=`$CYGPATH -u "$path"`
33476   fi
33477   if test "x$new_path" = x; then
33478     # Oops. Which didn't find the executable.
33479     # The splitting of arguments from the executable at a space might have been incorrect,
33480     # since paths with space are more likely in Windows. Give it another try with the whole
33481     # argument.
33482     path="$complete"
33483     arguments="EOL"
33484     new_path=`$CYGPATH -u "$path"`
33485     new_path=`$WHICH "$new_path" 2> /dev/null`
33486     # bat and cmd files are not always considered executable in cygwin causing which
33487     # to not find them
33488     if test "x$new_path" = x \
33489         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33490         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33491       new_path=`$CYGPATH -u "$path"`
33492     fi
33493     if test "x$new_path" = x; then
33494       # It's still not found. Now this is an unrecoverable error.
33495       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33496 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33497       has_space=`$ECHO "$complete" | $GREP " "`
33498       if test "x$has_space" != x; then
33499         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33500 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33501       fi
33502       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33503     fi
33504   fi
33505 
33506   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33507   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33508   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33509   # "foo.exe" is OK but "foo" is an error.
33510   #
33511   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33512   # It is also a way to make sure we got the proper file name for the real test later on.
33513   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33514   if test "x$test_shortpath" = x; then
33515     # Short path failed, file does not exist as specified.
33516     # Try adding .exe or .cmd
33517     if test -f "${new_path}.exe"; then
33518       input_to_shortpath="${new_path}.exe"
33519     elif test -f "${new_path}.cmd"; then
33520       input_to_shortpath="${new_path}.cmd"
33521     else
33522       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33523 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33524       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33525 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33526       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33527     fi
33528   else
33529     input_to_shortpath="$new_path"
33530   fi
33531 
33532   # Call helper function which possibly converts this using DOS-style short mode.
33533   # If so, the updated path is stored in $new_path.
33534   new_path="$input_to_shortpath"
33535 
33536   input_path="$input_to_shortpath"
33537   # Check if we need to convert this using DOS-style short mode. If the path
33538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33539   # take no chances and rewrite it.
33540   # Note: m4 eats our [], so we need to use [ and ] instead.
33541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33542   if test "x$has_forbidden_chars" != x; then
33543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33547       # Going to short mode and back again did indeed matter. Since short mode is
33548       # case insensitive, let's make it lowercase to improve readability.
33549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33550       # Now convert it back to Unix-stile (cygpath)
33551       input_path=`$CYGPATH -u "$shortmode_path"`
33552       new_path="$input_path"
33553     fi
33554   fi
33555 
33556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33557   if test "x$test_cygdrive_prefix" = x; then
33558     # As a simple fix, exclude /usr/bin since it's not a real path.
33559     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33561       # a path prefixed by /cygdrive for fixpath to work.
33562       new_path="$CYGWIN_ROOT_PATH$input_path"
33563     fi
33564   fi
33565 
33566   # remove trailing .exe if any
33567   new_path="${new_path/%.exe/}"
33568 
33569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33570 
33571   # First separate the path from the arguments. This will split at the first
33572   # space.
33573   complete="$OBJC"
33574   path="${complete%% *}"
33575   tmp="$complete EOL"
33576   arguments="${tmp#* }"
33577 
33578   # Input might be given as Windows format, start by converting to
33579   # unix format.
33580   new_path="$path"
33581 
33582   windows_path="$new_path"
33583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33584     unix_path=`$CYGPATH -u "$windows_path"`
33585     new_path="$unix_path"
33586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33588     new_path="$unix_path"
33589   fi
33590 
33591 
33592   # Now try to locate executable using which
33593   new_path=`$WHICH "$new_path" 2> /dev/null`
33594 
33595   if test "x$new_path" = x; then
33596     # Oops. Which didn't find the executable.
33597     # The splitting of arguments from the executable at a space might have been incorrect,
33598     # since paths with space are more likely in Windows. Give it another try with the whole
33599     # argument.
33600     path="$complete"
33601     arguments="EOL"
33602     new_path="$path"
33603 
33604   windows_path="$new_path"
33605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33606     unix_path=`$CYGPATH -u "$windows_path"`
33607     new_path="$unix_path"
33608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33610     new_path="$unix_path"
33611   fi
33612 
33613 
33614     new_path=`$WHICH "$new_path" 2> /dev/null`
33615     # bat and cmd files are not always considered executable in MSYS causing which
33616     # to not find them
33617     if test "x$new_path" = x \
33618         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33619         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33620       new_path="$path"
33621 
33622   windows_path="$new_path"
33623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33624     unix_path=`$CYGPATH -u "$windows_path"`
33625     new_path="$unix_path"
33626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33628     new_path="$unix_path"
33629   fi
33630 
33631     fi
33632 
33633     if test "x$new_path" = x; then
33634       # It's still not found. Now this is an unrecoverable error.
33635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33636 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33637       has_space=`$ECHO "$complete" | $GREP " "`
33638       if test "x$has_space" != x; then
33639         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33640 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33641       fi
33642       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33643     fi
33644   fi
33645 
33646   # Now new_path has a complete unix path to the binary
33647   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33648     # Keep paths in /bin as-is, but remove trailing .exe if any
33649     new_path="${new_path/%.exe/}"
33650     # Do not save /bin paths to all_fixpath_prefixes!
33651   else
33652     # Not in mixed or Windows style, start by that.
33653     new_path=`cmd //c echo $new_path`
33654 
33655   input_path="$new_path"
33656   # Check if we need to convert this using DOS-style short mode. If the path
33657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33658   # take no chances and rewrite it.
33659   # Note: m4 eats our [], so we need to use [ and ] instead.
33660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33661   if test "x$has_forbidden_chars" != x; then
33662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33663     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33664   fi
33665 
33666     # Output is in $new_path
33667 
33668   windows_path="$new_path"
33669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33670     unix_path=`$CYGPATH -u "$windows_path"`
33671     new_path="$unix_path"
33672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33673     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33674     new_path="$unix_path"
33675   fi
33676 
33677     # remove trailing .exe if any
33678     new_path="${new_path/%.exe/}"
33679 
33680     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33681     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33682   fi
33683 
33684   else
33685     # We're on a unix platform. Hooray! :)
33686     # First separate the path from the arguments. This will split at the first
33687     # space.
33688     complete="$OBJC"
33689     path="${complete%% *}"
33690     tmp="$complete EOL"
33691     arguments="${tmp#* }"
33692 
33693     # Cannot rely on the command "which" here since it doesn't always work.
33694     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33695     if test -z "$is_absolute_path"; then
33696       # Path to executable is not absolute. Find it.
33697       IFS_save="$IFS"
33698       IFS=:
33699       for p in $PATH; do
33700         if test -f "$p/$path" && test -x "$p/$path"; then
33701           new_path="$p/$path"
33702           break
33703         fi
33704       done
33705       IFS="$IFS_save"
33706     else
33707       # This is an absolute path, we can use it without further modifications.
33708       new_path="$path"
33709     fi
33710 
33711     if test "x$new_path" = x; then
33712       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33713 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33714       has_space=`$ECHO "$complete" | $GREP " "`
33715       if test "x$has_space" != x; then
33716         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33717 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33718       fi
33719       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33720     fi
33721   fi
33722 
33723   # Now join together the path and the arguments once again
33724   if test "x$arguments" != xEOL; then
33725     new_complete="$new_path ${arguments% *}"
33726   else
33727     new_complete="$new_path"
33728   fi
33729 
33730   if test "x$complete" != "x$new_complete"; then
33731     OBJC="$new_complete"
33732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33733 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33734   fi
33735 
33736 
33737 
33738   # Publish this variable in the help.
33739 
33740 
33741   if test "x$LIPO" = x; then
33742     # The variable is not set by user, try to locate tool using the code snippet
33743     for ac_prog in lipo
33744 do
33745   # Extract the first word of "$ac_prog", so it can be a program name with args.
33746 set dummy $ac_prog; ac_word=$2
33747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33748 $as_echo_n "checking for $ac_word... " >&6; }
33749 if ${ac_cv_path_LIPO+:} false; then :
33750   $as_echo_n "(cached) " >&6
33751 else
33752   case $LIPO in
33753   [\\/]* | ?:[\\/]*)
33754   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33755   ;;
33756   *)
33757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33758 for as_dir in $PATH
33759 do
33760   IFS=$as_save_IFS
33761   test -z "$as_dir" && as_dir=.
33762     for ac_exec_ext in '' $ac_executable_extensions; do
33763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33764     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33766     break 2
33767   fi
33768 done
33769   done
33770 IFS=$as_save_IFS
33771 
33772   ;;
33773 esac
33774 fi
33775 LIPO=$ac_cv_path_LIPO
33776 if test -n "$LIPO"; then
33777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33778 $as_echo "$LIPO" >&6; }
33779 else
33780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33781 $as_echo "no" >&6; }
33782 fi
33783 
33784 
33785   test -n "$LIPO" && break
33786 done
33787 
33788   else
33789     # The variable is set, but is it from the command line or the environment?
33790 
33791     # Try to remove the string !LIPO! from our list.
33792     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33793     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33794       # If it failed, the variable was not from the command line. Ignore it,
33795       # but warn the user (except for BASH, which is always set by the calling BASH).
33796       if test "xLIPO" != xBASH; then
33797         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33798 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33799       fi
33800       # Try to locate tool using the code snippet
33801       for ac_prog in lipo
33802 do
33803   # Extract the first word of "$ac_prog", so it can be a program name with args.
33804 set dummy $ac_prog; ac_word=$2
33805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33806 $as_echo_n "checking for $ac_word... " >&6; }
33807 if ${ac_cv_path_LIPO+:} false; then :
33808   $as_echo_n "(cached) " >&6
33809 else
33810   case $LIPO in
33811   [\\/]* | ?:[\\/]*)
33812   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33813   ;;
33814   *)
33815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33816 for as_dir in $PATH
33817 do
33818   IFS=$as_save_IFS
33819   test -z "$as_dir" && as_dir=.
33820     for ac_exec_ext in '' $ac_executable_extensions; do
33821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33822     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33824     break 2
33825   fi
33826 done
33827   done
33828 IFS=$as_save_IFS
33829 
33830   ;;
33831 esac
33832 fi
33833 LIPO=$ac_cv_path_LIPO
33834 if test -n "$LIPO"; then
33835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33836 $as_echo "$LIPO" >&6; }
33837 else
33838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33839 $as_echo "no" >&6; }
33840 fi
33841 
33842 
33843   test -n "$LIPO" && break
33844 done
33845 
33846     else
33847       # If it succeeded, then it was overridden by the user. We will use it
33848       # for the tool.
33849 
33850       # First remove it from the list of overridden variables, so we can test
33851       # for unknown variables in the end.
33852       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33853 
33854       # Check if the provided tool contains a complete path.
33855       tool_specified="$LIPO"
33856       tool_basename="${tool_specified##*/}"
33857       if test "x$tool_basename" = "x$tool_specified"; then
33858         # A command without a complete path is provided, search $PATH.
33859         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33860 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33861         # Extract the first word of "$tool_basename", so it can be a program name with args.
33862 set dummy $tool_basename; ac_word=$2
33863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33864 $as_echo_n "checking for $ac_word... " >&6; }
33865 if ${ac_cv_path_LIPO+:} false; then :
33866   $as_echo_n "(cached) " >&6
33867 else
33868   case $LIPO in
33869   [\\/]* | ?:[\\/]*)
33870   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33871   ;;
33872   *)
33873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33874 for as_dir in $PATH
33875 do
33876   IFS=$as_save_IFS
33877   test -z "$as_dir" && as_dir=.
33878     for ac_exec_ext in '' $ac_executable_extensions; do
33879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33880     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33882     break 2
33883   fi
33884 done
33885   done
33886 IFS=$as_save_IFS
33887 
33888   ;;
33889 esac
33890 fi
33891 LIPO=$ac_cv_path_LIPO
33892 if test -n "$LIPO"; then
33893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33894 $as_echo "$LIPO" >&6; }
33895 else
33896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33897 $as_echo "no" >&6; }
33898 fi
33899 
33900 
33901         if test "x$LIPO" = x; then
33902           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33903         fi
33904       else
33905         # Otherwise we believe it is a complete path. Use it as it is.
33906         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33907 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33909 $as_echo_n "checking for LIPO... " >&6; }
33910         if test ! -x "$tool_specified"; then
33911           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33912 $as_echo "not found" >&6; }
33913           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33914         fi
33915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33916 $as_echo "$tool_specified" >&6; }
33917       fi
33918     fi
33919   fi
33920 
33921 
33922 
33923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33924 
33925   # First separate the path from the arguments. This will split at the first
33926   # space.
33927   complete="$LIPO"
33928   path="${complete%% *}"
33929   tmp="$complete EOL"
33930   arguments="${tmp#* }"
33931 
33932   # Input might be given as Windows format, start by converting to
33933   # unix format.
33934   new_path=`$CYGPATH -u "$path"`
33935 
33936   # Now try to locate executable using which
33937   new_path=`$WHICH "$new_path" 2> /dev/null`
33938   # bat and cmd files are not always considered executable in cygwin causing which
33939   # to not find them
33940   if test "x$new_path" = x \
33941       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33942       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33943     new_path=`$CYGPATH -u "$path"`
33944   fi
33945   if test "x$new_path" = x; then
33946     # Oops. Which didn't find the executable.
33947     # The splitting of arguments from the executable at a space might have been incorrect,
33948     # since paths with space are more likely in Windows. Give it another try with the whole
33949     # argument.
33950     path="$complete"
33951     arguments="EOL"
33952     new_path=`$CYGPATH -u "$path"`
33953     new_path=`$WHICH "$new_path" 2> /dev/null`
33954     # bat and cmd files are not always considered executable in cygwin causing which
33955     # to not find them
33956     if test "x$new_path" = x \
33957         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33958         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33959       new_path=`$CYGPATH -u "$path"`
33960     fi
33961     if test "x$new_path" = x; then
33962       # It's still not found. Now this is an unrecoverable error.
33963       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33964 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33965       has_space=`$ECHO "$complete" | $GREP " "`
33966       if test "x$has_space" != x; then
33967         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33968 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33969       fi
33970       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33971     fi
33972   fi
33973 
33974   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33975   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33976   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33977   # "foo.exe" is OK but "foo" is an error.
33978   #
33979   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33980   # It is also a way to make sure we got the proper file name for the real test later on.
33981   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33982   if test "x$test_shortpath" = x; then
33983     # Short path failed, file does not exist as specified.
33984     # Try adding .exe or .cmd
33985     if test -f "${new_path}.exe"; then
33986       input_to_shortpath="${new_path}.exe"
33987     elif test -f "${new_path}.cmd"; then
33988       input_to_shortpath="${new_path}.cmd"
33989     else
33990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33991 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33992       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33993 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33994       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33995     fi
33996   else
33997     input_to_shortpath="$new_path"
33998   fi
33999 
34000   # Call helper function which possibly converts this using DOS-style short mode.
34001   # If so, the updated path is stored in $new_path.
34002   new_path="$input_to_shortpath"
34003 
34004   input_path="$input_to_shortpath"
34005   # Check if we need to convert this using DOS-style short mode. If the path
34006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34007   # take no chances and rewrite it.
34008   # Note: m4 eats our [], so we need to use [ and ] instead.
34009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34010   if test "x$has_forbidden_chars" != x; then
34011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34012     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34013     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34014     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34015       # Going to short mode and back again did indeed matter. Since short mode is
34016       # case insensitive, let's make it lowercase to improve readability.
34017       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34018       # Now convert it back to Unix-stile (cygpath)
34019       input_path=`$CYGPATH -u "$shortmode_path"`
34020       new_path="$input_path"
34021     fi
34022   fi
34023 
34024   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34025   if test "x$test_cygdrive_prefix" = x; then
34026     # As a simple fix, exclude /usr/bin since it's not a real path.
34027     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34028       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34029       # a path prefixed by /cygdrive for fixpath to work.
34030       new_path="$CYGWIN_ROOT_PATH$input_path"
34031     fi
34032   fi
34033 
34034   # remove trailing .exe if any
34035   new_path="${new_path/%.exe/}"
34036 
34037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34038 
34039   # First separate the path from the arguments. This will split at the first
34040   # space.
34041   complete="$LIPO"
34042   path="${complete%% *}"
34043   tmp="$complete EOL"
34044   arguments="${tmp#* }"
34045 
34046   # Input might be given as Windows format, start by converting to
34047   # unix format.
34048   new_path="$path"
34049 
34050   windows_path="$new_path"
34051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34052     unix_path=`$CYGPATH -u "$windows_path"`
34053     new_path="$unix_path"
34054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34055     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34056     new_path="$unix_path"
34057   fi
34058 
34059 
34060   # Now try to locate executable using which
34061   new_path=`$WHICH "$new_path" 2> /dev/null`
34062 
34063   if test "x$new_path" = x; then
34064     # Oops. Which didn't find the executable.
34065     # The splitting of arguments from the executable at a space might have been incorrect,
34066     # since paths with space are more likely in Windows. Give it another try with the whole
34067     # argument.
34068     path="$complete"
34069     arguments="EOL"
34070     new_path="$path"
34071 
34072   windows_path="$new_path"
34073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34074     unix_path=`$CYGPATH -u "$windows_path"`
34075     new_path="$unix_path"
34076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34077     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34078     new_path="$unix_path"
34079   fi
34080 
34081 
34082     new_path=`$WHICH "$new_path" 2> /dev/null`
34083     # bat and cmd files are not always considered executable in MSYS causing which
34084     # to not find them
34085     if test "x$new_path" = x \
34086         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34087         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34088       new_path="$path"
34089 
34090   windows_path="$new_path"
34091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34092     unix_path=`$CYGPATH -u "$windows_path"`
34093     new_path="$unix_path"
34094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34096     new_path="$unix_path"
34097   fi
34098 
34099     fi
34100 
34101     if test "x$new_path" = x; then
34102       # It's still not found. Now this is an unrecoverable error.
34103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34104 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34105       has_space=`$ECHO "$complete" | $GREP " "`
34106       if test "x$has_space" != x; then
34107         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34108 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34109       fi
34110       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34111     fi
34112   fi
34113 
34114   # Now new_path has a complete unix path to the binary
34115   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34116     # Keep paths in /bin as-is, but remove trailing .exe if any
34117     new_path="${new_path/%.exe/}"
34118     # Do not save /bin paths to all_fixpath_prefixes!
34119   else
34120     # Not in mixed or Windows style, start by that.
34121     new_path=`cmd //c echo $new_path`
34122 
34123   input_path="$new_path"
34124   # Check if we need to convert this using DOS-style short mode. If the path
34125   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34126   # take no chances and rewrite it.
34127   # Note: m4 eats our [], so we need to use [ and ] instead.
34128   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34129   if test "x$has_forbidden_chars" != x; then
34130     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34131     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34132   fi
34133 
34134     # Output is in $new_path
34135 
34136   windows_path="$new_path"
34137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34138     unix_path=`$CYGPATH -u "$windows_path"`
34139     new_path="$unix_path"
34140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34142     new_path="$unix_path"
34143   fi
34144 
34145     # remove trailing .exe if any
34146     new_path="${new_path/%.exe/}"
34147 
34148     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34149     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34150   fi
34151 
34152   else
34153     # We're on a unix platform. Hooray! :)
34154     # First separate the path from the arguments. This will split at the first
34155     # space.
34156     complete="$LIPO"
34157     path="${complete%% *}"
34158     tmp="$complete EOL"
34159     arguments="${tmp#* }"
34160 
34161     # Cannot rely on the command "which" here since it doesn't always work.
34162     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34163     if test -z "$is_absolute_path"; then
34164       # Path to executable is not absolute. Find it.
34165       IFS_save="$IFS"
34166       IFS=:
34167       for p in $PATH; do
34168         if test -f "$p/$path" && test -x "$p/$path"; then
34169           new_path="$p/$path"
34170           break
34171         fi
34172       done
34173       IFS="$IFS_save"
34174     else
34175       # This is an absolute path, we can use it without further modifications.
34176       new_path="$path"
34177     fi
34178 
34179     if test "x$new_path" = x; then
34180       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34181 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34182       has_space=`$ECHO "$complete" | $GREP " "`
34183       if test "x$has_space" != x; then
34184         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34185 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34186       fi
34187       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34188     fi
34189   fi
34190 
34191   # Now join together the path and the arguments once again
34192   if test "x$arguments" != xEOL; then
34193     new_complete="$new_path ${arguments% *}"
34194   else
34195     new_complete="$new_path"
34196   fi
34197 
34198   if test "x$complete" != "x$new_complete"; then
34199     LIPO="$new_complete"
34200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34201 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34202   fi
34203 
34204   else
34205     OBJC=
34206   fi
34207 
34208   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34209     # Extract the first word of "mt", so it can be a program name with args.
34210 set dummy mt; ac_word=$2
34211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34212 $as_echo_n "checking for $ac_word... " >&6; }
34213 if ${ac_cv_prog_MT+:} false; then :
34214   $as_echo_n "(cached) " >&6
34215 else
34216   if test -n "$MT"; then
34217   ac_cv_prog_MT="$MT" # Let the user override the test.
34218 else
34219   ac_prog_rejected=no
34220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34221 for as_dir in $PATH
34222 do
34223   IFS=$as_save_IFS
34224   test -z "$as_dir" && as_dir=.
34225     for ac_exec_ext in '' $ac_executable_extensions; do
34226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34227     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34228        ac_prog_rejected=yes
34229        continue
34230      fi
34231     ac_cv_prog_MT="mt"
34232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34233     break 2
34234   fi
34235 done
34236   done
34237 IFS=$as_save_IFS
34238 
34239 if test $ac_prog_rejected = yes; then
34240   # We found a bogon in the path, so make sure we never use it.
34241   set dummy $ac_cv_prog_MT
34242   shift
34243   if test $# != 0; then
34244     # We chose a different compiler from the bogus one.
34245     # However, it has the same basename, so the bogon will be chosen
34246     # first if we set MT to just the basename; use the full file name.
34247     shift
34248     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34249   fi
34250 fi
34251 fi
34252 fi
34253 MT=$ac_cv_prog_MT
34254 if test -n "$MT"; then
34255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34256 $as_echo "$MT" >&6; }
34257 else
34258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34259 $as_echo "no" >&6; }
34260 fi
34261 
34262 
34263 
34264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34265 
34266   # First separate the path from the arguments. This will split at the first
34267   # space.
34268   complete="$MT"
34269   path="${complete%% *}"
34270   tmp="$complete EOL"
34271   arguments="${tmp#* }"
34272 
34273   # Input might be given as Windows format, start by converting to
34274   # unix format.
34275   new_path=`$CYGPATH -u "$path"`
34276 
34277   # Now try to locate executable using which
34278   new_path=`$WHICH "$new_path" 2> /dev/null`
34279   # bat and cmd files are not always considered executable in cygwin causing which
34280   # to not find them
34281   if test "x$new_path" = x \
34282       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34283       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34284     new_path=`$CYGPATH -u "$path"`
34285   fi
34286   if test "x$new_path" = x; then
34287     # Oops. Which didn't find the executable.
34288     # The splitting of arguments from the executable at a space might have been incorrect,
34289     # since paths with space are more likely in Windows. Give it another try with the whole
34290     # argument.
34291     path="$complete"
34292     arguments="EOL"
34293     new_path=`$CYGPATH -u "$path"`
34294     new_path=`$WHICH "$new_path" 2> /dev/null`
34295     # bat and cmd files are not always considered executable in cygwin causing which
34296     # to not find them
34297     if test "x$new_path" = x \
34298         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34299         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34300       new_path=`$CYGPATH -u "$path"`
34301     fi
34302     if test "x$new_path" = x; then
34303       # It's still not found. Now this is an unrecoverable error.
34304       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34305 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34306       has_space=`$ECHO "$complete" | $GREP " "`
34307       if test "x$has_space" != x; then
34308         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34309 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34310       fi
34311       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34312     fi
34313   fi
34314 
34315   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34316   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34317   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34318   # "foo.exe" is OK but "foo" is an error.
34319   #
34320   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34321   # It is also a way to make sure we got the proper file name for the real test later on.
34322   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34323   if test "x$test_shortpath" = x; then
34324     # Short path failed, file does not exist as specified.
34325     # Try adding .exe or .cmd
34326     if test -f "${new_path}.exe"; then
34327       input_to_shortpath="${new_path}.exe"
34328     elif test -f "${new_path}.cmd"; then
34329       input_to_shortpath="${new_path}.cmd"
34330     else
34331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34332 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34333       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34334 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34335       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34336     fi
34337   else
34338     input_to_shortpath="$new_path"
34339   fi
34340 
34341   # Call helper function which possibly converts this using DOS-style short mode.
34342   # If so, the updated path is stored in $new_path.
34343   new_path="$input_to_shortpath"
34344 
34345   input_path="$input_to_shortpath"
34346   # Check if we need to convert this using DOS-style short mode. If the path
34347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34348   # take no chances and rewrite it.
34349   # Note: m4 eats our [], so we need to use [ and ] instead.
34350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34351   if test "x$has_forbidden_chars" != x; then
34352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34353     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34354     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34355     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34356       # Going to short mode and back again did indeed matter. Since short mode is
34357       # case insensitive, let's make it lowercase to improve readability.
34358       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34359       # Now convert it back to Unix-stile (cygpath)
34360       input_path=`$CYGPATH -u "$shortmode_path"`
34361       new_path="$input_path"
34362     fi
34363   fi
34364 
34365   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34366   if test "x$test_cygdrive_prefix" = x; then
34367     # As a simple fix, exclude /usr/bin since it's not a real path.
34368     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34369       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34370       # a path prefixed by /cygdrive for fixpath to work.
34371       new_path="$CYGWIN_ROOT_PATH$input_path"
34372     fi
34373   fi
34374 
34375   # remove trailing .exe if any
34376   new_path="${new_path/%.exe/}"
34377 
34378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34379 
34380   # First separate the path from the arguments. This will split at the first
34381   # space.
34382   complete="$MT"
34383   path="${complete%% *}"
34384   tmp="$complete EOL"
34385   arguments="${tmp#* }"
34386 
34387   # Input might be given as Windows format, start by converting to
34388   # unix format.
34389   new_path="$path"
34390 
34391   windows_path="$new_path"
34392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34393     unix_path=`$CYGPATH -u "$windows_path"`
34394     new_path="$unix_path"
34395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34396     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34397     new_path="$unix_path"
34398   fi
34399 
34400 
34401   # Now try to locate executable using which
34402   new_path=`$WHICH "$new_path" 2> /dev/null`
34403 
34404   if test "x$new_path" = x; then
34405     # Oops. Which didn't find the executable.
34406     # The splitting of arguments from the executable at a space might have been incorrect,
34407     # since paths with space are more likely in Windows. Give it another try with the whole
34408     # argument.
34409     path="$complete"
34410     arguments="EOL"
34411     new_path="$path"
34412 
34413   windows_path="$new_path"
34414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34415     unix_path=`$CYGPATH -u "$windows_path"`
34416     new_path="$unix_path"
34417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34418     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34419     new_path="$unix_path"
34420   fi
34421 
34422 
34423     new_path=`$WHICH "$new_path" 2> /dev/null`
34424     # bat and cmd files are not always considered executable in MSYS causing which
34425     # to not find them
34426     if test "x$new_path" = x \
34427         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34428         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34429       new_path="$path"
34430 
34431   windows_path="$new_path"
34432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34433     unix_path=`$CYGPATH -u "$windows_path"`
34434     new_path="$unix_path"
34435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34437     new_path="$unix_path"
34438   fi
34439 
34440     fi
34441 
34442     if test "x$new_path" = x; then
34443       # It's still not found. Now this is an unrecoverable error.
34444       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34445 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34446       has_space=`$ECHO "$complete" | $GREP " "`
34447       if test "x$has_space" != x; then
34448         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34449 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34450       fi
34451       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34452     fi
34453   fi
34454 
34455   # Now new_path has a complete unix path to the binary
34456   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34457     # Keep paths in /bin as-is, but remove trailing .exe if any
34458     new_path="${new_path/%.exe/}"
34459     # Do not save /bin paths to all_fixpath_prefixes!
34460   else
34461     # Not in mixed or Windows style, start by that.
34462     new_path=`cmd //c echo $new_path`
34463 
34464   input_path="$new_path"
34465   # Check if we need to convert this using DOS-style short mode. If the path
34466   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34467   # take no chances and rewrite it.
34468   # Note: m4 eats our [], so we need to use [ and ] instead.
34469   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34470   if test "x$has_forbidden_chars" != x; then
34471     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34472     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34473   fi
34474 
34475     # Output is in $new_path
34476 
34477   windows_path="$new_path"
34478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34479     unix_path=`$CYGPATH -u "$windows_path"`
34480     new_path="$unix_path"
34481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34482     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34483     new_path="$unix_path"
34484   fi
34485 
34486     # remove trailing .exe if any
34487     new_path="${new_path/%.exe/}"
34488 
34489     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34490     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34491   fi
34492 
34493   else
34494     # We're on a unix platform. Hooray! :)
34495     # First separate the path from the arguments. This will split at the first
34496     # space.
34497     complete="$MT"
34498     path="${complete%% *}"
34499     tmp="$complete EOL"
34500     arguments="${tmp#* }"
34501 
34502     # Cannot rely on the command "which" here since it doesn't always work.
34503     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34504     if test -z "$is_absolute_path"; then
34505       # Path to executable is not absolute. Find it.
34506       IFS_save="$IFS"
34507       IFS=:
34508       for p in $PATH; do
34509         if test -f "$p/$path" && test -x "$p/$path"; then
34510           new_path="$p/$path"
34511           break
34512         fi
34513       done
34514       IFS="$IFS_save"
34515     else
34516       # This is an absolute path, we can use it without further modifications.
34517       new_path="$path"
34518     fi
34519 
34520     if test "x$new_path" = x; then
34521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34522 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34523       has_space=`$ECHO "$complete" | $GREP " "`
34524       if test "x$has_space" != x; then
34525         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34526 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34527       fi
34528       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34529     fi
34530   fi
34531 
34532   # Now join together the path and the arguments once again
34533   if test "x$arguments" != xEOL; then
34534     new_complete="$new_path ${arguments% *}"
34535   else
34536     new_complete="$new_path"
34537   fi
34538 
34539   if test "x$complete" != "x$new_complete"; then
34540     MT="$new_complete"
34541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34542 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34543   fi
34544 
34545     # Setup the resource compiler (RC)
34546     # Extract the first word of "rc", so it can be a program name with args.
34547 set dummy rc; ac_word=$2
34548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34549 $as_echo_n "checking for $ac_word... " >&6; }
34550 if ${ac_cv_prog_RC+:} false; then :
34551   $as_echo_n "(cached) " >&6
34552 else
34553   if test -n "$RC"; then
34554   ac_cv_prog_RC="$RC" # Let the user override the test.
34555 else
34556   ac_prog_rejected=no
34557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34558 for as_dir in $PATH
34559 do
34560   IFS=$as_save_IFS
34561   test -z "$as_dir" && as_dir=.
34562     for ac_exec_ext in '' $ac_executable_extensions; do
34563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34564     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34565        ac_prog_rejected=yes
34566        continue
34567      fi
34568     ac_cv_prog_RC="rc"
34569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34570     break 2
34571   fi
34572 done
34573   done
34574 IFS=$as_save_IFS
34575 
34576 if test $ac_prog_rejected = yes; then
34577   # We found a bogon in the path, so make sure we never use it.
34578   set dummy $ac_cv_prog_RC
34579   shift
34580   if test $# != 0; then
34581     # We chose a different compiler from the bogus one.
34582     # However, it has the same basename, so the bogon will be chosen
34583     # first if we set RC to just the basename; use the full file name.
34584     shift
34585     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34586   fi
34587 fi
34588 fi
34589 fi
34590 RC=$ac_cv_prog_RC
34591 if test -n "$RC"; then
34592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34593 $as_echo "$RC" >&6; }
34594 else
34595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34596 $as_echo "no" >&6; }
34597 fi
34598 
34599 
34600 
34601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34602 
34603   # First separate the path from the arguments. This will split at the first
34604   # space.
34605   complete="$RC"
34606   path="${complete%% *}"
34607   tmp="$complete EOL"
34608   arguments="${tmp#* }"
34609 
34610   # Input might be given as Windows format, start by converting to
34611   # unix format.
34612   new_path=`$CYGPATH -u "$path"`
34613 
34614   # Now try to locate executable using which
34615   new_path=`$WHICH "$new_path" 2> /dev/null`
34616   # bat and cmd files are not always considered executable in cygwin causing which
34617   # to not find them
34618   if test "x$new_path" = x \
34619       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34620       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34621     new_path=`$CYGPATH -u "$path"`
34622   fi
34623   if test "x$new_path" = x; then
34624     # Oops. Which didn't find the executable.
34625     # The splitting of arguments from the executable at a space might have been incorrect,
34626     # since paths with space are more likely in Windows. Give it another try with the whole
34627     # argument.
34628     path="$complete"
34629     arguments="EOL"
34630     new_path=`$CYGPATH -u "$path"`
34631     new_path=`$WHICH "$new_path" 2> /dev/null`
34632     # bat and cmd files are not always considered executable in cygwin causing which
34633     # to not find them
34634     if test "x$new_path" = x \
34635         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34636         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34637       new_path=`$CYGPATH -u "$path"`
34638     fi
34639     if test "x$new_path" = x; then
34640       # It's still not found. Now this is an unrecoverable error.
34641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34642 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34643       has_space=`$ECHO "$complete" | $GREP " "`
34644       if test "x$has_space" != x; then
34645         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34646 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34647       fi
34648       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34649     fi
34650   fi
34651 
34652   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34653   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34654   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34655   # "foo.exe" is OK but "foo" is an error.
34656   #
34657   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34658   # It is also a way to make sure we got the proper file name for the real test later on.
34659   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34660   if test "x$test_shortpath" = x; then
34661     # Short path failed, file does not exist as specified.
34662     # Try adding .exe or .cmd
34663     if test -f "${new_path}.exe"; then
34664       input_to_shortpath="${new_path}.exe"
34665     elif test -f "${new_path}.cmd"; then
34666       input_to_shortpath="${new_path}.cmd"
34667     else
34668       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34669 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34670       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34671 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34672       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34673     fi
34674   else
34675     input_to_shortpath="$new_path"
34676   fi
34677 
34678   # Call helper function which possibly converts this using DOS-style short mode.
34679   # If so, the updated path is stored in $new_path.
34680   new_path="$input_to_shortpath"
34681 
34682   input_path="$input_to_shortpath"
34683   # Check if we need to convert this using DOS-style short mode. If the path
34684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34685   # take no chances and rewrite it.
34686   # Note: m4 eats our [], so we need to use [ and ] instead.
34687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34688   if test "x$has_forbidden_chars" != x; then
34689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34693       # Going to short mode and back again did indeed matter. Since short mode is
34694       # case insensitive, let's make it lowercase to improve readability.
34695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34696       # Now convert it back to Unix-stile (cygpath)
34697       input_path=`$CYGPATH -u "$shortmode_path"`
34698       new_path="$input_path"
34699     fi
34700   fi
34701 
34702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34703   if test "x$test_cygdrive_prefix" = x; then
34704     # As a simple fix, exclude /usr/bin since it's not a real path.
34705     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34707       # a path prefixed by /cygdrive for fixpath to work.
34708       new_path="$CYGWIN_ROOT_PATH$input_path"
34709     fi
34710   fi
34711 
34712   # remove trailing .exe if any
34713   new_path="${new_path/%.exe/}"
34714 
34715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34716 
34717   # First separate the path from the arguments. This will split at the first
34718   # space.
34719   complete="$RC"
34720   path="${complete%% *}"
34721   tmp="$complete EOL"
34722   arguments="${tmp#* }"
34723 
34724   # Input might be given as Windows format, start by converting to
34725   # unix format.
34726   new_path="$path"
34727 
34728   windows_path="$new_path"
34729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34730     unix_path=`$CYGPATH -u "$windows_path"`
34731     new_path="$unix_path"
34732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34734     new_path="$unix_path"
34735   fi
34736 
34737 
34738   # Now try to locate executable using which
34739   new_path=`$WHICH "$new_path" 2> /dev/null`
34740 
34741   if test "x$new_path" = x; then
34742     # Oops. Which didn't find the executable.
34743     # The splitting of arguments from the executable at a space might have been incorrect,
34744     # since paths with space are more likely in Windows. Give it another try with the whole
34745     # argument.
34746     path="$complete"
34747     arguments="EOL"
34748     new_path="$path"
34749 
34750   windows_path="$new_path"
34751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34752     unix_path=`$CYGPATH -u "$windows_path"`
34753     new_path="$unix_path"
34754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34756     new_path="$unix_path"
34757   fi
34758 
34759 
34760     new_path=`$WHICH "$new_path" 2> /dev/null`
34761     # bat and cmd files are not always considered executable in MSYS causing which
34762     # to not find them
34763     if test "x$new_path" = x \
34764         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34765         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34766       new_path="$path"
34767 
34768   windows_path="$new_path"
34769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34770     unix_path=`$CYGPATH -u "$windows_path"`
34771     new_path="$unix_path"
34772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34774     new_path="$unix_path"
34775   fi
34776 
34777     fi
34778 
34779     if test "x$new_path" = x; then
34780       # It's still not found. Now this is an unrecoverable error.
34781       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34782 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34783       has_space=`$ECHO "$complete" | $GREP " "`
34784       if test "x$has_space" != x; then
34785         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34786 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34787       fi
34788       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34789     fi
34790   fi
34791 
34792   # Now new_path has a complete unix path to the binary
34793   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34794     # Keep paths in /bin as-is, but remove trailing .exe if any
34795     new_path="${new_path/%.exe/}"
34796     # Do not save /bin paths to all_fixpath_prefixes!
34797   else
34798     # Not in mixed or Windows style, start by that.
34799     new_path=`cmd //c echo $new_path`
34800 
34801   input_path="$new_path"
34802   # Check if we need to convert this using DOS-style short mode. If the path
34803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34804   # take no chances and rewrite it.
34805   # Note: m4 eats our [], so we need to use [ and ] instead.
34806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34807   if test "x$has_forbidden_chars" != x; then
34808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34809     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34810   fi
34811 
34812     # Output is in $new_path
34813 
34814   windows_path="$new_path"
34815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34816     unix_path=`$CYGPATH -u "$windows_path"`
34817     new_path="$unix_path"
34818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34820     new_path="$unix_path"
34821   fi
34822 
34823     # remove trailing .exe if any
34824     new_path="${new_path/%.exe/}"
34825 
34826     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34827     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34828   fi
34829 
34830   else
34831     # We're on a unix platform. Hooray! :)
34832     # First separate the path from the arguments. This will split at the first
34833     # space.
34834     complete="$RC"
34835     path="${complete%% *}"
34836     tmp="$complete EOL"
34837     arguments="${tmp#* }"
34838 
34839     # Cannot rely on the command "which" here since it doesn't always work.
34840     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34841     if test -z "$is_absolute_path"; then
34842       # Path to executable is not absolute. Find it.
34843       IFS_save="$IFS"
34844       IFS=:
34845       for p in $PATH; do
34846         if test -f "$p/$path" && test -x "$p/$path"; then
34847           new_path="$p/$path"
34848           break
34849         fi
34850       done
34851       IFS="$IFS_save"
34852     else
34853       # This is an absolute path, we can use it without further modifications.
34854       new_path="$path"
34855     fi
34856 
34857     if test "x$new_path" = x; then
34858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34859 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34860       has_space=`$ECHO "$complete" | $GREP " "`
34861       if test "x$has_space" != x; then
34862         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34863 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34864       fi
34865       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34866     fi
34867   fi
34868 
34869   # Now join together the path and the arguments once again
34870   if test "x$arguments" != xEOL; then
34871     new_complete="$new_path ${arguments% *}"
34872   else
34873     new_complete="$new_path"
34874   fi
34875 
34876   if test "x$complete" != "x$new_complete"; then
34877     RC="$new_complete"
34878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34879 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34880   fi
34881 
34882     # Extract the first word of "dumpbin", so it can be a program name with args.
34883 set dummy dumpbin; ac_word=$2
34884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34885 $as_echo_n "checking for $ac_word... " >&6; }
34886 if ${ac_cv_prog_DUMPBIN+:} false; then :
34887   $as_echo_n "(cached) " >&6
34888 else
34889   if test -n "$DUMPBIN"; then
34890   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34891 else
34892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34893 for as_dir in $PATH
34894 do
34895   IFS=$as_save_IFS
34896   test -z "$as_dir" && as_dir=.
34897     for ac_exec_ext in '' $ac_executable_extensions; do
34898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34899     ac_cv_prog_DUMPBIN="dumpbin"
34900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34901     break 2
34902   fi
34903 done
34904   done
34905 IFS=$as_save_IFS
34906 
34907 fi
34908 fi
34909 DUMPBIN=$ac_cv_prog_DUMPBIN
34910 if test -n "$DUMPBIN"; then
34911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34912 $as_echo "$DUMPBIN" >&6; }
34913 else
34914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34915 $as_echo "no" >&6; }
34916 fi
34917 
34918 
34919 
34920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34921 
34922   # First separate the path from the arguments. This will split at the first
34923   # space.
34924   complete="$DUMPBIN"
34925   path="${complete%% *}"
34926   tmp="$complete EOL"
34927   arguments="${tmp#* }"
34928 
34929   # Input might be given as Windows format, start by converting to
34930   # unix format.
34931   new_path=`$CYGPATH -u "$path"`
34932 
34933   # Now try to locate executable using which
34934   new_path=`$WHICH "$new_path" 2> /dev/null`
34935   # bat and cmd files are not always considered executable in cygwin causing which
34936   # to not find them
34937   if test "x$new_path" = x \
34938       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34939       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34940     new_path=`$CYGPATH -u "$path"`
34941   fi
34942   if test "x$new_path" = x; then
34943     # Oops. Which didn't find the executable.
34944     # The splitting of arguments from the executable at a space might have been incorrect,
34945     # since paths with space are more likely in Windows. Give it another try with the whole
34946     # argument.
34947     path="$complete"
34948     arguments="EOL"
34949     new_path=`$CYGPATH -u "$path"`
34950     new_path=`$WHICH "$new_path" 2> /dev/null`
34951     # bat and cmd files are not always considered executable in cygwin causing which
34952     # to not find them
34953     if test "x$new_path" = x \
34954         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34955         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34956       new_path=`$CYGPATH -u "$path"`
34957     fi
34958     if test "x$new_path" = x; then
34959       # It's still not found. Now this is an unrecoverable error.
34960       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34961 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34962       has_space=`$ECHO "$complete" | $GREP " "`
34963       if test "x$has_space" != x; then
34964         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34965 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34966       fi
34967       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34968     fi
34969   fi
34970 
34971   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34972   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34973   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34974   # "foo.exe" is OK but "foo" is an error.
34975   #
34976   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34977   # It is also a way to make sure we got the proper file name for the real test later on.
34978   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34979   if test "x$test_shortpath" = x; then
34980     # Short path failed, file does not exist as specified.
34981     # Try adding .exe or .cmd
34982     if test -f "${new_path}.exe"; then
34983       input_to_shortpath="${new_path}.exe"
34984     elif test -f "${new_path}.cmd"; then
34985       input_to_shortpath="${new_path}.cmd"
34986     else
34987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34988 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34989       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34990 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34991       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34992     fi
34993   else
34994     input_to_shortpath="$new_path"
34995   fi
34996 
34997   # Call helper function which possibly converts this using DOS-style short mode.
34998   # If so, the updated path is stored in $new_path.
34999   new_path="$input_to_shortpath"
35000 
35001   input_path="$input_to_shortpath"
35002   # Check if we need to convert this using DOS-style short mode. If the path
35003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35004   # take no chances and rewrite it.
35005   # Note: m4 eats our [], so we need to use [ and ] instead.
35006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35007   if test "x$has_forbidden_chars" != x; then
35008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35009     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35010     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35011     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35012       # Going to short mode and back again did indeed matter. Since short mode is
35013       # case insensitive, let's make it lowercase to improve readability.
35014       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35015       # Now convert it back to Unix-stile (cygpath)
35016       input_path=`$CYGPATH -u "$shortmode_path"`
35017       new_path="$input_path"
35018     fi
35019   fi
35020 
35021   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35022   if test "x$test_cygdrive_prefix" = x; then
35023     # As a simple fix, exclude /usr/bin since it's not a real path.
35024     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35025       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35026       # a path prefixed by /cygdrive for fixpath to work.
35027       new_path="$CYGWIN_ROOT_PATH$input_path"
35028     fi
35029   fi
35030 
35031   # remove trailing .exe if any
35032   new_path="${new_path/%.exe/}"
35033 
35034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35035 
35036   # First separate the path from the arguments. This will split at the first
35037   # space.
35038   complete="$DUMPBIN"
35039   path="${complete%% *}"
35040   tmp="$complete EOL"
35041   arguments="${tmp#* }"
35042 
35043   # Input might be given as Windows format, start by converting to
35044   # unix format.
35045   new_path="$path"
35046 
35047   windows_path="$new_path"
35048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35049     unix_path=`$CYGPATH -u "$windows_path"`
35050     new_path="$unix_path"
35051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35053     new_path="$unix_path"
35054   fi
35055 
35056 
35057   # Now try to locate executable using which
35058   new_path=`$WHICH "$new_path" 2> /dev/null`
35059 
35060   if test "x$new_path" = x; then
35061     # Oops. Which didn't find the executable.
35062     # The splitting of arguments from the executable at a space might have been incorrect,
35063     # since paths with space are more likely in Windows. Give it another try with the whole
35064     # argument.
35065     path="$complete"
35066     arguments="EOL"
35067     new_path="$path"
35068 
35069   windows_path="$new_path"
35070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35071     unix_path=`$CYGPATH -u "$windows_path"`
35072     new_path="$unix_path"
35073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35074     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35075     new_path="$unix_path"
35076   fi
35077 
35078 
35079     new_path=`$WHICH "$new_path" 2> /dev/null`
35080     # bat and cmd files are not always considered executable in MSYS causing which
35081     # to not find them
35082     if test "x$new_path" = x \
35083         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35084         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35085       new_path="$path"
35086 
35087   windows_path="$new_path"
35088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35089     unix_path=`$CYGPATH -u "$windows_path"`
35090     new_path="$unix_path"
35091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35093     new_path="$unix_path"
35094   fi
35095 
35096     fi
35097 
35098     if test "x$new_path" = x; then
35099       # It's still not found. Now this is an unrecoverable error.
35100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35101 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35102       has_space=`$ECHO "$complete" | $GREP " "`
35103       if test "x$has_space" != x; then
35104         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35105 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35106       fi
35107       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35108     fi
35109   fi
35110 
35111   # Now new_path has a complete unix path to the binary
35112   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35113     # Keep paths in /bin as-is, but remove trailing .exe if any
35114     new_path="${new_path/%.exe/}"
35115     # Do not save /bin paths to all_fixpath_prefixes!
35116   else
35117     # Not in mixed or Windows style, start by that.
35118     new_path=`cmd //c echo $new_path`
35119 
35120   input_path="$new_path"
35121   # Check if we need to convert this using DOS-style short mode. If the path
35122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35123   # take no chances and rewrite it.
35124   # Note: m4 eats our [], so we need to use [ and ] instead.
35125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35126   if test "x$has_forbidden_chars" != x; then
35127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35128     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35129   fi
35130 
35131     # Output is in $new_path
35132 
35133   windows_path="$new_path"
35134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35135     unix_path=`$CYGPATH -u "$windows_path"`
35136     new_path="$unix_path"
35137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35139     new_path="$unix_path"
35140   fi
35141 
35142     # remove trailing .exe if any
35143     new_path="${new_path/%.exe/}"
35144 
35145     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35146     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35147   fi
35148 
35149   else
35150     # We're on a unix platform. Hooray! :)
35151     # First separate the path from the arguments. This will split at the first
35152     # space.
35153     complete="$DUMPBIN"
35154     path="${complete%% *}"
35155     tmp="$complete EOL"
35156     arguments="${tmp#* }"
35157 
35158     # Cannot rely on the command "which" here since it doesn't always work.
35159     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35160     if test -z "$is_absolute_path"; then
35161       # Path to executable is not absolute. Find it.
35162       IFS_save="$IFS"
35163       IFS=:
35164       for p in $PATH; do
35165         if test -f "$p/$path" && test -x "$p/$path"; then
35166           new_path="$p/$path"
35167           break
35168         fi
35169       done
35170       IFS="$IFS_save"
35171     else
35172       # This is an absolute path, we can use it without further modifications.
35173       new_path="$path"
35174     fi
35175 
35176     if test "x$new_path" = x; then
35177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35178 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35179       has_space=`$ECHO "$complete" | $GREP " "`
35180       if test "x$has_space" != x; then
35181         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35182 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35183       fi
35184       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35185     fi
35186   fi
35187 
35188   # Now join together the path and the arguments once again
35189   if test "x$arguments" != xEOL; then
35190     new_complete="$new_path ${arguments% *}"
35191   else
35192     new_complete="$new_path"
35193   fi
35194 
35195   if test "x$complete" != "x$new_complete"; then
35196     DUMPBIN="$new_complete"
35197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35198 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35199   fi
35200 
35201     # We need to check for 'msbuild.exe' because at the place where we expect to
35202     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35203     # won't find the 'msbuild.exe' executable in that case (and the
35204     # 'ac_executable_extensions' is unusable due to performance reasons).
35205     # Notice that we intentionally don't fix up the path to MSBUILD because we
35206     # will call it in a DOS shell during freetype detection on Windows (see
35207     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35208     # Extract the first word of "msbuild.exe", so it can be a program name with args.
35209 set dummy msbuild.exe; ac_word=$2
35210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35211 $as_echo_n "checking for $ac_word... " >&6; }
35212 if ${ac_cv_prog_MSBUILD+:} false; then :
35213   $as_echo_n "(cached) " >&6
35214 else
35215   if test -n "$MSBUILD"; then
35216   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35217 else
35218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35219 for as_dir in $PATH
35220 do
35221   IFS=$as_save_IFS
35222   test -z "$as_dir" && as_dir=.
35223     for ac_exec_ext in '' $ac_executable_extensions; do
35224   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35225     ac_cv_prog_MSBUILD="msbuild.exe"
35226     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35227     break 2
35228   fi
35229 done
35230   done
35231 IFS=$as_save_IFS
35232 
35233 fi
35234 fi
35235 MSBUILD=$ac_cv_prog_MSBUILD
35236 if test -n "$MSBUILD"; then
35237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35238 $as_echo "$MSBUILD" >&6; }
35239 else
35240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35241 $as_echo "no" >&6; }
35242 fi
35243 
35244 
35245   fi
35246 
35247   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35248 
35249 
35250   # Publish this variable in the help.
35251 
35252 
35253   if test "x$STRIP" = x; then
35254     # The variable is not set by user, try to locate tool using the code snippet
35255     for ac_prog in strip
35256 do
35257   # Extract the first word of "$ac_prog", so it can be a program name with args.
35258 set dummy $ac_prog; ac_word=$2
35259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35260 $as_echo_n "checking for $ac_word... " >&6; }
35261 if ${ac_cv_path_STRIP+:} false; then :
35262   $as_echo_n "(cached) " >&6
35263 else
35264   case $STRIP in
35265   [\\/]* | ?:[\\/]*)
35266   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35267   ;;
35268   *)
35269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35270 for as_dir in $PATH
35271 do
35272   IFS=$as_save_IFS
35273   test -z "$as_dir" && as_dir=.
35274     for ac_exec_ext in '' $ac_executable_extensions; do
35275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35276     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35278     break 2
35279   fi
35280 done
35281   done
35282 IFS=$as_save_IFS
35283 
35284   ;;
35285 esac
35286 fi
35287 STRIP=$ac_cv_path_STRIP
35288 if test -n "$STRIP"; then
35289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35290 $as_echo "$STRIP" >&6; }
35291 else
35292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35293 $as_echo "no" >&6; }
35294 fi
35295 
35296 
35297   test -n "$STRIP" && break
35298 done
35299 
35300   else
35301     # The variable is set, but is it from the command line or the environment?
35302 
35303     # Try to remove the string !STRIP! from our list.
35304     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35305     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35306       # If it failed, the variable was not from the command line. Ignore it,
35307       # but warn the user (except for BASH, which is always set by the calling BASH).
35308       if test "xSTRIP" != xBASH; then
35309         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35310 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35311       fi
35312       # Try to locate tool using the code snippet
35313       for ac_prog in strip
35314 do
35315   # Extract the first word of "$ac_prog", so it can be a program name with args.
35316 set dummy $ac_prog; ac_word=$2
35317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35318 $as_echo_n "checking for $ac_word... " >&6; }
35319 if ${ac_cv_path_STRIP+:} false; then :
35320   $as_echo_n "(cached) " >&6
35321 else
35322   case $STRIP in
35323   [\\/]* | ?:[\\/]*)
35324   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35325   ;;
35326   *)
35327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35328 for as_dir in $PATH
35329 do
35330   IFS=$as_save_IFS
35331   test -z "$as_dir" && as_dir=.
35332     for ac_exec_ext in '' $ac_executable_extensions; do
35333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35334     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35336     break 2
35337   fi
35338 done
35339   done
35340 IFS=$as_save_IFS
35341 
35342   ;;
35343 esac
35344 fi
35345 STRIP=$ac_cv_path_STRIP
35346 if test -n "$STRIP"; then
35347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35348 $as_echo "$STRIP" >&6; }
35349 else
35350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35351 $as_echo "no" >&6; }
35352 fi
35353 
35354 
35355   test -n "$STRIP" && break
35356 done
35357 
35358     else
35359       # If it succeeded, then it was overridden by the user. We will use it
35360       # for the tool.
35361 
35362       # First remove it from the list of overridden variables, so we can test
35363       # for unknown variables in the end.
35364       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35365 
35366       # Check if the provided tool contains a complete path.
35367       tool_specified="$STRIP"
35368       tool_basename="${tool_specified##*/}"
35369       if test "x$tool_basename" = "x$tool_specified"; then
35370         # A command without a complete path is provided, search $PATH.
35371         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35372 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35373         # Extract the first word of "$tool_basename", so it can be a program name with args.
35374 set dummy $tool_basename; ac_word=$2
35375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35376 $as_echo_n "checking for $ac_word... " >&6; }
35377 if ${ac_cv_path_STRIP+:} false; then :
35378   $as_echo_n "(cached) " >&6
35379 else
35380   case $STRIP in
35381   [\\/]* | ?:[\\/]*)
35382   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35383   ;;
35384   *)
35385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35386 for as_dir in $PATH
35387 do
35388   IFS=$as_save_IFS
35389   test -z "$as_dir" && as_dir=.
35390     for ac_exec_ext in '' $ac_executable_extensions; do
35391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35392     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35394     break 2
35395   fi
35396 done
35397   done
35398 IFS=$as_save_IFS
35399 
35400   ;;
35401 esac
35402 fi
35403 STRIP=$ac_cv_path_STRIP
35404 if test -n "$STRIP"; then
35405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35406 $as_echo "$STRIP" >&6; }
35407 else
35408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35409 $as_echo "no" >&6; }
35410 fi
35411 
35412 
35413         if test "x$STRIP" = x; then
35414           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35415         fi
35416       else
35417         # Otherwise we believe it is a complete path. Use it as it is.
35418         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35419 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35420         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35421 $as_echo_n "checking for STRIP... " >&6; }
35422         if test ! -x "$tool_specified"; then
35423           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35424 $as_echo "not found" >&6; }
35425           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35426         fi
35427         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35428 $as_echo "$tool_specified" >&6; }
35429       fi
35430     fi
35431   fi
35432 
35433 
35434 
35435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35436 
35437   # First separate the path from the arguments. This will split at the first
35438   # space.
35439   complete="$STRIP"
35440   path="${complete%% *}"
35441   tmp="$complete EOL"
35442   arguments="${tmp#* }"
35443 
35444   # Input might be given as Windows format, start by converting to
35445   # unix format.
35446   new_path=`$CYGPATH -u "$path"`
35447 
35448   # Now try to locate executable using which
35449   new_path=`$WHICH "$new_path" 2> /dev/null`
35450   # bat and cmd files are not always considered executable in cygwin causing which
35451   # to not find them
35452   if test "x$new_path" = x \
35453       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35454       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35455     new_path=`$CYGPATH -u "$path"`
35456   fi
35457   if test "x$new_path" = x; then
35458     # Oops. Which didn't find the executable.
35459     # The splitting of arguments from the executable at a space might have been incorrect,
35460     # since paths with space are more likely in Windows. Give it another try with the whole
35461     # argument.
35462     path="$complete"
35463     arguments="EOL"
35464     new_path=`$CYGPATH -u "$path"`
35465     new_path=`$WHICH "$new_path" 2> /dev/null`
35466     # bat and cmd files are not always considered executable in cygwin causing which
35467     # to not find them
35468     if test "x$new_path" = x \
35469         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35470         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35471       new_path=`$CYGPATH -u "$path"`
35472     fi
35473     if test "x$new_path" = x; then
35474       # It's still not found. Now this is an unrecoverable error.
35475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35476 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35477       has_space=`$ECHO "$complete" | $GREP " "`
35478       if test "x$has_space" != x; then
35479         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35480 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35481       fi
35482       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35483     fi
35484   fi
35485 
35486   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35487   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35488   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35489   # "foo.exe" is OK but "foo" is an error.
35490   #
35491   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35492   # It is also a way to make sure we got the proper file name for the real test later on.
35493   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35494   if test "x$test_shortpath" = x; then
35495     # Short path failed, file does not exist as specified.
35496     # Try adding .exe or .cmd
35497     if test -f "${new_path}.exe"; then
35498       input_to_shortpath="${new_path}.exe"
35499     elif test -f "${new_path}.cmd"; then
35500       input_to_shortpath="${new_path}.cmd"
35501     else
35502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35503 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35504       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35505 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35506       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35507     fi
35508   else
35509     input_to_shortpath="$new_path"
35510   fi
35511 
35512   # Call helper function which possibly converts this using DOS-style short mode.
35513   # If so, the updated path is stored in $new_path.
35514   new_path="$input_to_shortpath"
35515 
35516   input_path="$input_to_shortpath"
35517   # Check if we need to convert this using DOS-style short mode. If the path
35518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35519   # take no chances and rewrite it.
35520   # Note: m4 eats our [], so we need to use [ and ] instead.
35521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35522   if test "x$has_forbidden_chars" != x; then
35523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35524     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35525     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35526     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35527       # Going to short mode and back again did indeed matter. Since short mode is
35528       # case insensitive, let's make it lowercase to improve readability.
35529       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35530       # Now convert it back to Unix-stile (cygpath)
35531       input_path=`$CYGPATH -u "$shortmode_path"`
35532       new_path="$input_path"
35533     fi
35534   fi
35535 
35536   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35537   if test "x$test_cygdrive_prefix" = x; then
35538     # As a simple fix, exclude /usr/bin since it's not a real path.
35539     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35540       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35541       # a path prefixed by /cygdrive for fixpath to work.
35542       new_path="$CYGWIN_ROOT_PATH$input_path"
35543     fi
35544   fi
35545 
35546   # remove trailing .exe if any
35547   new_path="${new_path/%.exe/}"
35548 
35549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35550 
35551   # First separate the path from the arguments. This will split at the first
35552   # space.
35553   complete="$STRIP"
35554   path="${complete%% *}"
35555   tmp="$complete EOL"
35556   arguments="${tmp#* }"
35557 
35558   # Input might be given as Windows format, start by converting to
35559   # unix format.
35560   new_path="$path"
35561 
35562   windows_path="$new_path"
35563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35564     unix_path=`$CYGPATH -u "$windows_path"`
35565     new_path="$unix_path"
35566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35568     new_path="$unix_path"
35569   fi
35570 
35571 
35572   # Now try to locate executable using which
35573   new_path=`$WHICH "$new_path" 2> /dev/null`
35574 
35575   if test "x$new_path" = x; then
35576     # Oops. Which didn't find the executable.
35577     # The splitting of arguments from the executable at a space might have been incorrect,
35578     # since paths with space are more likely in Windows. Give it another try with the whole
35579     # argument.
35580     path="$complete"
35581     arguments="EOL"
35582     new_path="$path"
35583 
35584   windows_path="$new_path"
35585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35586     unix_path=`$CYGPATH -u "$windows_path"`
35587     new_path="$unix_path"
35588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35590     new_path="$unix_path"
35591   fi
35592 
35593 
35594     new_path=`$WHICH "$new_path" 2> /dev/null`
35595     # bat and cmd files are not always considered executable in MSYS causing which
35596     # to not find them
35597     if test "x$new_path" = x \
35598         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35599         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35600       new_path="$path"
35601 
35602   windows_path="$new_path"
35603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35604     unix_path=`$CYGPATH -u "$windows_path"`
35605     new_path="$unix_path"
35606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35608     new_path="$unix_path"
35609   fi
35610 
35611     fi
35612 
35613     if test "x$new_path" = x; then
35614       # It's still not found. Now this is an unrecoverable error.
35615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35616 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35617       has_space=`$ECHO "$complete" | $GREP " "`
35618       if test "x$has_space" != x; then
35619         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35620 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35621       fi
35622       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35623     fi
35624   fi
35625 
35626   # Now new_path has a complete unix path to the binary
35627   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35628     # Keep paths in /bin as-is, but remove trailing .exe if any
35629     new_path="${new_path/%.exe/}"
35630     # Do not save /bin paths to all_fixpath_prefixes!
35631   else
35632     # Not in mixed or Windows style, start by that.
35633     new_path=`cmd //c echo $new_path`
35634 
35635   input_path="$new_path"
35636   # Check if we need to convert this using DOS-style short mode. If the path
35637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35638   # take no chances and rewrite it.
35639   # Note: m4 eats our [], so we need to use [ and ] instead.
35640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35641   if test "x$has_forbidden_chars" != x; then
35642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35644   fi
35645 
35646     # Output is in $new_path
35647 
35648   windows_path="$new_path"
35649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35650     unix_path=`$CYGPATH -u "$windows_path"`
35651     new_path="$unix_path"
35652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35654     new_path="$unix_path"
35655   fi
35656 
35657     # remove trailing .exe if any
35658     new_path="${new_path/%.exe/}"
35659 
35660     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35661     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35662   fi
35663 
35664   else
35665     # We're on a unix platform. Hooray! :)
35666     # First separate the path from the arguments. This will split at the first
35667     # space.
35668     complete="$STRIP"
35669     path="${complete%% *}"
35670     tmp="$complete EOL"
35671     arguments="${tmp#* }"
35672 
35673     # Cannot rely on the command "which" here since it doesn't always work.
35674     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35675     if test -z "$is_absolute_path"; then
35676       # Path to executable is not absolute. Find it.
35677       IFS_save="$IFS"
35678       IFS=:
35679       for p in $PATH; do
35680         if test -f "$p/$path" && test -x "$p/$path"; then
35681           new_path="$p/$path"
35682           break
35683         fi
35684       done
35685       IFS="$IFS_save"
35686     else
35687       # This is an absolute path, we can use it without further modifications.
35688       new_path="$path"
35689     fi
35690 
35691     if test "x$new_path" = x; then
35692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35693 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35694       has_space=`$ECHO "$complete" | $GREP " "`
35695       if test "x$has_space" != x; then
35696         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35697 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35698       fi
35699       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35700     fi
35701   fi
35702 
35703   # Now join together the path and the arguments once again
35704   if test "x$arguments" != xEOL; then
35705     new_complete="$new_path ${arguments% *}"
35706   else
35707     new_complete="$new_path"
35708   fi
35709 
35710   if test "x$complete" != "x$new_complete"; then
35711     STRIP="$new_complete"
35712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35713 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35714   fi
35715 
35716 
35717 
35718   # Publish this variable in the help.
35719 
35720 
35721   if test "x$NM" = x; then
35722     # The variable is not set by user, try to locate tool using the code snippet
35723     for ac_prog in nm
35724 do
35725   # Extract the first word of "$ac_prog", so it can be a program name with args.
35726 set dummy $ac_prog; ac_word=$2
35727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35728 $as_echo_n "checking for $ac_word... " >&6; }
35729 if ${ac_cv_path_NM+:} false; then :
35730   $as_echo_n "(cached) " >&6
35731 else
35732   case $NM in
35733   [\\/]* | ?:[\\/]*)
35734   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35735   ;;
35736   *)
35737   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35738 for as_dir in $PATH
35739 do
35740   IFS=$as_save_IFS
35741   test -z "$as_dir" && as_dir=.
35742     for ac_exec_ext in '' $ac_executable_extensions; do
35743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35744     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35746     break 2
35747   fi
35748 done
35749   done
35750 IFS=$as_save_IFS
35751 
35752   ;;
35753 esac
35754 fi
35755 NM=$ac_cv_path_NM
35756 if test -n "$NM"; then
35757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35758 $as_echo "$NM" >&6; }
35759 else
35760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35761 $as_echo "no" >&6; }
35762 fi
35763 
35764 
35765   test -n "$NM" && break
35766 done
35767 
35768   else
35769     # The variable is set, but is it from the command line or the environment?
35770 
35771     # Try to remove the string !NM! from our list.
35772     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35773     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35774       # If it failed, the variable was not from the command line. Ignore it,
35775       # but warn the user (except for BASH, which is always set by the calling BASH).
35776       if test "xNM" != xBASH; then
35777         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35778 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35779       fi
35780       # Try to locate tool using the code snippet
35781       for ac_prog in nm
35782 do
35783   # Extract the first word of "$ac_prog", so it can be a program name with args.
35784 set dummy $ac_prog; ac_word=$2
35785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35786 $as_echo_n "checking for $ac_word... " >&6; }
35787 if ${ac_cv_path_NM+:} false; then :
35788   $as_echo_n "(cached) " >&6
35789 else
35790   case $NM in
35791   [\\/]* | ?:[\\/]*)
35792   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35793   ;;
35794   *)
35795   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35796 for as_dir in $PATH
35797 do
35798   IFS=$as_save_IFS
35799   test -z "$as_dir" && as_dir=.
35800     for ac_exec_ext in '' $ac_executable_extensions; do
35801   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35802     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35804     break 2
35805   fi
35806 done
35807   done
35808 IFS=$as_save_IFS
35809 
35810   ;;
35811 esac
35812 fi
35813 NM=$ac_cv_path_NM
35814 if test -n "$NM"; then
35815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35816 $as_echo "$NM" >&6; }
35817 else
35818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35819 $as_echo "no" >&6; }
35820 fi
35821 
35822 
35823   test -n "$NM" && break
35824 done
35825 
35826     else
35827       # If it succeeded, then it was overridden by the user. We will use it
35828       # for the tool.
35829 
35830       # First remove it from the list of overridden variables, so we can test
35831       # for unknown variables in the end.
35832       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35833 
35834       # Check if the provided tool contains a complete path.
35835       tool_specified="$NM"
35836       tool_basename="${tool_specified##*/}"
35837       if test "x$tool_basename" = "x$tool_specified"; then
35838         # A command without a complete path is provided, search $PATH.
35839         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35840 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35841         # Extract the first word of "$tool_basename", so it can be a program name with args.
35842 set dummy $tool_basename; ac_word=$2
35843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35844 $as_echo_n "checking for $ac_word... " >&6; }
35845 if ${ac_cv_path_NM+:} false; then :
35846   $as_echo_n "(cached) " >&6
35847 else
35848   case $NM in
35849   [\\/]* | ?:[\\/]*)
35850   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35851   ;;
35852   *)
35853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35854 for as_dir in $PATH
35855 do
35856   IFS=$as_save_IFS
35857   test -z "$as_dir" && as_dir=.
35858     for ac_exec_ext in '' $ac_executable_extensions; do
35859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35860     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35862     break 2
35863   fi
35864 done
35865   done
35866 IFS=$as_save_IFS
35867 
35868   ;;
35869 esac
35870 fi
35871 NM=$ac_cv_path_NM
35872 if test -n "$NM"; then
35873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35874 $as_echo "$NM" >&6; }
35875 else
35876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35877 $as_echo "no" >&6; }
35878 fi
35879 
35880 
35881         if test "x$NM" = x; then
35882           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35883         fi
35884       else
35885         # Otherwise we believe it is a complete path. Use it as it is.
35886         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35887 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35888         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35889 $as_echo_n "checking for NM... " >&6; }
35890         if test ! -x "$tool_specified"; then
35891           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35892 $as_echo "not found" >&6; }
35893           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35894         fi
35895         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35896 $as_echo "$tool_specified" >&6; }
35897       fi
35898     fi
35899   fi
35900 
35901 
35902 
35903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35904 
35905   # First separate the path from the arguments. This will split at the first
35906   # space.
35907   complete="$NM"
35908   path="${complete%% *}"
35909   tmp="$complete EOL"
35910   arguments="${tmp#* }"
35911 
35912   # Input might be given as Windows format, start by converting to
35913   # unix format.
35914   new_path=`$CYGPATH -u "$path"`
35915 
35916   # Now try to locate executable using which
35917   new_path=`$WHICH "$new_path" 2> /dev/null`
35918   # bat and cmd files are not always considered executable in cygwin causing which
35919   # to not find them
35920   if test "x$new_path" = x \
35921       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35922       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35923     new_path=`$CYGPATH -u "$path"`
35924   fi
35925   if test "x$new_path" = x; then
35926     # Oops. Which didn't find the executable.
35927     # The splitting of arguments from the executable at a space might have been incorrect,
35928     # since paths with space are more likely in Windows. Give it another try with the whole
35929     # argument.
35930     path="$complete"
35931     arguments="EOL"
35932     new_path=`$CYGPATH -u "$path"`
35933     new_path=`$WHICH "$new_path" 2> /dev/null`
35934     # bat and cmd files are not always considered executable in cygwin causing which
35935     # to not find them
35936     if test "x$new_path" = x \
35937         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35938         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35939       new_path=`$CYGPATH -u "$path"`
35940     fi
35941     if test "x$new_path" = x; then
35942       # It's still not found. Now this is an unrecoverable error.
35943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35944 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35945       has_space=`$ECHO "$complete" | $GREP " "`
35946       if test "x$has_space" != x; then
35947         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35948 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35949       fi
35950       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35951     fi
35952   fi
35953 
35954   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35955   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35956   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35957   # "foo.exe" is OK but "foo" is an error.
35958   #
35959   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35960   # It is also a way to make sure we got the proper file name for the real test later on.
35961   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35962   if test "x$test_shortpath" = x; then
35963     # Short path failed, file does not exist as specified.
35964     # Try adding .exe or .cmd
35965     if test -f "${new_path}.exe"; then
35966       input_to_shortpath="${new_path}.exe"
35967     elif test -f "${new_path}.cmd"; then
35968       input_to_shortpath="${new_path}.cmd"
35969     else
35970       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35971 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35972       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35973 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35974       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35975     fi
35976   else
35977     input_to_shortpath="$new_path"
35978   fi
35979 
35980   # Call helper function which possibly converts this using DOS-style short mode.
35981   # If so, the updated path is stored in $new_path.
35982   new_path="$input_to_shortpath"
35983 
35984   input_path="$input_to_shortpath"
35985   # Check if we need to convert this using DOS-style short mode. If the path
35986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35987   # take no chances and rewrite it.
35988   # Note: m4 eats our [], so we need to use [ and ] instead.
35989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35990   if test "x$has_forbidden_chars" != x; then
35991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35992     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35993     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35994     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35995       # Going to short mode and back again did indeed matter. Since short mode is
35996       # case insensitive, let's make it lowercase to improve readability.
35997       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35998       # Now convert it back to Unix-stile (cygpath)
35999       input_path=`$CYGPATH -u "$shortmode_path"`
36000       new_path="$input_path"
36001     fi
36002   fi
36003 
36004   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36005   if test "x$test_cygdrive_prefix" = x; then
36006     # As a simple fix, exclude /usr/bin since it's not a real path.
36007     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36008       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36009       # a path prefixed by /cygdrive for fixpath to work.
36010       new_path="$CYGWIN_ROOT_PATH$input_path"
36011     fi
36012   fi
36013 
36014   # remove trailing .exe if any
36015   new_path="${new_path/%.exe/}"
36016 
36017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36018 
36019   # First separate the path from the arguments. This will split at the first
36020   # space.
36021   complete="$NM"
36022   path="${complete%% *}"
36023   tmp="$complete EOL"
36024   arguments="${tmp#* }"
36025 
36026   # Input might be given as Windows format, start by converting to
36027   # unix format.
36028   new_path="$path"
36029 
36030   windows_path="$new_path"
36031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36032     unix_path=`$CYGPATH -u "$windows_path"`
36033     new_path="$unix_path"
36034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36036     new_path="$unix_path"
36037   fi
36038 
36039 
36040   # Now try to locate executable using which
36041   new_path=`$WHICH "$new_path" 2> /dev/null`
36042 
36043   if test "x$new_path" = x; then
36044     # Oops. Which didn't find the executable.
36045     # The splitting of arguments from the executable at a space might have been incorrect,
36046     # since paths with space are more likely in Windows. Give it another try with the whole
36047     # argument.
36048     path="$complete"
36049     arguments="EOL"
36050     new_path="$path"
36051 
36052   windows_path="$new_path"
36053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36054     unix_path=`$CYGPATH -u "$windows_path"`
36055     new_path="$unix_path"
36056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36058     new_path="$unix_path"
36059   fi
36060 
36061 
36062     new_path=`$WHICH "$new_path" 2> /dev/null`
36063     # bat and cmd files are not always considered executable in MSYS causing which
36064     # to not find them
36065     if test "x$new_path" = x \
36066         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36067         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36068       new_path="$path"
36069 
36070   windows_path="$new_path"
36071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36072     unix_path=`$CYGPATH -u "$windows_path"`
36073     new_path="$unix_path"
36074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36076     new_path="$unix_path"
36077   fi
36078 
36079     fi
36080 
36081     if test "x$new_path" = x; then
36082       # It's still not found. Now this is an unrecoverable error.
36083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36084 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36085       has_space=`$ECHO "$complete" | $GREP " "`
36086       if test "x$has_space" != x; then
36087         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36088 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36089       fi
36090       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36091     fi
36092   fi
36093 
36094   # Now new_path has a complete unix path to the binary
36095   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36096     # Keep paths in /bin as-is, but remove trailing .exe if any
36097     new_path="${new_path/%.exe/}"
36098     # Do not save /bin paths to all_fixpath_prefixes!
36099   else
36100     # Not in mixed or Windows style, start by that.
36101     new_path=`cmd //c echo $new_path`
36102 
36103   input_path="$new_path"
36104   # Check if we need to convert this using DOS-style short mode. If the path
36105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36106   # take no chances and rewrite it.
36107   # Note: m4 eats our [], so we need to use [ and ] instead.
36108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36109   if test "x$has_forbidden_chars" != x; then
36110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36111     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36112   fi
36113 
36114     # Output is in $new_path
36115 
36116   windows_path="$new_path"
36117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36118     unix_path=`$CYGPATH -u "$windows_path"`
36119     new_path="$unix_path"
36120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36122     new_path="$unix_path"
36123   fi
36124 
36125     # remove trailing .exe if any
36126     new_path="${new_path/%.exe/}"
36127 
36128     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36129     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36130   fi
36131 
36132   else
36133     # We're on a unix platform. Hooray! :)
36134     # First separate the path from the arguments. This will split at the first
36135     # space.
36136     complete="$NM"
36137     path="${complete%% *}"
36138     tmp="$complete EOL"
36139     arguments="${tmp#* }"
36140 
36141     # Cannot rely on the command "which" here since it doesn't always work.
36142     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36143     if test -z "$is_absolute_path"; then
36144       # Path to executable is not absolute. Find it.
36145       IFS_save="$IFS"
36146       IFS=:
36147       for p in $PATH; do
36148         if test -f "$p/$path" && test -x "$p/$path"; then
36149           new_path="$p/$path"
36150           break
36151         fi
36152       done
36153       IFS="$IFS_save"
36154     else
36155       # This is an absolute path, we can use it without further modifications.
36156       new_path="$path"
36157     fi
36158 
36159     if test "x$new_path" = x; then
36160       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36161 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36162       has_space=`$ECHO "$complete" | $GREP " "`
36163       if test "x$has_space" != x; then
36164         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36165 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36166       fi
36167       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36168     fi
36169   fi
36170 
36171   # Now join together the path and the arguments once again
36172   if test "x$arguments" != xEOL; then
36173     new_complete="$new_path ${arguments% *}"
36174   else
36175     new_complete="$new_path"
36176   fi
36177 
36178   if test "x$complete" != "x$new_complete"; then
36179     NM="$new_complete"
36180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36181 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36182   fi
36183 
36184 
36185 
36186   # Publish this variable in the help.
36187 
36188 
36189   if test "x$GNM" = x; then
36190     # The variable is not set by user, try to locate tool using the code snippet
36191     for ac_prog in gnm
36192 do
36193   # Extract the first word of "$ac_prog", so it can be a program name with args.
36194 set dummy $ac_prog; ac_word=$2
36195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36196 $as_echo_n "checking for $ac_word... " >&6; }
36197 if ${ac_cv_path_GNM+:} false; then :
36198   $as_echo_n "(cached) " >&6
36199 else
36200   case $GNM in
36201   [\\/]* | ?:[\\/]*)
36202   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36203   ;;
36204   *)
36205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36206 for as_dir in $PATH
36207 do
36208   IFS=$as_save_IFS
36209   test -z "$as_dir" && as_dir=.
36210     for ac_exec_ext in '' $ac_executable_extensions; do
36211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36212     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36214     break 2
36215   fi
36216 done
36217   done
36218 IFS=$as_save_IFS
36219 
36220   ;;
36221 esac
36222 fi
36223 GNM=$ac_cv_path_GNM
36224 if test -n "$GNM"; then
36225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36226 $as_echo "$GNM" >&6; }
36227 else
36228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36229 $as_echo "no" >&6; }
36230 fi
36231 
36232 
36233   test -n "$GNM" && break
36234 done
36235 
36236   else
36237     # The variable is set, but is it from the command line or the environment?
36238 
36239     # Try to remove the string !GNM! from our list.
36240     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36241     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36242       # If it failed, the variable was not from the command line. Ignore it,
36243       # but warn the user (except for BASH, which is always set by the calling BASH).
36244       if test "xGNM" != xBASH; then
36245         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36246 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36247       fi
36248       # Try to locate tool using the code snippet
36249       for ac_prog in gnm
36250 do
36251   # Extract the first word of "$ac_prog", so it can be a program name with args.
36252 set dummy $ac_prog; ac_word=$2
36253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36254 $as_echo_n "checking for $ac_word... " >&6; }
36255 if ${ac_cv_path_GNM+:} false; then :
36256   $as_echo_n "(cached) " >&6
36257 else
36258   case $GNM in
36259   [\\/]* | ?:[\\/]*)
36260   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36261   ;;
36262   *)
36263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36264 for as_dir in $PATH
36265 do
36266   IFS=$as_save_IFS
36267   test -z "$as_dir" && as_dir=.
36268     for ac_exec_ext in '' $ac_executable_extensions; do
36269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36270     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36272     break 2
36273   fi
36274 done
36275   done
36276 IFS=$as_save_IFS
36277 
36278   ;;
36279 esac
36280 fi
36281 GNM=$ac_cv_path_GNM
36282 if test -n "$GNM"; then
36283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36284 $as_echo "$GNM" >&6; }
36285 else
36286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36287 $as_echo "no" >&6; }
36288 fi
36289 
36290 
36291   test -n "$GNM" && break
36292 done
36293 
36294     else
36295       # If it succeeded, then it was overridden by the user. We will use it
36296       # for the tool.
36297 
36298       # First remove it from the list of overridden variables, so we can test
36299       # for unknown variables in the end.
36300       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36301 
36302       # Check if the provided tool contains a complete path.
36303       tool_specified="$GNM"
36304       tool_basename="${tool_specified##*/}"
36305       if test "x$tool_basename" = "x$tool_specified"; then
36306         # A command without a complete path is provided, search $PATH.
36307         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36308 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36309         # Extract the first word of "$tool_basename", so it can be a program name with args.
36310 set dummy $tool_basename; ac_word=$2
36311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36312 $as_echo_n "checking for $ac_word... " >&6; }
36313 if ${ac_cv_path_GNM+:} false; then :
36314   $as_echo_n "(cached) " >&6
36315 else
36316   case $GNM in
36317   [\\/]* | ?:[\\/]*)
36318   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36319   ;;
36320   *)
36321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36322 for as_dir in $PATH
36323 do
36324   IFS=$as_save_IFS
36325   test -z "$as_dir" && as_dir=.
36326     for ac_exec_ext in '' $ac_executable_extensions; do
36327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36328     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36330     break 2
36331   fi
36332 done
36333   done
36334 IFS=$as_save_IFS
36335 
36336   ;;
36337 esac
36338 fi
36339 GNM=$ac_cv_path_GNM
36340 if test -n "$GNM"; then
36341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36342 $as_echo "$GNM" >&6; }
36343 else
36344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36345 $as_echo "no" >&6; }
36346 fi
36347 
36348 
36349         if test "x$GNM" = x; then
36350           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36351         fi
36352       else
36353         # Otherwise we believe it is a complete path. Use it as it is.
36354         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36355 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36357 $as_echo_n "checking for GNM... " >&6; }
36358         if test ! -x "$tool_specified"; then
36359           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36360 $as_echo "not found" >&6; }
36361           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36362         fi
36363         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36364 $as_echo "$tool_specified" >&6; }
36365       fi
36366     fi
36367   fi
36368 
36369 
36370 
36371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36372 
36373   # First separate the path from the arguments. This will split at the first
36374   # space.
36375   complete="$GNM"
36376   path="${complete%% *}"
36377   tmp="$complete EOL"
36378   arguments="${tmp#* }"
36379 
36380   # Input might be given as Windows format, start by converting to
36381   # unix format.
36382   new_path=`$CYGPATH -u "$path"`
36383 
36384   # Now try to locate executable using which
36385   new_path=`$WHICH "$new_path" 2> /dev/null`
36386   # bat and cmd files are not always considered executable in cygwin causing which
36387   # to not find them
36388   if test "x$new_path" = x \
36389       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36390       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36391     new_path=`$CYGPATH -u "$path"`
36392   fi
36393   if test "x$new_path" = x; then
36394     # Oops. Which didn't find the executable.
36395     # The splitting of arguments from the executable at a space might have been incorrect,
36396     # since paths with space are more likely in Windows. Give it another try with the whole
36397     # argument.
36398     path="$complete"
36399     arguments="EOL"
36400     new_path=`$CYGPATH -u "$path"`
36401     new_path=`$WHICH "$new_path" 2> /dev/null`
36402     # bat and cmd files are not always considered executable in cygwin causing which
36403     # to not find them
36404     if test "x$new_path" = x \
36405         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36406         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36407       new_path=`$CYGPATH -u "$path"`
36408     fi
36409     if test "x$new_path" = x; then
36410       # It's still not found. Now this is an unrecoverable error.
36411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36412 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36413       has_space=`$ECHO "$complete" | $GREP " "`
36414       if test "x$has_space" != x; then
36415         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36417       fi
36418       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36419     fi
36420   fi
36421 
36422   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36423   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36424   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36425   # "foo.exe" is OK but "foo" is an error.
36426   #
36427   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36428   # It is also a way to make sure we got the proper file name for the real test later on.
36429   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36430   if test "x$test_shortpath" = x; then
36431     # Short path failed, file does not exist as specified.
36432     # Try adding .exe or .cmd
36433     if test -f "${new_path}.exe"; then
36434       input_to_shortpath="${new_path}.exe"
36435     elif test -f "${new_path}.cmd"; then
36436       input_to_shortpath="${new_path}.cmd"
36437     else
36438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36439 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36440       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36441 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36442       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36443     fi
36444   else
36445     input_to_shortpath="$new_path"
36446   fi
36447 
36448   # Call helper function which possibly converts this using DOS-style short mode.
36449   # If so, the updated path is stored in $new_path.
36450   new_path="$input_to_shortpath"
36451 
36452   input_path="$input_to_shortpath"
36453   # Check if we need to convert this using DOS-style short mode. If the path
36454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36455   # take no chances and rewrite it.
36456   # Note: m4 eats our [], so we need to use [ and ] instead.
36457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36458   if test "x$has_forbidden_chars" != x; then
36459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36460     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36461     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36462     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36463       # Going to short mode and back again did indeed matter. Since short mode is
36464       # case insensitive, let's make it lowercase to improve readability.
36465       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36466       # Now convert it back to Unix-stile (cygpath)
36467       input_path=`$CYGPATH -u "$shortmode_path"`
36468       new_path="$input_path"
36469     fi
36470   fi
36471 
36472   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36473   if test "x$test_cygdrive_prefix" = x; then
36474     # As a simple fix, exclude /usr/bin since it's not a real path.
36475     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36476       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36477       # a path prefixed by /cygdrive for fixpath to work.
36478       new_path="$CYGWIN_ROOT_PATH$input_path"
36479     fi
36480   fi
36481 
36482   # remove trailing .exe if any
36483   new_path="${new_path/%.exe/}"
36484 
36485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36486 
36487   # First separate the path from the arguments. This will split at the first
36488   # space.
36489   complete="$GNM"
36490   path="${complete%% *}"
36491   tmp="$complete EOL"
36492   arguments="${tmp#* }"
36493 
36494   # Input might be given as Windows format, start by converting to
36495   # unix format.
36496   new_path="$path"
36497 
36498   windows_path="$new_path"
36499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36500     unix_path=`$CYGPATH -u "$windows_path"`
36501     new_path="$unix_path"
36502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36504     new_path="$unix_path"
36505   fi
36506 
36507 
36508   # Now try to locate executable using which
36509   new_path=`$WHICH "$new_path" 2> /dev/null`
36510 
36511   if test "x$new_path" = x; then
36512     # Oops. Which didn't find the executable.
36513     # The splitting of arguments from the executable at a space might have been incorrect,
36514     # since paths with space are more likely in Windows. Give it another try with the whole
36515     # argument.
36516     path="$complete"
36517     arguments="EOL"
36518     new_path="$path"
36519 
36520   windows_path="$new_path"
36521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36522     unix_path=`$CYGPATH -u "$windows_path"`
36523     new_path="$unix_path"
36524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36526     new_path="$unix_path"
36527   fi
36528 
36529 
36530     new_path=`$WHICH "$new_path" 2> /dev/null`
36531     # bat and cmd files are not always considered executable in MSYS causing which
36532     # to not find them
36533     if test "x$new_path" = x \
36534         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36535         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36536       new_path="$path"
36537 
36538   windows_path="$new_path"
36539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36540     unix_path=`$CYGPATH -u "$windows_path"`
36541     new_path="$unix_path"
36542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36544     new_path="$unix_path"
36545   fi
36546 
36547     fi
36548 
36549     if test "x$new_path" = x; then
36550       # It's still not found. Now this is an unrecoverable error.
36551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36552 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36553       has_space=`$ECHO "$complete" | $GREP " "`
36554       if test "x$has_space" != x; then
36555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36557       fi
36558       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36559     fi
36560   fi
36561 
36562   # Now new_path has a complete unix path to the binary
36563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36564     # Keep paths in /bin as-is, but remove trailing .exe if any
36565     new_path="${new_path/%.exe/}"
36566     # Do not save /bin paths to all_fixpath_prefixes!
36567   else
36568     # Not in mixed or Windows style, start by that.
36569     new_path=`cmd //c echo $new_path`
36570 
36571   input_path="$new_path"
36572   # Check if we need to convert this using DOS-style short mode. If the path
36573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36574   # take no chances and rewrite it.
36575   # Note: m4 eats our [], so we need to use [ and ] instead.
36576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36577   if test "x$has_forbidden_chars" != x; then
36578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36580   fi
36581 
36582     # Output is in $new_path
36583 
36584   windows_path="$new_path"
36585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36586     unix_path=`$CYGPATH -u "$windows_path"`
36587     new_path="$unix_path"
36588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36590     new_path="$unix_path"
36591   fi
36592 
36593     # remove trailing .exe if any
36594     new_path="${new_path/%.exe/}"
36595 
36596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36598   fi
36599 
36600   else
36601     # We're on a unix platform. Hooray! :)
36602     # First separate the path from the arguments. This will split at the first
36603     # space.
36604     complete="$GNM"
36605     path="${complete%% *}"
36606     tmp="$complete EOL"
36607     arguments="${tmp#* }"
36608 
36609     # Cannot rely on the command "which" here since it doesn't always work.
36610     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36611     if test -z "$is_absolute_path"; then
36612       # Path to executable is not absolute. Find it.
36613       IFS_save="$IFS"
36614       IFS=:
36615       for p in $PATH; do
36616         if test -f "$p/$path" && test -x "$p/$path"; then
36617           new_path="$p/$path"
36618           break
36619         fi
36620       done
36621       IFS="$IFS_save"
36622     else
36623       # This is an absolute path, we can use it without further modifications.
36624       new_path="$path"
36625     fi
36626 
36627     if test "x$new_path" = x; then
36628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36629 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36630       has_space=`$ECHO "$complete" | $GREP " "`
36631       if test "x$has_space" != x; then
36632         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36633 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36634       fi
36635       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36636     fi
36637   fi
36638 
36639   # Now join together the path and the arguments once again
36640   if test "x$arguments" != xEOL; then
36641     new_complete="$new_path ${arguments% *}"
36642   else
36643     new_complete="$new_path"
36644   fi
36645 
36646   if test "x$complete" != "x$new_complete"; then
36647     GNM="$new_complete"
36648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36649 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36650   fi
36651 
36652 
36653 
36654 
36655   # Publish this variable in the help.
36656 
36657 
36658   if test "x$MCS" = x; then
36659     # The variable is not set by user, try to locate tool using the code snippet
36660     for ac_prog in mcs
36661 do
36662   # Extract the first word of "$ac_prog", so it can be a program name with args.
36663 set dummy $ac_prog; ac_word=$2
36664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36665 $as_echo_n "checking for $ac_word... " >&6; }
36666 if ${ac_cv_path_MCS+:} false; then :
36667   $as_echo_n "(cached) " >&6
36668 else
36669   case $MCS in
36670   [\\/]* | ?:[\\/]*)
36671   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36672   ;;
36673   *)
36674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36675 for as_dir in $PATH
36676 do
36677   IFS=$as_save_IFS
36678   test -z "$as_dir" && as_dir=.
36679     for ac_exec_ext in '' $ac_executable_extensions; do
36680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36681     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36683     break 2
36684   fi
36685 done
36686   done
36687 IFS=$as_save_IFS
36688 
36689   ;;
36690 esac
36691 fi
36692 MCS=$ac_cv_path_MCS
36693 if test -n "$MCS"; then
36694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36695 $as_echo "$MCS" >&6; }
36696 else
36697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36698 $as_echo "no" >&6; }
36699 fi
36700 
36701 
36702   test -n "$MCS" && break
36703 done
36704 
36705   else
36706     # The variable is set, but is it from the command line or the environment?
36707 
36708     # Try to remove the string !MCS! from our list.
36709     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36710     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36711       # If it failed, the variable was not from the command line. Ignore it,
36712       # but warn the user (except for BASH, which is always set by the calling BASH).
36713       if test "xMCS" != xBASH; then
36714         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36715 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36716       fi
36717       # Try to locate tool using the code snippet
36718       for ac_prog in mcs
36719 do
36720   # Extract the first word of "$ac_prog", so it can be a program name with args.
36721 set dummy $ac_prog; ac_word=$2
36722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36723 $as_echo_n "checking for $ac_word... " >&6; }
36724 if ${ac_cv_path_MCS+:} false; then :
36725   $as_echo_n "(cached) " >&6
36726 else
36727   case $MCS in
36728   [\\/]* | ?:[\\/]*)
36729   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36730   ;;
36731   *)
36732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36733 for as_dir in $PATH
36734 do
36735   IFS=$as_save_IFS
36736   test -z "$as_dir" && as_dir=.
36737     for ac_exec_ext in '' $ac_executable_extensions; do
36738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36739     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36741     break 2
36742   fi
36743 done
36744   done
36745 IFS=$as_save_IFS
36746 
36747   ;;
36748 esac
36749 fi
36750 MCS=$ac_cv_path_MCS
36751 if test -n "$MCS"; then
36752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36753 $as_echo "$MCS" >&6; }
36754 else
36755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36756 $as_echo "no" >&6; }
36757 fi
36758 
36759 
36760   test -n "$MCS" && break
36761 done
36762 
36763     else
36764       # If it succeeded, then it was overridden by the user. We will use it
36765       # for the tool.
36766 
36767       # First remove it from the list of overridden variables, so we can test
36768       # for unknown variables in the end.
36769       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36770 
36771       # Check if the provided tool contains a complete path.
36772       tool_specified="$MCS"
36773       tool_basename="${tool_specified##*/}"
36774       if test "x$tool_basename" = "x$tool_specified"; then
36775         # A command without a complete path is provided, search $PATH.
36776         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36777 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36778         # Extract the first word of "$tool_basename", so it can be a program name with args.
36779 set dummy $tool_basename; ac_word=$2
36780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36781 $as_echo_n "checking for $ac_word... " >&6; }
36782 if ${ac_cv_path_MCS+:} false; then :
36783   $as_echo_n "(cached) " >&6
36784 else
36785   case $MCS in
36786   [\\/]* | ?:[\\/]*)
36787   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36788   ;;
36789   *)
36790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36791 for as_dir in $PATH
36792 do
36793   IFS=$as_save_IFS
36794   test -z "$as_dir" && as_dir=.
36795     for ac_exec_ext in '' $ac_executable_extensions; do
36796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36797     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36799     break 2
36800   fi
36801 done
36802   done
36803 IFS=$as_save_IFS
36804 
36805   ;;
36806 esac
36807 fi
36808 MCS=$ac_cv_path_MCS
36809 if test -n "$MCS"; then
36810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36811 $as_echo "$MCS" >&6; }
36812 else
36813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36814 $as_echo "no" >&6; }
36815 fi
36816 
36817 
36818         if test "x$MCS" = x; then
36819           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36820         fi
36821       else
36822         # Otherwise we believe it is a complete path. Use it as it is.
36823         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36824 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36825         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36826 $as_echo_n "checking for MCS... " >&6; }
36827         if test ! -x "$tool_specified"; then
36828           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36829 $as_echo "not found" >&6; }
36830           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36831         fi
36832         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36833 $as_echo "$tool_specified" >&6; }
36834       fi
36835     fi
36836   fi
36837 
36838 
36839 
36840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36841 
36842   # First separate the path from the arguments. This will split at the first
36843   # space.
36844   complete="$MCS"
36845   path="${complete%% *}"
36846   tmp="$complete EOL"
36847   arguments="${tmp#* }"
36848 
36849   # Input might be given as Windows format, start by converting to
36850   # unix format.
36851   new_path=`$CYGPATH -u "$path"`
36852 
36853   # Now try to locate executable using which
36854   new_path=`$WHICH "$new_path" 2> /dev/null`
36855   # bat and cmd files are not always considered executable in cygwin causing which
36856   # to not find them
36857   if test "x$new_path" = x \
36858       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36859       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36860     new_path=`$CYGPATH -u "$path"`
36861   fi
36862   if test "x$new_path" = x; then
36863     # Oops. Which didn't find the executable.
36864     # The splitting of arguments from the executable at a space might have been incorrect,
36865     # since paths with space are more likely in Windows. Give it another try with the whole
36866     # argument.
36867     path="$complete"
36868     arguments="EOL"
36869     new_path=`$CYGPATH -u "$path"`
36870     new_path=`$WHICH "$new_path" 2> /dev/null`
36871     # bat and cmd files are not always considered executable in cygwin causing which
36872     # to not find them
36873     if test "x$new_path" = x \
36874         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36875         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36876       new_path=`$CYGPATH -u "$path"`
36877     fi
36878     if test "x$new_path" = x; then
36879       # It's still not found. Now this is an unrecoverable error.
36880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36881 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36882       has_space=`$ECHO "$complete" | $GREP " "`
36883       if test "x$has_space" != x; then
36884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36886       fi
36887       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36888     fi
36889   fi
36890 
36891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36894   # "foo.exe" is OK but "foo" is an error.
36895   #
36896   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36897   # It is also a way to make sure we got the proper file name for the real test later on.
36898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36899   if test "x$test_shortpath" = x; then
36900     # Short path failed, file does not exist as specified.
36901     # Try adding .exe or .cmd
36902     if test -f "${new_path}.exe"; then
36903       input_to_shortpath="${new_path}.exe"
36904     elif test -f "${new_path}.cmd"; then
36905       input_to_shortpath="${new_path}.cmd"
36906     else
36907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36908 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36909       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36910 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36911       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36912     fi
36913   else
36914     input_to_shortpath="$new_path"
36915   fi
36916 
36917   # Call helper function which possibly converts this using DOS-style short mode.
36918   # If so, the updated path is stored in $new_path.
36919   new_path="$input_to_shortpath"
36920 
36921   input_path="$input_to_shortpath"
36922   # Check if we need to convert this using DOS-style short mode. If the path
36923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36924   # take no chances and rewrite it.
36925   # Note: m4 eats our [], so we need to use [ and ] instead.
36926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36927   if test "x$has_forbidden_chars" != x; then
36928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36929     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36930     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36931     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36932       # Going to short mode and back again did indeed matter. Since short mode is
36933       # case insensitive, let's make it lowercase to improve readability.
36934       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36935       # Now convert it back to Unix-stile (cygpath)
36936       input_path=`$CYGPATH -u "$shortmode_path"`
36937       new_path="$input_path"
36938     fi
36939   fi
36940 
36941   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36942   if test "x$test_cygdrive_prefix" = x; then
36943     # As a simple fix, exclude /usr/bin since it's not a real path.
36944     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36945       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36946       # a path prefixed by /cygdrive for fixpath to work.
36947       new_path="$CYGWIN_ROOT_PATH$input_path"
36948     fi
36949   fi
36950 
36951   # remove trailing .exe if any
36952   new_path="${new_path/%.exe/}"
36953 
36954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36955 
36956   # First separate the path from the arguments. This will split at the first
36957   # space.
36958   complete="$MCS"
36959   path="${complete%% *}"
36960   tmp="$complete EOL"
36961   arguments="${tmp#* }"
36962 
36963   # Input might be given as Windows format, start by converting to
36964   # unix format.
36965   new_path="$path"
36966 
36967   windows_path="$new_path"
36968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36969     unix_path=`$CYGPATH -u "$windows_path"`
36970     new_path="$unix_path"
36971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36973     new_path="$unix_path"
36974   fi
36975 
36976 
36977   # Now try to locate executable using which
36978   new_path=`$WHICH "$new_path" 2> /dev/null`
36979 
36980   if test "x$new_path" = x; then
36981     # Oops. Which didn't find the executable.
36982     # The splitting of arguments from the executable at a space might have been incorrect,
36983     # since paths with space are more likely in Windows. Give it another try with the whole
36984     # argument.
36985     path="$complete"
36986     arguments="EOL"
36987     new_path="$path"
36988 
36989   windows_path="$new_path"
36990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36991     unix_path=`$CYGPATH -u "$windows_path"`
36992     new_path="$unix_path"
36993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36995     new_path="$unix_path"
36996   fi
36997 
36998 
36999     new_path=`$WHICH "$new_path" 2> /dev/null`
37000     # bat and cmd files are not always considered executable in MSYS causing which
37001     # to not find them
37002     if test "x$new_path" = x \
37003         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37004         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37005       new_path="$path"
37006 
37007   windows_path="$new_path"
37008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37009     unix_path=`$CYGPATH -u "$windows_path"`
37010     new_path="$unix_path"
37011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37013     new_path="$unix_path"
37014   fi
37015 
37016     fi
37017 
37018     if test "x$new_path" = x; then
37019       # It's still not found. Now this is an unrecoverable error.
37020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37021 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37022       has_space=`$ECHO "$complete" | $GREP " "`
37023       if test "x$has_space" != x; then
37024         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37025 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37026       fi
37027       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37028     fi
37029   fi
37030 
37031   # Now new_path has a complete unix path to the binary
37032   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37033     # Keep paths in /bin as-is, but remove trailing .exe if any
37034     new_path="${new_path/%.exe/}"
37035     # Do not save /bin paths to all_fixpath_prefixes!
37036   else
37037     # Not in mixed or Windows style, start by that.
37038     new_path=`cmd //c echo $new_path`
37039 
37040   input_path="$new_path"
37041   # Check if we need to convert this using DOS-style short mode. If the path
37042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37043   # take no chances and rewrite it.
37044   # Note: m4 eats our [], so we need to use [ and ] instead.
37045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37046   if test "x$has_forbidden_chars" != x; then
37047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37048     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37049   fi
37050 
37051     # Output is in $new_path
37052 
37053   windows_path="$new_path"
37054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37055     unix_path=`$CYGPATH -u "$windows_path"`
37056     new_path="$unix_path"
37057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37059     new_path="$unix_path"
37060   fi
37061 
37062     # remove trailing .exe if any
37063     new_path="${new_path/%.exe/}"
37064 
37065     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37066     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37067   fi
37068 
37069   else
37070     # We're on a unix platform. Hooray! :)
37071     # First separate the path from the arguments. This will split at the first
37072     # space.
37073     complete="$MCS"
37074     path="${complete%% *}"
37075     tmp="$complete EOL"
37076     arguments="${tmp#* }"
37077 
37078     # Cannot rely on the command "which" here since it doesn't always work.
37079     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37080     if test -z "$is_absolute_path"; then
37081       # Path to executable is not absolute. Find it.
37082       IFS_save="$IFS"
37083       IFS=:
37084       for p in $PATH; do
37085         if test -f "$p/$path" && test -x "$p/$path"; then
37086           new_path="$p/$path"
37087           break
37088         fi
37089       done
37090       IFS="$IFS_save"
37091     else
37092       # This is an absolute path, we can use it without further modifications.
37093       new_path="$path"
37094     fi
37095 
37096     if test "x$new_path" = x; then
37097       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37098 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37099       has_space=`$ECHO "$complete" | $GREP " "`
37100       if test "x$has_space" != x; then
37101         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37102 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37103       fi
37104       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37105     fi
37106   fi
37107 
37108   # Now join together the path and the arguments once again
37109   if test "x$arguments" != xEOL; then
37110     new_complete="$new_path ${arguments% *}"
37111   else
37112     new_complete="$new_path"
37113   fi
37114 
37115   if test "x$complete" != "x$new_complete"; then
37116     MCS="$new_complete"
37117     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37118 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37119   fi
37120 
37121   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37122     # FIXME: we should unify this with the solaris case above.
37123 
37124 
37125   # Publish this variable in the help.
37126 
37127 
37128   if test "x$STRIP" = x; then
37129     # The variable is not set by user, try to locate tool using the code snippet
37130     if test -n "$ac_tool_prefix"; then
37131   for ac_prog in strip
37132   do
37133     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37134 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37136 $as_echo_n "checking for $ac_word... " >&6; }
37137 if ${ac_cv_prog_STRIP+:} false; then :
37138   $as_echo_n "(cached) " >&6
37139 else
37140   if test -n "$STRIP"; then
37141   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37142 else
37143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37144 for as_dir in $PATH
37145 do
37146   IFS=$as_save_IFS
37147   test -z "$as_dir" && as_dir=.
37148     for ac_exec_ext in '' $ac_executable_extensions; do
37149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37150     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37152     break 2
37153   fi
37154 done
37155   done
37156 IFS=$as_save_IFS
37157 
37158 fi
37159 fi
37160 STRIP=$ac_cv_prog_STRIP
37161 if test -n "$STRIP"; then
37162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37163 $as_echo "$STRIP" >&6; }
37164 else
37165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37166 $as_echo "no" >&6; }
37167 fi
37168 
37169 
37170     test -n "$STRIP" && break
37171   done
37172 fi
37173 if test -z "$STRIP"; then
37174   ac_ct_STRIP=$STRIP
37175   for ac_prog in strip
37176 do
37177   # Extract the first word of "$ac_prog", so it can be a program name with args.
37178 set dummy $ac_prog; ac_word=$2
37179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37180 $as_echo_n "checking for $ac_word... " >&6; }
37181 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37182   $as_echo_n "(cached) " >&6
37183 else
37184   if test -n "$ac_ct_STRIP"; then
37185   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37186 else
37187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37188 for as_dir in $PATH
37189 do
37190   IFS=$as_save_IFS
37191   test -z "$as_dir" && as_dir=.
37192     for ac_exec_ext in '' $ac_executable_extensions; do
37193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37194     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37196     break 2
37197   fi
37198 done
37199   done
37200 IFS=$as_save_IFS
37201 
37202 fi
37203 fi
37204 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37205 if test -n "$ac_ct_STRIP"; then
37206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37207 $as_echo "$ac_ct_STRIP" >&6; }
37208 else
37209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37210 $as_echo "no" >&6; }
37211 fi
37212 
37213 
37214   test -n "$ac_ct_STRIP" && break
37215 done
37216 
37217   if test "x$ac_ct_STRIP" = x; then
37218     STRIP=""
37219   else
37220     case $cross_compiling:$ac_tool_warned in
37221 yes:)
37222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37223 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37224 ac_tool_warned=yes ;;
37225 esac
37226     STRIP=$ac_ct_STRIP
37227   fi
37228 fi
37229 
37230   else
37231     # The variable is set, but is it from the command line or the environment?
37232 
37233     # Try to remove the string !STRIP! from our list.
37234     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37235     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37236       # If it failed, the variable was not from the command line. Ignore it,
37237       # but warn the user (except for BASH, which is always set by the calling BASH).
37238       if test "xSTRIP" != xBASH; then
37239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37240 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37241       fi
37242       # Try to locate tool using the code snippet
37243       if test -n "$ac_tool_prefix"; then
37244   for ac_prog in strip
37245   do
37246     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37247 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37249 $as_echo_n "checking for $ac_word... " >&6; }
37250 if ${ac_cv_prog_STRIP+:} false; then :
37251   $as_echo_n "(cached) " >&6
37252 else
37253   if test -n "$STRIP"; then
37254   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37255 else
37256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37257 for as_dir in $PATH
37258 do
37259   IFS=$as_save_IFS
37260   test -z "$as_dir" && as_dir=.
37261     for ac_exec_ext in '' $ac_executable_extensions; do
37262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37263     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37265     break 2
37266   fi
37267 done
37268   done
37269 IFS=$as_save_IFS
37270 
37271 fi
37272 fi
37273 STRIP=$ac_cv_prog_STRIP
37274 if test -n "$STRIP"; then
37275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37276 $as_echo "$STRIP" >&6; }
37277 else
37278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37279 $as_echo "no" >&6; }
37280 fi
37281 
37282 
37283     test -n "$STRIP" && break
37284   done
37285 fi
37286 if test -z "$STRIP"; then
37287   ac_ct_STRIP=$STRIP
37288   for ac_prog in strip
37289 do
37290   # Extract the first word of "$ac_prog", so it can be a program name with args.
37291 set dummy $ac_prog; ac_word=$2
37292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37293 $as_echo_n "checking for $ac_word... " >&6; }
37294 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37295   $as_echo_n "(cached) " >&6
37296 else
37297   if test -n "$ac_ct_STRIP"; then
37298   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37299 else
37300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37301 for as_dir in $PATH
37302 do
37303   IFS=$as_save_IFS
37304   test -z "$as_dir" && as_dir=.
37305     for ac_exec_ext in '' $ac_executable_extensions; do
37306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37307     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37309     break 2
37310   fi
37311 done
37312   done
37313 IFS=$as_save_IFS
37314 
37315 fi
37316 fi
37317 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37318 if test -n "$ac_ct_STRIP"; then
37319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37320 $as_echo "$ac_ct_STRIP" >&6; }
37321 else
37322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37323 $as_echo "no" >&6; }
37324 fi
37325 
37326 
37327   test -n "$ac_ct_STRIP" && break
37328 done
37329 
37330   if test "x$ac_ct_STRIP" = x; then
37331     STRIP=""
37332   else
37333     case $cross_compiling:$ac_tool_warned in
37334 yes:)
37335 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37336 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37337 ac_tool_warned=yes ;;
37338 esac
37339     STRIP=$ac_ct_STRIP
37340   fi
37341 fi
37342 
37343     else
37344       # If it succeeded, then it was overridden by the user. We will use it
37345       # for the tool.
37346 
37347       # First remove it from the list of overridden variables, so we can test
37348       # for unknown variables in the end.
37349       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37350 
37351       # Check if the provided tool contains a complete path.
37352       tool_specified="$STRIP"
37353       tool_basename="${tool_specified##*/}"
37354       if test "x$tool_basename" = "x$tool_specified"; then
37355         # A command without a complete path is provided, search $PATH.
37356         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37357 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37358         # Extract the first word of "$tool_basename", so it can be a program name with args.
37359 set dummy $tool_basename; ac_word=$2
37360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37361 $as_echo_n "checking for $ac_word... " >&6; }
37362 if ${ac_cv_path_STRIP+:} false; then :
37363   $as_echo_n "(cached) " >&6
37364 else
37365   case $STRIP in
37366   [\\/]* | ?:[\\/]*)
37367   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37368   ;;
37369   *)
37370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37371 for as_dir in $PATH
37372 do
37373   IFS=$as_save_IFS
37374   test -z "$as_dir" && as_dir=.
37375     for ac_exec_ext in '' $ac_executable_extensions; do
37376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37377     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37379     break 2
37380   fi
37381 done
37382   done
37383 IFS=$as_save_IFS
37384 
37385   ;;
37386 esac
37387 fi
37388 STRIP=$ac_cv_path_STRIP
37389 if test -n "$STRIP"; then
37390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37391 $as_echo "$STRIP" >&6; }
37392 else
37393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37394 $as_echo "no" >&6; }
37395 fi
37396 
37397 
37398         if test "x$STRIP" = x; then
37399           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37400         fi
37401       else
37402         # Otherwise we believe it is a complete path. Use it as it is.
37403         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37404 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37405         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37406 $as_echo_n "checking for STRIP... " >&6; }
37407         if test ! -x "$tool_specified"; then
37408           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37409 $as_echo "not found" >&6; }
37410           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37411         fi
37412         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37413 $as_echo "$tool_specified" >&6; }
37414       fi
37415     fi
37416   fi
37417 
37418 
37419 
37420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37421 
37422   # First separate the path from the arguments. This will split at the first
37423   # space.
37424   complete="$STRIP"
37425   path="${complete%% *}"
37426   tmp="$complete EOL"
37427   arguments="${tmp#* }"
37428 
37429   # Input might be given as Windows format, start by converting to
37430   # unix format.
37431   new_path=`$CYGPATH -u "$path"`
37432 
37433   # Now try to locate executable using which
37434   new_path=`$WHICH "$new_path" 2> /dev/null`
37435   # bat and cmd files are not always considered executable in cygwin causing which
37436   # to not find them
37437   if test "x$new_path" = x \
37438       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37439       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37440     new_path=`$CYGPATH -u "$path"`
37441   fi
37442   if test "x$new_path" = x; then
37443     # Oops. Which didn't find the executable.
37444     # The splitting of arguments from the executable at a space might have been incorrect,
37445     # since paths with space are more likely in Windows. Give it another try with the whole
37446     # argument.
37447     path="$complete"
37448     arguments="EOL"
37449     new_path=`$CYGPATH -u "$path"`
37450     new_path=`$WHICH "$new_path" 2> /dev/null`
37451     # bat and cmd files are not always considered executable in cygwin causing which
37452     # to not find them
37453     if test "x$new_path" = x \
37454         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37455         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37456       new_path=`$CYGPATH -u "$path"`
37457     fi
37458     if test "x$new_path" = x; then
37459       # It's still not found. Now this is an unrecoverable error.
37460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37461 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37462       has_space=`$ECHO "$complete" | $GREP " "`
37463       if test "x$has_space" != x; then
37464         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37465 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37466       fi
37467       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37468     fi
37469   fi
37470 
37471   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37472   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37473   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37474   # "foo.exe" is OK but "foo" is an error.
37475   #
37476   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37477   # It is also a way to make sure we got the proper file name for the real test later on.
37478   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37479   if test "x$test_shortpath" = x; then
37480     # Short path failed, file does not exist as specified.
37481     # Try adding .exe or .cmd
37482     if test -f "${new_path}.exe"; then
37483       input_to_shortpath="${new_path}.exe"
37484     elif test -f "${new_path}.cmd"; then
37485       input_to_shortpath="${new_path}.cmd"
37486     else
37487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37488 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37489       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37490 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37491       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37492     fi
37493   else
37494     input_to_shortpath="$new_path"
37495   fi
37496 
37497   # Call helper function which possibly converts this using DOS-style short mode.
37498   # If so, the updated path is stored in $new_path.
37499   new_path="$input_to_shortpath"
37500 
37501   input_path="$input_to_shortpath"
37502   # Check if we need to convert this using DOS-style short mode. If the path
37503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37504   # take no chances and rewrite it.
37505   # Note: m4 eats our [], so we need to use [ and ] instead.
37506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37507   if test "x$has_forbidden_chars" != x; then
37508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37512       # Going to short mode and back again did indeed matter. Since short mode is
37513       # case insensitive, let's make it lowercase to improve readability.
37514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37515       # Now convert it back to Unix-stile (cygpath)
37516       input_path=`$CYGPATH -u "$shortmode_path"`
37517       new_path="$input_path"
37518     fi
37519   fi
37520 
37521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37522   if test "x$test_cygdrive_prefix" = x; then
37523     # As a simple fix, exclude /usr/bin since it's not a real path.
37524     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37526       # a path prefixed by /cygdrive for fixpath to work.
37527       new_path="$CYGWIN_ROOT_PATH$input_path"
37528     fi
37529   fi
37530 
37531   # remove trailing .exe if any
37532   new_path="${new_path/%.exe/}"
37533 
37534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37535 
37536   # First separate the path from the arguments. This will split at the first
37537   # space.
37538   complete="$STRIP"
37539   path="${complete%% *}"
37540   tmp="$complete EOL"
37541   arguments="${tmp#* }"
37542 
37543   # Input might be given as Windows format, start by converting to
37544   # unix format.
37545   new_path="$path"
37546 
37547   windows_path="$new_path"
37548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37549     unix_path=`$CYGPATH -u "$windows_path"`
37550     new_path="$unix_path"
37551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37553     new_path="$unix_path"
37554   fi
37555 
37556 
37557   # Now try to locate executable using which
37558   new_path=`$WHICH "$new_path" 2> /dev/null`
37559 
37560   if test "x$new_path" = x; then
37561     # Oops. Which didn't find the executable.
37562     # The splitting of arguments from the executable at a space might have been incorrect,
37563     # since paths with space are more likely in Windows. Give it another try with the whole
37564     # argument.
37565     path="$complete"
37566     arguments="EOL"
37567     new_path="$path"
37568 
37569   windows_path="$new_path"
37570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37571     unix_path=`$CYGPATH -u "$windows_path"`
37572     new_path="$unix_path"
37573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37575     new_path="$unix_path"
37576   fi
37577 
37578 
37579     new_path=`$WHICH "$new_path" 2> /dev/null`
37580     # bat and cmd files are not always considered executable in MSYS causing which
37581     # to not find them
37582     if test "x$new_path" = x \
37583         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37584         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37585       new_path="$path"
37586 
37587   windows_path="$new_path"
37588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37589     unix_path=`$CYGPATH -u "$windows_path"`
37590     new_path="$unix_path"
37591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37593     new_path="$unix_path"
37594   fi
37595 
37596     fi
37597 
37598     if test "x$new_path" = x; then
37599       # It's still not found. Now this is an unrecoverable error.
37600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37601 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37602       has_space=`$ECHO "$complete" | $GREP " "`
37603       if test "x$has_space" != x; then
37604         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37605 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37606       fi
37607       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37608     fi
37609   fi
37610 
37611   # Now new_path has a complete unix path to the binary
37612   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37613     # Keep paths in /bin as-is, but remove trailing .exe if any
37614     new_path="${new_path/%.exe/}"
37615     # Do not save /bin paths to all_fixpath_prefixes!
37616   else
37617     # Not in mixed or Windows style, start by that.
37618     new_path=`cmd //c echo $new_path`
37619 
37620   input_path="$new_path"
37621   # Check if we need to convert this using DOS-style short mode. If the path
37622   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37623   # take no chances and rewrite it.
37624   # Note: m4 eats our [], so we need to use [ and ] instead.
37625   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37626   if test "x$has_forbidden_chars" != x; then
37627     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37628     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37629   fi
37630 
37631     # Output is in $new_path
37632 
37633   windows_path="$new_path"
37634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37635     unix_path=`$CYGPATH -u "$windows_path"`
37636     new_path="$unix_path"
37637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37639     new_path="$unix_path"
37640   fi
37641 
37642     # remove trailing .exe if any
37643     new_path="${new_path/%.exe/}"
37644 
37645     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37646     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37647   fi
37648 
37649   else
37650     # We're on a unix platform. Hooray! :)
37651     # First separate the path from the arguments. This will split at the first
37652     # space.
37653     complete="$STRIP"
37654     path="${complete%% *}"
37655     tmp="$complete EOL"
37656     arguments="${tmp#* }"
37657 
37658     # Cannot rely on the command "which" here since it doesn't always work.
37659     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37660     if test -z "$is_absolute_path"; then
37661       # Path to executable is not absolute. Find it.
37662       IFS_save="$IFS"
37663       IFS=:
37664       for p in $PATH; do
37665         if test -f "$p/$path" && test -x "$p/$path"; then
37666           new_path="$p/$path"
37667           break
37668         fi
37669       done
37670       IFS="$IFS_save"
37671     else
37672       # This is an absolute path, we can use it without further modifications.
37673       new_path="$path"
37674     fi
37675 
37676     if test "x$new_path" = x; then
37677       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37678 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37679       has_space=`$ECHO "$complete" | $GREP " "`
37680       if test "x$has_space" != x; then
37681         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37682 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37683       fi
37684       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37685     fi
37686   fi
37687 
37688   # Now join together the path and the arguments once again
37689   if test "x$arguments" != xEOL; then
37690     new_complete="$new_path ${arguments% *}"
37691   else
37692     new_complete="$new_path"
37693   fi
37694 
37695   if test "x$complete" != "x$new_complete"; then
37696     STRIP="$new_complete"
37697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37698 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37699   fi
37700 
37701 
37702 
37703   # Publish this variable in the help.
37704 
37705 
37706   if test "x$NM" = x; then
37707     # The variable is not set by user, try to locate tool using the code snippet
37708     if test -n "$ac_tool_prefix"; then
37709   for ac_prog in nm
37710   do
37711     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37712 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37714 $as_echo_n "checking for $ac_word... " >&6; }
37715 if ${ac_cv_prog_NM+:} false; then :
37716   $as_echo_n "(cached) " >&6
37717 else
37718   if test -n "$NM"; then
37719   ac_cv_prog_NM="$NM" # Let the user override the test.
37720 else
37721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37722 for as_dir in $PATH
37723 do
37724   IFS=$as_save_IFS
37725   test -z "$as_dir" && as_dir=.
37726     for ac_exec_ext in '' $ac_executable_extensions; do
37727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37728     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37730     break 2
37731   fi
37732 done
37733   done
37734 IFS=$as_save_IFS
37735 
37736 fi
37737 fi
37738 NM=$ac_cv_prog_NM
37739 if test -n "$NM"; then
37740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37741 $as_echo "$NM" >&6; }
37742 else
37743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37744 $as_echo "no" >&6; }
37745 fi
37746 
37747 
37748     test -n "$NM" && break
37749   done
37750 fi
37751 if test -z "$NM"; then
37752   ac_ct_NM=$NM
37753   for ac_prog in nm
37754 do
37755   # Extract the first word of "$ac_prog", so it can be a program name with args.
37756 set dummy $ac_prog; ac_word=$2
37757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37758 $as_echo_n "checking for $ac_word... " >&6; }
37759 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37760   $as_echo_n "(cached) " >&6
37761 else
37762   if test -n "$ac_ct_NM"; then
37763   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37764 else
37765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37766 for as_dir in $PATH
37767 do
37768   IFS=$as_save_IFS
37769   test -z "$as_dir" && as_dir=.
37770     for ac_exec_ext in '' $ac_executable_extensions; do
37771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37772     ac_cv_prog_ac_ct_NM="$ac_prog"
37773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37774     break 2
37775   fi
37776 done
37777   done
37778 IFS=$as_save_IFS
37779 
37780 fi
37781 fi
37782 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37783 if test -n "$ac_ct_NM"; then
37784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37785 $as_echo "$ac_ct_NM" >&6; }
37786 else
37787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37788 $as_echo "no" >&6; }
37789 fi
37790 
37791 
37792   test -n "$ac_ct_NM" && break
37793 done
37794 
37795   if test "x$ac_ct_NM" = x; then
37796     NM=""
37797   else
37798     case $cross_compiling:$ac_tool_warned in
37799 yes:)
37800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37801 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37802 ac_tool_warned=yes ;;
37803 esac
37804     NM=$ac_ct_NM
37805   fi
37806 fi
37807 
37808   else
37809     # The variable is set, but is it from the command line or the environment?
37810 
37811     # Try to remove the string !NM! from our list.
37812     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37813     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37814       # If it failed, the variable was not from the command line. Ignore it,
37815       # but warn the user (except for BASH, which is always set by the calling BASH).
37816       if test "xNM" != xBASH; then
37817         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37818 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37819       fi
37820       # Try to locate tool using the code snippet
37821       if test -n "$ac_tool_prefix"; then
37822   for ac_prog in nm
37823   do
37824     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37825 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37827 $as_echo_n "checking for $ac_word... " >&6; }
37828 if ${ac_cv_prog_NM+:} false; then :
37829   $as_echo_n "(cached) " >&6
37830 else
37831   if test -n "$NM"; then
37832   ac_cv_prog_NM="$NM" # Let the user override the test.
37833 else
37834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37835 for as_dir in $PATH
37836 do
37837   IFS=$as_save_IFS
37838   test -z "$as_dir" && as_dir=.
37839     for ac_exec_ext in '' $ac_executable_extensions; do
37840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37841     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37843     break 2
37844   fi
37845 done
37846   done
37847 IFS=$as_save_IFS
37848 
37849 fi
37850 fi
37851 NM=$ac_cv_prog_NM
37852 if test -n "$NM"; then
37853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37854 $as_echo "$NM" >&6; }
37855 else
37856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37857 $as_echo "no" >&6; }
37858 fi
37859 
37860 
37861     test -n "$NM" && break
37862   done
37863 fi
37864 if test -z "$NM"; then
37865   ac_ct_NM=$NM
37866   for ac_prog in nm
37867 do
37868   # Extract the first word of "$ac_prog", so it can be a program name with args.
37869 set dummy $ac_prog; ac_word=$2
37870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37871 $as_echo_n "checking for $ac_word... " >&6; }
37872 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37873   $as_echo_n "(cached) " >&6
37874 else
37875   if test -n "$ac_ct_NM"; then
37876   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37877 else
37878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37879 for as_dir in $PATH
37880 do
37881   IFS=$as_save_IFS
37882   test -z "$as_dir" && as_dir=.
37883     for ac_exec_ext in '' $ac_executable_extensions; do
37884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37885     ac_cv_prog_ac_ct_NM="$ac_prog"
37886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37887     break 2
37888   fi
37889 done
37890   done
37891 IFS=$as_save_IFS
37892 
37893 fi
37894 fi
37895 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37896 if test -n "$ac_ct_NM"; then
37897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37898 $as_echo "$ac_ct_NM" >&6; }
37899 else
37900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37901 $as_echo "no" >&6; }
37902 fi
37903 
37904 
37905   test -n "$ac_ct_NM" && break
37906 done
37907 
37908   if test "x$ac_ct_NM" = x; then
37909     NM=""
37910   else
37911     case $cross_compiling:$ac_tool_warned in
37912 yes:)
37913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37914 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37915 ac_tool_warned=yes ;;
37916 esac
37917     NM=$ac_ct_NM
37918   fi
37919 fi
37920 
37921     else
37922       # If it succeeded, then it was overridden by the user. We will use it
37923       # for the tool.
37924 
37925       # First remove it from the list of overridden variables, so we can test
37926       # for unknown variables in the end.
37927       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37928 
37929       # Check if the provided tool contains a complete path.
37930       tool_specified="$NM"
37931       tool_basename="${tool_specified##*/}"
37932       if test "x$tool_basename" = "x$tool_specified"; then
37933         # A command without a complete path is provided, search $PATH.
37934         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37935 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37936         # Extract the first word of "$tool_basename", so it can be a program name with args.
37937 set dummy $tool_basename; ac_word=$2
37938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37939 $as_echo_n "checking for $ac_word... " >&6; }
37940 if ${ac_cv_path_NM+:} false; then :
37941   $as_echo_n "(cached) " >&6
37942 else
37943   case $NM in
37944   [\\/]* | ?:[\\/]*)
37945   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37946   ;;
37947   *)
37948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37949 for as_dir in $PATH
37950 do
37951   IFS=$as_save_IFS
37952   test -z "$as_dir" && as_dir=.
37953     for ac_exec_ext in '' $ac_executable_extensions; do
37954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37955     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37957     break 2
37958   fi
37959 done
37960   done
37961 IFS=$as_save_IFS
37962 
37963   ;;
37964 esac
37965 fi
37966 NM=$ac_cv_path_NM
37967 if test -n "$NM"; then
37968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37969 $as_echo "$NM" >&6; }
37970 else
37971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37972 $as_echo "no" >&6; }
37973 fi
37974 
37975 
37976         if test "x$NM" = x; then
37977           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37978         fi
37979       else
37980         # Otherwise we believe it is a complete path. Use it as it is.
37981         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37982 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37983         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37984 $as_echo_n "checking for NM... " >&6; }
37985         if test ! -x "$tool_specified"; then
37986           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37987 $as_echo "not found" >&6; }
37988           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37989         fi
37990         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37991 $as_echo "$tool_specified" >&6; }
37992       fi
37993     fi
37994   fi
37995 
37996 
37997 
37998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37999 
38000   # First separate the path from the arguments. This will split at the first
38001   # space.
38002   complete="$NM"
38003   path="${complete%% *}"
38004   tmp="$complete EOL"
38005   arguments="${tmp#* }"
38006 
38007   # Input might be given as Windows format, start by converting to
38008   # unix format.
38009   new_path=`$CYGPATH -u "$path"`
38010 
38011   # Now try to locate executable using which
38012   new_path=`$WHICH "$new_path" 2> /dev/null`
38013   # bat and cmd files are not always considered executable in cygwin causing which
38014   # to not find them
38015   if test "x$new_path" = x \
38016       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38017       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38018     new_path=`$CYGPATH -u "$path"`
38019   fi
38020   if test "x$new_path" = x; then
38021     # Oops. Which didn't find the executable.
38022     # The splitting of arguments from the executable at a space might have been incorrect,
38023     # since paths with space are more likely in Windows. Give it another try with the whole
38024     # argument.
38025     path="$complete"
38026     arguments="EOL"
38027     new_path=`$CYGPATH -u "$path"`
38028     new_path=`$WHICH "$new_path" 2> /dev/null`
38029     # bat and cmd files are not always considered executable in cygwin causing which
38030     # to not find them
38031     if test "x$new_path" = x \
38032         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38033         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38034       new_path=`$CYGPATH -u "$path"`
38035     fi
38036     if test "x$new_path" = x; then
38037       # It's still not found. Now this is an unrecoverable error.
38038       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38039 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38040       has_space=`$ECHO "$complete" | $GREP " "`
38041       if test "x$has_space" != x; then
38042         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38043 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38044       fi
38045       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38046     fi
38047   fi
38048 
38049   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38050   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38051   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38052   # "foo.exe" is OK but "foo" is an error.
38053   #
38054   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38055   # It is also a way to make sure we got the proper file name for the real test later on.
38056   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38057   if test "x$test_shortpath" = x; then
38058     # Short path failed, file does not exist as specified.
38059     # Try adding .exe or .cmd
38060     if test -f "${new_path}.exe"; then
38061       input_to_shortpath="${new_path}.exe"
38062     elif test -f "${new_path}.cmd"; then
38063       input_to_shortpath="${new_path}.cmd"
38064     else
38065       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38066 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38067       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38068 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38069       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38070     fi
38071   else
38072     input_to_shortpath="$new_path"
38073   fi
38074 
38075   # Call helper function which possibly converts this using DOS-style short mode.
38076   # If so, the updated path is stored in $new_path.
38077   new_path="$input_to_shortpath"
38078 
38079   input_path="$input_to_shortpath"
38080   # Check if we need to convert this using DOS-style short mode. If the path
38081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38082   # take no chances and rewrite it.
38083   # Note: m4 eats our [], so we need to use [ and ] instead.
38084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38085   if test "x$has_forbidden_chars" != x; then
38086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38087     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38088     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38089     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38090       # Going to short mode and back again did indeed matter. Since short mode is
38091       # case insensitive, let's make it lowercase to improve readability.
38092       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38093       # Now convert it back to Unix-stile (cygpath)
38094       input_path=`$CYGPATH -u "$shortmode_path"`
38095       new_path="$input_path"
38096     fi
38097   fi
38098 
38099   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38100   if test "x$test_cygdrive_prefix" = x; then
38101     # As a simple fix, exclude /usr/bin since it's not a real path.
38102     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38103       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38104       # a path prefixed by /cygdrive for fixpath to work.
38105       new_path="$CYGWIN_ROOT_PATH$input_path"
38106     fi
38107   fi
38108 
38109   # remove trailing .exe if any
38110   new_path="${new_path/%.exe/}"
38111 
38112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38113 
38114   # First separate the path from the arguments. This will split at the first
38115   # space.
38116   complete="$NM"
38117   path="${complete%% *}"
38118   tmp="$complete EOL"
38119   arguments="${tmp#* }"
38120 
38121   # Input might be given as Windows format, start by converting to
38122   # unix format.
38123   new_path="$path"
38124 
38125   windows_path="$new_path"
38126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127     unix_path=`$CYGPATH -u "$windows_path"`
38128     new_path="$unix_path"
38129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131     new_path="$unix_path"
38132   fi
38133 
38134 
38135   # Now try to locate executable using which
38136   new_path=`$WHICH "$new_path" 2> /dev/null`
38137 
38138   if test "x$new_path" = x; then
38139     # Oops. Which didn't find the executable.
38140     # The splitting of arguments from the executable at a space might have been incorrect,
38141     # since paths with space are more likely in Windows. Give it another try with the whole
38142     # argument.
38143     path="$complete"
38144     arguments="EOL"
38145     new_path="$path"
38146 
38147   windows_path="$new_path"
38148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38149     unix_path=`$CYGPATH -u "$windows_path"`
38150     new_path="$unix_path"
38151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38153     new_path="$unix_path"
38154   fi
38155 
38156 
38157     new_path=`$WHICH "$new_path" 2> /dev/null`
38158     # bat and cmd files are not always considered executable in MSYS causing which
38159     # to not find them
38160     if test "x$new_path" = x \
38161         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38162         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38163       new_path="$path"
38164 
38165   windows_path="$new_path"
38166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38167     unix_path=`$CYGPATH -u "$windows_path"`
38168     new_path="$unix_path"
38169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38171     new_path="$unix_path"
38172   fi
38173 
38174     fi
38175 
38176     if test "x$new_path" = x; then
38177       # It's still not found. Now this is an unrecoverable error.
38178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38179 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38180       has_space=`$ECHO "$complete" | $GREP " "`
38181       if test "x$has_space" != x; then
38182         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38183 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38184       fi
38185       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38186     fi
38187   fi
38188 
38189   # Now new_path has a complete unix path to the binary
38190   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38191     # Keep paths in /bin as-is, but remove trailing .exe if any
38192     new_path="${new_path/%.exe/}"
38193     # Do not save /bin paths to all_fixpath_prefixes!
38194   else
38195     # Not in mixed or Windows style, start by that.
38196     new_path=`cmd //c echo $new_path`
38197 
38198   input_path="$new_path"
38199   # Check if we need to convert this using DOS-style short mode. If the path
38200   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38201   # take no chances and rewrite it.
38202   # Note: m4 eats our [], so we need to use [ and ] instead.
38203   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38204   if test "x$has_forbidden_chars" != x; then
38205     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38206     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38207   fi
38208 
38209     # Output is in $new_path
38210 
38211   windows_path="$new_path"
38212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38213     unix_path=`$CYGPATH -u "$windows_path"`
38214     new_path="$unix_path"
38215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38216     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38217     new_path="$unix_path"
38218   fi
38219 
38220     # remove trailing .exe if any
38221     new_path="${new_path/%.exe/}"
38222 
38223     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38224     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38225   fi
38226 
38227   else
38228     # We're on a unix platform. Hooray! :)
38229     # First separate the path from the arguments. This will split at the first
38230     # space.
38231     complete="$NM"
38232     path="${complete%% *}"
38233     tmp="$complete EOL"
38234     arguments="${tmp#* }"
38235 
38236     # Cannot rely on the command "which" here since it doesn't always work.
38237     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38238     if test -z "$is_absolute_path"; then
38239       # Path to executable is not absolute. Find it.
38240       IFS_save="$IFS"
38241       IFS=:
38242       for p in $PATH; do
38243         if test -f "$p/$path" && test -x "$p/$path"; then
38244           new_path="$p/$path"
38245           break
38246         fi
38247       done
38248       IFS="$IFS_save"
38249     else
38250       # This is an absolute path, we can use it without further modifications.
38251       new_path="$path"
38252     fi
38253 
38254     if test "x$new_path" = x; then
38255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38256 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38257       has_space=`$ECHO "$complete" | $GREP " "`
38258       if test "x$has_space" != x; then
38259         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38260 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38261       fi
38262       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38263     fi
38264   fi
38265 
38266   # Now join together the path and the arguments once again
38267   if test "x$arguments" != xEOL; then
38268     new_complete="$new_path ${arguments% *}"
38269   else
38270     new_complete="$new_path"
38271   fi
38272 
38273   if test "x$complete" != "x$new_complete"; then
38274     NM="$new_complete"
38275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38276 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38277   fi
38278 
38279     GNM="$NM"
38280 
38281   fi
38282 
38283   # objcopy is used for moving debug symbols to separate files when
38284   # full debug symbols are enabled.
38285   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38286 
38287 
38288   # Publish this variable in the help.
38289 
38290 
38291   if test "x$OBJCOPY" = x; then
38292     # The variable is not set by user, try to locate tool using the code snippet
38293     if test -n "$ac_tool_prefix"; then
38294   for ac_prog in gobjcopy objcopy
38295   do
38296     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38297 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38299 $as_echo_n "checking for $ac_word... " >&6; }
38300 if ${ac_cv_prog_OBJCOPY+:} false; then :
38301   $as_echo_n "(cached) " >&6
38302 else
38303   if test -n "$OBJCOPY"; then
38304   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38305 else
38306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38307 for as_dir in $PATH
38308 do
38309   IFS=$as_save_IFS
38310   test -z "$as_dir" && as_dir=.
38311     for ac_exec_ext in '' $ac_executable_extensions; do
38312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38313     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38315     break 2
38316   fi
38317 done
38318   done
38319 IFS=$as_save_IFS
38320 
38321 fi
38322 fi
38323 OBJCOPY=$ac_cv_prog_OBJCOPY
38324 if test -n "$OBJCOPY"; then
38325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38326 $as_echo "$OBJCOPY" >&6; }
38327 else
38328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38329 $as_echo "no" >&6; }
38330 fi
38331 
38332 
38333     test -n "$OBJCOPY" && break
38334   done
38335 fi
38336 if test -z "$OBJCOPY"; then
38337   ac_ct_OBJCOPY=$OBJCOPY
38338   for ac_prog in gobjcopy objcopy
38339 do
38340   # Extract the first word of "$ac_prog", so it can be a program name with args.
38341 set dummy $ac_prog; ac_word=$2
38342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38343 $as_echo_n "checking for $ac_word... " >&6; }
38344 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38345   $as_echo_n "(cached) " >&6
38346 else
38347   if test -n "$ac_ct_OBJCOPY"; then
38348   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38349 else
38350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38351 for as_dir in $PATH
38352 do
38353   IFS=$as_save_IFS
38354   test -z "$as_dir" && as_dir=.
38355     for ac_exec_ext in '' $ac_executable_extensions; do
38356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38357     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38359     break 2
38360   fi
38361 done
38362   done
38363 IFS=$as_save_IFS
38364 
38365 fi
38366 fi
38367 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38368 if test -n "$ac_ct_OBJCOPY"; then
38369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38370 $as_echo "$ac_ct_OBJCOPY" >&6; }
38371 else
38372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38373 $as_echo "no" >&6; }
38374 fi
38375 
38376 
38377   test -n "$ac_ct_OBJCOPY" && break
38378 done
38379 
38380   if test "x$ac_ct_OBJCOPY" = x; then
38381     OBJCOPY=""
38382   else
38383     case $cross_compiling:$ac_tool_warned in
38384 yes:)
38385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38386 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38387 ac_tool_warned=yes ;;
38388 esac
38389     OBJCOPY=$ac_ct_OBJCOPY
38390   fi
38391 fi
38392 
38393   else
38394     # The variable is set, but is it from the command line or the environment?
38395 
38396     # Try to remove the string !OBJCOPY! from our list.
38397     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38398     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38399       # If it failed, the variable was not from the command line. Ignore it,
38400       # but warn the user (except for BASH, which is always set by the calling BASH).
38401       if test "xOBJCOPY" != xBASH; then
38402         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38403 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38404       fi
38405       # Try to locate tool using the code snippet
38406       if test -n "$ac_tool_prefix"; then
38407   for ac_prog in gobjcopy objcopy
38408   do
38409     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38410 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38412 $as_echo_n "checking for $ac_word... " >&6; }
38413 if ${ac_cv_prog_OBJCOPY+:} false; then :
38414   $as_echo_n "(cached) " >&6
38415 else
38416   if test -n "$OBJCOPY"; then
38417   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38418 else
38419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38420 for as_dir in $PATH
38421 do
38422   IFS=$as_save_IFS
38423   test -z "$as_dir" && as_dir=.
38424     for ac_exec_ext in '' $ac_executable_extensions; do
38425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38426     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38428     break 2
38429   fi
38430 done
38431   done
38432 IFS=$as_save_IFS
38433 
38434 fi
38435 fi
38436 OBJCOPY=$ac_cv_prog_OBJCOPY
38437 if test -n "$OBJCOPY"; then
38438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38439 $as_echo "$OBJCOPY" >&6; }
38440 else
38441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38442 $as_echo "no" >&6; }
38443 fi
38444 
38445 
38446     test -n "$OBJCOPY" && break
38447   done
38448 fi
38449 if test -z "$OBJCOPY"; then
38450   ac_ct_OBJCOPY=$OBJCOPY
38451   for ac_prog in gobjcopy objcopy
38452 do
38453   # Extract the first word of "$ac_prog", so it can be a program name with args.
38454 set dummy $ac_prog; ac_word=$2
38455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38456 $as_echo_n "checking for $ac_word... " >&6; }
38457 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38458   $as_echo_n "(cached) " >&6
38459 else
38460   if test -n "$ac_ct_OBJCOPY"; then
38461   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38462 else
38463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38464 for as_dir in $PATH
38465 do
38466   IFS=$as_save_IFS
38467   test -z "$as_dir" && as_dir=.
38468     for ac_exec_ext in '' $ac_executable_extensions; do
38469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38470     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38472     break 2
38473   fi
38474 done
38475   done
38476 IFS=$as_save_IFS
38477 
38478 fi
38479 fi
38480 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38481 if test -n "$ac_ct_OBJCOPY"; then
38482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38483 $as_echo "$ac_ct_OBJCOPY" >&6; }
38484 else
38485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38486 $as_echo "no" >&6; }
38487 fi
38488 
38489 
38490   test -n "$ac_ct_OBJCOPY" && break
38491 done
38492 
38493   if test "x$ac_ct_OBJCOPY" = x; then
38494     OBJCOPY=""
38495   else
38496     case $cross_compiling:$ac_tool_warned in
38497 yes:)
38498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38499 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38500 ac_tool_warned=yes ;;
38501 esac
38502     OBJCOPY=$ac_ct_OBJCOPY
38503   fi
38504 fi
38505 
38506     else
38507       # If it succeeded, then it was overridden by the user. We will use it
38508       # for the tool.
38509 
38510       # First remove it from the list of overridden variables, so we can test
38511       # for unknown variables in the end.
38512       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38513 
38514       # Check if the provided tool contains a complete path.
38515       tool_specified="$OBJCOPY"
38516       tool_basename="${tool_specified##*/}"
38517       if test "x$tool_basename" = "x$tool_specified"; then
38518         # A command without a complete path is provided, search $PATH.
38519         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38520 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38521         # Extract the first word of "$tool_basename", so it can be a program name with args.
38522 set dummy $tool_basename; ac_word=$2
38523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38524 $as_echo_n "checking for $ac_word... " >&6; }
38525 if ${ac_cv_path_OBJCOPY+:} false; then :
38526   $as_echo_n "(cached) " >&6
38527 else
38528   case $OBJCOPY in
38529   [\\/]* | ?:[\\/]*)
38530   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38531   ;;
38532   *)
38533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38534 for as_dir in $PATH
38535 do
38536   IFS=$as_save_IFS
38537   test -z "$as_dir" && as_dir=.
38538     for ac_exec_ext in '' $ac_executable_extensions; do
38539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38540     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38542     break 2
38543   fi
38544 done
38545   done
38546 IFS=$as_save_IFS
38547 
38548   ;;
38549 esac
38550 fi
38551 OBJCOPY=$ac_cv_path_OBJCOPY
38552 if test -n "$OBJCOPY"; then
38553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38554 $as_echo "$OBJCOPY" >&6; }
38555 else
38556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38557 $as_echo "no" >&6; }
38558 fi
38559 
38560 
38561         if test "x$OBJCOPY" = x; then
38562           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38563         fi
38564       else
38565         # Otherwise we believe it is a complete path. Use it as it is.
38566         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38567 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38568         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38569 $as_echo_n "checking for OBJCOPY... " >&6; }
38570         if test ! -x "$tool_specified"; then
38571           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38572 $as_echo "not found" >&6; }
38573           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38574         fi
38575         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38576 $as_echo "$tool_specified" >&6; }
38577       fi
38578     fi
38579   fi
38580 
38581 
38582     # Only call fixup if objcopy was found.
38583     if test -n "$OBJCOPY"; then
38584 
38585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38586 
38587   # First separate the path from the arguments. This will split at the first
38588   # space.
38589   complete="$OBJCOPY"
38590   path="${complete%% *}"
38591   tmp="$complete EOL"
38592   arguments="${tmp#* }"
38593 
38594   # Input might be given as Windows format, start by converting to
38595   # unix format.
38596   new_path=`$CYGPATH -u "$path"`
38597 
38598   # Now try to locate executable using which
38599   new_path=`$WHICH "$new_path" 2> /dev/null`
38600   # bat and cmd files are not always considered executable in cygwin causing which
38601   # to not find them
38602   if test "x$new_path" = x \
38603       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38604       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38605     new_path=`$CYGPATH -u "$path"`
38606   fi
38607   if test "x$new_path" = x; then
38608     # Oops. Which didn't find the executable.
38609     # The splitting of arguments from the executable at a space might have been incorrect,
38610     # since paths with space are more likely in Windows. Give it another try with the whole
38611     # argument.
38612     path="$complete"
38613     arguments="EOL"
38614     new_path=`$CYGPATH -u "$path"`
38615     new_path=`$WHICH "$new_path" 2> /dev/null`
38616     # bat and cmd files are not always considered executable in cygwin causing which
38617     # to not find them
38618     if test "x$new_path" = x \
38619         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38620         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38621       new_path=`$CYGPATH -u "$path"`
38622     fi
38623     if test "x$new_path" = x; then
38624       # It's still not found. Now this is an unrecoverable error.
38625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38626 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38627       has_space=`$ECHO "$complete" | $GREP " "`
38628       if test "x$has_space" != x; then
38629         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38630 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38631       fi
38632       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38633     fi
38634   fi
38635 
38636   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38637   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38638   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38639   # "foo.exe" is OK but "foo" is an error.
38640   #
38641   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38642   # It is also a way to make sure we got the proper file name for the real test later on.
38643   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38644   if test "x$test_shortpath" = x; then
38645     # Short path failed, file does not exist as specified.
38646     # Try adding .exe or .cmd
38647     if test -f "${new_path}.exe"; then
38648       input_to_shortpath="${new_path}.exe"
38649     elif test -f "${new_path}.cmd"; then
38650       input_to_shortpath="${new_path}.cmd"
38651     else
38652       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38653 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38654       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38655 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38656       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38657     fi
38658   else
38659     input_to_shortpath="$new_path"
38660   fi
38661 
38662   # Call helper function which possibly converts this using DOS-style short mode.
38663   # If so, the updated path is stored in $new_path.
38664   new_path="$input_to_shortpath"
38665 
38666   input_path="$input_to_shortpath"
38667   # Check if we need to convert this using DOS-style short mode. If the path
38668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38669   # take no chances and rewrite it.
38670   # Note: m4 eats our [], so we need to use [ and ] instead.
38671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38672   if test "x$has_forbidden_chars" != x; then
38673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38674     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38675     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38676     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38677       # Going to short mode and back again did indeed matter. Since short mode is
38678       # case insensitive, let's make it lowercase to improve readability.
38679       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38680       # Now convert it back to Unix-stile (cygpath)
38681       input_path=`$CYGPATH -u "$shortmode_path"`
38682       new_path="$input_path"
38683     fi
38684   fi
38685 
38686   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38687   if test "x$test_cygdrive_prefix" = x; then
38688     # As a simple fix, exclude /usr/bin since it's not a real path.
38689     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38690       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38691       # a path prefixed by /cygdrive for fixpath to work.
38692       new_path="$CYGWIN_ROOT_PATH$input_path"
38693     fi
38694   fi
38695 
38696   # remove trailing .exe if any
38697   new_path="${new_path/%.exe/}"
38698 
38699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700 
38701   # First separate the path from the arguments. This will split at the first
38702   # space.
38703   complete="$OBJCOPY"
38704   path="${complete%% *}"
38705   tmp="$complete EOL"
38706   arguments="${tmp#* }"
38707 
38708   # Input might be given as Windows format, start by converting to
38709   # unix format.
38710   new_path="$path"
38711 
38712   windows_path="$new_path"
38713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38714     unix_path=`$CYGPATH -u "$windows_path"`
38715     new_path="$unix_path"
38716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38718     new_path="$unix_path"
38719   fi
38720 
38721 
38722   # Now try to locate executable using which
38723   new_path=`$WHICH "$new_path" 2> /dev/null`
38724 
38725   if test "x$new_path" = x; then
38726     # Oops. Which didn't find the executable.
38727     # The splitting of arguments from the executable at a space might have been incorrect,
38728     # since paths with space are more likely in Windows. Give it another try with the whole
38729     # argument.
38730     path="$complete"
38731     arguments="EOL"
38732     new_path="$path"
38733 
38734   windows_path="$new_path"
38735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38736     unix_path=`$CYGPATH -u "$windows_path"`
38737     new_path="$unix_path"
38738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38740     new_path="$unix_path"
38741   fi
38742 
38743 
38744     new_path=`$WHICH "$new_path" 2> /dev/null`
38745     # bat and cmd files are not always considered executable in MSYS causing which
38746     # to not find them
38747     if test "x$new_path" = x \
38748         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38749         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38750       new_path="$path"
38751 
38752   windows_path="$new_path"
38753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38754     unix_path=`$CYGPATH -u "$windows_path"`
38755     new_path="$unix_path"
38756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38758     new_path="$unix_path"
38759   fi
38760 
38761     fi
38762 
38763     if test "x$new_path" = x; then
38764       # It's still not found. Now this is an unrecoverable error.
38765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38766 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38767       has_space=`$ECHO "$complete" | $GREP " "`
38768       if test "x$has_space" != x; then
38769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38771       fi
38772       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38773     fi
38774   fi
38775 
38776   # Now new_path has a complete unix path to the binary
38777   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38778     # Keep paths in /bin as-is, but remove trailing .exe if any
38779     new_path="${new_path/%.exe/}"
38780     # Do not save /bin paths to all_fixpath_prefixes!
38781   else
38782     # Not in mixed or Windows style, start by that.
38783     new_path=`cmd //c echo $new_path`
38784 
38785   input_path="$new_path"
38786   # Check if we need to convert this using DOS-style short mode. If the path
38787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38788   # take no chances and rewrite it.
38789   # Note: m4 eats our [], so we need to use [ and ] instead.
38790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38791   if test "x$has_forbidden_chars" != x; then
38792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38794   fi
38795 
38796     # Output is in $new_path
38797 
38798   windows_path="$new_path"
38799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38800     unix_path=`$CYGPATH -u "$windows_path"`
38801     new_path="$unix_path"
38802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38804     new_path="$unix_path"
38805   fi
38806 
38807     # remove trailing .exe if any
38808     new_path="${new_path/%.exe/}"
38809 
38810     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38811     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38812   fi
38813 
38814   else
38815     # We're on a unix platform. Hooray! :)
38816     # First separate the path from the arguments. This will split at the first
38817     # space.
38818     complete="$OBJCOPY"
38819     path="${complete%% *}"
38820     tmp="$complete EOL"
38821     arguments="${tmp#* }"
38822 
38823     # Cannot rely on the command "which" here since it doesn't always work.
38824     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38825     if test -z "$is_absolute_path"; then
38826       # Path to executable is not absolute. Find it.
38827       IFS_save="$IFS"
38828       IFS=:
38829       for p in $PATH; do
38830         if test -f "$p/$path" && test -x "$p/$path"; then
38831           new_path="$p/$path"
38832           break
38833         fi
38834       done
38835       IFS="$IFS_save"
38836     else
38837       # This is an absolute path, we can use it without further modifications.
38838       new_path="$path"
38839     fi
38840 
38841     if test "x$new_path" = x; then
38842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38843 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38844       has_space=`$ECHO "$complete" | $GREP " "`
38845       if test "x$has_space" != x; then
38846         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38847 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38848       fi
38849       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38850     fi
38851   fi
38852 
38853   # Now join together the path and the arguments once again
38854   if test "x$arguments" != xEOL; then
38855     new_complete="$new_path ${arguments% *}"
38856   else
38857     new_complete="$new_path"
38858   fi
38859 
38860   if test "x$complete" != "x$new_complete"; then
38861     OBJCOPY="$new_complete"
38862     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38863 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38864   fi
38865 
38866     fi
38867   fi
38868 
38869 
38870 
38871   # Publish this variable in the help.
38872 
38873 
38874   if test "x$OBJDUMP" = x; then
38875     # The variable is not set by user, try to locate tool using the code snippet
38876     if test -n "$ac_tool_prefix"; then
38877   for ac_prog in gobjdump objdump
38878   do
38879     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38880 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38882 $as_echo_n "checking for $ac_word... " >&6; }
38883 if ${ac_cv_prog_OBJDUMP+:} false; then :
38884   $as_echo_n "(cached) " >&6
38885 else
38886   if test -n "$OBJDUMP"; then
38887   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38888 else
38889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38890 for as_dir in $PATH
38891 do
38892   IFS=$as_save_IFS
38893   test -z "$as_dir" && as_dir=.
38894     for ac_exec_ext in '' $ac_executable_extensions; do
38895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38896     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38898     break 2
38899   fi
38900 done
38901   done
38902 IFS=$as_save_IFS
38903 
38904 fi
38905 fi
38906 OBJDUMP=$ac_cv_prog_OBJDUMP
38907 if test -n "$OBJDUMP"; then
38908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38909 $as_echo "$OBJDUMP" >&6; }
38910 else
38911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38912 $as_echo "no" >&6; }
38913 fi
38914 
38915 
38916     test -n "$OBJDUMP" && break
38917   done
38918 fi
38919 if test -z "$OBJDUMP"; then
38920   ac_ct_OBJDUMP=$OBJDUMP
38921   for ac_prog in gobjdump objdump
38922 do
38923   # Extract the first word of "$ac_prog", so it can be a program name with args.
38924 set dummy $ac_prog; ac_word=$2
38925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38926 $as_echo_n "checking for $ac_word... " >&6; }
38927 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38928   $as_echo_n "(cached) " >&6
38929 else
38930   if test -n "$ac_ct_OBJDUMP"; then
38931   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38932 else
38933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38934 for as_dir in $PATH
38935 do
38936   IFS=$as_save_IFS
38937   test -z "$as_dir" && as_dir=.
38938     for ac_exec_ext in '' $ac_executable_extensions; do
38939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38940     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38942     break 2
38943   fi
38944 done
38945   done
38946 IFS=$as_save_IFS
38947 
38948 fi
38949 fi
38950 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38951 if test -n "$ac_ct_OBJDUMP"; then
38952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38953 $as_echo "$ac_ct_OBJDUMP" >&6; }
38954 else
38955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38956 $as_echo "no" >&6; }
38957 fi
38958 
38959 
38960   test -n "$ac_ct_OBJDUMP" && break
38961 done
38962 
38963   if test "x$ac_ct_OBJDUMP" = x; then
38964     OBJDUMP=""
38965   else
38966     case $cross_compiling:$ac_tool_warned in
38967 yes:)
38968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38969 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38970 ac_tool_warned=yes ;;
38971 esac
38972     OBJDUMP=$ac_ct_OBJDUMP
38973   fi
38974 fi
38975 
38976   else
38977     # The variable is set, but is it from the command line or the environment?
38978 
38979     # Try to remove the string !OBJDUMP! from our list.
38980     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38981     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38982       # If it failed, the variable was not from the command line. Ignore it,
38983       # but warn the user (except for BASH, which is always set by the calling BASH).
38984       if test "xOBJDUMP" != xBASH; then
38985         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38986 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38987       fi
38988       # Try to locate tool using the code snippet
38989       if test -n "$ac_tool_prefix"; then
38990   for ac_prog in gobjdump objdump
38991   do
38992     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38993 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38995 $as_echo_n "checking for $ac_word... " >&6; }
38996 if ${ac_cv_prog_OBJDUMP+:} false; then :
38997   $as_echo_n "(cached) " >&6
38998 else
38999   if test -n "$OBJDUMP"; then
39000   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39001 else
39002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39003 for as_dir in $PATH
39004 do
39005   IFS=$as_save_IFS
39006   test -z "$as_dir" && as_dir=.
39007     for ac_exec_ext in '' $ac_executable_extensions; do
39008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39009     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39011     break 2
39012   fi
39013 done
39014   done
39015 IFS=$as_save_IFS
39016 
39017 fi
39018 fi
39019 OBJDUMP=$ac_cv_prog_OBJDUMP
39020 if test -n "$OBJDUMP"; then
39021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39022 $as_echo "$OBJDUMP" >&6; }
39023 else
39024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025 $as_echo "no" >&6; }
39026 fi
39027 
39028 
39029     test -n "$OBJDUMP" && break
39030   done
39031 fi
39032 if test -z "$OBJDUMP"; then
39033   ac_ct_OBJDUMP=$OBJDUMP
39034   for ac_prog in gobjdump objdump
39035 do
39036   # Extract the first word of "$ac_prog", so it can be a program name with args.
39037 set dummy $ac_prog; ac_word=$2
39038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39039 $as_echo_n "checking for $ac_word... " >&6; }
39040 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39041   $as_echo_n "(cached) " >&6
39042 else
39043   if test -n "$ac_ct_OBJDUMP"; then
39044   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39045 else
39046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39047 for as_dir in $PATH
39048 do
39049   IFS=$as_save_IFS
39050   test -z "$as_dir" && as_dir=.
39051     for ac_exec_ext in '' $ac_executable_extensions; do
39052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39053     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39055     break 2
39056   fi
39057 done
39058   done
39059 IFS=$as_save_IFS
39060 
39061 fi
39062 fi
39063 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39064 if test -n "$ac_ct_OBJDUMP"; then
39065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39066 $as_echo "$ac_ct_OBJDUMP" >&6; }
39067 else
39068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39069 $as_echo "no" >&6; }
39070 fi
39071 
39072 
39073   test -n "$ac_ct_OBJDUMP" && break
39074 done
39075 
39076   if test "x$ac_ct_OBJDUMP" = x; then
39077     OBJDUMP=""
39078   else
39079     case $cross_compiling:$ac_tool_warned in
39080 yes:)
39081 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39082 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39083 ac_tool_warned=yes ;;
39084 esac
39085     OBJDUMP=$ac_ct_OBJDUMP
39086   fi
39087 fi
39088 
39089     else
39090       # If it succeeded, then it was overridden by the user. We will use it
39091       # for the tool.
39092 
39093       # First remove it from the list of overridden variables, so we can test
39094       # for unknown variables in the end.
39095       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39096 
39097       # Check if the provided tool contains a complete path.
39098       tool_specified="$OBJDUMP"
39099       tool_basename="${tool_specified##*/}"
39100       if test "x$tool_basename" = "x$tool_specified"; then
39101         # A command without a complete path is provided, search $PATH.
39102         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39103 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39104         # Extract the first word of "$tool_basename", so it can be a program name with args.
39105 set dummy $tool_basename; ac_word=$2
39106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39107 $as_echo_n "checking for $ac_word... " >&6; }
39108 if ${ac_cv_path_OBJDUMP+:} false; then :
39109   $as_echo_n "(cached) " >&6
39110 else
39111   case $OBJDUMP in
39112   [\\/]* | ?:[\\/]*)
39113   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39114   ;;
39115   *)
39116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39117 for as_dir in $PATH
39118 do
39119   IFS=$as_save_IFS
39120   test -z "$as_dir" && as_dir=.
39121     for ac_exec_ext in '' $ac_executable_extensions; do
39122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39123     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39125     break 2
39126   fi
39127 done
39128   done
39129 IFS=$as_save_IFS
39130 
39131   ;;
39132 esac
39133 fi
39134 OBJDUMP=$ac_cv_path_OBJDUMP
39135 if test -n "$OBJDUMP"; then
39136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39137 $as_echo "$OBJDUMP" >&6; }
39138 else
39139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39140 $as_echo "no" >&6; }
39141 fi
39142 
39143 
39144         if test "x$OBJDUMP" = x; then
39145           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39146         fi
39147       else
39148         # Otherwise we believe it is a complete path. Use it as it is.
39149         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39150 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39151         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39152 $as_echo_n "checking for OBJDUMP... " >&6; }
39153         if test ! -x "$tool_specified"; then
39154           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39155 $as_echo "not found" >&6; }
39156           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39157         fi
39158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39159 $as_echo "$tool_specified" >&6; }
39160       fi
39161     fi
39162   fi
39163 
39164 
39165   if test "x$OBJDUMP" != x; then
39166     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39167     # bails if argument is missing.
39168 
39169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170 
39171   # First separate the path from the arguments. This will split at the first
39172   # space.
39173   complete="$OBJDUMP"
39174   path="${complete%% *}"
39175   tmp="$complete EOL"
39176   arguments="${tmp#* }"
39177 
39178   # Input might be given as Windows format, start by converting to
39179   # unix format.
39180   new_path=`$CYGPATH -u "$path"`
39181 
39182   # Now try to locate executable using which
39183   new_path=`$WHICH "$new_path" 2> /dev/null`
39184   # bat and cmd files are not always considered executable in cygwin causing which
39185   # to not find them
39186   if test "x$new_path" = x \
39187       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39188       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39189     new_path=`$CYGPATH -u "$path"`
39190   fi
39191   if test "x$new_path" = x; then
39192     # Oops. Which didn't find the executable.
39193     # The splitting of arguments from the executable at a space might have been incorrect,
39194     # since paths with space are more likely in Windows. Give it another try with the whole
39195     # argument.
39196     path="$complete"
39197     arguments="EOL"
39198     new_path=`$CYGPATH -u "$path"`
39199     new_path=`$WHICH "$new_path" 2> /dev/null`
39200     # bat and cmd files are not always considered executable in cygwin causing which
39201     # to not find them
39202     if test "x$new_path" = x \
39203         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39204         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39205       new_path=`$CYGPATH -u "$path"`
39206     fi
39207     if test "x$new_path" = x; then
39208       # It's still not found. Now this is an unrecoverable error.
39209       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39210 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39211       has_space=`$ECHO "$complete" | $GREP " "`
39212       if test "x$has_space" != x; then
39213         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39214 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39215       fi
39216       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39217     fi
39218   fi
39219 
39220   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39221   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39222   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39223   # "foo.exe" is OK but "foo" is an error.
39224   #
39225   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39226   # It is also a way to make sure we got the proper file name for the real test later on.
39227   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39228   if test "x$test_shortpath" = x; then
39229     # Short path failed, file does not exist as specified.
39230     # Try adding .exe or .cmd
39231     if test -f "${new_path}.exe"; then
39232       input_to_shortpath="${new_path}.exe"
39233     elif test -f "${new_path}.cmd"; then
39234       input_to_shortpath="${new_path}.cmd"
39235     else
39236       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39237 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39238       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39239 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39240       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39241     fi
39242   else
39243     input_to_shortpath="$new_path"
39244   fi
39245 
39246   # Call helper function which possibly converts this using DOS-style short mode.
39247   # If so, the updated path is stored in $new_path.
39248   new_path="$input_to_shortpath"
39249 
39250   input_path="$input_to_shortpath"
39251   # Check if we need to convert this using DOS-style short mode. If the path
39252   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39253   # take no chances and rewrite it.
39254   # Note: m4 eats our [], so we need to use [ and ] instead.
39255   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39256   if test "x$has_forbidden_chars" != x; then
39257     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39258     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39259     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39260     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39261       # Going to short mode and back again did indeed matter. Since short mode is
39262       # case insensitive, let's make it lowercase to improve readability.
39263       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39264       # Now convert it back to Unix-stile (cygpath)
39265       input_path=`$CYGPATH -u "$shortmode_path"`
39266       new_path="$input_path"
39267     fi
39268   fi
39269 
39270   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39271   if test "x$test_cygdrive_prefix" = x; then
39272     # As a simple fix, exclude /usr/bin since it's not a real path.
39273     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39274       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39275       # a path prefixed by /cygdrive for fixpath to work.
39276       new_path="$CYGWIN_ROOT_PATH$input_path"
39277     fi
39278   fi
39279 
39280   # remove trailing .exe if any
39281   new_path="${new_path/%.exe/}"
39282 
39283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39284 
39285   # First separate the path from the arguments. This will split at the first
39286   # space.
39287   complete="$OBJDUMP"
39288   path="${complete%% *}"
39289   tmp="$complete EOL"
39290   arguments="${tmp#* }"
39291 
39292   # Input might be given as Windows format, start by converting to
39293   # unix format.
39294   new_path="$path"
39295 
39296   windows_path="$new_path"
39297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39298     unix_path=`$CYGPATH -u "$windows_path"`
39299     new_path="$unix_path"
39300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39302     new_path="$unix_path"
39303   fi
39304 
39305 
39306   # Now try to locate executable using which
39307   new_path=`$WHICH "$new_path" 2> /dev/null`
39308 
39309   if test "x$new_path" = x; then
39310     # Oops. Which didn't find the executable.
39311     # The splitting of arguments from the executable at a space might have been incorrect,
39312     # since paths with space are more likely in Windows. Give it another try with the whole
39313     # argument.
39314     path="$complete"
39315     arguments="EOL"
39316     new_path="$path"
39317 
39318   windows_path="$new_path"
39319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39320     unix_path=`$CYGPATH -u "$windows_path"`
39321     new_path="$unix_path"
39322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39324     new_path="$unix_path"
39325   fi
39326 
39327 
39328     new_path=`$WHICH "$new_path" 2> /dev/null`
39329     # bat and cmd files are not always considered executable in MSYS causing which
39330     # to not find them
39331     if test "x$new_path" = x \
39332         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39333         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39334       new_path="$path"
39335 
39336   windows_path="$new_path"
39337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39338     unix_path=`$CYGPATH -u "$windows_path"`
39339     new_path="$unix_path"
39340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39342     new_path="$unix_path"
39343   fi
39344 
39345     fi
39346 
39347     if test "x$new_path" = x; then
39348       # It's still not found. Now this is an unrecoverable error.
39349       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39350 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39351       has_space=`$ECHO "$complete" | $GREP " "`
39352       if test "x$has_space" != x; then
39353         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39354 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39355       fi
39356       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39357     fi
39358   fi
39359 
39360   # Now new_path has a complete unix path to the binary
39361   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39362     # Keep paths in /bin as-is, but remove trailing .exe if any
39363     new_path="${new_path/%.exe/}"
39364     # Do not save /bin paths to all_fixpath_prefixes!
39365   else
39366     # Not in mixed or Windows style, start by that.
39367     new_path=`cmd //c echo $new_path`
39368 
39369   input_path="$new_path"
39370   # Check if we need to convert this using DOS-style short mode. If the path
39371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39372   # take no chances and rewrite it.
39373   # Note: m4 eats our [], so we need to use [ and ] instead.
39374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39375   if test "x$has_forbidden_chars" != x; then
39376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39377     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39378   fi
39379 
39380     # Output is in $new_path
39381 
39382   windows_path="$new_path"
39383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39384     unix_path=`$CYGPATH -u "$windows_path"`
39385     new_path="$unix_path"
39386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39388     new_path="$unix_path"
39389   fi
39390 
39391     # remove trailing .exe if any
39392     new_path="${new_path/%.exe/}"
39393 
39394     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39395     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39396   fi
39397 
39398   else
39399     # We're on a unix platform. Hooray! :)
39400     # First separate the path from the arguments. This will split at the first
39401     # space.
39402     complete="$OBJDUMP"
39403     path="${complete%% *}"
39404     tmp="$complete EOL"
39405     arguments="${tmp#* }"
39406 
39407     # Cannot rely on the command "which" here since it doesn't always work.
39408     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39409     if test -z "$is_absolute_path"; then
39410       # Path to executable is not absolute. Find it.
39411       IFS_save="$IFS"
39412       IFS=:
39413       for p in $PATH; do
39414         if test -f "$p/$path" && test -x "$p/$path"; then
39415           new_path="$p/$path"
39416           break
39417         fi
39418       done
39419       IFS="$IFS_save"
39420     else
39421       # This is an absolute path, we can use it without further modifications.
39422       new_path="$path"
39423     fi
39424 
39425     if test "x$new_path" = x; then
39426       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39427 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39428       has_space=`$ECHO "$complete" | $GREP " "`
39429       if test "x$has_space" != x; then
39430         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39431 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39432       fi
39433       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39434     fi
39435   fi
39436 
39437   # Now join together the path and the arguments once again
39438   if test "x$arguments" != xEOL; then
39439     new_complete="$new_path ${arguments% *}"
39440   else
39441     new_complete="$new_path"
39442   fi
39443 
39444   if test "x$complete" != "x$new_complete"; then
39445     OBJDUMP="$new_complete"
39446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39447 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39448   fi
39449 
39450   fi
39451 
39452 
39453   # Restore old path.
39454   PATH="$OLD_PATH"
39455 
39456   # Restore the flags to the user specified values.
39457   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39458   CFLAGS="$ORG_CFLAGS"
39459   CXXFLAGS="$ORG_CXXFLAGS"
39460   OBJCFLAGS="$ORG_OBJCFLAGS"
39461 
39462 
39463 # Finally do some processing after the detection phase
39464 
39465   if test "x$COMPILE_TYPE" = "xcross"; then
39466     # Now we need to find a C/C++ compiler that can build executables for the
39467     # build platform. We can't use the AC_PROG_CC macro, since it can only be
39468     # used once. Also, we need to do this without adding a tools dir to the
39469     # path, otherwise we might pick up cross-compilers which don't use standard
39470     # naming.
39471 
39472     # FIXME: we should list the discovered compilers as an exclude pattern!
39473     # If we do that, we can do this detection before POST_DETECTION, and still
39474     # find the build compilers in the tools dir, if needed.
39475 
39476 
39477   # Publish this variable in the help.
39478 
39479 
39480   if test "x$BUILD_CC" = x; then
39481     # The variable is not set by user, try to locate tool using the code snippet
39482     for ac_prog in cl cc gcc
39483 do
39484   # Extract the first word of "$ac_prog", so it can be a program name with args.
39485 set dummy $ac_prog; ac_word=$2
39486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39487 $as_echo_n "checking for $ac_word... " >&6; }
39488 if ${ac_cv_path_BUILD_CC+:} false; then :
39489   $as_echo_n "(cached) " >&6
39490 else
39491   case $BUILD_CC in
39492   [\\/]* | ?:[\\/]*)
39493   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39494   ;;
39495   *)
39496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39497 for as_dir in $PATH
39498 do
39499   IFS=$as_save_IFS
39500   test -z "$as_dir" && as_dir=.
39501     for ac_exec_ext in '' $ac_executable_extensions; do
39502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39503     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39505     break 2
39506   fi
39507 done
39508   done
39509 IFS=$as_save_IFS
39510 
39511   ;;
39512 esac
39513 fi
39514 BUILD_CC=$ac_cv_path_BUILD_CC
39515 if test -n "$BUILD_CC"; then
39516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39517 $as_echo "$BUILD_CC" >&6; }
39518 else
39519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39520 $as_echo "no" >&6; }
39521 fi
39522 
39523 
39524   test -n "$BUILD_CC" && break
39525 done
39526 
39527   else
39528     # The variable is set, but is it from the command line or the environment?
39529 
39530     # Try to remove the string !BUILD_CC! from our list.
39531     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39532     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39533       # If it failed, the variable was not from the command line. Ignore it,
39534       # but warn the user (except for BASH, which is always set by the calling BASH).
39535       if test "xBUILD_CC" != xBASH; then
39536         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39537 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39538       fi
39539       # Try to locate tool using the code snippet
39540       for ac_prog in cl cc gcc
39541 do
39542   # Extract the first word of "$ac_prog", so it can be a program name with args.
39543 set dummy $ac_prog; ac_word=$2
39544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39545 $as_echo_n "checking for $ac_word... " >&6; }
39546 if ${ac_cv_path_BUILD_CC+:} false; then :
39547   $as_echo_n "(cached) " >&6
39548 else
39549   case $BUILD_CC in
39550   [\\/]* | ?:[\\/]*)
39551   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39552   ;;
39553   *)
39554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39555 for as_dir in $PATH
39556 do
39557   IFS=$as_save_IFS
39558   test -z "$as_dir" && as_dir=.
39559     for ac_exec_ext in '' $ac_executable_extensions; do
39560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39561     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39563     break 2
39564   fi
39565 done
39566   done
39567 IFS=$as_save_IFS
39568 
39569   ;;
39570 esac
39571 fi
39572 BUILD_CC=$ac_cv_path_BUILD_CC
39573 if test -n "$BUILD_CC"; then
39574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39575 $as_echo "$BUILD_CC" >&6; }
39576 else
39577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39578 $as_echo "no" >&6; }
39579 fi
39580 
39581 
39582   test -n "$BUILD_CC" && break
39583 done
39584 
39585     else
39586       # If it succeeded, then it was overridden by the user. We will use it
39587       # for the tool.
39588 
39589       # First remove it from the list of overridden variables, so we can test
39590       # for unknown variables in the end.
39591       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39592 
39593       # Check if the provided tool contains a complete path.
39594       tool_specified="$BUILD_CC"
39595       tool_basename="${tool_specified##*/}"
39596       if test "x$tool_basename" = "x$tool_specified"; then
39597         # A command without a complete path is provided, search $PATH.
39598         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39599 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39600         # Extract the first word of "$tool_basename", so it can be a program name with args.
39601 set dummy $tool_basename; ac_word=$2
39602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39603 $as_echo_n "checking for $ac_word... " >&6; }
39604 if ${ac_cv_path_BUILD_CC+:} false; then :
39605   $as_echo_n "(cached) " >&6
39606 else
39607   case $BUILD_CC in
39608   [\\/]* | ?:[\\/]*)
39609   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39610   ;;
39611   *)
39612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39613 for as_dir in $PATH
39614 do
39615   IFS=$as_save_IFS
39616   test -z "$as_dir" && as_dir=.
39617     for ac_exec_ext in '' $ac_executable_extensions; do
39618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39619     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39621     break 2
39622   fi
39623 done
39624   done
39625 IFS=$as_save_IFS
39626 
39627   ;;
39628 esac
39629 fi
39630 BUILD_CC=$ac_cv_path_BUILD_CC
39631 if test -n "$BUILD_CC"; then
39632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39633 $as_echo "$BUILD_CC" >&6; }
39634 else
39635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39636 $as_echo "no" >&6; }
39637 fi
39638 
39639 
39640         if test "x$BUILD_CC" = x; then
39641           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39642         fi
39643       else
39644         # Otherwise we believe it is a complete path. Use it as it is.
39645         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39646 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39647         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39648 $as_echo_n "checking for BUILD_CC... " >&6; }
39649         if test ! -x "$tool_specified"; then
39650           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39651 $as_echo "not found" >&6; }
39652           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39653         fi
39654         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39655 $as_echo "$tool_specified" >&6; }
39656       fi
39657     fi
39658   fi
39659 
39660 
39661 
39662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39663 
39664   # First separate the path from the arguments. This will split at the first
39665   # space.
39666   complete="$BUILD_CC"
39667   path="${complete%% *}"
39668   tmp="$complete EOL"
39669   arguments="${tmp#* }"
39670 
39671   # Input might be given as Windows format, start by converting to
39672   # unix format.
39673   new_path=`$CYGPATH -u "$path"`
39674 
39675   # Now try to locate executable using which
39676   new_path=`$WHICH "$new_path" 2> /dev/null`
39677   # bat and cmd files are not always considered executable in cygwin causing which
39678   # to not find them
39679   if test "x$new_path" = x \
39680       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39681       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39682     new_path=`$CYGPATH -u "$path"`
39683   fi
39684   if test "x$new_path" = x; then
39685     # Oops. Which didn't find the executable.
39686     # The splitting of arguments from the executable at a space might have been incorrect,
39687     # since paths with space are more likely in Windows. Give it another try with the whole
39688     # argument.
39689     path="$complete"
39690     arguments="EOL"
39691     new_path=`$CYGPATH -u "$path"`
39692     new_path=`$WHICH "$new_path" 2> /dev/null`
39693     # bat and cmd files are not always considered executable in cygwin causing which
39694     # to not find them
39695     if test "x$new_path" = x \
39696         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39697         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39698       new_path=`$CYGPATH -u "$path"`
39699     fi
39700     if test "x$new_path" = x; then
39701       # It's still not found. Now this is an unrecoverable error.
39702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39703 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39704       has_space=`$ECHO "$complete" | $GREP " "`
39705       if test "x$has_space" != x; then
39706         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39707 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39708       fi
39709       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39710     fi
39711   fi
39712 
39713   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39714   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39715   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39716   # "foo.exe" is OK but "foo" is an error.
39717   #
39718   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39719   # It is also a way to make sure we got the proper file name for the real test later on.
39720   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39721   if test "x$test_shortpath" = x; then
39722     # Short path failed, file does not exist as specified.
39723     # Try adding .exe or .cmd
39724     if test -f "${new_path}.exe"; then
39725       input_to_shortpath="${new_path}.exe"
39726     elif test -f "${new_path}.cmd"; then
39727       input_to_shortpath="${new_path}.cmd"
39728     else
39729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39730 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39731       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39732 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39733       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39734     fi
39735   else
39736     input_to_shortpath="$new_path"
39737   fi
39738 
39739   # Call helper function which possibly converts this using DOS-style short mode.
39740   # If so, the updated path is stored in $new_path.
39741   new_path="$input_to_shortpath"
39742 
39743   input_path="$input_to_shortpath"
39744   # Check if we need to convert this using DOS-style short mode. If the path
39745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39746   # take no chances and rewrite it.
39747   # Note: m4 eats our [], so we need to use [ and ] instead.
39748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39749   if test "x$has_forbidden_chars" != x; then
39750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39751     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39752     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39753     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39754       # Going to short mode and back again did indeed matter. Since short mode is
39755       # case insensitive, let's make it lowercase to improve readability.
39756       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39757       # Now convert it back to Unix-stile (cygpath)
39758       input_path=`$CYGPATH -u "$shortmode_path"`
39759       new_path="$input_path"
39760     fi
39761   fi
39762 
39763   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39764   if test "x$test_cygdrive_prefix" = x; then
39765     # As a simple fix, exclude /usr/bin since it's not a real path.
39766     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39767       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39768       # a path prefixed by /cygdrive for fixpath to work.
39769       new_path="$CYGWIN_ROOT_PATH$input_path"
39770     fi
39771   fi
39772 
39773   # remove trailing .exe if any
39774   new_path="${new_path/%.exe/}"
39775 
39776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39777 
39778   # First separate the path from the arguments. This will split at the first
39779   # space.
39780   complete="$BUILD_CC"
39781   path="${complete%% *}"
39782   tmp="$complete EOL"
39783   arguments="${tmp#* }"
39784 
39785   # Input might be given as Windows format, start by converting to
39786   # unix format.
39787   new_path="$path"
39788 
39789   windows_path="$new_path"
39790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791     unix_path=`$CYGPATH -u "$windows_path"`
39792     new_path="$unix_path"
39793   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39794     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39795     new_path="$unix_path"
39796   fi
39797 
39798 
39799   # Now try to locate executable using which
39800   new_path=`$WHICH "$new_path" 2> /dev/null`
39801 
39802   if test "x$new_path" = x; then
39803     # Oops. Which didn't find the executable.
39804     # The splitting of arguments from the executable at a space might have been incorrect,
39805     # since paths with space are more likely in Windows. Give it another try with the whole
39806     # argument.
39807     path="$complete"
39808     arguments="EOL"
39809     new_path="$path"
39810 
39811   windows_path="$new_path"
39812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39813     unix_path=`$CYGPATH -u "$windows_path"`
39814     new_path="$unix_path"
39815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39817     new_path="$unix_path"
39818   fi
39819 
39820 
39821     new_path=`$WHICH "$new_path" 2> /dev/null`
39822     # bat and cmd files are not always considered executable in MSYS causing which
39823     # to not find them
39824     if test "x$new_path" = x \
39825         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39826         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39827       new_path="$path"
39828 
39829   windows_path="$new_path"
39830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39831     unix_path=`$CYGPATH -u "$windows_path"`
39832     new_path="$unix_path"
39833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39835     new_path="$unix_path"
39836   fi
39837 
39838     fi
39839 
39840     if test "x$new_path" = x; then
39841       # It's still not found. Now this is an unrecoverable error.
39842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39843 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39844       has_space=`$ECHO "$complete" | $GREP " "`
39845       if test "x$has_space" != x; then
39846         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39847 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39848       fi
39849       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39850     fi
39851   fi
39852 
39853   # Now new_path has a complete unix path to the binary
39854   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39855     # Keep paths in /bin as-is, but remove trailing .exe if any
39856     new_path="${new_path/%.exe/}"
39857     # Do not save /bin paths to all_fixpath_prefixes!
39858   else
39859     # Not in mixed or Windows style, start by that.
39860     new_path=`cmd //c echo $new_path`
39861 
39862   input_path="$new_path"
39863   # Check if we need to convert this using DOS-style short mode. If the path
39864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39865   # take no chances and rewrite it.
39866   # Note: m4 eats our [], so we need to use [ and ] instead.
39867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39868   if test "x$has_forbidden_chars" != x; then
39869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39871   fi
39872 
39873     # Output is in $new_path
39874 
39875   windows_path="$new_path"
39876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39877     unix_path=`$CYGPATH -u "$windows_path"`
39878     new_path="$unix_path"
39879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39881     new_path="$unix_path"
39882   fi
39883 
39884     # remove trailing .exe if any
39885     new_path="${new_path/%.exe/}"
39886 
39887     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39888     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39889   fi
39890 
39891   else
39892     # We're on a unix platform. Hooray! :)
39893     # First separate the path from the arguments. This will split at the first
39894     # space.
39895     complete="$BUILD_CC"
39896     path="${complete%% *}"
39897     tmp="$complete EOL"
39898     arguments="${tmp#* }"
39899 
39900     # Cannot rely on the command "which" here since it doesn't always work.
39901     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39902     if test -z "$is_absolute_path"; then
39903       # Path to executable is not absolute. Find it.
39904       IFS_save="$IFS"
39905       IFS=:
39906       for p in $PATH; do
39907         if test -f "$p/$path" && test -x "$p/$path"; then
39908           new_path="$p/$path"
39909           break
39910         fi
39911       done
39912       IFS="$IFS_save"
39913     else
39914       # This is an absolute path, we can use it without further modifications.
39915       new_path="$path"
39916     fi
39917 
39918     if test "x$new_path" = x; then
39919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39920 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39921       has_space=`$ECHO "$complete" | $GREP " "`
39922       if test "x$has_space" != x; then
39923         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39924 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39925       fi
39926       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39927     fi
39928   fi
39929 
39930   # Now join together the path and the arguments once again
39931   if test "x$arguments" != xEOL; then
39932     new_complete="$new_path ${arguments% *}"
39933   else
39934     new_complete="$new_path"
39935   fi
39936 
39937   if test "x$complete" != "x$new_complete"; then
39938     BUILD_CC="$new_complete"
39939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39940 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39941   fi
39942 
39943 
39944 
39945   # Publish this variable in the help.
39946 
39947 
39948   if test "x$BUILD_CXX" = x; then
39949     # The variable is not set by user, try to locate tool using the code snippet
39950     for ac_prog in cl CC g++
39951 do
39952   # Extract the first word of "$ac_prog", so it can be a program name with args.
39953 set dummy $ac_prog; ac_word=$2
39954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39955 $as_echo_n "checking for $ac_word... " >&6; }
39956 if ${ac_cv_path_BUILD_CXX+:} false; then :
39957   $as_echo_n "(cached) " >&6
39958 else
39959   case $BUILD_CXX in
39960   [\\/]* | ?:[\\/]*)
39961   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39962   ;;
39963   *)
39964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39965 for as_dir in $PATH
39966 do
39967   IFS=$as_save_IFS
39968   test -z "$as_dir" && as_dir=.
39969     for ac_exec_ext in '' $ac_executable_extensions; do
39970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39971     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39973     break 2
39974   fi
39975 done
39976   done
39977 IFS=$as_save_IFS
39978 
39979   ;;
39980 esac
39981 fi
39982 BUILD_CXX=$ac_cv_path_BUILD_CXX
39983 if test -n "$BUILD_CXX"; then
39984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39985 $as_echo "$BUILD_CXX" >&6; }
39986 else
39987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39988 $as_echo "no" >&6; }
39989 fi
39990 
39991 
39992   test -n "$BUILD_CXX" && break
39993 done
39994 
39995   else
39996     # The variable is set, but is it from the command line or the environment?
39997 
39998     # Try to remove the string !BUILD_CXX! from our list.
39999     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40000     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40001       # If it failed, the variable was not from the command line. Ignore it,
40002       # but warn the user (except for BASH, which is always set by the calling BASH).
40003       if test "xBUILD_CXX" != xBASH; then
40004         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40005 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40006       fi
40007       # Try to locate tool using the code snippet
40008       for ac_prog in cl CC g++
40009 do
40010   # Extract the first word of "$ac_prog", so it can be a program name with args.
40011 set dummy $ac_prog; ac_word=$2
40012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40013 $as_echo_n "checking for $ac_word... " >&6; }
40014 if ${ac_cv_path_BUILD_CXX+:} false; then :
40015   $as_echo_n "(cached) " >&6
40016 else
40017   case $BUILD_CXX in
40018   [\\/]* | ?:[\\/]*)
40019   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40020   ;;
40021   *)
40022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40023 for as_dir in $PATH
40024 do
40025   IFS=$as_save_IFS
40026   test -z "$as_dir" && as_dir=.
40027     for ac_exec_ext in '' $ac_executable_extensions; do
40028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40029     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40031     break 2
40032   fi
40033 done
40034   done
40035 IFS=$as_save_IFS
40036 
40037   ;;
40038 esac
40039 fi
40040 BUILD_CXX=$ac_cv_path_BUILD_CXX
40041 if test -n "$BUILD_CXX"; then
40042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40043 $as_echo "$BUILD_CXX" >&6; }
40044 else
40045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40046 $as_echo "no" >&6; }
40047 fi
40048 
40049 
40050   test -n "$BUILD_CXX" && break
40051 done
40052 
40053     else
40054       # If it succeeded, then it was overridden by the user. We will use it
40055       # for the tool.
40056 
40057       # First remove it from the list of overridden variables, so we can test
40058       # for unknown variables in the end.
40059       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40060 
40061       # Check if the provided tool contains a complete path.
40062       tool_specified="$BUILD_CXX"
40063       tool_basename="${tool_specified##*/}"
40064       if test "x$tool_basename" = "x$tool_specified"; then
40065         # A command without a complete path is provided, search $PATH.
40066         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40067 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40068         # Extract the first word of "$tool_basename", so it can be a program name with args.
40069 set dummy $tool_basename; ac_word=$2
40070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40071 $as_echo_n "checking for $ac_word... " >&6; }
40072 if ${ac_cv_path_BUILD_CXX+:} false; then :
40073   $as_echo_n "(cached) " >&6
40074 else
40075   case $BUILD_CXX in
40076   [\\/]* | ?:[\\/]*)
40077   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40078   ;;
40079   *)
40080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40081 for as_dir in $PATH
40082 do
40083   IFS=$as_save_IFS
40084   test -z "$as_dir" && as_dir=.
40085     for ac_exec_ext in '' $ac_executable_extensions; do
40086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40087     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40089     break 2
40090   fi
40091 done
40092   done
40093 IFS=$as_save_IFS
40094 
40095   ;;
40096 esac
40097 fi
40098 BUILD_CXX=$ac_cv_path_BUILD_CXX
40099 if test -n "$BUILD_CXX"; then
40100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40101 $as_echo "$BUILD_CXX" >&6; }
40102 else
40103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40104 $as_echo "no" >&6; }
40105 fi
40106 
40107 
40108         if test "x$BUILD_CXX" = x; then
40109           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40110         fi
40111       else
40112         # Otherwise we believe it is a complete path. Use it as it is.
40113         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40114 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40115         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40116 $as_echo_n "checking for BUILD_CXX... " >&6; }
40117         if test ! -x "$tool_specified"; then
40118           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40119 $as_echo "not found" >&6; }
40120           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40121         fi
40122         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40123 $as_echo "$tool_specified" >&6; }
40124       fi
40125     fi
40126   fi
40127 
40128 
40129 
40130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40131 
40132   # First separate the path from the arguments. This will split at the first
40133   # space.
40134   complete="$BUILD_CXX"
40135   path="${complete%% *}"
40136   tmp="$complete EOL"
40137   arguments="${tmp#* }"
40138 
40139   # Input might be given as Windows format, start by converting to
40140   # unix format.
40141   new_path=`$CYGPATH -u "$path"`
40142 
40143   # Now try to locate executable using which
40144   new_path=`$WHICH "$new_path" 2> /dev/null`
40145   # bat and cmd files are not always considered executable in cygwin causing which
40146   # to not find them
40147   if test "x$new_path" = x \
40148       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40149       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40150     new_path=`$CYGPATH -u "$path"`
40151   fi
40152   if test "x$new_path" = x; then
40153     # Oops. Which didn't find the executable.
40154     # The splitting of arguments from the executable at a space might have been incorrect,
40155     # since paths with space are more likely in Windows. Give it another try with the whole
40156     # argument.
40157     path="$complete"
40158     arguments="EOL"
40159     new_path=`$CYGPATH -u "$path"`
40160     new_path=`$WHICH "$new_path" 2> /dev/null`
40161     # bat and cmd files are not always considered executable in cygwin causing which
40162     # to not find them
40163     if test "x$new_path" = x \
40164         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40165         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40166       new_path=`$CYGPATH -u "$path"`
40167     fi
40168     if test "x$new_path" = x; then
40169       # It's still not found. Now this is an unrecoverable error.
40170       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40171 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40172       has_space=`$ECHO "$complete" | $GREP " "`
40173       if test "x$has_space" != x; then
40174         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40175 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40176       fi
40177       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40178     fi
40179   fi
40180 
40181   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40182   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40183   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40184   # "foo.exe" is OK but "foo" is an error.
40185   #
40186   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40187   # It is also a way to make sure we got the proper file name for the real test later on.
40188   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40189   if test "x$test_shortpath" = x; then
40190     # Short path failed, file does not exist as specified.
40191     # Try adding .exe or .cmd
40192     if test -f "${new_path}.exe"; then
40193       input_to_shortpath="${new_path}.exe"
40194     elif test -f "${new_path}.cmd"; then
40195       input_to_shortpath="${new_path}.cmd"
40196     else
40197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40198 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40199       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40200 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40201       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40202     fi
40203   else
40204     input_to_shortpath="$new_path"
40205   fi
40206 
40207   # Call helper function which possibly converts this using DOS-style short mode.
40208   # If so, the updated path is stored in $new_path.
40209   new_path="$input_to_shortpath"
40210 
40211   input_path="$input_to_shortpath"
40212   # Check if we need to convert this using DOS-style short mode. If the path
40213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40214   # take no chances and rewrite it.
40215   # Note: m4 eats our [], so we need to use [ and ] instead.
40216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40217   if test "x$has_forbidden_chars" != x; then
40218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40219     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40220     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40221     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40222       # Going to short mode and back again did indeed matter. Since short mode is
40223       # case insensitive, let's make it lowercase to improve readability.
40224       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40225       # Now convert it back to Unix-stile (cygpath)
40226       input_path=`$CYGPATH -u "$shortmode_path"`
40227       new_path="$input_path"
40228     fi
40229   fi
40230 
40231   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40232   if test "x$test_cygdrive_prefix" = x; then
40233     # As a simple fix, exclude /usr/bin since it's not a real path.
40234     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40235       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40236       # a path prefixed by /cygdrive for fixpath to work.
40237       new_path="$CYGWIN_ROOT_PATH$input_path"
40238     fi
40239   fi
40240 
40241   # remove trailing .exe if any
40242   new_path="${new_path/%.exe/}"
40243 
40244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40245 
40246   # First separate the path from the arguments. This will split at the first
40247   # space.
40248   complete="$BUILD_CXX"
40249   path="${complete%% *}"
40250   tmp="$complete EOL"
40251   arguments="${tmp#* }"
40252 
40253   # Input might be given as Windows format, start by converting to
40254   # unix format.
40255   new_path="$path"
40256 
40257   windows_path="$new_path"
40258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40259     unix_path=`$CYGPATH -u "$windows_path"`
40260     new_path="$unix_path"
40261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40263     new_path="$unix_path"
40264   fi
40265 
40266 
40267   # Now try to locate executable using which
40268   new_path=`$WHICH "$new_path" 2> /dev/null`
40269 
40270   if test "x$new_path" = x; then
40271     # Oops. Which didn't find the executable.
40272     # The splitting of arguments from the executable at a space might have been incorrect,
40273     # since paths with space are more likely in Windows. Give it another try with the whole
40274     # argument.
40275     path="$complete"
40276     arguments="EOL"
40277     new_path="$path"
40278 
40279   windows_path="$new_path"
40280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40281     unix_path=`$CYGPATH -u "$windows_path"`
40282     new_path="$unix_path"
40283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40284     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40285     new_path="$unix_path"
40286   fi
40287 
40288 
40289     new_path=`$WHICH "$new_path" 2> /dev/null`
40290     # bat and cmd files are not always considered executable in MSYS causing which
40291     # to not find them
40292     if test "x$new_path" = x \
40293         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40294         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40295       new_path="$path"
40296 
40297   windows_path="$new_path"
40298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40299     unix_path=`$CYGPATH -u "$windows_path"`
40300     new_path="$unix_path"
40301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40303     new_path="$unix_path"
40304   fi
40305 
40306     fi
40307 
40308     if test "x$new_path" = x; then
40309       # It's still not found. Now this is an unrecoverable error.
40310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40311 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40312       has_space=`$ECHO "$complete" | $GREP " "`
40313       if test "x$has_space" != x; then
40314         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40315 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40316       fi
40317       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40318     fi
40319   fi
40320 
40321   # Now new_path has a complete unix path to the binary
40322   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40323     # Keep paths in /bin as-is, but remove trailing .exe if any
40324     new_path="${new_path/%.exe/}"
40325     # Do not save /bin paths to all_fixpath_prefixes!
40326   else
40327     # Not in mixed or Windows style, start by that.
40328     new_path=`cmd //c echo $new_path`
40329 
40330   input_path="$new_path"
40331   # Check if we need to convert this using DOS-style short mode. If the path
40332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40333   # take no chances and rewrite it.
40334   # Note: m4 eats our [], so we need to use [ and ] instead.
40335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40336   if test "x$has_forbidden_chars" != x; then
40337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40338     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40339   fi
40340 
40341     # Output is in $new_path
40342 
40343   windows_path="$new_path"
40344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40345     unix_path=`$CYGPATH -u "$windows_path"`
40346     new_path="$unix_path"
40347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40349     new_path="$unix_path"
40350   fi
40351 
40352     # remove trailing .exe if any
40353     new_path="${new_path/%.exe/}"
40354 
40355     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40356     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40357   fi
40358 
40359   else
40360     # We're on a unix platform. Hooray! :)
40361     # First separate the path from the arguments. This will split at the first
40362     # space.
40363     complete="$BUILD_CXX"
40364     path="${complete%% *}"
40365     tmp="$complete EOL"
40366     arguments="${tmp#* }"
40367 
40368     # Cannot rely on the command "which" here since it doesn't always work.
40369     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40370     if test -z "$is_absolute_path"; then
40371       # Path to executable is not absolute. Find it.
40372       IFS_save="$IFS"
40373       IFS=:
40374       for p in $PATH; do
40375         if test -f "$p/$path" && test -x "$p/$path"; then
40376           new_path="$p/$path"
40377           break
40378         fi
40379       done
40380       IFS="$IFS_save"
40381     else
40382       # This is an absolute path, we can use it without further modifications.
40383       new_path="$path"
40384     fi
40385 
40386     if test "x$new_path" = x; then
40387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40388 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40389       has_space=`$ECHO "$complete" | $GREP " "`
40390       if test "x$has_space" != x; then
40391         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40392 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40393       fi
40394       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40395     fi
40396   fi
40397 
40398   # Now join together the path and the arguments once again
40399   if test "x$arguments" != xEOL; then
40400     new_complete="$new_path ${arguments% *}"
40401   else
40402     new_complete="$new_path"
40403   fi
40404 
40405   if test "x$complete" != "x$new_complete"; then
40406     BUILD_CXX="$new_complete"
40407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40408 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40409   fi
40410 
40411 
40412 
40413   # Publish this variable in the help.
40414 
40415 
40416   if test "x$BUILD_LD" = x; then
40417     # The variable is not set by user, try to locate tool using the code snippet
40418     for ac_prog in ld
40419 do
40420   # Extract the first word of "$ac_prog", so it can be a program name with args.
40421 set dummy $ac_prog; ac_word=$2
40422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40423 $as_echo_n "checking for $ac_word... " >&6; }
40424 if ${ac_cv_path_BUILD_LD+:} false; then :
40425   $as_echo_n "(cached) " >&6
40426 else
40427   case $BUILD_LD in
40428   [\\/]* | ?:[\\/]*)
40429   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40430   ;;
40431   *)
40432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40433 for as_dir in $PATH
40434 do
40435   IFS=$as_save_IFS
40436   test -z "$as_dir" && as_dir=.
40437     for ac_exec_ext in '' $ac_executable_extensions; do
40438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40439     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40441     break 2
40442   fi
40443 done
40444   done
40445 IFS=$as_save_IFS
40446 
40447   ;;
40448 esac
40449 fi
40450 BUILD_LD=$ac_cv_path_BUILD_LD
40451 if test -n "$BUILD_LD"; then
40452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40453 $as_echo "$BUILD_LD" >&6; }
40454 else
40455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40456 $as_echo "no" >&6; }
40457 fi
40458 
40459 
40460   test -n "$BUILD_LD" && break
40461 done
40462 
40463   else
40464     # The variable is set, but is it from the command line or the environment?
40465 
40466     # Try to remove the string !BUILD_LD! from our list.
40467     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40468     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40469       # If it failed, the variable was not from the command line. Ignore it,
40470       # but warn the user (except for BASH, which is always set by the calling BASH).
40471       if test "xBUILD_LD" != xBASH; then
40472         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40473 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40474       fi
40475       # Try to locate tool using the code snippet
40476       for ac_prog in ld
40477 do
40478   # Extract the first word of "$ac_prog", so it can be a program name with args.
40479 set dummy $ac_prog; ac_word=$2
40480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40481 $as_echo_n "checking for $ac_word... " >&6; }
40482 if ${ac_cv_path_BUILD_LD+:} false; then :
40483   $as_echo_n "(cached) " >&6
40484 else
40485   case $BUILD_LD in
40486   [\\/]* | ?:[\\/]*)
40487   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40488   ;;
40489   *)
40490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40491 for as_dir in $PATH
40492 do
40493   IFS=$as_save_IFS
40494   test -z "$as_dir" && as_dir=.
40495     for ac_exec_ext in '' $ac_executable_extensions; do
40496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40497     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40499     break 2
40500   fi
40501 done
40502   done
40503 IFS=$as_save_IFS
40504 
40505   ;;
40506 esac
40507 fi
40508 BUILD_LD=$ac_cv_path_BUILD_LD
40509 if test -n "$BUILD_LD"; then
40510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40511 $as_echo "$BUILD_LD" >&6; }
40512 else
40513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40514 $as_echo "no" >&6; }
40515 fi
40516 
40517 
40518   test -n "$BUILD_LD" && break
40519 done
40520 
40521     else
40522       # If it succeeded, then it was overridden by the user. We will use it
40523       # for the tool.
40524 
40525       # First remove it from the list of overridden variables, so we can test
40526       # for unknown variables in the end.
40527       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40528 
40529       # Check if the provided tool contains a complete path.
40530       tool_specified="$BUILD_LD"
40531       tool_basename="${tool_specified##*/}"
40532       if test "x$tool_basename" = "x$tool_specified"; then
40533         # A command without a complete path is provided, search $PATH.
40534         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40535 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40536         # Extract the first word of "$tool_basename", so it can be a program name with args.
40537 set dummy $tool_basename; ac_word=$2
40538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40539 $as_echo_n "checking for $ac_word... " >&6; }
40540 if ${ac_cv_path_BUILD_LD+:} false; then :
40541   $as_echo_n "(cached) " >&6
40542 else
40543   case $BUILD_LD in
40544   [\\/]* | ?:[\\/]*)
40545   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40546   ;;
40547   *)
40548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40549 for as_dir in $PATH
40550 do
40551   IFS=$as_save_IFS
40552   test -z "$as_dir" && as_dir=.
40553     for ac_exec_ext in '' $ac_executable_extensions; do
40554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40555     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40557     break 2
40558   fi
40559 done
40560   done
40561 IFS=$as_save_IFS
40562 
40563   ;;
40564 esac
40565 fi
40566 BUILD_LD=$ac_cv_path_BUILD_LD
40567 if test -n "$BUILD_LD"; then
40568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40569 $as_echo "$BUILD_LD" >&6; }
40570 else
40571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40572 $as_echo "no" >&6; }
40573 fi
40574 
40575 
40576         if test "x$BUILD_LD" = x; then
40577           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40578         fi
40579       else
40580         # Otherwise we believe it is a complete path. Use it as it is.
40581         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40582 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40583         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40584 $as_echo_n "checking for BUILD_LD... " >&6; }
40585         if test ! -x "$tool_specified"; then
40586           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40587 $as_echo "not found" >&6; }
40588           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40589         fi
40590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40591 $as_echo "$tool_specified" >&6; }
40592       fi
40593     fi
40594   fi
40595 
40596 
40597 
40598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40599 
40600   # First separate the path from the arguments. This will split at the first
40601   # space.
40602   complete="$BUILD_LD"
40603   path="${complete%% *}"
40604   tmp="$complete EOL"
40605   arguments="${tmp#* }"
40606 
40607   # Input might be given as Windows format, start by converting to
40608   # unix format.
40609   new_path=`$CYGPATH -u "$path"`
40610 
40611   # Now try to locate executable using which
40612   new_path=`$WHICH "$new_path" 2> /dev/null`
40613   # bat and cmd files are not always considered executable in cygwin causing which
40614   # to not find them
40615   if test "x$new_path" = x \
40616       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40617       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40618     new_path=`$CYGPATH -u "$path"`
40619   fi
40620   if test "x$new_path" = x; then
40621     # Oops. Which didn't find the executable.
40622     # The splitting of arguments from the executable at a space might have been incorrect,
40623     # since paths with space are more likely in Windows. Give it another try with the whole
40624     # argument.
40625     path="$complete"
40626     arguments="EOL"
40627     new_path=`$CYGPATH -u "$path"`
40628     new_path=`$WHICH "$new_path" 2> /dev/null`
40629     # bat and cmd files are not always considered executable in cygwin causing which
40630     # to not find them
40631     if test "x$new_path" = x \
40632         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40633         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40634       new_path=`$CYGPATH -u "$path"`
40635     fi
40636     if test "x$new_path" = x; then
40637       # It's still not found. Now this is an unrecoverable error.
40638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40639 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40640       has_space=`$ECHO "$complete" | $GREP " "`
40641       if test "x$has_space" != x; then
40642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40644       fi
40645       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40646     fi
40647   fi
40648 
40649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40652   # "foo.exe" is OK but "foo" is an error.
40653   #
40654   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40655   # It is also a way to make sure we got the proper file name for the real test later on.
40656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40657   if test "x$test_shortpath" = x; then
40658     # Short path failed, file does not exist as specified.
40659     # Try adding .exe or .cmd
40660     if test -f "${new_path}.exe"; then
40661       input_to_shortpath="${new_path}.exe"
40662     elif test -f "${new_path}.cmd"; then
40663       input_to_shortpath="${new_path}.cmd"
40664     else
40665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40666 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40667       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40669       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40670     fi
40671   else
40672     input_to_shortpath="$new_path"
40673   fi
40674 
40675   # Call helper function which possibly converts this using DOS-style short mode.
40676   # If so, the updated path is stored in $new_path.
40677   new_path="$input_to_shortpath"
40678 
40679   input_path="$input_to_shortpath"
40680   # Check if we need to convert this using DOS-style short mode. If the path
40681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40682   # take no chances and rewrite it.
40683   # Note: m4 eats our [], so we need to use [ and ] instead.
40684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40685   if test "x$has_forbidden_chars" != x; then
40686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40690       # Going to short mode and back again did indeed matter. Since short mode is
40691       # case insensitive, let's make it lowercase to improve readability.
40692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40693       # Now convert it back to Unix-stile (cygpath)
40694       input_path=`$CYGPATH -u "$shortmode_path"`
40695       new_path="$input_path"
40696     fi
40697   fi
40698 
40699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40700   if test "x$test_cygdrive_prefix" = x; then
40701     # As a simple fix, exclude /usr/bin since it's not a real path.
40702     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40704       # a path prefixed by /cygdrive for fixpath to work.
40705       new_path="$CYGWIN_ROOT_PATH$input_path"
40706     fi
40707   fi
40708 
40709   # remove trailing .exe if any
40710   new_path="${new_path/%.exe/}"
40711 
40712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40713 
40714   # First separate the path from the arguments. This will split at the first
40715   # space.
40716   complete="$BUILD_LD"
40717   path="${complete%% *}"
40718   tmp="$complete EOL"
40719   arguments="${tmp#* }"
40720 
40721   # Input might be given as Windows format, start by converting to
40722   # unix format.
40723   new_path="$path"
40724 
40725   windows_path="$new_path"
40726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40727     unix_path=`$CYGPATH -u "$windows_path"`
40728     new_path="$unix_path"
40729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40731     new_path="$unix_path"
40732   fi
40733 
40734 
40735   # Now try to locate executable using which
40736   new_path=`$WHICH "$new_path" 2> /dev/null`
40737 
40738   if test "x$new_path" = x; then
40739     # Oops. Which didn't find the executable.
40740     # The splitting of arguments from the executable at a space might have been incorrect,
40741     # since paths with space are more likely in Windows. Give it another try with the whole
40742     # argument.
40743     path="$complete"
40744     arguments="EOL"
40745     new_path="$path"
40746 
40747   windows_path="$new_path"
40748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40749     unix_path=`$CYGPATH -u "$windows_path"`
40750     new_path="$unix_path"
40751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40753     new_path="$unix_path"
40754   fi
40755 
40756 
40757     new_path=`$WHICH "$new_path" 2> /dev/null`
40758     # bat and cmd files are not always considered executable in MSYS causing which
40759     # to not find them
40760     if test "x$new_path" = x \
40761         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40762         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40763       new_path="$path"
40764 
40765   windows_path="$new_path"
40766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40767     unix_path=`$CYGPATH -u "$windows_path"`
40768     new_path="$unix_path"
40769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40771     new_path="$unix_path"
40772   fi
40773 
40774     fi
40775 
40776     if test "x$new_path" = x; then
40777       # It's still not found. Now this is an unrecoverable error.
40778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40779 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40780       has_space=`$ECHO "$complete" | $GREP " "`
40781       if test "x$has_space" != x; then
40782         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40783 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40784       fi
40785       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40786     fi
40787   fi
40788 
40789   # Now new_path has a complete unix path to the binary
40790   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40791     # Keep paths in /bin as-is, but remove trailing .exe if any
40792     new_path="${new_path/%.exe/}"
40793     # Do not save /bin paths to all_fixpath_prefixes!
40794   else
40795     # Not in mixed or Windows style, start by that.
40796     new_path=`cmd //c echo $new_path`
40797 
40798   input_path="$new_path"
40799   # Check if we need to convert this using DOS-style short mode. If the path
40800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40801   # take no chances and rewrite it.
40802   # Note: m4 eats our [], so we need to use [ and ] instead.
40803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40804   if test "x$has_forbidden_chars" != x; then
40805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40807   fi
40808 
40809     # Output is in $new_path
40810 
40811   windows_path="$new_path"
40812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40813     unix_path=`$CYGPATH -u "$windows_path"`
40814     new_path="$unix_path"
40815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40817     new_path="$unix_path"
40818   fi
40819 
40820     # remove trailing .exe if any
40821     new_path="${new_path/%.exe/}"
40822 
40823     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40824     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40825   fi
40826 
40827   else
40828     # We're on a unix platform. Hooray! :)
40829     # First separate the path from the arguments. This will split at the first
40830     # space.
40831     complete="$BUILD_LD"
40832     path="${complete%% *}"
40833     tmp="$complete EOL"
40834     arguments="${tmp#* }"
40835 
40836     # Cannot rely on the command "which" here since it doesn't always work.
40837     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40838     if test -z "$is_absolute_path"; then
40839       # Path to executable is not absolute. Find it.
40840       IFS_save="$IFS"
40841       IFS=:
40842       for p in $PATH; do
40843         if test -f "$p/$path" && test -x "$p/$path"; then
40844           new_path="$p/$path"
40845           break
40846         fi
40847       done
40848       IFS="$IFS_save"
40849     else
40850       # This is an absolute path, we can use it without further modifications.
40851       new_path="$path"
40852     fi
40853 
40854     if test "x$new_path" = x; then
40855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40856 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40857       has_space=`$ECHO "$complete" | $GREP " "`
40858       if test "x$has_space" != x; then
40859         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40860 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40861       fi
40862       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40863     fi
40864   fi
40865 
40866   # Now join together the path and the arguments once again
40867   if test "x$arguments" != xEOL; then
40868     new_complete="$new_path ${arguments% *}"
40869   else
40870     new_complete="$new_path"
40871   fi
40872 
40873   if test "x$complete" != "x$new_complete"; then
40874     BUILD_LD="$new_complete"
40875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40876 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40877   fi
40878 
40879   else
40880     # If we are not cross compiling, use the normal target compilers for
40881     # building the build platform executables.
40882     BUILD_CC="$CC"
40883     BUILD_CXX="$CXX"
40884     BUILD_LD="$LD"
40885   fi
40886 
40887 
40888 
40889 
40890 
40891 
40892   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40893     # For hotspot, we need these in Windows mixed path,
40894     # so rewrite them all. Need added .exe suffix.
40895     HOTSPOT_CXX="$CXX.exe"
40896     HOTSPOT_LD="$LD.exe"
40897     HOTSPOT_MT="$MT.exe"
40898     HOTSPOT_RC="$RC.exe"
40899 
40900   unix_path="$HOTSPOT_CXX"
40901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40902     windows_path=`$CYGPATH -m "$unix_path"`
40903     HOTSPOT_CXX="$windows_path"
40904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40905     windows_path=`cmd //c echo $unix_path`
40906     HOTSPOT_CXX="$windows_path"
40907   fi
40908 
40909 
40910   unix_path="$HOTSPOT_LD"
40911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40912     windows_path=`$CYGPATH -m "$unix_path"`
40913     HOTSPOT_LD="$windows_path"
40914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40915     windows_path=`cmd //c echo $unix_path`
40916     HOTSPOT_LD="$windows_path"
40917   fi
40918 
40919 
40920   unix_path="$HOTSPOT_MT"
40921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40922     windows_path=`$CYGPATH -m "$unix_path"`
40923     HOTSPOT_MT="$windows_path"
40924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40925     windows_path=`cmd //c echo $unix_path`
40926     HOTSPOT_MT="$windows_path"
40927   fi
40928 
40929 
40930   unix_path="$HOTSPOT_RC"
40931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40932     windows_path=`$CYGPATH -m "$unix_path"`
40933     HOTSPOT_RC="$windows_path"
40934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40935     windows_path=`cmd //c echo $unix_path`
40936     HOTSPOT_RC="$windows_path"
40937   fi
40938 
40939 
40940 
40941   else
40942     HOTSPOT_CXX="$CXX"
40943     HOTSPOT_LD="$LD"
40944   fi
40945 
40946 
40947 
40948   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40949     USE_CLANG=true
40950   fi
40951 
40952 
40953   # LDEXE is the linker to use, when creating executables. Not really used.
40954   # FIXME: These should just be removed!
40955   LDEXE="$LD"
40956   LDEXECXX="$LDCXX"
40957 
40958 
40959 
40960 
40961 
40962 
40963   # The package path is used only on macosx?
40964   # FIXME: clean this up, and/or move it elsewhere.
40965   PACKAGE_PATH=/opt/local
40966 
40967 
40968   # Check for extra potential brokenness.
40969   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40970     # On Windows, double-check that we got the right compiler.
40971     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40972     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40973     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40974       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40975         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40976       fi
40977     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40978       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40979         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40980       fi
40981     fi
40982   fi
40983 
40984   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40985     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40986     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40987     # This is later checked when setting flags.
40988 
40989     # "-Og" suppported for GCC 4.8 and later
40990     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40991 
40992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40993 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40994   supports=yes
40995 
40996   saved_cflags="$CFLAGS"
40997   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40998   ac_ext=c
40999 ac_cpp='$CPP $CPPFLAGS'
41000 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41001 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41003 
41004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41005 /* end confdefs.h.  */
41006 int i;
41007 _ACEOF
41008 if ac_fn_c_try_compile "$LINENO"; then :
41009 
41010 else
41011   supports=no
41012 fi
41013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41014   ac_ext=cpp
41015 ac_cpp='$CXXCPP $CPPFLAGS'
41016 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41017 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41018 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41019 
41020   CFLAGS="$saved_cflags"
41021 
41022   saved_cxxflags="$CXXFLAGS"
41023   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41024   ac_ext=cpp
41025 ac_cpp='$CXXCPP $CPPFLAGS'
41026 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41027 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41028 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41029 
41030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41031 /* end confdefs.h.  */
41032 int i;
41033 _ACEOF
41034 if ac_fn_cxx_try_compile "$LINENO"; then :
41035 
41036 else
41037   supports=no
41038 fi
41039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41040   ac_ext=cpp
41041 ac_cpp='$CXXCPP $CPPFLAGS'
41042 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41043 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41044 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41045 
41046   CXXFLAGS="$saved_cxxflags"
41047 
41048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41049 $as_echo "$supports" >&6; }
41050   if test "x$supports" = "xyes" ; then
41051     HAS_CFLAG_OPTIMIZE_DEBUG=true
41052   else
41053     HAS_CFLAG_OPTIMIZE_DEBUG=false
41054   fi
41055 
41056 
41057     # "-z relro" supported in GNU binutils 2.17 and later
41058     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41059 
41060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41061 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41062   supports=yes
41063 
41064   saved_ldflags="$LDFLAGS"
41065   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41066   ac_ext=c
41067 ac_cpp='$CPP $CPPFLAGS'
41068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41070 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41071 
41072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41073 /* end confdefs.h.  */
41074 
41075 int
41076 main ()
41077 {
41078 
41079   ;
41080   return 0;
41081 }
41082 _ACEOF
41083 if ac_fn_c_try_link "$LINENO"; then :
41084 
41085 else
41086   supports=no
41087 fi
41088 rm -f core conftest.err conftest.$ac_objext \
41089     conftest$ac_exeext conftest.$ac_ext
41090   ac_ext=cpp
41091 ac_cpp='$CXXCPP $CPPFLAGS'
41092 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41093 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41094 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41095 
41096   LDFLAGS="$saved_ldflags"
41097 
41098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41099 $as_echo "$supports" >&6; }
41100   if test "x$supports" = "xyes" ; then
41101     HAS_LINKER_RELRO=true
41102   else
41103     HAS_LINKER_RELRO=false
41104   fi
41105 
41106 
41107     # "-z now" supported in GNU binutils 2.11 and later
41108     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41109 
41110   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41111 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41112   supports=yes
41113 
41114   saved_ldflags="$LDFLAGS"
41115   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41116   ac_ext=c
41117 ac_cpp='$CPP $CPPFLAGS'
41118 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41119 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41120 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41121 
41122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41123 /* end confdefs.h.  */
41124 
41125 int
41126 main ()
41127 {
41128 
41129   ;
41130   return 0;
41131 }
41132 _ACEOF
41133 if ac_fn_c_try_link "$LINENO"; then :
41134 
41135 else
41136   supports=no
41137 fi
41138 rm -f core conftest.err conftest.$ac_objext \
41139     conftest$ac_exeext conftest.$ac_ext
41140   ac_ext=cpp
41141 ac_cpp='$CXXCPP $CPPFLAGS'
41142 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41143 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41144 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41145 
41146   LDFLAGS="$saved_ldflags"
41147 
41148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41149 $as_echo "$supports" >&6; }
41150   if test "x$supports" = "xyes" ; then
41151     HAS_LINKER_NOW=true
41152   else
41153     HAS_LINKER_NOW=false
41154   fi
41155 
41156   fi
41157 
41158   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41159   # in executable.'
41160   USING_BROKEN_SUSE_LD=no
41161   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41163 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41164     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41165     $ECHO "int main() { }" > main.c
41166     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41167       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41168 $as_echo "no" >&6; }
41169       USING_BROKEN_SUSE_LD=no
41170     else
41171       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41172 $as_echo "yes" >&6; }
41173       USING_BROKEN_SUSE_LD=yes
41174     fi
41175     rm -rf version-script.map main.c a.out
41176   fi
41177 
41178 
41179 
41180 # Setup the JTReg Regression Test Harness.
41181 
41182 
41183 # Check whether --with-jtreg was given.
41184 if test "${with_jtreg+set}" = set; then :
41185   withval=$with_jtreg;
41186 else
41187   with_jtreg=no
41188 fi
41189 
41190 
41191   if test "x$with_jtreg" = xno; then
41192     # jtreg disabled
41193     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41194 $as_echo_n "checking for jtreg... " >&6; }
41195     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41196 $as_echo "no" >&6; }
41197   else
41198     if test "x$with_jtreg" != xyes; then
41199       # with path specified.
41200       JT_HOME="$with_jtreg"
41201     fi
41202 
41203     if test "x$JT_HOME" != x; then
41204       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41205 $as_echo_n "checking for jtreg... " >&6; }
41206 
41207       # use JT_HOME enviroment var.
41208 
41209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41210 
41211   # Input might be given as Windows format, start by converting to
41212   # unix format.
41213   path="$JT_HOME"
41214   new_path=`$CYGPATH -u "$path"`
41215 
41216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41219   # "foo.exe" is OK but "foo" is an error.
41220   #
41221   # This test is therefore slightly more accurate than "test -f" to check for file precense.
41222   # It is also a way to make sure we got the proper file name for the real test later on.
41223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41224   if test "x$test_shortpath" = x; then
41225     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41226 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41227     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41228   fi
41229 
41230   # Call helper function which possibly converts this using DOS-style short mode.
41231   # If so, the updated path is stored in $new_path.
41232 
41233   input_path="$new_path"
41234   # Check if we need to convert this using DOS-style short mode. If the path
41235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41236   # take no chances and rewrite it.
41237   # Note: m4 eats our [], so we need to use [ and ] instead.
41238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41239   if test "x$has_forbidden_chars" != x; then
41240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41241     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41242     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41243     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41244       # Going to short mode and back again did indeed matter. Since short mode is
41245       # case insensitive, let's make it lowercase to improve readability.
41246       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41247       # Now convert it back to Unix-stile (cygpath)
41248       input_path=`$CYGPATH -u "$shortmode_path"`
41249       new_path="$input_path"
41250     fi
41251   fi
41252 
41253   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41254   if test "x$test_cygdrive_prefix" = x; then
41255     # As a simple fix, exclude /usr/bin since it's not a real path.
41256     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41257       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41258       # a path prefixed by /cygdrive for fixpath to work.
41259       new_path="$CYGWIN_ROOT_PATH$input_path"
41260     fi
41261   fi
41262 
41263 
41264   if test "x$path" != "x$new_path"; then
41265     JT_HOME="$new_path"
41266     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41267 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41268   fi
41269 
41270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41271 
41272   path="$JT_HOME"
41273   has_colon=`$ECHO $path | $GREP ^.:`
41274   new_path="$path"
41275   if test "x$has_colon" = x; then
41276     # Not in mixed or Windows style, start by that.
41277     new_path=`cmd //c echo $path`
41278   fi
41279 
41280 
41281   input_path="$new_path"
41282   # Check if we need to convert this using DOS-style short mode. If the path
41283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41284   # take no chances and rewrite it.
41285   # Note: m4 eats our [], so we need to use [ and ] instead.
41286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41287   if test "x$has_forbidden_chars" != x; then
41288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41290   fi
41291 
41292 
41293   windows_path="$new_path"
41294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41295     unix_path=`$CYGPATH -u "$windows_path"`
41296     new_path="$unix_path"
41297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41299     new_path="$unix_path"
41300   fi
41301 
41302   if test "x$path" != "x$new_path"; then
41303     JT_HOME="$new_path"
41304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41305 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41306   fi
41307 
41308   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41309   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41310 
41311   else
41312     # We're on a unix platform. Hooray! :)
41313     path="$JT_HOME"
41314     has_space=`$ECHO "$path" | $GREP " "`
41315     if test "x$has_space" != x; then
41316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41317 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41318       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41319     fi
41320 
41321     # Use eval to expand a potential ~
41322     eval path="$path"
41323     if test ! -f "$path" && test ! -d "$path"; then
41324       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41325     fi
41326 
41327     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41328   fi
41329 
41330 
41331       # jtreg win32 script works for everybody
41332       JTREGEXE="$JT_HOME/win32/bin/jtreg"
41333 
41334       if test ! -f "$JTREGEXE"; then
41335         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41336       fi
41337 
41338       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41339 $as_echo "$JTREGEXE" >&6; }
41340     else
41341       # try to find jtreg on path
41342 
41343 
41344 
41345   # Publish this variable in the help.
41346 
41347 
41348   if test "x$JTREGEXE" = x; then
41349     # The variable is not set by user, try to locate tool using the code snippet
41350     for ac_prog in jtreg
41351 do
41352   # Extract the first word of "$ac_prog", so it can be a program name with args.
41353 set dummy $ac_prog; ac_word=$2
41354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41355 $as_echo_n "checking for $ac_word... " >&6; }
41356 if ${ac_cv_path_JTREGEXE+:} false; then :
41357   $as_echo_n "(cached) " >&6
41358 else
41359   case $JTREGEXE in
41360   [\\/]* | ?:[\\/]*)
41361   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41362   ;;
41363   *)
41364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41365 for as_dir in $PATH
41366 do
41367   IFS=$as_save_IFS
41368   test -z "$as_dir" && as_dir=.
41369     for ac_exec_ext in '' $ac_executable_extensions; do
41370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41371     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41373     break 2
41374   fi
41375 done
41376   done
41377 IFS=$as_save_IFS
41378 
41379   ;;
41380 esac
41381 fi
41382 JTREGEXE=$ac_cv_path_JTREGEXE
41383 if test -n "$JTREGEXE"; then
41384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41385 $as_echo "$JTREGEXE" >&6; }
41386 else
41387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41388 $as_echo "no" >&6; }
41389 fi
41390 
41391 
41392   test -n "$JTREGEXE" && break
41393 done
41394 
41395   else
41396     # The variable is set, but is it from the command line or the environment?
41397 
41398     # Try to remove the string !JTREGEXE! from our list.
41399     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41400     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41401       # If it failed, the variable was not from the command line. Ignore it,
41402       # but warn the user (except for BASH, which is always set by the calling BASH).
41403       if test "xJTREGEXE" != xBASH; then
41404         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41405 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41406       fi
41407       # Try to locate tool using the code snippet
41408       for ac_prog in jtreg
41409 do
41410   # Extract the first word of "$ac_prog", so it can be a program name with args.
41411 set dummy $ac_prog; ac_word=$2
41412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41413 $as_echo_n "checking for $ac_word... " >&6; }
41414 if ${ac_cv_path_JTREGEXE+:} false; then :
41415   $as_echo_n "(cached) " >&6
41416 else
41417   case $JTREGEXE in
41418   [\\/]* | ?:[\\/]*)
41419   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41420   ;;
41421   *)
41422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41423 for as_dir in $PATH
41424 do
41425   IFS=$as_save_IFS
41426   test -z "$as_dir" && as_dir=.
41427     for ac_exec_ext in '' $ac_executable_extensions; do
41428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41429     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41431     break 2
41432   fi
41433 done
41434   done
41435 IFS=$as_save_IFS
41436 
41437   ;;
41438 esac
41439 fi
41440 JTREGEXE=$ac_cv_path_JTREGEXE
41441 if test -n "$JTREGEXE"; then
41442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41443 $as_echo "$JTREGEXE" >&6; }
41444 else
41445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41446 $as_echo "no" >&6; }
41447 fi
41448 
41449 
41450   test -n "$JTREGEXE" && break
41451 done
41452 
41453     else
41454       # If it succeeded, then it was overridden by the user. We will use it
41455       # for the tool.
41456 
41457       # First remove it from the list of overridden variables, so we can test
41458       # for unknown variables in the end.
41459       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41460 
41461       # Check if the provided tool contains a complete path.
41462       tool_specified="$JTREGEXE"
41463       tool_basename="${tool_specified##*/}"
41464       if test "x$tool_basename" = "x$tool_specified"; then
41465         # A command without a complete path is provided, search $PATH.
41466         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41467 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41468         # Extract the first word of "$tool_basename", so it can be a program name with args.
41469 set dummy $tool_basename; ac_word=$2
41470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41471 $as_echo_n "checking for $ac_word... " >&6; }
41472 if ${ac_cv_path_JTREGEXE+:} false; then :
41473   $as_echo_n "(cached) " >&6
41474 else
41475   case $JTREGEXE in
41476   [\\/]* | ?:[\\/]*)
41477   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41478   ;;
41479   *)
41480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41481 for as_dir in $PATH
41482 do
41483   IFS=$as_save_IFS
41484   test -z "$as_dir" && as_dir=.
41485     for ac_exec_ext in '' $ac_executable_extensions; do
41486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41487     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41489     break 2
41490   fi
41491 done
41492   done
41493 IFS=$as_save_IFS
41494 
41495   ;;
41496 esac
41497 fi
41498 JTREGEXE=$ac_cv_path_JTREGEXE
41499 if test -n "$JTREGEXE"; then
41500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41501 $as_echo "$JTREGEXE" >&6; }
41502 else
41503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41504 $as_echo "no" >&6; }
41505 fi
41506 
41507 
41508         if test "x$JTREGEXE" = x; then
41509           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41510         fi
41511       else
41512         # Otherwise we believe it is a complete path. Use it as it is.
41513         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41514 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41516 $as_echo_n "checking for JTREGEXE... " >&6; }
41517         if test ! -x "$tool_specified"; then
41518           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41519 $as_echo "not found" >&6; }
41520           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41521         fi
41522         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41523 $as_echo "$tool_specified" >&6; }
41524       fi
41525     fi
41526   fi
41527 
41528 
41529 
41530   if test "x$JTREGEXE" = x; then
41531     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41532   fi
41533 
41534 
41535       JT_HOME="`$DIRNAME $JTREGEXE`"
41536     fi
41537   fi
41538 
41539 
41540 
41541 
41542 
41543 
41544   # Option used to tell the compiler whether to create 32- or 64-bit executables
41545   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41546     COMPILER_TARGET_BITS_FLAG="-q"
41547   else
41548     COMPILER_TARGET_BITS_FLAG="-m"
41549   fi
41550 
41551 
41552   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41553   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41554     ARFLAGS="-r"
41555   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41556     ARFLAGS="-X64"
41557   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41558     # lib.exe is used as AR to create static libraries.
41559     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41560   else
41561     ARFLAGS=""
41562   fi
41563 
41564 
41565   ## Setup strip.
41566   # FIXME: should this really be per platform, or should it be per toolchain type?
41567   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41568   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41569   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41570     STRIPFLAGS="-g"
41571   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41572     STRIPFLAGS="-x"
41573   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41574     STRIPFLAGS="-S"
41575   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41576     STRIPFLAGS="-X32_64"
41577   fi
41578 
41579   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41580     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41581   fi
41582 
41583 
41584   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41585     # FIXME: break out into MCSFLAGS
41586     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41587   fi
41588 
41589 
41590   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41591     CC_OUT_OPTION=-Fo
41592     EXE_OUT_OPTION=-out:
41593     LD_OUT_OPTION=-out:
41594     AR_OUT_OPTION=-out:
41595   else
41596     # The option used to specify the target .o,.a or .so file.
41597     # When compiling, how to specify the to be created object file.
41598     CC_OUT_OPTION='-o$(SPACE)'
41599     # When linking, how to specify the to be created executable.
41600     EXE_OUT_OPTION='-o$(SPACE)'
41601     # When linking, how to specify the to be created dynamically linkable library.
41602     LD_OUT_OPTION='-o$(SPACE)'
41603     # When archiving, how to specify the to be create static archive for object files.
41604     AR_OUT_OPTION='rcs$(SPACE)'
41605   fi
41606 
41607 
41608 
41609 
41610 
41611   # On Windows, we need to set RC flags.
41612   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41613     RC_FLAGS="-nologo -l0x409"
41614     if test "x$VARIANT" = xOPT; then
41615       RC_FLAGS="$RC_FLAGS -DNDEBUG"
41616     fi
41617 
41618     # The version variables used to create RC_FLAGS may be overridden
41619     # in a custom configure script, or possibly the command line.
41620     # Let those variables be expanded at make time in spec.gmk.
41621     # The \$ are escaped to the shell, and the $(...) variables
41622     # are evaluated by make.
41623     RC_FLAGS="$RC_FLAGS \
41624         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41625         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41626         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41627         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41628         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41629         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41630         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41631   fi
41632 
41633 
41634   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41635     # silence copyright notice and other headers.
41636     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41637   fi
41638 
41639   if test "x$SYSROOT" != "x"; then
41640     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41641       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41642         # Solaris Studio does not have a concept of sysroot. Instead we must
41643         # make sure the default include and lib dirs are appended to each
41644         # compile and link command line.
41645         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41646         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41647             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41648             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41649       fi
41650     elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41651       # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41652       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41653       SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41654     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41655       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41656       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41657     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41658       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41659       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41660     fi
41661     # Propagate the sysroot args to hotspot
41662     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41663     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41664     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41665   fi
41666 
41667   # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41668   # set this here so it doesn't have to be peppered throughout the forest
41669   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41670     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41671     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41672   fi
41673 
41674 
41675 
41676 
41677 
41678 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41679 
41680 # Now we can test some aspects on the target using configure macros.
41681 
41682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41683 $as_echo_n "checking for ANSI C header files... " >&6; }
41684 if ${ac_cv_header_stdc+:} false; then :
41685   $as_echo_n "(cached) " >&6
41686 else
41687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41688 /* end confdefs.h.  */
41689 #include <stdlib.h>
41690 #include <stdarg.h>
41691 #include <string.h>
41692 #include <float.h>
41693 
41694 int
41695 main ()
41696 {
41697 
41698   ;
41699   return 0;
41700 }
41701 _ACEOF
41702 if ac_fn_cxx_try_compile "$LINENO"; then :
41703   ac_cv_header_stdc=yes
41704 else
41705   ac_cv_header_stdc=no
41706 fi
41707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41708 
41709 if test $ac_cv_header_stdc = yes; then
41710   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41712 /* end confdefs.h.  */
41713 #include <string.h>
41714 
41715 _ACEOF
41716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41717   $EGREP "memchr" >/dev/null 2>&1; then :
41718 
41719 else
41720   ac_cv_header_stdc=no
41721 fi
41722 rm -f conftest*
41723 
41724 fi
41725 
41726 if test $ac_cv_header_stdc = yes; then
41727   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41729 /* end confdefs.h.  */
41730 #include <stdlib.h>
41731 
41732 _ACEOF
41733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41734   $EGREP "free" >/dev/null 2>&1; then :
41735 
41736 else
41737   ac_cv_header_stdc=no
41738 fi
41739 rm -f conftest*
41740 
41741 fi
41742 
41743 if test $ac_cv_header_stdc = yes; then
41744   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41745   if test "$cross_compiling" = yes; then :
41746   :
41747 else
41748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41749 /* end confdefs.h.  */
41750 #include <ctype.h>
41751 #include <stdlib.h>
41752 #if ((' ' & 0x0FF) == 0x020)
41753 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41754 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41755 #else
41756 # define ISLOWER(c) \
41757                    (('a' <= (c) && (c) <= 'i') \
41758                      || ('j' <= (c) && (c) <= 'r') \
41759                      || ('s' <= (c) && (c) <= 'z'))
41760 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41761 #endif
41762 
41763 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41764 int
41765 main ()
41766 {
41767   int i;
41768   for (i = 0; i < 256; i++)
41769     if (XOR (islower (i), ISLOWER (i))
41770         || toupper (i) != TOUPPER (i))
41771       return 2;
41772   return 0;
41773 }
41774 _ACEOF
41775 if ac_fn_cxx_try_run "$LINENO"; then :
41776 
41777 else
41778   ac_cv_header_stdc=no
41779 fi
41780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41781   conftest.$ac_objext conftest.beam conftest.$ac_ext
41782 fi
41783 
41784 fi
41785 fi
41786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41787 $as_echo "$ac_cv_header_stdc" >&6; }
41788 if test $ac_cv_header_stdc = yes; then
41789 
41790 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41791 
41792 fi
41793 
41794 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41795 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41796                   inttypes.h stdint.h unistd.h
41797 do :
41798   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41799 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41800 "
41801 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41802   cat >>confdefs.h <<_ACEOF
41803 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41804 _ACEOF
41805 
41806 fi
41807 
41808 done
41809 
41810 
41811 
41812   ###############################################################################
41813   #
41814   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41815   # (The JVM can use 32 or 64 bit Java pointers but that decision
41816   # is made at runtime.)
41817   #
41818 
41819   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41820     # Always specify -m flag on Solaris
41821     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41822 
41823   # When we add flags to the "official" CFLAGS etc, we need to
41824   # keep track of these additions in ADDED_CFLAGS etc. These
41825   # will later be checked to make sure only controlled additions
41826   # have been made to CFLAGS etc.
41827   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41828   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41829   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41830 
41831   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41832   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41833   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41834 
41835   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41836   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41837   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41838 
41839   elif test "x$COMPILE_TYPE" = xreduced; then
41840     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41841       # Specify -m if running reduced on unix platforms
41842 
41843   # When we add flags to the "official" CFLAGS etc, we need to
41844   # keep track of these additions in ADDED_CFLAGS etc. These
41845   # will later be checked to make sure only controlled additions
41846   # have been made to CFLAGS etc.
41847   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41848   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41849   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41850 
41851   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41852   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41853   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41854 
41855   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41856   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41857   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41858 
41859     fi
41860   fi
41861 
41862   # Make compilation sanity check
41863   for ac_header in stdio.h
41864 do :
41865   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41866 if test "x$ac_cv_header_stdio_h" = xyes; then :
41867   cat >>confdefs.h <<_ACEOF
41868 #define HAVE_STDIO_H 1
41869 _ACEOF
41870 
41871 else
41872 
41873     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41874 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41875     if test "x$COMPILE_TYPE" = xreduced; then
41876       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41877 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41878     elif test "x$COMPILE_TYPE" = xcross; then
41879       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41880 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41881     fi
41882     as_fn_error $? "Cannot continue." "$LINENO" 5
41883 
41884 fi
41885 
41886 done
41887 
41888 
41889   # The cast to long int works around a bug in the HP C Compiler
41890 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41891 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41892 # This bug is HP SR number 8606223364.
41893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41894 $as_echo_n "checking size of int *... " >&6; }
41895 if ${ac_cv_sizeof_int_p+:} false; then :
41896   $as_echo_n "(cached) " >&6
41897 else
41898   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41899 
41900 else
41901   if test "$ac_cv_type_int_p" = yes; then
41902      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41903 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41904 as_fn_error 77 "cannot compute sizeof (int *)
41905 See \`config.log' for more details" "$LINENO" 5; }
41906    else
41907      ac_cv_sizeof_int_p=0
41908    fi
41909 fi
41910 
41911 fi
41912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41913 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41914 
41915 
41916 
41917 cat >>confdefs.h <<_ACEOF
41918 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41919 _ACEOF
41920 
41921 
41922 
41923   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41924   if test "x$ac_cv_sizeof_int_p" = x; then
41925     # The test failed, lets stick to the assumed value.
41926     { $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
41927 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41928   else
41929     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41930 
41931     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41932       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41933       # Let's try to implicitely set the compilers target architecture and retry the test
41934       { $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
41935 $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;}
41936       { $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
41937 $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;}
41938 
41939   # When we add flags to the "official" CFLAGS etc, we need to
41940   # keep track of these additions in ADDED_CFLAGS etc. These
41941   # will later be checked to make sure only controlled additions
41942   # have been made to CFLAGS etc.
41943   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41944   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41945   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41946 
41947   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41948   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41949   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41950 
41951   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41952   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41953   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41954 
41955 
41956       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41957       unset ac_cv_sizeof_int_p
41958       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41959       cat >>confdefs.h <<_ACEOF
41960 #undef SIZEOF_INT_P
41961 _ACEOF
41962 
41963       # The cast to long int works around a bug in the HP C Compiler
41964 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41965 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41966 # This bug is HP SR number 8606223364.
41967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41968 $as_echo_n "checking size of int *... " >&6; }
41969 if ${ac_cv_sizeof_int_p+:} false; then :
41970   $as_echo_n "(cached) " >&6
41971 else
41972   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41973 
41974 else
41975   if test "$ac_cv_type_int_p" = yes; then
41976      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41977 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41978 as_fn_error 77 "cannot compute sizeof (int *)
41979 See \`config.log' for more details" "$LINENO" 5; }
41980    else
41981      ac_cv_sizeof_int_p=0
41982    fi
41983 fi
41984 
41985 fi
41986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41987 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41988 
41989 
41990 
41991 cat >>confdefs.h <<_ACEOF
41992 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41993 _ACEOF
41994 
41995 
41996 
41997       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41998 
41999       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42000         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
42001       fi
42002     fi
42003   fi
42004 
42005   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42006 $as_echo_n "checking for target address size... " >&6; }
42007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42008 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42009 
42010 
42011   ###############################################################################
42012   #
42013   # Is the target little of big endian?
42014   #
42015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42016 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42017 if ${ac_cv_c_bigendian+:} false; then :
42018   $as_echo_n "(cached) " >&6
42019 else
42020   ac_cv_c_bigendian=unknown
42021     # See if we're dealing with a universal compiler.
42022     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42023 /* end confdefs.h.  */
42024 #ifndef __APPLE_CC__
42025                not a universal capable compiler
42026              #endif
42027              typedef int dummy;
42028 
42029 _ACEOF
42030 if ac_fn_cxx_try_compile "$LINENO"; then :
42031 
42032         # Check for potential -arch flags.  It is not universal unless
42033         # there are at least two -arch flags with different values.
42034         ac_arch=
42035         ac_prev=
42036         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42037          if test -n "$ac_prev"; then
42038            case $ac_word in
42039              i?86 | x86_64 | ppc | ppc64)
42040                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42041                  ac_arch=$ac_word
42042                else
42043                  ac_cv_c_bigendian=universal
42044                  break
42045                fi
42046                ;;
42047            esac
42048            ac_prev=
42049          elif test "x$ac_word" = "x-arch"; then
42050            ac_prev=arch
42051          fi
42052        done
42053 fi
42054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42055     if test $ac_cv_c_bigendian = unknown; then
42056       # See if sys/param.h defines the BYTE_ORDER macro.
42057       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42058 /* end confdefs.h.  */
42059 #include <sys/types.h>
42060              #include <sys/param.h>
42061 
42062 int
42063 main ()
42064 {
42065 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42066                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42067                      && LITTLE_ENDIAN)
42068               bogus endian macros
42069              #endif
42070 
42071   ;
42072   return 0;
42073 }
42074 _ACEOF
42075 if ac_fn_cxx_try_compile "$LINENO"; then :
42076   # It does; now see whether it defined to BIG_ENDIAN or not.
42077          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42078 /* end confdefs.h.  */
42079 #include <sys/types.h>
42080                 #include <sys/param.h>
42081 
42082 int
42083 main ()
42084 {
42085 #if BYTE_ORDER != BIG_ENDIAN
42086                  not big endian
42087                 #endif
42088 
42089   ;
42090   return 0;
42091 }
42092 _ACEOF
42093 if ac_fn_cxx_try_compile "$LINENO"; then :
42094   ac_cv_c_bigendian=yes
42095 else
42096   ac_cv_c_bigendian=no
42097 fi
42098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42099 fi
42100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42101     fi
42102     if test $ac_cv_c_bigendian = unknown; then
42103       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42104       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42105 /* end confdefs.h.  */
42106 #include <limits.h>
42107 
42108 int
42109 main ()
42110 {
42111 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42112               bogus endian macros
42113              #endif
42114 
42115   ;
42116   return 0;
42117 }
42118 _ACEOF
42119 if ac_fn_cxx_try_compile "$LINENO"; then :
42120   # It does; now see whether it defined to _BIG_ENDIAN or not.
42121          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42122 /* end confdefs.h.  */
42123 #include <limits.h>
42124 
42125 int
42126 main ()
42127 {
42128 #ifndef _BIG_ENDIAN
42129                  not big endian
42130                 #endif
42131 
42132   ;
42133   return 0;
42134 }
42135 _ACEOF
42136 if ac_fn_cxx_try_compile "$LINENO"; then :
42137   ac_cv_c_bigendian=yes
42138 else
42139   ac_cv_c_bigendian=no
42140 fi
42141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42142 fi
42143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42144     fi
42145     if test $ac_cv_c_bigendian = unknown; then
42146       # Compile a test program.
42147       if test "$cross_compiling" = yes; then :
42148   # Try to guess by grepping values from an object file.
42149          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42150 /* end confdefs.h.  */
42151 short int ascii_mm[] =
42152                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42153                 short int ascii_ii[] =
42154                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42155                 int use_ascii (int i) {
42156                   return ascii_mm[i] + ascii_ii[i];
42157                 }
42158                 short int ebcdic_ii[] =
42159                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42160                 short int ebcdic_mm[] =
42161                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42162                 int use_ebcdic (int i) {
42163                   return ebcdic_mm[i] + ebcdic_ii[i];
42164                 }
42165                 extern int foo;
42166 
42167 int
42168 main ()
42169 {
42170 return use_ascii (foo) == use_ebcdic (foo);
42171   ;
42172   return 0;
42173 }
42174 _ACEOF
42175 if ac_fn_cxx_try_compile "$LINENO"; then :
42176   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42177               ac_cv_c_bigendian=yes
42178             fi
42179             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42180               if test "$ac_cv_c_bigendian" = unknown; then
42181                 ac_cv_c_bigendian=no
42182               else
42183                 # finding both strings is unlikely to happen, but who knows?
42184                 ac_cv_c_bigendian=unknown
42185               fi
42186             fi
42187 fi
42188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42189 else
42190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42191 /* end confdefs.h.  */
42192 $ac_includes_default
42193 int
42194 main ()
42195 {
42196 
42197              /* Are we little or big endian?  From Harbison&Steele.  */
42198              union
42199              {
42200                long int l;
42201                char c[sizeof (long int)];
42202              } u;
42203              u.l = 1;
42204              return u.c[sizeof (long int) - 1] == 1;
42205 
42206   ;
42207   return 0;
42208 }
42209 _ACEOF
42210 if ac_fn_cxx_try_run "$LINENO"; then :
42211   ac_cv_c_bigendian=no
42212 else
42213   ac_cv_c_bigendian=yes
42214 fi
42215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42216   conftest.$ac_objext conftest.beam conftest.$ac_ext
42217 fi
42218 
42219     fi
42220 fi
42221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42222 $as_echo "$ac_cv_c_bigendian" >&6; }
42223  case $ac_cv_c_bigendian in #(
42224    yes)
42225      ENDIAN="big";; #(
42226    no)
42227      ENDIAN="little" ;; #(
42228    universal)
42229      ENDIAN="universal_endianness"
42230      ;; #(
42231    *)
42232      ENDIAN="unknown" ;;
42233  esac
42234 
42235 
42236   if test "x$ENDIAN" = xuniversal_endianness; then
42237     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42238   fi
42239   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42240     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
42241   fi
42242 
42243 
42244 # Configure flags for the tools
42245 
42246   ###############################################################################
42247   #
42248   # How to compile shared libraries.
42249   #
42250 
42251   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42252     PICFLAG="-fPIC"
42253     C_FLAG_REORDER=''
42254     CXX_FLAG_REORDER=''
42255 
42256     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42257       # Linking is different on MacOSX
42258       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42259       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42260       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42261       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42262       SET_SHARED_LIBRARY_MAPFILE=''
42263     else
42264       # Default works for linux, might work on other platforms as well.
42265       SHARED_LIBRARY_FLAGS='-shared'
42266       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42267       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42268       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42269       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42270     fi
42271   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42272     PICFLAG=''
42273     C_FLAG_REORDER=''
42274     CXX_FLAG_REORDER=''
42275 
42276     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42277       # Linking is different on MacOSX
42278       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42279       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42280       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42281       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42282       SET_SHARED_LIBRARY_MAPFILE=''
42283     else
42284       # Default works for linux, might work on other platforms as well.
42285       SHARED_LIBRARY_FLAGS='-shared'
42286       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42287       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42288       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42289       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42290     fi
42291   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42292     PICFLAG="-KPIC"
42293     C_FLAG_REORDER='-xF'
42294     CXX_FLAG_REORDER='-xF'
42295     SHARED_LIBRARY_FLAGS="-G"
42296     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42297     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42298     SET_SHARED_LIBRARY_NAME=''
42299     SET_SHARED_LIBRARY_MAPFILE='-M$1'
42300   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42301     PICFLAG="-qpic=large"
42302     C_FLAG_REORDER=''
42303     CXX_FLAG_REORDER=''
42304     SHARED_LIBRARY_FLAGS="-qmkshrobj"
42305     SET_EXECUTABLE_ORIGIN=""
42306     SET_SHARED_LIBRARY_ORIGIN=''
42307     SET_SHARED_LIBRARY_NAME=''
42308     SET_SHARED_LIBRARY_MAPFILE=''
42309   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42310     PICFLAG=""
42311     C_FLAG_REORDER=''
42312     CXX_FLAG_REORDER=''
42313     SHARED_LIBRARY_FLAGS="-LD"
42314     SET_EXECUTABLE_ORIGIN=''
42315     SET_SHARED_LIBRARY_ORIGIN=''
42316     SET_SHARED_LIBRARY_NAME=''
42317     SET_SHARED_LIBRARY_MAPFILE=''
42318   fi
42319 
42320 
42321 
42322 
42323 
42324 
42325 
42326 
42327 
42328   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42329     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42330     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42331     CFLAGS_JDKLIB_EXTRA='-xstrconst'
42332   fi
42333   # The (cross) compiler is now configured, we can now test capabilities
42334   # of the target platform.
42335 
42336 
42337 
42338   ###############################################################################
42339   #
42340   # Setup the opt flags for different compilers
42341   # and different operating systems.
42342   #
42343 
42344   # FIXME: this was indirectly the old default, but just inherited.
42345   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42346   #   C_FLAG_DEPS="-MMD -MF"
42347   # fi
42348 
42349   # Generate make dependency files
42350   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42351     C_FLAG_DEPS="-MMD -MF"
42352   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42353     C_FLAG_DEPS="-MMD -MF"
42354   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42355     C_FLAG_DEPS="-xMMD -xMF"
42356   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42357     C_FLAG_DEPS="-qmakedep=gcc -MF"
42358   fi
42359   CXX_FLAG_DEPS="$C_FLAG_DEPS"
42360 
42361 
42362 
42363   # Debug symbols
42364   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42365     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42366       # reduce from default "-g2" option to save space
42367       CFLAGS_DEBUG_SYMBOLS="-g1"
42368       CXXFLAGS_DEBUG_SYMBOLS="-g1"
42369     else
42370       CFLAGS_DEBUG_SYMBOLS="-g"
42371       CXXFLAGS_DEBUG_SYMBOLS="-g"
42372     fi
42373   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42374     CFLAGS_DEBUG_SYMBOLS="-g"
42375     CXXFLAGS_DEBUG_SYMBOLS="-g"
42376   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42377     CFLAGS_DEBUG_SYMBOLS="-g -xs"
42378     # FIXME: likely a bug, this disables debug symbols rather than enables them
42379     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42380   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42381     CFLAGS_DEBUG_SYMBOLS="-g"
42382     CXXFLAGS_DEBUG_SYMBOLS="-g"
42383   fi
42384 
42385 
42386 
42387   # bounds, memory and behavior checking options
42388   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42389     case $DEBUG_LEVEL in
42390     release )
42391       # no adjustment
42392       ;;
42393     fastdebug )
42394       # no adjustment
42395       ;;
42396     slowdebug )
42397       # Add runtime stack smashing and undefined behavior checks
42398       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42399       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42400       ;;
42401     esac
42402   fi
42403 
42404 
42405 
42406   # Optimization levels
42407   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42408     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42409 
42410     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42411       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42412       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42413       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42414       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42415       C_O_FLAG_DEBUG="-xregs=no%frameptr"
42416       C_O_FLAG_NONE="-xregs=no%frameptr"
42417       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42418       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42419       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42420       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42421       CXX_O_FLAG_NONE="-xregs=no%frameptr"
42422       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42423         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42424         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42425       fi
42426     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42427       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42428       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42429       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42430       C_O_FLAG_DEBUG=""
42431       C_O_FLAG_NONE=""
42432       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42433       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42434       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42435       C_O_FLAG_DEBUG=""
42436       CXX_O_FLAG_NONE=""
42437     fi
42438   else
42439     # The remaining toolchains share opt flags between CC and CXX;
42440     # setup for C and duplicate afterwards.
42441     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42442       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42443         # On MacOSX we optimize for size, something
42444         # we should do for all platforms?
42445         C_O_FLAG_HIGHEST="-Os"
42446         C_O_FLAG_HI="-Os"
42447         C_O_FLAG_NORM="-Os"
42448       else
42449         C_O_FLAG_HIGHEST="-O3"
42450         C_O_FLAG_HI="-O3"
42451         C_O_FLAG_NORM="-O2"
42452       fi
42453       C_O_FLAG_DEBUG="-O0"
42454       C_O_FLAG_NONE="-O0"
42455     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42456       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42457         # On MacOSX we optimize for size, something
42458         # we should do for all platforms?
42459         C_O_FLAG_HIGHEST="-Os"
42460         C_O_FLAG_HI="-Os"
42461         C_O_FLAG_NORM="-Os"
42462       else
42463         C_O_FLAG_HIGHEST="-O3"
42464         C_O_FLAG_HI="-O3"
42465         C_O_FLAG_NORM="-O2"
42466       fi
42467       C_O_FLAG_DEBUG="-O0"
42468       C_O_FLAG_NONE="-O0"
42469     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42470       C_O_FLAG_HIGHEST="-O3"
42471       C_O_FLAG_HI="-O3 -qstrict"
42472       C_O_FLAG_NORM="-O2"
42473       C_O_FLAG_DEBUG="-qnoopt"
42474       C_O_FLAG_NONE="-qnoop"
42475     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42476       C_O_FLAG_HIGHEST="-O2"
42477       C_O_FLAG_HI="-O1"
42478       C_O_FLAG_NORM="-O1"
42479       C_O_FLAG_DEBUG="-Od"
42480       C_O_FLAG_NONE="-Od"
42481     fi
42482     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42483     CXX_O_FLAG_HI="$C_O_FLAG_HI"
42484     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42485     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42486     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42487   fi
42488 
42489   # Adjust optimization flags according to debug level.
42490   case $DEBUG_LEVEL in
42491     release )
42492       # no adjustment
42493       ;;
42494     fastdebug )
42495       # Not quite so much optimization
42496       C_O_FLAG_HI="$C_O_FLAG_NORM"
42497       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42498       ;;
42499     slowdebug )
42500       # Disable optimization
42501       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42502       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42503       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42504       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42505       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42506       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42507       ;;
42508   esac
42509 
42510 
42511 
42512 
42513 
42514 
42515 
42516 
42517 
42518 
42519 
42520 
42521 
42522   # Special extras...
42523   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42524     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42525       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42526       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42527     fi
42528   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42529     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42530     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42531     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42532   fi
42533 
42534   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42535     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42536 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42537   fi
42538 
42539   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42540     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42541 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42542   fi
42543 
42544   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42545     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42546 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42547   fi
42548 
42549 
42550 # Check whether --with-extra-cflags was given.
42551 if test "${with_extra_cflags+set}" = set; then :
42552   withval=$with_extra_cflags;
42553 fi
42554 
42555 
42556 
42557 # Check whether --with-extra-cxxflags was given.
42558 if test "${with_extra_cxxflags+set}" = set; then :
42559   withval=$with_extra_cxxflags;
42560 fi
42561 
42562 
42563 
42564 # Check whether --with-extra-ldflags was given.
42565 if test "${with_extra_ldflags+set}" = set; then :
42566   withval=$with_extra_ldflags;
42567 fi
42568 
42569 
42570   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42571   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42572   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42573 
42574   # Hotspot needs these set in their legacy form
42575   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42576   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42577   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42578 
42579 
42580 
42581 
42582 
42583   ###############################################################################
42584   #
42585   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42586   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42587   #
42588 
42589   # Setup compiler/platform specific flags into
42590   #    CFLAGS_JDK    - C Compiler flags
42591   #    CXXFLAGS_JDK  - C++ Compiler flags
42592   #    COMMON_CCXXFLAGS_JDK - common to C and C++
42593   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42594     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42595         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42596     case $OPENJDK_TARGET_CPU_ARCH in
42597       arm )
42598         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42599         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42600         ;;
42601       ppc )
42602         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42603         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42604         ;;
42605       * )
42606         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42607         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42608         ;;
42609     esac
42610   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42611     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42612     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42613       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42614       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42615     fi
42616 
42617     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42618     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42619   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42620     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42621     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42622   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42623     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42624         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42625         -DWIN32_LEAN_AND_MEAN \
42626         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42627         -DWIN32 -DIAL"
42628     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42629       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42630     else
42631       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42632     fi
42633     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42634     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42635     # studio.
42636     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42637       COMMON_CXXFLAGS_JDK="$COMMON_CXXFLAGS_JDK \
42638           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42639     fi
42640   fi
42641 
42642   ###############################################################################
42643 
42644   # Adjust flags according to debug level.
42645   case $DEBUG_LEVEL in
42646     fastdebug | slowdebug )
42647       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42648       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42649       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42650       ;;
42651     release )
42652       ;;
42653     * )
42654       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42655       ;;
42656   esac
42657 
42658   # Setup LP64
42659   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42660 
42661   # Set some common defines. These works for all compilers, but assume
42662   # -D is universally accepted.
42663 
42664   # Setup endianness
42665   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42666     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42667     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42668     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42669     #   Note: -Dmacro         is the same as    #define macro 1
42670     #         -Dmacro=        is the same as    #define macro
42671     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42672       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42673     else
42674       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42675     fi
42676   else
42677     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42678     # are defined in the system?
42679     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42680       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42681     else
42682       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42683     fi
42684   fi
42685 
42686   # Setup target OS define. Use OS target name but in upper case.
42687   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42688   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42689 
42690   # Setup target CPU
42691   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42692 
42693   # Setup debug/release defines
42694   if test "x$DEBUG_LEVEL" = xrelease; then
42695     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42696     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42697       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42698     fi
42699   else
42700     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42701   fi
42702 
42703   # Setup release name
42704   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42705 
42706 
42707   # Set some additional per-OS defines.
42708   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42709     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42710   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42711     # FIXME: PPC64 should not be here.
42712     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42713   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42714     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42715   fi
42716 
42717   # Additional macosx handling
42718   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42719     # Setting these parameters makes it an error to link to macosx APIs that are
42720     # newer than the given OS version and makes the linked binaries compatible
42721     # even if built on a newer version of the OS.
42722     # The expected format is X.Y.Z
42723     MACOSX_VERSION_MIN=10.7.0
42724 
42725 
42726     # The macro takes the version with no dots, ex: 1070
42727     # Let the flags variables get resolved in make for easier override on make
42728     # command line.
42729     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42730     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42731   fi
42732 
42733   # Setup some hard coded includes
42734   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42735       -I${JDK_TOPDIR}/src/java.base/share/native/include \
42736       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42737       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42738 
42739   # The shared libraries are compiled using the picflag.
42740   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42741   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42742 
42743   # Executable flags
42744   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42745   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42746 
42747 
42748 
42749 
42750 
42751 
42752   # Setup LDFLAGS et al.
42753   #
42754 
42755   # Now this is odd. The JDK native libraries have to link against libjvm.so
42756   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42757   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42758   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42759   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42760   # libraries will link to whatever is in memory. Yuck.
42761   #
42762   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42763   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42764     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42765     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42766       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42767     fi
42768     # TODO: make -debug optional "--disable-full-debug-symbols"
42769     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42770   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42771     # If this is a --hash-style=gnu system, use --hash-style=both, why?
42772     # We have previously set HAS_GNU_HASH if this is the case
42773     if test -n "$HAS_GNU_HASH"; then
42774       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42775     fi
42776     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42777       # And since we now know that the linker is gnu, then add -z defs, to forbid
42778       # undefined symbols in object files.
42779       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42780       case $DEBUG_LEVEL in
42781         release )
42782           # tell linker to optimize libraries.
42783           # Should this be supplied to the OSS linker as well?
42784           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42785           ;;
42786         slowdebug )
42787           if test "x$HAS_LINKER_NOW" = "xtrue"; then
42788             # do relocations at load
42789             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42790             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42791           fi
42792           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42793             # mark relocations read only
42794             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42795             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42796           fi
42797           ;;
42798         fastdebug )
42799           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42800             # mark relocations read only
42801             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42802             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42803           fi
42804           ;;
42805         * )
42806           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42807           ;;
42808         esac
42809     fi
42810   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42811     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42812     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42813   fi
42814 
42815   # Customize LDFLAGS for executables
42816 
42817   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42818 
42819   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42820     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42821       LDFLAGS_STACK_SIZE=1048576
42822     else
42823       LDFLAGS_STACK_SIZE=327680
42824     fi
42825     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42826   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42827     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42828   fi
42829 
42830   # Customize LDFLAGS for libs
42831   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42832 
42833   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42834     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42835     LDFLAGS_JDKLIB_SUFFIX=""
42836   else
42837     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42838         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42839 
42840     # On some platforms (mac) the linker warns about non existing -L dirs.
42841     # Add server first if available. Linking aginst client does not always produce the same results.
42842     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42843     # Default to server for other variants.
42844     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42845       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42846     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42847       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42848     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42849       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42850     else
42851       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42852     fi
42853 
42854     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42855     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42856       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42857     fi
42858   fi
42859 
42860 
42861 
42862 
42863 
42864 
42865 
42866 
42867   # Some Zero and Shark settings.
42868   # ZERO_ARCHFLAG tells the compiler which mode to build for
42869   case "${OPENJDK_TARGET_CPU}" in
42870     s390)
42871       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42872       ;;
42873     *)
42874       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42875   esac
42876 
42877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42878 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42879   supports=yes
42880 
42881   saved_cflags="$CFLAGS"
42882   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42883   ac_ext=c
42884 ac_cpp='$CPP $CPPFLAGS'
42885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42888 
42889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42890 /* end confdefs.h.  */
42891 int i;
42892 _ACEOF
42893 if ac_fn_c_try_compile "$LINENO"; then :
42894 
42895 else
42896   supports=no
42897 fi
42898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42899   ac_ext=cpp
42900 ac_cpp='$CXXCPP $CPPFLAGS'
42901 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42902 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42903 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42904 
42905   CFLAGS="$saved_cflags"
42906 
42907   saved_cxxflags="$CXXFLAGS"
42908   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42909   ac_ext=cpp
42910 ac_cpp='$CXXCPP $CPPFLAGS'
42911 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42912 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42913 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42914 
42915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42916 /* end confdefs.h.  */
42917 int i;
42918 _ACEOF
42919 if ac_fn_cxx_try_compile "$LINENO"; then :
42920 
42921 else
42922   supports=no
42923 fi
42924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42925   ac_ext=cpp
42926 ac_cpp='$CXXCPP $CPPFLAGS'
42927 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42928 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42929 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42930 
42931   CXXFLAGS="$saved_cxxflags"
42932 
42933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42934 $as_echo "$supports" >&6; }
42935   if test "x$supports" = "xyes" ; then
42936     :
42937   else
42938     ZERO_ARCHFLAG=""
42939   fi
42940 
42941 
42942 
42943   # Check that the compiler supports -mX (or -qX on AIX) flags
42944   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42945 
42946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42947 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42948   supports=yes
42949 
42950   saved_cflags="$CFLAGS"
42951   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42952   ac_ext=c
42953 ac_cpp='$CPP $CPPFLAGS'
42954 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42955 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42956 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42957 
42958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42959 /* end confdefs.h.  */
42960 int i;
42961 _ACEOF
42962 if ac_fn_c_try_compile "$LINENO"; then :
42963 
42964 else
42965   supports=no
42966 fi
42967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42968   ac_ext=cpp
42969 ac_cpp='$CXXCPP $CPPFLAGS'
42970 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42971 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42972 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42973 
42974   CFLAGS="$saved_cflags"
42975 
42976   saved_cxxflags="$CXXFLAGS"
42977   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42978   ac_ext=cpp
42979 ac_cpp='$CXXCPP $CPPFLAGS'
42980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42983 
42984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42985 /* end confdefs.h.  */
42986 int i;
42987 _ACEOF
42988 if ac_fn_cxx_try_compile "$LINENO"; then :
42989 
42990 else
42991   supports=no
42992 fi
42993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42994   ac_ext=cpp
42995 ac_cpp='$CXXCPP $CPPFLAGS'
42996 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42997 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42998 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42999 
43000   CXXFLAGS="$saved_cxxflags"
43001 
43002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43003 $as_echo "$supports" >&6; }
43004   if test "x$supports" = "xyes" ; then
43005     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43006   else
43007     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43008   fi
43009 
43010 
43011 
43012   case "${TOOLCHAIN_TYPE}" in
43013     microsoft)
43014       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43015       ;;
43016     solstudio)
43017       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43018       ;;
43019     gcc)
43020       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43021       ;;
43022     clang)
43023       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43024       ;;
43025   esac
43026 
43027 
43028 
43029 # Setup debug symbols (need objcopy from the toolchain for that)
43030 
43031   #
43032   # ENABLE_DEBUG_SYMBOLS
43033   # This must be done after the toolchain is setup, since we're looking at objcopy.
43034   #
43035   # Check whether --enable-debug-symbols was given.
43036 if test "${enable_debug_symbols+set}" = set; then :
43037   enableval=$enable_debug_symbols;
43038 fi
43039 
43040 
43041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43042 $as_echo_n "checking if we should generate debug symbols... " >&6; }
43043 
43044   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43045     # explicit enabling of enable-debug-symbols and can't find objcopy
43046     #   this is an error
43047     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43048   fi
43049 
43050   if test "x$enable_debug_symbols" = "xyes"; then
43051     ENABLE_DEBUG_SYMBOLS=true
43052   elif test "x$enable_debug_symbols" = "xno"; then
43053     ENABLE_DEBUG_SYMBOLS=false
43054   else
43055     # Default is on if objcopy is found
43056     if test "x$OBJCOPY" != x; then
43057       ENABLE_DEBUG_SYMBOLS=true
43058     # MacOS X and Windows don't use objcopy but default is on for those OSes
43059     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43060       ENABLE_DEBUG_SYMBOLS=true
43061     else
43062       ENABLE_DEBUG_SYMBOLS=false
43063     fi
43064   fi
43065 
43066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43067 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43068 
43069   #
43070   # ZIP_DEBUGINFO_FILES
43071   #
43072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43073 $as_echo_n "checking if we should zip debug-info files... " >&6; }
43074   # Check whether --enable-zip-debug-info was given.
43075 if test "${enable_zip_debug_info+set}" = set; then :
43076   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43077 else
43078   enable_zip_debug_info="yes"
43079 fi
43080 
43081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43082 $as_echo "${enable_zip_debug_info}" >&6; }
43083 
43084   if test "x${enable_zip_debug_info}" = "xno"; then
43085     ZIP_DEBUGINFO_FILES=false
43086   else
43087     ZIP_DEBUGINFO_FILES=true
43088   fi
43089 
43090 
43091 
43092 
43093 
43094 ###############################################################################
43095 #
43096 # Check dependencies for external and internal libraries.
43097 #
43098 ###############################################################################
43099 
43100 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43101 
43102   # When using cygwin or msys, we need a wrapper binary that renames
43103   # /cygdrive/c/ arguments into c:/ arguments and peeks into
43104   # @files and rewrites these too! This wrapper binary is
43105   # called fixpath.
43106   FIXPATH=
43107   if test "x$OPENJDK_BUILD_OS" = xwindows; then
43108     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43109 $as_echo_n "checking if fixpath can be created... " >&6; }
43110     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43111     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43112     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43113       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43114       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43115       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43116       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43117     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43118       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43119       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43120 
43121       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43122       # @ was chosen as separator to minimize risk of other tools messing around with it
43123       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43124       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43125 
43126       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43127     fi
43128     rm -f $OUTPUT_ROOT/fixpath*
43129     cd $OUTPUT_ROOT
43130     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43131     cd $CURDIR
43132 
43133     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43134       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43135 $as_echo "no" >&6; }
43136       cat $OUTPUT_ROOT/fixpath1.log
43137       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43138     fi
43139     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43140 $as_echo "yes" >&6; }
43141     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43142 $as_echo_n "checking if fixpath.exe works... " >&6; }
43143     cd $OUTPUT_ROOT
43144     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43145     cd $CURDIR
43146     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43147       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43148 $as_echo "no" >&6; }
43149       cat $OUTPUT_ROOT/fixpath2.log
43150       as_fn_error $? "fixpath did not work!" "$LINENO" 5
43151     fi
43152     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43153 $as_echo "yes" >&6; }
43154     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43155   fi
43156 
43157 
43158 
43159 
43160 
43161 
43162   ###############################################################################
43163   #
43164   # OS specific settings that we never will need to probe.
43165   #
43166   if test "x$OPENJDK_TARGET_OS" = xlinux; then
43167     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43168 $as_echo_n "checking what is not needed on Linux?... " >&6; }
43169     PULSE_NOT_NEEDED=yes
43170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43171 $as_echo "pulse" >&6; }
43172   fi
43173 
43174   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43175     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43176 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
43177     ALSA_NOT_NEEDED=yes
43178     PULSE_NOT_NEEDED=yes
43179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43180 $as_echo "alsa pulse" >&6; }
43181   fi
43182 
43183   if test "x$OPENJDK_TARGET_OS" = xaix; then
43184     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43185 $as_echo_n "checking what is not needed on AIX?... " >&6; }
43186     ALSA_NOT_NEEDED=yes
43187     PULSE_NOT_NEEDED=yes
43188     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43189 $as_echo "alsa pulse" >&6; }
43190   fi
43191 
43192 
43193   if test "x$OPENJDK_TARGET_OS" = xwindows; then
43194     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43195 $as_echo_n "checking what is not needed on Windows?... " >&6; }
43196     CUPS_NOT_NEEDED=yes
43197     ALSA_NOT_NEEDED=yes
43198     PULSE_NOT_NEEDED=yes
43199     X11_NOT_NEEDED=yes
43200     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43201 $as_echo "alsa cups pulse x11" >&6; }
43202   fi
43203 
43204   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43205     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43206 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43207     ALSA_NOT_NEEDED=yes
43208     PULSE_NOT_NEEDED=yes
43209     X11_NOT_NEEDED=yes
43210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43211 $as_echo "alsa pulse x11" >&6; }
43212   fi
43213 
43214   if test "x$OPENJDK_TARGET_OS" = xbsd; then
43215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43216 $as_echo_n "checking what is not needed on bsd?... " >&6; }
43217     ALSA_NOT_NEEDED=yes
43218     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43219 $as_echo "alsa" >&6; }
43220   fi
43221 
43222   if test "x$OPENJDK" = "xfalse"; then
43223     FREETYPE_NOT_NEEDED=yes
43224   fi
43225 
43226   if test "x$SUPPORT_HEADFUL" = xno; then
43227     X11_NOT_NEEDED=yes
43228   fi
43229 
43230 
43231 
43232   ###############################################################################
43233   #
43234   # Check for X Windows
43235   #
43236 
43237   if test "x$X11_NOT_NEEDED" = xyes; then
43238     if test "x${with_x}" != x; then
43239       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43240 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43241     fi
43242     X_CFLAGS=
43243     X_LIBS=
43244   else
43245     # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43246     # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43247     # --x-libraries for the sysroot, if that seems to be correct.
43248     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43249       if test "x$SYSROOT" != "x"; then
43250         if test "x$x_includes" = xNONE; then
43251           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43252             x_includes="$SYSROOT/usr/X11R6/include"
43253           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43254             x_includes="$SYSROOT/usr/include"
43255           fi
43256         fi
43257         if test "x$x_libraries" = xNONE; then
43258           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43259             x_libraries="$SYSROOT/usr/X11R6/lib"
43260           elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43261             x_libraries="$SYSROOT/usr/lib64"
43262           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43263             x_libraries="$SYSROOT/usr/lib"
43264           fi
43265         fi
43266       fi
43267     fi
43268 
43269     # Now let autoconf do it's magic
43270     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43271 $as_echo_n "checking for X... " >&6; }
43272 
43273 
43274 # Check whether --with-x was given.
43275 if test "${with_x+set}" = set; then :
43276   withval=$with_x;
43277 fi
43278 
43279 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43280 if test "x$with_x" = xno; then
43281   # The user explicitly disabled X.
43282   have_x=disabled
43283 else
43284   case $x_includes,$x_libraries in #(
43285     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43286     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43287   $as_echo_n "(cached) " >&6
43288 else
43289   # One or both of the vars are not set, and there is no cached value.
43290 ac_x_includes=no ac_x_libraries=no
43291 rm -f -r conftest.dir
43292 if mkdir conftest.dir; then
43293   cd conftest.dir
43294   cat >Imakefile <<'_ACEOF'
43295 incroot:
43296         @echo incroot='${INCROOT}'
43297 usrlibdir:
43298         @echo usrlibdir='${USRLIBDIR}'
43299 libdir:
43300         @echo libdir='${LIBDIR}'
43301 _ACEOF
43302   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43303     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43304     for ac_var in incroot usrlibdir libdir; do
43305       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43306     done
43307     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43308     for ac_extension in a so sl dylib la dll; do
43309       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43310          test -f "$ac_im_libdir/libX11.$ac_extension"; then
43311         ac_im_usrlibdir=$ac_im_libdir; break
43312       fi
43313     done
43314     # Screen out bogus values from the imake configuration.  They are
43315     # bogus both because they are the default anyway, and because
43316     # using them would break gcc on systems where it needs fixed includes.
43317     case $ac_im_incroot in
43318         /usr/include) ac_x_includes= ;;
43319         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43320     esac
43321     case $ac_im_usrlibdir in
43322         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43323         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43324     esac
43325   fi
43326   cd ..
43327   rm -f -r conftest.dir
43328 fi
43329 
43330 # Standard set of common directories for X headers.
43331 # Check X11 before X11Rn because it is often a symlink to the current release.
43332 ac_x_header_dirs='
43333 /usr/X11/include
43334 /usr/X11R7/include
43335 /usr/X11R6/include
43336 /usr/X11R5/include
43337 /usr/X11R4/include
43338 
43339 /usr/include/X11
43340 /usr/include/X11R7
43341 /usr/include/X11R6
43342 /usr/include/X11R5
43343 /usr/include/X11R4
43344 
43345 /usr/local/X11/include
43346 /usr/local/X11R7/include
43347 /usr/local/X11R6/include
43348 /usr/local/X11R5/include
43349 /usr/local/X11R4/include
43350 
43351 /usr/local/include/X11
43352 /usr/local/include/X11R7
43353 /usr/local/include/X11R6
43354 /usr/local/include/X11R5
43355 /usr/local/include/X11R4
43356 
43357 /usr/X386/include
43358 /usr/x386/include
43359 /usr/XFree86/include/X11
43360 
43361 /usr/include
43362 /usr/local/include
43363 /usr/unsupported/include
43364 /usr/athena/include
43365 /usr/local/x11r5/include
43366 /usr/lpp/Xamples/include
43367 
43368 /usr/openwin/include
43369 /usr/openwin/share/include'
43370 
43371 if test "$ac_x_includes" = no; then
43372   # Guess where to find include files, by looking for Xlib.h.
43373   # First, try using that file with no special directory specified.
43374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43375 /* end confdefs.h.  */
43376 #include <X11/Xlib.h>
43377 _ACEOF
43378 if ac_fn_cxx_try_cpp "$LINENO"; then :
43379   # We can compile using X headers with no special include directory.
43380 ac_x_includes=
43381 else
43382   for ac_dir in $ac_x_header_dirs; do
43383   if test -r "$ac_dir/X11/Xlib.h"; then
43384     ac_x_includes=$ac_dir
43385     break
43386   fi
43387 done
43388 fi
43389 rm -f conftest.err conftest.i conftest.$ac_ext
43390 fi # $ac_x_includes = no
43391 
43392 if test "$ac_x_libraries" = no; then
43393   # Check for the libraries.
43394   # See if we find them without any special options.
43395   # Don't add to $LIBS permanently.
43396   ac_save_LIBS=$LIBS
43397   LIBS="-lX11 $LIBS"
43398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43399 /* end confdefs.h.  */
43400 #include <X11/Xlib.h>
43401 int
43402 main ()
43403 {
43404 XrmInitialize ()
43405   ;
43406   return 0;
43407 }
43408 _ACEOF
43409 if ac_fn_cxx_try_link "$LINENO"; then :
43410   LIBS=$ac_save_LIBS
43411 # We can link X programs with no special library path.
43412 ac_x_libraries=
43413 else
43414   LIBS=$ac_save_LIBS
43415 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43416 do
43417   # Don't even attempt the hair of trying to link an X program!
43418   for ac_extension in a so sl dylib la dll; do
43419     if test -r "$ac_dir/libX11.$ac_extension"; then
43420       ac_x_libraries=$ac_dir
43421       break 2
43422     fi
43423   done
43424 done
43425 fi
43426 rm -f core conftest.err conftest.$ac_objext \
43427     conftest$ac_exeext conftest.$ac_ext
43428 fi # $ac_x_libraries = no
43429 
43430 case $ac_x_includes,$ac_x_libraries in #(
43431   no,* | *,no | *\'*)
43432     # Didn't find X, or a directory has "'" in its name.
43433     ac_cv_have_x="have_x=no";; #(
43434   *)
43435     # Record where we found X for the cache.
43436     ac_cv_have_x="have_x=yes\
43437         ac_x_includes='$ac_x_includes'\
43438         ac_x_libraries='$ac_x_libraries'"
43439 esac
43440 fi
43441 ;; #(
43442     *) have_x=yes;;
43443   esac
43444   eval "$ac_cv_have_x"
43445 fi # $with_x != no
43446 
43447 if test "$have_x" != yes; then
43448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43449 $as_echo "$have_x" >&6; }
43450   no_x=yes
43451 else
43452   # If each of the values was on the command line, it overrides each guess.
43453   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43454   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43455   # Update the cache value to reflect the command line values.
43456   ac_cv_have_x="have_x=yes\
43457         ac_x_includes='$x_includes'\
43458         ac_x_libraries='$x_libraries'"
43459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43460 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43461 fi
43462 
43463     if test "$no_x" = yes; then
43464   # Not all programs may use this symbol, but it does not hurt to define it.
43465 
43466 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43467 
43468   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43469 else
43470   if test -n "$x_includes"; then
43471     X_CFLAGS="$X_CFLAGS -I$x_includes"
43472   fi
43473 
43474   # It would also be nice to do this for all -L options, not just this one.
43475   if test -n "$x_libraries"; then
43476     X_LIBS="$X_LIBS -L$x_libraries"
43477     # For Solaris; some versions of Sun CC require a space after -R and
43478     # others require no space.  Words are not sufficient . . . .
43479     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43480 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43481     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43482     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43483     ac_cxx_werror_flag=yes
43484     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43485 /* end confdefs.h.  */
43486 
43487 int
43488 main ()
43489 {
43490 
43491   ;
43492   return 0;
43493 }
43494 _ACEOF
43495 if ac_fn_cxx_try_link "$LINENO"; then :
43496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43497 $as_echo "no" >&6; }
43498        X_LIBS="$X_LIBS -R$x_libraries"
43499 else
43500   LIBS="$ac_xsave_LIBS -R $x_libraries"
43501        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43502 /* end confdefs.h.  */
43503 
43504 int
43505 main ()
43506 {
43507 
43508   ;
43509   return 0;
43510 }
43511 _ACEOF
43512 if ac_fn_cxx_try_link "$LINENO"; then :
43513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43514 $as_echo "yes" >&6; }
43515           X_LIBS="$X_LIBS -R $x_libraries"
43516 else
43517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43518 $as_echo "neither works" >&6; }
43519 fi
43520 rm -f core conftest.err conftest.$ac_objext \
43521     conftest$ac_exeext conftest.$ac_ext
43522 fi
43523 rm -f core conftest.err conftest.$ac_objext \
43524     conftest$ac_exeext conftest.$ac_ext
43525     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43526     LIBS=$ac_xsave_LIBS
43527   fi
43528 
43529   # Check for system-dependent libraries X programs must link with.
43530   # Do this before checking for the system-independent R6 libraries
43531   # (-lICE), since we may need -lsocket or whatever for X linking.
43532 
43533   if test "$ISC" = yes; then
43534     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43535   else
43536     # Martyn Johnson says this is needed for Ultrix, if the X
43537     # libraries were built with DECnet support.  And Karl Berry says
43538     # the Alpha needs dnet_stub (dnet does not exist).
43539     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43540     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43541 /* end confdefs.h.  */
43542 
43543 /* Override any GCC internal prototype to avoid an error.
43544    Use char because int might match the return type of a GCC
43545    builtin and then its argument prototype would still apply.  */
43546 #ifdef __cplusplus
43547 extern "C"
43548 #endif
43549 char XOpenDisplay ();
43550 int
43551 main ()
43552 {
43553 return XOpenDisplay ();
43554   ;
43555   return 0;
43556 }
43557 _ACEOF
43558 if ac_fn_cxx_try_link "$LINENO"; then :
43559 
43560 else
43561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43562 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43563 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43564   $as_echo_n "(cached) " >&6
43565 else
43566   ac_check_lib_save_LIBS=$LIBS
43567 LIBS="-ldnet  $LIBS"
43568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43569 /* end confdefs.h.  */
43570 
43571 /* Override any GCC internal prototype to avoid an error.
43572    Use char because int might match the return type of a GCC
43573    builtin and then its argument prototype would still apply.  */
43574 #ifdef __cplusplus
43575 extern "C"
43576 #endif
43577 char dnet_ntoa ();
43578 int
43579 main ()
43580 {
43581 return dnet_ntoa ();
43582   ;
43583   return 0;
43584 }
43585 _ACEOF
43586 if ac_fn_cxx_try_link "$LINENO"; then :
43587   ac_cv_lib_dnet_dnet_ntoa=yes
43588 else
43589   ac_cv_lib_dnet_dnet_ntoa=no
43590 fi
43591 rm -f core conftest.err conftest.$ac_objext \
43592     conftest$ac_exeext conftest.$ac_ext
43593 LIBS=$ac_check_lib_save_LIBS
43594 fi
43595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43596 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43597 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43598   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43599 fi
43600 
43601     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43602       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43603 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43604 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43605   $as_echo_n "(cached) " >&6
43606 else
43607   ac_check_lib_save_LIBS=$LIBS
43608 LIBS="-ldnet_stub  $LIBS"
43609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43610 /* end confdefs.h.  */
43611 
43612 /* Override any GCC internal prototype to avoid an error.
43613    Use char because int might match the return type of a GCC
43614    builtin and then its argument prototype would still apply.  */
43615 #ifdef __cplusplus
43616 extern "C"
43617 #endif
43618 char dnet_ntoa ();
43619 int
43620 main ()
43621 {
43622 return dnet_ntoa ();
43623   ;
43624   return 0;
43625 }
43626 _ACEOF
43627 if ac_fn_cxx_try_link "$LINENO"; then :
43628   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43629 else
43630   ac_cv_lib_dnet_stub_dnet_ntoa=no
43631 fi
43632 rm -f core conftest.err conftest.$ac_objext \
43633     conftest$ac_exeext conftest.$ac_ext
43634 LIBS=$ac_check_lib_save_LIBS
43635 fi
43636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43637 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43638 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43639   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43640 fi
43641 
43642     fi
43643 fi
43644 rm -f core conftest.err conftest.$ac_objext \
43645     conftest$ac_exeext conftest.$ac_ext
43646     LIBS="$ac_xsave_LIBS"
43647 
43648     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43649     # to get the SysV transport functions.
43650     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43651     # needs -lnsl.
43652     # The nsl library prevents programs from opening the X display
43653     # on Irix 5.2, according to T.E. Dickey.
43654     # The functions gethostbyname, getservbyname, and inet_addr are
43655     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43656     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43657 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43658 
43659 fi
43660 
43661     if test $ac_cv_func_gethostbyname = no; then
43662       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43663 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43664 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43665   $as_echo_n "(cached) " >&6
43666 else
43667   ac_check_lib_save_LIBS=$LIBS
43668 LIBS="-lnsl  $LIBS"
43669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43670 /* end confdefs.h.  */
43671 
43672 /* Override any GCC internal prototype to avoid an error.
43673    Use char because int might match the return type of a GCC
43674    builtin and then its argument prototype would still apply.  */
43675 #ifdef __cplusplus
43676 extern "C"
43677 #endif
43678 char gethostbyname ();
43679 int
43680 main ()
43681 {
43682 return gethostbyname ();
43683   ;
43684   return 0;
43685 }
43686 _ACEOF
43687 if ac_fn_cxx_try_link "$LINENO"; then :
43688   ac_cv_lib_nsl_gethostbyname=yes
43689 else
43690   ac_cv_lib_nsl_gethostbyname=no
43691 fi
43692 rm -f core conftest.err conftest.$ac_objext \
43693     conftest$ac_exeext conftest.$ac_ext
43694 LIBS=$ac_check_lib_save_LIBS
43695 fi
43696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43697 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43698 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43699   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43700 fi
43701 
43702       if test $ac_cv_lib_nsl_gethostbyname = no; then
43703         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43704 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43705 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43706   $as_echo_n "(cached) " >&6
43707 else
43708   ac_check_lib_save_LIBS=$LIBS
43709 LIBS="-lbsd  $LIBS"
43710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43711 /* end confdefs.h.  */
43712 
43713 /* Override any GCC internal prototype to avoid an error.
43714    Use char because int might match the return type of a GCC
43715    builtin and then its argument prototype would still apply.  */
43716 #ifdef __cplusplus
43717 extern "C"
43718 #endif
43719 char gethostbyname ();
43720 int
43721 main ()
43722 {
43723 return gethostbyname ();
43724   ;
43725   return 0;
43726 }
43727 _ACEOF
43728 if ac_fn_cxx_try_link "$LINENO"; then :
43729   ac_cv_lib_bsd_gethostbyname=yes
43730 else
43731   ac_cv_lib_bsd_gethostbyname=no
43732 fi
43733 rm -f core conftest.err conftest.$ac_objext \
43734     conftest$ac_exeext conftest.$ac_ext
43735 LIBS=$ac_check_lib_save_LIBS
43736 fi
43737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43738 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43739 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43740   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43741 fi
43742 
43743       fi
43744     fi
43745 
43746     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43747     # socket/setsockopt and other routines are undefined under SCO ODT
43748     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43749     # on later versions), says Simon Leinen: it contains gethostby*
43750     # variants that don't use the name server (or something).  -lsocket
43751     # must be given before -lnsl if both are needed.  We assume that
43752     # if connect needs -lnsl, so does gethostbyname.
43753     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43754 if test "x$ac_cv_func_connect" = xyes; then :
43755 
43756 fi
43757 
43758     if test $ac_cv_func_connect = no; then
43759       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43760 $as_echo_n "checking for connect in -lsocket... " >&6; }
43761 if ${ac_cv_lib_socket_connect+:} false; then :
43762   $as_echo_n "(cached) " >&6
43763 else
43764   ac_check_lib_save_LIBS=$LIBS
43765 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43767 /* end confdefs.h.  */
43768 
43769 /* Override any GCC internal prototype to avoid an error.
43770    Use char because int might match the return type of a GCC
43771    builtin and then its argument prototype would still apply.  */
43772 #ifdef __cplusplus
43773 extern "C"
43774 #endif
43775 char connect ();
43776 int
43777 main ()
43778 {
43779 return connect ();
43780   ;
43781   return 0;
43782 }
43783 _ACEOF
43784 if ac_fn_cxx_try_link "$LINENO"; then :
43785   ac_cv_lib_socket_connect=yes
43786 else
43787   ac_cv_lib_socket_connect=no
43788 fi
43789 rm -f core conftest.err conftest.$ac_objext \
43790     conftest$ac_exeext conftest.$ac_ext
43791 LIBS=$ac_check_lib_save_LIBS
43792 fi
43793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43794 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43795 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43796   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43797 fi
43798 
43799     fi
43800 
43801     # Guillermo Gomez says -lposix is necessary on A/UX.
43802     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43803 if test "x$ac_cv_func_remove" = xyes; then :
43804 
43805 fi
43806 
43807     if test $ac_cv_func_remove = no; then
43808       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43809 $as_echo_n "checking for remove in -lposix... " >&6; }
43810 if ${ac_cv_lib_posix_remove+:} false; then :
43811   $as_echo_n "(cached) " >&6
43812 else
43813   ac_check_lib_save_LIBS=$LIBS
43814 LIBS="-lposix  $LIBS"
43815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43816 /* end confdefs.h.  */
43817 
43818 /* Override any GCC internal prototype to avoid an error.
43819    Use char because int might match the return type of a GCC
43820    builtin and then its argument prototype would still apply.  */
43821 #ifdef __cplusplus
43822 extern "C"
43823 #endif
43824 char remove ();
43825 int
43826 main ()
43827 {
43828 return remove ();
43829   ;
43830   return 0;
43831 }
43832 _ACEOF
43833 if ac_fn_cxx_try_link "$LINENO"; then :
43834   ac_cv_lib_posix_remove=yes
43835 else
43836   ac_cv_lib_posix_remove=no
43837 fi
43838 rm -f core conftest.err conftest.$ac_objext \
43839     conftest$ac_exeext conftest.$ac_ext
43840 LIBS=$ac_check_lib_save_LIBS
43841 fi
43842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43843 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43844 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43845   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43846 fi
43847 
43848     fi
43849 
43850     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43851     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43852 if test "x$ac_cv_func_shmat" = xyes; then :
43853 
43854 fi
43855 
43856     if test $ac_cv_func_shmat = no; then
43857       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43858 $as_echo_n "checking for shmat in -lipc... " >&6; }
43859 if ${ac_cv_lib_ipc_shmat+:} false; then :
43860   $as_echo_n "(cached) " >&6
43861 else
43862   ac_check_lib_save_LIBS=$LIBS
43863 LIBS="-lipc  $LIBS"
43864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43865 /* end confdefs.h.  */
43866 
43867 /* Override any GCC internal prototype to avoid an error.
43868    Use char because int might match the return type of a GCC
43869    builtin and then its argument prototype would still apply.  */
43870 #ifdef __cplusplus
43871 extern "C"
43872 #endif
43873 char shmat ();
43874 int
43875 main ()
43876 {
43877 return shmat ();
43878   ;
43879   return 0;
43880 }
43881 _ACEOF
43882 if ac_fn_cxx_try_link "$LINENO"; then :
43883   ac_cv_lib_ipc_shmat=yes
43884 else
43885   ac_cv_lib_ipc_shmat=no
43886 fi
43887 rm -f core conftest.err conftest.$ac_objext \
43888     conftest$ac_exeext conftest.$ac_ext
43889 LIBS=$ac_check_lib_save_LIBS
43890 fi
43891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43892 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43893 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43894   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43895 fi
43896 
43897     fi
43898   fi
43899 
43900   # Check for libraries that X11R6 Xt/Xaw programs need.
43901   ac_save_LDFLAGS=$LDFLAGS
43902   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43903   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43904   # check for ICE first), but we must link in the order -lSM -lICE or
43905   # we get undefined symbols.  So assume we have SM if we have ICE.
43906   # These have to be linked with before -lX11, unlike the other
43907   # libraries we check for below, so use a different variable.
43908   # John Interrante, Karl Berry
43909   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43910 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43911 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43912   $as_echo_n "(cached) " >&6
43913 else
43914   ac_check_lib_save_LIBS=$LIBS
43915 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43917 /* end confdefs.h.  */
43918 
43919 /* Override any GCC internal prototype to avoid an error.
43920    Use char because int might match the return type of a GCC
43921    builtin and then its argument prototype would still apply.  */
43922 #ifdef __cplusplus
43923 extern "C"
43924 #endif
43925 char IceConnectionNumber ();
43926 int
43927 main ()
43928 {
43929 return IceConnectionNumber ();
43930   ;
43931   return 0;
43932 }
43933 _ACEOF
43934 if ac_fn_cxx_try_link "$LINENO"; then :
43935   ac_cv_lib_ICE_IceConnectionNumber=yes
43936 else
43937   ac_cv_lib_ICE_IceConnectionNumber=no
43938 fi
43939 rm -f core conftest.err conftest.$ac_objext \
43940     conftest$ac_exeext conftest.$ac_ext
43941 LIBS=$ac_check_lib_save_LIBS
43942 fi
43943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43944 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43945 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43946   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43947 fi
43948 
43949   LDFLAGS=$ac_save_LDFLAGS
43950 
43951 fi
43952 
43953 
43954     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43955     # this doesn't make sense so we remove it.
43956     if test "x$COMPILE_TYPE" = xcross; then
43957       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43958     fi
43959 
43960     if test "x$no_x" = xyes; then
43961 
43962   # Print a helpful message on how to acquire the necessary build dependency.
43963   # x11 is the help tag: freetype, cups, pulse, alsa etc
43964   MISSING_DEPENDENCY=x11
43965 
43966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43967     cygwin_help $MISSING_DEPENDENCY
43968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43969     msys_help $MISSING_DEPENDENCY
43970   else
43971     PKGHANDLER_COMMAND=
43972 
43973     case $PKGHANDLER in
43974       apt-get)
43975         apt_help     $MISSING_DEPENDENCY ;;
43976       yum)
43977         yum_help     $MISSING_DEPENDENCY ;;
43978       port)
43979         port_help    $MISSING_DEPENDENCY ;;
43980       pkgutil)
43981         pkgutil_help $MISSING_DEPENDENCY ;;
43982       pkgadd)
43983         pkgadd_help  $MISSING_DEPENDENCY ;;
43984     esac
43985 
43986     if test "x$PKGHANDLER_COMMAND" != x; then
43987       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43988     fi
43989   fi
43990 
43991       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43992     fi
43993 
43994     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43995       OPENWIN_HOME="/usr/openwin"
43996       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43997       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43998           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43999           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44000           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44001     fi
44002 
44003     ac_ext=c
44004 ac_cpp='$CPP $CPPFLAGS'
44005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44008 
44009     OLD_CFLAGS="$CFLAGS"
44010     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44011 
44012     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44013     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44014 do :
44015   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44016 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44017           # include <X11/Xlib.h>
44018           # include <X11/Xutil.h>
44019 
44020 
44021 "
44022 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44023   cat >>confdefs.h <<_ACEOF
44024 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44025 _ACEOF
44026  X11_HEADERS_OK=yes
44027 else
44028   X11_HEADERS_OK=no; break
44029 fi
44030 
44031 done
44032 
44033 
44034     if test "x$X11_HEADERS_OK" = xno; then
44035 
44036   # Print a helpful message on how to acquire the necessary build dependency.
44037   # x11 is the help tag: freetype, cups, pulse, alsa etc
44038   MISSING_DEPENDENCY=x11
44039 
44040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44041     cygwin_help $MISSING_DEPENDENCY
44042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44043     msys_help $MISSING_DEPENDENCY
44044   else
44045     PKGHANDLER_COMMAND=
44046 
44047     case $PKGHANDLER in
44048       apt-get)
44049         apt_help     $MISSING_DEPENDENCY ;;
44050       yum)
44051         yum_help     $MISSING_DEPENDENCY ;;
44052       port)
44053         port_help    $MISSING_DEPENDENCY ;;
44054       pkgutil)
44055         pkgutil_help $MISSING_DEPENDENCY ;;
44056       pkgadd)
44057         pkgadd_help  $MISSING_DEPENDENCY ;;
44058     esac
44059 
44060     if test "x$PKGHANDLER_COMMAND" != x; then
44061       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44062     fi
44063   fi
44064 
44065       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44066     fi
44067 
44068     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44069     # defined in libawt_xawt.
44070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44071 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44072     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44073 /* end confdefs.h.  */
44074 #include <X11/extensions/Xrender.h>
44075 int
44076 main ()
44077 {
44078 XLinearGradient x;
44079   ;
44080   return 0;
44081 }
44082 _ACEOF
44083 if ac_fn_c_try_compile "$LINENO"; then :
44084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44085 $as_echo "yes" >&6; }
44086 else
44087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44088 $as_echo "no" >&6; }
44089          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44090 fi
44091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44092 
44093     CFLAGS="$OLD_CFLAGS"
44094     ac_ext=cpp
44095 ac_cpp='$CXXCPP $CPPFLAGS'
44096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44099 
44100   fi # X11_NOT_NEEDED
44101 
44102 
44103 
44104 
44105 
44106 
44107   ###############################################################################
44108   #
44109   # The common unix printing system cups is used to print from java.
44110   #
44111 
44112 # Check whether --with-cups was given.
44113 if test "${with_cups+set}" = set; then :
44114   withval=$with_cups;
44115 fi
44116 
44117 
44118 # Check whether --with-cups-include was given.
44119 if test "${with_cups_include+set}" = set; then :
44120   withval=$with_cups_include;
44121 fi
44122 
44123 
44124   if test "x$CUPS_NOT_NEEDED" = xyes; then
44125     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44126       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44127 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44128     fi
44129     CUPS_CFLAGS=
44130   else
44131     CUPS_FOUND=no
44132 
44133     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44134       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44135     fi
44136 
44137     if test "x${with_cups}" != x; then
44138       CUPS_CFLAGS="-I${with_cups}/include"
44139       CUPS_FOUND=yes
44140     fi
44141     if test "x${with_cups_include}" != x; then
44142       CUPS_CFLAGS="-I${with_cups_include}"
44143       CUPS_FOUND=yes
44144     fi
44145     if test "x$CUPS_FOUND" = xno; then
44146 
44147 
44148   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44149     # Source the builddeps file again, to make sure it uses the latest variables!
44150     . $builddepsfile
44151     # Look for a target and build machine specific resource!
44152     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44153     if test "x$resource" = x; then
44154       # Ok, lets instead look for a target specific resource
44155       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44156     fi
44157     if test "x$resource" = x; then
44158       # Ok, lets instead look for a build specific resource
44159       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44160     fi
44161     if test "x$resource" = x; then
44162       # Ok, lets instead look for a generic resource
44163       # (The cups comes from M4 and not the shell, thus no need for eval here.)
44164       resource=${builddep_cups}
44165     fi
44166     if test "x$resource" != x; then
44167       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44168 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44169       # If the resource in the builddeps.conf file is an existing directory,
44170       # for example /java/linux/cups
44171       if test -d ${resource}; then
44172         depdir=${resource}
44173       else
44174 
44175   # cups is for example mymodule
44176   # $resource is for example libs/general/libmymod_1_2_3.zip
44177   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44178   # $with_builddeps_dir is for example /localhome/builddeps
44179   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44180   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44181   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44182   filename=`basename $resource`
44183   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44184   filebase=${filename%%.*}
44185   extension=${filename#*.}
44186   installdir=$with_builddeps_dir/$filebase
44187   if test ! -f $installdir/$filename.unpacked; then
44188     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44189 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44190     if test ! -d $installdir; then
44191       mkdir -p $installdir
44192     fi
44193     if test ! -d $installdir; then
44194       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44195     fi
44196     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44197     touch $tmpfile
44198     if test ! -f $tmpfile; then
44199       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44200     fi
44201 
44202   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44203   # $tmpfile is the local file name for the downloaded file.
44204   VALID_TOOL=no
44205   if test "x$BDEPS_FTP" = xwget; then
44206     VALID_TOOL=yes
44207     wget -O $tmpfile $with_builddeps_server/$resource
44208   fi
44209   if test "x$BDEPS_FTP" = xlftp; then
44210     VALID_TOOL=yes
44211     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44212   fi
44213   if test "x$BDEPS_FTP" = xftp; then
44214     VALID_TOOL=yes
44215     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44216     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44217     FTPUSERPWD=${FTPSERVER%%@*}
44218     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44219       FTPUSER=${userpwd%%:*}
44220       FTPPWD=${userpwd#*@}
44221       FTPSERVER=${FTPSERVER#*@}
44222     else
44223       FTPUSER=ftp
44224       FTPPWD=ftp
44225     fi
44226     # the "pass" command does not work on some
44227     # ftp clients (read ftp.exe) but if it works,
44228     # passive mode is better!
44229     ( \
44230         echo "user $FTPUSER $FTPPWD"        ; \
44231         echo "pass"                         ; \
44232         echo "bin"                          ; \
44233         echo "get $FTPPATH $tmpfile"              ; \
44234     ) | ftp -in $FTPSERVER
44235   fi
44236   if test "x$VALID_TOOL" != xyes; then
44237     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44238   fi
44239 
44240     mv $tmpfile $installdir/$filename
44241     if test ! -s $installdir/$filename; then
44242       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44243     fi
44244     case "$extension" in
44245       zip)  echo "Unzipping $installdir/$filename..."
44246         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44247         ;;
44248       tar.gz) echo "Untaring $installdir/$filename..."
44249         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44250         ;;
44251       tgz) echo "Untaring $installdir/$filename..."
44252         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44253         ;;
44254       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44255         ;;
44256     esac
44257   fi
44258   if test -f $installdir/$filename.unpacked; then
44259     depdir=$installdir
44260   fi
44261 
44262       fi
44263       # Source the builddeps file again, because in the previous command, the depdir
44264       # was updated to point at the current build dependency install directory.
44265       . $builddepsfile
44266       # Now extract variables from the builddeps.conf files.
44267       theroot=${builddep_cups_ROOT}
44268       thecflags=${builddep_cups_CFLAGS}
44269       thelibs=${builddep_cups_LIBS}
44270       if test "x$depdir" = x; then
44271         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44272       fi
44273       CUPS=$depdir
44274       if test "x$theroot" != x; then
44275         CUPS="$theroot"
44276       fi
44277       if test "x$thecflags" != x; then
44278         CUPS_CFLAGS="$thecflags"
44279       fi
44280       if test "x$thelibs" != x; then
44281         CUPS_LIBS="$thelibs"
44282       fi
44283       CUPS_FOUND=yes
44284 
44285     fi
44286 
44287   fi
44288 
44289     fi
44290     if test "x$CUPS_FOUND" = xno; then
44291       # Are the cups headers installed in the default /usr/include location?
44292       for ac_header in cups/cups.h cups/ppd.h
44293 do :
44294   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44295 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44296 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44297   cat >>confdefs.h <<_ACEOF
44298 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44299 _ACEOF
44300 
44301             CUPS_FOUND=yes
44302             CUPS_CFLAGS=
44303             DEFAULT_CUPS=yes
44304 
44305 
44306 fi
44307 
44308 done
44309 
44310     fi
44311     if test "x$CUPS_FOUND" = xno; then
44312       # Getting nervous now? Lets poke around for standard Solaris third-party
44313       # package installation locations.
44314       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44315 $as_echo_n "checking for cups headers... " >&6; }
44316       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44317         # An SFW package seems to be installed!
44318         CUPS_FOUND=yes
44319         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44320       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44321         # A CSW package seems to be installed!
44322         CUPS_FOUND=yes
44323         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44324       fi
44325       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44326 $as_echo "$CUPS_FOUND" >&6; }
44327     fi
44328     if test "x$CUPS_FOUND" = xno; then
44329 
44330   # Print a helpful message on how to acquire the necessary build dependency.
44331   # cups is the help tag: freetype, cups, pulse, alsa etc
44332   MISSING_DEPENDENCY=cups
44333 
44334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44335     cygwin_help $MISSING_DEPENDENCY
44336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44337     msys_help $MISSING_DEPENDENCY
44338   else
44339     PKGHANDLER_COMMAND=
44340 
44341     case $PKGHANDLER in
44342       apt-get)
44343         apt_help     $MISSING_DEPENDENCY ;;
44344       yum)
44345         yum_help     $MISSING_DEPENDENCY ;;
44346       port)
44347         port_help    $MISSING_DEPENDENCY ;;
44348       pkgutil)
44349         pkgutil_help $MISSING_DEPENDENCY ;;
44350       pkgadd)
44351         pkgadd_help  $MISSING_DEPENDENCY ;;
44352     esac
44353 
44354     if test "x$PKGHANDLER_COMMAND" != x; then
44355       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44356     fi
44357   fi
44358 
44359       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44360     fi
44361   fi
44362 
44363 
44364 
44365 
44366 
44367 
44368   ###############################################################################
44369   #
44370   # The ubiquitous freetype library is used to render fonts.
44371   #
44372 
44373 # Check whether --with-freetype was given.
44374 if test "${with_freetype+set}" = set; then :
44375   withval=$with_freetype;
44376 fi
44377 
44378 
44379 # Check whether --with-freetype-include was given.
44380 if test "${with_freetype_include+set}" = set; then :
44381   withval=$with_freetype_include;
44382 fi
44383 
44384 
44385 # Check whether --with-freetype-lib was given.
44386 if test "${with_freetype_lib+set}" = set; then :
44387   withval=$with_freetype_lib;
44388 fi
44389 
44390 
44391 # Check whether --with-freetype-src was given.
44392 if test "${with_freetype_src+set}" = set; then :
44393   withval=$with_freetype_src;
44394 fi
44395 
44396   # Check whether --enable-freetype-bundling was given.
44397 if test "${enable_freetype_bundling+set}" = set; then :
44398   enableval=$enable_freetype_bundling;
44399 fi
44400 
44401 
44402   # Need to specify explicitly since it needs to be overridden on some versions of macosx
44403   FREETYPE_BASE_NAME=freetype
44404   FREETYPE_CFLAGS=
44405   FREETYPE_LIBS=
44406   FREETYPE_BUNDLE_LIB_PATH=
44407 
44408   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44409     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
44410       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44411 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44412     fi
44413     if test "x$enable_freetype_bundling" != x; then
44414       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44415 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44416     fi
44417   else
44418     # freetype is needed to build; go get it!
44419 
44420     BUNDLE_FREETYPE="$enable_freetype_bundling"
44421 
44422     if  test "x$with_freetype_src" != x; then
44423       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44424         # Try to build freetype if --with-freetype-src was given on Windows
44425 
44426   FREETYPE_SRC_PATH="$with_freetype_src"
44427   BUILD_FREETYPE=yes
44428 
44429   # Check if the freetype sources are acessible..
44430   if ! test -d $FREETYPE_SRC_PATH; then
44431     { $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
44432 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44433     BUILD_FREETYPE=no
44434   fi
44435   # ..and contain a vc2010 project file
44436   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44437   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44438     { $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
44439 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44440     BUILD_FREETYPE=no
44441   fi
44442   # Now check if configure found a version of 'msbuild.exe'
44443   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44444     { $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
44445 $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;}
44446     BUILD_FREETYPE=no
44447   fi
44448 
44449   # Ready to go..
44450   if test "x$BUILD_FREETYPE" = xyes; then
44451 
44452     # msbuild requires trailing slashes for output directories
44453     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44454     freetype_lib_path_unix="$freetype_lib_path"
44455     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44456 
44457   unix_path="$vcxproj_path"
44458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44459     windows_path=`$CYGPATH -m "$unix_path"`
44460     vcxproj_path="$windows_path"
44461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44462     windows_path=`cmd //c echo $unix_path`
44463     vcxproj_path="$windows_path"
44464   fi
44465 
44466 
44467   unix_path="$freetype_lib_path"
44468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44469     windows_path=`$CYGPATH -m "$unix_path"`
44470     freetype_lib_path="$windows_path"
44471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44472     windows_path=`cmd //c echo $unix_path`
44473     freetype_lib_path="$windows_path"
44474   fi
44475 
44476 
44477   unix_path="$freetype_obj_path"
44478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44479     windows_path=`$CYGPATH -m "$unix_path"`
44480     freetype_obj_path="$windows_path"
44481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44482     windows_path=`cmd //c echo $unix_path`
44483     freetype_obj_path="$windows_path"
44484   fi
44485 
44486     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44487       freetype_platform=x64
44488     else
44489       freetype_platform=win32
44490     fi
44491 
44492     # The original freetype project file is for VS 2010 (i.e. 'v100'),
44493     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44494     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44495     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44496     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44497 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44498 
44499     # First we try to build the freetype.dll
44500     $ECHO -e "@echo off\n"\
44501              "$MSBUILD $vcxproj_path "\
44502                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44503                        "/p:Configuration=\"Release Multithreaded\" "\
44504                        "/p:Platform=$freetype_platform "\
44505                        "/p:ConfigurationType=DynamicLibrary "\
44506                        "/p:TargetName=freetype "\
44507                        "/p:OutDir=\"$freetype_lib_path\" "\
44508                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44509     cmd /c freetype.bat
44510 
44511     if test -s "$freetype_lib_path_unix/freetype.dll"; then
44512       # If that succeeds we also build freetype.lib
44513       $ECHO -e "@echo off\n"\
44514                "$MSBUILD $vcxproj_path "\
44515                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44516                          "/p:Configuration=\"Release Multithreaded\" "\
44517                          "/p:Platform=$freetype_platform "\
44518                          "/p:ConfigurationType=StaticLibrary "\
44519                          "/p:TargetName=freetype "\
44520                          "/p:OutDir=\"$freetype_lib_path\" "\
44521                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44522       cmd /c freetype.bat
44523 
44524       if test -s "$freetype_lib_path_unix/freetype.lib"; then
44525         # Once we build both, lib and dll, set freetype lib and include path appropriately
44526         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44527         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44528         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44529 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44530       else
44531         BUILD_FREETYPE=no
44532       fi
44533     else
44534       BUILD_FREETYPE=no
44535     fi
44536   fi
44537 
44538         if test "x$BUILD_FREETYPE" = xyes; then
44539           # Okay, we built it. Check that it works.
44540 
44541   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44542   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44543   METHOD="--with-freetype-src"
44544 
44545   # Let's start with an optimistic view of the world :-)
44546   FOUND_FREETYPE=yes
44547 
44548   # First look for the canonical freetype main include file ft2build.h.
44549   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44550     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44551     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44552     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44553       # Fail.
44554       FOUND_FREETYPE=no
44555     fi
44556   fi
44557 
44558   if test "x$FOUND_FREETYPE" = xyes; then
44559     # Include file found, let's continue the sanity check.
44560     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44561 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44562 
44563     # Reset to default value
44564     FREETYPE_BASE_NAME=freetype
44565     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44566     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44567       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44568           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44569         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44570         # for the .6 version explicitly.
44571         FREETYPE_BASE_NAME=freetype.6
44572         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44573         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44574 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44575       else
44576         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44577 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44578         FOUND_FREETYPE=no
44579       fi
44580     else
44581       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44582         # On Windows, we will need both .lib and .dll file.
44583         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44584           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44585 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44586           FOUND_FREETYPE=no
44587         fi
44588       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44589           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44590         # Found lib in isa dir, use that instead.
44591         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44592         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44593 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44594       fi
44595     fi
44596   fi
44597 
44598   if test "x$FOUND_FREETYPE" = xyes; then
44599 
44600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44601 
44602   # Input might be given as Windows format, start by converting to
44603   # unix format.
44604   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44605   new_path=`$CYGPATH -u "$path"`
44606 
44607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44610   # "foo.exe" is OK but "foo" is an error.
44611   #
44612   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44613   # It is also a way to make sure we got the proper file name for the real test later on.
44614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44615   if test "x$test_shortpath" = x; then
44616     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44617 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44618     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44619   fi
44620 
44621   # Call helper function which possibly converts this using DOS-style short mode.
44622   # If so, the updated path is stored in $new_path.
44623 
44624   input_path="$new_path"
44625   # Check if we need to convert this using DOS-style short mode. If the path
44626   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44627   # take no chances and rewrite it.
44628   # Note: m4 eats our [], so we need to use [ and ] instead.
44629   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44630   if test "x$has_forbidden_chars" != x; then
44631     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44632     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44633     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44634     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44635       # Going to short mode and back again did indeed matter. Since short mode is
44636       # case insensitive, let's make it lowercase to improve readability.
44637       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44638       # Now convert it back to Unix-stile (cygpath)
44639       input_path=`$CYGPATH -u "$shortmode_path"`
44640       new_path="$input_path"
44641     fi
44642   fi
44643 
44644   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44645   if test "x$test_cygdrive_prefix" = x; then
44646     # As a simple fix, exclude /usr/bin since it's not a real path.
44647     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44648       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44649       # a path prefixed by /cygdrive for fixpath to work.
44650       new_path="$CYGWIN_ROOT_PATH$input_path"
44651     fi
44652   fi
44653 
44654 
44655   if test "x$path" != "x$new_path"; then
44656     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44657     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44658 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44659   fi
44660 
44661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44662 
44663   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44664   has_colon=`$ECHO $path | $GREP ^.:`
44665   new_path="$path"
44666   if test "x$has_colon" = x; then
44667     # Not in mixed or Windows style, start by that.
44668     new_path=`cmd //c echo $path`
44669   fi
44670 
44671 
44672   input_path="$new_path"
44673   # Check if we need to convert this using DOS-style short mode. If the path
44674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44675   # take no chances and rewrite it.
44676   # Note: m4 eats our [], so we need to use [ and ] instead.
44677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44678   if test "x$has_forbidden_chars" != x; then
44679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44680     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44681   fi
44682 
44683 
44684   windows_path="$new_path"
44685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44686     unix_path=`$CYGPATH -u "$windows_path"`
44687     new_path="$unix_path"
44688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44690     new_path="$unix_path"
44691   fi
44692 
44693   if test "x$path" != "x$new_path"; then
44694     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44695     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44696 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44697   fi
44698 
44699   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44700   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44701 
44702   else
44703     # We're on a unix platform. Hooray! :)
44704     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44705     has_space=`$ECHO "$path" | $GREP " "`
44706     if test "x$has_space" != x; then
44707       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44708 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44709       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44710     fi
44711 
44712     # Use eval to expand a potential ~
44713     eval path="$path"
44714     if test ! -f "$path" && test ! -d "$path"; then
44715       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44716     fi
44717 
44718     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44719   fi
44720 
44721 
44722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44723 
44724   # Input might be given as Windows format, start by converting to
44725   # unix format.
44726   path="$POTENTIAL_FREETYPE_LIB_PATH"
44727   new_path=`$CYGPATH -u "$path"`
44728 
44729   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44730   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44731   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44732   # "foo.exe" is OK but "foo" is an error.
44733   #
44734   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44735   # It is also a way to make sure we got the proper file name for the real test later on.
44736   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44737   if test "x$test_shortpath" = x; then
44738     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44739 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44740     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44741   fi
44742 
44743   # Call helper function which possibly converts this using DOS-style short mode.
44744   # If so, the updated path is stored in $new_path.
44745 
44746   input_path="$new_path"
44747   # Check if we need to convert this using DOS-style short mode. If the path
44748   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44749   # take no chances and rewrite it.
44750   # Note: m4 eats our [], so we need to use [ and ] instead.
44751   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44752   if test "x$has_forbidden_chars" != x; then
44753     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44754     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44755     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44756     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44757       # Going to short mode and back again did indeed matter. Since short mode is
44758       # case insensitive, let's make it lowercase to improve readability.
44759       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44760       # Now convert it back to Unix-stile (cygpath)
44761       input_path=`$CYGPATH -u "$shortmode_path"`
44762       new_path="$input_path"
44763     fi
44764   fi
44765 
44766   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44767   if test "x$test_cygdrive_prefix" = x; then
44768     # As a simple fix, exclude /usr/bin since it's not a real path.
44769     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44770       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44771       # a path prefixed by /cygdrive for fixpath to work.
44772       new_path="$CYGWIN_ROOT_PATH$input_path"
44773     fi
44774   fi
44775 
44776 
44777   if test "x$path" != "x$new_path"; then
44778     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44779     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44780 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44781   fi
44782 
44783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44784 
44785   path="$POTENTIAL_FREETYPE_LIB_PATH"
44786   has_colon=`$ECHO $path | $GREP ^.:`
44787   new_path="$path"
44788   if test "x$has_colon" = x; then
44789     # Not in mixed or Windows style, start by that.
44790     new_path=`cmd //c echo $path`
44791   fi
44792 
44793 
44794   input_path="$new_path"
44795   # Check if we need to convert this using DOS-style short mode. If the path
44796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44797   # take no chances and rewrite it.
44798   # Note: m4 eats our [], so we need to use [ and ] instead.
44799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44800   if test "x$has_forbidden_chars" != x; then
44801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44802     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44803   fi
44804 
44805 
44806   windows_path="$new_path"
44807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44808     unix_path=`$CYGPATH -u "$windows_path"`
44809     new_path="$unix_path"
44810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44812     new_path="$unix_path"
44813   fi
44814 
44815   if test "x$path" != "x$new_path"; then
44816     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44818 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44819   fi
44820 
44821   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44822   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44823 
44824   else
44825     # We're on a unix platform. Hooray! :)
44826     path="$POTENTIAL_FREETYPE_LIB_PATH"
44827     has_space=`$ECHO "$path" | $GREP " "`
44828     if test "x$has_space" != x; then
44829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44830 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44831       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44832     fi
44833 
44834     # Use eval to expand a potential ~
44835     eval path="$path"
44836     if test ! -f "$path" && test ! -d "$path"; then
44837       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44838     fi
44839 
44840     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44841   fi
44842 
44843 
44844     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44845     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44846 $as_echo_n "checking for freetype includes... " >&6; }
44847     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44848 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44849     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44850     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44851 $as_echo_n "checking for freetype libraries... " >&6; }
44852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44853 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44854   fi
44855 
44856           if test "x$FOUND_FREETYPE" != xyes; then
44857             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44858           fi
44859         else
44860           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44861 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44862           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44863         fi
44864       else
44865         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44866 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44867       fi
44868     fi
44869 
44870     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44871       # User has specified settings
44872 
44873       if test "x$BUNDLE_FREETYPE" = x; then
44874         # If not specified, default is to bundle freetype
44875         BUNDLE_FREETYPE=yes
44876       fi
44877 
44878       if test "x$with_freetype" != x; then
44879         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44880         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44881       fi
44882 
44883       # Allow --with-freetype-lib and --with-freetype-include to override
44884       if test "x$with_freetype_include" != x; then
44885         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44886       fi
44887       if test "x$with_freetype_lib" != x; then
44888         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44889       fi
44890 
44891       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44892         # Okay, we got it. Check that it works.
44893 
44894   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44895   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44896   METHOD="--with-freetype"
44897 
44898   # Let's start with an optimistic view of the world :-)
44899   FOUND_FREETYPE=yes
44900 
44901   # First look for the canonical freetype main include file ft2build.h.
44902   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44903     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44904     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44905     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44906       # Fail.
44907       FOUND_FREETYPE=no
44908     fi
44909   fi
44910 
44911   if test "x$FOUND_FREETYPE" = xyes; then
44912     # Include file found, let's continue the sanity check.
44913     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44914 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44915 
44916     # Reset to default value
44917     FREETYPE_BASE_NAME=freetype
44918     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44919     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44920       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44921           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44922         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44923         # for the .6 version explicitly.
44924         FREETYPE_BASE_NAME=freetype.6
44925         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44926         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44927 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44928       else
44929         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44930 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44931         FOUND_FREETYPE=no
44932       fi
44933     else
44934       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44935         # On Windows, we will need both .lib and .dll file.
44936         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44937           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44938 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44939           FOUND_FREETYPE=no
44940         fi
44941       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44942           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44943         # Found lib in isa dir, use that instead.
44944         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44945         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44946 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44947       fi
44948     fi
44949   fi
44950 
44951   if test "x$FOUND_FREETYPE" = xyes; then
44952 
44953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44954 
44955   # Input might be given as Windows format, start by converting to
44956   # unix format.
44957   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44958   new_path=`$CYGPATH -u "$path"`
44959 
44960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44963   # "foo.exe" is OK but "foo" is an error.
44964   #
44965   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44966   # It is also a way to make sure we got the proper file name for the real test later on.
44967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44968   if test "x$test_shortpath" = x; then
44969     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44970 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44971     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44972   fi
44973 
44974   # Call helper function which possibly converts this using DOS-style short mode.
44975   # If so, the updated path is stored in $new_path.
44976 
44977   input_path="$new_path"
44978   # Check if we need to convert this using DOS-style short mode. If the path
44979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44980   # take no chances and rewrite it.
44981   # Note: m4 eats our [], so we need to use [ and ] instead.
44982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44983   if test "x$has_forbidden_chars" != x; then
44984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44988       # Going to short mode and back again did indeed matter. Since short mode is
44989       # case insensitive, let's make it lowercase to improve readability.
44990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44991       # Now convert it back to Unix-stile (cygpath)
44992       input_path=`$CYGPATH -u "$shortmode_path"`
44993       new_path="$input_path"
44994     fi
44995   fi
44996 
44997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44998   if test "x$test_cygdrive_prefix" = x; then
44999     # As a simple fix, exclude /usr/bin since it's not a real path.
45000     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45002       # a path prefixed by /cygdrive for fixpath to work.
45003       new_path="$CYGWIN_ROOT_PATH$input_path"
45004     fi
45005   fi
45006 
45007 
45008   if test "x$path" != "x$new_path"; then
45009     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45011 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45012   fi
45013 
45014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45015 
45016   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45017   has_colon=`$ECHO $path | $GREP ^.:`
45018   new_path="$path"
45019   if test "x$has_colon" = x; then
45020     # Not in mixed or Windows style, start by that.
45021     new_path=`cmd //c echo $path`
45022   fi
45023 
45024 
45025   input_path="$new_path"
45026   # Check if we need to convert this using DOS-style short mode. If the path
45027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45028   # take no chances and rewrite it.
45029   # Note: m4 eats our [], so we need to use [ and ] instead.
45030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45031   if test "x$has_forbidden_chars" != x; then
45032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45034   fi
45035 
45036 
45037   windows_path="$new_path"
45038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45039     unix_path=`$CYGPATH -u "$windows_path"`
45040     new_path="$unix_path"
45041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45043     new_path="$unix_path"
45044   fi
45045 
45046   if test "x$path" != "x$new_path"; then
45047     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45048     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45049 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45050   fi
45051 
45052   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45053   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45054 
45055   else
45056     # We're on a unix platform. Hooray! :)
45057     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45058     has_space=`$ECHO "$path" | $GREP " "`
45059     if test "x$has_space" != x; then
45060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45061 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45062       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45063     fi
45064 
45065     # Use eval to expand a potential ~
45066     eval path="$path"
45067     if test ! -f "$path" && test ! -d "$path"; then
45068       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45069     fi
45070 
45071     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45072   fi
45073 
45074 
45075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45076 
45077   # Input might be given as Windows format, start by converting to
45078   # unix format.
45079   path="$POTENTIAL_FREETYPE_LIB_PATH"
45080   new_path=`$CYGPATH -u "$path"`
45081 
45082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45085   # "foo.exe" is OK but "foo" is an error.
45086   #
45087   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45088   # It is also a way to make sure we got the proper file name for the real test later on.
45089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45090   if test "x$test_shortpath" = x; then
45091     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45092 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45093     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45094   fi
45095 
45096   # Call helper function which possibly converts this using DOS-style short mode.
45097   # If so, the updated path is stored in $new_path.
45098 
45099   input_path="$new_path"
45100   # Check if we need to convert this using DOS-style short mode. If the path
45101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45102   # take no chances and rewrite it.
45103   # Note: m4 eats our [], so we need to use [ and ] instead.
45104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45105   if test "x$has_forbidden_chars" != x; then
45106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45110       # Going to short mode and back again did indeed matter. Since short mode is
45111       # case insensitive, let's make it lowercase to improve readability.
45112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45113       # Now convert it back to Unix-stile (cygpath)
45114       input_path=`$CYGPATH -u "$shortmode_path"`
45115       new_path="$input_path"
45116     fi
45117   fi
45118 
45119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45120   if test "x$test_cygdrive_prefix" = x; then
45121     # As a simple fix, exclude /usr/bin since it's not a real path.
45122     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45124       # a path prefixed by /cygdrive for fixpath to work.
45125       new_path="$CYGWIN_ROOT_PATH$input_path"
45126     fi
45127   fi
45128 
45129 
45130   if test "x$path" != "x$new_path"; then
45131     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45132     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45133 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45134   fi
45135 
45136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45137 
45138   path="$POTENTIAL_FREETYPE_LIB_PATH"
45139   has_colon=`$ECHO $path | $GREP ^.:`
45140   new_path="$path"
45141   if test "x$has_colon" = x; then
45142     # Not in mixed or Windows style, start by that.
45143     new_path=`cmd //c echo $path`
45144   fi
45145 
45146 
45147   input_path="$new_path"
45148   # Check if we need to convert this using DOS-style short mode. If the path
45149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45150   # take no chances and rewrite it.
45151   # Note: m4 eats our [], so we need to use [ and ] instead.
45152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45153   if test "x$has_forbidden_chars" != x; then
45154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45155     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45156   fi
45157 
45158 
45159   windows_path="$new_path"
45160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45161     unix_path=`$CYGPATH -u "$windows_path"`
45162     new_path="$unix_path"
45163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45165     new_path="$unix_path"
45166   fi
45167 
45168   if test "x$path" != "x$new_path"; then
45169     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45171 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45172   fi
45173 
45174   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45175   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45176 
45177   else
45178     # We're on a unix platform. Hooray! :)
45179     path="$POTENTIAL_FREETYPE_LIB_PATH"
45180     has_space=`$ECHO "$path" | $GREP " "`
45181     if test "x$has_space" != x; then
45182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45183 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45184       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45185     fi
45186 
45187     # Use eval to expand a potential ~
45188     eval path="$path"
45189     if test ! -f "$path" && test ! -d "$path"; then
45190       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45191     fi
45192 
45193     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45194   fi
45195 
45196 
45197     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45198     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45199 $as_echo_n "checking for freetype includes... " >&6; }
45200     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45201 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45202     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45204 $as_echo_n "checking for freetype libraries... " >&6; }
45205     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45206 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45207   fi
45208 
45209         if test "x$FOUND_FREETYPE" != xyes; then
45210           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45211         fi
45212       else
45213         # User specified only one of lib or include. This is an error.
45214         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45215           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45216 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45217           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45218         else
45219           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45220 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45221           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45222         fi
45223       fi
45224     else
45225       # User did not specify settings, but we need freetype. Try to locate it.
45226 
45227       if test "x$BUNDLE_FREETYPE" = x; then
45228         # If not specified, default is to bundle freetype only on windows
45229         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45230           BUNDLE_FREETYPE=yes
45231         else
45232           BUNDLE_FREETYPE=no
45233         fi
45234       fi
45235 
45236       if test "x$FOUND_FREETYPE" != xyes; then
45237         # Check builddeps
45238 
45239 
45240   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45241     # Source the builddeps file again, to make sure it uses the latest variables!
45242     . $builddepsfile
45243     # Look for a target and build machine specific resource!
45244     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45245     if test "x$resource" = x; then
45246       # Ok, lets instead look for a target specific resource
45247       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45248     fi
45249     if test "x$resource" = x; then
45250       # Ok, lets instead look for a build specific resource
45251       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45252     fi
45253     if test "x$resource" = x; then
45254       # Ok, lets instead look for a generic resource
45255       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45256       resource=${builddep_freetype2}
45257     fi
45258     if test "x$resource" != x; then
45259       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45260 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45261       # If the resource in the builddeps.conf file is an existing directory,
45262       # for example /java/linux/cups
45263       if test -d ${resource}; then
45264         depdir=${resource}
45265       else
45266 
45267   # freetype2 is for example mymodule
45268   # $resource is for example libs/general/libmymod_1_2_3.zip
45269   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45270   # $with_builddeps_dir is for example /localhome/builddeps
45271   # depdir is the name of the variable into which we store the depdir, eg MYMOD
45272   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45273   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45274   filename=`basename $resource`
45275   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45276   filebase=${filename%%.*}
45277   extension=${filename#*.}
45278   installdir=$with_builddeps_dir/$filebase
45279   if test ! -f $installdir/$filename.unpacked; then
45280     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45281 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45282     if test ! -d $installdir; then
45283       mkdir -p $installdir
45284     fi
45285     if test ! -d $installdir; then
45286       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45287     fi
45288     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45289     touch $tmpfile
45290     if test ! -f $tmpfile; then
45291       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45292     fi
45293 
45294   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45295   # $tmpfile is the local file name for the downloaded file.
45296   VALID_TOOL=no
45297   if test "x$BDEPS_FTP" = xwget; then
45298     VALID_TOOL=yes
45299     wget -O $tmpfile $with_builddeps_server/$resource
45300   fi
45301   if test "x$BDEPS_FTP" = xlftp; then
45302     VALID_TOOL=yes
45303     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45304   fi
45305   if test "x$BDEPS_FTP" = xftp; then
45306     VALID_TOOL=yes
45307     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45308     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45309     FTPUSERPWD=${FTPSERVER%%@*}
45310     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45311       FTPUSER=${userpwd%%:*}
45312       FTPPWD=${userpwd#*@}
45313       FTPSERVER=${FTPSERVER#*@}
45314     else
45315       FTPUSER=ftp
45316       FTPPWD=ftp
45317     fi
45318     # the "pass" command does not work on some
45319     # ftp clients (read ftp.exe) but if it works,
45320     # passive mode is better!
45321     ( \
45322         echo "user $FTPUSER $FTPPWD"        ; \
45323         echo "pass"                         ; \
45324         echo "bin"                          ; \
45325         echo "get $FTPPATH $tmpfile"              ; \
45326     ) | ftp -in $FTPSERVER
45327   fi
45328   if test "x$VALID_TOOL" != xyes; then
45329     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45330   fi
45331 
45332     mv $tmpfile $installdir/$filename
45333     if test ! -s $installdir/$filename; then
45334       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45335     fi
45336     case "$extension" in
45337       zip)  echo "Unzipping $installdir/$filename..."
45338         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45339         ;;
45340       tar.gz) echo "Untaring $installdir/$filename..."
45341         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45342         ;;
45343       tgz) echo "Untaring $installdir/$filename..."
45344         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45345         ;;
45346       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45347         ;;
45348     esac
45349   fi
45350   if test -f $installdir/$filename.unpacked; then
45351     depdir=$installdir
45352   fi
45353 
45354       fi
45355       # Source the builddeps file again, because in the previous command, the depdir
45356       # was updated to point at the current build dependency install directory.
45357       . $builddepsfile
45358       # Now extract variables from the builddeps.conf files.
45359       theroot=${builddep_freetype2_ROOT}
45360       thecflags=${builddep_freetype2_CFLAGS}
45361       thelibs=${builddep_freetype2_LIBS}
45362       if test "x$depdir" = x; then
45363         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45364       fi
45365       FREETYPE=$depdir
45366       if test "x$theroot" != x; then
45367         FREETYPE="$theroot"
45368       fi
45369       if test "x$thecflags" != x; then
45370         FREETYPE_CFLAGS="$thecflags"
45371       fi
45372       if test "x$thelibs" != x; then
45373         FREETYPE_LIBS="$thelibs"
45374       fi
45375       FOUND_FREETYPE=yes
45376       else FOUND_FREETYPE=no
45377 
45378     fi
45379     else FOUND_FREETYPE=no
45380 
45381   fi
45382 
45383         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45384         if test "x$FOUND_FREETYPE" = xyes; then
45385           if test "x$BUNDLE_FREETYPE" = xyes; then
45386             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45387 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45388             FOUND_FREETYPE=no
45389           else
45390             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45391 $as_echo_n "checking for freetype... " >&6; }
45392             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45393 $as_echo "yes (using builddeps)" >&6; }
45394           fi
45395         fi
45396       fi
45397 
45398       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45399       if test "x$SYSROOT" = x; then
45400         if test "x$FOUND_FREETYPE" != xyes; then
45401           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45402           if test "x$PKG_CONFIG" != x; then
45403 
45404 pkg_failed=no
45405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45406 $as_echo_n "checking for FREETYPE... " >&6; }
45407 
45408 if test -n "$FREETYPE_CFLAGS"; then
45409     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45410  elif test -n "$PKG_CONFIG"; then
45411     if test -n "$PKG_CONFIG" && \
45412     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45413   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45414   ac_status=$?
45415   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45416   test $ac_status = 0; }; then
45417   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45418 else
45419   pkg_failed=yes
45420 fi
45421  else
45422     pkg_failed=untried
45423 fi
45424 if test -n "$FREETYPE_LIBS"; then
45425     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45426  elif test -n "$PKG_CONFIG"; then
45427     if test -n "$PKG_CONFIG" && \
45428     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45429   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45430   ac_status=$?
45431   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45432   test $ac_status = 0; }; then
45433   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45434 else
45435   pkg_failed=yes
45436 fi
45437  else
45438     pkg_failed=untried
45439 fi
45440 
45441 
45442 
45443 if test $pkg_failed = yes; then
45444 
45445 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45446         _pkg_short_errors_supported=yes
45447 else
45448         _pkg_short_errors_supported=no
45449 fi
45450         if test $_pkg_short_errors_supported = yes; then
45451                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45452         else
45453                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45454         fi
45455         # Put the nasty error message in config.log where it belongs
45456         echo "$FREETYPE_PKG_ERRORS" >&5
45457 
45458         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45459 $as_echo "no" >&6; }
45460                 FOUND_FREETYPE=no
45461 elif test $pkg_failed = untried; then
45462         FOUND_FREETYPE=no
45463 else
45464         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45465         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45466         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45467 $as_echo "yes" >&6; }
45468         FOUND_FREETYPE=yes
45469 fi
45470             if test "x$FOUND_FREETYPE" = xyes; then
45471               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45472               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45473               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45474               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45475                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45476               fi
45477               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45478               if test "x$BUNDLE_FREETYPE" = xyes; then
45479                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45480 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45481                 FOUND_FREETYPE=no
45482               else
45483                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45484 $as_echo_n "checking for freetype... " >&6; }
45485                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45486 $as_echo "yes (using pkg-config)" >&6; }
45487               fi
45488             fi
45489           fi
45490         fi
45491       fi
45492 
45493       if test "x$FOUND_FREETYPE" != xyes; then
45494         # Check in well-known locations
45495         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45496           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45497 
45498   windows_path="$FREETYPE_BASE_DIR"
45499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45500     unix_path=`$CYGPATH -u "$windows_path"`
45501     FREETYPE_BASE_DIR="$unix_path"
45502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45504     FREETYPE_BASE_DIR="$unix_path"
45505   fi
45506 
45507 
45508   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45509   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45510   METHOD="well-known location"
45511 
45512   # Let's start with an optimistic view of the world :-)
45513   FOUND_FREETYPE=yes
45514 
45515   # First look for the canonical freetype main include file ft2build.h.
45516   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45517     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45518     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45519     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45520       # Fail.
45521       FOUND_FREETYPE=no
45522     fi
45523   fi
45524 
45525   if test "x$FOUND_FREETYPE" = xyes; then
45526     # Include file found, let's continue the sanity check.
45527     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45528 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45529 
45530     # Reset to default value
45531     FREETYPE_BASE_NAME=freetype
45532     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45533     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45534       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45535           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45536         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45537         # for the .6 version explicitly.
45538         FREETYPE_BASE_NAME=freetype.6
45539         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45540         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45541 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45542       else
45543         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45544 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45545         FOUND_FREETYPE=no
45546       fi
45547     else
45548       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45549         # On Windows, we will need both .lib and .dll file.
45550         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45551           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45552 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45553           FOUND_FREETYPE=no
45554         fi
45555       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45556           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45557         # Found lib in isa dir, use that instead.
45558         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45559         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45560 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45561       fi
45562     fi
45563   fi
45564 
45565   if test "x$FOUND_FREETYPE" = xyes; then
45566 
45567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45568 
45569   # Input might be given as Windows format, start by converting to
45570   # unix format.
45571   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45572   new_path=`$CYGPATH -u "$path"`
45573 
45574   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45575   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45576   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45577   # "foo.exe" is OK but "foo" is an error.
45578   #
45579   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45580   # It is also a way to make sure we got the proper file name for the real test later on.
45581   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45582   if test "x$test_shortpath" = x; then
45583     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45584 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45585     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45586   fi
45587 
45588   # Call helper function which possibly converts this using DOS-style short mode.
45589   # If so, the updated path is stored in $new_path.
45590 
45591   input_path="$new_path"
45592   # Check if we need to convert this using DOS-style short mode. If the path
45593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45594   # take no chances and rewrite it.
45595   # Note: m4 eats our [], so we need to use [ and ] instead.
45596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45597   if test "x$has_forbidden_chars" != x; then
45598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45602       # Going to short mode and back again did indeed matter. Since short mode is
45603       # case insensitive, let's make it lowercase to improve readability.
45604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45605       # Now convert it back to Unix-stile (cygpath)
45606       input_path=`$CYGPATH -u "$shortmode_path"`
45607       new_path="$input_path"
45608     fi
45609   fi
45610 
45611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45612   if test "x$test_cygdrive_prefix" = x; then
45613     # As a simple fix, exclude /usr/bin since it's not a real path.
45614     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45616       # a path prefixed by /cygdrive for fixpath to work.
45617       new_path="$CYGWIN_ROOT_PATH$input_path"
45618     fi
45619   fi
45620 
45621 
45622   if test "x$path" != "x$new_path"; then
45623     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45625 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45626   fi
45627 
45628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45629 
45630   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45631   has_colon=`$ECHO $path | $GREP ^.:`
45632   new_path="$path"
45633   if test "x$has_colon" = x; then
45634     # Not in mixed or Windows style, start by that.
45635     new_path=`cmd //c echo $path`
45636   fi
45637 
45638 
45639   input_path="$new_path"
45640   # Check if we need to convert this using DOS-style short mode. If the path
45641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45642   # take no chances and rewrite it.
45643   # Note: m4 eats our [], so we need to use [ and ] instead.
45644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45645   if test "x$has_forbidden_chars" != x; then
45646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45647     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45648   fi
45649 
45650 
45651   windows_path="$new_path"
45652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45653     unix_path=`$CYGPATH -u "$windows_path"`
45654     new_path="$unix_path"
45655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45657     new_path="$unix_path"
45658   fi
45659 
45660   if test "x$path" != "x$new_path"; then
45661     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45663 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45664   fi
45665 
45666   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45667   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45668 
45669   else
45670     # We're on a unix platform. Hooray! :)
45671     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45672     has_space=`$ECHO "$path" | $GREP " "`
45673     if test "x$has_space" != x; then
45674       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45675 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45676       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45677     fi
45678 
45679     # Use eval to expand a potential ~
45680     eval path="$path"
45681     if test ! -f "$path" && test ! -d "$path"; then
45682       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45683     fi
45684 
45685     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45686   fi
45687 
45688 
45689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45690 
45691   # Input might be given as Windows format, start by converting to
45692   # unix format.
45693   path="$POTENTIAL_FREETYPE_LIB_PATH"
45694   new_path=`$CYGPATH -u "$path"`
45695 
45696   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45697   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45698   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45699   # "foo.exe" is OK but "foo" is an error.
45700   #
45701   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45702   # It is also a way to make sure we got the proper file name for the real test later on.
45703   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45704   if test "x$test_shortpath" = x; then
45705     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45706 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45707     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45708   fi
45709 
45710   # Call helper function which possibly converts this using DOS-style short mode.
45711   # If so, the updated path is stored in $new_path.
45712 
45713   input_path="$new_path"
45714   # Check if we need to convert this using DOS-style short mode. If the path
45715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45716   # take no chances and rewrite it.
45717   # Note: m4 eats our [], so we need to use [ and ] instead.
45718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45719   if test "x$has_forbidden_chars" != x; then
45720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45721     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45722     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45723     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45724       # Going to short mode and back again did indeed matter. Since short mode is
45725       # case insensitive, let's make it lowercase to improve readability.
45726       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45727       # Now convert it back to Unix-stile (cygpath)
45728       input_path=`$CYGPATH -u "$shortmode_path"`
45729       new_path="$input_path"
45730     fi
45731   fi
45732 
45733   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45734   if test "x$test_cygdrive_prefix" = x; then
45735     # As a simple fix, exclude /usr/bin since it's not a real path.
45736     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45737       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45738       # a path prefixed by /cygdrive for fixpath to work.
45739       new_path="$CYGWIN_ROOT_PATH$input_path"
45740     fi
45741   fi
45742 
45743 
45744   if test "x$path" != "x$new_path"; then
45745     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45747 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45748   fi
45749 
45750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45751 
45752   path="$POTENTIAL_FREETYPE_LIB_PATH"
45753   has_colon=`$ECHO $path | $GREP ^.:`
45754   new_path="$path"
45755   if test "x$has_colon" = x; then
45756     # Not in mixed or Windows style, start by that.
45757     new_path=`cmd //c echo $path`
45758   fi
45759 
45760 
45761   input_path="$new_path"
45762   # Check if we need to convert this using DOS-style short mode. If the path
45763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45764   # take no chances and rewrite it.
45765   # Note: m4 eats our [], so we need to use [ and ] instead.
45766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45767   if test "x$has_forbidden_chars" != x; then
45768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45769     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45770   fi
45771 
45772 
45773   windows_path="$new_path"
45774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45775     unix_path=`$CYGPATH -u "$windows_path"`
45776     new_path="$unix_path"
45777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45779     new_path="$unix_path"
45780   fi
45781 
45782   if test "x$path" != "x$new_path"; then
45783     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45784     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45785 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45786   fi
45787 
45788   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45789   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45790 
45791   else
45792     # We're on a unix platform. Hooray! :)
45793     path="$POTENTIAL_FREETYPE_LIB_PATH"
45794     has_space=`$ECHO "$path" | $GREP " "`
45795     if test "x$has_space" != x; then
45796       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45797 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45798       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45799     fi
45800 
45801     # Use eval to expand a potential ~
45802     eval path="$path"
45803     if test ! -f "$path" && test ! -d "$path"; then
45804       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45805     fi
45806 
45807     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45808   fi
45809 
45810 
45811     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45813 $as_echo_n "checking for freetype includes... " >&6; }
45814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45815 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45816     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45818 $as_echo_n "checking for freetype libraries... " >&6; }
45819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45820 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45821   fi
45822 
45823           if test "x$FOUND_FREETYPE" != xyes; then
45824             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45825 
45826   windows_path="$FREETYPE_BASE_DIR"
45827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45828     unix_path=`$CYGPATH -u "$windows_path"`
45829     FREETYPE_BASE_DIR="$unix_path"
45830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45832     FREETYPE_BASE_DIR="$unix_path"
45833   fi
45834 
45835 
45836   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45837   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45838   METHOD="well-known location"
45839 
45840   # Let's start with an optimistic view of the world :-)
45841   FOUND_FREETYPE=yes
45842 
45843   # First look for the canonical freetype main include file ft2build.h.
45844   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45845     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45846     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45847     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45848       # Fail.
45849       FOUND_FREETYPE=no
45850     fi
45851   fi
45852 
45853   if test "x$FOUND_FREETYPE" = xyes; then
45854     # Include file found, let's continue the sanity check.
45855     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45856 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45857 
45858     # Reset to default value
45859     FREETYPE_BASE_NAME=freetype
45860     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45861     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45862       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45863           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45864         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45865         # for the .6 version explicitly.
45866         FREETYPE_BASE_NAME=freetype.6
45867         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45868         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45869 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45870       else
45871         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45872 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45873         FOUND_FREETYPE=no
45874       fi
45875     else
45876       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45877         # On Windows, we will need both .lib and .dll file.
45878         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45879           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45880 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45881           FOUND_FREETYPE=no
45882         fi
45883       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45884           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45885         # Found lib in isa dir, use that instead.
45886         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45887         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45888 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45889       fi
45890     fi
45891   fi
45892 
45893   if test "x$FOUND_FREETYPE" = xyes; then
45894 
45895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45896 
45897   # Input might be given as Windows format, start by converting to
45898   # unix format.
45899   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45900   new_path=`$CYGPATH -u "$path"`
45901 
45902   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45903   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45904   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45905   # "foo.exe" is OK but "foo" is an error.
45906   #
45907   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45908   # It is also a way to make sure we got the proper file name for the real test later on.
45909   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45910   if test "x$test_shortpath" = x; then
45911     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45912 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45913     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45914   fi
45915 
45916   # Call helper function which possibly converts this using DOS-style short mode.
45917   # If so, the updated path is stored in $new_path.
45918 
45919   input_path="$new_path"
45920   # Check if we need to convert this using DOS-style short mode. If the path
45921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45922   # take no chances and rewrite it.
45923   # Note: m4 eats our [], so we need to use [ and ] instead.
45924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45925   if test "x$has_forbidden_chars" != x; then
45926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45927     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45928     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45929     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45930       # Going to short mode and back again did indeed matter. Since short mode is
45931       # case insensitive, let's make it lowercase to improve readability.
45932       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45933       # Now convert it back to Unix-stile (cygpath)
45934       input_path=`$CYGPATH -u "$shortmode_path"`
45935       new_path="$input_path"
45936     fi
45937   fi
45938 
45939   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45940   if test "x$test_cygdrive_prefix" = x; then
45941     # As a simple fix, exclude /usr/bin since it's not a real path.
45942     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45943       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45944       # a path prefixed by /cygdrive for fixpath to work.
45945       new_path="$CYGWIN_ROOT_PATH$input_path"
45946     fi
45947   fi
45948 
45949 
45950   if test "x$path" != "x$new_path"; then
45951     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45952     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45953 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45954   fi
45955 
45956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45957 
45958   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45959   has_colon=`$ECHO $path | $GREP ^.:`
45960   new_path="$path"
45961   if test "x$has_colon" = x; then
45962     # Not in mixed or Windows style, start by that.
45963     new_path=`cmd //c echo $path`
45964   fi
45965 
45966 
45967   input_path="$new_path"
45968   # Check if we need to convert this using DOS-style short mode. If the path
45969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45970   # take no chances and rewrite it.
45971   # Note: m4 eats our [], so we need to use [ and ] instead.
45972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45973   if test "x$has_forbidden_chars" != x; then
45974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45975     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45976   fi
45977 
45978 
45979   windows_path="$new_path"
45980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45981     unix_path=`$CYGPATH -u "$windows_path"`
45982     new_path="$unix_path"
45983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45985     new_path="$unix_path"
45986   fi
45987 
45988   if test "x$path" != "x$new_path"; then
45989     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45990     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45991 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45992   fi
45993 
45994   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45995   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45996 
45997   else
45998     # We're on a unix platform. Hooray! :)
45999     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46000     has_space=`$ECHO "$path" | $GREP " "`
46001     if test "x$has_space" != x; then
46002       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46003 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46004       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46005     fi
46006 
46007     # Use eval to expand a potential ~
46008     eval path="$path"
46009     if test ! -f "$path" && test ! -d "$path"; then
46010       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46011     fi
46012 
46013     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46014   fi
46015 
46016 
46017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46018 
46019   # Input might be given as Windows format, start by converting to
46020   # unix format.
46021   path="$POTENTIAL_FREETYPE_LIB_PATH"
46022   new_path=`$CYGPATH -u "$path"`
46023 
46024   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46025   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46026   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46027   # "foo.exe" is OK but "foo" is an error.
46028   #
46029   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46030   # It is also a way to make sure we got the proper file name for the real test later on.
46031   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46032   if test "x$test_shortpath" = x; then
46033     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46034 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46035     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46036   fi
46037 
46038   # Call helper function which possibly converts this using DOS-style short mode.
46039   # If so, the updated path is stored in $new_path.
46040 
46041   input_path="$new_path"
46042   # Check if we need to convert this using DOS-style short mode. If the path
46043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46044   # take no chances and rewrite it.
46045   # Note: m4 eats our [], so we need to use [ and ] instead.
46046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46047   if test "x$has_forbidden_chars" != x; then
46048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46049     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46050     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46051     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46052       # Going to short mode and back again did indeed matter. Since short mode is
46053       # case insensitive, let's make it lowercase to improve readability.
46054       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46055       # Now convert it back to Unix-stile (cygpath)
46056       input_path=`$CYGPATH -u "$shortmode_path"`
46057       new_path="$input_path"
46058     fi
46059   fi
46060 
46061   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46062   if test "x$test_cygdrive_prefix" = x; then
46063     # As a simple fix, exclude /usr/bin since it's not a real path.
46064     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46065       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46066       # a path prefixed by /cygdrive for fixpath to work.
46067       new_path="$CYGWIN_ROOT_PATH$input_path"
46068     fi
46069   fi
46070 
46071 
46072   if test "x$path" != "x$new_path"; then
46073     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46075 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46076   fi
46077 
46078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46079 
46080   path="$POTENTIAL_FREETYPE_LIB_PATH"
46081   has_colon=`$ECHO $path | $GREP ^.:`
46082   new_path="$path"
46083   if test "x$has_colon" = x; then
46084     # Not in mixed or Windows style, start by that.
46085     new_path=`cmd //c echo $path`
46086   fi
46087 
46088 
46089   input_path="$new_path"
46090   # Check if we need to convert this using DOS-style short mode. If the path
46091   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46092   # take no chances and rewrite it.
46093   # Note: m4 eats our [], so we need to use [ and ] instead.
46094   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46095   if test "x$has_forbidden_chars" != x; then
46096     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46097     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46098   fi
46099 
46100 
46101   windows_path="$new_path"
46102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46103     unix_path=`$CYGPATH -u "$windows_path"`
46104     new_path="$unix_path"
46105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46107     new_path="$unix_path"
46108   fi
46109 
46110   if test "x$path" != "x$new_path"; then
46111     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46113 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46114   fi
46115 
46116   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46117   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46118 
46119   else
46120     # We're on a unix platform. Hooray! :)
46121     path="$POTENTIAL_FREETYPE_LIB_PATH"
46122     has_space=`$ECHO "$path" | $GREP " "`
46123     if test "x$has_space" != x; then
46124       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46125 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46126       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46127     fi
46128 
46129     # Use eval to expand a potential ~
46130     eval path="$path"
46131     if test ! -f "$path" && test ! -d "$path"; then
46132       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46133     fi
46134 
46135     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46136   fi
46137 
46138 
46139     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46140     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46141 $as_echo_n "checking for freetype includes... " >&6; }
46142     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46143 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46144     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46146 $as_echo_n "checking for freetype libraries... " >&6; }
46147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46148 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46149   fi
46150 
46151           fi
46152         else
46153           FREETYPE_BASE_DIR="$SYSROOT/usr"
46154 
46155   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46156   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46157   METHOD="well-known location"
46158 
46159   # Let's start with an optimistic view of the world :-)
46160   FOUND_FREETYPE=yes
46161 
46162   # First look for the canonical freetype main include file ft2build.h.
46163   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46164     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46165     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46166     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46167       # Fail.
46168       FOUND_FREETYPE=no
46169     fi
46170   fi
46171 
46172   if test "x$FOUND_FREETYPE" = xyes; then
46173     # Include file found, let's continue the sanity check.
46174     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46175 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46176 
46177     # Reset to default value
46178     FREETYPE_BASE_NAME=freetype
46179     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46180     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46181       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46182           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46183         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46184         # for the .6 version explicitly.
46185         FREETYPE_BASE_NAME=freetype.6
46186         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46187         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46188 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46189       else
46190         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46191 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46192         FOUND_FREETYPE=no
46193       fi
46194     else
46195       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46196         # On Windows, we will need both .lib and .dll file.
46197         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46198           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46199 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46200           FOUND_FREETYPE=no
46201         fi
46202       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46203           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46204         # Found lib in isa dir, use that instead.
46205         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46206         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46207 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46208       fi
46209     fi
46210   fi
46211 
46212   if test "x$FOUND_FREETYPE" = xyes; then
46213 
46214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46215 
46216   # Input might be given as Windows format, start by converting to
46217   # unix format.
46218   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46219   new_path=`$CYGPATH -u "$path"`
46220 
46221   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46222   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46223   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46224   # "foo.exe" is OK but "foo" is an error.
46225   #
46226   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46227   # It is also a way to make sure we got the proper file name for the real test later on.
46228   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46229   if test "x$test_shortpath" = x; then
46230     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46231 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46232     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46233   fi
46234 
46235   # Call helper function which possibly converts this using DOS-style short mode.
46236   # If so, the updated path is stored in $new_path.
46237 
46238   input_path="$new_path"
46239   # Check if we need to convert this using DOS-style short mode. If the path
46240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46241   # take no chances and rewrite it.
46242   # Note: m4 eats our [], so we need to use [ and ] instead.
46243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46244   if test "x$has_forbidden_chars" != x; then
46245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46249       # Going to short mode and back again did indeed matter. Since short mode is
46250       # case insensitive, let's make it lowercase to improve readability.
46251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46252       # Now convert it back to Unix-stile (cygpath)
46253       input_path=`$CYGPATH -u "$shortmode_path"`
46254       new_path="$input_path"
46255     fi
46256   fi
46257 
46258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46259   if test "x$test_cygdrive_prefix" = x; then
46260     # As a simple fix, exclude /usr/bin since it's not a real path.
46261     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46263       # a path prefixed by /cygdrive for fixpath to work.
46264       new_path="$CYGWIN_ROOT_PATH$input_path"
46265     fi
46266   fi
46267 
46268 
46269   if test "x$path" != "x$new_path"; then
46270     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46272 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46273   fi
46274 
46275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46276 
46277   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46278   has_colon=`$ECHO $path | $GREP ^.:`
46279   new_path="$path"
46280   if test "x$has_colon" = x; then
46281     # Not in mixed or Windows style, start by that.
46282     new_path=`cmd //c echo $path`
46283   fi
46284 
46285 
46286   input_path="$new_path"
46287   # Check if we need to convert this using DOS-style short mode. If the path
46288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46289   # take no chances and rewrite it.
46290   # Note: m4 eats our [], so we need to use [ and ] instead.
46291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46292   if test "x$has_forbidden_chars" != x; then
46293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46294     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46295   fi
46296 
46297 
46298   windows_path="$new_path"
46299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46300     unix_path=`$CYGPATH -u "$windows_path"`
46301     new_path="$unix_path"
46302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46304     new_path="$unix_path"
46305   fi
46306 
46307   if test "x$path" != "x$new_path"; then
46308     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46310 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46311   fi
46312 
46313   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46314   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46315 
46316   else
46317     # We're on a unix platform. Hooray! :)
46318     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46319     has_space=`$ECHO "$path" | $GREP " "`
46320     if test "x$has_space" != x; then
46321       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46322 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46323       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46324     fi
46325 
46326     # Use eval to expand a potential ~
46327     eval path="$path"
46328     if test ! -f "$path" && test ! -d "$path"; then
46329       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46330     fi
46331 
46332     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46333   fi
46334 
46335 
46336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46337 
46338   # Input might be given as Windows format, start by converting to
46339   # unix format.
46340   path="$POTENTIAL_FREETYPE_LIB_PATH"
46341   new_path=`$CYGPATH -u "$path"`
46342 
46343   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46344   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46345   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46346   # "foo.exe" is OK but "foo" is an error.
46347   #
46348   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46349   # It is also a way to make sure we got the proper file name for the real test later on.
46350   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46351   if test "x$test_shortpath" = x; then
46352     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46353 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46354     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46355   fi
46356 
46357   # Call helper function which possibly converts this using DOS-style short mode.
46358   # If so, the updated path is stored in $new_path.
46359 
46360   input_path="$new_path"
46361   # Check if we need to convert this using DOS-style short mode. If the path
46362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46363   # take no chances and rewrite it.
46364   # Note: m4 eats our [], so we need to use [ and ] instead.
46365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46366   if test "x$has_forbidden_chars" != x; then
46367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46371       # Going to short mode and back again did indeed matter. Since short mode is
46372       # case insensitive, let's make it lowercase to improve readability.
46373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46374       # Now convert it back to Unix-stile (cygpath)
46375       input_path=`$CYGPATH -u "$shortmode_path"`
46376       new_path="$input_path"
46377     fi
46378   fi
46379 
46380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46381   if test "x$test_cygdrive_prefix" = x; then
46382     # As a simple fix, exclude /usr/bin since it's not a real path.
46383     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46385       # a path prefixed by /cygdrive for fixpath to work.
46386       new_path="$CYGWIN_ROOT_PATH$input_path"
46387     fi
46388   fi
46389 
46390 
46391   if test "x$path" != "x$new_path"; then
46392     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46394 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46395   fi
46396 
46397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46398 
46399   path="$POTENTIAL_FREETYPE_LIB_PATH"
46400   has_colon=`$ECHO $path | $GREP ^.:`
46401   new_path="$path"
46402   if test "x$has_colon" = x; then
46403     # Not in mixed or Windows style, start by that.
46404     new_path=`cmd //c echo $path`
46405   fi
46406 
46407 
46408   input_path="$new_path"
46409   # Check if we need to convert this using DOS-style short mode. If the path
46410   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46411   # take no chances and rewrite it.
46412   # Note: m4 eats our [], so we need to use [ and ] instead.
46413   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46414   if test "x$has_forbidden_chars" != x; then
46415     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46416     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46417   fi
46418 
46419 
46420   windows_path="$new_path"
46421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46422     unix_path=`$CYGPATH -u "$windows_path"`
46423     new_path="$unix_path"
46424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46426     new_path="$unix_path"
46427   fi
46428 
46429   if test "x$path" != "x$new_path"; then
46430     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46431     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46432 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46433   fi
46434 
46435   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46436   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46437 
46438   else
46439     # We're on a unix platform. Hooray! :)
46440     path="$POTENTIAL_FREETYPE_LIB_PATH"
46441     has_space=`$ECHO "$path" | $GREP " "`
46442     if test "x$has_space" != x; then
46443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46444 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46445       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46446     fi
46447 
46448     # Use eval to expand a potential ~
46449     eval path="$path"
46450     if test ! -f "$path" && test ! -d "$path"; then
46451       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46452     fi
46453 
46454     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46455   fi
46456 
46457 
46458     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46460 $as_echo_n "checking for freetype includes... " >&6; }
46461     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46462 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46463     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46464     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46465 $as_echo_n "checking for freetype libraries... " >&6; }
46466     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46467 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46468   fi
46469 
46470 
46471           if test "x$FOUND_FREETYPE" != xyes; then
46472             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46473 
46474   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46475   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46476   METHOD="well-known location"
46477 
46478   # Let's start with an optimistic view of the world :-)
46479   FOUND_FREETYPE=yes
46480 
46481   # First look for the canonical freetype main include file ft2build.h.
46482   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46483     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46484     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46485     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46486       # Fail.
46487       FOUND_FREETYPE=no
46488     fi
46489   fi
46490 
46491   if test "x$FOUND_FREETYPE" = xyes; then
46492     # Include file found, let's continue the sanity check.
46493     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46494 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46495 
46496     # Reset to default value
46497     FREETYPE_BASE_NAME=freetype
46498     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46499     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46500       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46501           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46502         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46503         # for the .6 version explicitly.
46504         FREETYPE_BASE_NAME=freetype.6
46505         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46506         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46507 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46508       else
46509         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46510 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46511         FOUND_FREETYPE=no
46512       fi
46513     else
46514       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46515         # On Windows, we will need both .lib and .dll file.
46516         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46517           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46518 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46519           FOUND_FREETYPE=no
46520         fi
46521       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46522           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46523         # Found lib in isa dir, use that instead.
46524         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46525         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46526 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46527       fi
46528     fi
46529   fi
46530 
46531   if test "x$FOUND_FREETYPE" = xyes; then
46532 
46533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46534 
46535   # Input might be given as Windows format, start by converting to
46536   # unix format.
46537   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46538   new_path=`$CYGPATH -u "$path"`
46539 
46540   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46541   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46542   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46543   # "foo.exe" is OK but "foo" is an error.
46544   #
46545   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46546   # It is also a way to make sure we got the proper file name for the real test later on.
46547   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46548   if test "x$test_shortpath" = x; then
46549     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46550 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46551     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46552   fi
46553 
46554   # Call helper function which possibly converts this using DOS-style short mode.
46555   # If so, the updated path is stored in $new_path.
46556 
46557   input_path="$new_path"
46558   # Check if we need to convert this using DOS-style short mode. If the path
46559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46560   # take no chances and rewrite it.
46561   # Note: m4 eats our [], so we need to use [ and ] instead.
46562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46563   if test "x$has_forbidden_chars" != x; then
46564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46568       # Going to short mode and back again did indeed matter. Since short mode is
46569       # case insensitive, let's make it lowercase to improve readability.
46570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46571       # Now convert it back to Unix-stile (cygpath)
46572       input_path=`$CYGPATH -u "$shortmode_path"`
46573       new_path="$input_path"
46574     fi
46575   fi
46576 
46577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46578   if test "x$test_cygdrive_prefix" = x; then
46579     # As a simple fix, exclude /usr/bin since it's not a real path.
46580     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46582       # a path prefixed by /cygdrive for fixpath to work.
46583       new_path="$CYGWIN_ROOT_PATH$input_path"
46584     fi
46585   fi
46586 
46587 
46588   if test "x$path" != "x$new_path"; then
46589     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46591 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46592   fi
46593 
46594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46595 
46596   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46597   has_colon=`$ECHO $path | $GREP ^.:`
46598   new_path="$path"
46599   if test "x$has_colon" = x; then
46600     # Not in mixed or Windows style, start by that.
46601     new_path=`cmd //c echo $path`
46602   fi
46603 
46604 
46605   input_path="$new_path"
46606   # Check if we need to convert this using DOS-style short mode. If the path
46607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46608   # take no chances and rewrite it.
46609   # Note: m4 eats our [], so we need to use [ and ] instead.
46610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46611   if test "x$has_forbidden_chars" != x; then
46612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46613     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46614   fi
46615 
46616 
46617   windows_path="$new_path"
46618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46619     unix_path=`$CYGPATH -u "$windows_path"`
46620     new_path="$unix_path"
46621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46623     new_path="$unix_path"
46624   fi
46625 
46626   if test "x$path" != "x$new_path"; then
46627     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46629 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46630   fi
46631 
46632   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46633   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46634 
46635   else
46636     # We're on a unix platform. Hooray! :)
46637     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46638     has_space=`$ECHO "$path" | $GREP " "`
46639     if test "x$has_space" != x; then
46640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46641 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46642       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46643     fi
46644 
46645     # Use eval to expand a potential ~
46646     eval path="$path"
46647     if test ! -f "$path" && test ! -d "$path"; then
46648       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46649     fi
46650 
46651     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46652   fi
46653 
46654 
46655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46656 
46657   # Input might be given as Windows format, start by converting to
46658   # unix format.
46659   path="$POTENTIAL_FREETYPE_LIB_PATH"
46660   new_path=`$CYGPATH -u "$path"`
46661 
46662   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46663   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46664   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46665   # "foo.exe" is OK but "foo" is an error.
46666   #
46667   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46668   # It is also a way to make sure we got the proper file name for the real test later on.
46669   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46670   if test "x$test_shortpath" = x; then
46671     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46672 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46673     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46674   fi
46675 
46676   # Call helper function which possibly converts this using DOS-style short mode.
46677   # If so, the updated path is stored in $new_path.
46678 
46679   input_path="$new_path"
46680   # Check if we need to convert this using DOS-style short mode. If the path
46681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46682   # take no chances and rewrite it.
46683   # Note: m4 eats our [], so we need to use [ and ] instead.
46684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46685   if test "x$has_forbidden_chars" != x; then
46686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46690       # Going to short mode and back again did indeed matter. Since short mode is
46691       # case insensitive, let's make it lowercase to improve readability.
46692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46693       # Now convert it back to Unix-stile (cygpath)
46694       input_path=`$CYGPATH -u "$shortmode_path"`
46695       new_path="$input_path"
46696     fi
46697   fi
46698 
46699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46700   if test "x$test_cygdrive_prefix" = x; then
46701     # As a simple fix, exclude /usr/bin since it's not a real path.
46702     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46704       # a path prefixed by /cygdrive for fixpath to work.
46705       new_path="$CYGWIN_ROOT_PATH$input_path"
46706     fi
46707   fi
46708 
46709 
46710   if test "x$path" != "x$new_path"; then
46711     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46713 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46714   fi
46715 
46716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46717 
46718   path="$POTENTIAL_FREETYPE_LIB_PATH"
46719   has_colon=`$ECHO $path | $GREP ^.:`
46720   new_path="$path"
46721   if test "x$has_colon" = x; then
46722     # Not in mixed or Windows style, start by that.
46723     new_path=`cmd //c echo $path`
46724   fi
46725 
46726 
46727   input_path="$new_path"
46728   # Check if we need to convert this using DOS-style short mode. If the path
46729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46730   # take no chances and rewrite it.
46731   # Note: m4 eats our [], so we need to use [ and ] instead.
46732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46733   if test "x$has_forbidden_chars" != x; then
46734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46735     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46736   fi
46737 
46738 
46739   windows_path="$new_path"
46740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46741     unix_path=`$CYGPATH -u "$windows_path"`
46742     new_path="$unix_path"
46743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46745     new_path="$unix_path"
46746   fi
46747 
46748   if test "x$path" != "x$new_path"; then
46749     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46751 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46752   fi
46753 
46754   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46755   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46756 
46757   else
46758     # We're on a unix platform. Hooray! :)
46759     path="$POTENTIAL_FREETYPE_LIB_PATH"
46760     has_space=`$ECHO "$path" | $GREP " "`
46761     if test "x$has_space" != x; then
46762       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46763 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46764       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46765     fi
46766 
46767     # Use eval to expand a potential ~
46768     eval path="$path"
46769     if test ! -f "$path" && test ! -d "$path"; then
46770       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46771     fi
46772 
46773     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46774   fi
46775 
46776 
46777     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46778     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46779 $as_echo_n "checking for freetype includes... " >&6; }
46780     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46781 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46782     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46783     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46784 $as_echo_n "checking for freetype libraries... " >&6; }
46785     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46786 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46787   fi
46788 
46789           fi
46790 
46791           if test "x$FOUND_FREETYPE" != xyes; then
46792             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46793 
46794   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46795   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46796   METHOD="well-known location"
46797 
46798   # Let's start with an optimistic view of the world :-)
46799   FOUND_FREETYPE=yes
46800 
46801   # First look for the canonical freetype main include file ft2build.h.
46802   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46803     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46804     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46805     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46806       # Fail.
46807       FOUND_FREETYPE=no
46808     fi
46809   fi
46810 
46811   if test "x$FOUND_FREETYPE" = xyes; then
46812     # Include file found, let's continue the sanity check.
46813     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46814 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46815 
46816     # Reset to default value
46817     FREETYPE_BASE_NAME=freetype
46818     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46819     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46820       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46821           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46822         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46823         # for the .6 version explicitly.
46824         FREETYPE_BASE_NAME=freetype.6
46825         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46826         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46827 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46828       else
46829         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46830 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46831         FOUND_FREETYPE=no
46832       fi
46833     else
46834       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46835         # On Windows, we will need both .lib and .dll file.
46836         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46837           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46838 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46839           FOUND_FREETYPE=no
46840         fi
46841       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46842           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46843         # Found lib in isa dir, use that instead.
46844         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46845         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46846 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46847       fi
46848     fi
46849   fi
46850 
46851   if test "x$FOUND_FREETYPE" = xyes; then
46852 
46853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46854 
46855   # Input might be given as Windows format, start by converting to
46856   # unix format.
46857   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46858   new_path=`$CYGPATH -u "$path"`
46859 
46860   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46861   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46862   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46863   # "foo.exe" is OK but "foo" is an error.
46864   #
46865   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46866   # It is also a way to make sure we got the proper file name for the real test later on.
46867   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46868   if test "x$test_shortpath" = x; then
46869     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46870 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46871     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46872   fi
46873 
46874   # Call helper function which possibly converts this using DOS-style short mode.
46875   # If so, the updated path is stored in $new_path.
46876 
46877   input_path="$new_path"
46878   # Check if we need to convert this using DOS-style short mode. If the path
46879   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46880   # take no chances and rewrite it.
46881   # Note: m4 eats our [], so we need to use [ and ] instead.
46882   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46883   if test "x$has_forbidden_chars" != x; then
46884     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46885     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46886     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46887     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46888       # Going to short mode and back again did indeed matter. Since short mode is
46889       # case insensitive, let's make it lowercase to improve readability.
46890       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46891       # Now convert it back to Unix-stile (cygpath)
46892       input_path=`$CYGPATH -u "$shortmode_path"`
46893       new_path="$input_path"
46894     fi
46895   fi
46896 
46897   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46898   if test "x$test_cygdrive_prefix" = x; then
46899     # As a simple fix, exclude /usr/bin since it's not a real path.
46900     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46901       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46902       # a path prefixed by /cygdrive for fixpath to work.
46903       new_path="$CYGWIN_ROOT_PATH$input_path"
46904     fi
46905   fi
46906 
46907 
46908   if test "x$path" != "x$new_path"; then
46909     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46910     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46911 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46912   fi
46913 
46914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46915 
46916   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46917   has_colon=`$ECHO $path | $GREP ^.:`
46918   new_path="$path"
46919   if test "x$has_colon" = x; then
46920     # Not in mixed or Windows style, start by that.
46921     new_path=`cmd //c echo $path`
46922   fi
46923 
46924 
46925   input_path="$new_path"
46926   # Check if we need to convert this using DOS-style short mode. If the path
46927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46928   # take no chances and rewrite it.
46929   # Note: m4 eats our [], so we need to use [ and ] instead.
46930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46931   if test "x$has_forbidden_chars" != x; then
46932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46933     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46934   fi
46935 
46936 
46937   windows_path="$new_path"
46938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46939     unix_path=`$CYGPATH -u "$windows_path"`
46940     new_path="$unix_path"
46941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46943     new_path="$unix_path"
46944   fi
46945 
46946   if test "x$path" != "x$new_path"; then
46947     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46948     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46949 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46950   fi
46951 
46952   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46953   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46954 
46955   else
46956     # We're on a unix platform. Hooray! :)
46957     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46958     has_space=`$ECHO "$path" | $GREP " "`
46959     if test "x$has_space" != x; then
46960       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46961 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46962       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46963     fi
46964 
46965     # Use eval to expand a potential ~
46966     eval path="$path"
46967     if test ! -f "$path" && test ! -d "$path"; then
46968       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46969     fi
46970 
46971     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46972   fi
46973 
46974 
46975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46976 
46977   # Input might be given as Windows format, start by converting to
46978   # unix format.
46979   path="$POTENTIAL_FREETYPE_LIB_PATH"
46980   new_path=`$CYGPATH -u "$path"`
46981 
46982   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46983   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46984   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46985   # "foo.exe" is OK but "foo" is an error.
46986   #
46987   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46988   # It is also a way to make sure we got the proper file name for the real test later on.
46989   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46990   if test "x$test_shortpath" = x; then
46991     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46992 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46993     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46994   fi
46995 
46996   # Call helper function which possibly converts this using DOS-style short mode.
46997   # If so, the updated path is stored in $new_path.
46998 
46999   input_path="$new_path"
47000   # Check if we need to convert this using DOS-style short mode. If the path
47001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47002   # take no chances and rewrite it.
47003   # Note: m4 eats our [], so we need to use [ and ] instead.
47004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47005   if test "x$has_forbidden_chars" != x; then
47006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47007     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47008     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47009     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47010       # Going to short mode and back again did indeed matter. Since short mode is
47011       # case insensitive, let's make it lowercase to improve readability.
47012       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47013       # Now convert it back to Unix-stile (cygpath)
47014       input_path=`$CYGPATH -u "$shortmode_path"`
47015       new_path="$input_path"
47016     fi
47017   fi
47018 
47019   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47020   if test "x$test_cygdrive_prefix" = x; then
47021     # As a simple fix, exclude /usr/bin since it's not a real path.
47022     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47023       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47024       # a path prefixed by /cygdrive for fixpath to work.
47025       new_path="$CYGWIN_ROOT_PATH$input_path"
47026     fi
47027   fi
47028 
47029 
47030   if test "x$path" != "x$new_path"; then
47031     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47032     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47033 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47034   fi
47035 
47036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47037 
47038   path="$POTENTIAL_FREETYPE_LIB_PATH"
47039   has_colon=`$ECHO $path | $GREP ^.:`
47040   new_path="$path"
47041   if test "x$has_colon" = x; then
47042     # Not in mixed or Windows style, start by that.
47043     new_path=`cmd //c echo $path`
47044   fi
47045 
47046 
47047   input_path="$new_path"
47048   # Check if we need to convert this using DOS-style short mode. If the path
47049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47050   # take no chances and rewrite it.
47051   # Note: m4 eats our [], so we need to use [ and ] instead.
47052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47053   if test "x$has_forbidden_chars" != x; then
47054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47055     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47056   fi
47057 
47058 
47059   windows_path="$new_path"
47060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47061     unix_path=`$CYGPATH -u "$windows_path"`
47062     new_path="$unix_path"
47063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47065     new_path="$unix_path"
47066   fi
47067 
47068   if test "x$path" != "x$new_path"; then
47069     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47070     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47071 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47072   fi
47073 
47074   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47075   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47076 
47077   else
47078     # We're on a unix platform. Hooray! :)
47079     path="$POTENTIAL_FREETYPE_LIB_PATH"
47080     has_space=`$ECHO "$path" | $GREP " "`
47081     if test "x$has_space" != x; then
47082       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47083 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47084       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47085     fi
47086 
47087     # Use eval to expand a potential ~
47088     eval path="$path"
47089     if test ! -f "$path" && test ! -d "$path"; then
47090       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47091     fi
47092 
47093     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47094   fi
47095 
47096 
47097     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47098     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47099 $as_echo_n "checking for freetype includes... " >&6; }
47100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47101 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47102     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47103     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47104 $as_echo_n "checking for freetype libraries... " >&6; }
47105     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47106 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47107   fi
47108 
47109           fi
47110 
47111           if test "x$FOUND_FREETYPE" != xyes; then
47112             FREETYPE_BASE_DIR="$SYSROOT/usr"
47113             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47114 
47115   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47116   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47117   METHOD="well-known location"
47118 
47119   # Let's start with an optimistic view of the world :-)
47120   FOUND_FREETYPE=yes
47121 
47122   # First look for the canonical freetype main include file ft2build.h.
47123   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47124     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47125     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47126     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47127       # Fail.
47128       FOUND_FREETYPE=no
47129     fi
47130   fi
47131 
47132   if test "x$FOUND_FREETYPE" = xyes; then
47133     # Include file found, let's continue the sanity check.
47134     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47135 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47136 
47137     # Reset to default value
47138     FREETYPE_BASE_NAME=freetype
47139     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47140     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47141       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47142           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47143         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47144         # for the .6 version explicitly.
47145         FREETYPE_BASE_NAME=freetype.6
47146         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47147         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47148 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47149       else
47150         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47151 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47152         FOUND_FREETYPE=no
47153       fi
47154     else
47155       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47156         # On Windows, we will need both .lib and .dll file.
47157         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47158           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47159 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47160           FOUND_FREETYPE=no
47161         fi
47162       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47163           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47164         # Found lib in isa dir, use that instead.
47165         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47166         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47167 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47168       fi
47169     fi
47170   fi
47171 
47172   if test "x$FOUND_FREETYPE" = xyes; then
47173 
47174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47175 
47176   # Input might be given as Windows format, start by converting to
47177   # unix format.
47178   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47179   new_path=`$CYGPATH -u "$path"`
47180 
47181   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47182   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47183   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47184   # "foo.exe" is OK but "foo" is an error.
47185   #
47186   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47187   # It is also a way to make sure we got the proper file name for the real test later on.
47188   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47189   if test "x$test_shortpath" = x; then
47190     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47191 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47192     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47193   fi
47194 
47195   # Call helper function which possibly converts this using DOS-style short mode.
47196   # If so, the updated path is stored in $new_path.
47197 
47198   input_path="$new_path"
47199   # Check if we need to convert this using DOS-style short mode. If the path
47200   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47201   # take no chances and rewrite it.
47202   # Note: m4 eats our [], so we need to use [ and ] instead.
47203   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47204   if test "x$has_forbidden_chars" != x; then
47205     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47206     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47207     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47208     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47209       # Going to short mode and back again did indeed matter. Since short mode is
47210       # case insensitive, let's make it lowercase to improve readability.
47211       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47212       # Now convert it back to Unix-stile (cygpath)
47213       input_path=`$CYGPATH -u "$shortmode_path"`
47214       new_path="$input_path"
47215     fi
47216   fi
47217 
47218   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47219   if test "x$test_cygdrive_prefix" = x; then
47220     # As a simple fix, exclude /usr/bin since it's not a real path.
47221     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47222       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47223       # a path prefixed by /cygdrive for fixpath to work.
47224       new_path="$CYGWIN_ROOT_PATH$input_path"
47225     fi
47226   fi
47227 
47228 
47229   if test "x$path" != "x$new_path"; then
47230     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47231     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47232 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47233   fi
47234 
47235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47236 
47237   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47238   has_colon=`$ECHO $path | $GREP ^.:`
47239   new_path="$path"
47240   if test "x$has_colon" = x; then
47241     # Not in mixed or Windows style, start by that.
47242     new_path=`cmd //c echo $path`
47243   fi
47244 
47245 
47246   input_path="$new_path"
47247   # Check if we need to convert this using DOS-style short mode. If the path
47248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47249   # take no chances and rewrite it.
47250   # Note: m4 eats our [], so we need to use [ and ] instead.
47251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47252   if test "x$has_forbidden_chars" != x; then
47253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47254     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47255   fi
47256 
47257 
47258   windows_path="$new_path"
47259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47260     unix_path=`$CYGPATH -u "$windows_path"`
47261     new_path="$unix_path"
47262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47263     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47264     new_path="$unix_path"
47265   fi
47266 
47267   if test "x$path" != "x$new_path"; then
47268     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47270 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47271   fi
47272 
47273   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47274   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47275 
47276   else
47277     # We're on a unix platform. Hooray! :)
47278     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47279     has_space=`$ECHO "$path" | $GREP " "`
47280     if test "x$has_space" != x; then
47281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47282 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47283       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47284     fi
47285 
47286     # Use eval to expand a potential ~
47287     eval path="$path"
47288     if test ! -f "$path" && test ! -d "$path"; then
47289       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47290     fi
47291 
47292     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47293   fi
47294 
47295 
47296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47297 
47298   # Input might be given as Windows format, start by converting to
47299   # unix format.
47300   path="$POTENTIAL_FREETYPE_LIB_PATH"
47301   new_path=`$CYGPATH -u "$path"`
47302 
47303   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47304   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47305   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47306   # "foo.exe" is OK but "foo" is an error.
47307   #
47308   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47309   # It is also a way to make sure we got the proper file name for the real test later on.
47310   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47311   if test "x$test_shortpath" = x; then
47312     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47313 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47314     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47315   fi
47316 
47317   # Call helper function which possibly converts this using DOS-style short mode.
47318   # If so, the updated path is stored in $new_path.
47319 
47320   input_path="$new_path"
47321   # Check if we need to convert this using DOS-style short mode. If the path
47322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47323   # take no chances and rewrite it.
47324   # Note: m4 eats our [], so we need to use [ and ] instead.
47325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47326   if test "x$has_forbidden_chars" != x; then
47327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47328     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47329     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47330     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47331       # Going to short mode and back again did indeed matter. Since short mode is
47332       # case insensitive, let's make it lowercase to improve readability.
47333       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47334       # Now convert it back to Unix-stile (cygpath)
47335       input_path=`$CYGPATH -u "$shortmode_path"`
47336       new_path="$input_path"
47337     fi
47338   fi
47339 
47340   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47341   if test "x$test_cygdrive_prefix" = x; then
47342     # As a simple fix, exclude /usr/bin since it's not a real path.
47343     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47344       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47345       # a path prefixed by /cygdrive for fixpath to work.
47346       new_path="$CYGWIN_ROOT_PATH$input_path"
47347     fi
47348   fi
47349 
47350 
47351   if test "x$path" != "x$new_path"; then
47352     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47353     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47354 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47355   fi
47356 
47357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47358 
47359   path="$POTENTIAL_FREETYPE_LIB_PATH"
47360   has_colon=`$ECHO $path | $GREP ^.:`
47361   new_path="$path"
47362   if test "x$has_colon" = x; then
47363     # Not in mixed or Windows style, start by that.
47364     new_path=`cmd //c echo $path`
47365   fi
47366 
47367 
47368   input_path="$new_path"
47369   # Check if we need to convert this using DOS-style short mode. If the path
47370   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47371   # take no chances and rewrite it.
47372   # Note: m4 eats our [], so we need to use [ and ] instead.
47373   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47374   if test "x$has_forbidden_chars" != x; then
47375     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47376     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47377   fi
47378 
47379 
47380   windows_path="$new_path"
47381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47382     unix_path=`$CYGPATH -u "$windows_path"`
47383     new_path="$unix_path"
47384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47386     new_path="$unix_path"
47387   fi
47388 
47389   if test "x$path" != "x$new_path"; then
47390     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47392 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47393   fi
47394 
47395   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47396   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47397 
47398   else
47399     # We're on a unix platform. Hooray! :)
47400     path="$POTENTIAL_FREETYPE_LIB_PATH"
47401     has_space=`$ECHO "$path" | $GREP " "`
47402     if test "x$has_space" != x; then
47403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47404 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47405       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47406     fi
47407 
47408     # Use eval to expand a potential ~
47409     eval path="$path"
47410     if test ! -f "$path" && test ! -d "$path"; then
47411       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47412     fi
47413 
47414     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47415   fi
47416 
47417 
47418     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47419     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47420 $as_echo_n "checking for freetype includes... " >&6; }
47421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47422 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47423     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47425 $as_echo_n "checking for freetype libraries... " >&6; }
47426     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47427 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47428   fi
47429 
47430             else
47431 
47432   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47433   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47434   METHOD="well-known location"
47435 
47436   # Let's start with an optimistic view of the world :-)
47437   FOUND_FREETYPE=yes
47438 
47439   # First look for the canonical freetype main include file ft2build.h.
47440   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47441     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47442     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47443     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47444       # Fail.
47445       FOUND_FREETYPE=no
47446     fi
47447   fi
47448 
47449   if test "x$FOUND_FREETYPE" = xyes; then
47450     # Include file found, let's continue the sanity check.
47451     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47452 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47453 
47454     # Reset to default value
47455     FREETYPE_BASE_NAME=freetype
47456     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47457     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47458       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47459           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47460         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47461         # for the .6 version explicitly.
47462         FREETYPE_BASE_NAME=freetype.6
47463         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47464         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47465 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47466       else
47467         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47468 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47469         FOUND_FREETYPE=no
47470       fi
47471     else
47472       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47473         # On Windows, we will need both .lib and .dll file.
47474         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47475           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47476 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47477           FOUND_FREETYPE=no
47478         fi
47479       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47480           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47481         # Found lib in isa dir, use that instead.
47482         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47483         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47484 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47485       fi
47486     fi
47487   fi
47488 
47489   if test "x$FOUND_FREETYPE" = xyes; then
47490 
47491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47492 
47493   # Input might be given as Windows format, start by converting to
47494   # unix format.
47495   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47496   new_path=`$CYGPATH -u "$path"`
47497 
47498   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47499   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47500   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47501   # "foo.exe" is OK but "foo" is an error.
47502   #
47503   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47504   # It is also a way to make sure we got the proper file name for the real test later on.
47505   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47506   if test "x$test_shortpath" = x; then
47507     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47508 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47509     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47510   fi
47511 
47512   # Call helper function which possibly converts this using DOS-style short mode.
47513   # If so, the updated path is stored in $new_path.
47514 
47515   input_path="$new_path"
47516   # Check if we need to convert this using DOS-style short mode. If the path
47517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47518   # take no chances and rewrite it.
47519   # Note: m4 eats our [], so we need to use [ and ] instead.
47520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47521   if test "x$has_forbidden_chars" != x; then
47522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47523     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47524     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47525     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47526       # Going to short mode and back again did indeed matter. Since short mode is
47527       # case insensitive, let's make it lowercase to improve readability.
47528       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47529       # Now convert it back to Unix-stile (cygpath)
47530       input_path=`$CYGPATH -u "$shortmode_path"`
47531       new_path="$input_path"
47532     fi
47533   fi
47534 
47535   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47536   if test "x$test_cygdrive_prefix" = x; then
47537     # As a simple fix, exclude /usr/bin since it's not a real path.
47538     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47539       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47540       # a path prefixed by /cygdrive for fixpath to work.
47541       new_path="$CYGWIN_ROOT_PATH$input_path"
47542     fi
47543   fi
47544 
47545 
47546   if test "x$path" != "x$new_path"; then
47547     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47549 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47550   fi
47551 
47552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47553 
47554   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47555   has_colon=`$ECHO $path | $GREP ^.:`
47556   new_path="$path"
47557   if test "x$has_colon" = x; then
47558     # Not in mixed or Windows style, start by that.
47559     new_path=`cmd //c echo $path`
47560   fi
47561 
47562 
47563   input_path="$new_path"
47564   # Check if we need to convert this using DOS-style short mode. If the path
47565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47566   # take no chances and rewrite it.
47567   # Note: m4 eats our [], so we need to use [ and ] instead.
47568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47569   if test "x$has_forbidden_chars" != x; then
47570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47571     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47572   fi
47573 
47574 
47575   windows_path="$new_path"
47576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47577     unix_path=`$CYGPATH -u "$windows_path"`
47578     new_path="$unix_path"
47579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47581     new_path="$unix_path"
47582   fi
47583 
47584   if test "x$path" != "x$new_path"; then
47585     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47587 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47588   fi
47589 
47590   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47591   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47592 
47593   else
47594     # We're on a unix platform. Hooray! :)
47595     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47596     has_space=`$ECHO "$path" | $GREP " "`
47597     if test "x$has_space" != x; then
47598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47599 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47600       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47601     fi
47602 
47603     # Use eval to expand a potential ~
47604     eval path="$path"
47605     if test ! -f "$path" && test ! -d "$path"; then
47606       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47607     fi
47608 
47609     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47610   fi
47611 
47612 
47613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47614 
47615   # Input might be given as Windows format, start by converting to
47616   # unix format.
47617   path="$POTENTIAL_FREETYPE_LIB_PATH"
47618   new_path=`$CYGPATH -u "$path"`
47619 
47620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47623   # "foo.exe" is OK but "foo" is an error.
47624   #
47625   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47626   # It is also a way to make sure we got the proper file name for the real test later on.
47627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47628   if test "x$test_shortpath" = x; then
47629     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47630 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47631     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47632   fi
47633 
47634   # Call helper function which possibly converts this using DOS-style short mode.
47635   # If so, the updated path is stored in $new_path.
47636 
47637   input_path="$new_path"
47638   # Check if we need to convert this using DOS-style short mode. If the path
47639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47640   # take no chances and rewrite it.
47641   # Note: m4 eats our [], so we need to use [ and ] instead.
47642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47643   if test "x$has_forbidden_chars" != x; then
47644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47648       # Going to short mode and back again did indeed matter. Since short mode is
47649       # case insensitive, let's make it lowercase to improve readability.
47650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47651       # Now convert it back to Unix-stile (cygpath)
47652       input_path=`$CYGPATH -u "$shortmode_path"`
47653       new_path="$input_path"
47654     fi
47655   fi
47656 
47657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47658   if test "x$test_cygdrive_prefix" = x; then
47659     # As a simple fix, exclude /usr/bin since it's not a real path.
47660     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47662       # a path prefixed by /cygdrive for fixpath to work.
47663       new_path="$CYGWIN_ROOT_PATH$input_path"
47664     fi
47665   fi
47666 
47667 
47668   if test "x$path" != "x$new_path"; then
47669     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47671 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47672   fi
47673 
47674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47675 
47676   path="$POTENTIAL_FREETYPE_LIB_PATH"
47677   has_colon=`$ECHO $path | $GREP ^.:`
47678   new_path="$path"
47679   if test "x$has_colon" = x; then
47680     # Not in mixed or Windows style, start by that.
47681     new_path=`cmd //c echo $path`
47682   fi
47683 
47684 
47685   input_path="$new_path"
47686   # Check if we need to convert this using DOS-style short mode. If the path
47687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47688   # take no chances and rewrite it.
47689   # Note: m4 eats our [], so we need to use [ and ] instead.
47690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47691   if test "x$has_forbidden_chars" != x; then
47692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47694   fi
47695 
47696 
47697   windows_path="$new_path"
47698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47699     unix_path=`$CYGPATH -u "$windows_path"`
47700     new_path="$unix_path"
47701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47703     new_path="$unix_path"
47704   fi
47705 
47706   if test "x$path" != "x$new_path"; then
47707     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47709 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47710   fi
47711 
47712   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47713   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47714 
47715   else
47716     # We're on a unix platform. Hooray! :)
47717     path="$POTENTIAL_FREETYPE_LIB_PATH"
47718     has_space=`$ECHO "$path" | $GREP " "`
47719     if test "x$has_space" != x; then
47720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47721 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47722       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47723     fi
47724 
47725     # Use eval to expand a potential ~
47726     eval path="$path"
47727     if test ! -f "$path" && test ! -d "$path"; then
47728       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47729     fi
47730 
47731     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47732   fi
47733 
47734 
47735     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47736     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47737 $as_echo_n "checking for freetype includes... " >&6; }
47738     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47739 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47740     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47742 $as_echo_n "checking for freetype libraries... " >&6; }
47743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47744 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47745   fi
47746 
47747               if test "x$FOUND_FREETYPE" != xyes; then
47748 
47749   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47750   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47751   METHOD="well-known location"
47752 
47753   # Let's start with an optimistic view of the world :-)
47754   FOUND_FREETYPE=yes
47755 
47756   # First look for the canonical freetype main include file ft2build.h.
47757   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47758     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47759     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47760     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47761       # Fail.
47762       FOUND_FREETYPE=no
47763     fi
47764   fi
47765 
47766   if test "x$FOUND_FREETYPE" = xyes; then
47767     # Include file found, let's continue the sanity check.
47768     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47769 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47770 
47771     # Reset to default value
47772     FREETYPE_BASE_NAME=freetype
47773     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47774     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47775       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47776           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47777         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47778         # for the .6 version explicitly.
47779         FREETYPE_BASE_NAME=freetype.6
47780         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47781         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47782 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47783       else
47784         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47785 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47786         FOUND_FREETYPE=no
47787       fi
47788     else
47789       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47790         # On Windows, we will need both .lib and .dll file.
47791         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47792           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47793 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47794           FOUND_FREETYPE=no
47795         fi
47796       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47797           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47798         # Found lib in isa dir, use that instead.
47799         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47800         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47801 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47802       fi
47803     fi
47804   fi
47805 
47806   if test "x$FOUND_FREETYPE" = xyes; then
47807 
47808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47809 
47810   # Input might be given as Windows format, start by converting to
47811   # unix format.
47812   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47813   new_path=`$CYGPATH -u "$path"`
47814 
47815   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47816   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47817   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47818   # "foo.exe" is OK but "foo" is an error.
47819   #
47820   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47821   # It is also a way to make sure we got the proper file name for the real test later on.
47822   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47823   if test "x$test_shortpath" = x; then
47824     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47825 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47826     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47827   fi
47828 
47829   # Call helper function which possibly converts this using DOS-style short mode.
47830   # If so, the updated path is stored in $new_path.
47831 
47832   input_path="$new_path"
47833   # Check if we need to convert this using DOS-style short mode. If the path
47834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47835   # take no chances and rewrite it.
47836   # Note: m4 eats our [], so we need to use [ and ] instead.
47837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47838   if test "x$has_forbidden_chars" != x; then
47839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47840     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47841     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47842     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47843       # Going to short mode and back again did indeed matter. Since short mode is
47844       # case insensitive, let's make it lowercase to improve readability.
47845       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47846       # Now convert it back to Unix-stile (cygpath)
47847       input_path=`$CYGPATH -u "$shortmode_path"`
47848       new_path="$input_path"
47849     fi
47850   fi
47851 
47852   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47853   if test "x$test_cygdrive_prefix" = x; then
47854     # As a simple fix, exclude /usr/bin since it's not a real path.
47855     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47856       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47857       # a path prefixed by /cygdrive for fixpath to work.
47858       new_path="$CYGWIN_ROOT_PATH$input_path"
47859     fi
47860   fi
47861 
47862 
47863   if test "x$path" != "x$new_path"; then
47864     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47866 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47867   fi
47868 
47869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47870 
47871   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47872   has_colon=`$ECHO $path | $GREP ^.:`
47873   new_path="$path"
47874   if test "x$has_colon" = x; then
47875     # Not in mixed or Windows style, start by that.
47876     new_path=`cmd //c echo $path`
47877   fi
47878 
47879 
47880   input_path="$new_path"
47881   # Check if we need to convert this using DOS-style short mode. If the path
47882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47883   # take no chances and rewrite it.
47884   # Note: m4 eats our [], so we need to use [ and ] instead.
47885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47886   if test "x$has_forbidden_chars" != x; then
47887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47888     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47889   fi
47890 
47891 
47892   windows_path="$new_path"
47893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47894     unix_path=`$CYGPATH -u "$windows_path"`
47895     new_path="$unix_path"
47896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47898     new_path="$unix_path"
47899   fi
47900 
47901   if test "x$path" != "x$new_path"; then
47902     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47903     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47904 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47905   fi
47906 
47907   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47908   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47909 
47910   else
47911     # We're on a unix platform. Hooray! :)
47912     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47913     has_space=`$ECHO "$path" | $GREP " "`
47914     if test "x$has_space" != x; then
47915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47916 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47917       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47918     fi
47919 
47920     # Use eval to expand a potential ~
47921     eval path="$path"
47922     if test ! -f "$path" && test ! -d "$path"; then
47923       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47924     fi
47925 
47926     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47927   fi
47928 
47929 
47930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47931 
47932   # Input might be given as Windows format, start by converting to
47933   # unix format.
47934   path="$POTENTIAL_FREETYPE_LIB_PATH"
47935   new_path=`$CYGPATH -u "$path"`
47936 
47937   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47938   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47939   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47940   # "foo.exe" is OK but "foo" is an error.
47941   #
47942   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47943   # It is also a way to make sure we got the proper file name for the real test later on.
47944   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47945   if test "x$test_shortpath" = x; then
47946     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47947 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47948     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47949   fi
47950 
47951   # Call helper function which possibly converts this using DOS-style short mode.
47952   # If so, the updated path is stored in $new_path.
47953 
47954   input_path="$new_path"
47955   # Check if we need to convert this using DOS-style short mode. If the path
47956   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47957   # take no chances and rewrite it.
47958   # Note: m4 eats our [], so we need to use [ and ] instead.
47959   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47960   if test "x$has_forbidden_chars" != x; then
47961     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47962     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47963     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47964     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47965       # Going to short mode and back again did indeed matter. Since short mode is
47966       # case insensitive, let's make it lowercase to improve readability.
47967       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47968       # Now convert it back to Unix-stile (cygpath)
47969       input_path=`$CYGPATH -u "$shortmode_path"`
47970       new_path="$input_path"
47971     fi
47972   fi
47973 
47974   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47975   if test "x$test_cygdrive_prefix" = x; then
47976     # As a simple fix, exclude /usr/bin since it's not a real path.
47977     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47978       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47979       # a path prefixed by /cygdrive for fixpath to work.
47980       new_path="$CYGWIN_ROOT_PATH$input_path"
47981     fi
47982   fi
47983 
47984 
47985   if test "x$path" != "x$new_path"; then
47986     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47987     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47988 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47989   fi
47990 
47991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47992 
47993   path="$POTENTIAL_FREETYPE_LIB_PATH"
47994   has_colon=`$ECHO $path | $GREP ^.:`
47995   new_path="$path"
47996   if test "x$has_colon" = x; then
47997     # Not in mixed or Windows style, start by that.
47998     new_path=`cmd //c echo $path`
47999   fi
48000 
48001 
48002   input_path="$new_path"
48003   # Check if we need to convert this using DOS-style short mode. If the path
48004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48005   # take no chances and rewrite it.
48006   # Note: m4 eats our [], so we need to use [ and ] instead.
48007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48008   if test "x$has_forbidden_chars" != x; then
48009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48010     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48011   fi
48012 
48013 
48014   windows_path="$new_path"
48015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48016     unix_path=`$CYGPATH -u "$windows_path"`
48017     new_path="$unix_path"
48018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48020     new_path="$unix_path"
48021   fi
48022 
48023   if test "x$path" != "x$new_path"; then
48024     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48025     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48026 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48027   fi
48028 
48029   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48030   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48031 
48032   else
48033     # We're on a unix platform. Hooray! :)
48034     path="$POTENTIAL_FREETYPE_LIB_PATH"
48035     has_space=`$ECHO "$path" | $GREP " "`
48036     if test "x$has_space" != x; then
48037       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48038 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48039       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48040     fi
48041 
48042     # Use eval to expand a potential ~
48043     eval path="$path"
48044     if test ! -f "$path" && test ! -d "$path"; then
48045       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48046     fi
48047 
48048     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48049   fi
48050 
48051 
48052     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48053     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48054 $as_echo_n "checking for freetype includes... " >&6; }
48055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48056 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48057     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48058     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48059 $as_echo_n "checking for freetype libraries... " >&6; }
48060     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48061 $as_echo "$FREETYPE_LIB_PATH" >&6; }
48062   fi
48063 
48064               fi
48065             fi
48066           fi
48067         fi
48068       fi # end check in well-known locations
48069 
48070       if test "x$FOUND_FREETYPE" != xyes; then
48071 
48072   # Print a helpful message on how to acquire the necessary build dependency.
48073   # freetype is the help tag: freetype, cups, pulse, alsa etc
48074   MISSING_DEPENDENCY=freetype
48075 
48076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48077     cygwin_help $MISSING_DEPENDENCY
48078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48079     msys_help $MISSING_DEPENDENCY
48080   else
48081     PKGHANDLER_COMMAND=
48082 
48083     case $PKGHANDLER in
48084       apt-get)
48085         apt_help     $MISSING_DEPENDENCY ;;
48086       yum)
48087         yum_help     $MISSING_DEPENDENCY ;;
48088       port)
48089         port_help    $MISSING_DEPENDENCY ;;
48090       pkgutil)
48091         pkgutil_help $MISSING_DEPENDENCY ;;
48092       pkgadd)
48093         pkgadd_help  $MISSING_DEPENDENCY ;;
48094     esac
48095 
48096     if test "x$PKGHANDLER_COMMAND" != x; then
48097       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48098     fi
48099   fi
48100 
48101         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48102       fi
48103     fi # end user specified settings
48104 
48105     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48106     if test "x$FREETYPE_CFLAGS" = x; then
48107 
48108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48109 
48110   # Input might be given as Windows format, start by converting to
48111   # unix format.
48112   path="$FREETYPE_INCLUDE_PATH"
48113   new_path=`$CYGPATH -u "$path"`
48114 
48115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48118   # "foo.exe" is OK but "foo" is an error.
48119   #
48120   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48121   # It is also a way to make sure we got the proper file name for the real test later on.
48122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48123   if test "x$test_shortpath" = x; then
48124     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48125 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48126     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48127   fi
48128 
48129   # Call helper function which possibly converts this using DOS-style short mode.
48130   # If so, the updated path is stored in $new_path.
48131 
48132   input_path="$new_path"
48133   # Check if we need to convert this using DOS-style short mode. If the path
48134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48135   # take no chances and rewrite it.
48136   # Note: m4 eats our [], so we need to use [ and ] instead.
48137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48138   if test "x$has_forbidden_chars" != x; then
48139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48143       # Going to short mode and back again did indeed matter. Since short mode is
48144       # case insensitive, let's make it lowercase to improve readability.
48145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48146       # Now convert it back to Unix-stile (cygpath)
48147       input_path=`$CYGPATH -u "$shortmode_path"`
48148       new_path="$input_path"
48149     fi
48150   fi
48151 
48152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48153   if test "x$test_cygdrive_prefix" = x; then
48154     # As a simple fix, exclude /usr/bin since it's not a real path.
48155     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48157       # a path prefixed by /cygdrive for fixpath to work.
48158       new_path="$CYGWIN_ROOT_PATH$input_path"
48159     fi
48160   fi
48161 
48162 
48163   if test "x$path" != "x$new_path"; then
48164     FREETYPE_INCLUDE_PATH="$new_path"
48165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48166 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48167   fi
48168 
48169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48170 
48171   path="$FREETYPE_INCLUDE_PATH"
48172   has_colon=`$ECHO $path | $GREP ^.:`
48173   new_path="$path"
48174   if test "x$has_colon" = x; then
48175     # Not in mixed or Windows style, start by that.
48176     new_path=`cmd //c echo $path`
48177   fi
48178 
48179 
48180   input_path="$new_path"
48181   # Check if we need to convert this using DOS-style short mode. If the path
48182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48183   # take no chances and rewrite it.
48184   # Note: m4 eats our [], so we need to use [ and ] instead.
48185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48186   if test "x$has_forbidden_chars" != x; then
48187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48189   fi
48190 
48191 
48192   windows_path="$new_path"
48193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48194     unix_path=`$CYGPATH -u "$windows_path"`
48195     new_path="$unix_path"
48196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48198     new_path="$unix_path"
48199   fi
48200 
48201   if test "x$path" != "x$new_path"; then
48202     FREETYPE_INCLUDE_PATH="$new_path"
48203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48204 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48205   fi
48206 
48207   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48208   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48209 
48210   else
48211     # We're on a unix platform. Hooray! :)
48212     path="$FREETYPE_INCLUDE_PATH"
48213     has_space=`$ECHO "$path" | $GREP " "`
48214     if test "x$has_space" != x; then
48215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48216 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48217       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48218     fi
48219 
48220     # Use eval to expand a potential ~
48221     eval path="$path"
48222     if test ! -f "$path" && test ! -d "$path"; then
48223       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48224     fi
48225 
48226     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48227   fi
48228 
48229       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48230         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48231       else
48232         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48233       fi
48234     fi
48235 
48236     if test "x$FREETYPE_LIBS" = x; then
48237 
48238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48239 
48240   # Input might be given as Windows format, start by converting to
48241   # unix format.
48242   path="$FREETYPE_LIB_PATH"
48243   new_path=`$CYGPATH -u "$path"`
48244 
48245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48248   # "foo.exe" is OK but "foo" is an error.
48249   #
48250   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48251   # It is also a way to make sure we got the proper file name for the real test later on.
48252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48253   if test "x$test_shortpath" = x; then
48254     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48255 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48256     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48257   fi
48258 
48259   # Call helper function which possibly converts this using DOS-style short mode.
48260   # If so, the updated path is stored in $new_path.
48261 
48262   input_path="$new_path"
48263   # Check if we need to convert this using DOS-style short mode. If the path
48264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48265   # take no chances and rewrite it.
48266   # Note: m4 eats our [], so we need to use [ and ] instead.
48267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48268   if test "x$has_forbidden_chars" != x; then
48269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48270     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48271     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48272     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48273       # Going to short mode and back again did indeed matter. Since short mode is
48274       # case insensitive, let's make it lowercase to improve readability.
48275       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48276       # Now convert it back to Unix-stile (cygpath)
48277       input_path=`$CYGPATH -u "$shortmode_path"`
48278       new_path="$input_path"
48279     fi
48280   fi
48281 
48282   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48283   if test "x$test_cygdrive_prefix" = x; then
48284     # As a simple fix, exclude /usr/bin since it's not a real path.
48285     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48286       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48287       # a path prefixed by /cygdrive for fixpath to work.
48288       new_path="$CYGWIN_ROOT_PATH$input_path"
48289     fi
48290   fi
48291 
48292 
48293   if test "x$path" != "x$new_path"; then
48294     FREETYPE_LIB_PATH="$new_path"
48295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48296 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48297   fi
48298 
48299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48300 
48301   path="$FREETYPE_LIB_PATH"
48302   has_colon=`$ECHO $path | $GREP ^.:`
48303   new_path="$path"
48304   if test "x$has_colon" = x; then
48305     # Not in mixed or Windows style, start by that.
48306     new_path=`cmd //c echo $path`
48307   fi
48308 
48309 
48310   input_path="$new_path"
48311   # Check if we need to convert this using DOS-style short mode. If the path
48312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48313   # take no chances and rewrite it.
48314   # Note: m4 eats our [], so we need to use [ and ] instead.
48315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48316   if test "x$has_forbidden_chars" != x; then
48317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48318     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48319   fi
48320 
48321 
48322   windows_path="$new_path"
48323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48324     unix_path=`$CYGPATH -u "$windows_path"`
48325     new_path="$unix_path"
48326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48328     new_path="$unix_path"
48329   fi
48330 
48331   if test "x$path" != "x$new_path"; then
48332     FREETYPE_LIB_PATH="$new_path"
48333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48334 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48335   fi
48336 
48337   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48338   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48339 
48340   else
48341     # We're on a unix platform. Hooray! :)
48342     path="$FREETYPE_LIB_PATH"
48343     has_space=`$ECHO "$path" | $GREP " "`
48344     if test "x$has_space" != x; then
48345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48346 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48347       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48348     fi
48349 
48350     # Use eval to expand a potential ~
48351     eval path="$path"
48352     if test ! -f "$path" && test ! -d "$path"; then
48353       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48354     fi
48355 
48356     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48357   fi
48358 
48359       if test "x$OPENJDK_TARGET_OS" = xwindows; then
48360         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48361       else
48362         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48363       fi
48364     fi
48365 
48366     # Try to compile it
48367     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48368 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
48369     ac_ext=cpp
48370 ac_cpp='$CXXCPP $CPPFLAGS'
48371 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48372 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48373 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48374 
48375     PREV_CXXCFLAGS="$CXXFLAGS"
48376     PREV_LIBS="$LIBS"
48377     PREV_CXX="$CXX"
48378     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48379     LIBS="$LIBS $FREETYPE_LIBS"
48380     CXX="$FIXPATH $CXX"
48381     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48382 /* end confdefs.h.  */
48383 
48384           #include<ft2build.h>
48385           #include FT_FREETYPE_H
48386           int main () {
48387             FT_Init_FreeType(NULL);
48388             return 0;
48389           }
48390 
48391 _ACEOF
48392 if ac_fn_cxx_try_link "$LINENO"; then :
48393 
48394           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48395 $as_echo "yes" >&6; }
48396 
48397 else
48398 
48399           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48400 $as_echo "no" >&6; }
48401           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48402 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48403           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48404 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48405 
48406 
48407   # Print a helpful message on how to acquire the necessary build dependency.
48408   # freetype is the help tag: freetype, cups, pulse, alsa etc
48409   MISSING_DEPENDENCY=freetype
48410 
48411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48412     cygwin_help $MISSING_DEPENDENCY
48413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48414     msys_help $MISSING_DEPENDENCY
48415   else
48416     PKGHANDLER_COMMAND=
48417 
48418     case $PKGHANDLER in
48419       apt-get)
48420         apt_help     $MISSING_DEPENDENCY ;;
48421       yum)
48422         yum_help     $MISSING_DEPENDENCY ;;
48423       port)
48424         port_help    $MISSING_DEPENDENCY ;;
48425       pkgutil)
48426         pkgutil_help $MISSING_DEPENDENCY ;;
48427       pkgadd)
48428         pkgadd_help  $MISSING_DEPENDENCY ;;
48429     esac
48430 
48431     if test "x$PKGHANDLER_COMMAND" != x; then
48432       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48433     fi
48434   fi
48435 
48436 
48437           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48438 
48439 
48440 fi
48441 rm -f core conftest.err conftest.$ac_objext \
48442     conftest$ac_exeext conftest.$ac_ext
48443     CXXCFLAGS="$PREV_CXXFLAGS"
48444     LIBS="$PREV_LIBS"
48445     CXX="$PREV_CXX"
48446     ac_ext=cpp
48447 ac_cpp='$CXXCPP $CPPFLAGS'
48448 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48449 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48450 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48451 
48452 
48453     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48454 $as_echo_n "checking if we should bundle freetype... " >&6; }
48455     if test "x$BUNDLE_FREETYPE" = xyes; then
48456       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48457     fi
48458     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48459 $as_echo "$BUNDLE_FREETYPE" >&6; }
48460 
48461   fi # end freetype needed
48462 
48463 
48464 
48465 
48466 
48467 
48468 
48469   ###############################################################################
48470   #
48471   # Check for alsa headers and libraries. Used on Linux/GNU systems.
48472   #
48473 
48474 # Check whether --with-alsa was given.
48475 if test "${with_alsa+set}" = set; then :
48476   withval=$with_alsa;
48477 fi
48478 
48479 
48480 # Check whether --with-alsa-include was given.
48481 if test "${with_alsa_include+set}" = set; then :
48482   withval=$with_alsa_include;
48483 fi
48484 
48485 
48486 # Check whether --with-alsa-lib was given.
48487 if test "${with_alsa_lib+set}" = set; then :
48488   withval=$with_alsa_lib;
48489 fi
48490 
48491 
48492   if test "x$ALSA_NOT_NEEDED" = xyes; then
48493     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48494       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48495 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48496     fi
48497     ALSA_CFLAGS=
48498     ALSA_LIBS=
48499   else
48500     ALSA_FOUND=no
48501 
48502     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48503       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48504     fi
48505 
48506     if test "x${with_alsa}" != x; then
48507       ALSA_LIBS="-L${with_alsa}/lib -lasound"
48508       ALSA_CFLAGS="-I${with_alsa}/include"
48509       ALSA_FOUND=yes
48510     fi
48511     if test "x${with_alsa_include}" != x; then
48512       ALSA_CFLAGS="-I${with_alsa_include}"
48513       ALSA_FOUND=yes
48514     fi
48515     if test "x${with_alsa_lib}" != x; then
48516       ALSA_LIBS="-L${with_alsa_lib} -lasound"
48517       ALSA_FOUND=yes
48518     fi
48519     if test "x$ALSA_FOUND" = xno; then
48520 
48521 
48522   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48523     # Source the builddeps file again, to make sure it uses the latest variables!
48524     . $builddepsfile
48525     # Look for a target and build machine specific resource!
48526     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48527     if test "x$resource" = x; then
48528       # Ok, lets instead look for a target specific resource
48529       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48530     fi
48531     if test "x$resource" = x; then
48532       # Ok, lets instead look for a build specific resource
48533       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48534     fi
48535     if test "x$resource" = x; then
48536       # Ok, lets instead look for a generic resource
48537       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48538       resource=${builddep_alsa}
48539     fi
48540     if test "x$resource" != x; then
48541       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48542 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48543       # If the resource in the builddeps.conf file is an existing directory,
48544       # for example /java/linux/cups
48545       if test -d ${resource}; then
48546         depdir=${resource}
48547       else
48548 
48549   # alsa is for example mymodule
48550   # $resource is for example libs/general/libmymod_1_2_3.zip
48551   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48552   # $with_builddeps_dir is for example /localhome/builddeps
48553   # depdir is the name of the variable into which we store the depdir, eg MYMOD
48554   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48555   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48556   filename=`basename $resource`
48557   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48558   filebase=${filename%%.*}
48559   extension=${filename#*.}
48560   installdir=$with_builddeps_dir/$filebase
48561   if test ! -f $installdir/$filename.unpacked; then
48562     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48563 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48564     if test ! -d $installdir; then
48565       mkdir -p $installdir
48566     fi
48567     if test ! -d $installdir; then
48568       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48569     fi
48570     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48571     touch $tmpfile
48572     if test ! -f $tmpfile; then
48573       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48574     fi
48575 
48576   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48577   # $tmpfile is the local file name for the downloaded file.
48578   VALID_TOOL=no
48579   if test "x$BDEPS_FTP" = xwget; then
48580     VALID_TOOL=yes
48581     wget -O $tmpfile $with_builddeps_server/$resource
48582   fi
48583   if test "x$BDEPS_FTP" = xlftp; then
48584     VALID_TOOL=yes
48585     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48586   fi
48587   if test "x$BDEPS_FTP" = xftp; then
48588     VALID_TOOL=yes
48589     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48590     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48591     FTPUSERPWD=${FTPSERVER%%@*}
48592     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48593       FTPUSER=${userpwd%%:*}
48594       FTPPWD=${userpwd#*@}
48595       FTPSERVER=${FTPSERVER#*@}
48596     else
48597       FTPUSER=ftp
48598       FTPPWD=ftp
48599     fi
48600     # the "pass" command does not work on some
48601     # ftp clients (read ftp.exe) but if it works,
48602     # passive mode is better!
48603     ( \
48604         echo "user $FTPUSER $FTPPWD"        ; \
48605         echo "pass"                         ; \
48606         echo "bin"                          ; \
48607         echo "get $FTPPATH $tmpfile"              ; \
48608     ) | ftp -in $FTPSERVER
48609   fi
48610   if test "x$VALID_TOOL" != xyes; then
48611     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48612   fi
48613 
48614     mv $tmpfile $installdir/$filename
48615     if test ! -s $installdir/$filename; then
48616       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48617     fi
48618     case "$extension" in
48619       zip)  echo "Unzipping $installdir/$filename..."
48620         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48621         ;;
48622       tar.gz) echo "Untaring $installdir/$filename..."
48623         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48624         ;;
48625       tgz) echo "Untaring $installdir/$filename..."
48626         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48627         ;;
48628       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48629         ;;
48630     esac
48631   fi
48632   if test -f $installdir/$filename.unpacked; then
48633     depdir=$installdir
48634   fi
48635 
48636       fi
48637       # Source the builddeps file again, because in the previous command, the depdir
48638       # was updated to point at the current build dependency install directory.
48639       . $builddepsfile
48640       # Now extract variables from the builddeps.conf files.
48641       theroot=${builddep_alsa_ROOT}
48642       thecflags=${builddep_alsa_CFLAGS}
48643       thelibs=${builddep_alsa_LIBS}
48644       if test "x$depdir" = x; then
48645         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48646       fi
48647       ALSA=$depdir
48648       if test "x$theroot" != x; then
48649         ALSA="$theroot"
48650       fi
48651       if test "x$thecflags" != x; then
48652         ALSA_CFLAGS="$thecflags"
48653       fi
48654       if test "x$thelibs" != x; then
48655         ALSA_LIBS="$thelibs"
48656       fi
48657       ALSA_FOUND=yes
48658       else ALSA_FOUND=no
48659 
48660     fi
48661     else ALSA_FOUND=no
48662 
48663   fi
48664 
48665     fi
48666     # Do not try pkg-config if we have a sysroot set.
48667     if test "x$SYSROOT" = x; then
48668       if test "x$ALSA_FOUND" = xno; then
48669 
48670 pkg_failed=no
48671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48672 $as_echo_n "checking for ALSA... " >&6; }
48673 
48674 if test -n "$ALSA_CFLAGS"; then
48675     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48676  elif test -n "$PKG_CONFIG"; then
48677     if test -n "$PKG_CONFIG" && \
48678     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48679   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48680   ac_status=$?
48681   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48682   test $ac_status = 0; }; then
48683   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48684 else
48685   pkg_failed=yes
48686 fi
48687  else
48688     pkg_failed=untried
48689 fi
48690 if test -n "$ALSA_LIBS"; then
48691     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48692  elif test -n "$PKG_CONFIG"; then
48693     if test -n "$PKG_CONFIG" && \
48694     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48695   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48696   ac_status=$?
48697   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48698   test $ac_status = 0; }; then
48699   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48700 else
48701   pkg_failed=yes
48702 fi
48703  else
48704     pkg_failed=untried
48705 fi
48706 
48707 
48708 
48709 if test $pkg_failed = yes; then
48710 
48711 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48712         _pkg_short_errors_supported=yes
48713 else
48714         _pkg_short_errors_supported=no
48715 fi
48716         if test $_pkg_short_errors_supported = yes; then
48717                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48718         else
48719                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48720         fi
48721         # Put the nasty error message in config.log where it belongs
48722         echo "$ALSA_PKG_ERRORS" >&5
48723 
48724         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48725 $as_echo "no" >&6; }
48726                 ALSA_FOUND=no
48727 elif test $pkg_failed = untried; then
48728         ALSA_FOUND=no
48729 else
48730         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48731         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48732         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48733 $as_echo "yes" >&6; }
48734         ALSA_FOUND=yes
48735 fi
48736       fi
48737     fi
48738     if test "x$ALSA_FOUND" = xno; then
48739       for ac_header in alsa/asoundlib.h
48740 do :
48741   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48742 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48743   cat >>confdefs.h <<_ACEOF
48744 #define HAVE_ALSA_ASOUNDLIB_H 1
48745 _ACEOF
48746 
48747             ALSA_FOUND=yes
48748             ALSA_CFLAGS=-Iignoreme
48749             ALSA_LIBS=-lasound
48750             DEFAULT_ALSA=yes
48751 
48752 else
48753   ALSA_FOUND=no
48754 fi
48755 
48756 done
48757 
48758     fi
48759     if test "x$ALSA_FOUND" = xno; then
48760 
48761   # Print a helpful message on how to acquire the necessary build dependency.
48762   # alsa is the help tag: freetype, cups, pulse, alsa etc
48763   MISSING_DEPENDENCY=alsa
48764 
48765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48766     cygwin_help $MISSING_DEPENDENCY
48767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48768     msys_help $MISSING_DEPENDENCY
48769   else
48770     PKGHANDLER_COMMAND=
48771 
48772     case $PKGHANDLER in
48773       apt-get)
48774         apt_help     $MISSING_DEPENDENCY ;;
48775       yum)
48776         yum_help     $MISSING_DEPENDENCY ;;
48777       port)
48778         port_help    $MISSING_DEPENDENCY ;;
48779       pkgutil)
48780         pkgutil_help $MISSING_DEPENDENCY ;;
48781       pkgadd)
48782         pkgadd_help  $MISSING_DEPENDENCY ;;
48783     esac
48784 
48785     if test "x$PKGHANDLER_COMMAND" != x; then
48786       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48787     fi
48788   fi
48789 
48790       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48791     fi
48792   fi
48793 
48794 
48795 
48796 
48797 
48798 
48799   ###############################################################################
48800   #
48801   # Check for the jpeg library
48802   #
48803 
48804 
48805 # Check whether --with-libjpeg was given.
48806 if test "${with_libjpeg+set}" = set; then :
48807   withval=$with_libjpeg;
48808 fi
48809 
48810 
48811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48812 $as_echo_n "checking for which libjpeg to use... " >&6; }
48813 
48814   # default is bundled
48815   DEFAULT_LIBJPEG=bundled
48816 
48817   #
48818   # if user didn't specify, use DEFAULT_LIBJPEG
48819   #
48820   if test "x${with_libjpeg}" = "x"; then
48821     with_libjpeg=${DEFAULT_LIBJPEG}
48822   fi
48823 
48824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48825 $as_echo "${with_libjpeg}" >&6; }
48826 
48827   if test "x${with_libjpeg}" = "xbundled"; then
48828     USE_EXTERNAL_LIBJPEG=false
48829   elif test "x${with_libjpeg}" = "xsystem"; then
48830     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48831 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48832 
48833 else
48834    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48835 fi
48836 
48837 
48838     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48839 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48840 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48841   $as_echo_n "(cached) " >&6
48842 else
48843   ac_check_lib_save_LIBS=$LIBS
48844 LIBS="-ljpeg  $LIBS"
48845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48846 /* end confdefs.h.  */
48847 
48848 /* Override any GCC internal prototype to avoid an error.
48849    Use char because int might match the return type of a GCC
48850    builtin and then its argument prototype would still apply.  */
48851 #ifdef __cplusplus
48852 extern "C"
48853 #endif
48854 char jpeg_CreateDecompress ();
48855 int
48856 main ()
48857 {
48858 return jpeg_CreateDecompress ();
48859   ;
48860   return 0;
48861 }
48862 _ACEOF
48863 if ac_fn_cxx_try_link "$LINENO"; then :
48864   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48865 else
48866   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48867 fi
48868 rm -f core conftest.err conftest.$ac_objext \
48869     conftest$ac_exeext conftest.$ac_ext
48870 LIBS=$ac_check_lib_save_LIBS
48871 fi
48872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48873 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48874 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48875   cat >>confdefs.h <<_ACEOF
48876 #define HAVE_LIBJPEG 1
48877 _ACEOF
48878 
48879   LIBS="-ljpeg $LIBS"
48880 
48881 else
48882    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48883 fi
48884 
48885 
48886     USE_EXTERNAL_LIBJPEG=true
48887   else
48888     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48889   fi
48890 
48891 
48892 
48893   ###############################################################################
48894   #
48895   # Check for the gif library
48896   #
48897 
48898 
48899 # Check whether --with-giflib was given.
48900 if test "${with_giflib+set}" = set; then :
48901   withval=$with_giflib;
48902 fi
48903 
48904 
48905 
48906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48907 $as_echo_n "checking for which giflib to use... " >&6; }
48908 
48909   # default is bundled
48910   DEFAULT_GIFLIB=bundled
48911 
48912   #
48913   # if user didn't specify, use DEFAULT_GIFLIB
48914   #
48915   if test "x${with_giflib}" = "x"; then
48916     with_giflib=${DEFAULT_GIFLIB}
48917   fi
48918 
48919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48920 $as_echo "${with_giflib}" >&6; }
48921 
48922   if test "x${with_giflib}" = "xbundled"; then
48923     USE_EXTERNAL_LIBGIF=false
48924   elif test "x${with_giflib}" = "xsystem"; then
48925     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48926 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48927 
48928 else
48929    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48930 fi
48931 
48932 
48933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48934 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48935 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48936   $as_echo_n "(cached) " >&6
48937 else
48938   ac_check_lib_save_LIBS=$LIBS
48939 LIBS="-lgif  $LIBS"
48940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48941 /* end confdefs.h.  */
48942 
48943 /* Override any GCC internal prototype to avoid an error.
48944    Use char because int might match the return type of a GCC
48945    builtin and then its argument prototype would still apply.  */
48946 #ifdef __cplusplus
48947 extern "C"
48948 #endif
48949 char DGifGetCode ();
48950 int
48951 main ()
48952 {
48953 return DGifGetCode ();
48954   ;
48955   return 0;
48956 }
48957 _ACEOF
48958 if ac_fn_cxx_try_link "$LINENO"; then :
48959   ac_cv_lib_gif_DGifGetCode=yes
48960 else
48961   ac_cv_lib_gif_DGifGetCode=no
48962 fi
48963 rm -f core conftest.err conftest.$ac_objext \
48964     conftest$ac_exeext conftest.$ac_ext
48965 LIBS=$ac_check_lib_save_LIBS
48966 fi
48967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48968 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48969 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48970   cat >>confdefs.h <<_ACEOF
48971 #define HAVE_LIBGIF 1
48972 _ACEOF
48973 
48974   LIBS="-lgif $LIBS"
48975 
48976 else
48977    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48978 fi
48979 
48980 
48981     USE_EXTERNAL_LIBGIF=true
48982   else
48983     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48984   fi
48985 
48986 
48987   ###############################################################################
48988   #
48989   # Check for the lcms2 library
48990   #
48991 
48992 
48993 # Check whether --with-lcms was given.
48994 if test "${with_lcms+set}" = set; then :
48995   withval=$with_lcms;
48996 fi
48997 
48998 
48999   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49000 $as_echo_n "checking for which lcms to use... " >&6; }
49001 
49002   DEFAULT_LCMS=bundled
49003 
49004   #
49005   # If user didn't specify, use DEFAULT_LCMS
49006   #
49007   if test "x${with_lcms}" = "x"; then
49008       with_lcms=${DEFAULT_LCMS}
49009   fi
49010 
49011   if test "x${with_lcms}" = "xbundled"; then
49012     USE_EXTERNAL_LCMS=false
49013     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49014 $as_echo "bundled" >&6; }
49015   elif test "x${with_lcms}" = "xsystem"; then
49016     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49017 $as_echo "system" >&6; }
49018 
49019 pkg_failed=no
49020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49021 $as_echo_n "checking for LCMS... " >&6; }
49022 
49023 if test -n "$LCMS_CFLAGS"; then
49024     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49025  elif test -n "$PKG_CONFIG"; then
49026     if test -n "$PKG_CONFIG" && \
49027     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49028   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49029   ac_status=$?
49030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49031   test $ac_status = 0; }; then
49032   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49033 else
49034   pkg_failed=yes
49035 fi
49036  else
49037     pkg_failed=untried
49038 fi
49039 if test -n "$LCMS_LIBS"; then
49040     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49041  elif test -n "$PKG_CONFIG"; then
49042     if test -n "$PKG_CONFIG" && \
49043     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49044   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49045   ac_status=$?
49046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49047   test $ac_status = 0; }; then
49048   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49049 else
49050   pkg_failed=yes
49051 fi
49052  else
49053     pkg_failed=untried
49054 fi
49055 
49056 
49057 
49058 if test $pkg_failed = yes; then
49059 
49060 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49061         _pkg_short_errors_supported=yes
49062 else
49063         _pkg_short_errors_supported=no
49064 fi
49065         if test $_pkg_short_errors_supported = yes; then
49066                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49067         else
49068                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49069         fi
49070         # Put the nasty error message in config.log where it belongs
49071         echo "$LCMS_PKG_ERRORS" >&5
49072 
49073         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49074 $as_echo "no" >&6; }
49075                 LCMS_FOUND=no
49076 elif test $pkg_failed = untried; then
49077         LCMS_FOUND=no
49078 else
49079         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49080         LCMS_LIBS=$pkg_cv_LCMS_LIBS
49081         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49082 $as_echo "yes" >&6; }
49083         LCMS_FOUND=yes
49084 fi
49085     if test "x${LCMS_FOUND}" = "xyes"; then
49086       USE_EXTERNAL_LCMS=true
49087     else
49088       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49089     fi
49090   else
49091     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49092   fi
49093 
49094 
49095 
49096   ###############################################################################
49097   #
49098   # Check for the png library
49099   #
49100 
49101 
49102 # Check whether --with-libpng was given.
49103 if test "${with_libpng+set}" = set; then :
49104   withval=$with_libpng;
49105 fi
49106 
49107 
49108 
49109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49110 $as_echo_n "checking for which libpng to use... " >&6; }
49111 
49112   # default is bundled
49113   DEFAULT_LIBPNG=bundled
49114 
49115   #
49116   # if user didn't specify, use DEFAULT_LIBPNG
49117   #
49118   if test "x${with_libpng}" = "x"; then
49119       with_libpng=${DEFAULT_LIBPNG}
49120   fi
49121 
49122   if test "x${with_libpng}" = "xbundled"; then
49123       USE_EXTERNAL_LIBPNG=false
49124       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49125 $as_echo "bundled" >&6; }
49126   elif test "x${with_libpng}" = "xsystem"; then
49127 
49128 pkg_failed=no
49129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49130 $as_echo_n "checking for PNG... " >&6; }
49131 
49132 if test -n "$PNG_CFLAGS"; then
49133     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49134  elif test -n "$PKG_CONFIG"; then
49135     if test -n "$PKG_CONFIG" && \
49136     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49137   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49138   ac_status=$?
49139   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49140   test $ac_status = 0; }; then
49141   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49142 else
49143   pkg_failed=yes
49144 fi
49145  else
49146     pkg_failed=untried
49147 fi
49148 if test -n "$PNG_LIBS"; then
49149     pkg_cv_PNG_LIBS="$PNG_LIBS"
49150  elif test -n "$PKG_CONFIG"; then
49151     if test -n "$PKG_CONFIG" && \
49152     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49153   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49154   ac_status=$?
49155   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49156   test $ac_status = 0; }; then
49157   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49158 else
49159   pkg_failed=yes
49160 fi
49161  else
49162     pkg_failed=untried
49163 fi
49164 
49165 
49166 
49167 if test $pkg_failed = yes; then
49168 
49169 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49170         _pkg_short_errors_supported=yes
49171 else
49172         _pkg_short_errors_supported=no
49173 fi
49174         if test $_pkg_short_errors_supported = yes; then
49175                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49176         else
49177                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49178         fi
49179         # Put the nasty error message in config.log where it belongs
49180         echo "$PNG_PKG_ERRORS" >&5
49181 
49182         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49183 $as_echo "no" >&6; }
49184                  LIBPNG_FOUND=no
49185 elif test $pkg_failed = untried; then
49186          LIBPNG_FOUND=no
49187 else
49188         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49189         PNG_LIBS=$pkg_cv_PNG_LIBS
49190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49191 $as_echo "yes" >&6; }
49192          LIBPNG_FOUND=yes
49193 fi
49194       if test "x${LIBPNG_FOUND}" = "xyes"; then
49195           USE_EXTERNAL_LIBPNG=true
49196           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49197 $as_echo "system" >&6; }
49198       else
49199           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49200 $as_echo "system not found" >&6; }
49201           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49202       fi
49203   else
49204       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49205   fi
49206 
49207 
49208   ###############################################################################
49209   #
49210   # Check for the zlib library
49211   #
49212 
49213 
49214 # Check whether --with-zlib was given.
49215 if test "${with_zlib+set}" = set; then :
49216   withval=$with_zlib;
49217 fi
49218 
49219 
49220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49221 $as_echo_n "checking for compress in -lz... " >&6; }
49222 if ${ac_cv_lib_z_compress+:} false; then :
49223   $as_echo_n "(cached) " >&6
49224 else
49225   ac_check_lib_save_LIBS=$LIBS
49226 LIBS="-lz  $LIBS"
49227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49228 /* end confdefs.h.  */
49229 
49230 /* Override any GCC internal prototype to avoid an error.
49231    Use char because int might match the return type of a GCC
49232    builtin and then its argument prototype would still apply.  */
49233 #ifdef __cplusplus
49234 extern "C"
49235 #endif
49236 char compress ();
49237 int
49238 main ()
49239 {
49240 return compress ();
49241   ;
49242   return 0;
49243 }
49244 _ACEOF
49245 if ac_fn_cxx_try_link "$LINENO"; then :
49246   ac_cv_lib_z_compress=yes
49247 else
49248   ac_cv_lib_z_compress=no
49249 fi
49250 rm -f core conftest.err conftest.$ac_objext \
49251     conftest$ac_exeext conftest.$ac_ext
49252 LIBS=$ac_check_lib_save_LIBS
49253 fi
49254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49255 $as_echo "$ac_cv_lib_z_compress" >&6; }
49256 if test "x$ac_cv_lib_z_compress" = xyes; then :
49257    ZLIB_FOUND=yes
49258 else
49259    ZLIB_FOUND=no
49260 fi
49261 
49262 
49263   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49264 $as_echo_n "checking for which zlib to use... " >&6; }
49265 
49266   DEFAULT_ZLIB=bundled
49267   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49268     #
49269     # On macosx default is system...on others default is
49270     #
49271     DEFAULT_ZLIB=system
49272   fi
49273 
49274   if test "x${ZLIB_FOUND}" != "xyes"; then
49275     #
49276     # If we don't find any system...set default to bundled
49277     #
49278     DEFAULT_ZLIB=bundled
49279   fi
49280 
49281   #
49282   # If user didn't specify, use DEFAULT_ZLIB
49283   #
49284   if test "x${with_zlib}" = "x"; then
49285     with_zlib=${DEFAULT_ZLIB}
49286   fi
49287 
49288   if test "x${with_zlib}" = "xbundled"; then
49289     USE_EXTERNAL_LIBZ=false
49290     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49291 $as_echo "bundled" >&6; }
49292   elif test "x${with_zlib}" = "xsystem"; then
49293     if test "x${ZLIB_FOUND}" = "xyes"; then
49294       USE_EXTERNAL_LIBZ=true
49295       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49296 $as_echo "system" >&6; }
49297     else
49298       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49299 $as_echo "system not found" >&6; }
49300       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49301     fi
49302   else
49303     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49304   fi
49305 
49306 
49307 
49308   ###############################################################################
49309   LIBZIP_CAN_USE_MMAP=true
49310 
49311 
49312 
49313   ###############################################################################
49314   #
49315   # Check if altzone exists in time.h
49316   #
49317 
49318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49319 /* end confdefs.h.  */
49320 #include <time.h>
49321 int
49322 main ()
49323 {
49324 return (int)altzone;
49325   ;
49326   return 0;
49327 }
49328 _ACEOF
49329 if ac_fn_cxx_try_link "$LINENO"; then :
49330   has_altzone=yes
49331 else
49332   has_altzone=no
49333 fi
49334 rm -f core conftest.err conftest.$ac_objext \
49335     conftest$ac_exeext conftest.$ac_ext
49336   if test "x$has_altzone" = xyes; then
49337 
49338 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49339 
49340   fi
49341 
49342   ###############################################################################
49343   #
49344   # Check the maths library
49345   #
49346 
49347   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49348 $as_echo_n "checking for cos in -lm... " >&6; }
49349 if ${ac_cv_lib_m_cos+:} false; then :
49350   $as_echo_n "(cached) " >&6
49351 else
49352   ac_check_lib_save_LIBS=$LIBS
49353 LIBS="-lm  $LIBS"
49354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49355 /* end confdefs.h.  */
49356 
49357 /* Override any GCC internal prototype to avoid an error.
49358    Use char because int might match the return type of a GCC
49359    builtin and then its argument prototype would still apply.  */
49360 #ifdef __cplusplus
49361 extern "C"
49362 #endif
49363 char cos ();
49364 int
49365 main ()
49366 {
49367 return cos ();
49368   ;
49369   return 0;
49370 }
49371 _ACEOF
49372 if ac_fn_cxx_try_link "$LINENO"; then :
49373   ac_cv_lib_m_cos=yes
49374 else
49375   ac_cv_lib_m_cos=no
49376 fi
49377 rm -f core conftest.err conftest.$ac_objext \
49378     conftest$ac_exeext conftest.$ac_ext
49379 LIBS=$ac_check_lib_save_LIBS
49380 fi
49381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49382 $as_echo "$ac_cv_lib_m_cos" >&6; }
49383 if test "x$ac_cv_lib_m_cos" = xyes; then :
49384   cat >>confdefs.h <<_ACEOF
49385 #define HAVE_LIBM 1
49386 _ACEOF
49387 
49388   LIBS="-lm $LIBS"
49389 
49390 else
49391 
49392         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49393 $as_echo "$as_me: Maths library was not found" >&6;}
49394 
49395 
49396 fi
49397 
49398 
49399 
49400   ###############################################################################
49401   #
49402   # Check for libdl.so
49403 
49404   save_LIBS="$LIBS"
49405   LIBS=""
49406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49407 $as_echo_n "checking for dlopen in -ldl... " >&6; }
49408 if ${ac_cv_lib_dl_dlopen+:} false; then :
49409   $as_echo_n "(cached) " >&6
49410 else
49411   ac_check_lib_save_LIBS=$LIBS
49412 LIBS="-ldl  $LIBS"
49413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49414 /* end confdefs.h.  */
49415 
49416 /* Override any GCC internal prototype to avoid an error.
49417    Use char because int might match the return type of a GCC
49418    builtin and then its argument prototype would still apply.  */
49419 #ifdef __cplusplus
49420 extern "C"
49421 #endif
49422 char dlopen ();
49423 int
49424 main ()
49425 {
49426 return dlopen ();
49427   ;
49428   return 0;
49429 }
49430 _ACEOF
49431 if ac_fn_cxx_try_link "$LINENO"; then :
49432   ac_cv_lib_dl_dlopen=yes
49433 else
49434   ac_cv_lib_dl_dlopen=no
49435 fi
49436 rm -f core conftest.err conftest.$ac_objext \
49437     conftest$ac_exeext conftest.$ac_ext
49438 LIBS=$ac_check_lib_save_LIBS
49439 fi
49440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49441 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49442 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49443   cat >>confdefs.h <<_ACEOF
49444 #define HAVE_LIBDL 1
49445 _ACEOF
49446 
49447   LIBS="-ldl $LIBS"
49448 
49449 fi
49450 
49451   LIBDL="$LIBS"
49452 
49453   LIBS="$save_LIBS"
49454 
49455 
49456   ###############################################################################
49457   #
49458   # statically link libstdc++ before C++ ABI is stablized on Linux unless
49459   # dynamic build is configured on command line.
49460   #
49461 
49462 # Check whether --with-stdc++lib was given.
49463 if test "${with_stdc__lib+set}" = set; then :
49464   withval=$with_stdc__lib;
49465         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49466                 && test "x$with_stdc__lib" != xdefault; then
49467           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49468         fi
49469 
49470 else
49471   with_stdc__lib=default
49472 
49473 fi
49474 
49475 
49476   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49477     # Test if -lstdc++ works.
49478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49479 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49480     ac_ext=cpp
49481 ac_cpp='$CXXCPP $CPPFLAGS'
49482 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49483 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49484 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49485 
49486     OLD_CXXFLAGS="$CXXFLAGS"
49487     CXXFLAGS="$CXXFLAGS -lstdc++"
49488     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49489 /* end confdefs.h.  */
49490 
49491 int
49492 main ()
49493 {
49494 return 0;
49495   ;
49496   return 0;
49497 }
49498 _ACEOF
49499 if ac_fn_cxx_try_link "$LINENO"; then :
49500   has_dynamic_libstdcxx=yes
49501 else
49502   has_dynamic_libstdcxx=no
49503 fi
49504 rm -f core conftest.err conftest.$ac_objext \
49505     conftest$ac_exeext conftest.$ac_ext
49506     CXXFLAGS="$OLD_CXXFLAGS"
49507     ac_ext=cpp
49508 ac_cpp='$CXXCPP $CPPFLAGS'
49509 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49510 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49511 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49512 
49513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49514 $as_echo "$has_dynamic_libstdcxx" >&6; }
49515 
49516     # Test if stdc++ can be linked statically.
49517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49518 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49519     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49520     ac_ext=cpp
49521 ac_cpp='$CXXCPP $CPPFLAGS'
49522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49523 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49525 
49526     OLD_LIBS="$LIBS"
49527     OLD_CXX="$CXX"
49528     LIBS="$STATIC_STDCXX_FLAGS"
49529     CXX="$CC"
49530     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49531 /* end confdefs.h.  */
49532 
49533 int
49534 main ()
49535 {
49536 return 0;
49537   ;
49538   return 0;
49539 }
49540 _ACEOF
49541 if ac_fn_cxx_try_link "$LINENO"; then :
49542   has_static_libstdcxx=yes
49543 else
49544   has_static_libstdcxx=no
49545 fi
49546 rm -f core conftest.err conftest.$ac_objext \
49547     conftest$ac_exeext conftest.$ac_ext
49548     LIBS="$OLD_LIBS"
49549     CXX="$OLD_CXX"
49550     ac_ext=cpp
49551 ac_cpp='$CXXCPP $CPPFLAGS'
49552 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49553 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49554 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49555 
49556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49557 $as_echo "$has_static_libstdcxx" >&6; }
49558 
49559     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49560       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49561     fi
49562 
49563     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49564       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49565     fi
49566 
49567     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49568       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49569     fi
49570 
49571     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49572 $as_echo_n "checking how to link with libstdc++... " >&6; }
49573     # If dynamic was requested, it's available since it would fail above otherwise.
49574     # If dynamic wasn't requested, go with static unless it isn't available.
49575     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49576       LIBCXX="$LIBCXX -lstdc++"
49577       LDCXX="$CXX"
49578       STATIC_CXX_SETTING="STATIC_CXX=false"
49579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49580 $as_echo "dynamic" >&6; }
49581     else
49582       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49583       LDCXX="$CC"
49584       STATIC_CXX_SETTING="STATIC_CXX=true"
49585       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49586 $as_echo "static" >&6; }
49587     fi
49588   fi
49589 
49590 
49591   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49592     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49593 
49594 pkg_failed=no
49595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49596 $as_echo_n "checking for LIBFFI... " >&6; }
49597 
49598 if test -n "$LIBFFI_CFLAGS"; then
49599     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49600  elif test -n "$PKG_CONFIG"; then
49601     if test -n "$PKG_CONFIG" && \
49602     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49603   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49604   ac_status=$?
49605   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49606   test $ac_status = 0; }; then
49607   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49608 else
49609   pkg_failed=yes
49610 fi
49611  else
49612     pkg_failed=untried
49613 fi
49614 if test -n "$LIBFFI_LIBS"; then
49615     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49616  elif test -n "$PKG_CONFIG"; then
49617     if test -n "$PKG_CONFIG" && \
49618     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49619   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49620   ac_status=$?
49621   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49622   test $ac_status = 0; }; then
49623   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49624 else
49625   pkg_failed=yes
49626 fi
49627  else
49628     pkg_failed=untried
49629 fi
49630 
49631 
49632 
49633 if test $pkg_failed = yes; then
49634 
49635 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49636         _pkg_short_errors_supported=yes
49637 else
49638         _pkg_short_errors_supported=no
49639 fi
49640         if test $_pkg_short_errors_supported = yes; then
49641                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49642         else
49643                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49644         fi
49645         # Put the nasty error message in config.log where it belongs
49646         echo "$LIBFFI_PKG_ERRORS" >&5
49647 
49648         as_fn_error $? "Package requirements (libffi) were not met:
49649 
49650 $LIBFFI_PKG_ERRORS
49651 
49652 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49653 installed software in a non-standard prefix.
49654 
49655 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49656 and LIBFFI_LIBS to avoid the need to call pkg-config.
49657 See the pkg-config man page for more details.
49658 " "$LINENO" 5
49659 elif test $pkg_failed = untried; then
49660         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49661 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49662 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49663 is in your PATH or set the PKG_CONFIG environment variable to the full
49664 path to pkg-config.
49665 
49666 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49667 and LIBFFI_LIBS to avoid the need to call pkg-config.
49668 See the pkg-config man page for more details.
49669 
49670 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49671 See \`config.log' for more details" "$LINENO" 5; }
49672 else
49673         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49674         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49675         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49676 $as_echo "yes" >&6; }
49677         :
49678 fi
49679 
49680   fi
49681 
49682   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49683     # Extract the first word of "llvm-config", so it can be a program name with args.
49684 set dummy llvm-config; ac_word=$2
49685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49686 $as_echo_n "checking for $ac_word... " >&6; }
49687 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49688   $as_echo_n "(cached) " >&6
49689 else
49690   if test -n "$LLVM_CONFIG"; then
49691   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49692 else
49693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49694 for as_dir in $PATH
49695 do
49696   IFS=$as_save_IFS
49697   test -z "$as_dir" && as_dir=.
49698     for ac_exec_ext in '' $ac_executable_extensions; do
49699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49700     ac_cv_prog_LLVM_CONFIG="llvm-config"
49701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49702     break 2
49703   fi
49704 done
49705   done
49706 IFS=$as_save_IFS
49707 
49708 fi
49709 fi
49710 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49711 if test -n "$LLVM_CONFIG"; then
49712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49713 $as_echo "$LLVM_CONFIG" >&6; }
49714 else
49715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49716 $as_echo "no" >&6; }
49717 fi
49718 
49719 
49720 
49721     if test "x$LLVM_CONFIG" != xllvm-config; then
49722       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49723     fi
49724 
49725     llvm_components="jit mcjit engine nativecodegen native"
49726     unset LLVM_CFLAGS
49727     for flag in $("$LLVM_CONFIG" --cxxflags); do
49728       if echo "${flag}" | grep -q '^-[ID]'; then
49729         if test "${flag}" != "-D_DEBUG" ; then
49730           if test "${LLVM_CFLAGS}" != "" ; then
49731             LLVM_CFLAGS="${LLVM_CFLAGS} "
49732           fi
49733           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49734         fi
49735       fi
49736     done
49737     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49738     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49739 
49740     unset LLVM_LDFLAGS
49741     for flag in $("${LLVM_CONFIG}" --ldflags); do
49742       if echo "${flag}" | grep -q '^-L'; then
49743         if test "${LLVM_LDFLAGS}" != ""; then
49744           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49745         fi
49746         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49747       fi
49748     done
49749 
49750     unset LLVM_LIBS
49751     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49752       if echo "${flag}" | grep -q '^-l'; then
49753         if test "${LLVM_LIBS}" != ""; then
49754           LLVM_LIBS="${LLVM_LIBS} "
49755         fi
49756         LLVM_LIBS="${LLVM_LIBS}${flag}"
49757       fi
49758     done
49759 
49760 
49761 
49762 
49763   fi
49764 
49765   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49766   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49767     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49768   fi
49769 
49770   # TODO better (platform agnostic) test
49771   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49772     LIBCXX="-lstdc++"
49773   fi
49774 
49775 
49776 
49777 
49778   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49779 
49780 
49781 # Check whether --with-msvcr-dll was given.
49782 if test "${with_msvcr_dll+set}" = set; then :
49783   withval=$with_msvcr_dll;
49784 fi
49785 
49786 
49787   if test "x$with_msvcr_dll" != x; then
49788     # If given explicitely by user, do not probe. If not present, fail directly.
49789 
49790   DLL_NAME="$DLL_NAME"
49791   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49792   METHOD="--with-msvcr-dll"
49793   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49794     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49795 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49796 
49797     # Need to check if the found msvcr is correct architecture
49798     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49799 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49800     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49801     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49802       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49803       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49804       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49805         CORRECT_MSVCR_ARCH="PE32 executable"
49806       else
49807         CORRECT_MSVCR_ARCH="PE32+ executable"
49808       fi
49809     else
49810       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49811         CORRECT_MSVCR_ARCH=386
49812       else
49813         CORRECT_MSVCR_ARCH=x86-64
49814       fi
49815     fi
49816     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49818 $as_echo "ok" >&6; }
49819       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49820       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49821 $as_echo_n "checking for $DLL_NAME... " >&6; }
49822       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49823 $as_echo "$MSVC_DLL" >&6; }
49824     else
49825       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49826 $as_echo "incorrect, ignoring" >&6; }
49827       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49828 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49829     fi
49830   fi
49831 
49832     if test "x$MSVC_DLL" = x; then
49833       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49834     fi
49835   else
49836 
49837   VAR_NAME="MSVCR_DLL"
49838   DLL_NAME="${MSVCR_NAME}"
49839   MSVC_DLL=
49840 
49841   if test "x$MSVC_DLL" = x; then
49842     # Probe: Using well-known location from Visual Studio 10.0
49843     if test "x$VCINSTALLDIR" != x; then
49844       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49845 
49846   windows_path="$CYGWIN_VC_INSTALL_DIR"
49847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49848     unix_path=`$CYGPATH -u "$windows_path"`
49849     CYGWIN_VC_INSTALL_DIR="$unix_path"
49850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49852     CYGWIN_VC_INSTALL_DIR="$unix_path"
49853   fi
49854 
49855       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49856         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49857       else
49858         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49859       fi
49860       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49861 
49862   DLL_NAME="$DLL_NAME"
49863   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49864   METHOD="well-known location in VCINSTALLDIR"
49865   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49866     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49867 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49868 
49869     # Need to check if the found msvcr is correct architecture
49870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49871 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49872     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49873     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49874       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49875       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49876       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49877         CORRECT_MSVCR_ARCH="PE32 executable"
49878       else
49879         CORRECT_MSVCR_ARCH="PE32+ executable"
49880       fi
49881     else
49882       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49883         CORRECT_MSVCR_ARCH=386
49884       else
49885         CORRECT_MSVCR_ARCH=x86-64
49886       fi
49887     fi
49888     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49889       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49890 $as_echo "ok" >&6; }
49891       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49892       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49893 $as_echo_n "checking for $DLL_NAME... " >&6; }
49894       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49895 $as_echo "$MSVC_DLL" >&6; }
49896     else
49897       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49898 $as_echo "incorrect, ignoring" >&6; }
49899       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49900 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49901     fi
49902   fi
49903 
49904     fi
49905   fi
49906 
49907   if test "x$MSVC_DLL" = x; then
49908     # Probe: Check in the Boot JDK directory.
49909     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49910 
49911   DLL_NAME="$DLL_NAME"
49912   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49913   METHOD="well-known location in Boot JDK"
49914   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49915     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49916 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49917 
49918     # Need to check if the found msvcr is correct architecture
49919     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49920 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49921     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49922     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49923       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49924       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49925       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49926         CORRECT_MSVCR_ARCH="PE32 executable"
49927       else
49928         CORRECT_MSVCR_ARCH="PE32+ executable"
49929       fi
49930     else
49931       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49932         CORRECT_MSVCR_ARCH=386
49933       else
49934         CORRECT_MSVCR_ARCH=x86-64
49935       fi
49936     fi
49937     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49938       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49939 $as_echo "ok" >&6; }
49940       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49941       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49942 $as_echo_n "checking for $DLL_NAME... " >&6; }
49943       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49944 $as_echo "$MSVC_DLL" >&6; }
49945     else
49946       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49947 $as_echo "incorrect, ignoring" >&6; }
49948       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49949 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49950     fi
49951   fi
49952 
49953   fi
49954 
49955   if test "x$MSVC_DLL" = x; then
49956     # Probe: Look in the Windows system32 directory
49957     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49958 
49959   windows_path="$CYGWIN_SYSTEMROOT"
49960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49961     unix_path=`$CYGPATH -u "$windows_path"`
49962     CYGWIN_SYSTEMROOT="$unix_path"
49963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49965     CYGWIN_SYSTEMROOT="$unix_path"
49966   fi
49967 
49968     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49969 
49970   DLL_NAME="$DLL_NAME"
49971   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49972   METHOD="well-known location in SYSTEMROOT"
49973   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49974     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49975 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49976 
49977     # Need to check if the found msvcr is correct architecture
49978     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49979 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49980     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49981     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49982       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49983       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49984       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49985         CORRECT_MSVCR_ARCH="PE32 executable"
49986       else
49987         CORRECT_MSVCR_ARCH="PE32+ executable"
49988       fi
49989     else
49990       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49991         CORRECT_MSVCR_ARCH=386
49992       else
49993         CORRECT_MSVCR_ARCH=x86-64
49994       fi
49995     fi
49996     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49997       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49998 $as_echo "ok" >&6; }
49999       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50000       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50001 $as_echo_n "checking for $DLL_NAME... " >&6; }
50002       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50003 $as_echo "$MSVC_DLL" >&6; }
50004     else
50005       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50006 $as_echo "incorrect, ignoring" >&6; }
50007       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50008 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50009     fi
50010   fi
50011 
50012   fi
50013 
50014   if test "x$MSVC_DLL" = x; then
50015     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50016     if test "x$VS100COMNTOOLS" != x; then
50017       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50018 
50019   windows_path="$CYGWIN_VS_TOOLS_DIR"
50020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50021     unix_path=`$CYGPATH -u "$windows_path"`
50022     CYGWIN_VS_TOOLS_DIR="$unix_path"
50023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50025     CYGWIN_VS_TOOLS_DIR="$unix_path"
50026   fi
50027 
50028       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50029         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50030             | $GREP -i /x64/ | $HEAD --lines 1`
50031       else
50032         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50033             | $GREP -i /x86/ | $HEAD --lines 1`
50034       fi
50035 
50036   DLL_NAME="$DLL_NAME"
50037   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50038   METHOD="search of VS100COMNTOOLS"
50039   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50040     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50041 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50042 
50043     # Need to check if the found msvcr is correct architecture
50044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50045 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50046     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50047     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50048       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50049       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50050       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50051         CORRECT_MSVCR_ARCH="PE32 executable"
50052       else
50053         CORRECT_MSVCR_ARCH="PE32+ executable"
50054       fi
50055     else
50056       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50057         CORRECT_MSVCR_ARCH=386
50058       else
50059         CORRECT_MSVCR_ARCH=x86-64
50060       fi
50061     fi
50062     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50063       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50064 $as_echo "ok" >&6; }
50065       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50066       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50067 $as_echo_n "checking for $DLL_NAME... " >&6; }
50068       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50069 $as_echo "$MSVC_DLL" >&6; }
50070     else
50071       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50072 $as_echo "incorrect, ignoring" >&6; }
50073       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50074 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50075     fi
50076   fi
50077 
50078     fi
50079   fi
50080 
50081   if test "x$MSVC_DLL" = x; then
50082     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50083     # (This was the original behaviour; kept since it might turn something up)
50084     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50085       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50086         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50087             | $GREP x64 | $HEAD --lines 1`
50088       else
50089         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50090             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50091         if test "x$POSSIBLE_MSVC_DLL" = x; then
50092           # We're grasping at straws now...
50093           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50094               | $HEAD --lines 1`
50095         fi
50096       fi
50097 
50098 
50099   DLL_NAME="$DLL_NAME"
50100   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50101   METHOD="search of VCINSTALLDIR"
50102   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50103     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50104 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50105 
50106     # Need to check if the found msvcr is correct architecture
50107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50108 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50109     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50110     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50111       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50112       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50113       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50114         CORRECT_MSVCR_ARCH="PE32 executable"
50115       else
50116         CORRECT_MSVCR_ARCH="PE32+ executable"
50117       fi
50118     else
50119       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50120         CORRECT_MSVCR_ARCH=386
50121       else
50122         CORRECT_MSVCR_ARCH=x86-64
50123       fi
50124     fi
50125     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50126       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50127 $as_echo "ok" >&6; }
50128       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50129       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50130 $as_echo_n "checking for $DLL_NAME... " >&6; }
50131       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50132 $as_echo "$MSVC_DLL" >&6; }
50133     else
50134       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50135 $as_echo "incorrect, ignoring" >&6; }
50136       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50137 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50138     fi
50139   fi
50140 
50141     fi
50142   fi
50143 
50144   if test "x$MSVC_DLL" = x; then
50145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50146 $as_echo_n "checking for $DLL_NAME... " >&6; }
50147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50148 $as_echo "no" >&6; }
50149     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50150   fi
50151 
50152   MSVCR_DLL=$MSVC_DLL
50153 
50154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50155 
50156   # Input might be given as Windows format, start by converting to
50157   # unix format.
50158   path="$MSVCR_DLL"
50159   new_path=`$CYGPATH -u "$path"`
50160 
50161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50164   # "foo.exe" is OK but "foo" is an error.
50165   #
50166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50167   # It is also a way to make sure we got the proper file name for the real test later on.
50168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50169   if test "x$test_shortpath" = x; then
50170     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50171 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50172     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50173   fi
50174 
50175   # Call helper function which possibly converts this using DOS-style short mode.
50176   # If so, the updated path is stored in $new_path.
50177 
50178   input_path="$new_path"
50179   # Check if we need to convert this using DOS-style short mode. If the path
50180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50181   # take no chances and rewrite it.
50182   # Note: m4 eats our [], so we need to use [ and ] instead.
50183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50184   if test "x$has_forbidden_chars" != x; then
50185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50189       # Going to short mode and back again did indeed matter. Since short mode is
50190       # case insensitive, let's make it lowercase to improve readability.
50191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50192       # Now convert it back to Unix-stile (cygpath)
50193       input_path=`$CYGPATH -u "$shortmode_path"`
50194       new_path="$input_path"
50195     fi
50196   fi
50197 
50198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50199   if test "x$test_cygdrive_prefix" = x; then
50200     # As a simple fix, exclude /usr/bin since it's not a real path.
50201     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50203       # a path prefixed by /cygdrive for fixpath to work.
50204       new_path="$CYGWIN_ROOT_PATH$input_path"
50205     fi
50206   fi
50207 
50208 
50209   if test "x$path" != "x$new_path"; then
50210     MSVCR_DLL="$new_path"
50211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50212 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50213   fi
50214 
50215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50216 
50217   path="$MSVCR_DLL"
50218   has_colon=`$ECHO $path | $GREP ^.:`
50219   new_path="$path"
50220   if test "x$has_colon" = x; then
50221     # Not in mixed or Windows style, start by that.
50222     new_path=`cmd //c echo $path`
50223   fi
50224 
50225 
50226   input_path="$new_path"
50227   # Check if we need to convert this using DOS-style short mode. If the path
50228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50229   # take no chances and rewrite it.
50230   # Note: m4 eats our [], so we need to use [ and ] instead.
50231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50232   if test "x$has_forbidden_chars" != x; then
50233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50234     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50235   fi
50236 
50237 
50238   windows_path="$new_path"
50239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50240     unix_path=`$CYGPATH -u "$windows_path"`
50241     new_path="$unix_path"
50242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50244     new_path="$unix_path"
50245   fi
50246 
50247   if test "x$path" != "x$new_path"; then
50248     MSVCR_DLL="$new_path"
50249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50250 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50251   fi
50252 
50253   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50254   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50255 
50256   else
50257     # We're on a unix platform. Hooray! :)
50258     path="$MSVCR_DLL"
50259     has_space=`$ECHO "$path" | $GREP " "`
50260     if test "x$has_space" != x; then
50261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50262 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50263       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50264     fi
50265 
50266     # Use eval to expand a potential ~
50267     eval path="$path"
50268     if test ! -f "$path" && test ! -d "$path"; then
50269       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50270     fi
50271 
50272     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50273   fi
50274 
50275   MSVCR_DLL=$MSVCR_DLL
50276 
50277 
50278   fi
50279 
50280 
50281 # Check whether --with-msvcp-dll was given.
50282 if test "${with_msvcp_dll+set}" = set; then :
50283   withval=$with_msvcp_dll;
50284 fi
50285 
50286 
50287   if test "x$MSVCP_NAME" != "x"; then
50288     if test "x$with_msvcp_dll" != x; then
50289       # If given explicitely by user, do not probe. If not present, fail directly.
50290 
50291   DLL_NAME="$DLL_NAME"
50292   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50293   METHOD="--with-msvcp-dll"
50294   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50295     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50296 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50297 
50298     # Need to check if the found msvcr is correct architecture
50299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50300 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50301     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50302     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50303       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50304       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50305       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50306         CORRECT_MSVCR_ARCH="PE32 executable"
50307       else
50308         CORRECT_MSVCR_ARCH="PE32+ executable"
50309       fi
50310     else
50311       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50312         CORRECT_MSVCR_ARCH=386
50313       else
50314         CORRECT_MSVCR_ARCH=x86-64
50315       fi
50316     fi
50317     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50318       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50319 $as_echo "ok" >&6; }
50320       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50321       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50322 $as_echo_n "checking for $DLL_NAME... " >&6; }
50323       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50324 $as_echo "$MSVC_DLL" >&6; }
50325     else
50326       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50327 $as_echo "incorrect, ignoring" >&6; }
50328       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50329 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50330     fi
50331   fi
50332 
50333       if test "x$MSVC_DLL" = x; then
50334         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50335       fi
50336     else
50337 
50338   VAR_NAME="MSVCP_DLL"
50339   DLL_NAME="${MSVCP_NAME}"
50340   MSVC_DLL=
50341 
50342   if test "x$MSVC_DLL" = x; then
50343     # Probe: Using well-known location from Visual Studio 10.0
50344     if test "x$VCINSTALLDIR" != x; then
50345       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50346 
50347   windows_path="$CYGWIN_VC_INSTALL_DIR"
50348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50349     unix_path=`$CYGPATH -u "$windows_path"`
50350     CYGWIN_VC_INSTALL_DIR="$unix_path"
50351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50353     CYGWIN_VC_INSTALL_DIR="$unix_path"
50354   fi
50355 
50356       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50357         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50358       else
50359         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50360       fi
50361       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50362 
50363   DLL_NAME="$DLL_NAME"
50364   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50365   METHOD="well-known location in VCINSTALLDIR"
50366   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50367     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50368 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50369 
50370     # Need to check if the found msvcr is correct architecture
50371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50372 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50373     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50374     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50375       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50376       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50377       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50378         CORRECT_MSVCR_ARCH="PE32 executable"
50379       else
50380         CORRECT_MSVCR_ARCH="PE32+ executable"
50381       fi
50382     else
50383       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50384         CORRECT_MSVCR_ARCH=386
50385       else
50386         CORRECT_MSVCR_ARCH=x86-64
50387       fi
50388     fi
50389     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50390       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50391 $as_echo "ok" >&6; }
50392       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50393       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50394 $as_echo_n "checking for $DLL_NAME... " >&6; }
50395       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50396 $as_echo "$MSVC_DLL" >&6; }
50397     else
50398       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50399 $as_echo "incorrect, ignoring" >&6; }
50400       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50401 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50402     fi
50403   fi
50404 
50405     fi
50406   fi
50407 
50408   if test "x$MSVC_DLL" = x; then
50409     # Probe: Check in the Boot JDK directory.
50410     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50411 
50412   DLL_NAME="$DLL_NAME"
50413   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50414   METHOD="well-known location in Boot JDK"
50415   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50416     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50417 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50418 
50419     # Need to check if the found msvcr is correct architecture
50420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50421 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50422     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50423     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50424       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50425       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50426       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50427         CORRECT_MSVCR_ARCH="PE32 executable"
50428       else
50429         CORRECT_MSVCR_ARCH="PE32+ executable"
50430       fi
50431     else
50432       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50433         CORRECT_MSVCR_ARCH=386
50434       else
50435         CORRECT_MSVCR_ARCH=x86-64
50436       fi
50437     fi
50438     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50439       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50440 $as_echo "ok" >&6; }
50441       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50442       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50443 $as_echo_n "checking for $DLL_NAME... " >&6; }
50444       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50445 $as_echo "$MSVC_DLL" >&6; }
50446     else
50447       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50448 $as_echo "incorrect, ignoring" >&6; }
50449       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50450 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50451     fi
50452   fi
50453 
50454   fi
50455 
50456   if test "x$MSVC_DLL" = x; then
50457     # Probe: Look in the Windows system32 directory
50458     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50459 
50460   windows_path="$CYGWIN_SYSTEMROOT"
50461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50462     unix_path=`$CYGPATH -u "$windows_path"`
50463     CYGWIN_SYSTEMROOT="$unix_path"
50464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50466     CYGWIN_SYSTEMROOT="$unix_path"
50467   fi
50468 
50469     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50470 
50471   DLL_NAME="$DLL_NAME"
50472   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50473   METHOD="well-known location in SYSTEMROOT"
50474   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50475     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50476 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50477 
50478     # Need to check if the found msvcr is correct architecture
50479     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50480 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50481     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50483       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50484       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50485       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50486         CORRECT_MSVCR_ARCH="PE32 executable"
50487       else
50488         CORRECT_MSVCR_ARCH="PE32+ executable"
50489       fi
50490     else
50491       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50492         CORRECT_MSVCR_ARCH=386
50493       else
50494         CORRECT_MSVCR_ARCH=x86-64
50495       fi
50496     fi
50497     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50498       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50499 $as_echo "ok" >&6; }
50500       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50501       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50502 $as_echo_n "checking for $DLL_NAME... " >&6; }
50503       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50504 $as_echo "$MSVC_DLL" >&6; }
50505     else
50506       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50507 $as_echo "incorrect, ignoring" >&6; }
50508       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50509 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50510     fi
50511   fi
50512 
50513   fi
50514 
50515   if test "x$MSVC_DLL" = x; then
50516     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50517     if test "x$VS100COMNTOOLS" != x; then
50518       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50519 
50520   windows_path="$CYGWIN_VS_TOOLS_DIR"
50521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50522     unix_path=`$CYGPATH -u "$windows_path"`
50523     CYGWIN_VS_TOOLS_DIR="$unix_path"
50524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50526     CYGWIN_VS_TOOLS_DIR="$unix_path"
50527   fi
50528 
50529       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50530         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50531             | $GREP -i /x64/ | $HEAD --lines 1`
50532       else
50533         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50534             | $GREP -i /x86/ | $HEAD --lines 1`
50535       fi
50536 
50537   DLL_NAME="$DLL_NAME"
50538   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50539   METHOD="search of VS100COMNTOOLS"
50540   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50541     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50542 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50543 
50544     # Need to check if the found msvcr is correct architecture
50545     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50546 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50547     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50548     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50549       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50550       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50551       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50552         CORRECT_MSVCR_ARCH="PE32 executable"
50553       else
50554         CORRECT_MSVCR_ARCH="PE32+ executable"
50555       fi
50556     else
50557       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50558         CORRECT_MSVCR_ARCH=386
50559       else
50560         CORRECT_MSVCR_ARCH=x86-64
50561       fi
50562     fi
50563     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50564       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50565 $as_echo "ok" >&6; }
50566       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50567       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50568 $as_echo_n "checking for $DLL_NAME... " >&6; }
50569       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50570 $as_echo "$MSVC_DLL" >&6; }
50571     else
50572       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50573 $as_echo "incorrect, ignoring" >&6; }
50574       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50575 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50576     fi
50577   fi
50578 
50579     fi
50580   fi
50581 
50582   if test "x$MSVC_DLL" = x; then
50583     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50584     # (This was the original behaviour; kept since it might turn something up)
50585     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50586       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50587         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50588             | $GREP x64 | $HEAD --lines 1`
50589       else
50590         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50591             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50592         if test "x$POSSIBLE_MSVC_DLL" = x; then
50593           # We're grasping at straws now...
50594           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50595               | $HEAD --lines 1`
50596         fi
50597       fi
50598 
50599 
50600   DLL_NAME="$DLL_NAME"
50601   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50602   METHOD="search of VCINSTALLDIR"
50603   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50604     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50605 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50606 
50607     # Need to check if the found msvcr is correct architecture
50608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50609 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50610     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50611     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50612       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50613       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50614       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50615         CORRECT_MSVCR_ARCH="PE32 executable"
50616       else
50617         CORRECT_MSVCR_ARCH="PE32+ executable"
50618       fi
50619     else
50620       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50621         CORRECT_MSVCR_ARCH=386
50622       else
50623         CORRECT_MSVCR_ARCH=x86-64
50624       fi
50625     fi
50626     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50627       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50628 $as_echo "ok" >&6; }
50629       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50630       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50631 $as_echo_n "checking for $DLL_NAME... " >&6; }
50632       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50633 $as_echo "$MSVC_DLL" >&6; }
50634     else
50635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50636 $as_echo "incorrect, ignoring" >&6; }
50637       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50638 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50639     fi
50640   fi
50641 
50642     fi
50643   fi
50644 
50645   if test "x$MSVC_DLL" = x; then
50646     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50647 $as_echo_n "checking for $DLL_NAME... " >&6; }
50648     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50649 $as_echo "no" >&6; }
50650     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50651   fi
50652 
50653   MSVCP_DLL=$MSVC_DLL
50654 
50655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50656 
50657   # Input might be given as Windows format, start by converting to
50658   # unix format.
50659   path="$MSVCP_DLL"
50660   new_path=`$CYGPATH -u "$path"`
50661 
50662   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50663   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50664   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50665   # "foo.exe" is OK but "foo" is an error.
50666   #
50667   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50668   # It is also a way to make sure we got the proper file name for the real test later on.
50669   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50670   if test "x$test_shortpath" = x; then
50671     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50672 $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50673     as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50674   fi
50675 
50676   # Call helper function which possibly converts this using DOS-style short mode.
50677   # If so, the updated path is stored in $new_path.
50678 
50679   input_path="$new_path"
50680   # Check if we need to convert this using DOS-style short mode. If the path
50681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50682   # take no chances and rewrite it.
50683   # Note: m4 eats our [], so we need to use [ and ] instead.
50684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50685   if test "x$has_forbidden_chars" != x; then
50686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50690       # Going to short mode and back again did indeed matter. Since short mode is
50691       # case insensitive, let's make it lowercase to improve readability.
50692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50693       # Now convert it back to Unix-stile (cygpath)
50694       input_path=`$CYGPATH -u "$shortmode_path"`
50695       new_path="$input_path"
50696     fi
50697   fi
50698 
50699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50700   if test "x$test_cygdrive_prefix" = x; then
50701     # As a simple fix, exclude /usr/bin since it's not a real path.
50702     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50704       # a path prefixed by /cygdrive for fixpath to work.
50705       new_path="$CYGWIN_ROOT_PATH$input_path"
50706     fi
50707   fi
50708 
50709 
50710   if test "x$path" != "x$new_path"; then
50711     MSVCP_DLL="$new_path"
50712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50713 $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50714   fi
50715 
50716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50717 
50718   path="$MSVCP_DLL"
50719   has_colon=`$ECHO $path | $GREP ^.:`
50720   new_path="$path"
50721   if test "x$has_colon" = x; then
50722     # Not in mixed or Windows style, start by that.
50723     new_path=`cmd //c echo $path`
50724   fi
50725 
50726 
50727   input_path="$new_path"
50728   # Check if we need to convert this using DOS-style short mode. If the path
50729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50730   # take no chances and rewrite it.
50731   # Note: m4 eats our [], so we need to use [ and ] instead.
50732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50733   if test "x$has_forbidden_chars" != x; then
50734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50735     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50736   fi
50737 
50738 
50739   windows_path="$new_path"
50740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50741     unix_path=`$CYGPATH -u "$windows_path"`
50742     new_path="$unix_path"
50743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50745     new_path="$unix_path"
50746   fi
50747 
50748   if test "x$path" != "x$new_path"; then
50749     MSVCP_DLL="$new_path"
50750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50751 $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50752   fi
50753 
50754   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50755   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50756 
50757   else
50758     # We're on a unix platform. Hooray! :)
50759     path="$MSVCP_DLL"
50760     has_space=`$ECHO "$path" | $GREP " "`
50761     if test "x$has_space" != x; then
50762       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50763 $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50764       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50765     fi
50766 
50767     # Use eval to expand a potential ~
50768     eval path="$path"
50769     if test ! -f "$path" && test ! -d "$path"; then
50770       as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50771     fi
50772 
50773     MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50774   fi
50775 
50776   MSVCP_DLL=$MSVCP_DLL
50777 
50778 
50779     fi
50780   fi
50781 
50782 
50783 
50784 # Check whether --with-dxsdk was given.
50785 if test "${with_dxsdk+set}" = set; then :
50786   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50787 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50788 fi
50789 
50790 
50791 
50792 
50793 # Check whether --with-dxsdk-lib was given.
50794 if test "${with_dxsdk_lib+set}" = set; then :
50795   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50796 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50797 fi
50798 
50799 
50800 
50801 
50802 # Check whether --with-dxsdk-include was given.
50803 if test "${with_dxsdk_include+set}" = set; then :
50804   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50805 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50806 fi
50807 
50808 
50809   fi
50810 
50811 
50812 ###############################################################################
50813 #
50814 # We need to do some final tweaking, when everything else is done.
50815 #
50816 ###############################################################################
50817 
50818 
50819   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50820 
50821 
50822   # The name of the Service Agent jar.
50823   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50824   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50825     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50826   fi
50827 
50828 
50829 
50830     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50831 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50832 
50833     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50834       ENABLE_INTREE_EC=yes
50835       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50836 $as_echo "yes" >&6; }
50837     else
50838       ENABLE_INTREE_EC=no
50839       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50840 $as_echo "no" >&6; }
50841     fi
50842 
50843 
50844 
50845 
50846 ###############################################################################
50847 #
50848 # Configure parts of the build that only affect the build performance,
50849 # not the result.
50850 #
50851 ###############################################################################
50852 
50853 
50854   # How many cores do we have on this build system?
50855 
50856 # Check whether --with-num-cores was given.
50857 if test "${with_num_cores+set}" = set; then :
50858   withval=$with_num_cores;
50859 fi
50860 
50861   if test "x$with_num_cores" = x; then
50862     # The number of cores were not specified, try to probe them.
50863 
50864   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50865 $as_echo_n "checking for number of cores... " >&6; }
50866   NUM_CORES=1
50867   FOUND_CORES=no
50868 
50869   if test -f /proc/cpuinfo; then
50870     # Looks like a Linux (or cygwin) system
50871     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50872     FOUND_CORES=yes
50873   elif test -x /usr/sbin/psrinfo; then
50874     # Looks like a Solaris system
50875     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50876     FOUND_CORES=yes
50877   elif test -x /usr/sbin/system_profiler; then
50878     # Looks like a MacOSX system
50879     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50880     FOUND_CORES=yes
50881   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50882     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50883     FOUND_CORES=yes
50884   elif test -n "$NUMBER_OF_PROCESSORS"; then
50885     # On windows, look in the env
50886     NUM_CORES=$NUMBER_OF_PROCESSORS
50887     FOUND_CORES=yes
50888   fi
50889 
50890   if test "x$FOUND_CORES" = xyes; then
50891     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50892 $as_echo "$NUM_CORES" >&6; }
50893   else
50894     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50895 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
50896     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50897 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50898   fi
50899 
50900   else
50901     NUM_CORES=$with_num_cores
50902   fi
50903 
50904 
50905 
50906   # How much memory do we have on this build system?
50907 
50908 # Check whether --with-memory-size was given.
50909 if test "${with_memory_size+set}" = set; then :
50910   withval=$with_memory_size;
50911 fi
50912 
50913   if test "x$with_memory_size" = x; then
50914     # The memory size was not specified, try to probe it.
50915 
50916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50917 $as_echo_n "checking for memory size... " >&6; }
50918   # Default to 1024 MB
50919   MEMORY_SIZE=1024
50920   FOUND_MEM=no
50921 
50922   if test -f /proc/meminfo; then
50923     # Looks like a Linux (or cygwin) system
50924     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50925     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50926     FOUND_MEM=yes
50927   elif test -x /usr/sbin/prtconf; then
50928     # Looks like a Solaris or AIX system
50929     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50930     FOUND_MEM=yes
50931   elif test -x /usr/sbin/system_profiler; then
50932     # Looks like a MacOSX system
50933     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50934     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50935     FOUND_MEM=yes
50936   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50937     # Windows, but without cygwin
50938     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50939     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50940     FOUND_MEM=yes
50941   fi
50942 
50943   if test "x$FOUND_MEM" = xyes; then
50944     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50945 $as_echo "$MEMORY_SIZE MB" >&6; }
50946   else
50947     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50948 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50949     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50950 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50951   fi
50952 
50953   else
50954     MEMORY_SIZE=$with_memory_size
50955   fi
50956 
50957 
50958 
50959   # Provide a decent default number of parallel jobs for make depending on
50960   # number of cores, amount of memory and machine architecture.
50961 
50962 # Check whether --with-jobs was given.
50963 if test "${with_jobs+set}" = set; then :
50964   withval=$with_jobs;
50965 fi
50966 
50967   if test "x$with_jobs" = x; then
50968     # Number of jobs was not specified, calculate.
50969     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50970 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50971     # Approximate memory in GB.
50972     memory_gb=`expr $MEMORY_SIZE / 1024`
50973     # Pick the lowest of memory in gb and number of cores.
50974     if test "$memory_gb" -lt "$NUM_CORES"; then
50975       JOBS="$memory_gb"
50976     else
50977       JOBS="$NUM_CORES"
50978       # On bigger machines, leave some room for other processes to run
50979       if test "$JOBS" -gt "4"; then
50980         JOBS=`expr $JOBS '*' 90 / 100`
50981       fi
50982     fi
50983     # Cap number of jobs to 16
50984     if test "$JOBS" -gt "16"; then
50985       JOBS=16
50986     fi
50987     if test "$JOBS" -eq "0"; then
50988       JOBS=1
50989     fi
50990     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50991 $as_echo "$JOBS" >&6; }
50992   else
50993     JOBS=$with_jobs
50994   fi
50995 
50996 
50997 
50998 # Setup arguments for the boot jdk (after cores and memory have been setup)
50999 
51000   ##############################################################################
51001   #
51002   # Specify jvm options for anything that is run with the Boot JDK.
51003   # Not all JVM:s accept the same arguments on the command line.
51004   #
51005 
51006 # Check whether --with-boot-jdk-jvmargs was given.
51007 if test "${with_boot_jdk_jvmargs+set}" = set; then :
51008   withval=$with_boot_jdk_jvmargs;
51009 fi
51010 
51011 
51012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51013 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
51014 
51015   # Disable special log output when a debug build is used as Boot JDK...
51016 
51017   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51018   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51019   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51020   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51021   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51022   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51023     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51024     JVM_ARG_OK=true
51025   else
51026     $ECHO "Arg failed:" >&5
51027     $ECHO "$OUTPUT" >&5
51028     JVM_ARG_OK=false
51029   fi
51030 
51031 
51032   # Apply user provided options.
51033 
51034   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51035   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51036   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51037   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51038   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51039   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51040     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51041     JVM_ARG_OK=true
51042   else
51043     $ECHO "Arg failed:" >&5
51044     $ECHO "$OUTPUT" >&5
51045     JVM_ARG_OK=false
51046   fi
51047 
51048 
51049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51050 $as_echo "$boot_jdk_jvmargs" >&6; }
51051 
51052   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51053   JAVA_FLAGS=$boot_jdk_jvmargs
51054 
51055 
51056 
51057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51058 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51059 
51060   # Starting amount of heap memory.
51061 
51062   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51063   $ECHO "Command: $JAVA -Xms64M -version" >&5
51064   OUTPUT=`$JAVA -Xms64M -version 2>&1`
51065   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51066   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51067   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51068     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51069     JVM_ARG_OK=true
51070   else
51071     $ECHO "Arg failed:" >&5
51072     $ECHO "$OUTPUT" >&5
51073     JVM_ARG_OK=false
51074   fi
51075 
51076 
51077   # Maximum amount of heap memory.
51078   # Maximum stack size.
51079   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51080   if test "x$BUILD_NUM_BITS" = x32; then
51081     if test "$JVM_MAX_HEAP" -gt "1100"; then
51082       JVM_MAX_HEAP=1100
51083     elif test "$JVM_MAX_HEAP" -lt "512"; then
51084       JVM_MAX_HEAP=512
51085     fi
51086     STACK_SIZE=768
51087   else
51088     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51089     # pointers are used. Apparently, we need to increase the heap and stack
51090     # space for the jvm. More specifically, when running javac to build huge
51091     # jdk batch
51092     if test "$JVM_MAX_HEAP" -gt "1600"; then
51093       JVM_MAX_HEAP=1600
51094     elif test "$JVM_MAX_HEAP" -lt "512"; then
51095       JVM_MAX_HEAP=512
51096     fi
51097     STACK_SIZE=1536
51098   fi
51099 
51100   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51101   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51102   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51103   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51104   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51105   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51106     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51107     JVM_ARG_OK=true
51108   else
51109     $ECHO "Arg failed:" >&5
51110     $ECHO "$OUTPUT" >&5
51111     JVM_ARG_OK=false
51112   fi
51113 
51114 
51115   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51116   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51117   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51118   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51119   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51120   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51121     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51122     JVM_ARG_OK=true
51123   else
51124     $ECHO "Arg failed:" >&5
51125     $ECHO "$OUTPUT" >&5
51126     JVM_ARG_OK=false
51127   fi
51128 
51129 
51130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51131 $as_echo "$boot_jdk_jvmargs_big" >&6; }
51132 
51133   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51134 
51135 
51136 
51137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51138 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51139 
51140   # Use serial gc for small short lived tools if possible
51141 
51142   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51143   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51144   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51145   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51146   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51147   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51148     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51149     JVM_ARG_OK=true
51150   else
51151     $ECHO "Arg failed:" >&5
51152     $ECHO "$OUTPUT" >&5
51153     JVM_ARG_OK=false
51154   fi
51155 
51156 
51157   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51158   $ECHO "Command: $JAVA -Xms32M -version" >&5
51159   OUTPUT=`$JAVA -Xms32M -version 2>&1`
51160   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51161   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51162   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51163     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51164     JVM_ARG_OK=true
51165   else
51166     $ECHO "Arg failed:" >&5
51167     $ECHO "$OUTPUT" >&5
51168     JVM_ARG_OK=false
51169   fi
51170 
51171 
51172   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51173   $ECHO "Command: $JAVA -Xmx512M -version" >&5
51174   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51175   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51176   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51177   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51178     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51179     JVM_ARG_OK=true
51180   else
51181     $ECHO "Arg failed:" >&5
51182     $ECHO "$OUTPUT" >&5
51183     JVM_ARG_OK=false
51184   fi
51185 
51186 
51187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51188 $as_echo "$boot_jdk_jvmargs_small" >&6; }
51189 
51190   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51191 
51192 
51193   JAVA_TOOL_FLAGS_SMALL=""
51194   for f in $JAVA_FLAGS_SMALL; do
51195     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51196   done
51197 
51198 
51199 
51200 # Setup smart javac (after cores and memory have been setup)
51201 
51202 
51203 # Check whether --with-sjavac-server-java was given.
51204 if test "${with_sjavac_server_java+set}" = set; then :
51205   withval=$with_sjavac_server_java;
51206 fi
51207 
51208 
51209   if test "x$with_sjavac_server_java" != x; then
51210     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51211     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51212     if test "x$FOUND_VERSION" = x; then
51213       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51214     fi
51215   else
51216     SJAVAC_SERVER_JAVA="$JAVA"
51217   fi
51218 
51219 
51220   if test "$MEMORY_SIZE" -gt "3000"; then
51221 
51222   $ECHO "Check if jvm arg is ok: -d64" >&5
51223   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51224   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51225   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51226   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51227   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51228     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51229     JVM_ARG_OK=true
51230   else
51231     $ECHO "Arg failed:" >&5
51232     $ECHO "$OUTPUT" >&5
51233     JVM_ARG_OK=false
51234   fi
51235 
51236     if test "$JVM_ARG_OK" = true; then
51237       JVM_64BIT=true
51238       JVM_ARG_OK=false
51239     fi
51240   fi
51241 
51242   MX_VALUE=`expr $MEMORY_SIZE / 2`
51243   if test "$JVM_64BIT" = true; then
51244     # Set ms lower than mx since more than one instance of the server might
51245     # get launched at the same time before they figure out which instance won.
51246     MS_VALUE=512
51247     if test "$MX_VALUE" -gt "2048"; then
51248       MX_VALUE=2048
51249     fi
51250   else
51251     MS_VALUE=256
51252     if test "$MX_VALUE" -gt "1500"; then
51253       MX_VALUE=1500
51254     fi
51255   fi
51256   if test "$MX_VALUE" -lt "512"; then
51257     MX_VALUE=512
51258   fi
51259 
51260   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51261   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51262   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51263   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51264   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51265   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51266     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51267     JVM_ARG_OK=true
51268   else
51269     $ECHO "Arg failed:" >&5
51270     $ECHO "$OUTPUT" >&5
51271     JVM_ARG_OK=false
51272   fi
51273 
51274 
51275 
51276   # Check whether --enable-sjavac was given.
51277 if test "${enable_sjavac+set}" = set; then :
51278   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51279 else
51280   ENABLE_SJAVAC='no'
51281 fi
51282 
51283   if test "x$JVM_ARG_OK" = "xfalse"; then
51284     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51285 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51286     ENABLE_SJAVAC=no;
51287   fi
51288   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51289 $as_echo_n "checking whether to use sjavac... " >&6; }
51290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51291 $as_echo "$ENABLE_SJAVAC" >&6; }
51292 
51293 
51294   if test "x$ENABLE_SJAVAC" = xyes; then
51295     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51296   else
51297     SJAVAC_SERVER_DIR=
51298   fi
51299 
51300 
51301 
51302 # Can the C/C++ compiler use precompiled headers?
51303 
51304 
51305   ###############################################################################
51306   #
51307   # Can the C/C++ compiler use precompiled headers?
51308   #
51309   # Check whether --enable-precompiled-headers was given.
51310 if test "${enable_precompiled_headers+set}" = set; then :
51311   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51312 else
51313   ENABLE_PRECOMPH=yes
51314 fi
51315 
51316 
51317   USE_PRECOMPILED_HEADER=1
51318   if test "x$ENABLE_PRECOMPH" = xno; then
51319     USE_PRECOMPILED_HEADER=0
51320   fi
51321 
51322   if test "x$ENABLE_PRECOMPH" = xyes; then
51323     # Check that the compiler actually supports precomp headers.
51324     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51325       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51326 $as_echo_n "checking that precompiled headers work... " >&6; }
51327       echo "int alfa();" > conftest.h
51328       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51329       if test ! -f conftest.hpp.gch; then
51330         USE_PRECOMPILED_HEADER=0
51331         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51332 $as_echo "no" >&6; }
51333       else
51334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51335 $as_echo "yes" >&6; }
51336       fi
51337       rm -f conftest.h conftest.hpp.gch
51338     fi
51339   fi
51340 
51341 
51342 
51343 
51344 # Setup use of ccache, if available
51345 
51346   # Check whether --enable-ccache was given.
51347 if test "${enable_ccache+set}" = set; then :
51348   enableval=$enable_ccache;
51349 fi
51350 
51351 
51352   CCACHE=
51353   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51354 $as_echo_n "checking is ccache enabled... " >&6; }
51355   ENABLE_CCACHE=$enable_ccache
51356   if test "x$enable_ccache" = xyes; then
51357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51358 $as_echo "yes" >&6; }
51359     OLD_PATH="$PATH"
51360     if test "x$TOOLCHAIN_PATH" != x; then
51361       PATH=$TOOLCHAIN_PATH:$PATH
51362     fi
51363 
51364 
51365 
51366   # Publish this variable in the help.
51367 
51368 
51369   if test "x$CCACHE" = x; then
51370     # The variable is not set by user, try to locate tool using the code snippet
51371     for ac_prog in ccache
51372 do
51373   # Extract the first word of "$ac_prog", so it can be a program name with args.
51374 set dummy $ac_prog; ac_word=$2
51375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51376 $as_echo_n "checking for $ac_word... " >&6; }
51377 if ${ac_cv_path_CCACHE+:} false; then :
51378   $as_echo_n "(cached) " >&6
51379 else
51380   case $CCACHE in
51381   [\\/]* | ?:[\\/]*)
51382   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51383   ;;
51384   *)
51385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51386 for as_dir in $PATH
51387 do
51388   IFS=$as_save_IFS
51389   test -z "$as_dir" && as_dir=.
51390     for ac_exec_ext in '' $ac_executable_extensions; do
51391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51392     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51394     break 2
51395   fi
51396 done
51397   done
51398 IFS=$as_save_IFS
51399 
51400   ;;
51401 esac
51402 fi
51403 CCACHE=$ac_cv_path_CCACHE
51404 if test -n "$CCACHE"; then
51405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51406 $as_echo "$CCACHE" >&6; }
51407 else
51408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51409 $as_echo "no" >&6; }
51410 fi
51411 
51412 
51413   test -n "$CCACHE" && break
51414 done
51415 
51416   else
51417     # The variable is set, but is it from the command line or the environment?
51418 
51419     # Try to remove the string !CCACHE! from our list.
51420     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51421     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51422       # If it failed, the variable was not from the command line. Ignore it,
51423       # but warn the user (except for BASH, which is always set by the calling BASH).
51424       if test "xCCACHE" != xBASH; then
51425         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51426 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51427       fi
51428       # Try to locate tool using the code snippet
51429       for ac_prog in ccache
51430 do
51431   # Extract the first word of "$ac_prog", so it can be a program name with args.
51432 set dummy $ac_prog; ac_word=$2
51433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51434 $as_echo_n "checking for $ac_word... " >&6; }
51435 if ${ac_cv_path_CCACHE+:} false; then :
51436   $as_echo_n "(cached) " >&6
51437 else
51438   case $CCACHE in
51439   [\\/]* | ?:[\\/]*)
51440   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51441   ;;
51442   *)
51443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51444 for as_dir in $PATH
51445 do
51446   IFS=$as_save_IFS
51447   test -z "$as_dir" && as_dir=.
51448     for ac_exec_ext in '' $ac_executable_extensions; do
51449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51450     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51452     break 2
51453   fi
51454 done
51455   done
51456 IFS=$as_save_IFS
51457 
51458   ;;
51459 esac
51460 fi
51461 CCACHE=$ac_cv_path_CCACHE
51462 if test -n "$CCACHE"; then
51463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51464 $as_echo "$CCACHE" >&6; }
51465 else
51466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51467 $as_echo "no" >&6; }
51468 fi
51469 
51470 
51471   test -n "$CCACHE" && break
51472 done
51473 
51474     else
51475       # If it succeeded, then it was overridden by the user. We will use it
51476       # for the tool.
51477 
51478       # First remove it from the list of overridden variables, so we can test
51479       # for unknown variables in the end.
51480       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51481 
51482       # Check if the provided tool contains a complete path.
51483       tool_specified="$CCACHE"
51484       tool_basename="${tool_specified##*/}"
51485       if test "x$tool_basename" = "x$tool_specified"; then
51486         # A command without a complete path is provided, search $PATH.
51487         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51488 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51489         # Extract the first word of "$tool_basename", so it can be a program name with args.
51490 set dummy $tool_basename; ac_word=$2
51491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51492 $as_echo_n "checking for $ac_word... " >&6; }
51493 if ${ac_cv_path_CCACHE+:} false; then :
51494   $as_echo_n "(cached) " >&6
51495 else
51496   case $CCACHE in
51497   [\\/]* | ?:[\\/]*)
51498   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51499   ;;
51500   *)
51501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51502 for as_dir in $PATH
51503 do
51504   IFS=$as_save_IFS
51505   test -z "$as_dir" && as_dir=.
51506     for ac_exec_ext in '' $ac_executable_extensions; do
51507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51508     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51510     break 2
51511   fi
51512 done
51513   done
51514 IFS=$as_save_IFS
51515 
51516   ;;
51517 esac
51518 fi
51519 CCACHE=$ac_cv_path_CCACHE
51520 if test -n "$CCACHE"; then
51521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51522 $as_echo "$CCACHE" >&6; }
51523 else
51524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51525 $as_echo "no" >&6; }
51526 fi
51527 
51528 
51529         if test "x$CCACHE" = x; then
51530           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51531         fi
51532       else
51533         # Otherwise we believe it is a complete path. Use it as it is.
51534         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51535 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51536         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51537 $as_echo_n "checking for CCACHE... " >&6; }
51538         if test ! -x "$tool_specified"; then
51539           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51540 $as_echo "not found" >&6; }
51541           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51542         fi
51543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51544 $as_echo "$tool_specified" >&6; }
51545       fi
51546     fi
51547   fi
51548 
51549 
51550 
51551   if test "x$CCACHE" = x; then
51552     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51553   fi
51554 
51555 
51556     CCACHE_STATUS="enabled"
51557     PATH="$OLD_PATH"
51558   elif test "x$enable_ccache" = xno; then
51559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51560 $as_echo "no, explicitly disabled" >&6; }
51561   elif test "x$enable_ccache" = x; then
51562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51563 $as_echo "no" >&6; }
51564   else
51565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51566 $as_echo "unknown" >&6; }
51567     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51568   fi
51569 
51570 
51571 
51572 # Check whether --with-ccache-dir was given.
51573 if test "${with_ccache_dir+set}" = set; then :
51574   withval=$with_ccache_dir;
51575 fi
51576 
51577 
51578   if test "x$with_ccache_dir" != x; then
51579     # When using a non home ccache directory, assume the use is to share ccache files
51580     # with other users. Thus change the umask.
51581     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51582     if test "x$CCACHE" = x; then
51583       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51584 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51585     fi
51586   fi
51587 
51588   if test "x$CCACHE" != x; then
51589 
51590   if test "x$CCACHE" != x; then
51591     # Only use ccache if it is 3.1.4 or later, which supports
51592     # precompiled headers.
51593     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51594 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51595     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51596     if test "x$HAS_GOOD_CCACHE" = x; then
51597       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51598 $as_echo "no, disabling ccache" >&6; }
51599       CCACHE=
51600       CCACHE_STATUS="disabled"
51601     else
51602       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51603 $as_echo "yes" >&6; }
51604       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51605 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51606       PUSHED_FLAGS="$CXXFLAGS"
51607       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51608       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51609 /* end confdefs.h.  */
51610 
51611 int
51612 main ()
51613 {
51614 
51615   ;
51616   return 0;
51617 }
51618 _ACEOF
51619 if ac_fn_cxx_try_compile "$LINENO"; then :
51620   CC_KNOWS_CCACHE_TRICK=yes
51621 else
51622   CC_KNOWS_CCACHE_TRICK=no
51623 fi
51624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51625       CXXFLAGS="$PUSHED_FLAGS"
51626       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51628 $as_echo "yes" >&6; }
51629       else
51630         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51631 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
51632         CCACHE=
51633         CCACHE_STATUS="disabled"
51634       fi
51635     fi
51636   fi
51637 
51638   if test "x$CCACHE" != x; then
51639     CCACHE_SLOPPINESS=time_macros
51640     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51641     CCACHE_FLAGS=-fpch-preprocess
51642 
51643     if test "x$SET_CCACHE_DIR" != x; then
51644       mkdir -p $CCACHE_DIR > /dev/null 2>&1
51645       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51646     fi
51647   fi
51648 
51649   fi
51650 
51651 
51652 ###############################################################################
51653 #
51654 # And now the finish...
51655 #
51656 ###############################################################################
51657 
51658 # Check for some common pitfalls
51659 
51660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51661     file_to_test="$SRC_ROOT/LICENSE"
51662     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51663       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
51664     fi
51665   fi
51666 
51667 
51668   # Did user specify any unknown variables?
51669 
51670   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51671     # Replace the separating ! with spaces before presenting for end user.
51672     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51673     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51674 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51675   fi
51676 
51677 
51678   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51679 $as_echo_n "checking if build directory is on local disk... " >&6; }
51680 
51681   # df -l lists only local disks; if the given directory is not found then
51682   # a non-zero exit code is given
51683   if test "x$DF" = x; then
51684     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51685       # msys does not have df; use Windows "net use" instead.
51686       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51687       if test "x$IS_NETWORK_DISK" = x; then
51688         OUTPUT_DIR_IS_LOCAL="yes"
51689       else
51690         OUTPUT_DIR_IS_LOCAL="no"
51691       fi
51692     else
51693       # No df here, say it's local
51694       OUTPUT_DIR_IS_LOCAL="yes"
51695     fi
51696   else
51697     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51698       OUTPUT_DIR_IS_LOCAL="yes"
51699     else
51700       OUTPUT_DIR_IS_LOCAL="no"
51701     fi
51702   fi
51703 
51704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51705 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51706 
51707 
51708 
51709   # Check if the user has any old-style ALT_ variables set.
51710   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51711 
51712   # Before generating output files, test if they exist. If they do, this is a reconfigure.
51713   # Since we can't properly handle the dependencies for this, warn the user about the situation
51714   if test -e $OUTPUT_ROOT/spec.gmk; then
51715     IS_RECONFIGURE=yes
51716   else
51717     IS_RECONFIGURE=no
51718   fi
51719 
51720 
51721 # At the end, call the custom hook. (Dummy macro if no custom sources available)
51722 
51723 
51724 # We're messing a bit with internal autoconf variables to put the config.status
51725 # in the output directory instead of the current directory.
51726 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51727 
51728 # Create the actual output files. Now the main work of configure is done.
51729 cat >confcache <<\_ACEOF
51730 # This file is a shell script that caches the results of configure
51731 # tests run on this system so they can be shared between configure
51732 # scripts and configure runs, see configure's option --config-cache.
51733 # It is not useful on other systems.  If it contains results you don't
51734 # want to keep, you may remove or edit it.
51735 #
51736 # config.status only pays attention to the cache file if you give it
51737 # the --recheck option to rerun configure.
51738 #
51739 # `ac_cv_env_foo' variables (set or unset) will be overridden when
51740 # loading this file, other *unset* `ac_cv_foo' will be assigned the
51741 # following values.
51742 
51743 _ACEOF
51744 
51745 # The following way of writing the cache mishandles newlines in values,
51746 # but we know of no workaround that is simple, portable, and efficient.
51747 # So, we kill variables containing newlines.
51748 # Ultrix sh set writes to stderr and can't be redirected directly,
51749 # and sets the high bit in the cache file unless we assign to the vars.
51750 (
51751   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51752     eval ac_val=\$$ac_var
51753     case $ac_val in #(
51754     *${as_nl}*)
51755       case $ac_var in #(
51756       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51757 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51758       esac
51759       case $ac_var in #(
51760       _ | IFS | as_nl) ;; #(
51761       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51762       *) { eval $ac_var=; unset $ac_var;} ;;
51763       esac ;;
51764     esac
51765   done
51766 
51767   (set) 2>&1 |
51768     case $as_nl`(ac_space=' '; set) 2>&1` in #(
51769     *${as_nl}ac_space=\ *)
51770       # `set' does not quote correctly, so add quotes: double-quote
51771       # substitution turns \\\\ into \\, and sed turns \\ into \.
51772       sed -n \
51773         "s/'/'\\\\''/g;
51774           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51775       ;; #(
51776     *)
51777       # `set' quotes correctly as required by POSIX, so do not add quotes.
51778       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51779       ;;
51780     esac |
51781     sort
51782 ) |
51783   sed '
51784      /^ac_cv_env_/b end
51785      t clear
51786      :clear
51787      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51788      t end
51789      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51790      :end' >>confcache
51791 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51792   if test -w "$cache_file"; then
51793     if test "x$cache_file" != "x/dev/null"; then
51794       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51795 $as_echo "$as_me: updating cache $cache_file" >&6;}
51796       if test ! -f "$cache_file" || test -h "$cache_file"; then
51797         cat confcache >"$cache_file"
51798       else
51799         case $cache_file in #(
51800         */* | ?:*)
51801           mv -f confcache "$cache_file"$$ &&
51802           mv -f "$cache_file"$$ "$cache_file" ;; #(
51803         *)
51804           mv -f confcache "$cache_file" ;;
51805         esac
51806       fi
51807     fi
51808   else
51809     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51810 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51811   fi
51812 fi
51813 rm -f confcache
51814 
51815 test "x$prefix" = xNONE && prefix=$ac_default_prefix
51816 # Let make expand exec_prefix.
51817 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51818 
51819 # Transform confdefs.h into DEFS.
51820 # Protect against shell expansion while executing Makefile rules.
51821 # Protect against Makefile macro expansion.
51822 #
51823 # If the first sed substitution is executed (which looks for macros that
51824 # take arguments), then branch to the quote section.  Otherwise,
51825 # look for a macro that doesn't take arguments.
51826 ac_script='
51827 :mline
51828 /\\$/{
51829  N
51830  s,\\\n,,
51831  b mline
51832 }
51833 t clear
51834 :clear
51835 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
51836 t quote
51837 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
51838 t quote
51839 b any
51840 :quote
51841 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51842 s/\[/\\&/g
51843 s/\]/\\&/g
51844 s/\$/$$/g
51845 H
51846 :any
51847 ${
51848         g
51849         s/^\n//
51850         s/\n/ /g
51851         p
51852 }
51853 '
51854 DEFS=`sed -n "$ac_script" confdefs.h`
51855 
51856 
51857 ac_libobjs=
51858 ac_ltlibobjs=
51859 U=
51860 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51861   # 1. Remove the extension, and $U if already installed.
51862   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51863   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51864   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51865   #    will be set to the directory where LIBOBJS objects are built.
51866   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51867   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51868 done
51869 LIBOBJS=$ac_libobjs
51870 
51871 LTLIBOBJS=$ac_ltlibobjs
51872 
51873 
51874 
51875 : "${CONFIG_STATUS=./config.status}"
51876 ac_write_fail=0
51877 ac_clean_files_save=$ac_clean_files
51878 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51879 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51880 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51881 as_write_fail=0
51882 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51883 #! $SHELL
51884 # Generated by $as_me.
51885 # Run this file to recreate the current configuration.
51886 # Compiler output produced by configure, useful for debugging
51887 # configure, is in config.log if it exists.
51888 
51889 debug=false
51890 ac_cs_recheck=false
51891 ac_cs_silent=false
51892 
51893 SHELL=\${CONFIG_SHELL-$SHELL}
51894 export SHELL
51895 _ASEOF
51896 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51897 ## -------------------- ##
51898 ## M4sh Initialization. ##
51899 ## -------------------- ##
51900 
51901 # Be more Bourne compatible
51902 DUALCASE=1; export DUALCASE # for MKS sh
51903 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51904   emulate sh
51905   NULLCMD=:
51906   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51907   # is contrary to our usage.  Disable this feature.
51908   alias -g '${1+"$@"}'='"$@"'
51909   setopt NO_GLOB_SUBST
51910 else
51911   case `(set -o) 2>/dev/null` in #(
51912   *posix*) :
51913     set -o posix ;; #(
51914   *) :
51915      ;;
51916 esac
51917 fi
51918 
51919 
51920 as_nl='
51921 '
51922 export as_nl
51923 # Printing a long string crashes Solaris 7 /usr/bin/printf.
51924 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51925 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51926 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51927 # Prefer a ksh shell builtin over an external printf program on Solaris,
51928 # but without wasting forks for bash or zsh.
51929 if test -z "$BASH_VERSION$ZSH_VERSION" \
51930     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51931   as_echo='print -r --'
51932   as_echo_n='print -rn --'
51933 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51934   as_echo='printf %s\n'
51935   as_echo_n='printf %s'
51936 else
51937   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51938     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51939     as_echo_n='/usr/ucb/echo -n'
51940   else
51941     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51942     as_echo_n_body='eval
51943       arg=$1;
51944       case $arg in #(
51945       *"$as_nl"*)
51946         expr "X$arg" : "X\\(.*\\)$as_nl";
51947         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51948       esac;
51949       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51950     '
51951     export as_echo_n_body
51952     as_echo_n='sh -c $as_echo_n_body as_echo'
51953   fi
51954   export as_echo_body
51955   as_echo='sh -c $as_echo_body as_echo'
51956 fi
51957 
51958 # The user is always right.
51959 if test "${PATH_SEPARATOR+set}" != set; then
51960   PATH_SEPARATOR=:
51961   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51962     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51963       PATH_SEPARATOR=';'
51964   }
51965 fi
51966 
51967 
51968 # IFS
51969 # We need space, tab and new line, in precisely that order.  Quoting is
51970 # there to prevent editors from complaining about space-tab.
51971 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51972 # splitting by setting IFS to empty value.)
51973 IFS=" ""        $as_nl"
51974 
51975 # Find who we are.  Look in the path if we contain no directory separator.
51976 as_myself=
51977 case $0 in #((
51978   *[\\/]* ) as_myself=$0 ;;
51979   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51980 for as_dir in $PATH
51981 do
51982   IFS=$as_save_IFS
51983   test -z "$as_dir" && as_dir=.
51984     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51985   done
51986 IFS=$as_save_IFS
51987 
51988      ;;
51989 esac
51990 # We did not find ourselves, most probably we were run as `sh COMMAND'
51991 # in which case we are not to be found in the path.
51992 if test "x$as_myself" = x; then
51993   as_myself=$0
51994 fi
51995 if test ! -f "$as_myself"; then
51996   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51997   exit 1
51998 fi
51999 
52000 # Unset variables that we do not need and which cause bugs (e.g. in
52001 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52002 # suppresses any "Segmentation fault" message there.  '((' could
52003 # trigger a bug in pdksh 5.2.14.
52004 for as_var in BASH_ENV ENV MAIL MAILPATH
52005 do eval test x\${$as_var+set} = xset \
52006   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52007 done
52008 PS1='$ '
52009 PS2='> '
52010 PS4='+ '
52011 
52012 # NLS nuisances.
52013 LC_ALL=C
52014 export LC_ALL
52015 LANGUAGE=C
52016 export LANGUAGE
52017 
52018 # CDPATH.
52019 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52020 
52021 
52022 # as_fn_error STATUS ERROR [LINENO LOG_FD]
52023 # ----------------------------------------
52024 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52025 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52026 # script with STATUS, using 1 if that was 0.
52027 as_fn_error ()
52028 {
52029   as_status=$1; test $as_status -eq 0 && as_status=1
52030   if test "$4"; then
52031     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52032     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52033   fi
52034   $as_echo "$as_me: error: $2" >&2
52035   as_fn_exit $as_status
52036 } # as_fn_error
52037 
52038 
52039 # as_fn_set_status STATUS
52040 # -----------------------
52041 # Set $? to STATUS, without forking.
52042 as_fn_set_status ()
52043 {
52044   return $1
52045 } # as_fn_set_status
52046 
52047 # as_fn_exit STATUS
52048 # -----------------
52049 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52050 as_fn_exit ()
52051 {
52052   set +e
52053   as_fn_set_status $1
52054   exit $1
52055 } # as_fn_exit
52056 
52057 # as_fn_unset VAR
52058 # ---------------
52059 # Portably unset VAR.
52060 as_fn_unset ()
52061 {
52062   { eval $1=; unset $1;}
52063 }
52064 as_unset=as_fn_unset
52065 # as_fn_append VAR VALUE
52066 # ----------------------
52067 # Append the text in VALUE to the end of the definition contained in VAR. Take
52068 # advantage of any shell optimizations that allow amortized linear growth over
52069 # repeated appends, instead of the typical quadratic growth present in naive
52070 # implementations.
52071 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52072   eval 'as_fn_append ()
52073   {
52074     eval $1+=\$2
52075   }'
52076 else
52077   as_fn_append ()
52078   {
52079     eval $1=\$$1\$2
52080   }
52081 fi # as_fn_append
52082 
52083 # as_fn_arith ARG...
52084 # ------------------
52085 # Perform arithmetic evaluation on the ARGs, and store the result in the
52086 # global $as_val. Take advantage of shells that can avoid forks. The arguments
52087 # must be portable across $(()) and expr.
52088 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52089   eval 'as_fn_arith ()
52090   {
52091     as_val=$(( $* ))
52092   }'
52093 else
52094   as_fn_arith ()
52095   {
52096     as_val=`expr "$@" || test $? -eq 1`
52097   }
52098 fi # as_fn_arith
52099 
52100 
52101 if expr a : '\(a\)' >/dev/null 2>&1 &&
52102    test "X`expr 00001 : '.*\(...\)'`" = X001; then
52103   as_expr=expr
52104 else
52105   as_expr=false
52106 fi
52107 
52108 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52109   as_basename=basename
52110 else
52111   as_basename=false
52112 fi
52113 
52114 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52115   as_dirname=dirname
52116 else
52117   as_dirname=false
52118 fi
52119 
52120 as_me=`$as_basename -- "$0" ||
52121 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52122          X"$0" : 'X\(//\)$' \| \
52123          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52124 $as_echo X/"$0" |
52125     sed '/^.*\/\([^/][^/]*\)\/*$/{
52126             s//\1/
52127             q
52128           }
52129           /^X\/\(\/\/\)$/{
52130             s//\1/
52131             q
52132           }
52133           /^X\/\(\/\).*/{
52134             s//\1/
52135             q
52136           }
52137           s/.*/./; q'`
52138 
52139 # Avoid depending upon Character Ranges.
52140 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52141 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52142 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52143 as_cr_digits='0123456789'
52144 as_cr_alnum=$as_cr_Letters$as_cr_digits
52145 
52146 ECHO_C= ECHO_N= ECHO_T=
52147 case `echo -n x` in #(((((
52148 -n*)
52149   case `echo 'xy\c'` in
52150   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
52151   xy)  ECHO_C='\c';;
52152   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52153        ECHO_T=' ';;
52154   esac;;
52155 *)
52156   ECHO_N='-n';;
52157 esac
52158 
52159 rm -f conf$$ conf$$.exe conf$$.file
52160 if test -d conf$$.dir; then
52161   rm -f conf$$.dir/conf$$.file
52162 else
52163   rm -f conf$$.dir
52164   mkdir conf$$.dir 2>/dev/null
52165 fi
52166 if (echo >conf$$.file) 2>/dev/null; then
52167   if ln -s conf$$.file conf$$ 2>/dev/null; then
52168     as_ln_s='ln -s'
52169     # ... but there are two gotchas:
52170     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52171     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52172     # In both cases, we have to default to `cp -pR'.
52173     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52174       as_ln_s='cp -pR'
52175   elif ln conf$$.file conf$$ 2>/dev/null; then
52176     as_ln_s=ln
52177   else
52178     as_ln_s='cp -pR'
52179   fi
52180 else
52181   as_ln_s='cp -pR'
52182 fi
52183 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52184 rmdir conf$$.dir 2>/dev/null
52185 
52186 
52187 # as_fn_mkdir_p
52188 # -------------
52189 # Create "$as_dir" as a directory, including parents if necessary.
52190 as_fn_mkdir_p ()
52191 {
52192 
52193   case $as_dir in #(
52194   -*) as_dir=./$as_dir;;
52195   esac
52196   test -d "$as_dir" || eval $as_mkdir_p || {
52197     as_dirs=
52198     while :; do
52199       case $as_dir in #(
52200       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52201       *) as_qdir=$as_dir;;
52202       esac
52203       as_dirs="'$as_qdir' $as_dirs"
52204       as_dir=`$as_dirname -- "$as_dir" ||
52205 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52206          X"$as_dir" : 'X\(//\)[^/]' \| \
52207          X"$as_dir" : 'X\(//\)$' \| \
52208          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52209 $as_echo X"$as_dir" |
52210     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52211             s//\1/
52212             q
52213           }
52214           /^X\(\/\/\)[^/].*/{
52215             s//\1/
52216             q
52217           }
52218           /^X\(\/\/\)$/{
52219             s//\1/
52220             q
52221           }
52222           /^X\(\/\).*/{
52223             s//\1/
52224             q
52225           }
52226           s/.*/./; q'`
52227       test -d "$as_dir" && break
52228     done
52229     test -z "$as_dirs" || eval "mkdir $as_dirs"
52230   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52231 
52232 
52233 } # as_fn_mkdir_p
52234 if mkdir -p . 2>/dev/null; then
52235   as_mkdir_p='mkdir -p "$as_dir"'
52236 else
52237   test -d ./-p && rmdir ./-p
52238   as_mkdir_p=false
52239 fi
52240 
52241 
52242 # as_fn_executable_p FILE
52243 # -----------------------
52244 # Test if FILE is an executable regular file.
52245 as_fn_executable_p ()
52246 {
52247   test -f "$1" && test -x "$1"
52248 } # as_fn_executable_p
52249 as_test_x='test -x'
52250 as_executable_p=as_fn_executable_p
52251 
52252 # Sed expression to map a string onto a valid CPP name.
52253 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52254 
52255 # Sed expression to map a string onto a valid variable name.
52256 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52257 
52258 
52259 exec 6>&1
52260 ## ----------------------------------- ##
52261 ## Main body of $CONFIG_STATUS script. ##
52262 ## ----------------------------------- ##
52263 _ASEOF
52264 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52265 
52266 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52267 # Save the log message, to keep $0 and so on meaningful, and to
52268 # report actual input values of CONFIG_FILES etc. instead of their
52269 # values after options handling.
52270 ac_log="
52271 This file was extended by OpenJDK $as_me jdk9, which was
52272 generated by GNU Autoconf 2.69.  Invocation command line was
52273 
52274   CONFIG_FILES    = $CONFIG_FILES
52275   CONFIG_HEADERS  = $CONFIG_HEADERS
52276   CONFIG_LINKS    = $CONFIG_LINKS
52277   CONFIG_COMMANDS = $CONFIG_COMMANDS
52278   $ $0 $@
52279 
52280 on `(hostname || uname -n) 2>/dev/null | sed 1q`
52281 "
52282 
52283 _ACEOF
52284 
52285 case $ac_config_files in *"
52286 "*) set x $ac_config_files; shift; ac_config_files=$*;;
52287 esac
52288 
52289 
52290 
52291 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52292 # Files that config.status was made for.
52293 config_files="$ac_config_files"
52294 
52295 _ACEOF
52296 
52297 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52298 ac_cs_usage="\
52299 \`$as_me' instantiates files and other configuration actions
52300 from templates according to the current configuration.  Unless the files
52301 and actions are specified as TAGs, all are instantiated by default.
52302 
52303 Usage: $0 [OPTION]... [TAG]...
52304 
52305   -h, --help       print this help, then exit
52306   -V, --version    print version number and configuration settings, then exit
52307       --config     print configuration, then exit
52308   -q, --quiet, --silent
52309                    do not print progress messages
52310   -d, --debug      don't remove temporary files
52311       --recheck    update $as_me by reconfiguring in the same conditions
52312       --file=FILE[:TEMPLATE]
52313                    instantiate the configuration file FILE
52314 
52315 Configuration files:
52316 $config_files
52317 
52318 Report bugs to <build-dev@openjdk.java.net>.
52319 OpenJDK home page: <http://openjdk.java.net>."
52320 
52321 _ACEOF
52322 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52323 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52324 ac_cs_version="\\
52325 OpenJDK config.status jdk9
52326 configured by $0, generated by GNU Autoconf 2.69,
52327   with options \\"\$ac_cs_config\\"
52328 
52329 Copyright (C) 2012 Free Software Foundation, Inc.
52330 This config.status script is free software; the Free Software Foundation
52331 gives unlimited permission to copy, distribute and modify it."
52332 
52333 ac_pwd='$ac_pwd'
52334 srcdir='$srcdir'
52335 AWK='$AWK'
52336 test -n "\$AWK" || AWK=awk
52337 _ACEOF
52338 
52339 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52340 # The default lists apply if the user does not specify any file.
52341 ac_need_defaults=:
52342 while test $# != 0
52343 do
52344   case $1 in
52345   --*=?*)
52346     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52347     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52348     ac_shift=:
52349     ;;
52350   --*=)
52351     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52352     ac_optarg=
52353     ac_shift=:
52354     ;;
52355   *)
52356     ac_option=$1
52357     ac_optarg=$2
52358     ac_shift=shift
52359     ;;
52360   esac
52361 
52362   case $ac_option in
52363   # Handling of the options.
52364   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52365     ac_cs_recheck=: ;;
52366   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52367     $as_echo "$ac_cs_version"; exit ;;
52368   --config | --confi | --conf | --con | --co | --c )
52369     $as_echo "$ac_cs_config"; exit ;;
52370   --debug | --debu | --deb | --de | --d | -d )
52371     debug=: ;;
52372   --file | --fil | --fi | --f )
52373     $ac_shift
52374     case $ac_optarg in
52375     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52376     '') as_fn_error $? "missing file argument" ;;
52377     esac
52378     as_fn_append CONFIG_FILES " '$ac_optarg'"
52379     ac_need_defaults=false;;
52380   --he | --h |  --help | --hel | -h )
52381     $as_echo "$ac_cs_usage"; exit ;;
52382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52383   | -silent | --silent | --silen | --sile | --sil | --si | --s)
52384     ac_cs_silent=: ;;
52385 
52386   # This is an error.
52387   -*) as_fn_error $? "unrecognized option: \`$1'
52388 Try \`$0 --help' for more information." ;;
52389 
52390   *) as_fn_append ac_config_targets " $1"
52391      ac_need_defaults=false ;;
52392 
52393   esac
52394   shift
52395 done
52396 
52397 ac_configure_extra_args=
52398 
52399 if $ac_cs_silent; then
52400   exec 6>/dev/null
52401   ac_configure_extra_args="$ac_configure_extra_args --silent"
52402 fi
52403 
52404 _ACEOF
52405 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52406 if \$ac_cs_recheck; then
52407   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52408   shift
52409   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52410   CONFIG_SHELL='$SHELL'
52411   export CONFIG_SHELL
52412   exec "\$@"
52413 fi
52414 
52415 _ACEOF
52416 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52417 exec 5>>config.log
52418 {
52419   echo
52420   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52421 ## Running $as_me. ##
52422 _ASBOX
52423   $as_echo "$ac_log"
52424 } >&5
52425 
52426 _ACEOF
52427 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52428 _ACEOF
52429 
52430 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52431 
52432 # Handling of arguments.
52433 for ac_config_target in $ac_config_targets
52434 do
52435   case $ac_config_target in
52436     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52437     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52438     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52439     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52440     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52441 
52442   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52443   esac
52444 done
52445 
52446 
52447 # If the user did not use the arguments to specify the items to instantiate,
52448 # then the envvar interface is used.  Set only those that are not.
52449 # We use the long form for the default assignment because of an extremely
52450 # bizarre bug on SunOS 4.1.3.
52451 if $ac_need_defaults; then
52452   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52453 fi
52454 
52455 # Have a temporary directory for convenience.  Make it in the build tree
52456 # simply because there is no reason against having it here, and in addition,
52457 # creating and moving files from /tmp can sometimes cause problems.
52458 # Hook for its removal unless debugging.
52459 # Note that there is a small window in which the directory will not be cleaned:
52460 # after its creation but before its name has been assigned to `$tmp'.
52461 $debug ||
52462 {
52463   tmp= ac_tmp=
52464   trap 'exit_status=$?
52465   : "${ac_tmp:=$tmp}"
52466   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52467 ' 0
52468   trap 'as_fn_exit 1' 1 2 13 15
52469 }
52470 # Create a (secure) tmp directory for tmp files.
52471 
52472 {
52473   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52474   test -d "$tmp"
52475 }  ||
52476 {
52477   tmp=./conf$$-$RANDOM
52478   (umask 077 && mkdir "$tmp")
52479 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52480 ac_tmp=$tmp
52481 
52482 # Set up the scripts for CONFIG_FILES section.
52483 # No need to generate them if there are no CONFIG_FILES.
52484 # This happens for instance with `./config.status config.h'.
52485 if test -n "$CONFIG_FILES"; then
52486 
52487 
52488 ac_cr=`echo X | tr X '\015'`
52489 # On cygwin, bash can eat \r inside `` if the user requested igncr.
52490 # But we know of no other shell where ac_cr would be empty at this
52491 # point, so we can use a bashism as a fallback.
52492 if test "x$ac_cr" = x; then
52493   eval ac_cr=\$\'\\r\'
52494 fi
52495 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52496 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52497   ac_cs_awk_cr='\\r'
52498 else
52499   ac_cs_awk_cr=$ac_cr
52500 fi
52501 
52502 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52503 _ACEOF
52504 
52505 
52506 {
52507   echo "cat >conf$$subs.awk <<_ACEOF" &&
52508   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52509   echo "_ACEOF"
52510 } >conf$$subs.sh ||
52511   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52512 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52513 ac_delim='%!_!# '
52514 for ac_last_try in false false false false false :; do
52515   . ./conf$$subs.sh ||
52516     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52517 
52518   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52519   if test $ac_delim_n = $ac_delim_num; then
52520     break
52521   elif $ac_last_try; then
52522     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52523   else
52524     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52525   fi
52526 done
52527 rm -f conf$$subs.sh
52528 
52529 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52530 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52531 _ACEOF
52532 sed -n '
52533 h
52534 s/^/S["/; s/!.*/"]=/
52535 p
52536 g
52537 s/^[^!]*!//
52538 :repl
52539 t repl
52540 s/'"$ac_delim"'$//
52541 t delim
52542 :nl
52543 h
52544 s/\(.\{148\}\)..*/\1/
52545 t more1
52546 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52547 p
52548 n
52549 b repl
52550 :more1
52551 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52552 p
52553 g
52554 s/.\{148\}//
52555 t nl
52556 :delim
52557 h
52558 s/\(.\{148\}\)..*/\1/
52559 t more2
52560 s/["\\]/\\&/g; s/^/"/; s/$/"/
52561 p
52562 b
52563 :more2
52564 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52565 p
52566 g
52567 s/.\{148\}//
52568 t delim
52569 ' <conf$$subs.awk | sed '
52570 /^[^""]/{
52571   N
52572   s/\n//
52573 }
52574 ' >>$CONFIG_STATUS || ac_write_fail=1
52575 rm -f conf$$subs.awk
52576 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52577 _ACAWK
52578 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52579   for (key in S) S_is_set[key] = 1
52580   FS = ""
52581 
52582 }
52583 {
52584   line = $ 0
52585   nfields = split(line, field, "@")
52586   substed = 0
52587   len = length(field[1])
52588   for (i = 2; i < nfields; i++) {
52589     key = field[i]
52590     keylen = length(key)
52591     if (S_is_set[key]) {
52592       value = S[key]
52593       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52594       len += length(value) + length(field[++i])
52595       substed = 1
52596     } else
52597       len += 1 + keylen
52598   }
52599 
52600   print line
52601 }
52602 
52603 _ACAWK
52604 _ACEOF
52605 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52606 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52607   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52608 else
52609   cat
52610 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52611   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52612 _ACEOF
52613 
52614 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52615 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52616 # trailing colons and then remove the whole line if VPATH becomes empty
52617 # (actually we leave an empty line to preserve line numbers).
52618 if test "x$srcdir" = x.; then
52619   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
52620 h
52621 s///
52622 s/^/:/
52623 s/[      ]*$/:/
52624 s/:\$(srcdir):/:/g
52625 s/:\${srcdir}:/:/g
52626 s/:@srcdir@:/:/g
52627 s/^:*//
52628 s/:*$//
52629 x
52630 s/\(=[   ]*\).*/\1/
52631 G
52632 s/\n//
52633 s/^[^=]*=[       ]*$//
52634 }'
52635 fi
52636 
52637 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52638 fi # test -n "$CONFIG_FILES"
52639 
52640 
52641 eval set X "  :F $CONFIG_FILES      "
52642 shift
52643 for ac_tag
52644 do
52645   case $ac_tag in
52646   :[FHLC]) ac_mode=$ac_tag; continue;;
52647   esac
52648   case $ac_mode$ac_tag in
52649   :[FHL]*:*);;
52650   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52651   :[FH]-) ac_tag=-:-;;
52652   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52653   esac
52654   ac_save_IFS=$IFS
52655   IFS=:
52656   set x $ac_tag
52657   IFS=$ac_save_IFS
52658   shift
52659   ac_file=$1
52660   shift
52661 
52662   case $ac_mode in
52663   :L) ac_source=$1;;
52664   :[FH])
52665     ac_file_inputs=
52666     for ac_f
52667     do
52668       case $ac_f in
52669       -) ac_f="$ac_tmp/stdin";;
52670       *) # Look for the file first in the build tree, then in the source tree
52671          # (if the path is not absolute).  The absolute path cannot be DOS-style,
52672          # because $ac_f cannot contain `:'.
52673          test -f "$ac_f" ||
52674            case $ac_f in
52675            [\\/$]*) false;;
52676            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52677            esac ||
52678            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52679       esac
52680       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52681       as_fn_append ac_file_inputs " '$ac_f'"
52682     done
52683 
52684     # Let's still pretend it is `configure' which instantiates (i.e., don't
52685     # use $as_me), people would be surprised to read:
52686     #    /* config.h.  Generated by config.status.  */
52687     configure_input='Generated from '`
52688           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52689         `' by configure.'
52690     if test x"$ac_file" != x-; then
52691       configure_input="$ac_file.  $configure_input"
52692       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52693 $as_echo "$as_me: creating $ac_file" >&6;}
52694     fi
52695     # Neutralize special characters interpreted by sed in replacement strings.
52696     case $configure_input in #(
52697     *\&* | *\|* | *\\* )
52698        ac_sed_conf_input=`$as_echo "$configure_input" |
52699        sed 's/[\\\\&|]/\\\\&/g'`;; #(
52700     *) ac_sed_conf_input=$configure_input;;
52701     esac
52702 
52703     case $ac_tag in
52704     *:-:* | *:-) cat >"$ac_tmp/stdin" \
52705       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52706     esac
52707     ;;
52708   esac
52709 
52710   ac_dir=`$as_dirname -- "$ac_file" ||
52711 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52712          X"$ac_file" : 'X\(//\)[^/]' \| \
52713          X"$ac_file" : 'X\(//\)$' \| \
52714          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52715 $as_echo X"$ac_file" |
52716     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52717             s//\1/
52718             q
52719           }
52720           /^X\(\/\/\)[^/].*/{
52721             s//\1/
52722             q
52723           }
52724           /^X\(\/\/\)$/{
52725             s//\1/
52726             q
52727           }
52728           /^X\(\/\).*/{
52729             s//\1/
52730             q
52731           }
52732           s/.*/./; q'`
52733   as_dir="$ac_dir"; as_fn_mkdir_p
52734   ac_builddir=.
52735 
52736 case "$ac_dir" in
52737 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52738 *)
52739   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52740   # A ".." for each directory in $ac_dir_suffix.
52741   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52742   case $ac_top_builddir_sub in
52743   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52744   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52745   esac ;;
52746 esac
52747 ac_abs_top_builddir=$ac_pwd
52748 ac_abs_builddir=$ac_pwd$ac_dir_suffix
52749 # for backward compatibility:
52750 ac_top_builddir=$ac_top_build_prefix
52751 
52752 case $srcdir in
52753   .)  # We are building in place.
52754     ac_srcdir=.
52755     ac_top_srcdir=$ac_top_builddir_sub
52756     ac_abs_top_srcdir=$ac_pwd ;;
52757   [\\/]* | ?:[\\/]* )  # Absolute name.
52758     ac_srcdir=$srcdir$ac_dir_suffix;
52759     ac_top_srcdir=$srcdir
52760     ac_abs_top_srcdir=$srcdir ;;
52761   *) # Relative name.
52762     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52763     ac_top_srcdir=$ac_top_build_prefix$srcdir
52764     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52765 esac
52766 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52767 
52768 
52769   case $ac_mode in
52770   :F)
52771   #
52772   # CONFIG_FILE
52773   #
52774 
52775 _ACEOF
52776 
52777 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52778 # If the template does not know about datarootdir, expand it.
52779 # FIXME: This hack should be removed a few years after 2.60.
52780 ac_datarootdir_hack=; ac_datarootdir_seen=
52781 ac_sed_dataroot='
52782 /datarootdir/ {
52783   p
52784   q
52785 }
52786 /@datadir@/p
52787 /@docdir@/p
52788 /@infodir@/p
52789 /@localedir@/p
52790 /@mandir@/p'
52791 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52792 *datarootdir*) ac_datarootdir_seen=yes;;
52793 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52794   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52795 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52796 _ACEOF
52797 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52798   ac_datarootdir_hack='
52799   s&@datadir@&$datadir&g
52800   s&@docdir@&$docdir&g
52801   s&@infodir@&$infodir&g
52802   s&@localedir@&$localedir&g
52803   s&@mandir@&$mandir&g
52804   s&\\\${datarootdir}&$datarootdir&g' ;;
52805 esac
52806 _ACEOF
52807 
52808 # Neutralize VPATH when `$srcdir' = `.'.
52809 # Shell code in configure.ac might set extrasub.
52810 # FIXME: do we really want to maintain this feature?
52811 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52812 ac_sed_extra="$ac_vpsub
52813 $extrasub
52814 _ACEOF
52815 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52816 :t
52817 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52818 s|@configure_input@|$ac_sed_conf_input|;t t
52819 s&@top_builddir@&$ac_top_builddir_sub&;t t
52820 s&@top_build_prefix@&$ac_top_build_prefix&;t t
52821 s&@srcdir@&$ac_srcdir&;t t
52822 s&@abs_srcdir@&$ac_abs_srcdir&;t t
52823 s&@top_srcdir@&$ac_top_srcdir&;t t
52824 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52825 s&@builddir@&$ac_builddir&;t t
52826 s&@abs_builddir@&$ac_abs_builddir&;t t
52827 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52828 $ac_datarootdir_hack
52829 "
52830 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52831   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52832 
52833 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52834   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52835   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
52836       "$ac_tmp/out"`; test -z "$ac_out"; } &&
52837   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52838 which seems to be undefined.  Please make sure it is defined" >&5
52839 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52840 which seems to be undefined.  Please make sure it is defined" >&2;}
52841 
52842   rm -f "$ac_tmp/stdin"
52843   case $ac_file in
52844   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52845   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52846   esac \
52847   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52848  ;;
52849 
52850 
52851 
52852   esac
52853 
52854 done # for ac_tag
52855 
52856 
52857 as_fn_exit 0
52858 _ACEOF
52859 ac_clean_files=$ac_clean_files_save
52860 
52861 test $ac_write_fail = 0 ||
52862   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52863 
52864 
52865 # configure is writing to config.log, and then calls config.status.
52866 # config.status does its own redirection, appending to config.log.
52867 # Unfortunately, on DOS this fails, as config.log is still kept open
52868 # by configure, so config.status won't be able to write to it; its
52869 # output is simply discarded.  So we exec the FD to /dev/null,
52870 # effectively closing config.log, so it can be properly (re)opened and
52871 # appended to by config.status.  When coming back to configure, we
52872 # need to make the FD available again.
52873 if test "$no_create" != yes; then
52874   ac_cs_success=:
52875   ac_config_status_args=
52876   test "$silent" = yes &&
52877     ac_config_status_args="$ac_config_status_args --quiet"
52878   exec 5>/dev/null
52879   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52880   exec 5>>config.log
52881   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52882   # would make configure fail if this is the last instruction.
52883   $ac_cs_success || as_fn_exit 1
52884 fi
52885 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52886   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52887 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52888 fi
52889 
52890 
52891 # Try to move the config.log file to the output directory.
52892 if test -e ./config.log; then
52893   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52894 fi
52895 
52896 # Make the compare script executable
52897 $CHMOD +x $OUTPUT_ROOT/compare.sh
52898 
52899 # Finally output some useful information to the user
52900 
52901   # Finally output some useful information to the user
52902 
52903   printf "\n"
52904   printf "====================================================\n"
52905   if test "x$no_create" != "xyes"; then
52906     if test "x$IS_RECONFIGURE" != "xyes"; then
52907       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52908     else
52909       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52910     fi
52911   else
52912     if test "x$IS_RECONFIGURE" != "xyes"; then
52913       printf "A configuration has been successfully checked but not created\n"
52914     else
52915       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52916     fi
52917   fi
52918   if test "x$CONFIGURE_COMMAND_LINE" != x; then
52919     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52920   else
52921     printf "using default settings.\n"
52922   fi
52923 
52924   printf "\n"
52925   printf "Configuration summary:\n"
52926   printf "* Debug level:    $DEBUG_LEVEL\n"
52927   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52928   printf "* JDK variant:    $JDK_VARIANT\n"
52929   printf "* JVM variants:   $with_jvm_variants\n"
52930   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52931 
52932   printf "\n"
52933   printf "Tools summary:\n"
52934   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52935     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52936   fi
52937   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52938   if test "x$TOOLCHAIN_VERSION" != "x"; then
52939     print_version=" $TOOLCHAIN_VERSION"
52940   fi
52941   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
52942   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52943   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52944 
52945   printf "\n"
52946   printf "Build performance summary:\n"
52947   printf "* Cores to use:   $JOBS\n"
52948   printf "* Memory limit:   $MEMORY_SIZE MB\n"
52949   if test "x$CCACHE_STATUS" != "x"; then
52950     printf "* ccache status:  $CCACHE_STATUS\n"
52951   fi
52952   printf "\n"
52953 
52954   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52955     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52956     printf "will result in longer build times.\n"
52957     printf "\n"
52958   fi
52959 
52960   if test "x$FOUND_ALT_VARIABLES" != "x"; then
52961     printf "WARNING: You have old-style ALT_ environment variables set.\n"
52962     printf "These are not respected, and will be ignored. It is recommended\n"
52963     printf "that you clean your environment. The following variables are set:\n"
52964     printf "$FOUND_ALT_VARIABLES\n"
52965     printf "\n"
52966   fi
52967 
52968   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52969     printf "WARNING: Your build output directory is not on a local disk.\n"
52970     printf "This will severely degrade build performance!\n"
52971     printf "It is recommended that you create an output directory on a local disk,\n"
52972     printf "and run the configure script again from that directory.\n"
52973     printf "\n"
52974   fi
52975 
52976   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52977     printf "WARNING: The result of this configuration has overridden an older\n"
52978     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52979     printf "proper build. Failure to do so might result in strange build problems.\n"
52980     printf "\n"
52981   fi
52982 
52983   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52984     printf "WARNING: The result of this configuration was not saved.\n"
52985     printf "You should run without '--no-create | -n' to create the configuration.\n"
52986     printf "\n"
52987   fi
52988 
52989 
52990 
52991 if test -e "$OUTPUT_ROOT/config.log"; then
52992   $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52993   if test $? -eq 0; then
52994     printf "The following warnings were produced. Repeated here for convenience:\n"
52995     # We must quote sed expression (using []) to stop m4 from eating the [].
52996     $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52997     printf "\n"
52998   fi
52999 fi
53000 
53001