1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 BOOTCYCLE_JVM_ARGS_BIG
 648 JAVA_FLAGS_BIG
 649 JAVA_FLAGS
 650 TEST_JOBS
 651 JOBS
 652 MEMORY_SIZE
 653 NUM_CORES
 654 ENABLE_GENERATE_CLASSLIST
 655 BUILD_FAILURE_HANDLER
 656 ENABLE_INTREE_EC
 657 VALID_JVM_FEATURES
 658 JVM_FEATURES_custom
 659 JVM_FEATURES_zeroshark
 660 JVM_FEATURES_zero
 661 JVM_FEATURES_minimal
 662 JVM_FEATURES_core
 663 JVM_FEATURES_client
 664 JVM_FEATURES_server
 665 INCLUDE_GRAAL
 666 STLPORT_LIB
 667 LIBZIP_CAN_USE_MMAP
 668 LIBDL
 669 LIBM
 670 USE_EXTERNAL_LCMS
 671 LCMS_LIBS
 672 LCMS_CFLAGS
 673 USE_EXTERNAL_LIBZ
 674 USE_EXTERNAL_LIBPNG
 675 PNG_LIBS
 676 PNG_CFLAGS
 677 USE_EXTERNAL_LIBGIF
 678 USE_EXTERNAL_LIBJPEG
 679 LLVM_LIBS
 680 LLVM_LDFLAGS
 681 LLVM_CFLAGS
 682 LLVM_CONFIG
 683 LIBFFI_LIB_FILE
 684 ENABLE_LIBFFI_BUNDLING
 685 LIBFFI_LIBS
 686 LIBFFI_CFLAGS
 687 ALSA_LIBS
 688 ALSA_CFLAGS
 689 FREETYPE_LICENSE
 690 FREETYPE_BUNDLE_LIB_PATH
 691 FREETYPE_LIBS
 692 FREETYPE_CFLAGS
 693 CUPS_CFLAGS
 694 X_EXTRA_LIBS
 695 X_LIBS
 696 X_PRE_LIBS
 697 X_CFLAGS
 698 XMKMF
 699 MSVCP_DLL
 700 MSVCR_DLL
 701 LIBCXX
 702 FIXPATH_DETACH_FLAG
 703 FIXPATH
 704 BUILD_GTEST
 705 ENABLE_CDS
 706 ENABLE_AOT
 707 GCOV_ENABLED
 708 ZIP_EXTERNAL_DEBUG_SYMBOLS
 709 COPY_DEBUG_SYMBOLS
 710 COMPILE_WITH_DEBUG_SYMBOLS
 711 CFLAGS_WARNINGS_ARE_ERRORS
 712 BUILD_CC_DISABLE_WARNING_PREFIX
 713 DISABLE_WARNING_PREFIX
 714 WARNINGS_AS_ERRORS
 715 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 716 LDFLAGS_TESTEXE
 717 LDFLAGS_TESTLIB
 718 CXXFLAGS_TESTEXE
 719 CXXFLAGS_TESTLIB
 720 CFLAGS_TESTEXE
 721 CFLAGS_TESTLIB
 722 OPENJDK_BUILD_JVM_LIBS
 723 OPENJDK_BUILD_JVM_ASFLAGS
 724 OPENJDK_BUILD_JVM_LDFLAGS
 725 OPENJDK_BUILD_JVM_CFLAGS
 726 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 727 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 728 OPENJDK_BUILD_JDKEXE_LIBS
 729 OPENJDK_BUILD_JDKLIB_LIBS
 730 OPENJDK_BUILD_LDFLAGS_JDKEXE
 731 OPENJDK_BUILD_LDFLAGS_JDKLIB
 732 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 733 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 734 OPENJDK_BUILD_CFLAGS_JDKEXE
 735 OPENJDK_BUILD_CFLAGS_JDKLIB
 736 OPENJDK_BUILD_CXXSTD_CXXFLAG
 737 JVM_LIBS
 738 JVM_ASFLAGS
 739 JVM_LDFLAGS
 740 JVM_CFLAGS
 741 LDFLAGS_HASH_STYLE
 742 LDFLAGS_CXX_JDK
 743 JDKEXE_LIBS
 744 JDKLIB_LIBS
 745 LDFLAGS_JDKEXE
 746 LDFLAGS_JDKLIB
 747 CXXFLAGS_JDKEXE
 748 CXXFLAGS_JDKLIB
 749 CFLAGS_JDKEXE
 750 CFLAGS_JDKLIB
 751 MACOSX_VERSION_MAX
 752 MACOSX_VERSION_MIN
 753 CXXSTD_CXXFLAG
 754 JDK_ARCH_ABI_PROP_NAME
 755 CXX_O_FLAG_SIZE
 756 CXX_O_FLAG_NONE
 757 CXX_O_FLAG_DEBUG
 758 CXX_O_FLAG_NORM
 759 CXX_O_FLAG_HI
 760 CXX_O_FLAG_HIGHEST
 761 CXX_O_FLAG_HIGHEST_JVM
 762 C_O_FLAG_SIZE
 763 C_O_FLAG_NONE
 764 C_O_FLAG_DEBUG
 765 C_O_FLAG_NORM
 766 C_O_FLAG_HI
 767 C_O_FLAG_HIGHEST
 768 C_O_FLAG_HIGHEST_JVM
 769 JVM_CFLAGS_SYMBOLS
 770 CXXFLAGS_DEBUG_SYMBOLS
 771 CFLAGS_DEBUG_SYMBOLS
 772 CXX_FLAG_DEPS
 773 C_FLAG_DEPS
 774 SHARED_LIBRARY_FLAGS
 775 SET_SHARED_LIBRARY_MAPFILE
 776 SET_SHARED_LIBRARY_NAME
 777 SET_SHARED_LIBRARY_ORIGIN
 778 SET_EXECUTABLE_ORIGIN
 779 CXX_FLAG_REORDER
 780 C_FLAG_REORDER
 781 JVM_RCFLAGS
 782 RC_FLAGS
 783 AR_OUT_OPTION
 784 LD_OUT_OPTION
 785 EXE_OUT_OPTION
 786 CC_OUT_OPTION
 787 STRIPFLAGS
 788 ARFLAGS
 789 COMPILER_BINDCMD_FILE_FLAG
 790 COMPILER_COMMAND_FILE_FLAG
 791 COMPILER_TARGET_BITS_FLAG
 792 JIB_JAR
 793 JT_HOME
 794 JTREGEXE
 795 HOTSPOT_TOOLCHAIN_TYPE
 796 USING_BROKEN_SUSE_LD
 797 PACKAGE_PATH
 798 BUILD_AS
 799 BUILD_LDCXX
 800 BUILD_LD
 801 BUILD_STRIP
 802 BUILD_OBJCOPY
 803 BUILD_AR
 804 BUILD_NM
 805 BUILD_CXX
 806 BUILD_CC
 807 BUILD_SYSROOT_LDFLAGS
 808 BUILD_SYSROOT_CFLAGS
 809 ac_ct_OBJDUMP
 810 OBJDUMP
 811 ac_ct_OBJCOPY
 812 OBJCOPY
 813 ac_ct_NM
 814 ac_ct_STRIP
 815 GNM
 816 NM
 817 STRIP
 818 MSBUILD
 819 DUMPBIN
 820 RC
 821 MT
 822 LIPO
 823 ac_ct_AR
 824 AR
 825 AS
 826 LDCXX
 827 LD
 828 CXXCPP
 829 CPP
 830 CXX_VERSION_NUMBER
 831 CC_VERSION_NUMBER
 832 ac_ct_CXX
 833 CXXFLAGS
 834 CXX
 835 TOOLCHAIN_PATH_CXX
 836 POTENTIAL_CXX
 837 OBJEXT
 838 EXEEXT
 839 ac_ct_CC
 840 CPPFLAGS
 841 LDFLAGS
 842 CFLAGS
 843 CC
 844 TOOLCHAIN_PATH_CC
 845 POTENTIAL_CC
 846 TOOLCHAIN_VERSION
 847 VS_LIB
 848 VS_INCLUDE
 849 VS_PATH
 850 CYGWIN_LINK
 851 SYSROOT_LDFLAGS
 852 SYSROOT_CFLAGS
 853 EXTRA_LDFLAGS
 854 EXTRA_CXXFLAGS
 855 EXTRA_CFLAGS
 856 EXE_SUFFIX
 857 OBJ_SUFFIX
 858 STATIC_LIBRARY
 859 SHARED_LIBRARY
 860 STATIC_LIBRARY_SUFFIX
 861 SHARED_LIBRARY_SUFFIX
 862 LIBRARY_PREFIX
 863 TOOLCHAIN_TYPE
 864 STATIC_BUILD
 865 IMPORT_MODULES_MAKE
 866 IMPORT_MODULES_SRC
 867 IMPORT_MODULES_MAN
 868 IMPORT_MODULES_LEGAL
 869 IMPORT_MODULES_CONF
 870 IMPORT_MODULES_LIBS
 871 IMPORT_MODULES_CMDS
 872 IMPORT_MODULES_CLASSES
 873 BUILD_OUTPUT
 874 NASHORN_TOPDIR
 875 HOTSPOT_TOPDIR
 876 JAXWS_TOPDIR
 877 JAXP_TOPDIR
 878 CORBA_TOPDIR
 879 LANGTOOLS_TOPDIR
 880 EXTERNAL_BUILDJDK
 881 BUILD_JDK
 882 CREATE_BUILDJDK
 883 JLINK
 884 JMOD
 885 JAVAC_FLAGS
 886 BOOT_JDK_MODULAR
 887 BOOT_JDK_SOURCETARGET
 888 JARSIGNER
 889 JAR
 890 JAVAH
 891 JAVAC
 892 JAVA
 893 BOOT_JDK
 894 JAVA_CHECK
 895 JAVAC_CHECK
 896 VERSION_IS_GA
 897 VERSION_SHORT
 898 VERSION_STRING
 899 VERSION_NUMBER_FOUR_POSITIONS
 900 VERSION_NUMBER
 901 VERSION_OPT
 902 VERSION_BUILD
 903 VERSION_PRE
 904 VERSION_PATCH
 905 VERSION_SECURITY
 906 VERSION_MINOR
 907 VERSION_MAJOR
 908 MACOSX_BUNDLE_ID_BASE
 909 MACOSX_BUNDLE_NAME_BASE
 910 HOTSPOT_VM_DISTRO
 911 COMPANY_NAME
 912 JDK_RC_PLATFORM_NAME
 913 PRODUCT_SUFFIX
 914 PRODUCT_NAME
 915 LAUNCHER_NAME
 916 JLINK_KEEP_PACKAGED_MODULES
 917 COPYRIGHT_YEAR
 918 COMPRESS_JARS
 919 INCLUDE_SA
 920 UNLIMITED_CRYPTO
 921 CACERTS_FILE
 922 ENABLE_FULL_DOCS
 923 ENABLE_HEADLESS_ONLY
 924 DEFAULT_MAKE_TARGET
 925 OS_VERSION_MICRO
 926 OS_VERSION_MINOR
 927 OS_VERSION_MAJOR
 928 PKG_CONFIG
 929 BASH_ARGS
 930 SETFILE
 931 CODESIGN
 932 XATTR
 933 DSYMUTIL
 934 IS_GNU_TIME
 935 PATCH
 936 DTRACE
 937 FLOCK
 938 TIME
 939 STAT
 940 HG
 941 DOT
 942 READELF
 943 OTOOL
 944 LDD
 945 ZIPEXE
 946 UNZIP
 947 TAR_SUPPORTS_TRANSFORM
 948 TAR_INCLUDE_PARAM
 949 TAR_CREATE_EXTRA_PARAM
 950 TAR_TYPE
 951 FIND_DELETE
 952 OUTPUT_SYNC
 953 OUTPUT_SYNC_SUPPORTED
 954 CHECK_TOOLSDIR_MAKE
 955 CHECK_TOOLSDIR_GMAKE
 956 CHECK_MAKE
 957 CHECK_GMAKE
 958 MAKE
 959 PKGHANDLER
 960 CONFIGURESUPPORT_OUTPUTDIR
 961 OUTPUT_ROOT
 962 CONF_NAME
 963 SPEC
 964 SDKROOT
 965 XCODEBUILD
 966 JVM_VARIANT_MAIN
 967 VALID_JVM_VARIANTS
 968 JVM_VARIANTS
 969 DEBUG_LEVEL
 970 HOTSPOT_DEBUG_LEVEL
 971 JDK_VARIANT
 972 USERNAME
 973 CANONICAL_TOPDIR
 974 ORIGINAL_TOPDIR
 975 TOPDIR
 976 PATH_SEP
 977 HOTSPOT_BUILD_CPU_DEFINE
 978 HOTSPOT_BUILD_CPU_ARCH
 979 HOTSPOT_BUILD_CPU
 980 HOTSPOT_BUILD_OS_TYPE
 981 HOTSPOT_BUILD_OS
 982 OPENJDK_BUILD_BUNDLE_PLATFORM
 983 OPENJDK_BUILD_OS_EXPORT_DIR
 984 OPENJDK_BUILD_CPU_OSARCH
 985 OPENJDK_BUILD_CPU_ISADIR
 986 OPENJDK_BUILD_CPU_LEGACY_LIB
 987 OPENJDK_BUILD_CPU_LEGACY
 988 HOTSPOT_TARGET_CPU_DEFINE
 989 HOTSPOT_TARGET_CPU_ARCH
 990 HOTSPOT_TARGET_CPU
 991 HOTSPOT_TARGET_OS_TYPE
 992 HOTSPOT_TARGET_OS
 993 DEFINE_CROSS_COMPILE_ARCH
 994 OPENJDK_TARGET_BUNDLE_PLATFORM
 995 OPENJDK_TARGET_OS_EXPORT_DIR
 996 OPENJDK_TARGET_CPU_OSARCH
 997 OPENJDK_TARGET_CPU_ISADIR
 998 OPENJDK_TARGET_CPU_LEGACY_LIB
 999 OPENJDK_TARGET_CPU_LEGACY
1000 RELEASE_FILE_OS_ARCH
1001 RELEASE_FILE_OS_NAME
1002 OPENJDK_MODULE_TARGET_PLATFORM
1003 COMPILE_TYPE
1004 OPENJDK_TARGET_CPU_ENDIAN
1005 OPENJDK_TARGET_CPU_BITS
1006 OPENJDK_TARGET_CPU_ARCH
1007 OPENJDK_TARGET_CPU
1008 OPENJDK_TARGET_OS_ENV
1009 OPENJDK_TARGET_OS_TYPE
1010 OPENJDK_TARGET_OS
1011 OPENJDK_BUILD_CPU_ENDIAN
1012 OPENJDK_BUILD_CPU_BITS
1013 OPENJDK_BUILD_CPU_ARCH
1014 OPENJDK_BUILD_CPU
1015 OPENJDK_BUILD_OS_ENV
1016 OPENJDK_BUILD_OS_TYPE
1017 OPENJDK_BUILD_OS
1018 OPENJDK_BUILD_AUTOCONF_NAME
1019 OPENJDK_TARGET_AUTOCONF_NAME
1020 target_os
1021 target_vendor
1022 target_cpu
1023 target
1024 host_os
1025 host_vendor
1026 host_cpu
1027 host
1028 build_os
1029 build_vendor
1030 build_cpu
1031 build
1032 PANDOC
1033 NICE
1034 CPIO
1035 DF
1036 READLINK
1037 CYGPATH
1038 SED
1039 FGREP
1040 EGREP
1041 GREP
1042 AWK
1043 XARGS
1044 WHICH
1045 WC
1046 UNIQ
1047 UNAME
1048 TR
1049 TOUCH
1050 TEE
1051 TAR
1052 TAIL
1053 SORT
1054 SH
1055 RMDIR
1056 RM
1057 PRINTF
1058 NAWK
1059 MV
1060 MKTEMP
1061 MKDIR
1062 LS
1063 LN
1064 GZIP
1065 GUNZIP
1066 HEAD
1067 FIND
1068 FILE
1069 EXPR
1070 ECHO
1071 DIRNAME
1072 DIFF
1073 DATE
1074 CUT
1075 CP
1076 COMM
1077 CMP
1078 CHMOD
1079 CAT
1080 BASH
1081 BASENAME
1082 DATE_WHEN_CONFIGURED
1083 ORIGINAL_PATH
1084 CONFIGURE_COMMAND_LINE
1085 target_alias
1086 host_alias
1087 build_alias
1088 LIBS
1089 ECHO_T
1090 ECHO_N
1091 ECHO_C
1092 DEFS
1093 mandir
1094 localedir
1095 libdir
1096 psdir
1097 pdfdir
1098 dvidir
1099 htmldir
1100 infodir
1101 docdir
1102 oldincludedir
1103 includedir
1104 localstatedir
1105 sharedstatedir
1106 sysconfdir
1107 datadir
1108 datarootdir
1109 libexecdir
1110 sbindir
1111 bindir
1112 program_transform_name
1113 prefix
1114 exec_prefix
1115 PACKAGE_URL
1116 PACKAGE_BUGREPORT
1117 PACKAGE_STRING
1118 PACKAGE_VERSION
1119 PACKAGE_TARNAME
1120 PACKAGE_NAME
1121 PATH_SEPARATOR
1122 SHELL'
1123 ac_subst_files=''
1124 ac_user_opts='
1125 enable_option_checking
1126 with_target_bits
1127 enable_openjdk_only
1128 with_custom_make_dir
1129 with_jdk_variant
1130 enable_debug
1131 with_debug_level
1132 with_jvm_variants
1133 with_cpu_port
1134 with_devkit
1135 with_sys_root
1136 with_sysroot
1137 with_tools_dir
1138 with_toolchain_path
1139 with_extra_path
1140 with_sdk_name
1141 with_conf_name
1142 with_output_base_dir
1143 with_output_sync
1144 with_default_make_target
1145 enable_headless_only
1146 enable_full_docs
1147 with_cacerts_file
1148 enable_unlimited_crypto
1149 with_copyright_year
1150 enable_keep_packaged_modules
1151 with_milestone
1152 with_update_version
1153 with_user_release_suffix
1154 with_build_number
1155 with_version_string
1156 with_version_pre
1157 with_version_opt
1158 with_version_build
1159 with_version_major
1160 with_version_minor
1161 with_version_security
1162 with_version_patch
1163 with_boot_jdk
1164 with_build_jdk
1165 with_add_source_root
1166 with_override_source_root
1167 with_adds_and_overrides
1168 with_override_langtools
1169 with_override_corba
1170 with_override_jaxp
1171 with_override_jaxws
1172 with_override_hotspot
1173 with_override_nashorn
1174 with_override_jdk
1175 with_import_hotspot
1176 with_import_modules
1177 enable_static_build
1178 with_toolchain_type
1179 with_extra_cflags
1180 with_extra_cxxflags
1181 with_extra_ldflags
1182 with_toolchain_version
1183 with_build_devkit
1184 with_jtreg
1185 with_jib
1186 with_abi_profile
1187 with_macosx_version_max
1188 enable_warnings_as_errors
1189 with_native_debug_symbols
1190 enable_debug_symbols
1191 enable_zip_debug_info
1192 enable_native_coverage
1193 enable_dtrace
1194 enable_aot
1195 enable_cds
1196 enable_hotspot_gtest
1197 with_stdc__lib
1198 with_msvcr_dll
1199 with_msvcp_dll
1200 with_x
1201 with_cups
1202 with_cups_include
1203 with_freetype
1204 with_freetype_include
1205 with_freetype_lib
1206 with_freetype_src
1207 enable_freetype_bundling
1208 with_freetype_license
1209 with_alsa
1210 with_alsa_include
1211 with_alsa_lib
1212 with_libffi
1213 with_libffi_include
1214 with_libffi_lib
1215 enable_libffi_bundling
1216 with_libjpeg
1217 with_giflib
1218 with_libpng
1219 with_zlib
1220 with_lcms
1221 with_dxsdk
1222 with_dxsdk_lib
1223 with_dxsdk_include
1224 with_jvm_features
1225 with_jvm_interpreter
1226 enable_jtreg_failure_handler
1227 enable_generate_classlist
1228 with_num_cores
1229 with_memory_size
1230 with_jobs
1231 with_test_jobs
1232 with_boot_jdk_jvmargs
1233 with_sjavac_server_java
1234 enable_sjavac
1235 enable_javac_server
1236 enable_icecc
1237 enable_precompiled_headers
1238 enable_ccache
1239 with_ccache_dir
1240 '
1241       ac_precious_vars='build_alias
1242 host_alias
1243 target_alias
1244 BASENAME
1245 BASH
1246 CAT
1247 CHMOD
1248 CMP
1249 COMM
1250 CP
1251 CUT
1252 DATE
1253 DIFF
1254 DIRNAME
1255 ECHO
1256 EXPR
1257 FILE
1258 FIND
1259 HEAD
1260 GUNZIP
1261 GZIP
1262 LN
1263 LS
1264 MKDIR
1265 MKTEMP
1266 MV
1267 NAWK
1268 PRINTF
1269 RM
1270 RMDIR
1271 SH
1272 SORT
1273 TAIL
1274 TAR
1275 TEE
1276 TOUCH
1277 TR
1278 UNAME
1279 UNIQ
1280 WC
1281 WHICH
1282 XARGS
1283 AWK
1284 GREP
1285 EGREP
1286 FGREP
1287 SED
1288 CYGPATH
1289 READLINK
1290 DF
1291 CPIO
1292 NICE
1293 PANDOC
1294 MAKE
1295 UNZIP
1296 ZIPEXE
1297 LDD
1298 OTOOL
1299 READELF
1300 DOT
1301 HG
1302 STAT
1303 TIME
1304 FLOCK
1305 DTRACE
1306 PATCH
1307 DSYMUTIL
1308 XATTR
1309 CODESIGN
1310 SETFILE
1311 PKG_CONFIG
1312 JAVA
1313 JAVAC
1314 JAVAH
1315 JAR
1316 JARSIGNER
1317 CC
1318 CFLAGS
1319 LDFLAGS
1320 LIBS
1321 CPPFLAGS
1322 CXX
1323 CXXFLAGS
1324 CCC
1325 CPP
1326 CXXCPP
1327 AS
1328 AR
1329 LIPO
1330 STRIP
1331 NM
1332 GNM
1333 OBJCOPY
1334 OBJDUMP
1335 BUILD_CC
1336 BUILD_CXX
1337 BUILD_NM
1338 BUILD_AR
1339 BUILD_OBJCOPY
1340 BUILD_STRIP
1341 JTREGEXE
1342 XMKMF
1343 FREETYPE_CFLAGS
1344 FREETYPE_LIBS
1345 ALSA_CFLAGS
1346 ALSA_LIBS
1347 LIBFFI_CFLAGS
1348 LIBFFI_LIBS
1349 PNG_CFLAGS
1350 PNG_LIBS
1351 LCMS_CFLAGS
1352 LCMS_LIBS
1353 ICECC_CMD
1354 ICECC_CREATE_ENV
1355 ICECC_WRAPPER
1356 CCACHE'
1357 
1358 
1359 # Initialize some variables set by options.
1360 ac_init_help=
1361 ac_init_version=false
1362 ac_unrecognized_opts=
1363 ac_unrecognized_sep=
1364 # The variables have the same names as the options, with
1365 # dashes changed to underlines.
1366 cache_file=/dev/null
1367 exec_prefix=NONE
1368 no_create=
1369 no_recursion=
1370 prefix=NONE
1371 program_prefix=NONE
1372 program_suffix=NONE
1373 program_transform_name=s,x,x,
1374 silent=
1375 site=
1376 srcdir=
1377 verbose=
1378 x_includes=NONE
1379 x_libraries=NONE
1380 
1381 # Installation directory options.
1382 # These are left unexpanded so users can "make install exec_prefix=/foo"
1383 # and all the variables that are supposed to be based on exec_prefix
1384 # by default will actually change.
1385 # Use braces instead of parens because sh, perl, etc. also accept them.
1386 # (The list follows the same order as the GNU Coding Standards.)
1387 bindir='${exec_prefix}/bin'
1388 sbindir='${exec_prefix}/sbin'
1389 libexecdir='${exec_prefix}/libexec'
1390 datarootdir='${prefix}/share'
1391 datadir='${datarootdir}'
1392 sysconfdir='${prefix}/etc'
1393 sharedstatedir='${prefix}/com'
1394 localstatedir='${prefix}/var'
1395 includedir='${prefix}/include'
1396 oldincludedir='/usr/include'
1397 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398 infodir='${datarootdir}/info'
1399 htmldir='${docdir}'
1400 dvidir='${docdir}'
1401 pdfdir='${docdir}'
1402 psdir='${docdir}'
1403 libdir='${exec_prefix}/lib'
1404 localedir='${datarootdir}/locale'
1405 mandir='${datarootdir}/man'
1406 
1407 ac_prev=
1408 ac_dashdash=
1409 for ac_option
1410 do
1411   # If the previous option needs an argument, assign it.
1412   if test -n "$ac_prev"; then
1413     eval $ac_prev=\$ac_option
1414     ac_prev=
1415     continue
1416   fi
1417 
1418   case $ac_option in
1419   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420   *=)   ac_optarg= ;;
1421   *)    ac_optarg=yes ;;
1422   esac
1423 
1424   # Accept the important Cygnus configure options, so we can diagnose typos.
1425 
1426   case $ac_dashdash$ac_option in
1427   --)
1428     ac_dashdash=yes ;;
1429 
1430   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431     ac_prev=bindir ;;
1432   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433     bindir=$ac_optarg ;;
1434 
1435   -build | --build | --buil | --bui | --bu)
1436     ac_prev=build_alias ;;
1437   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438     build_alias=$ac_optarg ;;
1439 
1440   -cache-file | --cache-file | --cache-fil | --cache-fi \
1441   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442     ac_prev=cache_file ;;
1443   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445     cache_file=$ac_optarg ;;
1446 
1447   --config-cache | -C)
1448     cache_file=config.cache ;;
1449 
1450   -datadir | --datadir | --datadi | --datad)
1451     ac_prev=datadir ;;
1452   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453     datadir=$ac_optarg ;;
1454 
1455   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456   | --dataroo | --dataro | --datar)
1457     ac_prev=datarootdir ;;
1458   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460     datarootdir=$ac_optarg ;;
1461 
1462   -disable-* | --disable-*)
1463     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464     # Reject names that are not valid shell variable names.
1465     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466       as_fn_error $? "invalid feature name: $ac_useropt"
1467     ac_useropt_orig=$ac_useropt
1468     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469     case $ac_user_opts in
1470       *"
1471 "enable_$ac_useropt"
1472 "*) ;;
1473       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474          ac_unrecognized_sep=', ';;
1475     esac
1476     eval enable_$ac_useropt=no ;;
1477 
1478   -docdir | --docdir | --docdi | --doc | --do)
1479     ac_prev=docdir ;;
1480   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481     docdir=$ac_optarg ;;
1482 
1483   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484     ac_prev=dvidir ;;
1485   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486     dvidir=$ac_optarg ;;
1487 
1488   -enable-* | --enable-*)
1489     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490     # Reject names that are not valid shell variable names.
1491     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492       as_fn_error $? "invalid feature name: $ac_useropt"
1493     ac_useropt_orig=$ac_useropt
1494     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495     case $ac_user_opts in
1496       *"
1497 "enable_$ac_useropt"
1498 "*) ;;
1499       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500          ac_unrecognized_sep=', ';;
1501     esac
1502     eval enable_$ac_useropt=\$ac_optarg ;;
1503 
1504   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506   | --exec | --exe | --ex)
1507     ac_prev=exec_prefix ;;
1508   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510   | --exec=* | --exe=* | --ex=*)
1511     exec_prefix=$ac_optarg ;;
1512 
1513   -gas | --gas | --ga | --g)
1514     # Obsolete; use --with-gas.
1515     with_gas=yes ;;
1516 
1517   -help | --help | --hel | --he | -h)
1518     ac_init_help=long ;;
1519   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520     ac_init_help=recursive ;;
1521   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522     ac_init_help=short ;;
1523 
1524   -host | --host | --hos | --ho)
1525     ac_prev=host_alias ;;
1526   -host=* | --host=* | --hos=* | --ho=*)
1527     host_alias=$ac_optarg ;;
1528 
1529   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530     ac_prev=htmldir ;;
1531   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532   | --ht=*)
1533     htmldir=$ac_optarg ;;
1534 
1535   -includedir | --includedir | --includedi | --included | --include \
1536   | --includ | --inclu | --incl | --inc)
1537     ac_prev=includedir ;;
1538   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539   | --includ=* | --inclu=* | --incl=* | --inc=*)
1540     includedir=$ac_optarg ;;
1541 
1542   -infodir | --infodir | --infodi | --infod | --info | --inf)
1543     ac_prev=infodir ;;
1544   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545     infodir=$ac_optarg ;;
1546 
1547   -libdir | --libdir | --libdi | --libd)
1548     ac_prev=libdir ;;
1549   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550     libdir=$ac_optarg ;;
1551 
1552   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553   | --libexe | --libex | --libe)
1554     ac_prev=libexecdir ;;
1555   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556   | --libexe=* | --libex=* | --libe=*)
1557     libexecdir=$ac_optarg ;;
1558 
1559   -localedir | --localedir | --localedi | --localed | --locale)
1560     ac_prev=localedir ;;
1561   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562     localedir=$ac_optarg ;;
1563 
1564   -localstatedir | --localstatedir | --localstatedi | --localstated \
1565   | --localstate | --localstat | --localsta | --localst | --locals)
1566     ac_prev=localstatedir ;;
1567   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569     localstatedir=$ac_optarg ;;
1570 
1571   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572     ac_prev=mandir ;;
1573   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574     mandir=$ac_optarg ;;
1575 
1576   -nfp | --nfp | --nf)
1577     # Obsolete; use --without-fp.
1578     with_fp=no ;;
1579 
1580   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581   | --no-cr | --no-c | -n)
1582     no_create=yes ;;
1583 
1584   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586     no_recursion=yes ;;
1587 
1588   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590   | --oldin | --oldi | --old | --ol | --o)
1591     ac_prev=oldincludedir ;;
1592   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595     oldincludedir=$ac_optarg ;;
1596 
1597   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598     ac_prev=prefix ;;
1599   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600     prefix=$ac_optarg ;;
1601 
1602   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603   | --program-pre | --program-pr | --program-p)
1604     ac_prev=program_prefix ;;
1605   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607     program_prefix=$ac_optarg ;;
1608 
1609   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610   | --program-suf | --program-su | --program-s)
1611     ac_prev=program_suffix ;;
1612   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614     program_suffix=$ac_optarg ;;
1615 
1616   -program-transform-name | --program-transform-name \
1617   | --program-transform-nam | --program-transform-na \
1618   | --program-transform-n | --program-transform- \
1619   | --program-transform | --program-transfor \
1620   | --program-transfo | --program-transf \
1621   | --program-trans | --program-tran \
1622   | --progr-tra | --program-tr | --program-t)
1623     ac_prev=program_transform_name ;;
1624   -program-transform-name=* | --program-transform-name=* \
1625   | --program-transform-nam=* | --program-transform-na=* \
1626   | --program-transform-n=* | --program-transform-=* \
1627   | --program-transform=* | --program-transfor=* \
1628   | --program-transfo=* | --program-transf=* \
1629   | --program-trans=* | --program-tran=* \
1630   | --progr-tra=* | --program-tr=* | --program-t=*)
1631     program_transform_name=$ac_optarg ;;
1632 
1633   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634     ac_prev=pdfdir ;;
1635   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636     pdfdir=$ac_optarg ;;
1637 
1638   -psdir | --psdir | --psdi | --psd | --ps)
1639     ac_prev=psdir ;;
1640   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641     psdir=$ac_optarg ;;
1642 
1643   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644   | -silent | --silent | --silen | --sile | --sil)
1645     silent=yes ;;
1646 
1647   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648     ac_prev=sbindir ;;
1649   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650   | --sbi=* | --sb=*)
1651     sbindir=$ac_optarg ;;
1652 
1653   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655   | --sharedst | --shareds | --shared | --share | --shar \
1656   | --sha | --sh)
1657     ac_prev=sharedstatedir ;;
1658   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661   | --sha=* | --sh=*)
1662     sharedstatedir=$ac_optarg ;;
1663 
1664   -site | --site | --sit)
1665     ac_prev=site ;;
1666   -site=* | --site=* | --sit=*)
1667     site=$ac_optarg ;;
1668 
1669   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670     ac_prev=srcdir ;;
1671   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672     srcdir=$ac_optarg ;;
1673 
1674   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675   | --syscon | --sysco | --sysc | --sys | --sy)
1676     ac_prev=sysconfdir ;;
1677   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679     sysconfdir=$ac_optarg ;;
1680 
1681   -target | --target | --targe | --targ | --tar | --ta | --t)
1682     ac_prev=target_alias ;;
1683   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684     target_alias=$ac_optarg ;;
1685 
1686   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687     verbose=yes ;;
1688 
1689   -version | --version | --versio | --versi | --vers | -V)
1690     ac_init_version=: ;;
1691 
1692   -with-* | --with-*)
1693     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694     # Reject names that are not valid shell variable names.
1695     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696       as_fn_error $? "invalid package name: $ac_useropt"
1697     ac_useropt_orig=$ac_useropt
1698     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699     case $ac_user_opts in
1700       *"
1701 "with_$ac_useropt"
1702 "*) ;;
1703       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704          ac_unrecognized_sep=', ';;
1705     esac
1706     eval with_$ac_useropt=\$ac_optarg ;;
1707 
1708   -without-* | --without-*)
1709     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710     # Reject names that are not valid shell variable names.
1711     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712       as_fn_error $? "invalid package name: $ac_useropt"
1713     ac_useropt_orig=$ac_useropt
1714     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715     case $ac_user_opts in
1716       *"
1717 "with_$ac_useropt"
1718 "*) ;;
1719       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720          ac_unrecognized_sep=', ';;
1721     esac
1722     eval with_$ac_useropt=no ;;
1723 
1724   --x)
1725     # Obsolete; use --with-x.
1726     with_x=yes ;;
1727 
1728   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729   | --x-incl | --x-inc | --x-in | --x-i)
1730     ac_prev=x_includes ;;
1731   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733     x_includes=$ac_optarg ;;
1734 
1735   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737     ac_prev=x_libraries ;;
1738   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740     x_libraries=$ac_optarg ;;
1741 
1742   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743 Try \`$0 --help' for more information"
1744     ;;
1745 
1746   *=*)
1747     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748     # Reject names that are not valid shell variable names.
1749     case $ac_envvar in #(
1750       '' | [0-9]* | *[!_$as_cr_alnum]* )
1751       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752     esac
1753     eval $ac_envvar=\$ac_optarg
1754     export $ac_envvar ;;
1755 
1756   *)
1757     # FIXME: should be removed in autoconf 3.0.
1758     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762     ;;
1763 
1764   esac
1765 done
1766 
1767 if test -n "$ac_prev"; then
1768   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769   as_fn_error $? "missing argument to $ac_option"
1770 fi
1771 
1772 if test -n "$ac_unrecognized_opts"; then
1773   case $enable_option_checking in
1774     no) ;;
1775     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777   esac
1778 fi
1779 
1780 # Check all directory arguments for consistency.
1781 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782                 datadir sysconfdir sharedstatedir localstatedir includedir \
1783                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784                 libdir localedir mandir
1785 do
1786   eval ac_val=\$$ac_var
1787   # Remove trailing slashes.
1788   case $ac_val in
1789     */ )
1790       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791       eval $ac_var=\$ac_val;;
1792   esac
1793   # Be sure to have absolute directory names.
1794   case $ac_val in
1795     [\\/$]* | ?:[\\/]* )  continue;;
1796     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797   esac
1798   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799 done
1800 
1801 # There might be people who depend on the old broken behavior: `$host'
1802 # used to hold the argument of --host etc.
1803 # FIXME: To remove some day.
1804 build=$build_alias
1805 host=$host_alias
1806 target=$target_alias
1807 
1808 # FIXME: To remove some day.
1809 if test "x$host_alias" != x; then
1810   if test "x$build_alias" = x; then
1811     cross_compiling=maybe
1812   elif test "x$build_alias" != "x$host_alias"; then
1813     cross_compiling=yes
1814   fi
1815 fi
1816 
1817 ac_tool_prefix=
1818 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819 
1820 test "$silent" = yes && exec 6>/dev/null
1821 
1822 
1823 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824 ac_ls_di=`ls -di .` &&
1825 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826   as_fn_error $? "working directory cannot be determined"
1827 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828   as_fn_error $? "pwd does not report name of working directory"
1829 
1830 
1831 # Find the source files, if location was not specified.
1832 if test -z "$srcdir"; then
1833   ac_srcdir_defaulted=yes
1834   # Try the directory containing this script, then the parent directory.
1835   ac_confdir=`$as_dirname -- "$as_myself" ||
1836 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837          X"$as_myself" : 'X\(//\)[^/]' \| \
1838          X"$as_myself" : 'X\(//\)$' \| \
1839          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840 $as_echo X"$as_myself" |
1841     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842             s//\1/
1843             q
1844           }
1845           /^X\(\/\/\)[^/].*/{
1846             s//\1/
1847             q
1848           }
1849           /^X\(\/\/\)$/{
1850             s//\1/
1851             q
1852           }
1853           /^X\(\/\).*/{
1854             s//\1/
1855             q
1856           }
1857           s/.*/./; q'`
1858   srcdir=$ac_confdir
1859   if test ! -r "$srcdir/$ac_unique_file"; then
1860     srcdir=..
1861   fi
1862 else
1863   ac_srcdir_defaulted=no
1864 fi
1865 if test ! -r "$srcdir/$ac_unique_file"; then
1866   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868 fi
1869 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870 ac_abs_confdir=`(
1871         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872         pwd)`
1873 # When building in place, set srcdir=.
1874 if test "$ac_abs_confdir" = "$ac_pwd"; then
1875   srcdir=.
1876 fi
1877 # Remove unnecessary trailing slashes from srcdir.
1878 # Double slashes in file names in object file debugging info
1879 # mess up M-x gdb in Emacs.
1880 case $srcdir in
1881 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882 esac
1883 for ac_var in $ac_precious_vars; do
1884   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885   eval ac_env_${ac_var}_value=\$${ac_var}
1886   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888 done
1889 
1890 #
1891 # Report the --help message.
1892 #
1893 if test "$ac_init_help" = "long"; then
1894   # Omit some internal or obsolete options to make the list less imposing.
1895   # This message is too long to be a string in the A/UX 3.1 sh.
1896   cat <<_ACEOF
1897 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898 
1899 Usage: $0 [OPTION]... [VAR=VALUE]...
1900 
1901 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902 VAR=VALUE.  See below for descriptions of some of the useful variables.
1903 
1904 Defaults for the options are specified in brackets.
1905 
1906 Configuration:
1907   -h, --help              display this help and exit
1908       --help=short        display options specific to this package
1909       --help=recursive    display the short help of all the included packages
1910   -V, --version           display version information and exit
1911   -q, --quiet, --silent   do not print \`checking ...' messages
1912       --cache-file=FILE   cache test results in FILE [disabled]
1913   -C, --config-cache      alias for \`--cache-file=config.cache'
1914   -n, --no-create         do not create output files
1915       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916 
1917 Installation directories:
1918   --prefix=PREFIX         install architecture-independent files in PREFIX
1919                           [$ac_default_prefix]
1920   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                           [PREFIX]
1922 
1923 By default, \`make install' will install all the files in
1924 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926 for instance \`--prefix=\$HOME'.
1927 
1928 For better control, use the options below.
1929 
1930 Fine tuning of the installation directories:
1931   --bindir=DIR            user executables [EPREFIX/bin]
1932   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933   --libexecdir=DIR        program executables [EPREFIX/libexec]
1934   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937   --libdir=DIR            object code libraries [EPREFIX/lib]
1938   --includedir=DIR        C header files [PREFIX/include]
1939   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942   --infodir=DIR           info documentation [DATAROOTDIR/info]
1943   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944   --mandir=DIR            man documentation [DATAROOTDIR/man]
1945   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946   --htmldir=DIR           html documentation [DOCDIR]
1947   --dvidir=DIR            dvi documentation [DOCDIR]
1948   --pdfdir=DIR            pdf documentation [DOCDIR]
1949   --psdir=DIR             ps documentation [DOCDIR]
1950 _ACEOF
1951 
1952   cat <<\_ACEOF
1953 
1954 X features:
1955   --x-includes=DIR    X include files are in DIR
1956   --x-libraries=DIR   X library files are in DIR
1957 
1958 System types:
1959   --build=BUILD     configure for building on BUILD [guessed]
1960   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961   --target=TARGET   configure for building compilers for TARGET [HOST]
1962 _ACEOF
1963 fi
1964 
1965 if test -n "$ac_init_help"; then
1966   case $ac_init_help in
1967      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968    esac
1969   cat <<\_ACEOF
1970 
1971 Optional Features:
1972   --disable-option-checking  ignore unrecognized --enable/--with options
1973   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975   --enable-openjdk-only   suppress building custom source even if present
1976                           [disabled]
1977   --enable-debug          set the debug level to fastdebug (shorthand for
1978                           --with-debug-level=fastdebug) [disabled]
1979   --enable-headless-only  only build headless (no GUI) support [disabled]
1980   --enable-full-docs      build complete documentation [enabled if all tools
1981                           found]
1982   --disable-unlimited-crypto
1983                           Disable unlimited crypto policy [enabled]
1984   --disable-keep-packaged-modules
1985                           Do not keep packaged modules in jdk image [enable]
1986   --enable-static-build   enable static library build [disabled]
1987   --disable-warnings-as-errors
1988                           do not consider native warnings to be an error
1989                           [enabled]
1990   --enable-debug-symbols  Deprecated. Option is kept for backwards
1991                           compatibility and is ignored
1992   --enable-zip-debug-info Deprecated. Option is kept for backwards
1993                           compatibility and is ignored
1994   --enable-native-coverage
1995                           enable native compilation with code coverage
1996                           data[disabled]
1997   --enable-dtrace[=yes/no/auto]
1998                           enable dtrace. Default is auto, where dtrace is
1999                           enabled if all dependencies are present.
2000   --enable-aot[=yes/no/auto]
2001                           enable ahead of time compilation feature. Default is
2002                           auto, where aot is enabled if all dependencies are
2003                           present.
2004   --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
2005                           Default is yes.
2006   --disable-hotspot-gtest Disables building of the Hotspot unit tests
2007   --disable-freetype-bundling
2008                           disable bundling of the freetype library with the
2009                           build result [enabled on Windows or when using
2010                           --with-freetype, disabled otherwise]
2011   --enable-libffi-bundling
2012                           enable bundling of libffi.so to make the built JDK
2013                           runnable on more systems
2014   --enable-jtreg-failure-handler
2015                           forces build of the jtreg failure handler to be
2016                           enabled, missing dependencies become fatal errors.
2017                           Default is auto, where the failure handler is built
2018                           if all dependencies are present and otherwise just
2019                           disabled.
2020   --disable-generate-classlist
2021                           forces enabling or disabling of the generation of a
2022                           CDS classlist at build time. Default is to generate
2023                           it when either the server or client JVMs are built
2024                           and enable-cds is true.
2025   --enable-sjavac         use sjavac to do fast incremental compiles
2026                           [disabled]
2027   --disable-javac-server  disable javac server [enabled]
2028   --enable-icecc          enable distribted compilation of native code using
2029                           icecc/icecream [disabled]
2030   --disable-precompiled-headers
2031                           disable using precompiled headers when compiling C++
2032                           [enabled]
2033   --enable-ccache         enable using ccache to speed up recompilations
2034                           [disabled]
2035 
2036 Optional Packages:
2037   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2038   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2039   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2040                           support it), e.g. --with-target-bits=32 [guessed]
2041   --with-custom-make-dir  Deprecated. Option is kept for backwards
2042                           compatibility and is ignored
2043   --with-jdk-variant      JDK variant to build (normal) [normal]
2044   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2045                           optimized) [release]
2046   --with-jvm-variants     JVM variants (separated by commas) to build
2047                           (server,client,minimal,core,zero,zeroshark,custom)
2048                           [server]
2049   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2050                           (arm64,aarch64) [aarch64]
2051   --with-devkit           use this devkit for compilers, tools and resources
2052   --with-sys-root         alias for --with-sysroot for backwards compatability
2053   --with-sysroot          use this directory as sysroot
2054   --with-tools-dir        alias for --with-toolchain-path for backwards
2055                           compatibility
2056   --with-toolchain-path   prepend these directories when searching for
2057                           toolchain binaries (compilers etc)
2058   --with-extra-path       prepend these directories to the default path
2059   --with-sdk-name         use the platform SDK of the given name. [macosx]
2060   --with-conf-name        use this as the name of the configuration [generated
2061                           from important configuration options]
2062   --with-output-base-dir  override the default output base directory [./build]
2063   --with-output-sync      set make output sync type if supported by make.
2064                           [recurse]
2065   --with-default-make-target
2066                           set the default make target [exploded-image]
2067   --with-cacerts-file     specify alternative cacerts file
2068   --with-copyright-year   Set copyright year value for build [current year]
2069   --with-milestone        Deprecated. Option is kept for backwards
2070                           compatibility and is ignored
2071   --with-update-version   Deprecated. Option is kept for backwards
2072                           compatibility and is ignored
2073   --with-user-release-suffix
2074                           Deprecated. Option is kept for backwards
2075                           compatibility and is ignored
2076   --with-build-number     Deprecated. Option is kept for backwards
2077                           compatibility and is ignored
2078   --with-version-string   Set version string [calculated]
2079   --with-version-pre      Set the base part of the version 'PRE' field
2080                           (pre-release identifier) ['internal']
2081   --with-version-opt      Set version 'OPT' field (build metadata)
2082                           [<timestamp>.<user>.<dirname>]
2083   --with-version-build    Set version 'BUILD' field (build number) [not
2084                           specified]
2085   --with-version-major    Set version 'MAJOR' field (first number) [current
2086                           source value]
2087   --with-version-minor    Set version 'MINOR' field (second number) [current
2088                           source value]
2089   --with-version-security Set version 'SECURITY' field (third number) [current
2090                           source value]
2091   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2092                           specified]
2093   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2094   --with-build-jdk        path to JDK of same version as is being built[the
2095                           newly built JDK]
2096   --with-add-source-root  Deprecated. Option is kept for backwards
2097                           compatibility and is ignored
2098   --with-override-source-root
2099                           Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-adds-and-overrides
2102                           Deprecated. Option is kept for backwards
2103                           compatibility and is ignored
2104   --with-override-langtools
2105                           Deprecated. Option is kept for backwards
2106                           compatibility and is ignored
2107   --with-override-corba   Deprecated. Option is kept for backwards
2108                           compatibility and is ignored
2109   --with-override-jaxp    Deprecated. Option is kept for backwards
2110                           compatibility and is ignored
2111   --with-override-jaxws   Deprecated. Option is kept for backwards
2112                           compatibility and is ignored
2113   --with-override-hotspot Deprecated. Option is kept for backwards
2114                           compatibility and is ignored
2115   --with-override-nashorn Deprecated. Option is kept for backwards
2116                           compatibility and is ignored
2117   --with-override-jdk     Deprecated. Option is kept for backwards
2118                           compatibility and is ignored
2119   --with-import_hotspot   Deprecated. Option is kept for backwards
2120                           compatibility and is ignored
2121   --with-import-modules   import a set of prebuilt modules either as a zip
2122                           file or an exploded directory
2123   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2124                           to show possible values [platform dependent]
2125   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2126   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2127   --with-extra-ldflags    extra flags to be used when linking jdk
2128   --with-toolchain-version
2129                           the version of the toolchain to look for, use
2130                           '--help' to show possible values [platform
2131                           dependent]
2132   --with-build-devkit     Devkit to use for the build platform toolchain
2133   --with-jtreg            Regression Test Harness [probed]
2134   --with-jib              Jib dependency management tool [not used]
2135   --with-abi-profile      specify ABI profile for ARM builds
2136                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2137                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2138                           [toolchain dependent]
2139   --with-macosx-version-max
2140                           error on use of newer functionality. [macosx]
2141   --with-native-debug-symbols
2142                           set the native debug symbol configuration (none,
2143                           internal, external, zipped) [varying]
2144   --with-stdc++lib=<static>,<dynamic>,<default>
2145                           force linking of the C++ runtime on Linux to either
2146                           static or dynamic, default is static with dynamic as
2147                           fallback
2148   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2149                           (Windows only) [probed]
2150   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2151                           (Windows only) [probed]
2152   --with-x                use the X Window System
2153   --with-cups             specify prefix directory for the cups package
2154                           (expecting the headers under PATH/include)
2155   --with-cups-include     specify directory for the cups include files
2156   --with-freetype         specify prefix directory for the freetype package
2157                           (expecting the libraries under PATH/lib and the
2158                           headers under PATH/include)
2159   --with-freetype-include specify directory for the freetype include files
2160   --with-freetype-lib     specify directory for the freetype library
2161   --with-freetype-src     specify directory with freetype sources to
2162                           automatically build the library (experimental,
2163                           Windows-only)
2164   --with-freetype-license if bundling freetype, also bundle this license file
2165   --with-alsa             specify prefix directory for the alsa package
2166                           (expecting the libraries under PATH/lib and the
2167                           headers under PATH/include)
2168   --with-alsa-include     specify directory for the alsa include files
2169   --with-alsa-lib         specify directory for the alsa library
2170   --with-libffi           specify prefix directory for the libffi package
2171                           (expecting the libraries under PATH/lib and the
2172                           headers under PATH/include)
2173   --with-libffi-include   specify directory for the libffi include files
2174   --with-libffi-lib       specify directory for the libffi library
2175   --with-libjpeg          use libjpeg from build system or OpenJDK source
2176                           (system, bundled) [bundled]
2177   --with-giflib           use giflib from build system or OpenJDK source
2178                           (system, bundled) [bundled]
2179   --with-libpng           use libpng from build system or OpenJDK source
2180                           (system, bundled) [bundled]
2181   --with-zlib             use zlib from build system or OpenJDK source
2182                           (system, bundled) [bundled]
2183   --with-lcms             use lcms2 from build system or OpenJDK source
2184                           (system, bundled) [bundled]
2185   --with-dxsdk            Deprecated. Option is kept for backwards
2186                           compatibility and is ignored
2187   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2188                           compatibility and is ignored
2189   --with-dxsdk-include    Deprecated. Option is kept for backwards
2190                           compatibility and is ignored
2191   --with-jvm-features     additional JVM features to enable (separated by
2192                           comma), use '--help' to show possible values [none]
2193   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2194                           compatibility and is ignored
2195   --with-num-cores        number of cores in the build system, e.g.
2196                           --with-num-cores=8 [probed]
2197   --with-memory-size      memory (in MB) available in the build system, e.g.
2198                           --with-memory-size=1024 [probed]
2199   --with-jobs             number of parallel jobs to let make run [calculated
2200                           based on cores and memory]
2201   --with-test-jobs        number of parallel tests jobs to run [based on build
2202                           jobs]
2203   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2204                           invocations of boot JDK, overriding the default
2205                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2206                           -enableassertions"
2207   --with-sjavac-server-java
2208                           use this java binary for running the sjavac
2209                           background server [Boot JDK java]
2210   --with-ccache-dir       where to store ccache files [~/.ccache]
2211 
2212 Some influential environment variables:
2213   BASENAME    Override default value for BASENAME
2214   BASH        Override default value for BASH
2215   CAT         Override default value for CAT
2216   CHMOD       Override default value for CHMOD
2217   CMP         Override default value for CMP
2218   COMM        Override default value for COMM
2219   CP          Override default value for CP
2220   CUT         Override default value for CUT
2221   DATE        Override default value for DATE
2222   DIFF        Override default value for DIFF
2223   DIRNAME     Override default value for DIRNAME
2224   ECHO        Override default value for ECHO
2225   EXPR        Override default value for EXPR
2226   FILE        Override default value for FILE
2227   FIND        Override default value for FIND
2228   HEAD        Override default value for HEAD
2229   GUNZIP      Override default value for GUNZIP
2230   GZIP        Override default value for GZIP
2231   LN          Override default value for LN
2232   LS          Override default value for LS
2233   MKDIR       Override default value for MKDIR
2234   MKTEMP      Override default value for MKTEMP
2235   MV          Override default value for MV
2236   NAWK        Override default value for NAWK
2237   PRINTF      Override default value for PRINTF
2238   RM          Override default value for RM
2239   RMDIR       Override default value for RMDIR
2240   SH          Override default value for SH
2241   SORT        Override default value for SORT
2242   TAIL        Override default value for TAIL
2243   TAR         Override default value for TAR
2244   TEE         Override default value for TEE
2245   TOUCH       Override default value for TOUCH
2246   TR          Override default value for TR
2247   UNAME       Override default value for UNAME
2248   UNIQ        Override default value for UNIQ
2249   WC          Override default value for WC
2250   WHICH       Override default value for WHICH
2251   XARGS       Override default value for XARGS
2252   AWK         Override default value for AWK
2253   GREP        Override default value for GREP
2254   EGREP       Override default value for EGREP
2255   FGREP       Override default value for FGREP
2256   SED         Override default value for SED
2257   CYGPATH     Override default value for CYGPATH
2258   READLINK    Override default value for READLINK
2259   DF          Override default value for DF
2260   CPIO        Override default value for CPIO
2261   NICE        Override default value for NICE
2262   PANDOC      Override default value for PANDOC
2263   MAKE        Override default value for MAKE
2264   UNZIP       Override default value for UNZIP
2265   ZIPEXE      Override default value for ZIPEXE
2266   LDD         Override default value for LDD
2267   OTOOL       Override default value for OTOOL
2268   READELF     Override default value for READELF
2269   DOT         Override default value for DOT
2270   HG          Override default value for HG
2271   STAT        Override default value for STAT
2272   TIME        Override default value for TIME
2273   FLOCK       Override default value for FLOCK
2274   DTRACE      Override default value for DTRACE
2275   PATCH       Override default value for PATCH
2276   DSYMUTIL    Override default value for DSYMUTIL
2277   XATTR       Override default value for XATTR
2278   CODESIGN    Override default value for CODESIGN
2279   SETFILE     Override default value for SETFILE
2280   PKG_CONFIG  path to pkg-config utility
2281   JAVA        Override default value for JAVA
2282   JAVAC       Override default value for JAVAC
2283   JAVAH       Override default value for JAVAH
2284   JAR         Override default value for JAR
2285   JARSIGNER   Override default value for JARSIGNER
2286   CC          C compiler command
2287   CFLAGS      C compiler flags
2288   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2289               nonstandard directory <lib dir>
2290   LIBS        libraries to pass to the linker, e.g. -l<library>
2291   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2292               you have headers in a nonstandard directory <include dir>
2293   CXX         C++ compiler command
2294   CXXFLAGS    C++ compiler flags
2295   CPP         C preprocessor
2296   CXXCPP      C++ preprocessor
2297   AS          Override default value for AS
2298   AR          Override default value for AR
2299   LIPO        Override default value for LIPO
2300   STRIP       Override default value for STRIP
2301   NM          Override default value for NM
2302   GNM         Override default value for GNM
2303   OBJCOPY     Override default value for OBJCOPY
2304   OBJDUMP     Override default value for OBJDUMP
2305   BUILD_CC    Override default value for BUILD_CC
2306   BUILD_CXX   Override default value for BUILD_CXX
2307   BUILD_NM    Override default value for BUILD_NM
2308   BUILD_AR    Override default value for BUILD_AR
2309   BUILD_OBJCOPY
2310               Override default value for BUILD_OBJCOPY
2311   BUILD_STRIP Override default value for BUILD_STRIP
2312   JTREGEXE    Override default value for JTREGEXE
2313   XMKMF       Path to xmkmf, Makefile generator for X Window System
2314   FREETYPE_CFLAGS
2315               C compiler flags for FREETYPE, overriding pkg-config
2316   FREETYPE_LIBS
2317               linker flags for FREETYPE, overriding pkg-config
2318   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2319   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2320   LIBFFI_CFLAGS
2321               C compiler flags for LIBFFI, overriding pkg-config
2322   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2323   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2324   PNG_LIBS    linker flags for PNG, overriding pkg-config
2325   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2326   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2327   ICECC_CMD   Override default value for ICECC_CMD
2328   ICECC_CREATE_ENV
2329               Override default value for ICECC_CREATE_ENV
2330   ICECC_WRAPPER
2331               Override default value for ICECC_WRAPPER
2332   CCACHE      Override default value for CCACHE
2333 
2334 Use these variables to override the choices made by `configure' or to help
2335 it to find libraries and programs with nonstandard names/locations.
2336 
2337 Report bugs to <build-dev@openjdk.java.net>.
2338 OpenJDK home page: <http://openjdk.java.net>.
2339 _ACEOF
2340 ac_status=$?
2341 fi
2342 
2343 if test "$ac_init_help" = "recursive"; then
2344   # If there are subdirs, report their specific --help.
2345   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2346     test -d "$ac_dir" ||
2347       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2348       continue
2349     ac_builddir=.
2350 
2351 case "$ac_dir" in
2352 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353 *)
2354   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2355   # A ".." for each directory in $ac_dir_suffix.
2356   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2357   case $ac_top_builddir_sub in
2358   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2359   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2360   esac ;;
2361 esac
2362 ac_abs_top_builddir=$ac_pwd
2363 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2364 # for backward compatibility:
2365 ac_top_builddir=$ac_top_build_prefix
2366 
2367 case $srcdir in
2368   .)  # We are building in place.
2369     ac_srcdir=.
2370     ac_top_srcdir=$ac_top_builddir_sub
2371     ac_abs_top_srcdir=$ac_pwd ;;
2372   [\\/]* | ?:[\\/]* )  # Absolute name.
2373     ac_srcdir=$srcdir$ac_dir_suffix;
2374     ac_top_srcdir=$srcdir
2375     ac_abs_top_srcdir=$srcdir ;;
2376   *) # Relative name.
2377     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2378     ac_top_srcdir=$ac_top_build_prefix$srcdir
2379     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2380 esac
2381 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2382 
2383     cd "$ac_dir" || { ac_status=$?; continue; }
2384     # Check for guested configure.
2385     if test -f "$ac_srcdir/configure.gnu"; then
2386       echo &&
2387       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2388     elif test -f "$ac_srcdir/configure"; then
2389       echo &&
2390       $SHELL "$ac_srcdir/configure" --help=recursive
2391     else
2392       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2393     fi || ac_status=$?
2394     cd "$ac_pwd" || { ac_status=$?; break; }
2395   done
2396 fi
2397 
2398 test -n "$ac_init_help" && exit $ac_status
2399 if $ac_init_version; then
2400   cat <<\_ACEOF
2401 OpenJDK configure jdk9
2402 generated by GNU Autoconf 2.69
2403 
2404 Copyright (C) 2012 Free Software Foundation, Inc.
2405 This configure script is free software; the Free Software Foundation
2406 gives unlimited permission to copy, distribute and modify it.
2407 _ACEOF
2408   exit
2409 fi
2410 
2411 ## ------------------------ ##
2412 ## Autoconf initialization. ##
2413 ## ------------------------ ##
2414 
2415 # ac_fn_c_try_compile LINENO
2416 # --------------------------
2417 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2418 ac_fn_c_try_compile ()
2419 {
2420   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2421   rm -f conftest.$ac_objext
2422   if { { ac_try="$ac_compile"
2423 case "(($ac_try" in
2424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2425   *) ac_try_echo=$ac_try;;
2426 esac
2427 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2428 $as_echo "$ac_try_echo"; } >&5
2429   (eval "$ac_compile") 2>conftest.err
2430   ac_status=$?
2431   if test -s conftest.err; then
2432     grep -v '^ *+' conftest.err >conftest.er1
2433     cat conftest.er1 >&5
2434     mv -f conftest.er1 conftest.err
2435   fi
2436   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2437   test $ac_status = 0; } && {
2438          test -z "$ac_c_werror_flag" ||
2439          test ! -s conftest.err
2440        } && test -s conftest.$ac_objext; then :
2441   ac_retval=0
2442 else
2443   $as_echo "$as_me: failed program was:" >&5
2444 sed 's/^/| /' conftest.$ac_ext >&5
2445 
2446         ac_retval=1
2447 fi
2448   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2449   as_fn_set_status $ac_retval
2450 
2451 } # ac_fn_c_try_compile
2452 
2453 # ac_fn_cxx_try_compile LINENO
2454 # ----------------------------
2455 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2456 ac_fn_cxx_try_compile ()
2457 {
2458   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2459   rm -f conftest.$ac_objext
2460   if { { ac_try="$ac_compile"
2461 case "(($ac_try" in
2462   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2463   *) ac_try_echo=$ac_try;;
2464 esac
2465 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2466 $as_echo "$ac_try_echo"; } >&5
2467   (eval "$ac_compile") 2>conftest.err
2468   ac_status=$?
2469   if test -s conftest.err; then
2470     grep -v '^ *+' conftest.err >conftest.er1
2471     cat conftest.er1 >&5
2472     mv -f conftest.er1 conftest.err
2473   fi
2474   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2475   test $ac_status = 0; } && {
2476          test -z "$ac_cxx_werror_flag" ||
2477          test ! -s conftest.err
2478        } && test -s conftest.$ac_objext; then :
2479   ac_retval=0
2480 else
2481   $as_echo "$as_me: failed program was:" >&5
2482 sed 's/^/| /' conftest.$ac_ext >&5
2483 
2484         ac_retval=1
2485 fi
2486   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2487   as_fn_set_status $ac_retval
2488 
2489 } # ac_fn_cxx_try_compile
2490 
2491 # ac_fn_c_try_cpp LINENO
2492 # ----------------------
2493 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2494 ac_fn_c_try_cpp ()
2495 {
2496   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2497   if { { ac_try="$ac_cpp conftest.$ac_ext"
2498 case "(($ac_try" in
2499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500   *) ac_try_echo=$ac_try;;
2501 esac
2502 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503 $as_echo "$ac_try_echo"; } >&5
2504   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2505   ac_status=$?
2506   if test -s conftest.err; then
2507     grep -v '^ *+' conftest.err >conftest.er1
2508     cat conftest.er1 >&5
2509     mv -f conftest.er1 conftest.err
2510   fi
2511   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2512   test $ac_status = 0; } > conftest.i && {
2513          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2514          test ! -s conftest.err
2515        }; then :
2516   ac_retval=0
2517 else
2518   $as_echo "$as_me: failed program was:" >&5
2519 sed 's/^/| /' conftest.$ac_ext >&5
2520 
2521     ac_retval=1
2522 fi
2523   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524   as_fn_set_status $ac_retval
2525 
2526 } # ac_fn_c_try_cpp
2527 
2528 # ac_fn_cxx_try_cpp LINENO
2529 # ------------------------
2530 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2531 ac_fn_cxx_try_cpp ()
2532 {
2533   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2534   if { { ac_try="$ac_cpp conftest.$ac_ext"
2535 case "(($ac_try" in
2536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2537   *) ac_try_echo=$ac_try;;
2538 esac
2539 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2540 $as_echo "$ac_try_echo"; } >&5
2541   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2542   ac_status=$?
2543   if test -s conftest.err; then
2544     grep -v '^ *+' conftest.err >conftest.er1
2545     cat conftest.er1 >&5
2546     mv -f conftest.er1 conftest.err
2547   fi
2548   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2549   test $ac_status = 0; } > conftest.i && {
2550          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2551          test ! -s conftest.err
2552        }; then :
2553   ac_retval=0
2554 else
2555   $as_echo "$as_me: failed program was:" >&5
2556 sed 's/^/| /' conftest.$ac_ext >&5
2557 
2558     ac_retval=1
2559 fi
2560   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2561   as_fn_set_status $ac_retval
2562 
2563 } # ac_fn_cxx_try_cpp
2564 
2565 # ac_fn_c_try_link LINENO
2566 # -----------------------
2567 # Try to link conftest.$ac_ext, and return whether this succeeded.
2568 ac_fn_c_try_link ()
2569 {
2570   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571   rm -f conftest.$ac_objext conftest$ac_exeext
2572   if { { ac_try="$ac_link"
2573 case "(($ac_try" in
2574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2575   *) ac_try_echo=$ac_try;;
2576 esac
2577 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2578 $as_echo "$ac_try_echo"; } >&5
2579   (eval "$ac_link") 2>conftest.err
2580   ac_status=$?
2581   if test -s conftest.err; then
2582     grep -v '^ *+' conftest.err >conftest.er1
2583     cat conftest.er1 >&5
2584     mv -f conftest.er1 conftest.err
2585   fi
2586   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2587   test $ac_status = 0; } && {
2588          test -z "$ac_c_werror_flag" ||
2589          test ! -s conftest.err
2590        } && test -s conftest$ac_exeext && {
2591          test "$cross_compiling" = yes ||
2592          test -x conftest$ac_exeext
2593        }; then :
2594   ac_retval=0
2595 else
2596   $as_echo "$as_me: failed program was:" >&5
2597 sed 's/^/| /' conftest.$ac_ext >&5
2598 
2599         ac_retval=1
2600 fi
2601   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2602   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2603   # interfere with the next link command; also delete a directory that is
2604   # left behind by Apple's compiler.  We do this before executing the actions.
2605   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2606   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607   as_fn_set_status $ac_retval
2608 
2609 } # ac_fn_c_try_link
2610 
2611 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2612 # ---------------------------------------------------------
2613 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2614 # the include files in INCLUDES and setting the cache variable VAR
2615 # accordingly.
2616 ac_fn_cxx_check_header_mongrel ()
2617 {
2618   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2619   if eval \${$3+:} false; then :
2620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2621 $as_echo_n "checking for $2... " >&6; }
2622 if eval \${$3+:} false; then :
2623   $as_echo_n "(cached) " >&6
2624 fi
2625 eval ac_res=\$$3
2626                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627 $as_echo "$ac_res" >&6; }
2628 else
2629   # Is the header compilable?
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2631 $as_echo_n "checking $2 usability... " >&6; }
2632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2633 /* end confdefs.h.  */
2634 $4
2635 #include <$2>
2636 _ACEOF
2637 if ac_fn_cxx_try_compile "$LINENO"; then :
2638   ac_header_compiler=yes
2639 else
2640   ac_header_compiler=no
2641 fi
2642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2644 $as_echo "$ac_header_compiler" >&6; }
2645 
2646 # Is the header present?
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2648 $as_echo_n "checking $2 presence... " >&6; }
2649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2650 /* end confdefs.h.  */
2651 #include <$2>
2652 _ACEOF
2653 if ac_fn_cxx_try_cpp "$LINENO"; then :
2654   ac_header_preproc=yes
2655 else
2656   ac_header_preproc=no
2657 fi
2658 rm -f conftest.err conftest.i conftest.$ac_ext
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2660 $as_echo "$ac_header_preproc" >&6; }
2661 
2662 # So?  What about this header?
2663 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2664   yes:no: )
2665     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2666 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2667     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2668 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2669     ;;
2670   no:yes:* )
2671     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2672 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2673     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2674 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2675     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2676 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2677     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2678 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2679     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2680 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2681 ( $as_echo "## ----------------------------------------- ##
2682 ## Report this to build-dev@openjdk.java.net ##
2683 ## ----------------------------------------- ##"
2684      ) | sed "s/^/$as_me: WARNING:     /" >&2
2685     ;;
2686 esac
2687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2688 $as_echo_n "checking for $2... " >&6; }
2689 if eval \${$3+:} false; then :
2690   $as_echo_n "(cached) " >&6
2691 else
2692   eval "$3=\$ac_header_compiler"
2693 fi
2694 eval ac_res=\$$3
2695                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2696 $as_echo "$ac_res" >&6; }
2697 fi
2698   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2699 
2700 } # ac_fn_cxx_check_header_mongrel
2701 
2702 # ac_fn_cxx_try_run LINENO
2703 # ------------------------
2704 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2705 # that executables *can* be run.
2706 ac_fn_cxx_try_run ()
2707 {
2708   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2709   if { { ac_try="$ac_link"
2710 case "(($ac_try" in
2711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2712   *) ac_try_echo=$ac_try;;
2713 esac
2714 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2715 $as_echo "$ac_try_echo"; } >&5
2716   (eval "$ac_link") 2>&5
2717   ac_status=$?
2718   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2719   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2720   { { case "(($ac_try" in
2721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2722   *) ac_try_echo=$ac_try;;
2723 esac
2724 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2725 $as_echo "$ac_try_echo"; } >&5
2726   (eval "$ac_try") 2>&5
2727   ac_status=$?
2728   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2729   test $ac_status = 0; }; }; then :
2730   ac_retval=0
2731 else
2732   $as_echo "$as_me: program exited with status $ac_status" >&5
2733        $as_echo "$as_me: failed program was:" >&5
2734 sed 's/^/| /' conftest.$ac_ext >&5
2735 
2736        ac_retval=$ac_status
2737 fi
2738   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2739   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2740   as_fn_set_status $ac_retval
2741 
2742 } # ac_fn_cxx_try_run
2743 
2744 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2745 # ---------------------------------------------------------
2746 # Tests whether HEADER exists and can be compiled using the include files in
2747 # INCLUDES, setting the cache variable VAR accordingly.
2748 ac_fn_cxx_check_header_compile ()
2749 {
2750   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2752 $as_echo_n "checking for $2... " >&6; }
2753 if eval \${$3+:} false; then :
2754   $as_echo_n "(cached) " >&6
2755 else
2756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2757 /* end confdefs.h.  */
2758 $4
2759 #include <$2>
2760 _ACEOF
2761 if ac_fn_cxx_try_compile "$LINENO"; then :
2762   eval "$3=yes"
2763 else
2764   eval "$3=no"
2765 fi
2766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2767 fi
2768 eval ac_res=\$$3
2769                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2770 $as_echo "$ac_res" >&6; }
2771   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2772 
2773 } # ac_fn_cxx_check_header_compile
2774 
2775 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2776 # ----------------------------------------------
2777 # Tries to find the compile-time value of EXPR in a program that includes
2778 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2779 # computed
2780 ac_fn_cxx_compute_int ()
2781 {
2782   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2783   if test "$cross_compiling" = yes; then
2784     # Depending upon the size, compute the lo and hi bounds.
2785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2786 /* end confdefs.h.  */
2787 $4
2788 int
2789 main ()
2790 {
2791 static int test_array [1 - 2 * !(($2) >= 0)];
2792 test_array [0] = 0;
2793 return test_array [0];
2794 
2795   ;
2796   return 0;
2797 }
2798 _ACEOF
2799 if ac_fn_cxx_try_compile "$LINENO"; then :
2800   ac_lo=0 ac_mid=0
2801   while :; do
2802     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2803 /* end confdefs.h.  */
2804 $4
2805 int
2806 main ()
2807 {
2808 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2809 test_array [0] = 0;
2810 return test_array [0];
2811 
2812   ;
2813   return 0;
2814 }
2815 _ACEOF
2816 if ac_fn_cxx_try_compile "$LINENO"; then :
2817   ac_hi=$ac_mid; break
2818 else
2819   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2820                         if test $ac_lo -le $ac_mid; then
2821                           ac_lo= ac_hi=
2822                           break
2823                         fi
2824                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2825 fi
2826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2827   done
2828 else
2829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2830 /* end confdefs.h.  */
2831 $4
2832 int
2833 main ()
2834 {
2835 static int test_array [1 - 2 * !(($2) < 0)];
2836 test_array [0] = 0;
2837 return test_array [0];
2838 
2839   ;
2840   return 0;
2841 }
2842 _ACEOF
2843 if ac_fn_cxx_try_compile "$LINENO"; then :
2844   ac_hi=-1 ac_mid=-1
2845   while :; do
2846     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847 /* end confdefs.h.  */
2848 $4
2849 int
2850 main ()
2851 {
2852 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2853 test_array [0] = 0;
2854 return test_array [0];
2855 
2856   ;
2857   return 0;
2858 }
2859 _ACEOF
2860 if ac_fn_cxx_try_compile "$LINENO"; then :
2861   ac_lo=$ac_mid; break
2862 else
2863   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2864                         if test $ac_mid -le $ac_hi; then
2865                           ac_lo= ac_hi=
2866                           break
2867                         fi
2868                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2869 fi
2870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871   done
2872 else
2873   ac_lo= ac_hi=
2874 fi
2875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2876 fi
2877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2878 # Binary search between lo and hi bounds.
2879 while test "x$ac_lo" != "x$ac_hi"; do
2880   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882 /* end confdefs.h.  */
2883 $4
2884 int
2885 main ()
2886 {
2887 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2888 test_array [0] = 0;
2889 return test_array [0];
2890 
2891   ;
2892   return 0;
2893 }
2894 _ACEOF
2895 if ac_fn_cxx_try_compile "$LINENO"; then :
2896   ac_hi=$ac_mid
2897 else
2898   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2899 fi
2900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2901 done
2902 case $ac_lo in #((
2903 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2904 '') ac_retval=1 ;;
2905 esac
2906   else
2907     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2908 /* end confdefs.h.  */
2909 $4
2910 static long int longval () { return $2; }
2911 static unsigned long int ulongval () { return $2; }
2912 #include <stdio.h>
2913 #include <stdlib.h>
2914 int
2915 main ()
2916 {
2917 
2918   FILE *f = fopen ("conftest.val", "w");
2919   if (! f)
2920     return 1;
2921   if (($2) < 0)
2922     {
2923       long int i = longval ();
2924       if (i != ($2))
2925         return 1;
2926       fprintf (f, "%ld", i);
2927     }
2928   else
2929     {
2930       unsigned long int i = ulongval ();
2931       if (i != ($2))
2932         return 1;
2933       fprintf (f, "%lu", i);
2934     }
2935   /* Do not output a trailing newline, as this causes \r\n confusion
2936      on some platforms.  */
2937   return ferror (f) || fclose (f) != 0;
2938 
2939   ;
2940   return 0;
2941 }
2942 _ACEOF
2943 if ac_fn_cxx_try_run "$LINENO"; then :
2944   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2945 else
2946   ac_retval=1
2947 fi
2948 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2949   conftest.$ac_objext conftest.beam conftest.$ac_ext
2950 rm -f conftest.val
2951 
2952   fi
2953   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2954   as_fn_set_status $ac_retval
2955 
2956 } # ac_fn_cxx_compute_int
2957 
2958 # ac_fn_cxx_try_link LINENO
2959 # -------------------------
2960 # Try to link conftest.$ac_ext, and return whether this succeeded.
2961 ac_fn_cxx_try_link ()
2962 {
2963   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2964   rm -f conftest.$ac_objext conftest$ac_exeext
2965   if { { ac_try="$ac_link"
2966 case "(($ac_try" in
2967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2968   *) ac_try_echo=$ac_try;;
2969 esac
2970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2971 $as_echo "$ac_try_echo"; } >&5
2972   (eval "$ac_link") 2>conftest.err
2973   ac_status=$?
2974   if test -s conftest.err; then
2975     grep -v '^ *+' conftest.err >conftest.er1
2976     cat conftest.er1 >&5
2977     mv -f conftest.er1 conftest.err
2978   fi
2979   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2980   test $ac_status = 0; } && {
2981          test -z "$ac_cxx_werror_flag" ||
2982          test ! -s conftest.err
2983        } && test -s conftest$ac_exeext && {
2984          test "$cross_compiling" = yes ||
2985          test -x conftest$ac_exeext
2986        }; then :
2987   ac_retval=0
2988 else
2989   $as_echo "$as_me: failed program was:" >&5
2990 sed 's/^/| /' conftest.$ac_ext >&5
2991 
2992         ac_retval=1
2993 fi
2994   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2995   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2996   # interfere with the next link command; also delete a directory that is
2997   # left behind by Apple's compiler.  We do this before executing the actions.
2998   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2999   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3000   as_fn_set_status $ac_retval
3001 
3002 } # ac_fn_cxx_try_link
3003 
3004 # ac_fn_cxx_check_func LINENO FUNC VAR
3005 # ------------------------------------
3006 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3007 ac_fn_cxx_check_func ()
3008 {
3009   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3011 $as_echo_n "checking for $2... " >&6; }
3012 if eval \${$3+:} false; then :
3013   $as_echo_n "(cached) " >&6
3014 else
3015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3016 /* end confdefs.h.  */
3017 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3018    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3019 #define $2 innocuous_$2
3020 
3021 /* System header to define __stub macros and hopefully few prototypes,
3022     which can conflict with char $2 (); below.
3023     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3024     <limits.h> exists even on freestanding compilers.  */
3025 
3026 #ifdef __STDC__
3027 # include <limits.h>
3028 #else
3029 # include <assert.h>
3030 #endif
3031 
3032 #undef $2
3033 
3034 /* Override any GCC internal prototype to avoid an error.
3035    Use char because int might match the return type of a GCC
3036    builtin and then its argument prototype would still apply.  */
3037 #ifdef __cplusplus
3038 extern "C"
3039 #endif
3040 char $2 ();
3041 /* The GNU C library defines this for functions which it implements
3042     to always fail with ENOSYS.  Some functions are actually named
3043     something starting with __ and the normal name is an alias.  */
3044 #if defined __stub_$2 || defined __stub___$2
3045 choke me
3046 #endif
3047 
3048 int
3049 main ()
3050 {
3051 return $2 ();
3052   ;
3053   return 0;
3054 }
3055 _ACEOF
3056 if ac_fn_cxx_try_link "$LINENO"; then :
3057   eval "$3=yes"
3058 else
3059   eval "$3=no"
3060 fi
3061 rm -f core conftest.err conftest.$ac_objext \
3062     conftest$ac_exeext conftest.$ac_ext
3063 fi
3064 eval ac_res=\$$3
3065                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3066 $as_echo "$ac_res" >&6; }
3067   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3068 
3069 } # ac_fn_cxx_check_func
3070 
3071 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3072 # -------------------------------------------------------
3073 # Tests whether HEADER exists and can be compiled using the include files in
3074 # INCLUDES, setting the cache variable VAR accordingly.
3075 ac_fn_c_check_header_compile ()
3076 {
3077   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3079 $as_echo_n "checking for $2... " >&6; }
3080 if eval \${$3+:} false; then :
3081   $as_echo_n "(cached) " >&6
3082 else
3083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3084 /* end confdefs.h.  */
3085 $4
3086 #include <$2>
3087 _ACEOF
3088 if ac_fn_c_try_compile "$LINENO"; then :
3089   eval "$3=yes"
3090 else
3091   eval "$3=no"
3092 fi
3093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3094 fi
3095 eval ac_res=\$$3
3096                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3097 $as_echo "$ac_res" >&6; }
3098   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3099 
3100 } # ac_fn_c_check_header_compile
3101 cat >config.log <<_ACEOF
3102 This file contains any messages produced by compilers while
3103 running configure, to aid debugging if configure makes a mistake.
3104 
3105 It was created by OpenJDK $as_me jdk9, which was
3106 generated by GNU Autoconf 2.69.  Invocation command line was
3107 
3108   $ $0 $@
3109 
3110 _ACEOF
3111 exec 5>>config.log
3112 {
3113 cat <<_ASUNAME
3114 ## --------- ##
3115 ## Platform. ##
3116 ## --------- ##
3117 
3118 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3119 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3120 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3121 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3122 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3123 
3124 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3125 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3126 
3127 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3128 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3129 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3130 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3131 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3132 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3133 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3134 
3135 _ASUNAME
3136 
3137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3138 for as_dir in $PATH
3139 do
3140   IFS=$as_save_IFS
3141   test -z "$as_dir" && as_dir=.
3142     $as_echo "PATH: $as_dir"
3143   done
3144 IFS=$as_save_IFS
3145 
3146 } >&5
3147 
3148 cat >&5 <<_ACEOF
3149 
3150 
3151 ## ----------- ##
3152 ## Core tests. ##
3153 ## ----------- ##
3154 
3155 _ACEOF
3156 
3157 
3158 # Keep a trace of the command line.
3159 # Strip out --no-create and --no-recursion so they do not pile up.
3160 # Strip out --silent because we don't want to record it for future runs.
3161 # Also quote any args containing shell meta-characters.
3162 # Make two passes to allow for proper duplicate-argument suppression.
3163 ac_configure_args=
3164 ac_configure_args0=
3165 ac_configure_args1=
3166 ac_must_keep_next=false
3167 for ac_pass in 1 2
3168 do
3169   for ac_arg
3170   do
3171     case $ac_arg in
3172     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3173     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3174     | -silent | --silent | --silen | --sile | --sil)
3175       continue ;;
3176     *\'*)
3177       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3178     esac
3179     case $ac_pass in
3180     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3181     2)
3182       as_fn_append ac_configure_args1 " '$ac_arg'"
3183       if test $ac_must_keep_next = true; then
3184         ac_must_keep_next=false # Got value, back to normal.
3185       else
3186         case $ac_arg in
3187           *=* | --config-cache | -C | -disable-* | --disable-* \
3188           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3189           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3190           | -with-* | --with-* | -without-* | --without-* | --x)
3191             case "$ac_configure_args0 " in
3192               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3193             esac
3194             ;;
3195           -* ) ac_must_keep_next=true ;;
3196         esac
3197       fi
3198       as_fn_append ac_configure_args " '$ac_arg'"
3199       ;;
3200     esac
3201   done
3202 done
3203 { ac_configure_args0=; unset ac_configure_args0;}
3204 { ac_configure_args1=; unset ac_configure_args1;}
3205 
3206 # When interrupted or exit'd, cleanup temporary files, and complete
3207 # config.log.  We remove comments because anyway the quotes in there
3208 # would cause problems or look ugly.
3209 # WARNING: Use '\'' to represent an apostrophe within the trap.
3210 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3211 trap 'exit_status=$?
3212   # Save into config.log some information that might help in debugging.
3213   {
3214     echo
3215 
3216     $as_echo "## ---------------- ##
3217 ## Cache variables. ##
3218 ## ---------------- ##"
3219     echo
3220     # The following way of writing the cache mishandles newlines in values,
3221 (
3222   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3223     eval ac_val=\$$ac_var
3224     case $ac_val in #(
3225     *${as_nl}*)
3226       case $ac_var in #(
3227       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3228 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3229       esac
3230       case $ac_var in #(
3231       _ | IFS | as_nl) ;; #(
3232       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3233       *) { eval $ac_var=; unset $ac_var;} ;;
3234       esac ;;
3235     esac
3236   done
3237   (set) 2>&1 |
3238     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3239     *${as_nl}ac_space=\ *)
3240       sed -n \
3241         "s/'\''/'\''\\\\'\'''\''/g;
3242           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3243       ;; #(
3244     *)
3245       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3246       ;;
3247     esac |
3248     sort
3249 )
3250     echo
3251 
3252     $as_echo "## ----------------- ##
3253 ## Output variables. ##
3254 ## ----------------- ##"
3255     echo
3256     for ac_var in $ac_subst_vars
3257     do
3258       eval ac_val=\$$ac_var
3259       case $ac_val in
3260       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3261       esac
3262       $as_echo "$ac_var='\''$ac_val'\''"
3263     done | sort
3264     echo
3265 
3266     if test -n "$ac_subst_files"; then
3267       $as_echo "## ------------------- ##
3268 ## File substitutions. ##
3269 ## ------------------- ##"
3270       echo
3271       for ac_var in $ac_subst_files
3272       do
3273         eval ac_val=\$$ac_var
3274         case $ac_val in
3275         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3276         esac
3277         $as_echo "$ac_var='\''$ac_val'\''"
3278       done | sort
3279       echo
3280     fi
3281 
3282     if test -s confdefs.h; then
3283       $as_echo "## ----------- ##
3284 ## confdefs.h. ##
3285 ## ----------- ##"
3286       echo
3287       cat confdefs.h
3288       echo
3289     fi
3290     test "$ac_signal" != 0 &&
3291       $as_echo "$as_me: caught signal $ac_signal"
3292     $as_echo "$as_me: exit $exit_status"
3293   } >&5
3294   rm -f core *.core core.conftest.* &&
3295     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3296     exit $exit_status
3297 ' 0
3298 for ac_signal in 1 2 13 15; do
3299   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3300 done
3301 ac_signal=0
3302 
3303 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3304 rm -f -r conftest* confdefs.h
3305 
3306 $as_echo "/* confdefs.h */" > confdefs.h
3307 
3308 # Predefined preprocessor variables.
3309 
3310 cat >>confdefs.h <<_ACEOF
3311 #define PACKAGE_NAME "$PACKAGE_NAME"
3312 _ACEOF
3313 
3314 cat >>confdefs.h <<_ACEOF
3315 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3316 _ACEOF
3317 
3318 cat >>confdefs.h <<_ACEOF
3319 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3320 _ACEOF
3321 
3322 cat >>confdefs.h <<_ACEOF
3323 #define PACKAGE_STRING "$PACKAGE_STRING"
3324 _ACEOF
3325 
3326 cat >>confdefs.h <<_ACEOF
3327 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3328 _ACEOF
3329 
3330 cat >>confdefs.h <<_ACEOF
3331 #define PACKAGE_URL "$PACKAGE_URL"
3332 _ACEOF
3333 
3334 
3335 # Let the site file select an alternate cache file if it wants to.
3336 # Prefer an explicitly selected file to automatically selected ones.
3337 ac_site_file1=NONE
3338 ac_site_file2=NONE
3339 if test -n "$CONFIG_SITE"; then
3340   # We do not want a PATH search for config.site.
3341   case $CONFIG_SITE in #((
3342     -*)  ac_site_file1=./$CONFIG_SITE;;
3343     */*) ac_site_file1=$CONFIG_SITE;;
3344     *)   ac_site_file1=./$CONFIG_SITE;;
3345   esac
3346 elif test "x$prefix" != xNONE; then
3347   ac_site_file1=$prefix/share/config.site
3348   ac_site_file2=$prefix/etc/config.site
3349 else
3350   ac_site_file1=$ac_default_prefix/share/config.site
3351   ac_site_file2=$ac_default_prefix/etc/config.site
3352 fi
3353 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3354 do
3355   test "x$ac_site_file" = xNONE && continue
3356   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3357     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3358 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3359     sed 's/^/| /' "$ac_site_file" >&5
3360     . "$ac_site_file" \
3361       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3362 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3363 as_fn_error $? "failed to load site script $ac_site_file
3364 See \`config.log' for more details" "$LINENO" 5; }
3365   fi
3366 done
3367 
3368 if test -r "$cache_file"; then
3369   # Some versions of bash will fail to source /dev/null (special files
3370   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3371   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3372     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3373 $as_echo "$as_me: loading cache $cache_file" >&6;}
3374     case $cache_file in
3375       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3376       *)                      . "./$cache_file";;
3377     esac
3378   fi
3379 else
3380   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3381 $as_echo "$as_me: creating cache $cache_file" >&6;}
3382   >$cache_file
3383 fi
3384 
3385 # Check that the precious variables saved in the cache have kept the same
3386 # value.
3387 ac_cache_corrupted=false
3388 for ac_var in $ac_precious_vars; do
3389   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3390   eval ac_new_set=\$ac_env_${ac_var}_set
3391   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3392   eval ac_new_val=\$ac_env_${ac_var}_value
3393   case $ac_old_set,$ac_new_set in
3394     set,)
3395       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3396 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3397       ac_cache_corrupted=: ;;
3398     ,set)
3399       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3400 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3401       ac_cache_corrupted=: ;;
3402     ,);;
3403     *)
3404       if test "x$ac_old_val" != "x$ac_new_val"; then
3405         # differences in whitespace do not lead to failure.
3406         ac_old_val_w=`echo x $ac_old_val`
3407         ac_new_val_w=`echo x $ac_new_val`
3408         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3409           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3410 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3411           ac_cache_corrupted=:
3412         else
3413           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3414 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3415           eval $ac_var=\$ac_old_val
3416         fi
3417         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3418 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3419         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3420 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3421       fi;;
3422   esac
3423   # Pass precious variables to config.status.
3424   if test "$ac_new_set" = set; then
3425     case $ac_new_val in
3426     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3427     *) ac_arg=$ac_var=$ac_new_val ;;
3428     esac
3429     case " $ac_configure_args " in
3430       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3431       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3432     esac
3433   fi
3434 done
3435 if $ac_cache_corrupted; then
3436   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3437 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3438   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3439 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3440   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3441 fi
3442 ## -------------------- ##
3443 ## Main body of script. ##
3444 ## -------------------- ##
3445 
3446 ac_ext=c
3447 ac_cpp='$CPP $CPPFLAGS'
3448 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3449 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3450 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3451 
3452 
3453 
3454 ac_aux_dir=
3455 for ac_dir in $TOPDIR/make/autoconf/build-aux "$srcdir"/$TOPDIR/make/autoconf/build-aux; do
3456   if test -f "$ac_dir/install-sh"; then
3457     ac_aux_dir=$ac_dir
3458     ac_install_sh="$ac_aux_dir/install-sh -c"
3459     break
3460   elif test -f "$ac_dir/install.sh"; then
3461     ac_aux_dir=$ac_dir
3462     ac_install_sh="$ac_aux_dir/install.sh -c"
3463     break
3464   elif test -f "$ac_dir/shtool"; then
3465     ac_aux_dir=$ac_dir
3466     ac_install_sh="$ac_aux_dir/shtool install -c"
3467     break
3468   fi
3469 done
3470 if test -z "$ac_aux_dir"; then
3471   as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/make/autoconf/build-aux \"$srcdir\"/$TOPDIR/make/autoconf/build-aux" "$LINENO" 5
3472 fi
3473 
3474 # These three variables are undocumented and unsupported,
3475 # and are intended to be withdrawn in a future Autoconf release.
3476 # They can cause serious problems if a builder's source tree is in a directory
3477 # whose full name contains unusual characters.
3478 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3479 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3480 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3481 
3482 
3483 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3484 
3485 #
3486 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3487 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3488 #
3489 # This code is free software; you can redistribute it and/or modify it
3490 # under the terms of the GNU General Public License version 2 only, as
3491 # published by the Free Software Foundation.  Oracle designates this
3492 # particular file as subject to the "Classpath" exception as provided
3493 # by Oracle in the LICENSE file that accompanied this code.
3494 #
3495 # This code is distributed in the hope that it will be useful, but WITHOUT
3496 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3497 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3498 # version 2 for more details (a copy is included in the LICENSE file that
3499 # accompanied this code).
3500 #
3501 # You should have received a copy of the GNU General Public License version
3502 # 2 along with this work; if not, write to the Free Software Foundation,
3503 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3504 #
3505 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3506 # or visit www.oracle.com if you need additional information or have any
3507 # questions.
3508 #
3509 
3510 #
3511 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3512 #
3513 # This program is free software; you can redistribute it and/or modify
3514 # it under the terms of the GNU General Public License as published by
3515 # the Free Software Foundation; either version 2 of the License, or
3516 # (at your option) any later version.
3517 #
3518 # This program is distributed in the hope that it will be useful, but
3519 # WITHOUT ANY WARRANTY; without even the implied warranty of
3520 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3521 # General Public License for more details.
3522 #
3523 # You should have received a copy of the GNU General Public License
3524 # along with this program; if not, write to the Free Software
3525 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3526 #
3527 # As a special exception to the GNU General Public License, if you
3528 # distribute this file as part of a program that contains a
3529 # configuration script generated by Autoconf, you may include it under
3530 # the same distribution terms that you use for the rest of that program.
3531 
3532 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3533 # ----------------------------------
3534 # PKG_PROG_PKG_CONFIG
3535 
3536 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3537 #
3538 # Check to see whether a particular set of modules exists.  Similar
3539 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3540 #
3541 #
3542 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3543 # this or PKG_CHECK_MODULES is called, or make sure to call
3544 # PKG_CHECK_EXISTS manually
3545 # --------------------------------------------------------------
3546 
3547 
3548 
3549 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3550 # ---------------------------------------------
3551 # _PKG_CONFIG
3552 
3553 # _PKG_SHORT_ERRORS_SUPPORTED
3554 # -----------------------------
3555 # _PKG_SHORT_ERRORS_SUPPORTED
3556 
3557 
3558 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3559 # [ACTION-IF-NOT-FOUND])
3560 #
3561 #
3562 # Note that if there is a possibility the first call to
3563 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3564 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3565 #
3566 #
3567 # --------------------------------------------------------------
3568 # PKG_CHECK_MODULES
3569 
3570 
3571 # Include these first...
3572 #
3573 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3574 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3575 #
3576 # This code is free software; you can redistribute it and/or modify it
3577 # under the terms of the GNU General Public License version 2 only, as
3578 # published by the Free Software Foundation.  Oracle designates this
3579 # particular file as subject to the "Classpath" exception as provided
3580 # by Oracle in the LICENSE file that accompanied this code.
3581 #
3582 # This code is distributed in the hope that it will be useful, but WITHOUT
3583 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3584 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3585 # version 2 for more details (a copy is included in the LICENSE file that
3586 # accompanied this code).
3587 #
3588 # You should have received a copy of the GNU General Public License version
3589 # 2 along with this work; if not, write to the Free Software Foundation,
3590 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3591 #
3592 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3593 # or visit www.oracle.com if you need additional information or have any
3594 # questions.
3595 #
3596 
3597 # Create a function/macro that takes a series of named arguments. The call is
3598 # similar to AC_DEFUN, but the setup of the function looks like this:
3599 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3600 # ... do something
3601 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3602 # ])
3603 # A star (*) in front of a named argument means that it is required and it's
3604 # presence will be verified. To pass e.g. the first value as a normal indexed
3605 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3606 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3607 # "ARG_FOO".
3608 #
3609 # The generated function can be called like this:
3610 # MYFUNC(FOO: [foo-val],
3611 #     BAR: [
3612 #         $ECHO hello world
3613 #     ])
3614 # Note that the argument value must start on the same line as the argument name.
3615 #
3616 # Argument 1: Name of the function to define
3617 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3618 # Argument 3: Argument array to treat as named, typically $@
3619 # Argument 4: The main function body
3620 
3621 
3622 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3623 # If so, then append $1 to $2 \
3624 # Also set JVM_ARG_OK to true/false depending on outcome.
3625 
3626 
3627 # Appends a string to a path variable, only adding the : when needed.
3628 
3629 
3630 # Prepends a string to a path variable, only adding the : when needed.
3631 
3632 
3633 # This will make sure the given variable points to a full and proper
3634 # path. This means:
3635 # 1) There will be no spaces in the path. On unix platforms,
3636 #    spaces in the path will result in an error. On Windows,
3637 #    the path will be rewritten using short-style to be space-free.
3638 # 2) The path will be absolute, and it will be in unix-style (on
3639 #     cygwin).
3640 # $1: The name of the variable to fix
3641 
3642 
3643 # This will make sure the given variable points to a executable
3644 # with a full and proper path. This means:
3645 # 1) There will be no spaces in the path. On unix platforms,
3646 #    spaces in the path will result in an error. On Windows,
3647 #    the path will be rewritten using short-style to be space-free.
3648 # 2) The path will be absolute, and it will be in unix-style (on
3649 #     cygwin).
3650 # Any arguments given to the executable is preserved.
3651 # If the input variable does not have a directory specification, then
3652 # it need to be in the PATH.
3653 # $1: The name of the variable to fix
3654 
3655 
3656 
3657 
3658 # Register a --with argument but mark it as deprecated
3659 # $1: The name of the with argument to deprecate, not including --with-
3660 
3661 
3662 # Register a --enable argument but mark it as deprecated
3663 # $1: The name of the with argument to deprecate, not including --enable-
3664 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3665 # $3: Messages to user.
3666 
3667 
3668 
3669 
3670 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3671 # $1: variable to check
3672 
3673 
3674 # Check that there are no unprocessed overridden variables left.
3675 # If so, they are an incorrect argument and we will exit with an error.
3676 
3677 
3678 # Setup a tool for the given variable. If correctly specified by the user,
3679 # use that value, otherwise search for the tool using the supplied code snippet.
3680 # $1: variable to set
3681 # $2: code snippet to call to look for the tool
3682 # $3: code snippet to call if variable was used to find tool
3683 
3684 
3685 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3686 # $1: variable to set
3687 # $2: executable name (or list of names) to look for
3688 # $3: [path]
3689 
3690 
3691 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3692 # $1: variable to set
3693 # $2: executable name (or list of names) to look for
3694 
3695 
3696 # Like BASIC_PATH_PROGS but fails if no tool was found.
3697 # $1: variable to set
3698 # $2: executable name (or list of names) to look for
3699 # $3: [path]
3700 
3701 
3702 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3703 # $1: variable to set
3704 # $2: autoconf macro to call to look for the special tool
3705 
3706 
3707 # Setup the most fundamental tools that relies on not much else to set up,
3708 # but is used by much of the early bootstrap code.
3709 
3710 
3711 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3712 
3713 
3714 # Evaluates platform specific overrides for devkit variables.
3715 # $1: Name of variable
3716 
3717 
3718 
3719 
3720 
3721 
3722 #%%% Simple tools %%%
3723 
3724 # Check if we have found a usable version of make
3725 # $1: the path to a potential make binary (or empty)
3726 # $2: the description on how we found this
3727 
3728 
3729 
3730 
3731 # Goes looking for a usable version of GNU make.
3732 
3733 
3734 
3735 
3736 
3737 
3738 
3739 
3740 
3741 
3742 # Check if build directory is on local disk. If not possible to determine,
3743 # we prefer to claim it's local.
3744 # Argument 1: directory to test
3745 # Argument 2: what to do if it is on local disk
3746 # Argument 3: what to do otherwise (remote disk or failure)
3747 
3748 
3749 # Check that source files have basic read permissions set. This might
3750 # not be the case in cygwin in certain conditions.
3751 
3752 
3753 
3754 
3755 # Check for support for specific options in bash
3756 
3757 
3758 ################################################################################
3759 #
3760 # Default make target
3761 #
3762 
3763 
3764 # Code to run after AC_OUTPUT
3765 
3766 
3767 #
3768 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3769 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3770 #
3771 # This code is free software; you can redistribute it and/or modify it
3772 # under the terms of the GNU General Public License version 2 only, as
3773 # published by the Free Software Foundation.  Oracle designates this
3774 # particular file as subject to the "Classpath" exception as provided
3775 # by Oracle in the LICENSE file that accompanied this code.
3776 #
3777 # This code is distributed in the hope that it will be useful, but WITHOUT
3778 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3779 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3780 # version 2 for more details (a copy is included in the LICENSE file that
3781 # accompanied this code).
3782 #
3783 # You should have received a copy of the GNU General Public License version
3784 # 2 along with this work; if not, write to the Free Software Foundation,
3785 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3786 #
3787 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3788 # or visit www.oracle.com if you need additional information or have any
3789 # questions.
3790 #
3791 
3792 
3793 
3794 
3795 
3796 # Helper function which possibly converts a path using DOS-style short mode.
3797 # If so, the updated path is stored in $new_path.
3798 # $1: The path to check
3799 
3800 
3801 # Helper function which possibly converts a path using DOS-style short mode.
3802 # If so, the updated path is stored in $new_path.
3803 # $1: The path to check
3804 
3805 
3806 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3807 # and could probably be heavily simplified. However, all changes in this
3808 # area tend to need lot of testing in different scenarios, and in lack of
3809 # proper unit testing, cleaning this up has not been deemed worth the effort
3810 # at the moment.
3811 
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 
3820 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3821 
3822 
3823 
3824 
3825 # ... then the rest
3826 #
3827 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3828 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3829 #
3830 # This code is free software; you can redistribute it and/or modify it
3831 # under the terms of the GNU General Public License version 2 only, as
3832 # published by the Free Software Foundation.  Oracle designates this
3833 # particular file as subject to the "Classpath" exception as provided
3834 # by Oracle in the LICENSE file that accompanied this code.
3835 #
3836 # This code is distributed in the hope that it will be useful, but WITHOUT
3837 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3838 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3839 # version 2 for more details (a copy is included in the LICENSE file that
3840 # accompanied this code).
3841 #
3842 # You should have received a copy of the GNU General Public License version
3843 # 2 along with this work; if not, write to the Free Software Foundation,
3844 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3845 #
3846 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3847 # or visit www.oracle.com if you need additional information or have any
3848 # questions.
3849 #
3850 
3851 ########################################################################
3852 # This file handles detection of the Boot JDK. The Boot JDK detection
3853 # process has been developed as a response to solve a complex real-world
3854 # problem. Initially, it was simple, but it has grown as platform after
3855 # platform, idiosyncracy after idiosyncracy has been supported.
3856 #
3857 # The basic idea is this:
3858 # 1) You need an acceptable *) JDK to use as a Boot JDK
3859 # 2) There are several ways to locate a JDK, that are mostly platform
3860 #    dependent **)
3861 # 3) You can have multiple JDKs installed
3862 # 4) If possible, configure should try to dig out an acceptable JDK
3863 #    automatically, without having to resort to command-line options
3864 #
3865 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3866 #     javac) and not a JRE, etc.
3867 #
3868 # **) On Windows we typically use a well-known path.
3869 #     On MacOSX we typically use the tool java_home.
3870 #     On Linux we typically find javac in the $PATH, and then follow a
3871 #     chain of symlinks that often ends up in a real JDK.
3872 #
3873 # This leads to the code where we check in different ways to locate a
3874 # JDK, and if one is found, check if it is acceptable. If not, we print
3875 # our reasons for rejecting it (useful when debugging non-working
3876 # configure situations) and continue checking the next one.
3877 ########################################################################
3878 
3879 # Execute the check given as argument, and verify the result
3880 # If the Boot JDK was previously found, do nothing
3881 # $1 A command line (typically autoconf macro) to execute
3882 
3883 
3884 # Test: Is bootjdk explicitly set by command line arguments?
3885 
3886 
3887 # Test: Is $JAVA_HOME set?
3888 
3889 
3890 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3891 
3892 
3893 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3894 # $1: Argument to the java_home binary (optional)
3895 
3896 
3897 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3898 
3899 
3900 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3901 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3902 # $1 = Path to directory containing jdk installations.
3903 # $2 = String to append to the found JDK directory to get the proper JDK home
3904 
3905 
3906 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3907 # environmental variable as base for where to look.
3908 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3909 
3910 
3911 # Test: Is there a JDK installed in default, well-known locations?
3912 
3913 
3914 # Check that a command-line tool in the Boot JDK is correct
3915 # $1 = name of variable to assign
3916 # $2 = name of binary
3917 
3918 
3919 ###############################################################################
3920 #
3921 # We need a Boot JDK to bootstrap the build.
3922 #
3923 
3924 
3925 
3926 
3927 
3928 # BUILD_JDK: the location of the latest JDK that can run
3929 #   on the host system and supports the target class file version
3930 #   generated in this JDK build.  This variable should only be
3931 #   used after the launchers are built.
3932 #
3933 
3934 # Execute the check given as argument, and verify the result.
3935 # If the JDK was previously found, do nothing.
3936 # $1 A command line (typically autoconf macro) to execute
3937 
3938 
3939 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3940 # is different than the host system doing the build (e.g. cross-compilation),
3941 # a special BUILD_JDK is built as part of the build process.  An external
3942 # prebuilt BUILD_JDK can also be supplied.
3943 
3944 
3945 #
3946 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3947 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3948 #
3949 # This code is free software; you can redistribute it and/or modify it
3950 # under the terms of the GNU General Public License version 2 only, as
3951 # published by the Free Software Foundation.  Oracle designates this
3952 # particular file as subject to the "Classpath" exception as provided
3953 # by Oracle in the LICENSE file that accompanied this code.
3954 #
3955 # This code is distributed in the hope that it will be useful, but WITHOUT
3956 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3957 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3958 # version 2 for more details (a copy is included in the LICENSE file that
3959 # accompanied this code).
3960 #
3961 # You should have received a copy of the GNU General Public License version
3962 # 2 along with this work; if not, write to the Free Software Foundation,
3963 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3964 #
3965 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3966 # or visit www.oracle.com if you need additional information or have any
3967 # questions.
3968 #
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 
3980 
3981 
3982 
3983 
3984 
3985 
3986 ################################################################################
3987 #
3988 # Runs icecc-create-env once and prints the error if it fails
3989 #
3990 # $1: arguments to icecc-create-env
3991 # $2: log file
3992 #
3993 
3994 
3995 ################################################################################
3996 #
3997 # Optionally enable distributed compilation of native code using icecc/icecream
3998 #
3999 
4000 
4001 
4002 
4003 
4004 
4005 
4006 #
4007 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4008 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4009 #
4010 # This code is free software; you can redistribute it and/or modify it
4011 # under the terms of the GNU General Public License version 2 only, as
4012 # published by the Free Software Foundation.  Oracle designates this
4013 # particular file as subject to the "Classpath" exception as provided
4014 # by Oracle in the LICENSE file that accompanied this code.
4015 #
4016 # This code is distributed in the hope that it will be useful, but WITHOUT
4017 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4018 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4019 # version 2 for more details (a copy is included in the LICENSE file that
4020 # accompanied this code).
4021 #
4022 # You should have received a copy of the GNU General Public License version
4023 # 2 along with this work; if not, write to the Free Software Foundation,
4024 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4025 #
4026 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4027 # or visit www.oracle.com if you need additional information or have any
4028 # questions.
4029 #
4030 
4031 ################################################################################
4032 #
4033 # Setup ABI profile (for arm)
4034 #
4035 
4036 
4037 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4038 # corresponding configure arguments instead
4039 
4040 
4041 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4042 # that configure can use them while detecting compilers.
4043 # TOOLCHAIN_TYPE is available here.
4044 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4045 
4046 
4047 
4048 
4049 
4050 
4051 # Documentation on common flags used for solstudio in HIGHEST.
4052 #
4053 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4054 #          done with care, there are some assumptions below that need to
4055 #          be understood about the use of pointers, and IEEE behavior.
4056 #
4057 # -fns: Use non-standard floating point mode (not IEEE 754)
4058 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4059 # -fsingle: Use single precision floating point with 'float'
4060 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4061 #   (Source with excessing pointer casting and data access with mixed
4062 #    pointer types are not recommended)
4063 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4064 #   (If you expect perfect errno behavior, do not use this)
4065 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4066 # -xrestrict: Pointer parameters to functions do not overlap
4067 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4068 #    If you pass in multiple pointers to the same data, do not use this)
4069 # -xlibmil: Inline some library routines
4070 #   (If you expect perfect errno behavior, do not use this)
4071 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4072 #   (If you expect perfect errno behavior, do not use this)
4073 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4074 
4075     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4076     # Bug?
4077     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4078     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4079     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4080     #fi
4081 
4082 
4083 
4084 
4085 
4086 
4087 ################################################################################
4088 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4089 #      conditionals against.
4090 # $2 - Optional prefix for each variable defined.
4091 
4092 
4093 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4094 #                                  IF_FALSE: [RUN-IF-FALSE])
4095 # ------------------------------------------------------------
4096 # Check that the C compiler supports an argument
4097 
4098 
4099 
4100 
4101 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4102 #                                    IF_FALSE: [RUN-IF-FALSE])
4103 # ------------------------------------------------------------
4104 # Check that the C++ compiler supports an argument
4105 
4106 
4107 
4108 
4109 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4110 #                                IF_FALSE: [RUN-IF-FALSE])
4111 # ------------------------------------------------------------
4112 # Check that the C and C++ compilers support an argument
4113 
4114 
4115 
4116 
4117 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4118 #                                   IF_FALSE: [RUN-IF-FALSE])
4119 # ------------------------------------------------------------
4120 # Check that the linker support an argument
4121 
4122 
4123 
4124 
4125 
4126 
4127 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4128 # Arguments:
4129 # $1 - Optional prefix for each variable defined.
4130 
4131 
4132 #
4133 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4134 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4135 #
4136 # This code is free software; you can redistribute it and/or modify it
4137 # under the terms of the GNU General Public License version 2 only, as
4138 # published by the Free Software Foundation.  Oracle designates this
4139 # particular file as subject to the "Classpath" exception as provided
4140 # by Oracle in the LICENSE file that accompanied this code.
4141 #
4142 # This code is distributed in the hope that it will be useful, but WITHOUT
4143 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4144 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4145 # version 2 for more details (a copy is included in the LICENSE file that
4146 # accompanied this code).
4147 #
4148 # You should have received a copy of the GNU General Public License version
4149 # 2 along with this work; if not, write to the Free Software Foundation,
4150 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4151 #
4152 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4153 # or visit www.oracle.com if you need additional information or have any
4154 # questions.
4155 #
4156 
4157 
4158 
4159 
4160 
4161 cygwin_help() {
4162   case $1 in
4163     unzip)
4164       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4165       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4166       ;;
4167     zip)
4168       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4169       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4170       ;;
4171     make)
4172       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4173       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4174       ;;
4175     freetype)
4176       HELP_MSG="
4177 The freetype library can now be build during the configure process.
4178 Download the freetype sources and unpack them into an arbitrary directory:
4179 
4180 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4181 tar -xzf freetype-2.5.3.tar.gz
4182 
4183 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4184 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4185 builds or into '<freetype_src>/lib32' for 32-bit builds.
4186 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4187 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4188 
4189 Alternatively you can unpack the sources like this to use the default directory:
4190 
4191 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4192       ;;
4193   esac
4194 }
4195 
4196 msys_help() {
4197   PKGHANDLER_COMMAND=""
4198 }
4199 
4200 apt_help() {
4201   case $1 in
4202     reduced)
4203       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4204     devkit)
4205       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4206     openjdk)
4207       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4208     alsa)
4209       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4210     cups)
4211       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4212     freetype)
4213       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4214     ffi)
4215       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4216     x11)
4217       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4218     ccache)
4219       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4220     dtrace)
4221       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4222   esac
4223 }
4224 
4225 yum_help() {
4226   case $1 in
4227     devkit)
4228       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4229     openjdk)
4230       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4231     alsa)
4232       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4233     cups)
4234       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4235     freetype)
4236       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4237     x11)
4238       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4239     ccache)
4240       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4241   esac
4242 }
4243 
4244 brew_help() {
4245   case $1 in
4246     openjdk)
4247       PKGHANDLER_COMMAND="brew cask install java" ;;
4248     freetype)
4249       PKGHANDLER_COMMAND="brew install freetype" ;;
4250     ccache)
4251       PKGHANDLER_COMMAND="brew install ccache" ;;
4252   esac
4253 }
4254 
4255 port_help() {
4256   PKGHANDLER_COMMAND=""
4257 }
4258 
4259 pkgutil_help() {
4260   PKGHANDLER_COMMAND=""
4261 }
4262 
4263 pkgadd_help() {
4264   PKGHANDLER_COMMAND=""
4265 }
4266 
4267 # This function will check if we're called from the "configure" wrapper while
4268 # printing --help. If so, we will print out additional information that can
4269 # only be extracted within the autoconf script, and then exit. This must be
4270 # called at the very beginning in configure.ac.
4271 
4272 
4273 
4274 
4275 
4276 
4277 #
4278 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4279 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4280 #
4281 # This code is free software; you can redistribute it and/or modify it
4282 # under the terms of the GNU General Public License version 2 only, as
4283 # published by the Free Software Foundation.  Oracle designates this
4284 # particular file as subject to the "Classpath" exception as provided
4285 # by Oracle in the LICENSE file that accompanied this code.
4286 #
4287 # This code is distributed in the hope that it will be useful, but WITHOUT
4288 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4289 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4290 # version 2 for more details (a copy is included in the LICENSE file that
4291 # accompanied this code).
4292 #
4293 # You should have received a copy of the GNU General Public License version
4294 # 2 along with this work; if not, write to the Free Software Foundation,
4295 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4296 #
4297 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4298 # or visit www.oracle.com if you need additional information or have any
4299 # questions.
4300 #
4301 
4302 # All valid JVM features, regardless of platform
4303 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4304     graal vm-structs jni-check services management all-gcs nmt cds \
4305     static-build link-time-opt aot"
4306 
4307 # All valid JVM variants
4308 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4309 
4310 ###############################################################################
4311 # Check if the specified JVM variant should be built. To be used in shell if
4312 # constructs, like this:
4313 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4314 #
4315 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4316 
4317 # Definition kept in one line to allow inlining in if statements.
4318 # Additional [] needed to keep m4 from mangling shell constructs.
4319 
4320 
4321 ###############################################################################
4322 # Check if the specified JVM features are explicitly enabled. To be used in
4323 # shell if constructs, like this:
4324 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4325 #
4326 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4327 
4328 # Definition kept in one line to allow inlining in if statements.
4329 # Additional [] needed to keep m4 from mangling shell constructs.
4330 
4331 
4332 ###############################################################################
4333 # Check which variants of the JVM that we want to build. Available variants are:
4334 #   server: normal interpreter, and a tiered C1/C2 compiler
4335 #   client: normal interpreter, and C1 (no C2 compiler)
4336 #   minimal: reduced form of client with optional features stripped out
4337 #   core: normal interpreter only, no compiler
4338 #   zero: C++ based interpreter only, no compiler
4339 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4340 #   custom: baseline JVM with no default features
4341 #
4342 
4343 
4344 ###############################################################################
4345 # Check if dtrace should be enabled and has all prerequisites present.
4346 #
4347 
4348 
4349 ################################################################################
4350 # Check if AOT should be enabled
4351 #
4352 
4353 
4354 ################################################################################
4355 # Allow to disable CDS
4356 #
4357 
4358 
4359 ###############################################################################
4360 # Set up all JVM features for each JVM variant.
4361 #
4362 
4363 
4364 ###############################################################################
4365 # Validate JVM features once all setup is complete, including custom setup.
4366 #
4367 
4368 
4369 ################################################################################
4370 #
4371 # Specify which sources will be used to build the 64-bit ARM port
4372 #
4373 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4374 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4375 #
4376 
4377 
4378 
4379 ################################################################################
4380 # Check if gtest should be built
4381 #
4382 
4383 
4384 #
4385 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4386 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4387 #
4388 # This code is free software; you can redistribute it and/or modify it
4389 # under the terms of the GNU General Public License version 2 only, as
4390 # published by the Free Software Foundation.  Oracle designates this
4391 # particular file as subject to the "Classpath" exception as provided
4392 # by Oracle in the LICENSE file that accompanied this code.
4393 #
4394 # This code is distributed in the hope that it will be useful, but WITHOUT
4395 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4396 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4397 # version 2 for more details (a copy is included in the LICENSE file that
4398 # accompanied this code).
4399 #
4400 # You should have received a copy of the GNU General Public License version
4401 # 2 along with this work; if not, write to the Free Software Foundation,
4402 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4403 #
4404 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4405 # or visit www.oracle.com if you need additional information or have any
4406 # questions.
4407 #
4408 
4409 ###############################################################################
4410 # Check which variant of the JDK that we want to build.
4411 # Currently we have:
4412 #    normal:   standard edition
4413 # but the custom make system may add other variants
4414 #
4415 # Effectively the JDK variant gives a name to a specific set of
4416 # modules to compile into the JDK.
4417 
4418 
4419 ###############################################################################
4420 # Set the debug level
4421 #    release: no debug information, all optimizations, no asserts.
4422 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4423 #    fastdebug: debug information (-g), all optimizations, all asserts
4424 #    slowdebug: debug information (-g), no optimizations, all asserts
4425 
4426 
4427 ###############################################################################
4428 #
4429 # Should we build only OpenJDK even if closed sources are present?
4430 #
4431 
4432 
4433 
4434 
4435 ###############################################################################
4436 #
4437 # Enable or disable the elliptic curve crypto implementation
4438 #
4439 
4440 
4441 
4442 
4443 ################################################################################
4444 #
4445 # Gcov coverage data for hotspot
4446 #
4447 
4448 
4449 ################################################################################
4450 #
4451 # Static build support.  When enabled will generate static
4452 # libraries instead of shared libraries for all JDK libs.
4453 #
4454 
4455 
4456 ################################################################################
4457 #
4458 # jlink options.
4459 # We always keep packaged modules in JDK image.
4460 #
4461 
4462 
4463 ################################################################################
4464 #
4465 # Check if building of the jtreg failure handler should be enabled.
4466 #
4467 
4468 
4469 ################################################################################
4470 #
4471 # Enable or disable generation of the classlist at build time
4472 #
4473 
4474 
4475 #
4476 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4477 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4478 #
4479 # This code is free software; you can redistribute it and/or modify it
4480 # under the terms of the GNU General Public License version 2 only, as
4481 # published by the Free Software Foundation.  Oracle designates this
4482 # particular file as subject to the "Classpath" exception as provided
4483 # by Oracle in the LICENSE file that accompanied this code.
4484 #
4485 # This code is distributed in the hope that it will be useful, but WITHOUT
4486 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4487 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4488 # version 2 for more details (a copy is included in the LICENSE file that
4489 # accompanied this code).
4490 #
4491 # You should have received a copy of the GNU General Public License version
4492 # 2 along with this work; if not, write to the Free Software Foundation,
4493 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4494 #
4495 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4496 # or visit www.oracle.com if you need additional information or have any
4497 # questions.
4498 #
4499 
4500 ###############################################################################
4501 #
4502 # Setup version numbers
4503 #
4504 
4505 # Verify that a given string represents a valid version number, and assign it
4506 # to a variable.
4507 
4508 # Argument 1: the variable to assign to
4509 # Argument 2: the value given by the user
4510 
4511 
4512 
4513 
4514 #
4515 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4516 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4517 #
4518 # This code is free software; you can redistribute it and/or modify it
4519 # under the terms of the GNU General Public License version 2 only, as
4520 # published by the Free Software Foundation.  Oracle designates this
4521 # particular file as subject to the "Classpath" exception as provided
4522 # by Oracle in the LICENSE file that accompanied this code.
4523 #
4524 # This code is distributed in the hope that it will be useful, but WITHOUT
4525 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4526 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4527 # version 2 for more details (a copy is included in the LICENSE file that
4528 # accompanied this code).
4529 #
4530 # You should have received a copy of the GNU General Public License version
4531 # 2 along with this work; if not, write to the Free Software Foundation,
4532 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4533 #
4534 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4535 # or visit www.oracle.com if you need additional information or have any
4536 # questions.
4537 #
4538 
4539 # Major library component reside in separate files.
4540 #
4541 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4542 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4543 #
4544 # This code is free software; you can redistribute it and/or modify it
4545 # under the terms of the GNU General Public License version 2 only, as
4546 # published by the Free Software Foundation.  Oracle designates this
4547 # particular file as subject to the "Classpath" exception as provided
4548 # by Oracle in the LICENSE file that accompanied this code.
4549 #
4550 # This code is distributed in the hope that it will be useful, but WITHOUT
4551 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4552 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4553 # version 2 for more details (a copy is included in the LICENSE file that
4554 # accompanied this code).
4555 #
4556 # You should have received a copy of the GNU General Public License version
4557 # 2 along with this work; if not, write to the Free Software Foundation,
4558 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4559 #
4560 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4561 # or visit www.oracle.com if you need additional information or have any
4562 # questions.
4563 #
4564 
4565 ################################################################################
4566 # Setup alsa (Advanced Linux Sound Architecture)
4567 ################################################################################
4568 
4569 
4570 #
4571 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4572 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4573 #
4574 # This code is free software; you can redistribute it and/or modify it
4575 # under the terms of the GNU General Public License version 2 only, as
4576 # published by the Free Software Foundation.  Oracle designates this
4577 # particular file as subject to the "Classpath" exception as provided
4578 # by Oracle in the LICENSE file that accompanied this code.
4579 #
4580 # This code is distributed in the hope that it will be useful, but WITHOUT
4581 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4582 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4583 # version 2 for more details (a copy is included in the LICENSE file that
4584 # accompanied this code).
4585 #
4586 # You should have received a copy of the GNU General Public License version
4587 # 2 along with this work; if not, write to the Free Software Foundation,
4588 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4589 #
4590 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4591 # or visit www.oracle.com if you need additional information or have any
4592 # questions.
4593 #
4594 
4595 ################################################################################
4596 # Setup bundled libraries.
4597 #
4598 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4599 # OpenJDK repository. Default is to use these libraries as bundled, but they
4600 # might be replaced by en external version by the user.
4601 ################################################################################
4602 
4603 
4604 ################################################################################
4605 # Setup libjpeg
4606 ################################################################################
4607 
4608 
4609 ################################################################################
4610 # Setup giflib
4611 ################################################################################
4612 
4613 
4614 ################################################################################
4615 # Setup libpng
4616 ################################################################################
4617 
4618 
4619 ################################################################################
4620 # Setup zlib
4621 ################################################################################
4622 
4623 
4624 ################################################################################
4625 # Setup lcms (Little CMS)
4626 ################################################################################
4627 
4628 
4629 #
4630 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4631 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4632 #
4633 # This code is free software; you can redistribute it and/or modify it
4634 # under the terms of the GNU General Public License version 2 only, as
4635 # published by the Free Software Foundation.  Oracle designates this
4636 # particular file as subject to the "Classpath" exception as provided
4637 # by Oracle in the LICENSE file that accompanied this code.
4638 #
4639 # This code is distributed in the hope that it will be useful, but WITHOUT
4640 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4641 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4642 # version 2 for more details (a copy is included in the LICENSE file that
4643 # accompanied this code).
4644 #
4645 # You should have received a copy of the GNU General Public License version
4646 # 2 along with this work; if not, write to the Free Software Foundation,
4647 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4648 #
4649 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4650 # or visit www.oracle.com if you need additional information or have any
4651 # questions.
4652 #
4653 
4654 ################################################################################
4655 # Setup cups (Common Unix Printing System)
4656 ################################################################################
4657 
4658 
4659 #
4660 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4661 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4662 #
4663 # This code is free software; you can redistribute it and/or modify it
4664 # under the terms of the GNU General Public License version 2 only, as
4665 # published by the Free Software Foundation.  Oracle designates this
4666 # particular file as subject to the "Classpath" exception as provided
4667 # by Oracle in the LICENSE file that accompanied this code.
4668 #
4669 # This code is distributed in the hope that it will be useful, but WITHOUT
4670 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4671 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4672 # version 2 for more details (a copy is included in the LICENSE file that
4673 # accompanied this code).
4674 #
4675 # You should have received a copy of the GNU General Public License version
4676 # 2 along with this work; if not, write to the Free Software Foundation,
4677 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4678 #
4679 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4680 # or visit www.oracle.com if you need additional information or have any
4681 # questions.
4682 #
4683 
4684 ################################################################################
4685 # Setup libffi (Foreign Function Interface)
4686 ################################################################################
4687 
4688 
4689 #
4690 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4691 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4692 #
4693 # This code is free software; you can redistribute it and/or modify it
4694 # under the terms of the GNU General Public License version 2 only, as
4695 # published by the Free Software Foundation.  Oracle designates this
4696 # particular file as subject to the "Classpath" exception as provided
4697 # by Oracle in the LICENSE file that accompanied this code.
4698 #
4699 # This code is distributed in the hope that it will be useful, but WITHOUT
4700 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4701 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4702 # version 2 for more details (a copy is included in the LICENSE file that
4703 # accompanied this code).
4704 #
4705 # You should have received a copy of the GNU General Public License version
4706 # 2 along with this work; if not, write to the Free Software Foundation,
4707 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4708 #
4709 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4710 # or visit www.oracle.com if you need additional information or have any
4711 # questions.
4712 #
4713 
4714 ################################################################################
4715 # Build the freetype lib from source
4716 ################################################################################
4717 
4718 
4719 ################################################################################
4720 # Check if a potential freeype library match is correct and usable
4721 ################################################################################
4722 
4723 
4724 ################################################################################
4725 # Setup freetype (The FreeType2 font rendering library)
4726 ################################################################################
4727 
4728 
4729 #
4730 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4731 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4732 #
4733 # This code is free software; you can redistribute it and/or modify it
4734 # under the terms of the GNU General Public License version 2 only, as
4735 # published by the Free Software Foundation.  Oracle designates this
4736 # particular file as subject to the "Classpath" exception as provided
4737 # by Oracle in the LICENSE file that accompanied this code.
4738 #
4739 # This code is distributed in the hope that it will be useful, but WITHOUT
4740 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4741 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4742 # version 2 for more details (a copy is included in the LICENSE file that
4743 # accompanied this code).
4744 #
4745 # You should have received a copy of the GNU General Public License version
4746 # 2 along with this work; if not, write to the Free Software Foundation,
4747 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4748 #
4749 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4750 # or visit www.oracle.com if you need additional information or have any
4751 # questions.
4752 #
4753 
4754 ################################################################################
4755 # Setup the standard C/C++ runtime libraries.
4756 #
4757 # Most importantly, determine if stdc++ should be linked statically or
4758 # dynamically.
4759 ################################################################################
4760 
4761 
4762 #
4763 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4764 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4765 #
4766 # This code is free software; you can redistribute it and/or modify it
4767 # under the terms of the GNU General Public License version 2 only, as
4768 # published by the Free Software Foundation.  Oracle designates this
4769 # particular file as subject to the "Classpath" exception as provided
4770 # by Oracle in the LICENSE file that accompanied this code.
4771 #
4772 # This code is distributed in the hope that it will be useful, but WITHOUT
4773 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4774 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4775 # version 2 for more details (a copy is included in the LICENSE file that
4776 # accompanied this code).
4777 #
4778 # You should have received a copy of the GNU General Public License version
4779 # 2 along with this work; if not, write to the Free Software Foundation,
4780 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4781 #
4782 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4783 # or visit www.oracle.com if you need additional information or have any
4784 # questions.
4785 #
4786 
4787 ################################################################################
4788 # Setup X11 Windows system
4789 ################################################################################
4790 
4791 
4792 
4793 ################################################################################
4794 # Determine which libraries are needed for this configuration
4795 ################################################################################
4796 
4797 
4798 ################################################################################
4799 # Parse library options, and setup needed libraries
4800 ################################################################################
4801 
4802 
4803 ################################################################################
4804 # Setup llvm (Low-Level VM)
4805 ################################################################################
4806 
4807 
4808 ################################################################################
4809 # Setup various libraries, typically small system libraries
4810 ################################################################################
4811 
4812 
4813 ################################################################################
4814 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4815 # redistribute it in the test image.
4816 ################################################################################
4817 
4818 
4819 
4820 #
4821 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4822 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4823 #
4824 # This code is free software; you can redistribute it and/or modify it
4825 # under the terms of the GNU General Public License version 2 only, as
4826 # published by the Free Software Foundation.  Oracle designates this
4827 # particular file as subject to the "Classpath" exception as provided
4828 # by Oracle in the LICENSE file that accompanied this code.
4829 #
4830 # This code is distributed in the hope that it will be useful, but WITHOUT
4831 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4832 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4833 # version 2 for more details (a copy is included in the LICENSE file that
4834 # accompanied this code).
4835 #
4836 # You should have received a copy of the GNU General Public License version
4837 # 2 along with this work; if not, write to the Free Software Foundation,
4838 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4839 #
4840 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4841 # or visit www.oracle.com if you need additional information or have any
4842 # questions.
4843 #
4844 
4845 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4846 # Converts autoconf style CPU name to OpenJDK style, into
4847 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4848 
4849 
4850 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4851 # Converts autoconf style OS name to OpenJDK style, into
4852 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4853 
4854 
4855 # Expects $host_os $host_cpu $build_os and $build_cpu
4856 # and $with_target_bits to have been setup!
4857 #
4858 # Translate the standard triplet(quadruplet) definition
4859 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4860 # OPENJDK_BUILD_OS, etc.
4861 
4862 
4863 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4864 # accordingly. Must be done after setting up build and target system, but before
4865 # doing anything else with these values.
4866 
4867 
4868 # Setup the legacy variables, for controlling the old makefiles.
4869 #
4870 
4871 
4872 # $1 - Either TARGET or BUILD to setup the variables for.
4873 
4874 
4875 
4876 
4877 
4878 
4879 #%%% Build and target systems %%%
4880 
4881 
4882 
4883 
4884 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4885 # Add -mX to various FLAGS variables.
4886 
4887 
4888 
4889 
4890 
4891 
4892 #
4893 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4894 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4895 #
4896 # This code is free software; you can redistribute it and/or modify it
4897 # under the terms of the GNU General Public License version 2 only, as
4898 # published by the Free Software Foundation.  Oracle designates this
4899 # particular file as subject to the "Classpath" exception as provided
4900 # by Oracle in the LICENSE file that accompanied this code.
4901 #
4902 # This code is distributed in the hope that it will be useful, but WITHOUT
4903 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4904 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4905 # version 2 for more details (a copy is included in the LICENSE file that
4906 # accompanied this code).
4907 #
4908 # You should have received a copy of the GNU General Public License version
4909 # 2 along with this work; if not, write to the Free Software Foundation,
4910 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4911 #
4912 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4913 # or visit www.oracle.com if you need additional information or have any
4914 # questions.
4915 #
4916 
4917 
4918 
4919 
4920 
4921 
4922 
4923 ################################################################################
4924 # Define a mechanism for importing extra prebuilt modules
4925 #
4926 
4927 
4928 
4929 #
4930 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4931 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4932 #
4933 # This code is free software; you can redistribute it and/or modify it
4934 # under the terms of the GNU General Public License version 2 only, as
4935 # published by the Free Software Foundation.  Oracle designates this
4936 # particular file as subject to the "Classpath" exception as provided
4937 # by Oracle in the LICENSE file that accompanied this code.
4938 #
4939 # This code is distributed in the hope that it will be useful, but WITHOUT
4940 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4941 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4942 # version 2 for more details (a copy is included in the LICENSE file that
4943 # accompanied this code).
4944 #
4945 # You should have received a copy of the GNU General Public License version
4946 # 2 along with this work; if not, write to the Free Software Foundation,
4947 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4948 #
4949 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4950 # or visit www.oracle.com if you need additional information or have any
4951 # questions.
4952 #
4953 
4954 ########################################################################
4955 # This file is responsible for detecting, verifying and setting up the
4956 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4957 # proper paths to the binaries, but it will not setup any flags.
4958 #
4959 # The binaries used is determined by the toolchain type, which is the family of
4960 # compilers and related tools that are used.
4961 ########################################################################
4962 
4963 
4964 # All valid toolchains, regardless of platform (used by help.m4)
4965 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4966 
4967 # These toolchains are valid on different platforms
4968 VALID_TOOLCHAINS_linux="gcc clang"
4969 VALID_TOOLCHAINS_solaris="solstudio"
4970 VALID_TOOLCHAINS_macosx="gcc clang"
4971 VALID_TOOLCHAINS_aix="xlc"
4972 VALID_TOOLCHAINS_windows="microsoft"
4973 
4974 # Toolchain descriptions
4975 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4976 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4977 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4978 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4979 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4980 
4981 # Minimum supported versions, empty means unspecified
4982 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4983 TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4984 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4985 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4986 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4987 
4988 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4989 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4990 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4991 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4992 
4993 
4994 # Check if the configured compiler (C and C++) is of a specific version or
4995 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4996 #
4997 # Arguments:
4998 #   VERSION:   The version string to check against the found version
4999 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5000 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5001 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5002 
5003 
5004 
5005 
5006 # Setup a number of variables describing how native output files are
5007 # named on this platform/toolchain.
5008 
5009 
5010 # Determine which toolchain type to use, and make sure it is valid for this
5011 # platform. Setup various information about the selected toolchain.
5012 
5013 
5014 # Before we start detecting the toolchain executables, we might need some
5015 # special setup, e.g. additional paths etc.
5016 
5017 
5018 # Restore path, etc
5019 
5020 
5021 # Check if a compiler is of the toolchain type we expect, and save the version
5022 # information from it. If the compiler does not match the expected type,
5023 # this function will abort using AC_MSG_ERROR. If it matches, the version will
5024 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5025 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5026 #
5027 # $1 = compiler to test (CC or CXX)
5028 # $2 = human readable name of compiler (C or C++)
5029 
5030 
5031 # Try to locate the given C or C++ compiler in the path, or otherwise.
5032 #
5033 # $1 = compiler to test (CC or CXX)
5034 # $2 = human readable name of compiler (C or C++)
5035 # $3 = compiler name to search for
5036 
5037 
5038 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5039 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5040 # archiver (AR). Verify that the compilers are correct according to the
5041 # toolchain type.
5042 
5043 
5044 # Setup additional tools that is considered a part of the toolchain, but not the
5045 # core part. Many of these are highly platform-specific and do not exist,
5046 # and/or are not needed on all platforms.
5047 
5048 
5049 # Setup the build tools (i.e, the compiler and linker used to build programs
5050 # that should be run on the build platform, not the target platform, as a build
5051 # helper). Since the non-cross-compile case uses the normal, target compilers
5052 # for this, we can only do this after these have been setup.
5053 
5054 
5055 # Do some additional checks on the detected tools.
5056 
5057 
5058 # Setup the JTReg Regression Test Harness.
5059 
5060 
5061 # Setup the JIB dependency resolver
5062 
5063 
5064 #
5065 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5066 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5067 #
5068 # This code is free software; you can redistribute it and/or modify it
5069 # under the terms of the GNU General Public License version 2 only, as
5070 # published by the Free Software Foundation.  Oracle designates this
5071 # particular file as subject to the "Classpath" exception as provided
5072 # by Oracle in the LICENSE file that accompanied this code.
5073 #
5074 # This code is distributed in the hope that it will be useful, but WITHOUT
5075 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5076 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5077 # version 2 for more details (a copy is included in the LICENSE file that
5078 # accompanied this code).
5079 #
5080 # You should have received a copy of the GNU General Public License version
5081 # 2 along with this work; if not, write to the Free Software Foundation,
5082 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5083 #
5084 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5085 # or visit www.oracle.com if you need additional information or have any
5086 # questions.
5087 #
5088 
5089 ################################################################################
5090 # The order of these defines the priority by which we try to find them.
5091 VALID_VS_VERSIONS="2013 2012 2010"
5092 
5093 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5094 VS_VERSION_INTERNAL_2010=100
5095 VS_MSVCR_2010=msvcr100.dll
5096 # We don't use msvcp on Visual Studio 2010
5097 #VS_MSVCP_2010=msvcp100.dll
5098 VS_ENVVAR_2010="VS100COMNTOOLS"
5099 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5100 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5101 VS_VS_PLATFORM_NAME_2010="v100"
5102 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5103 
5104 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5105 VS_VERSION_INTERNAL_2012=110
5106 VS_MSVCR_2012=msvcr110.dll
5107 VS_MSVCP_2012=msvcp110.dll
5108 VS_ENVVAR_2012="VS110COMNTOOLS"
5109 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5110 VS_SDK_INSTALLDIR_2012=
5111 VS_VS_PLATFORM_NAME_2012="v110"
5112 VS_SDK_PLATFORM_NAME_2012=
5113 
5114 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5115 VS_VERSION_INTERNAL_2013=120
5116 VS_MSVCR_2013=msvcr120.dll
5117 VS_MSVCP_2013=msvcp120.dll
5118 VS_ENVVAR_2013="VS120COMNTOOLS"
5119 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5120 VS_SDK_INSTALLDIR_2013=
5121 VS_VS_PLATFORM_NAME_2013="v120"
5122 VS_SDK_PLATFORM_NAME_2013=
5123 
5124 ################################################################################
5125 
5126 
5127 
5128 ################################################################################
5129 
5130 
5131 
5132 ################################################################################
5133 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5134 # build environment and assigns it to VS_ENV_CMD
5135 
5136 
5137 ################################################################################
5138 
5139 
5140 
5141 ################################################################################
5142 # Check if the VS env variables were setup prior to running configure.
5143 # If not, then find vcvarsall.bat and run it automatically, and integrate
5144 # the set env variables into the spec file.
5145 
5146 
5147 
5148 
5149 
5150 
5151 
5152 
5153 
5154 
5155 
5156 
5157 
5158 
5159 # This line needs to be here, verbatim, after all includes and the dummy hook
5160 # definitions. It is replaced with custom functionality when building
5161 # custom sources.
5162 #CUSTOM_AUTOCONF_INCLUDE
5163 
5164 # Do not change or remove the following line, it is needed for consistency checks:
5165 DATE_WHEN_GENERATED=1505235832
5166 
5167 ###############################################################################
5168 #
5169 # Initialization / Boot-strapping
5170 #
5171 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5172 # thus it jumps back and forth, each time gaining something needed later on.
5173 #
5174 ###############################################################################
5175 
5176 # If we are requested to print additional help, do that and then exit.
5177 # This must be the very first call.
5178 
5179   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5180 
5181     # Print available toolchains
5182     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5183     $PRINTF "Which are valid to use depends on the build platform.\n"
5184     for toolchain in $VALID_TOOLCHAINS_all; do
5185       # Use indirect variable referencing
5186       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5187       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5188       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5189     done
5190     $PRINTF "\n"
5191 
5192     # Print available jvm features
5193     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5194     $PRINTF "Which are valid to use depends on the target platform.\n  "
5195     $PRINTF "%s " $VALID_JVM_FEATURES
5196     $PRINTF "\n"
5197 
5198     # And now exit directly
5199     exit 0
5200   fi
5201 
5202 
5203 # Basic initialization that must happen first of all in the normal process.
5204 
5205   # Save the original command line. This is passed to us by the wrapper configure script.
5206 
5207   # Save the path variable before it gets changed
5208   ORIGINAL_PATH="$PATH"
5209 
5210   DATE_WHEN_CONFIGURED=`LANG=C date`
5211 
5212   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5213 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5214   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5215 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5216 
5217 
5218   # Start with tools that do not need have cross compilation support
5219   # and can be expected to be found in the default PATH. These tools are
5220   # used by configure.
5221 
5222   # First are all the simple required tools.
5223 
5224 
5225 
5226   # Publish this variable in the help.
5227 
5228 
5229   if [ -z "${BASENAME+x}" ]; then
5230     # The variable is not set by user, try to locate tool using the code snippet
5231     for ac_prog in basename
5232 do
5233   # Extract the first word of "$ac_prog", so it can be a program name with args.
5234 set dummy $ac_prog; ac_word=$2
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5236 $as_echo_n "checking for $ac_word... " >&6; }
5237 if ${ac_cv_path_BASENAME+:} false; then :
5238   $as_echo_n "(cached) " >&6
5239 else
5240   case $BASENAME in
5241   [\\/]* | ?:[\\/]*)
5242   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5243   ;;
5244   *)
5245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5246 for as_dir in $PATH
5247 do
5248   IFS=$as_save_IFS
5249   test -z "$as_dir" && as_dir=.
5250     for ac_exec_ext in '' $ac_executable_extensions; do
5251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5252     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5254     break 2
5255   fi
5256 done
5257   done
5258 IFS=$as_save_IFS
5259 
5260   ;;
5261 esac
5262 fi
5263 BASENAME=$ac_cv_path_BASENAME
5264 if test -n "$BASENAME"; then
5265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5266 $as_echo "$BASENAME" >&6; }
5267 else
5268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5269 $as_echo "no" >&6; }
5270 fi
5271 
5272 
5273   test -n "$BASENAME" && break
5274 done
5275 
5276   else
5277     # The variable is set, but is it from the command line or the environment?
5278 
5279     # Try to remove the string !BASENAME! from our list.
5280     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5281     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5282       # If it failed, the variable was not from the command line. Ignore it,
5283       # but warn the user (except for BASH, which is always set by the calling BASH).
5284       if test "xBASENAME" != xBASH; then
5285         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5286 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5287       fi
5288       # Try to locate tool using the code snippet
5289       for ac_prog in basename
5290 do
5291   # Extract the first word of "$ac_prog", so it can be a program name with args.
5292 set dummy $ac_prog; ac_word=$2
5293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294 $as_echo_n "checking for $ac_word... " >&6; }
5295 if ${ac_cv_path_BASENAME+:} false; then :
5296   $as_echo_n "(cached) " >&6
5297 else
5298   case $BASENAME in
5299   [\\/]* | ?:[\\/]*)
5300   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5301   ;;
5302   *)
5303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304 for as_dir in $PATH
5305 do
5306   IFS=$as_save_IFS
5307   test -z "$as_dir" && as_dir=.
5308     for ac_exec_ext in '' $ac_executable_extensions; do
5309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312     break 2
5313   fi
5314 done
5315   done
5316 IFS=$as_save_IFS
5317 
5318   ;;
5319 esac
5320 fi
5321 BASENAME=$ac_cv_path_BASENAME
5322 if test -n "$BASENAME"; then
5323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5324 $as_echo "$BASENAME" >&6; }
5325 else
5326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327 $as_echo "no" >&6; }
5328 fi
5329 
5330 
5331   test -n "$BASENAME" && break
5332 done
5333 
5334     else
5335       # If it succeeded, then it was overridden by the user. We will use it
5336       # for the tool.
5337 
5338       # First remove it from the list of overridden variables, so we can test
5339       # for unknown variables in the end.
5340       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5341 
5342       # Check if we try to supply an empty value
5343       if test "x$BASENAME" = x; then
5344         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5345 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5346         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5347 $as_echo_n "checking for BASENAME... " >&6; }
5348         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5349 $as_echo "disabled" >&6; }
5350       else
5351         # Check if the provided tool contains a complete path.
5352         tool_specified="$BASENAME"
5353         tool_basename="${tool_specified##*/}"
5354         if test "x$tool_basename" = "x$tool_specified"; then
5355           # A command without a complete path is provided, search $PATH.
5356           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5357 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5358           # Extract the first word of "$tool_basename", so it can be a program name with args.
5359 set dummy $tool_basename; ac_word=$2
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5361 $as_echo_n "checking for $ac_word... " >&6; }
5362 if ${ac_cv_path_BASENAME+:} false; then :
5363   $as_echo_n "(cached) " >&6
5364 else
5365   case $BASENAME in
5366   [\\/]* | ?:[\\/]*)
5367   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5368   ;;
5369   *)
5370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5371 for as_dir in $PATH
5372 do
5373   IFS=$as_save_IFS
5374   test -z "$as_dir" && as_dir=.
5375     for ac_exec_ext in '' $ac_executable_extensions; do
5376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5377     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5379     break 2
5380   fi
5381 done
5382   done
5383 IFS=$as_save_IFS
5384 
5385   ;;
5386 esac
5387 fi
5388 BASENAME=$ac_cv_path_BASENAME
5389 if test -n "$BASENAME"; then
5390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5391 $as_echo "$BASENAME" >&6; }
5392 else
5393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5394 $as_echo "no" >&6; }
5395 fi
5396 
5397 
5398           if test "x$BASENAME" = x; then
5399             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5400           fi
5401         else
5402           # Otherwise we believe it is a complete path. Use it as it is.
5403           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5404 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5405           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5406 $as_echo_n "checking for BASENAME... " >&6; }
5407           if test ! -x "$tool_specified"; then
5408             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5409 $as_echo "not found" >&6; }
5410             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5411           fi
5412           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5413 $as_echo "$tool_specified" >&6; }
5414         fi
5415       fi
5416     fi
5417 
5418   fi
5419 
5420 
5421 
5422   if test "x$BASENAME" = x; then
5423     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5424   fi
5425 
5426 
5427 
5428 
5429 
5430   # Publish this variable in the help.
5431 
5432 
5433   if [ -z "${BASH+x}" ]; then
5434     # The variable is not set by user, try to locate tool using the code snippet
5435     for ac_prog in bash
5436 do
5437   # Extract the first word of "$ac_prog", so it can be a program name with args.
5438 set dummy $ac_prog; ac_word=$2
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5440 $as_echo_n "checking for $ac_word... " >&6; }
5441 if ${ac_cv_path_BASH+:} false; then :
5442   $as_echo_n "(cached) " >&6
5443 else
5444   case $BASH in
5445   [\\/]* | ?:[\\/]*)
5446   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5447   ;;
5448   *)
5449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5450 for as_dir in $PATH
5451 do
5452   IFS=$as_save_IFS
5453   test -z "$as_dir" && as_dir=.
5454     for ac_exec_ext in '' $ac_executable_extensions; do
5455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5456     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5458     break 2
5459   fi
5460 done
5461   done
5462 IFS=$as_save_IFS
5463 
5464   ;;
5465 esac
5466 fi
5467 BASH=$ac_cv_path_BASH
5468 if test -n "$BASH"; then
5469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5470 $as_echo "$BASH" >&6; }
5471 else
5472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5473 $as_echo "no" >&6; }
5474 fi
5475 
5476 
5477   test -n "$BASH" && break
5478 done
5479 
5480   else
5481     # The variable is set, but is it from the command line or the environment?
5482 
5483     # Try to remove the string !BASH! from our list.
5484     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5485     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5486       # If it failed, the variable was not from the command line. Ignore it,
5487       # but warn the user (except for BASH, which is always set by the calling BASH).
5488       if test "xBASH" != xBASH; then
5489         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5490 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5491       fi
5492       # Try to locate tool using the code snippet
5493       for ac_prog in bash
5494 do
5495   # Extract the first word of "$ac_prog", so it can be a program name with args.
5496 set dummy $ac_prog; ac_word=$2
5497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498 $as_echo_n "checking for $ac_word... " >&6; }
5499 if ${ac_cv_path_BASH+:} false; then :
5500   $as_echo_n "(cached) " >&6
5501 else
5502   case $BASH in
5503   [\\/]* | ?:[\\/]*)
5504   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5505   ;;
5506   *)
5507   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508 for as_dir in $PATH
5509 do
5510   IFS=$as_save_IFS
5511   test -z "$as_dir" && as_dir=.
5512     for ac_exec_ext in '' $ac_executable_extensions; do
5513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516     break 2
5517   fi
5518 done
5519   done
5520 IFS=$as_save_IFS
5521 
5522   ;;
5523 esac
5524 fi
5525 BASH=$ac_cv_path_BASH
5526 if test -n "$BASH"; then
5527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5528 $as_echo "$BASH" >&6; }
5529 else
5530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531 $as_echo "no" >&6; }
5532 fi
5533 
5534 
5535   test -n "$BASH" && break
5536 done
5537 
5538     else
5539       # If it succeeded, then it was overridden by the user. We will use it
5540       # for the tool.
5541 
5542       # First remove it from the list of overridden variables, so we can test
5543       # for unknown variables in the end.
5544       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5545 
5546       # Check if we try to supply an empty value
5547       if test "x$BASH" = x; then
5548         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5549 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5550         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5551 $as_echo_n "checking for BASH... " >&6; }
5552         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5553 $as_echo "disabled" >&6; }
5554       else
5555         # Check if the provided tool contains a complete path.
5556         tool_specified="$BASH"
5557         tool_basename="${tool_specified##*/}"
5558         if test "x$tool_basename" = "x$tool_specified"; then
5559           # A command without a complete path is provided, search $PATH.
5560           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5561 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5562           # Extract the first word of "$tool_basename", so it can be a program name with args.
5563 set dummy $tool_basename; ac_word=$2
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5565 $as_echo_n "checking for $ac_word... " >&6; }
5566 if ${ac_cv_path_BASH+:} false; then :
5567   $as_echo_n "(cached) " >&6
5568 else
5569   case $BASH in
5570   [\\/]* | ?:[\\/]*)
5571   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5572   ;;
5573   *)
5574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5575 for as_dir in $PATH
5576 do
5577   IFS=$as_save_IFS
5578   test -z "$as_dir" && as_dir=.
5579     for ac_exec_ext in '' $ac_executable_extensions; do
5580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5581     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5583     break 2
5584   fi
5585 done
5586   done
5587 IFS=$as_save_IFS
5588 
5589   ;;
5590 esac
5591 fi
5592 BASH=$ac_cv_path_BASH
5593 if test -n "$BASH"; then
5594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5595 $as_echo "$BASH" >&6; }
5596 else
5597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5598 $as_echo "no" >&6; }
5599 fi
5600 
5601 
5602           if test "x$BASH" = x; then
5603             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5604           fi
5605         else
5606           # Otherwise we believe it is a complete path. Use it as it is.
5607           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5608 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5609           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5610 $as_echo_n "checking for BASH... " >&6; }
5611           if test ! -x "$tool_specified"; then
5612             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5613 $as_echo "not found" >&6; }
5614             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5615           fi
5616           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5617 $as_echo "$tool_specified" >&6; }
5618         fi
5619       fi
5620     fi
5621 
5622   fi
5623 
5624 
5625 
5626   if test "x$BASH" = x; then
5627     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5628   fi
5629 
5630 
5631 
5632 
5633 
5634   # Publish this variable in the help.
5635 
5636 
5637   if [ -z "${CAT+x}" ]; then
5638     # The variable is not set by user, try to locate tool using the code snippet
5639     for ac_prog in cat
5640 do
5641   # Extract the first word of "$ac_prog", so it can be a program name with args.
5642 set dummy $ac_prog; ac_word=$2
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5644 $as_echo_n "checking for $ac_word... " >&6; }
5645 if ${ac_cv_path_CAT+:} false; then :
5646   $as_echo_n "(cached) " >&6
5647 else
5648   case $CAT in
5649   [\\/]* | ?:[\\/]*)
5650   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5651   ;;
5652   *)
5653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5654 for as_dir in $PATH
5655 do
5656   IFS=$as_save_IFS
5657   test -z "$as_dir" && as_dir=.
5658     for ac_exec_ext in '' $ac_executable_extensions; do
5659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5660     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5662     break 2
5663   fi
5664 done
5665   done
5666 IFS=$as_save_IFS
5667 
5668   ;;
5669 esac
5670 fi
5671 CAT=$ac_cv_path_CAT
5672 if test -n "$CAT"; then
5673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5674 $as_echo "$CAT" >&6; }
5675 else
5676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5677 $as_echo "no" >&6; }
5678 fi
5679 
5680 
5681   test -n "$CAT" && break
5682 done
5683 
5684   else
5685     # The variable is set, but is it from the command line or the environment?
5686 
5687     # Try to remove the string !CAT! from our list.
5688     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5689     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5690       # If it failed, the variable was not from the command line. Ignore it,
5691       # but warn the user (except for BASH, which is always set by the calling BASH).
5692       if test "xCAT" != xBASH; then
5693         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5694 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5695       fi
5696       # Try to locate tool using the code snippet
5697       for ac_prog in cat
5698 do
5699   # Extract the first word of "$ac_prog", so it can be a program name with args.
5700 set dummy $ac_prog; ac_word=$2
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702 $as_echo_n "checking for $ac_word... " >&6; }
5703 if ${ac_cv_path_CAT+:} false; then :
5704   $as_echo_n "(cached) " >&6
5705 else
5706   case $CAT in
5707   [\\/]* | ?:[\\/]*)
5708   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5709   ;;
5710   *)
5711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712 for as_dir in $PATH
5713 do
5714   IFS=$as_save_IFS
5715   test -z "$as_dir" && as_dir=.
5716     for ac_exec_ext in '' $ac_executable_extensions; do
5717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5718     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720     break 2
5721   fi
5722 done
5723   done
5724 IFS=$as_save_IFS
5725 
5726   ;;
5727 esac
5728 fi
5729 CAT=$ac_cv_path_CAT
5730 if test -n "$CAT"; then
5731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5732 $as_echo "$CAT" >&6; }
5733 else
5734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735 $as_echo "no" >&6; }
5736 fi
5737 
5738 
5739   test -n "$CAT" && break
5740 done
5741 
5742     else
5743       # If it succeeded, then it was overridden by the user. We will use it
5744       # for the tool.
5745 
5746       # First remove it from the list of overridden variables, so we can test
5747       # for unknown variables in the end.
5748       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5749 
5750       # Check if we try to supply an empty value
5751       if test "x$CAT" = x; then
5752         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5753 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5755 $as_echo_n "checking for CAT... " >&6; }
5756         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5757 $as_echo "disabled" >&6; }
5758       else
5759         # Check if the provided tool contains a complete path.
5760         tool_specified="$CAT"
5761         tool_basename="${tool_specified##*/}"
5762         if test "x$tool_basename" = "x$tool_specified"; then
5763           # A command without a complete path is provided, search $PATH.
5764           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5765 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5766           # Extract the first word of "$tool_basename", so it can be a program name with args.
5767 set dummy $tool_basename; ac_word=$2
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769 $as_echo_n "checking for $ac_word... " >&6; }
5770 if ${ac_cv_path_CAT+:} false; then :
5771   $as_echo_n "(cached) " >&6
5772 else
5773   case $CAT in
5774   [\\/]* | ?:[\\/]*)
5775   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5776   ;;
5777   *)
5778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779 for as_dir in $PATH
5780 do
5781   IFS=$as_save_IFS
5782   test -z "$as_dir" && as_dir=.
5783     for ac_exec_ext in '' $ac_executable_extensions; do
5784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5785     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787     break 2
5788   fi
5789 done
5790   done
5791 IFS=$as_save_IFS
5792 
5793   ;;
5794 esac
5795 fi
5796 CAT=$ac_cv_path_CAT
5797 if test -n "$CAT"; then
5798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5799 $as_echo "$CAT" >&6; }
5800 else
5801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802 $as_echo "no" >&6; }
5803 fi
5804 
5805 
5806           if test "x$CAT" = x; then
5807             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5808           fi
5809         else
5810           # Otherwise we believe it is a complete path. Use it as it is.
5811           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5812 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5813           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5814 $as_echo_n "checking for CAT... " >&6; }
5815           if test ! -x "$tool_specified"; then
5816             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5817 $as_echo "not found" >&6; }
5818             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5819           fi
5820           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5821 $as_echo "$tool_specified" >&6; }
5822         fi
5823       fi
5824     fi
5825 
5826   fi
5827 
5828 
5829 
5830   if test "x$CAT" = x; then
5831     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5832   fi
5833 
5834 
5835 
5836 
5837 
5838   # Publish this variable in the help.
5839 
5840 
5841   if [ -z "${CHMOD+x}" ]; then
5842     # The variable is not set by user, try to locate tool using the code snippet
5843     for ac_prog in chmod
5844 do
5845   # Extract the first word of "$ac_prog", so it can be a program name with args.
5846 set dummy $ac_prog; ac_word=$2
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5848 $as_echo_n "checking for $ac_word... " >&6; }
5849 if ${ac_cv_path_CHMOD+:} false; then :
5850   $as_echo_n "(cached) " >&6
5851 else
5852   case $CHMOD in
5853   [\\/]* | ?:[\\/]*)
5854   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5855   ;;
5856   *)
5857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5858 for as_dir in $PATH
5859 do
5860   IFS=$as_save_IFS
5861   test -z "$as_dir" && as_dir=.
5862     for ac_exec_ext in '' $ac_executable_extensions; do
5863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5864     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5866     break 2
5867   fi
5868 done
5869   done
5870 IFS=$as_save_IFS
5871 
5872   ;;
5873 esac
5874 fi
5875 CHMOD=$ac_cv_path_CHMOD
5876 if test -n "$CHMOD"; then
5877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5878 $as_echo "$CHMOD" >&6; }
5879 else
5880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5881 $as_echo "no" >&6; }
5882 fi
5883 
5884 
5885   test -n "$CHMOD" && break
5886 done
5887 
5888   else
5889     # The variable is set, but is it from the command line or the environment?
5890 
5891     # Try to remove the string !CHMOD! from our list.
5892     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5893     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5894       # If it failed, the variable was not from the command line. Ignore it,
5895       # but warn the user (except for BASH, which is always set by the calling BASH).
5896       if test "xCHMOD" != xBASH; then
5897         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5898 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5899       fi
5900       # Try to locate tool using the code snippet
5901       for ac_prog in chmod
5902 do
5903   # Extract the first word of "$ac_prog", so it can be a program name with args.
5904 set dummy $ac_prog; ac_word=$2
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906 $as_echo_n "checking for $ac_word... " >&6; }
5907 if ${ac_cv_path_CHMOD+:} false; then :
5908   $as_echo_n "(cached) " >&6
5909 else
5910   case $CHMOD in
5911   [\\/]* | ?:[\\/]*)
5912   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5913   ;;
5914   *)
5915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916 for as_dir in $PATH
5917 do
5918   IFS=$as_save_IFS
5919   test -z "$as_dir" && as_dir=.
5920     for ac_exec_ext in '' $ac_executable_extensions; do
5921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5922     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5924     break 2
5925   fi
5926 done
5927   done
5928 IFS=$as_save_IFS
5929 
5930   ;;
5931 esac
5932 fi
5933 CHMOD=$ac_cv_path_CHMOD
5934 if test -n "$CHMOD"; then
5935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5936 $as_echo "$CHMOD" >&6; }
5937 else
5938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5939 $as_echo "no" >&6; }
5940 fi
5941 
5942 
5943   test -n "$CHMOD" && break
5944 done
5945 
5946     else
5947       # If it succeeded, then it was overridden by the user. We will use it
5948       # for the tool.
5949 
5950       # First remove it from the list of overridden variables, so we can test
5951       # for unknown variables in the end.
5952       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5953 
5954       # Check if we try to supply an empty value
5955       if test "x$CHMOD" = x; then
5956         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5957 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5959 $as_echo_n "checking for CHMOD... " >&6; }
5960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5961 $as_echo "disabled" >&6; }
5962       else
5963         # Check if the provided tool contains a complete path.
5964         tool_specified="$CHMOD"
5965         tool_basename="${tool_specified##*/}"
5966         if test "x$tool_basename" = "x$tool_specified"; then
5967           # A command without a complete path is provided, search $PATH.
5968           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5969 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5970           # Extract the first word of "$tool_basename", so it can be a program name with args.
5971 set dummy $tool_basename; ac_word=$2
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973 $as_echo_n "checking for $ac_word... " >&6; }
5974 if ${ac_cv_path_CHMOD+:} false; then :
5975   $as_echo_n "(cached) " >&6
5976 else
5977   case $CHMOD in
5978   [\\/]* | ?:[\\/]*)
5979   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5980   ;;
5981   *)
5982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983 for as_dir in $PATH
5984 do
5985   IFS=$as_save_IFS
5986   test -z "$as_dir" && as_dir=.
5987     for ac_exec_ext in '' $ac_executable_extensions; do
5988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5989     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991     break 2
5992   fi
5993 done
5994   done
5995 IFS=$as_save_IFS
5996 
5997   ;;
5998 esac
5999 fi
6000 CHMOD=$ac_cv_path_CHMOD
6001 if test -n "$CHMOD"; then
6002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6003 $as_echo "$CHMOD" >&6; }
6004 else
6005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006 $as_echo "no" >&6; }
6007 fi
6008 
6009 
6010           if test "x$CHMOD" = x; then
6011             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6012           fi
6013         else
6014           # Otherwise we believe it is a complete path. Use it as it is.
6015           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6016 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6017           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6018 $as_echo_n "checking for CHMOD... " >&6; }
6019           if test ! -x "$tool_specified"; then
6020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6021 $as_echo "not found" >&6; }
6022             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6023           fi
6024           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6025 $as_echo "$tool_specified" >&6; }
6026         fi
6027       fi
6028     fi
6029 
6030   fi
6031 
6032 
6033 
6034   if test "x$CHMOD" = x; then
6035     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6036   fi
6037 
6038 
6039 
6040 
6041 
6042   # Publish this variable in the help.
6043 
6044 
6045   if [ -z "${CMP+x}" ]; then
6046     # The variable is not set by user, try to locate tool using the code snippet
6047     for ac_prog in cmp
6048 do
6049   # Extract the first word of "$ac_prog", so it can be a program name with args.
6050 set dummy $ac_prog; ac_word=$2
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052 $as_echo_n "checking for $ac_word... " >&6; }
6053 if ${ac_cv_path_CMP+:} false; then :
6054   $as_echo_n "(cached) " >&6
6055 else
6056   case $CMP in
6057   [\\/]* | ?:[\\/]*)
6058   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6059   ;;
6060   *)
6061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062 for as_dir in $PATH
6063 do
6064   IFS=$as_save_IFS
6065   test -z "$as_dir" && as_dir=.
6066     for ac_exec_ext in '' $ac_executable_extensions; do
6067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6068     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070     break 2
6071   fi
6072 done
6073   done
6074 IFS=$as_save_IFS
6075 
6076   ;;
6077 esac
6078 fi
6079 CMP=$ac_cv_path_CMP
6080 if test -n "$CMP"; then
6081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6082 $as_echo "$CMP" >&6; }
6083 else
6084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6085 $as_echo "no" >&6; }
6086 fi
6087 
6088 
6089   test -n "$CMP" && break
6090 done
6091 
6092   else
6093     # The variable is set, but is it from the command line or the environment?
6094 
6095     # Try to remove the string !CMP! from our list.
6096     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6097     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6098       # If it failed, the variable was not from the command line. Ignore it,
6099       # but warn the user (except for BASH, which is always set by the calling BASH).
6100       if test "xCMP" != xBASH; then
6101         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6102 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6103       fi
6104       # Try to locate tool using the code snippet
6105       for ac_prog in cmp
6106 do
6107   # Extract the first word of "$ac_prog", so it can be a program name with args.
6108 set dummy $ac_prog; ac_word=$2
6109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6110 $as_echo_n "checking for $ac_word... " >&6; }
6111 if ${ac_cv_path_CMP+:} false; then :
6112   $as_echo_n "(cached) " >&6
6113 else
6114   case $CMP in
6115   [\\/]* | ?:[\\/]*)
6116   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6117   ;;
6118   *)
6119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120 for as_dir in $PATH
6121 do
6122   IFS=$as_save_IFS
6123   test -z "$as_dir" && as_dir=.
6124     for ac_exec_ext in '' $ac_executable_extensions; do
6125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6126     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6128     break 2
6129   fi
6130 done
6131   done
6132 IFS=$as_save_IFS
6133 
6134   ;;
6135 esac
6136 fi
6137 CMP=$ac_cv_path_CMP
6138 if test -n "$CMP"; then
6139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6140 $as_echo "$CMP" >&6; }
6141 else
6142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143 $as_echo "no" >&6; }
6144 fi
6145 
6146 
6147   test -n "$CMP" && break
6148 done
6149 
6150     else
6151       # If it succeeded, then it was overridden by the user. We will use it
6152       # for the tool.
6153 
6154       # First remove it from the list of overridden variables, so we can test
6155       # for unknown variables in the end.
6156       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6157 
6158       # Check if we try to supply an empty value
6159       if test "x$CMP" = x; then
6160         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6161 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6162         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6163 $as_echo_n "checking for CMP... " >&6; }
6164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6165 $as_echo "disabled" >&6; }
6166       else
6167         # Check if the provided tool contains a complete path.
6168         tool_specified="$CMP"
6169         tool_basename="${tool_specified##*/}"
6170         if test "x$tool_basename" = "x$tool_specified"; then
6171           # A command without a complete path is provided, search $PATH.
6172           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6173 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6174           # Extract the first word of "$tool_basename", so it can be a program name with args.
6175 set dummy $tool_basename; ac_word=$2
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6177 $as_echo_n "checking for $ac_word... " >&6; }
6178 if ${ac_cv_path_CMP+:} false; then :
6179   $as_echo_n "(cached) " >&6
6180 else
6181   case $CMP in
6182   [\\/]* | ?:[\\/]*)
6183   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6184   ;;
6185   *)
6186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6187 for as_dir in $PATH
6188 do
6189   IFS=$as_save_IFS
6190   test -z "$as_dir" && as_dir=.
6191     for ac_exec_ext in '' $ac_executable_extensions; do
6192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6193     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6195     break 2
6196   fi
6197 done
6198   done
6199 IFS=$as_save_IFS
6200 
6201   ;;
6202 esac
6203 fi
6204 CMP=$ac_cv_path_CMP
6205 if test -n "$CMP"; then
6206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6207 $as_echo "$CMP" >&6; }
6208 else
6209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210 $as_echo "no" >&6; }
6211 fi
6212 
6213 
6214           if test "x$CMP" = x; then
6215             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6216           fi
6217         else
6218           # Otherwise we believe it is a complete path. Use it as it is.
6219           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6220 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6221           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6222 $as_echo_n "checking for CMP... " >&6; }
6223           if test ! -x "$tool_specified"; then
6224             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6225 $as_echo "not found" >&6; }
6226             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6227           fi
6228           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6229 $as_echo "$tool_specified" >&6; }
6230         fi
6231       fi
6232     fi
6233 
6234   fi
6235 
6236 
6237 
6238   if test "x$CMP" = x; then
6239     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6240   fi
6241 
6242 
6243 
6244 
6245 
6246   # Publish this variable in the help.
6247 
6248 
6249   if [ -z "${COMM+x}" ]; then
6250     # The variable is not set by user, try to locate tool using the code snippet
6251     for ac_prog in comm
6252 do
6253   # Extract the first word of "$ac_prog", so it can be a program name with args.
6254 set dummy $ac_prog; ac_word=$2
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6256 $as_echo_n "checking for $ac_word... " >&6; }
6257 if ${ac_cv_path_COMM+:} false; then :
6258   $as_echo_n "(cached) " >&6
6259 else
6260   case $COMM in
6261   [\\/]* | ?:[\\/]*)
6262   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6263   ;;
6264   *)
6265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266 for as_dir in $PATH
6267 do
6268   IFS=$as_save_IFS
6269   test -z "$as_dir" && as_dir=.
6270     for ac_exec_ext in '' $ac_executable_extensions; do
6271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6272     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6274     break 2
6275   fi
6276 done
6277   done
6278 IFS=$as_save_IFS
6279 
6280   ;;
6281 esac
6282 fi
6283 COMM=$ac_cv_path_COMM
6284 if test -n "$COMM"; then
6285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6286 $as_echo "$COMM" >&6; }
6287 else
6288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6289 $as_echo "no" >&6; }
6290 fi
6291 
6292 
6293   test -n "$COMM" && break
6294 done
6295 
6296   else
6297     # The variable is set, but is it from the command line or the environment?
6298 
6299     # Try to remove the string !COMM! from our list.
6300     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6301     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6302       # If it failed, the variable was not from the command line. Ignore it,
6303       # but warn the user (except for BASH, which is always set by the calling BASH).
6304       if test "xCOMM" != xBASH; then
6305         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6306 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6307       fi
6308       # Try to locate tool using the code snippet
6309       for ac_prog in comm
6310 do
6311   # Extract the first word of "$ac_prog", so it can be a program name with args.
6312 set dummy $ac_prog; ac_word=$2
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314 $as_echo_n "checking for $ac_word... " >&6; }
6315 if ${ac_cv_path_COMM+:} false; then :
6316   $as_echo_n "(cached) " >&6
6317 else
6318   case $COMM in
6319   [\\/]* | ?:[\\/]*)
6320   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6321   ;;
6322   *)
6323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324 for as_dir in $PATH
6325 do
6326   IFS=$as_save_IFS
6327   test -z "$as_dir" && as_dir=.
6328     for ac_exec_ext in '' $ac_executable_extensions; do
6329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6330     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332     break 2
6333   fi
6334 done
6335   done
6336 IFS=$as_save_IFS
6337 
6338   ;;
6339 esac
6340 fi
6341 COMM=$ac_cv_path_COMM
6342 if test -n "$COMM"; then
6343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6344 $as_echo "$COMM" >&6; }
6345 else
6346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347 $as_echo "no" >&6; }
6348 fi
6349 
6350 
6351   test -n "$COMM" && break
6352 done
6353 
6354     else
6355       # If it succeeded, then it was overridden by the user. We will use it
6356       # for the tool.
6357 
6358       # First remove it from the list of overridden variables, so we can test
6359       # for unknown variables in the end.
6360       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6361 
6362       # Check if we try to supply an empty value
6363       if test "x$COMM" = x; then
6364         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6365 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6367 $as_echo_n "checking for COMM... " >&6; }
6368         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6369 $as_echo "disabled" >&6; }
6370       else
6371         # Check if the provided tool contains a complete path.
6372         tool_specified="$COMM"
6373         tool_basename="${tool_specified##*/}"
6374         if test "x$tool_basename" = "x$tool_specified"; then
6375           # A command without a complete path is provided, search $PATH.
6376           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6377 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6378           # Extract the first word of "$tool_basename", so it can be a program name with args.
6379 set dummy $tool_basename; 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_COMM+:} false; then :
6383   $as_echo_n "(cached) " >&6
6384 else
6385   case $COMM in
6386   [\\/]* | ?:[\\/]*)
6387   ac_cv_path_COMM="$COMM" # 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_COMM="$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 COMM=$ac_cv_path_COMM
6409 if test -n "$COMM"; then
6410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6411 $as_echo "$COMM" >&6; }
6412 else
6413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414 $as_echo "no" >&6; }
6415 fi
6416 
6417 
6418           if test "x$COMM" = x; then
6419             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6420           fi
6421         else
6422           # Otherwise we believe it is a complete path. Use it as it is.
6423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6424 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6425           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6426 $as_echo_n "checking for COMM... " >&6; }
6427           if test ! -x "$tool_specified"; then
6428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6429 $as_echo "not found" >&6; }
6430             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6431           fi
6432           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6433 $as_echo "$tool_specified" >&6; }
6434         fi
6435       fi
6436     fi
6437 
6438   fi
6439 
6440 
6441 
6442   if test "x$COMM" = x; then
6443     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6444   fi
6445 
6446 
6447 
6448 
6449 
6450   # Publish this variable in the help.
6451 
6452 
6453   if [ -z "${CP+x}" ]; then
6454     # The variable is not set by user, try to locate tool using the code snippet
6455     for ac_prog in cp
6456 do
6457   # Extract the first word of "$ac_prog", so it can be a program name with args.
6458 set dummy $ac_prog; ac_word=$2
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460 $as_echo_n "checking for $ac_word... " >&6; }
6461 if ${ac_cv_path_CP+:} false; then :
6462   $as_echo_n "(cached) " >&6
6463 else
6464   case $CP in
6465   [\\/]* | ?:[\\/]*)
6466   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6467   ;;
6468   *)
6469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470 for as_dir in $PATH
6471 do
6472   IFS=$as_save_IFS
6473   test -z "$as_dir" && as_dir=.
6474     for ac_exec_ext in '' $ac_executable_extensions; do
6475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6476     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478     break 2
6479   fi
6480 done
6481   done
6482 IFS=$as_save_IFS
6483 
6484   ;;
6485 esac
6486 fi
6487 CP=$ac_cv_path_CP
6488 if test -n "$CP"; then
6489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6490 $as_echo "$CP" >&6; }
6491 else
6492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493 $as_echo "no" >&6; }
6494 fi
6495 
6496 
6497   test -n "$CP" && break
6498 done
6499 
6500   else
6501     # The variable is set, but is it from the command line or the environment?
6502 
6503     # Try to remove the string !CP! from our list.
6504     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6505     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6506       # If it failed, the variable was not from the command line. Ignore it,
6507       # but warn the user (except for BASH, which is always set by the calling BASH).
6508       if test "xCP" != xBASH; then
6509         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6510 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6511       fi
6512       # Try to locate tool using the code snippet
6513       for ac_prog in cp
6514 do
6515   # Extract the first word of "$ac_prog", so it can be a program name with args.
6516 set dummy $ac_prog; ac_word=$2
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518 $as_echo_n "checking for $ac_word... " >&6; }
6519 if ${ac_cv_path_CP+:} false; then :
6520   $as_echo_n "(cached) " >&6
6521 else
6522   case $CP in
6523   [\\/]* | ?:[\\/]*)
6524   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6525   ;;
6526   *)
6527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528 for as_dir in $PATH
6529 do
6530   IFS=$as_save_IFS
6531   test -z "$as_dir" && as_dir=.
6532     for ac_exec_ext in '' $ac_executable_extensions; do
6533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536     break 2
6537   fi
6538 done
6539   done
6540 IFS=$as_save_IFS
6541 
6542   ;;
6543 esac
6544 fi
6545 CP=$ac_cv_path_CP
6546 if test -n "$CP"; then
6547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6548 $as_echo "$CP" >&6; }
6549 else
6550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551 $as_echo "no" >&6; }
6552 fi
6553 
6554 
6555   test -n "$CP" && break
6556 done
6557 
6558     else
6559       # If it succeeded, then it was overridden by the user. We will use it
6560       # for the tool.
6561 
6562       # First remove it from the list of overridden variables, so we can test
6563       # for unknown variables in the end.
6564       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6565 
6566       # Check if we try to supply an empty value
6567       if test "x$CP" = x; then
6568         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6569 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6570         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6571 $as_echo_n "checking for CP... " >&6; }
6572         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6573 $as_echo "disabled" >&6; }
6574       else
6575         # Check if the provided tool contains a complete path.
6576         tool_specified="$CP"
6577         tool_basename="${tool_specified##*/}"
6578         if test "x$tool_basename" = "x$tool_specified"; then
6579           # A command without a complete path is provided, search $PATH.
6580           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6581 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6582           # Extract the first word of "$tool_basename", so it can be a program name with args.
6583 set dummy $tool_basename; ac_word=$2
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6585 $as_echo_n "checking for $ac_word... " >&6; }
6586 if ${ac_cv_path_CP+:} false; then :
6587   $as_echo_n "(cached) " >&6
6588 else
6589   case $CP in
6590   [\\/]* | ?:[\\/]*)
6591   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6592   ;;
6593   *)
6594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6595 for as_dir in $PATH
6596 do
6597   IFS=$as_save_IFS
6598   test -z "$as_dir" && as_dir=.
6599     for ac_exec_ext in '' $ac_executable_extensions; do
6600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6601     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6603     break 2
6604   fi
6605 done
6606   done
6607 IFS=$as_save_IFS
6608 
6609   ;;
6610 esac
6611 fi
6612 CP=$ac_cv_path_CP
6613 if test -n "$CP"; then
6614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6615 $as_echo "$CP" >&6; }
6616 else
6617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6618 $as_echo "no" >&6; }
6619 fi
6620 
6621 
6622           if test "x$CP" = x; then
6623             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6624           fi
6625         else
6626           # Otherwise we believe it is a complete path. Use it as it is.
6627           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6628 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6629           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6630 $as_echo_n "checking for CP... " >&6; }
6631           if test ! -x "$tool_specified"; then
6632             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6633 $as_echo "not found" >&6; }
6634             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6635           fi
6636           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6637 $as_echo "$tool_specified" >&6; }
6638         fi
6639       fi
6640     fi
6641 
6642   fi
6643 
6644 
6645 
6646   if test "x$CP" = x; then
6647     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6648   fi
6649 
6650 
6651 
6652 
6653 
6654   # Publish this variable in the help.
6655 
6656 
6657   if [ -z "${CUT+x}" ]; then
6658     # The variable is not set by user, try to locate tool using the code snippet
6659     for ac_prog in cut
6660 do
6661   # Extract the first word of "$ac_prog", so it can be a program name with args.
6662 set dummy $ac_prog; ac_word=$2
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664 $as_echo_n "checking for $ac_word... " >&6; }
6665 if ${ac_cv_path_CUT+:} false; then :
6666   $as_echo_n "(cached) " >&6
6667 else
6668   case $CUT in
6669   [\\/]* | ?:[\\/]*)
6670   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6671   ;;
6672   *)
6673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674 for as_dir in $PATH
6675 do
6676   IFS=$as_save_IFS
6677   test -z "$as_dir" && as_dir=.
6678     for ac_exec_ext in '' $ac_executable_extensions; do
6679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6680     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682     break 2
6683   fi
6684 done
6685   done
6686 IFS=$as_save_IFS
6687 
6688   ;;
6689 esac
6690 fi
6691 CUT=$ac_cv_path_CUT
6692 if test -n "$CUT"; then
6693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6694 $as_echo "$CUT" >&6; }
6695 else
6696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697 $as_echo "no" >&6; }
6698 fi
6699 
6700 
6701   test -n "$CUT" && break
6702 done
6703 
6704   else
6705     # The variable is set, but is it from the command line or the environment?
6706 
6707     # Try to remove the string !CUT! from our list.
6708     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6709     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6710       # If it failed, the variable was not from the command line. Ignore it,
6711       # but warn the user (except for BASH, which is always set by the calling BASH).
6712       if test "xCUT" != xBASH; then
6713         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6714 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6715       fi
6716       # Try to locate tool using the code snippet
6717       for ac_prog in cut
6718 do
6719   # Extract the first word of "$ac_prog", so it can be a program name with args.
6720 set dummy $ac_prog; ac_word=$2
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722 $as_echo_n "checking for $ac_word... " >&6; }
6723 if ${ac_cv_path_CUT+:} false; then :
6724   $as_echo_n "(cached) " >&6
6725 else
6726   case $CUT in
6727   [\\/]* | ?:[\\/]*)
6728   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6729   ;;
6730   *)
6731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6732 for as_dir in $PATH
6733 do
6734   IFS=$as_save_IFS
6735   test -z "$as_dir" && as_dir=.
6736     for ac_exec_ext in '' $ac_executable_extensions; do
6737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6738     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6740     break 2
6741   fi
6742 done
6743   done
6744 IFS=$as_save_IFS
6745 
6746   ;;
6747 esac
6748 fi
6749 CUT=$ac_cv_path_CUT
6750 if test -n "$CUT"; then
6751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6752 $as_echo "$CUT" >&6; }
6753 else
6754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6755 $as_echo "no" >&6; }
6756 fi
6757 
6758 
6759   test -n "$CUT" && break
6760 done
6761 
6762     else
6763       # If it succeeded, then it was overridden by the user. We will use it
6764       # for the tool.
6765 
6766       # First remove it from the list of overridden variables, so we can test
6767       # for unknown variables in the end.
6768       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6769 
6770       # Check if we try to supply an empty value
6771       if test "x$CUT" = x; then
6772         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6773 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6774         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6775 $as_echo_n "checking for CUT... " >&6; }
6776         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6777 $as_echo "disabled" >&6; }
6778       else
6779         # Check if the provided tool contains a complete path.
6780         tool_specified="$CUT"
6781         tool_basename="${tool_specified##*/}"
6782         if test "x$tool_basename" = "x$tool_specified"; then
6783           # A command without a complete path is provided, search $PATH.
6784           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6785 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6786           # Extract the first word of "$tool_basename", so it can be a program name with args.
6787 set dummy $tool_basename; ac_word=$2
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6789 $as_echo_n "checking for $ac_word... " >&6; }
6790 if ${ac_cv_path_CUT+:} false; then :
6791   $as_echo_n "(cached) " >&6
6792 else
6793   case $CUT in
6794   [\\/]* | ?:[\\/]*)
6795   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6796   ;;
6797   *)
6798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6799 for as_dir in $PATH
6800 do
6801   IFS=$as_save_IFS
6802   test -z "$as_dir" && as_dir=.
6803     for ac_exec_ext in '' $ac_executable_extensions; do
6804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6805     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6807     break 2
6808   fi
6809 done
6810   done
6811 IFS=$as_save_IFS
6812 
6813   ;;
6814 esac
6815 fi
6816 CUT=$ac_cv_path_CUT
6817 if test -n "$CUT"; then
6818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6819 $as_echo "$CUT" >&6; }
6820 else
6821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6822 $as_echo "no" >&6; }
6823 fi
6824 
6825 
6826           if test "x$CUT" = x; then
6827             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6828           fi
6829         else
6830           # Otherwise we believe it is a complete path. Use it as it is.
6831           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6832 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6833           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6834 $as_echo_n "checking for CUT... " >&6; }
6835           if test ! -x "$tool_specified"; then
6836             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6837 $as_echo "not found" >&6; }
6838             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6839           fi
6840           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6841 $as_echo "$tool_specified" >&6; }
6842         fi
6843       fi
6844     fi
6845 
6846   fi
6847 
6848 
6849 
6850   if test "x$CUT" = x; then
6851     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6852   fi
6853 
6854 
6855 
6856 
6857 
6858   # Publish this variable in the help.
6859 
6860 
6861   if [ -z "${DATE+x}" ]; then
6862     # The variable is not set by user, try to locate tool using the code snippet
6863     for ac_prog in date
6864 do
6865   # Extract the first word of "$ac_prog", so it can be a program name with args.
6866 set dummy $ac_prog; ac_word=$2
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6868 $as_echo_n "checking for $ac_word... " >&6; }
6869 if ${ac_cv_path_DATE+:} false; then :
6870   $as_echo_n "(cached) " >&6
6871 else
6872   case $DATE in
6873   [\\/]* | ?:[\\/]*)
6874   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6875   ;;
6876   *)
6877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6878 for as_dir in $PATH
6879 do
6880   IFS=$as_save_IFS
6881   test -z "$as_dir" && as_dir=.
6882     for ac_exec_ext in '' $ac_executable_extensions; do
6883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6884     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6886     break 2
6887   fi
6888 done
6889   done
6890 IFS=$as_save_IFS
6891 
6892   ;;
6893 esac
6894 fi
6895 DATE=$ac_cv_path_DATE
6896 if test -n "$DATE"; then
6897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6898 $as_echo "$DATE" >&6; }
6899 else
6900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6901 $as_echo "no" >&6; }
6902 fi
6903 
6904 
6905   test -n "$DATE" && break
6906 done
6907 
6908   else
6909     # The variable is set, but is it from the command line or the environment?
6910 
6911     # Try to remove the string !DATE! from our list.
6912     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6913     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6914       # If it failed, the variable was not from the command line. Ignore it,
6915       # but warn the user (except for BASH, which is always set by the calling BASH).
6916       if test "xDATE" != xBASH; then
6917         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6918 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6919       fi
6920       # Try to locate tool using the code snippet
6921       for ac_prog in date
6922 do
6923   # Extract the first word of "$ac_prog", so it can be a program name with args.
6924 set dummy $ac_prog; ac_word=$2
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6926 $as_echo_n "checking for $ac_word... " >&6; }
6927 if ${ac_cv_path_DATE+:} false; then :
6928   $as_echo_n "(cached) " >&6
6929 else
6930   case $DATE in
6931   [\\/]* | ?:[\\/]*)
6932   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6933   ;;
6934   *)
6935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6936 for as_dir in $PATH
6937 do
6938   IFS=$as_save_IFS
6939   test -z "$as_dir" && as_dir=.
6940     for ac_exec_ext in '' $ac_executable_extensions; do
6941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6942     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6944     break 2
6945   fi
6946 done
6947   done
6948 IFS=$as_save_IFS
6949 
6950   ;;
6951 esac
6952 fi
6953 DATE=$ac_cv_path_DATE
6954 if test -n "$DATE"; then
6955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6956 $as_echo "$DATE" >&6; }
6957 else
6958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6959 $as_echo "no" >&6; }
6960 fi
6961 
6962 
6963   test -n "$DATE" && break
6964 done
6965 
6966     else
6967       # If it succeeded, then it was overridden by the user. We will use it
6968       # for the tool.
6969 
6970       # First remove it from the list of overridden variables, so we can test
6971       # for unknown variables in the end.
6972       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6973 
6974       # Check if we try to supply an empty value
6975       if test "x$DATE" = x; then
6976         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6977 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6978         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6979 $as_echo_n "checking for DATE... " >&6; }
6980         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6981 $as_echo "disabled" >&6; }
6982       else
6983         # Check if the provided tool contains a complete path.
6984         tool_specified="$DATE"
6985         tool_basename="${tool_specified##*/}"
6986         if test "x$tool_basename" = "x$tool_specified"; then
6987           # A command without a complete path is provided, search $PATH.
6988           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6989 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6990           # Extract the first word of "$tool_basename", so it can be a program name with args.
6991 set dummy $tool_basename; ac_word=$2
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6993 $as_echo_n "checking for $ac_word... " >&6; }
6994 if ${ac_cv_path_DATE+:} false; then :
6995   $as_echo_n "(cached) " >&6
6996 else
6997   case $DATE in
6998   [\\/]* | ?:[\\/]*)
6999   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7000   ;;
7001   *)
7002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7003 for as_dir in $PATH
7004 do
7005   IFS=$as_save_IFS
7006   test -z "$as_dir" && as_dir=.
7007     for ac_exec_ext in '' $ac_executable_extensions; do
7008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7009     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7011     break 2
7012   fi
7013 done
7014   done
7015 IFS=$as_save_IFS
7016 
7017   ;;
7018 esac
7019 fi
7020 DATE=$ac_cv_path_DATE
7021 if test -n "$DATE"; then
7022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7023 $as_echo "$DATE" >&6; }
7024 else
7025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7026 $as_echo "no" >&6; }
7027 fi
7028 
7029 
7030           if test "x$DATE" = x; then
7031             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7032           fi
7033         else
7034           # Otherwise we believe it is a complete path. Use it as it is.
7035           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7036 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7037           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7038 $as_echo_n "checking for DATE... " >&6; }
7039           if test ! -x "$tool_specified"; then
7040             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7041 $as_echo "not found" >&6; }
7042             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7043           fi
7044           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7045 $as_echo "$tool_specified" >&6; }
7046         fi
7047       fi
7048     fi
7049 
7050   fi
7051 
7052 
7053 
7054   if test "x$DATE" = x; then
7055     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7056   fi
7057 
7058 
7059 
7060 
7061 
7062   # Publish this variable in the help.
7063 
7064 
7065   if [ -z "${DIFF+x}" ]; then
7066     # The variable is not set by user, try to locate tool using the code snippet
7067     for ac_prog in gdiff diff
7068 do
7069   # Extract the first word of "$ac_prog", so it can be a program name with args.
7070 set dummy $ac_prog; ac_word=$2
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7072 $as_echo_n "checking for $ac_word... " >&6; }
7073 if ${ac_cv_path_DIFF+:} false; then :
7074   $as_echo_n "(cached) " >&6
7075 else
7076   case $DIFF in
7077   [\\/]* | ?:[\\/]*)
7078   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7079   ;;
7080   *)
7081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7082 for as_dir in $PATH
7083 do
7084   IFS=$as_save_IFS
7085   test -z "$as_dir" && as_dir=.
7086     for ac_exec_ext in '' $ac_executable_extensions; do
7087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7088     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7090     break 2
7091   fi
7092 done
7093   done
7094 IFS=$as_save_IFS
7095 
7096   ;;
7097 esac
7098 fi
7099 DIFF=$ac_cv_path_DIFF
7100 if test -n "$DIFF"; then
7101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7102 $as_echo "$DIFF" >&6; }
7103 else
7104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7105 $as_echo "no" >&6; }
7106 fi
7107 
7108 
7109   test -n "$DIFF" && break
7110 done
7111 
7112   else
7113     # The variable is set, but is it from the command line or the environment?
7114 
7115     # Try to remove the string !DIFF! from our list.
7116     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7117     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7118       # If it failed, the variable was not from the command line. Ignore it,
7119       # but warn the user (except for BASH, which is always set by the calling BASH).
7120       if test "xDIFF" != xBASH; then
7121         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7122 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7123       fi
7124       # Try to locate tool using the code snippet
7125       for ac_prog in gdiff diff
7126 do
7127   # Extract the first word of "$ac_prog", so it can be a program name with args.
7128 set dummy $ac_prog; ac_word=$2
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130 $as_echo_n "checking for $ac_word... " >&6; }
7131 if ${ac_cv_path_DIFF+:} false; then :
7132   $as_echo_n "(cached) " >&6
7133 else
7134   case $DIFF in
7135   [\\/]* | ?:[\\/]*)
7136   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7137   ;;
7138   *)
7139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140 for as_dir in $PATH
7141 do
7142   IFS=$as_save_IFS
7143   test -z "$as_dir" && as_dir=.
7144     for ac_exec_ext in '' $ac_executable_extensions; do
7145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148     break 2
7149   fi
7150 done
7151   done
7152 IFS=$as_save_IFS
7153 
7154   ;;
7155 esac
7156 fi
7157 DIFF=$ac_cv_path_DIFF
7158 if test -n "$DIFF"; then
7159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7160 $as_echo "$DIFF" >&6; }
7161 else
7162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163 $as_echo "no" >&6; }
7164 fi
7165 
7166 
7167   test -n "$DIFF" && break
7168 done
7169 
7170     else
7171       # If it succeeded, then it was overridden by the user. We will use it
7172       # for the tool.
7173 
7174       # First remove it from the list of overridden variables, so we can test
7175       # for unknown variables in the end.
7176       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7177 
7178       # Check if we try to supply an empty value
7179       if test "x$DIFF" = x; then
7180         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7181 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7182         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7183 $as_echo_n "checking for DIFF... " >&6; }
7184         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7185 $as_echo "disabled" >&6; }
7186       else
7187         # Check if the provided tool contains a complete path.
7188         tool_specified="$DIFF"
7189         tool_basename="${tool_specified##*/}"
7190         if test "x$tool_basename" = "x$tool_specified"; then
7191           # A command without a complete path is provided, search $PATH.
7192           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7193 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7194           # Extract the first word of "$tool_basename", so it can be a program name with args.
7195 set dummy $tool_basename; ac_word=$2
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7197 $as_echo_n "checking for $ac_word... " >&6; }
7198 if ${ac_cv_path_DIFF+:} false; then :
7199   $as_echo_n "(cached) " >&6
7200 else
7201   case $DIFF in
7202   [\\/]* | ?:[\\/]*)
7203   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7204   ;;
7205   *)
7206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7207 for as_dir in $PATH
7208 do
7209   IFS=$as_save_IFS
7210   test -z "$as_dir" && as_dir=.
7211     for ac_exec_ext in '' $ac_executable_extensions; do
7212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7213     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7215     break 2
7216   fi
7217 done
7218   done
7219 IFS=$as_save_IFS
7220 
7221   ;;
7222 esac
7223 fi
7224 DIFF=$ac_cv_path_DIFF
7225 if test -n "$DIFF"; then
7226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7227 $as_echo "$DIFF" >&6; }
7228 else
7229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7230 $as_echo "no" >&6; }
7231 fi
7232 
7233 
7234           if test "x$DIFF" = x; then
7235             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7236           fi
7237         else
7238           # Otherwise we believe it is a complete path. Use it as it is.
7239           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7240 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7241           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7242 $as_echo_n "checking for DIFF... " >&6; }
7243           if test ! -x "$tool_specified"; then
7244             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7245 $as_echo "not found" >&6; }
7246             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7247           fi
7248           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7249 $as_echo "$tool_specified" >&6; }
7250         fi
7251       fi
7252     fi
7253 
7254   fi
7255 
7256 
7257 
7258   if test "x$DIFF" = x; then
7259     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7260   fi
7261 
7262 
7263 
7264 
7265 
7266   # Publish this variable in the help.
7267 
7268 
7269   if [ -z "${DIRNAME+x}" ]; then
7270     # The variable is not set by user, try to locate tool using the code snippet
7271     for ac_prog in dirname
7272 do
7273   # Extract the first word of "$ac_prog", so it can be a program name with args.
7274 set dummy $ac_prog; ac_word=$2
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7276 $as_echo_n "checking for $ac_word... " >&6; }
7277 if ${ac_cv_path_DIRNAME+:} false; then :
7278   $as_echo_n "(cached) " >&6
7279 else
7280   case $DIRNAME in
7281   [\\/]* | ?:[\\/]*)
7282   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7283   ;;
7284   *)
7285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7286 for as_dir in $PATH
7287 do
7288   IFS=$as_save_IFS
7289   test -z "$as_dir" && as_dir=.
7290     for ac_exec_ext in '' $ac_executable_extensions; do
7291   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7292     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7293     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7294     break 2
7295   fi
7296 done
7297   done
7298 IFS=$as_save_IFS
7299 
7300   ;;
7301 esac
7302 fi
7303 DIRNAME=$ac_cv_path_DIRNAME
7304 if test -n "$DIRNAME"; then
7305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7306 $as_echo "$DIRNAME" >&6; }
7307 else
7308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7309 $as_echo "no" >&6; }
7310 fi
7311 
7312 
7313   test -n "$DIRNAME" && break
7314 done
7315 
7316   else
7317     # The variable is set, but is it from the command line or the environment?
7318 
7319     # Try to remove the string !DIRNAME! from our list.
7320     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7321     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7322       # If it failed, the variable was not from the command line. Ignore it,
7323       # but warn the user (except for BASH, which is always set by the calling BASH).
7324       if test "xDIRNAME" != xBASH; then
7325         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7326 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7327       fi
7328       # Try to locate tool using the code snippet
7329       for ac_prog in dirname
7330 do
7331   # Extract the first word of "$ac_prog", so it can be a program name with args.
7332 set dummy $ac_prog; ac_word=$2
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334 $as_echo_n "checking for $ac_word... " >&6; }
7335 if ${ac_cv_path_DIRNAME+:} false; then :
7336   $as_echo_n "(cached) " >&6
7337 else
7338   case $DIRNAME in
7339   [\\/]* | ?:[\\/]*)
7340   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7341   ;;
7342   *)
7343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344 for as_dir in $PATH
7345 do
7346   IFS=$as_save_IFS
7347   test -z "$as_dir" && as_dir=.
7348     for ac_exec_ext in '' $ac_executable_extensions; do
7349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7350     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352     break 2
7353   fi
7354 done
7355   done
7356 IFS=$as_save_IFS
7357 
7358   ;;
7359 esac
7360 fi
7361 DIRNAME=$ac_cv_path_DIRNAME
7362 if test -n "$DIRNAME"; then
7363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7364 $as_echo "$DIRNAME" >&6; }
7365 else
7366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7367 $as_echo "no" >&6; }
7368 fi
7369 
7370 
7371   test -n "$DIRNAME" && break
7372 done
7373 
7374     else
7375       # If it succeeded, then it was overridden by the user. We will use it
7376       # for the tool.
7377 
7378       # First remove it from the list of overridden variables, so we can test
7379       # for unknown variables in the end.
7380       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7381 
7382       # Check if we try to supply an empty value
7383       if test "x$DIRNAME" = x; then
7384         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7385 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7386         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7387 $as_echo_n "checking for DIRNAME... " >&6; }
7388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7389 $as_echo "disabled" >&6; }
7390       else
7391         # Check if the provided tool contains a complete path.
7392         tool_specified="$DIRNAME"
7393         tool_basename="${tool_specified##*/}"
7394         if test "x$tool_basename" = "x$tool_specified"; then
7395           # A command without a complete path is provided, search $PATH.
7396           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7397 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7398           # Extract the first word of "$tool_basename", so it can be a program name with args.
7399 set dummy $tool_basename; ac_word=$2
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7401 $as_echo_n "checking for $ac_word... " >&6; }
7402 if ${ac_cv_path_DIRNAME+:} false; then :
7403   $as_echo_n "(cached) " >&6
7404 else
7405   case $DIRNAME in
7406   [\\/]* | ?:[\\/]*)
7407   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7408   ;;
7409   *)
7410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7411 for as_dir in $PATH
7412 do
7413   IFS=$as_save_IFS
7414   test -z "$as_dir" && as_dir=.
7415     for ac_exec_ext in '' $ac_executable_extensions; do
7416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7417     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7419     break 2
7420   fi
7421 done
7422   done
7423 IFS=$as_save_IFS
7424 
7425   ;;
7426 esac
7427 fi
7428 DIRNAME=$ac_cv_path_DIRNAME
7429 if test -n "$DIRNAME"; then
7430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7431 $as_echo "$DIRNAME" >&6; }
7432 else
7433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7434 $as_echo "no" >&6; }
7435 fi
7436 
7437 
7438           if test "x$DIRNAME" = x; then
7439             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7440           fi
7441         else
7442           # Otherwise we believe it is a complete path. Use it as it is.
7443           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7444 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7445           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7446 $as_echo_n "checking for DIRNAME... " >&6; }
7447           if test ! -x "$tool_specified"; then
7448             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7449 $as_echo "not found" >&6; }
7450             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7451           fi
7452           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7453 $as_echo "$tool_specified" >&6; }
7454         fi
7455       fi
7456     fi
7457 
7458   fi
7459 
7460 
7461 
7462   if test "x$DIRNAME" = x; then
7463     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7464   fi
7465 
7466 
7467 
7468 
7469 
7470   # Publish this variable in the help.
7471 
7472 
7473   if [ -z "${ECHO+x}" ]; then
7474     # The variable is not set by user, try to locate tool using the code snippet
7475     for ac_prog in echo
7476 do
7477   # Extract the first word of "$ac_prog", so it can be a program name with args.
7478 set dummy $ac_prog; ac_word=$2
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7480 $as_echo_n "checking for $ac_word... " >&6; }
7481 if ${ac_cv_path_ECHO+:} false; then :
7482   $as_echo_n "(cached) " >&6
7483 else
7484   case $ECHO in
7485   [\\/]* | ?:[\\/]*)
7486   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7487   ;;
7488   *)
7489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7490 for as_dir in $PATH
7491 do
7492   IFS=$as_save_IFS
7493   test -z "$as_dir" && as_dir=.
7494     for ac_exec_ext in '' $ac_executable_extensions; do
7495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7496     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7498     break 2
7499   fi
7500 done
7501   done
7502 IFS=$as_save_IFS
7503 
7504   ;;
7505 esac
7506 fi
7507 ECHO=$ac_cv_path_ECHO
7508 if test -n "$ECHO"; then
7509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7510 $as_echo "$ECHO" >&6; }
7511 else
7512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7513 $as_echo "no" >&6; }
7514 fi
7515 
7516 
7517   test -n "$ECHO" && break
7518 done
7519 
7520   else
7521     # The variable is set, but is it from the command line or the environment?
7522 
7523     # Try to remove the string !ECHO! from our list.
7524     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7525     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7526       # If it failed, the variable was not from the command line. Ignore it,
7527       # but warn the user (except for BASH, which is always set by the calling BASH).
7528       if test "xECHO" != xBASH; then
7529         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7530 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7531       fi
7532       # Try to locate tool using the code snippet
7533       for ac_prog in echo
7534 do
7535   # Extract the first word of "$ac_prog", so it can be a program name with args.
7536 set dummy $ac_prog; ac_word=$2
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538 $as_echo_n "checking for $ac_word... " >&6; }
7539 if ${ac_cv_path_ECHO+:} false; then :
7540   $as_echo_n "(cached) " >&6
7541 else
7542   case $ECHO in
7543   [\\/]* | ?:[\\/]*)
7544   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7545   ;;
7546   *)
7547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7548 for as_dir in $PATH
7549 do
7550   IFS=$as_save_IFS
7551   test -z "$as_dir" && as_dir=.
7552     for ac_exec_ext in '' $ac_executable_extensions; do
7553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7554     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7556     break 2
7557   fi
7558 done
7559   done
7560 IFS=$as_save_IFS
7561 
7562   ;;
7563 esac
7564 fi
7565 ECHO=$ac_cv_path_ECHO
7566 if test -n "$ECHO"; then
7567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7568 $as_echo "$ECHO" >&6; }
7569 else
7570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571 $as_echo "no" >&6; }
7572 fi
7573 
7574 
7575   test -n "$ECHO" && break
7576 done
7577 
7578     else
7579       # If it succeeded, then it was overridden by the user. We will use it
7580       # for the tool.
7581 
7582       # First remove it from the list of overridden variables, so we can test
7583       # for unknown variables in the end.
7584       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7585 
7586       # Check if we try to supply an empty value
7587       if test "x$ECHO" = x; then
7588         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7589 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7590         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7591 $as_echo_n "checking for ECHO... " >&6; }
7592         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7593 $as_echo "disabled" >&6; }
7594       else
7595         # Check if the provided tool contains a complete path.
7596         tool_specified="$ECHO"
7597         tool_basename="${tool_specified##*/}"
7598         if test "x$tool_basename" = "x$tool_specified"; then
7599           # A command without a complete path is provided, search $PATH.
7600           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7601 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7602           # Extract the first word of "$tool_basename", so it can be a program name with args.
7603 set dummy $tool_basename; ac_word=$2
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7605 $as_echo_n "checking for $ac_word... " >&6; }
7606 if ${ac_cv_path_ECHO+:} false; then :
7607   $as_echo_n "(cached) " >&6
7608 else
7609   case $ECHO in
7610   [\\/]* | ?:[\\/]*)
7611   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7612   ;;
7613   *)
7614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7615 for as_dir in $PATH
7616 do
7617   IFS=$as_save_IFS
7618   test -z "$as_dir" && as_dir=.
7619     for ac_exec_ext in '' $ac_executable_extensions; do
7620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7621     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7623     break 2
7624   fi
7625 done
7626   done
7627 IFS=$as_save_IFS
7628 
7629   ;;
7630 esac
7631 fi
7632 ECHO=$ac_cv_path_ECHO
7633 if test -n "$ECHO"; then
7634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7635 $as_echo "$ECHO" >&6; }
7636 else
7637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7638 $as_echo "no" >&6; }
7639 fi
7640 
7641 
7642           if test "x$ECHO" = x; then
7643             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7644           fi
7645         else
7646           # Otherwise we believe it is a complete path. Use it as it is.
7647           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7648 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7649           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7650 $as_echo_n "checking for ECHO... " >&6; }
7651           if test ! -x "$tool_specified"; then
7652             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7653 $as_echo "not found" >&6; }
7654             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7655           fi
7656           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7657 $as_echo "$tool_specified" >&6; }
7658         fi
7659       fi
7660     fi
7661 
7662   fi
7663 
7664 
7665 
7666   if test "x$ECHO" = x; then
7667     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7668   fi
7669 
7670 
7671 
7672 
7673 
7674   # Publish this variable in the help.
7675 
7676 
7677   if [ -z "${EXPR+x}" ]; then
7678     # The variable is not set by user, try to locate tool using the code snippet
7679     for ac_prog in expr
7680 do
7681   # Extract the first word of "$ac_prog", so it can be a program name with args.
7682 set dummy $ac_prog; ac_word=$2
7683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7684 $as_echo_n "checking for $ac_word... " >&6; }
7685 if ${ac_cv_path_EXPR+:} false; then :
7686   $as_echo_n "(cached) " >&6
7687 else
7688   case $EXPR in
7689   [\\/]* | ?:[\\/]*)
7690   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7691   ;;
7692   *)
7693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7694 for as_dir in $PATH
7695 do
7696   IFS=$as_save_IFS
7697   test -z "$as_dir" && as_dir=.
7698     for ac_exec_ext in '' $ac_executable_extensions; do
7699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7700     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7702     break 2
7703   fi
7704 done
7705   done
7706 IFS=$as_save_IFS
7707 
7708   ;;
7709 esac
7710 fi
7711 EXPR=$ac_cv_path_EXPR
7712 if test -n "$EXPR"; then
7713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7714 $as_echo "$EXPR" >&6; }
7715 else
7716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7717 $as_echo "no" >&6; }
7718 fi
7719 
7720 
7721   test -n "$EXPR" && break
7722 done
7723 
7724   else
7725     # The variable is set, but is it from the command line or the environment?
7726 
7727     # Try to remove the string !EXPR! from our list.
7728     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7729     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7730       # If it failed, the variable was not from the command line. Ignore it,
7731       # but warn the user (except for BASH, which is always set by the calling BASH).
7732       if test "xEXPR" != xBASH; then
7733         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7734 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7735       fi
7736       # Try to locate tool using the code snippet
7737       for ac_prog in expr
7738 do
7739   # Extract the first word of "$ac_prog", so it can be a program name with args.
7740 set dummy $ac_prog; ac_word=$2
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7742 $as_echo_n "checking for $ac_word... " >&6; }
7743 if ${ac_cv_path_EXPR+:} false; then :
7744   $as_echo_n "(cached) " >&6
7745 else
7746   case $EXPR in
7747   [\\/]* | ?:[\\/]*)
7748   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7749   ;;
7750   *)
7751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7752 for as_dir in $PATH
7753 do
7754   IFS=$as_save_IFS
7755   test -z "$as_dir" && as_dir=.
7756     for ac_exec_ext in '' $ac_executable_extensions; do
7757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7758     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7760     break 2
7761   fi
7762 done
7763   done
7764 IFS=$as_save_IFS
7765 
7766   ;;
7767 esac
7768 fi
7769 EXPR=$ac_cv_path_EXPR
7770 if test -n "$EXPR"; then
7771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7772 $as_echo "$EXPR" >&6; }
7773 else
7774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775 $as_echo "no" >&6; }
7776 fi
7777 
7778 
7779   test -n "$EXPR" && break
7780 done
7781 
7782     else
7783       # If it succeeded, then it was overridden by the user. We will use it
7784       # for the tool.
7785 
7786       # First remove it from the list of overridden variables, so we can test
7787       # for unknown variables in the end.
7788       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7789 
7790       # Check if we try to supply an empty value
7791       if test "x$EXPR" = x; then
7792         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7793 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7794         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7795 $as_echo_n "checking for EXPR... " >&6; }
7796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7797 $as_echo "disabled" >&6; }
7798       else
7799         # Check if the provided tool contains a complete path.
7800         tool_specified="$EXPR"
7801         tool_basename="${tool_specified##*/}"
7802         if test "x$tool_basename" = "x$tool_specified"; then
7803           # A command without a complete path is provided, search $PATH.
7804           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7805 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7806           # Extract the first word of "$tool_basename", so it can be a program name with args.
7807 set dummy $tool_basename; ac_word=$2
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7809 $as_echo_n "checking for $ac_word... " >&6; }
7810 if ${ac_cv_path_EXPR+:} false; then :
7811   $as_echo_n "(cached) " >&6
7812 else
7813   case $EXPR in
7814   [\\/]* | ?:[\\/]*)
7815   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7816   ;;
7817   *)
7818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7819 for as_dir in $PATH
7820 do
7821   IFS=$as_save_IFS
7822   test -z "$as_dir" && as_dir=.
7823     for ac_exec_ext in '' $ac_executable_extensions; do
7824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7825     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7827     break 2
7828   fi
7829 done
7830   done
7831 IFS=$as_save_IFS
7832 
7833   ;;
7834 esac
7835 fi
7836 EXPR=$ac_cv_path_EXPR
7837 if test -n "$EXPR"; then
7838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7839 $as_echo "$EXPR" >&6; }
7840 else
7841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7842 $as_echo "no" >&6; }
7843 fi
7844 
7845 
7846           if test "x$EXPR" = x; then
7847             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7848           fi
7849         else
7850           # Otherwise we believe it is a complete path. Use it as it is.
7851           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7852 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7853           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7854 $as_echo_n "checking for EXPR... " >&6; }
7855           if test ! -x "$tool_specified"; then
7856             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7857 $as_echo "not found" >&6; }
7858             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7859           fi
7860           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7861 $as_echo "$tool_specified" >&6; }
7862         fi
7863       fi
7864     fi
7865 
7866   fi
7867 
7868 
7869 
7870   if test "x$EXPR" = x; then
7871     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7872   fi
7873 
7874 
7875 
7876 
7877 
7878   # Publish this variable in the help.
7879 
7880 
7881   if [ -z "${FILE+x}" ]; then
7882     # The variable is not set by user, try to locate tool using the code snippet
7883     for ac_prog in file
7884 do
7885   # Extract the first word of "$ac_prog", so it can be a program name with args.
7886 set dummy $ac_prog; ac_word=$2
7887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7888 $as_echo_n "checking for $ac_word... " >&6; }
7889 if ${ac_cv_path_FILE+:} false; then :
7890   $as_echo_n "(cached) " >&6
7891 else
7892   case $FILE in
7893   [\\/]* | ?:[\\/]*)
7894   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7895   ;;
7896   *)
7897   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7898 for as_dir in $PATH
7899 do
7900   IFS=$as_save_IFS
7901   test -z "$as_dir" && as_dir=.
7902     for ac_exec_ext in '' $ac_executable_extensions; do
7903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7904     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7906     break 2
7907   fi
7908 done
7909   done
7910 IFS=$as_save_IFS
7911 
7912   ;;
7913 esac
7914 fi
7915 FILE=$ac_cv_path_FILE
7916 if test -n "$FILE"; then
7917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7918 $as_echo "$FILE" >&6; }
7919 else
7920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7921 $as_echo "no" >&6; }
7922 fi
7923 
7924 
7925   test -n "$FILE" && break
7926 done
7927 
7928   else
7929     # The variable is set, but is it from the command line or the environment?
7930 
7931     # Try to remove the string !FILE! from our list.
7932     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7933     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7934       # If it failed, the variable was not from the command line. Ignore it,
7935       # but warn the user (except for BASH, which is always set by the calling BASH).
7936       if test "xFILE" != xBASH; then
7937         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7938 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7939       fi
7940       # Try to locate tool using the code snippet
7941       for ac_prog in file
7942 do
7943   # Extract the first word of "$ac_prog", so it can be a program name with args.
7944 set dummy $ac_prog; ac_word=$2
7945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7946 $as_echo_n "checking for $ac_word... " >&6; }
7947 if ${ac_cv_path_FILE+:} false; then :
7948   $as_echo_n "(cached) " >&6
7949 else
7950   case $FILE in
7951   [\\/]* | ?:[\\/]*)
7952   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7953   ;;
7954   *)
7955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7956 for as_dir in $PATH
7957 do
7958   IFS=$as_save_IFS
7959   test -z "$as_dir" && as_dir=.
7960     for ac_exec_ext in '' $ac_executable_extensions; do
7961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7962     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7964     break 2
7965   fi
7966 done
7967   done
7968 IFS=$as_save_IFS
7969 
7970   ;;
7971 esac
7972 fi
7973 FILE=$ac_cv_path_FILE
7974 if test -n "$FILE"; then
7975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7976 $as_echo "$FILE" >&6; }
7977 else
7978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7979 $as_echo "no" >&6; }
7980 fi
7981 
7982 
7983   test -n "$FILE" && break
7984 done
7985 
7986     else
7987       # If it succeeded, then it was overridden by the user. We will use it
7988       # for the tool.
7989 
7990       # First remove it from the list of overridden variables, so we can test
7991       # for unknown variables in the end.
7992       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7993 
7994       # Check if we try to supply an empty value
7995       if test "x$FILE" = x; then
7996         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7997 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7999 $as_echo_n "checking for FILE... " >&6; }
8000         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8001 $as_echo "disabled" >&6; }
8002       else
8003         # Check if the provided tool contains a complete path.
8004         tool_specified="$FILE"
8005         tool_basename="${tool_specified##*/}"
8006         if test "x$tool_basename" = "x$tool_specified"; then
8007           # A command without a complete path is provided, search $PATH.
8008           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8009 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8010           # Extract the first word of "$tool_basename", so it can be a program name with args.
8011 set dummy $tool_basename; ac_word=$2
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8013 $as_echo_n "checking for $ac_word... " >&6; }
8014 if ${ac_cv_path_FILE+:} false; then :
8015   $as_echo_n "(cached) " >&6
8016 else
8017   case $FILE in
8018   [\\/]* | ?:[\\/]*)
8019   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8020   ;;
8021   *)
8022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8023 for as_dir in $PATH
8024 do
8025   IFS=$as_save_IFS
8026   test -z "$as_dir" && as_dir=.
8027     for ac_exec_ext in '' $ac_executable_extensions; do
8028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8029     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8031     break 2
8032   fi
8033 done
8034   done
8035 IFS=$as_save_IFS
8036 
8037   ;;
8038 esac
8039 fi
8040 FILE=$ac_cv_path_FILE
8041 if test -n "$FILE"; then
8042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8043 $as_echo "$FILE" >&6; }
8044 else
8045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8046 $as_echo "no" >&6; }
8047 fi
8048 
8049 
8050           if test "x$FILE" = x; then
8051             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8052           fi
8053         else
8054           # Otherwise we believe it is a complete path. Use it as it is.
8055           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8056 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8057           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8058 $as_echo_n "checking for FILE... " >&6; }
8059           if test ! -x "$tool_specified"; then
8060             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8061 $as_echo "not found" >&6; }
8062             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8063           fi
8064           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8065 $as_echo "$tool_specified" >&6; }
8066         fi
8067       fi
8068     fi
8069 
8070   fi
8071 
8072 
8073 
8074   if test "x$FILE" = x; then
8075     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8076   fi
8077 
8078 
8079 
8080 
8081 
8082   # Publish this variable in the help.
8083 
8084 
8085   if [ -z "${FIND+x}" ]; then
8086     # The variable is not set by user, try to locate tool using the code snippet
8087     for ac_prog in find
8088 do
8089   # Extract the first word of "$ac_prog", so it can be a program name with args.
8090 set dummy $ac_prog; ac_word=$2
8091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8092 $as_echo_n "checking for $ac_word... " >&6; }
8093 if ${ac_cv_path_FIND+:} false; then :
8094   $as_echo_n "(cached) " >&6
8095 else
8096   case $FIND in
8097   [\\/]* | ?:[\\/]*)
8098   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8099   ;;
8100   *)
8101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8102 for as_dir in $PATH
8103 do
8104   IFS=$as_save_IFS
8105   test -z "$as_dir" && as_dir=.
8106     for ac_exec_ext in '' $ac_executable_extensions; do
8107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8108     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8110     break 2
8111   fi
8112 done
8113   done
8114 IFS=$as_save_IFS
8115 
8116   ;;
8117 esac
8118 fi
8119 FIND=$ac_cv_path_FIND
8120 if test -n "$FIND"; then
8121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8122 $as_echo "$FIND" >&6; }
8123 else
8124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8125 $as_echo "no" >&6; }
8126 fi
8127 
8128 
8129   test -n "$FIND" && break
8130 done
8131 
8132   else
8133     # The variable is set, but is it from the command line or the environment?
8134 
8135     # Try to remove the string !FIND! from our list.
8136     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8137     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8138       # If it failed, the variable was not from the command line. Ignore it,
8139       # but warn the user (except for BASH, which is always set by the calling BASH).
8140       if test "xFIND" != xBASH; then
8141         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8142 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8143       fi
8144       # Try to locate tool using the code snippet
8145       for ac_prog in find
8146 do
8147   # Extract the first word of "$ac_prog", so it can be a program name with args.
8148 set dummy $ac_prog; ac_word=$2
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150 $as_echo_n "checking for $ac_word... " >&6; }
8151 if ${ac_cv_path_FIND+:} false; then :
8152   $as_echo_n "(cached) " >&6
8153 else
8154   case $FIND in
8155   [\\/]* | ?:[\\/]*)
8156   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8157   ;;
8158   *)
8159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8160 for as_dir in $PATH
8161 do
8162   IFS=$as_save_IFS
8163   test -z "$as_dir" && as_dir=.
8164     for ac_exec_ext in '' $ac_executable_extensions; do
8165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8166     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8168     break 2
8169   fi
8170 done
8171   done
8172 IFS=$as_save_IFS
8173 
8174   ;;
8175 esac
8176 fi
8177 FIND=$ac_cv_path_FIND
8178 if test -n "$FIND"; then
8179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8180 $as_echo "$FIND" >&6; }
8181 else
8182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183 $as_echo "no" >&6; }
8184 fi
8185 
8186 
8187   test -n "$FIND" && break
8188 done
8189 
8190     else
8191       # If it succeeded, then it was overridden by the user. We will use it
8192       # for the tool.
8193 
8194       # First remove it from the list of overridden variables, so we can test
8195       # for unknown variables in the end.
8196       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8197 
8198       # Check if we try to supply an empty value
8199       if test "x$FIND" = x; then
8200         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8201 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8202         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8203 $as_echo_n "checking for FIND... " >&6; }
8204         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8205 $as_echo "disabled" >&6; }
8206       else
8207         # Check if the provided tool contains a complete path.
8208         tool_specified="$FIND"
8209         tool_basename="${tool_specified##*/}"
8210         if test "x$tool_basename" = "x$tool_specified"; then
8211           # A command without a complete path is provided, search $PATH.
8212           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8213 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8214           # Extract the first word of "$tool_basename", so it can be a program name with args.
8215 set dummy $tool_basename; ac_word=$2
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8217 $as_echo_n "checking for $ac_word... " >&6; }
8218 if ${ac_cv_path_FIND+:} false; then :
8219   $as_echo_n "(cached) " >&6
8220 else
8221   case $FIND in
8222   [\\/]* | ?:[\\/]*)
8223   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8224   ;;
8225   *)
8226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8227 for as_dir in $PATH
8228 do
8229   IFS=$as_save_IFS
8230   test -z "$as_dir" && as_dir=.
8231     for ac_exec_ext in '' $ac_executable_extensions; do
8232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8233     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8235     break 2
8236   fi
8237 done
8238   done
8239 IFS=$as_save_IFS
8240 
8241   ;;
8242 esac
8243 fi
8244 FIND=$ac_cv_path_FIND
8245 if test -n "$FIND"; then
8246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8247 $as_echo "$FIND" >&6; }
8248 else
8249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8250 $as_echo "no" >&6; }
8251 fi
8252 
8253 
8254           if test "x$FIND" = x; then
8255             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8256           fi
8257         else
8258           # Otherwise we believe it is a complete path. Use it as it is.
8259           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8260 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8261           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8262 $as_echo_n "checking for FIND... " >&6; }
8263           if test ! -x "$tool_specified"; then
8264             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8265 $as_echo "not found" >&6; }
8266             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8267           fi
8268           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8269 $as_echo "$tool_specified" >&6; }
8270         fi
8271       fi
8272     fi
8273 
8274   fi
8275 
8276 
8277 
8278   if test "x$FIND" = x; then
8279     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8280   fi
8281 
8282 
8283 
8284 
8285 
8286   # Publish this variable in the help.
8287 
8288 
8289   if [ -z "${HEAD+x}" ]; then
8290     # The variable is not set by user, try to locate tool using the code snippet
8291     for ac_prog in head
8292 do
8293   # Extract the first word of "$ac_prog", so it can be a program name with args.
8294 set dummy $ac_prog; ac_word=$2
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296 $as_echo_n "checking for $ac_word... " >&6; }
8297 if ${ac_cv_path_HEAD+:} false; then :
8298   $as_echo_n "(cached) " >&6
8299 else
8300   case $HEAD in
8301   [\\/]* | ?:[\\/]*)
8302   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8303   ;;
8304   *)
8305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8306 for as_dir in $PATH
8307 do
8308   IFS=$as_save_IFS
8309   test -z "$as_dir" && as_dir=.
8310     for ac_exec_ext in '' $ac_executable_extensions; do
8311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8312     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8314     break 2
8315   fi
8316 done
8317   done
8318 IFS=$as_save_IFS
8319 
8320   ;;
8321 esac
8322 fi
8323 HEAD=$ac_cv_path_HEAD
8324 if test -n "$HEAD"; then
8325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8326 $as_echo "$HEAD" >&6; }
8327 else
8328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8329 $as_echo "no" >&6; }
8330 fi
8331 
8332 
8333   test -n "$HEAD" && break
8334 done
8335 
8336   else
8337     # The variable is set, but is it from the command line or the environment?
8338 
8339     # Try to remove the string !HEAD! from our list.
8340     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8341     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8342       # If it failed, the variable was not from the command line. Ignore it,
8343       # but warn the user (except for BASH, which is always set by the calling BASH).
8344       if test "xHEAD" != xBASH; then
8345         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8346 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8347       fi
8348       # Try to locate tool using the code snippet
8349       for ac_prog in head
8350 do
8351   # Extract the first word of "$ac_prog", so it can be a program name with args.
8352 set dummy $ac_prog; ac_word=$2
8353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8354 $as_echo_n "checking for $ac_word... " >&6; }
8355 if ${ac_cv_path_HEAD+:} false; then :
8356   $as_echo_n "(cached) " >&6
8357 else
8358   case $HEAD in
8359   [\\/]* | ?:[\\/]*)
8360   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8361   ;;
8362   *)
8363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8364 for as_dir in $PATH
8365 do
8366   IFS=$as_save_IFS
8367   test -z "$as_dir" && as_dir=.
8368     for ac_exec_ext in '' $ac_executable_extensions; do
8369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8370     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8372     break 2
8373   fi
8374 done
8375   done
8376 IFS=$as_save_IFS
8377 
8378   ;;
8379 esac
8380 fi
8381 HEAD=$ac_cv_path_HEAD
8382 if test -n "$HEAD"; then
8383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8384 $as_echo "$HEAD" >&6; }
8385 else
8386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387 $as_echo "no" >&6; }
8388 fi
8389 
8390 
8391   test -n "$HEAD" && break
8392 done
8393 
8394     else
8395       # If it succeeded, then it was overridden by the user. We will use it
8396       # for the tool.
8397 
8398       # First remove it from the list of overridden variables, so we can test
8399       # for unknown variables in the end.
8400       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8401 
8402       # Check if we try to supply an empty value
8403       if test "x$HEAD" = x; then
8404         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8405 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8406         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8407 $as_echo_n "checking for HEAD... " >&6; }
8408         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8409 $as_echo "disabled" >&6; }
8410       else
8411         # Check if the provided tool contains a complete path.
8412         tool_specified="$HEAD"
8413         tool_basename="${tool_specified##*/}"
8414         if test "x$tool_basename" = "x$tool_specified"; then
8415           # A command without a complete path is provided, search $PATH.
8416           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8417 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8418           # Extract the first word of "$tool_basename", so it can be a program name with args.
8419 set dummy $tool_basename; ac_word=$2
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8421 $as_echo_n "checking for $ac_word... " >&6; }
8422 if ${ac_cv_path_HEAD+:} false; then :
8423   $as_echo_n "(cached) " >&6
8424 else
8425   case $HEAD in
8426   [\\/]* | ?:[\\/]*)
8427   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8428   ;;
8429   *)
8430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8431 for as_dir in $PATH
8432 do
8433   IFS=$as_save_IFS
8434   test -z "$as_dir" && as_dir=.
8435     for ac_exec_ext in '' $ac_executable_extensions; do
8436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8437     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8439     break 2
8440   fi
8441 done
8442   done
8443 IFS=$as_save_IFS
8444 
8445   ;;
8446 esac
8447 fi
8448 HEAD=$ac_cv_path_HEAD
8449 if test -n "$HEAD"; then
8450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8451 $as_echo "$HEAD" >&6; }
8452 else
8453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8454 $as_echo "no" >&6; }
8455 fi
8456 
8457 
8458           if test "x$HEAD" = x; then
8459             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8460           fi
8461         else
8462           # Otherwise we believe it is a complete path. Use it as it is.
8463           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8464 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8465           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8466 $as_echo_n "checking for HEAD... " >&6; }
8467           if test ! -x "$tool_specified"; then
8468             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8469 $as_echo "not found" >&6; }
8470             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8471           fi
8472           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8473 $as_echo "$tool_specified" >&6; }
8474         fi
8475       fi
8476     fi
8477 
8478   fi
8479 
8480 
8481 
8482   if test "x$HEAD" = x; then
8483     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8484   fi
8485 
8486 
8487 
8488 
8489 
8490   # Publish this variable in the help.
8491 
8492 
8493   if [ -z "${GUNZIP+x}" ]; then
8494     # The variable is not set by user, try to locate tool using the code snippet
8495     for ac_prog in gunzip
8496 do
8497   # Extract the first word of "$ac_prog", so it can be a program name with args.
8498 set dummy $ac_prog; ac_word=$2
8499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8500 $as_echo_n "checking for $ac_word... " >&6; }
8501 if ${ac_cv_path_GUNZIP+:} false; then :
8502   $as_echo_n "(cached) " >&6
8503 else
8504   case $GUNZIP in
8505   [\\/]* | ?:[\\/]*)
8506   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8507   ;;
8508   *)
8509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8510 for as_dir in $PATH
8511 do
8512   IFS=$as_save_IFS
8513   test -z "$as_dir" && as_dir=.
8514     for ac_exec_ext in '' $ac_executable_extensions; do
8515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8516     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8518     break 2
8519   fi
8520 done
8521   done
8522 IFS=$as_save_IFS
8523 
8524   ;;
8525 esac
8526 fi
8527 GUNZIP=$ac_cv_path_GUNZIP
8528 if test -n "$GUNZIP"; then
8529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8530 $as_echo "$GUNZIP" >&6; }
8531 else
8532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8533 $as_echo "no" >&6; }
8534 fi
8535 
8536 
8537   test -n "$GUNZIP" && break
8538 done
8539 
8540   else
8541     # The variable is set, but is it from the command line or the environment?
8542 
8543     # Try to remove the string !GUNZIP! from our list.
8544     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8545     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8546       # If it failed, the variable was not from the command line. Ignore it,
8547       # but warn the user (except for BASH, which is always set by the calling BASH).
8548       if test "xGUNZIP" != xBASH; then
8549         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8550 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8551       fi
8552       # Try to locate tool using the code snippet
8553       for ac_prog in gunzip
8554 do
8555   # Extract the first word of "$ac_prog", so it can be a program name with args.
8556 set dummy $ac_prog; ac_word=$2
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558 $as_echo_n "checking for $ac_word... " >&6; }
8559 if ${ac_cv_path_GUNZIP+:} false; then :
8560   $as_echo_n "(cached) " >&6
8561 else
8562   case $GUNZIP in
8563   [\\/]* | ?:[\\/]*)
8564   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8565   ;;
8566   *)
8567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568 for as_dir in $PATH
8569 do
8570   IFS=$as_save_IFS
8571   test -z "$as_dir" && as_dir=.
8572     for ac_exec_ext in '' $ac_executable_extensions; do
8573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576     break 2
8577   fi
8578 done
8579   done
8580 IFS=$as_save_IFS
8581 
8582   ;;
8583 esac
8584 fi
8585 GUNZIP=$ac_cv_path_GUNZIP
8586 if test -n "$GUNZIP"; then
8587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8588 $as_echo "$GUNZIP" >&6; }
8589 else
8590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591 $as_echo "no" >&6; }
8592 fi
8593 
8594 
8595   test -n "$GUNZIP" && break
8596 done
8597 
8598     else
8599       # If it succeeded, then it was overridden by the user. We will use it
8600       # for the tool.
8601 
8602       # First remove it from the list of overridden variables, so we can test
8603       # for unknown variables in the end.
8604       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8605 
8606       # Check if we try to supply an empty value
8607       if test "x$GUNZIP" = x; then
8608         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8609 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8610         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8611 $as_echo_n "checking for GUNZIP... " >&6; }
8612         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8613 $as_echo "disabled" >&6; }
8614       else
8615         # Check if the provided tool contains a complete path.
8616         tool_specified="$GUNZIP"
8617         tool_basename="${tool_specified##*/}"
8618         if test "x$tool_basename" = "x$tool_specified"; then
8619           # A command without a complete path is provided, search $PATH.
8620           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8621 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8622           # Extract the first word of "$tool_basename", so it can be a program name with args.
8623 set dummy $tool_basename; ac_word=$2
8624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8625 $as_echo_n "checking for $ac_word... " >&6; }
8626 if ${ac_cv_path_GUNZIP+:} false; then :
8627   $as_echo_n "(cached) " >&6
8628 else
8629   case $GUNZIP in
8630   [\\/]* | ?:[\\/]*)
8631   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8632   ;;
8633   *)
8634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8635 for as_dir in $PATH
8636 do
8637   IFS=$as_save_IFS
8638   test -z "$as_dir" && as_dir=.
8639     for ac_exec_ext in '' $ac_executable_extensions; do
8640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8641     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8643     break 2
8644   fi
8645 done
8646   done
8647 IFS=$as_save_IFS
8648 
8649   ;;
8650 esac
8651 fi
8652 GUNZIP=$ac_cv_path_GUNZIP
8653 if test -n "$GUNZIP"; then
8654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8655 $as_echo "$GUNZIP" >&6; }
8656 else
8657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8658 $as_echo "no" >&6; }
8659 fi
8660 
8661 
8662           if test "x$GUNZIP" = x; then
8663             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8664           fi
8665         else
8666           # Otherwise we believe it is a complete path. Use it as it is.
8667           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8668 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8669           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8670 $as_echo_n "checking for GUNZIP... " >&6; }
8671           if test ! -x "$tool_specified"; then
8672             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8673 $as_echo "not found" >&6; }
8674             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8675           fi
8676           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8677 $as_echo "$tool_specified" >&6; }
8678         fi
8679       fi
8680     fi
8681 
8682   fi
8683 
8684 
8685 
8686   if test "x$GUNZIP" = x; then
8687     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8688   fi
8689 
8690 
8691 
8692 
8693 
8694   # Publish this variable in the help.
8695 
8696 
8697   if [ -z "${GZIP+x}" ]; then
8698     # The variable is not set by user, try to locate tool using the code snippet
8699     for ac_prog in pigz gzip
8700 do
8701   # Extract the first word of "$ac_prog", so it can be a program name with args.
8702 set dummy $ac_prog; ac_word=$2
8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8704 $as_echo_n "checking for $ac_word... " >&6; }
8705 if ${ac_cv_path_GZIP+:} false; then :
8706   $as_echo_n "(cached) " >&6
8707 else
8708   case $GZIP in
8709   [\\/]* | ?:[\\/]*)
8710   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8711   ;;
8712   *)
8713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8714 for as_dir in $PATH
8715 do
8716   IFS=$as_save_IFS
8717   test -z "$as_dir" && as_dir=.
8718     for ac_exec_ext in '' $ac_executable_extensions; do
8719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8720     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8722     break 2
8723   fi
8724 done
8725   done
8726 IFS=$as_save_IFS
8727 
8728   ;;
8729 esac
8730 fi
8731 GZIP=$ac_cv_path_GZIP
8732 if test -n "$GZIP"; then
8733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8734 $as_echo "$GZIP" >&6; }
8735 else
8736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8737 $as_echo "no" >&6; }
8738 fi
8739 
8740 
8741   test -n "$GZIP" && break
8742 done
8743 
8744   else
8745     # The variable is set, but is it from the command line or the environment?
8746 
8747     # Try to remove the string !GZIP! from our list.
8748     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8749     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8750       # If it failed, the variable was not from the command line. Ignore it,
8751       # but warn the user (except for BASH, which is always set by the calling BASH).
8752       if test "xGZIP" != xBASH; then
8753         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8754 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8755       fi
8756       # Try to locate tool using the code snippet
8757       for ac_prog in pigz gzip
8758 do
8759   # Extract the first word of "$ac_prog", so it can be a program name with args.
8760 set dummy $ac_prog; ac_word=$2
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8762 $as_echo_n "checking for $ac_word... " >&6; }
8763 if ${ac_cv_path_GZIP+:} false; then :
8764   $as_echo_n "(cached) " >&6
8765 else
8766   case $GZIP in
8767   [\\/]* | ?:[\\/]*)
8768   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8769   ;;
8770   *)
8771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8772 for as_dir in $PATH
8773 do
8774   IFS=$as_save_IFS
8775   test -z "$as_dir" && as_dir=.
8776     for ac_exec_ext in '' $ac_executable_extensions; do
8777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8778     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8780     break 2
8781   fi
8782 done
8783   done
8784 IFS=$as_save_IFS
8785 
8786   ;;
8787 esac
8788 fi
8789 GZIP=$ac_cv_path_GZIP
8790 if test -n "$GZIP"; then
8791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8792 $as_echo "$GZIP" >&6; }
8793 else
8794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795 $as_echo "no" >&6; }
8796 fi
8797 
8798 
8799   test -n "$GZIP" && break
8800 done
8801 
8802     else
8803       # If it succeeded, then it was overridden by the user. We will use it
8804       # for the tool.
8805 
8806       # First remove it from the list of overridden variables, so we can test
8807       # for unknown variables in the end.
8808       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8809 
8810       # Check if we try to supply an empty value
8811       if test "x$GZIP" = x; then
8812         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8813 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8814         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8815 $as_echo_n "checking for GZIP... " >&6; }
8816         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8817 $as_echo "disabled" >&6; }
8818       else
8819         # Check if the provided tool contains a complete path.
8820         tool_specified="$GZIP"
8821         tool_basename="${tool_specified##*/}"
8822         if test "x$tool_basename" = "x$tool_specified"; then
8823           # A command without a complete path is provided, search $PATH.
8824           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8825 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8826           # Extract the first word of "$tool_basename", so it can be a program name with args.
8827 set dummy $tool_basename; ac_word=$2
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8829 $as_echo_n "checking for $ac_word... " >&6; }
8830 if ${ac_cv_path_GZIP+:} false; then :
8831   $as_echo_n "(cached) " >&6
8832 else
8833   case $GZIP in
8834   [\\/]* | ?:[\\/]*)
8835   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8836   ;;
8837   *)
8838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8839 for as_dir in $PATH
8840 do
8841   IFS=$as_save_IFS
8842   test -z "$as_dir" && as_dir=.
8843     for ac_exec_ext in '' $ac_executable_extensions; do
8844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8845     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8847     break 2
8848   fi
8849 done
8850   done
8851 IFS=$as_save_IFS
8852 
8853   ;;
8854 esac
8855 fi
8856 GZIP=$ac_cv_path_GZIP
8857 if test -n "$GZIP"; then
8858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8859 $as_echo "$GZIP" >&6; }
8860 else
8861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8862 $as_echo "no" >&6; }
8863 fi
8864 
8865 
8866           if test "x$GZIP" = x; then
8867             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8868           fi
8869         else
8870           # Otherwise we believe it is a complete path. Use it as it is.
8871           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8872 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8873           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8874 $as_echo_n "checking for GZIP... " >&6; }
8875           if test ! -x "$tool_specified"; then
8876             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8877 $as_echo "not found" >&6; }
8878             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8879           fi
8880           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8881 $as_echo "$tool_specified" >&6; }
8882         fi
8883       fi
8884     fi
8885 
8886   fi
8887 
8888 
8889 
8890   if test "x$GZIP" = x; then
8891     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8892   fi
8893 
8894 
8895 
8896 
8897 
8898   # Publish this variable in the help.
8899 
8900 
8901   if [ -z "${LN+x}" ]; then
8902     # The variable is not set by user, try to locate tool using the code snippet
8903     for ac_prog in ln
8904 do
8905   # Extract the first word of "$ac_prog", so it can be a program name with args.
8906 set dummy $ac_prog; ac_word=$2
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8908 $as_echo_n "checking for $ac_word... " >&6; }
8909 if ${ac_cv_path_LN+:} false; then :
8910   $as_echo_n "(cached) " >&6
8911 else
8912   case $LN in
8913   [\\/]* | ?:[\\/]*)
8914   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8915   ;;
8916   *)
8917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8918 for as_dir in $PATH
8919 do
8920   IFS=$as_save_IFS
8921   test -z "$as_dir" && as_dir=.
8922     for ac_exec_ext in '' $ac_executable_extensions; do
8923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8924     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8926     break 2
8927   fi
8928 done
8929   done
8930 IFS=$as_save_IFS
8931 
8932   ;;
8933 esac
8934 fi
8935 LN=$ac_cv_path_LN
8936 if test -n "$LN"; then
8937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8938 $as_echo "$LN" >&6; }
8939 else
8940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8941 $as_echo "no" >&6; }
8942 fi
8943 
8944 
8945   test -n "$LN" && break
8946 done
8947 
8948   else
8949     # The variable is set, but is it from the command line or the environment?
8950 
8951     # Try to remove the string !LN! from our list.
8952     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8953     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8954       # If it failed, the variable was not from the command line. Ignore it,
8955       # but warn the user (except for BASH, which is always set by the calling BASH).
8956       if test "xLN" != xBASH; then
8957         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8958 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8959       fi
8960       # Try to locate tool using the code snippet
8961       for ac_prog in ln
8962 do
8963   # Extract the first word of "$ac_prog", so it can be a program name with args.
8964 set dummy $ac_prog; ac_word=$2
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8966 $as_echo_n "checking for $ac_word... " >&6; }
8967 if ${ac_cv_path_LN+:} false; then :
8968   $as_echo_n "(cached) " >&6
8969 else
8970   case $LN in
8971   [\\/]* | ?:[\\/]*)
8972   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8973   ;;
8974   *)
8975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976 for as_dir in $PATH
8977 do
8978   IFS=$as_save_IFS
8979   test -z "$as_dir" && as_dir=.
8980     for ac_exec_ext in '' $ac_executable_extensions; do
8981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984     break 2
8985   fi
8986 done
8987   done
8988 IFS=$as_save_IFS
8989 
8990   ;;
8991 esac
8992 fi
8993 LN=$ac_cv_path_LN
8994 if test -n "$LN"; then
8995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8996 $as_echo "$LN" >&6; }
8997 else
8998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999 $as_echo "no" >&6; }
9000 fi
9001 
9002 
9003   test -n "$LN" && break
9004 done
9005 
9006     else
9007       # If it succeeded, then it was overridden by the user. We will use it
9008       # for the tool.
9009 
9010       # First remove it from the list of overridden variables, so we can test
9011       # for unknown variables in the end.
9012       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9013 
9014       # Check if we try to supply an empty value
9015       if test "x$LN" = x; then
9016         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9017 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9018         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9019 $as_echo_n "checking for LN... " >&6; }
9020         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9021 $as_echo "disabled" >&6; }
9022       else
9023         # Check if the provided tool contains a complete path.
9024         tool_specified="$LN"
9025         tool_basename="${tool_specified##*/}"
9026         if test "x$tool_basename" = "x$tool_specified"; then
9027           # A command without a complete path is provided, search $PATH.
9028           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9029 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9030           # Extract the first word of "$tool_basename", so it can be a program name with args.
9031 set dummy $tool_basename; ac_word=$2
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9033 $as_echo_n "checking for $ac_word... " >&6; }
9034 if ${ac_cv_path_LN+:} false; then :
9035   $as_echo_n "(cached) " >&6
9036 else
9037   case $LN in
9038   [\\/]* | ?:[\\/]*)
9039   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9040   ;;
9041   *)
9042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9043 for as_dir in $PATH
9044 do
9045   IFS=$as_save_IFS
9046   test -z "$as_dir" && as_dir=.
9047     for ac_exec_ext in '' $ac_executable_extensions; do
9048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9049     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9051     break 2
9052   fi
9053 done
9054   done
9055 IFS=$as_save_IFS
9056 
9057   ;;
9058 esac
9059 fi
9060 LN=$ac_cv_path_LN
9061 if test -n "$LN"; then
9062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9063 $as_echo "$LN" >&6; }
9064 else
9065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9066 $as_echo "no" >&6; }
9067 fi
9068 
9069 
9070           if test "x$LN" = x; then
9071             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9072           fi
9073         else
9074           # Otherwise we believe it is a complete path. Use it as it is.
9075           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9076 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9077           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9078 $as_echo_n "checking for LN... " >&6; }
9079           if test ! -x "$tool_specified"; then
9080             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9081 $as_echo "not found" >&6; }
9082             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9083           fi
9084           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9085 $as_echo "$tool_specified" >&6; }
9086         fi
9087       fi
9088     fi
9089 
9090   fi
9091 
9092 
9093 
9094   if test "x$LN" = x; then
9095     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9096   fi
9097 
9098 
9099 
9100 
9101 
9102   # Publish this variable in the help.
9103 
9104 
9105   if [ -z "${LS+x}" ]; then
9106     # The variable is not set by user, try to locate tool using the code snippet
9107     for ac_prog in ls
9108 do
9109   # Extract the first word of "$ac_prog", so it can be a program name with args.
9110 set dummy $ac_prog; ac_word=$2
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9112 $as_echo_n "checking for $ac_word... " >&6; }
9113 if ${ac_cv_path_LS+:} false; then :
9114   $as_echo_n "(cached) " >&6
9115 else
9116   case $LS in
9117   [\\/]* | ?:[\\/]*)
9118   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9119   ;;
9120   *)
9121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9122 for as_dir in $PATH
9123 do
9124   IFS=$as_save_IFS
9125   test -z "$as_dir" && as_dir=.
9126     for ac_exec_ext in '' $ac_executable_extensions; do
9127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9128     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9130     break 2
9131   fi
9132 done
9133   done
9134 IFS=$as_save_IFS
9135 
9136   ;;
9137 esac
9138 fi
9139 LS=$ac_cv_path_LS
9140 if test -n "$LS"; then
9141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9142 $as_echo "$LS" >&6; }
9143 else
9144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9145 $as_echo "no" >&6; }
9146 fi
9147 
9148 
9149   test -n "$LS" && break
9150 done
9151 
9152   else
9153     # The variable is set, but is it from the command line or the environment?
9154 
9155     # Try to remove the string !LS! from our list.
9156     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9157     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9158       # If it failed, the variable was not from the command line. Ignore it,
9159       # but warn the user (except for BASH, which is always set by the calling BASH).
9160       if test "xLS" != xBASH; then
9161         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9162 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9163       fi
9164       # Try to locate tool using the code snippet
9165       for ac_prog in ls
9166 do
9167   # Extract the first word of "$ac_prog", so it can be a program name with args.
9168 set dummy $ac_prog; ac_word=$2
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9170 $as_echo_n "checking for $ac_word... " >&6; }
9171 if ${ac_cv_path_LS+:} false; then :
9172   $as_echo_n "(cached) " >&6
9173 else
9174   case $LS in
9175   [\\/]* | ?:[\\/]*)
9176   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9177   ;;
9178   *)
9179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180 for as_dir in $PATH
9181 do
9182   IFS=$as_save_IFS
9183   test -z "$as_dir" && as_dir=.
9184     for ac_exec_ext in '' $ac_executable_extensions; do
9185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9186     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9188     break 2
9189   fi
9190 done
9191   done
9192 IFS=$as_save_IFS
9193 
9194   ;;
9195 esac
9196 fi
9197 LS=$ac_cv_path_LS
9198 if test -n "$LS"; then
9199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9200 $as_echo "$LS" >&6; }
9201 else
9202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203 $as_echo "no" >&6; }
9204 fi
9205 
9206 
9207   test -n "$LS" && break
9208 done
9209 
9210     else
9211       # If it succeeded, then it was overridden by the user. We will use it
9212       # for the tool.
9213 
9214       # First remove it from the list of overridden variables, so we can test
9215       # for unknown variables in the end.
9216       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9217 
9218       # Check if we try to supply an empty value
9219       if test "x$LS" = x; then
9220         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9221 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9222         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9223 $as_echo_n "checking for LS... " >&6; }
9224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9225 $as_echo "disabled" >&6; }
9226       else
9227         # Check if the provided tool contains a complete path.
9228         tool_specified="$LS"
9229         tool_basename="${tool_specified##*/}"
9230         if test "x$tool_basename" = "x$tool_specified"; then
9231           # A command without a complete path is provided, search $PATH.
9232           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9233 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9234           # Extract the first word of "$tool_basename", so it can be a program name with args.
9235 set dummy $tool_basename; ac_word=$2
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9237 $as_echo_n "checking for $ac_word... " >&6; }
9238 if ${ac_cv_path_LS+:} false; then :
9239   $as_echo_n "(cached) " >&6
9240 else
9241   case $LS in
9242   [\\/]* | ?:[\\/]*)
9243   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9244   ;;
9245   *)
9246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9247 for as_dir in $PATH
9248 do
9249   IFS=$as_save_IFS
9250   test -z "$as_dir" && as_dir=.
9251     for ac_exec_ext in '' $ac_executable_extensions; do
9252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9253     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9255     break 2
9256   fi
9257 done
9258   done
9259 IFS=$as_save_IFS
9260 
9261   ;;
9262 esac
9263 fi
9264 LS=$ac_cv_path_LS
9265 if test -n "$LS"; then
9266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9267 $as_echo "$LS" >&6; }
9268 else
9269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9270 $as_echo "no" >&6; }
9271 fi
9272 
9273 
9274           if test "x$LS" = x; then
9275             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9276           fi
9277         else
9278           # Otherwise we believe it is a complete path. Use it as it is.
9279           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9280 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9281           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9282 $as_echo_n "checking for LS... " >&6; }
9283           if test ! -x "$tool_specified"; then
9284             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9285 $as_echo "not found" >&6; }
9286             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9287           fi
9288           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9289 $as_echo "$tool_specified" >&6; }
9290         fi
9291       fi
9292     fi
9293 
9294   fi
9295 
9296 
9297 
9298   if test "x$LS" = x; then
9299     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9300   fi
9301 
9302 
9303 
9304 
9305 
9306   # Publish this variable in the help.
9307 
9308 
9309   if [ -z "${MKDIR+x}" ]; then
9310     # The variable is not set by user, try to locate tool using the code snippet
9311     for ac_prog in mkdir
9312 do
9313   # Extract the first word of "$ac_prog", so it can be a program name with args.
9314 set dummy $ac_prog; ac_word=$2
9315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9316 $as_echo_n "checking for $ac_word... " >&6; }
9317 if ${ac_cv_path_MKDIR+:} false; then :
9318   $as_echo_n "(cached) " >&6
9319 else
9320   case $MKDIR in
9321   [\\/]* | ?:[\\/]*)
9322   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9323   ;;
9324   *)
9325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9326 for as_dir in $PATH
9327 do
9328   IFS=$as_save_IFS
9329   test -z "$as_dir" && as_dir=.
9330     for ac_exec_ext in '' $ac_executable_extensions; do
9331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9332     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9334     break 2
9335   fi
9336 done
9337   done
9338 IFS=$as_save_IFS
9339 
9340   ;;
9341 esac
9342 fi
9343 MKDIR=$ac_cv_path_MKDIR
9344 if test -n "$MKDIR"; then
9345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9346 $as_echo "$MKDIR" >&6; }
9347 else
9348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9349 $as_echo "no" >&6; }
9350 fi
9351 
9352 
9353   test -n "$MKDIR" && break
9354 done
9355 
9356   else
9357     # The variable is set, but is it from the command line or the environment?
9358 
9359     # Try to remove the string !MKDIR! from our list.
9360     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9361     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9362       # If it failed, the variable was not from the command line. Ignore it,
9363       # but warn the user (except for BASH, which is always set by the calling BASH).
9364       if test "xMKDIR" != xBASH; then
9365         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9366 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9367       fi
9368       # Try to locate tool using the code snippet
9369       for ac_prog in mkdir
9370 do
9371   # Extract the first word of "$ac_prog", so it can be a program name with args.
9372 set dummy $ac_prog; ac_word=$2
9373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374 $as_echo_n "checking for $ac_word... " >&6; }
9375 if ${ac_cv_path_MKDIR+:} false; then :
9376   $as_echo_n "(cached) " >&6
9377 else
9378   case $MKDIR in
9379   [\\/]* | ?:[\\/]*)
9380   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9381   ;;
9382   *)
9383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384 for as_dir in $PATH
9385 do
9386   IFS=$as_save_IFS
9387   test -z "$as_dir" && as_dir=.
9388     for ac_exec_ext in '' $ac_executable_extensions; do
9389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9390     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9392     break 2
9393   fi
9394 done
9395   done
9396 IFS=$as_save_IFS
9397 
9398   ;;
9399 esac
9400 fi
9401 MKDIR=$ac_cv_path_MKDIR
9402 if test -n "$MKDIR"; then
9403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9404 $as_echo "$MKDIR" >&6; }
9405 else
9406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407 $as_echo "no" >&6; }
9408 fi
9409 
9410 
9411   test -n "$MKDIR" && break
9412 done
9413 
9414     else
9415       # If it succeeded, then it was overridden by the user. We will use it
9416       # for the tool.
9417 
9418       # First remove it from the list of overridden variables, so we can test
9419       # for unknown variables in the end.
9420       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9421 
9422       # Check if we try to supply an empty value
9423       if test "x$MKDIR" = x; then
9424         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9425 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9426         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9427 $as_echo_n "checking for MKDIR... " >&6; }
9428         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9429 $as_echo "disabled" >&6; }
9430       else
9431         # Check if the provided tool contains a complete path.
9432         tool_specified="$MKDIR"
9433         tool_basename="${tool_specified##*/}"
9434         if test "x$tool_basename" = "x$tool_specified"; then
9435           # A command without a complete path is provided, search $PATH.
9436           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9437 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9438           # Extract the first word of "$tool_basename", so it can be a program name with args.
9439 set dummy $tool_basename; ac_word=$2
9440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9441 $as_echo_n "checking for $ac_word... " >&6; }
9442 if ${ac_cv_path_MKDIR+:} false; then :
9443   $as_echo_n "(cached) " >&6
9444 else
9445   case $MKDIR in
9446   [\\/]* | ?:[\\/]*)
9447   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9448   ;;
9449   *)
9450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9451 for as_dir in $PATH
9452 do
9453   IFS=$as_save_IFS
9454   test -z "$as_dir" && as_dir=.
9455     for ac_exec_ext in '' $ac_executable_extensions; do
9456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9457     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9459     break 2
9460   fi
9461 done
9462   done
9463 IFS=$as_save_IFS
9464 
9465   ;;
9466 esac
9467 fi
9468 MKDIR=$ac_cv_path_MKDIR
9469 if test -n "$MKDIR"; then
9470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9471 $as_echo "$MKDIR" >&6; }
9472 else
9473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474 $as_echo "no" >&6; }
9475 fi
9476 
9477 
9478           if test "x$MKDIR" = x; then
9479             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9480           fi
9481         else
9482           # Otherwise we believe it is a complete path. Use it as it is.
9483           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9484 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9485           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9486 $as_echo_n "checking for MKDIR... " >&6; }
9487           if test ! -x "$tool_specified"; then
9488             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9489 $as_echo "not found" >&6; }
9490             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9491           fi
9492           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9493 $as_echo "$tool_specified" >&6; }
9494         fi
9495       fi
9496     fi
9497 
9498   fi
9499 
9500 
9501 
9502   if test "x$MKDIR" = x; then
9503     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9504   fi
9505 
9506 
9507 
9508 
9509 
9510   # Publish this variable in the help.
9511 
9512 
9513   if [ -z "${MKTEMP+x}" ]; then
9514     # The variable is not set by user, try to locate tool using the code snippet
9515     for ac_prog in mktemp
9516 do
9517   # Extract the first word of "$ac_prog", so it can be a program name with args.
9518 set dummy $ac_prog; ac_word=$2
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9520 $as_echo_n "checking for $ac_word... " >&6; }
9521 if ${ac_cv_path_MKTEMP+:} false; then :
9522   $as_echo_n "(cached) " >&6
9523 else
9524   case $MKTEMP in
9525   [\\/]* | ?:[\\/]*)
9526   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9527   ;;
9528   *)
9529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9530 for as_dir in $PATH
9531 do
9532   IFS=$as_save_IFS
9533   test -z "$as_dir" && as_dir=.
9534     for ac_exec_ext in '' $ac_executable_extensions; do
9535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9536     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9538     break 2
9539   fi
9540 done
9541   done
9542 IFS=$as_save_IFS
9543 
9544   ;;
9545 esac
9546 fi
9547 MKTEMP=$ac_cv_path_MKTEMP
9548 if test -n "$MKTEMP"; then
9549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9550 $as_echo "$MKTEMP" >&6; }
9551 else
9552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553 $as_echo "no" >&6; }
9554 fi
9555 
9556 
9557   test -n "$MKTEMP" && break
9558 done
9559 
9560   else
9561     # The variable is set, but is it from the command line or the environment?
9562 
9563     # Try to remove the string !MKTEMP! from our list.
9564     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9565     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9566       # If it failed, the variable was not from the command line. Ignore it,
9567       # but warn the user (except for BASH, which is always set by the calling BASH).
9568       if test "xMKTEMP" != xBASH; then
9569         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9570 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9571       fi
9572       # Try to locate tool using the code snippet
9573       for ac_prog in mktemp
9574 do
9575   # Extract the first word of "$ac_prog", so it can be a program name with args.
9576 set dummy $ac_prog; ac_word=$2
9577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9578 $as_echo_n "checking for $ac_word... " >&6; }
9579 if ${ac_cv_path_MKTEMP+:} false; then :
9580   $as_echo_n "(cached) " >&6
9581 else
9582   case $MKTEMP in
9583   [\\/]* | ?:[\\/]*)
9584   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9585   ;;
9586   *)
9587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9588 for as_dir in $PATH
9589 do
9590   IFS=$as_save_IFS
9591   test -z "$as_dir" && as_dir=.
9592     for ac_exec_ext in '' $ac_executable_extensions; do
9593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9594     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9596     break 2
9597   fi
9598 done
9599   done
9600 IFS=$as_save_IFS
9601 
9602   ;;
9603 esac
9604 fi
9605 MKTEMP=$ac_cv_path_MKTEMP
9606 if test -n "$MKTEMP"; then
9607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9608 $as_echo "$MKTEMP" >&6; }
9609 else
9610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611 $as_echo "no" >&6; }
9612 fi
9613 
9614 
9615   test -n "$MKTEMP" && break
9616 done
9617 
9618     else
9619       # If it succeeded, then it was overridden by the user. We will use it
9620       # for the tool.
9621 
9622       # First remove it from the list of overridden variables, so we can test
9623       # for unknown variables in the end.
9624       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9625 
9626       # Check if we try to supply an empty value
9627       if test "x$MKTEMP" = x; then
9628         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9629 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9630         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9631 $as_echo_n "checking for MKTEMP... " >&6; }
9632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9633 $as_echo "disabled" >&6; }
9634       else
9635         # Check if the provided tool contains a complete path.
9636         tool_specified="$MKTEMP"
9637         tool_basename="${tool_specified##*/}"
9638         if test "x$tool_basename" = "x$tool_specified"; then
9639           # A command without a complete path is provided, search $PATH.
9640           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9641 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9642           # Extract the first word of "$tool_basename", so it can be a program name with args.
9643 set dummy $tool_basename; ac_word=$2
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9645 $as_echo_n "checking for $ac_word... " >&6; }
9646 if ${ac_cv_path_MKTEMP+:} false; then :
9647   $as_echo_n "(cached) " >&6
9648 else
9649   case $MKTEMP in
9650   [\\/]* | ?:[\\/]*)
9651   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9652   ;;
9653   *)
9654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9655 for as_dir in $PATH
9656 do
9657   IFS=$as_save_IFS
9658   test -z "$as_dir" && as_dir=.
9659     for ac_exec_ext in '' $ac_executable_extensions; do
9660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9661     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9663     break 2
9664   fi
9665 done
9666   done
9667 IFS=$as_save_IFS
9668 
9669   ;;
9670 esac
9671 fi
9672 MKTEMP=$ac_cv_path_MKTEMP
9673 if test -n "$MKTEMP"; then
9674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9675 $as_echo "$MKTEMP" >&6; }
9676 else
9677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9678 $as_echo "no" >&6; }
9679 fi
9680 
9681 
9682           if test "x$MKTEMP" = x; then
9683             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9684           fi
9685         else
9686           # Otherwise we believe it is a complete path. Use it as it is.
9687           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9688 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9689           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9690 $as_echo_n "checking for MKTEMP... " >&6; }
9691           if test ! -x "$tool_specified"; then
9692             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9693 $as_echo "not found" >&6; }
9694             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9695           fi
9696           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9697 $as_echo "$tool_specified" >&6; }
9698         fi
9699       fi
9700     fi
9701 
9702   fi
9703 
9704 
9705 
9706   if test "x$MKTEMP" = x; then
9707     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9708   fi
9709 
9710 
9711 
9712 
9713 
9714   # Publish this variable in the help.
9715 
9716 
9717   if [ -z "${MV+x}" ]; then
9718     # The variable is not set by user, try to locate tool using the code snippet
9719     for ac_prog in mv
9720 do
9721   # Extract the first word of "$ac_prog", so it can be a program name with args.
9722 set dummy $ac_prog; ac_word=$2
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9724 $as_echo_n "checking for $ac_word... " >&6; }
9725 if ${ac_cv_path_MV+:} false; then :
9726   $as_echo_n "(cached) " >&6
9727 else
9728   case $MV in
9729   [\\/]* | ?:[\\/]*)
9730   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9731   ;;
9732   *)
9733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734 for as_dir in $PATH
9735 do
9736   IFS=$as_save_IFS
9737   test -z "$as_dir" && as_dir=.
9738     for ac_exec_ext in '' $ac_executable_extensions; do
9739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742     break 2
9743   fi
9744 done
9745   done
9746 IFS=$as_save_IFS
9747 
9748   ;;
9749 esac
9750 fi
9751 MV=$ac_cv_path_MV
9752 if test -n "$MV"; then
9753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9754 $as_echo "$MV" >&6; }
9755 else
9756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757 $as_echo "no" >&6; }
9758 fi
9759 
9760 
9761   test -n "$MV" && break
9762 done
9763 
9764   else
9765     # The variable is set, but is it from the command line or the environment?
9766 
9767     # Try to remove the string !MV! from our list.
9768     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9769     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9770       # If it failed, the variable was not from the command line. Ignore it,
9771       # but warn the user (except for BASH, which is always set by the calling BASH).
9772       if test "xMV" != xBASH; then
9773         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9774 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9775       fi
9776       # Try to locate tool using the code snippet
9777       for ac_prog in mv
9778 do
9779   # Extract the first word of "$ac_prog", so it can be a program name with args.
9780 set dummy $ac_prog; ac_word=$2
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782 $as_echo_n "checking for $ac_word... " >&6; }
9783 if ${ac_cv_path_MV+:} false; then :
9784   $as_echo_n "(cached) " >&6
9785 else
9786   case $MV in
9787   [\\/]* | ?:[\\/]*)
9788   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9789   ;;
9790   *)
9791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792 for as_dir in $PATH
9793 do
9794   IFS=$as_save_IFS
9795   test -z "$as_dir" && as_dir=.
9796     for ac_exec_ext in '' $ac_executable_extensions; do
9797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800     break 2
9801   fi
9802 done
9803   done
9804 IFS=$as_save_IFS
9805 
9806   ;;
9807 esac
9808 fi
9809 MV=$ac_cv_path_MV
9810 if test -n "$MV"; then
9811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9812 $as_echo "$MV" >&6; }
9813 else
9814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815 $as_echo "no" >&6; }
9816 fi
9817 
9818 
9819   test -n "$MV" && break
9820 done
9821 
9822     else
9823       # If it succeeded, then it was overridden by the user. We will use it
9824       # for the tool.
9825 
9826       # First remove it from the list of overridden variables, so we can test
9827       # for unknown variables in the end.
9828       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9829 
9830       # Check if we try to supply an empty value
9831       if test "x$MV" = x; then
9832         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9833 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9834         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9835 $as_echo_n "checking for MV... " >&6; }
9836         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9837 $as_echo "disabled" >&6; }
9838       else
9839         # Check if the provided tool contains a complete path.
9840         tool_specified="$MV"
9841         tool_basename="${tool_specified##*/}"
9842         if test "x$tool_basename" = "x$tool_specified"; then
9843           # A command without a complete path is provided, search $PATH.
9844           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9845 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9846           # Extract the first word of "$tool_basename", so it can be a program name with args.
9847 set dummy $tool_basename; ac_word=$2
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9849 $as_echo_n "checking for $ac_word... " >&6; }
9850 if ${ac_cv_path_MV+:} false; then :
9851   $as_echo_n "(cached) " >&6
9852 else
9853   case $MV in
9854   [\\/]* | ?:[\\/]*)
9855   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9856   ;;
9857   *)
9858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9859 for as_dir in $PATH
9860 do
9861   IFS=$as_save_IFS
9862   test -z "$as_dir" && as_dir=.
9863     for ac_exec_ext in '' $ac_executable_extensions; do
9864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9865     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9867     break 2
9868   fi
9869 done
9870   done
9871 IFS=$as_save_IFS
9872 
9873   ;;
9874 esac
9875 fi
9876 MV=$ac_cv_path_MV
9877 if test -n "$MV"; then
9878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9879 $as_echo "$MV" >&6; }
9880 else
9881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9882 $as_echo "no" >&6; }
9883 fi
9884 
9885 
9886           if test "x$MV" = x; then
9887             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9888           fi
9889         else
9890           # Otherwise we believe it is a complete path. Use it as it is.
9891           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9892 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9893           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9894 $as_echo_n "checking for MV... " >&6; }
9895           if test ! -x "$tool_specified"; then
9896             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9897 $as_echo "not found" >&6; }
9898             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9899           fi
9900           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9901 $as_echo "$tool_specified" >&6; }
9902         fi
9903       fi
9904     fi
9905 
9906   fi
9907 
9908 
9909 
9910   if test "x$MV" = x; then
9911     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9912   fi
9913 
9914 
9915 
9916 
9917 
9918   # Publish this variable in the help.
9919 
9920 
9921   if [ -z "${NAWK+x}" ]; then
9922     # The variable is not set by user, try to locate tool using the code snippet
9923     for ac_prog in nawk gawk awk
9924 do
9925   # Extract the first word of "$ac_prog", so it can be a program name with args.
9926 set dummy $ac_prog; ac_word=$2
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9928 $as_echo_n "checking for $ac_word... " >&6; }
9929 if ${ac_cv_path_NAWK+:} false; then :
9930   $as_echo_n "(cached) " >&6
9931 else
9932   case $NAWK in
9933   [\\/]* | ?:[\\/]*)
9934   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9935   ;;
9936   *)
9937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9938 for as_dir in $PATH
9939 do
9940   IFS=$as_save_IFS
9941   test -z "$as_dir" && as_dir=.
9942     for ac_exec_ext in '' $ac_executable_extensions; do
9943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9944     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9946     break 2
9947   fi
9948 done
9949   done
9950 IFS=$as_save_IFS
9951 
9952   ;;
9953 esac
9954 fi
9955 NAWK=$ac_cv_path_NAWK
9956 if test -n "$NAWK"; then
9957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9958 $as_echo "$NAWK" >&6; }
9959 else
9960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9961 $as_echo "no" >&6; }
9962 fi
9963 
9964 
9965   test -n "$NAWK" && break
9966 done
9967 
9968   else
9969     # The variable is set, but is it from the command line or the environment?
9970 
9971     # Try to remove the string !NAWK! from our list.
9972     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9973     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9974       # If it failed, the variable was not from the command line. Ignore it,
9975       # but warn the user (except for BASH, which is always set by the calling BASH).
9976       if test "xNAWK" != xBASH; then
9977         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9978 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9979       fi
9980       # Try to locate tool using the code snippet
9981       for ac_prog in nawk gawk awk
9982 do
9983   # Extract the first word of "$ac_prog", so it can be a program name with args.
9984 set dummy $ac_prog; ac_word=$2
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986 $as_echo_n "checking for $ac_word... " >&6; }
9987 if ${ac_cv_path_NAWK+:} false; then :
9988   $as_echo_n "(cached) " >&6
9989 else
9990   case $NAWK in
9991   [\\/]* | ?:[\\/]*)
9992   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9993   ;;
9994   *)
9995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996 for as_dir in $PATH
9997 do
9998   IFS=$as_save_IFS
9999   test -z "$as_dir" && as_dir=.
10000     for ac_exec_ext in '' $ac_executable_extensions; do
10001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10002     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004     break 2
10005   fi
10006 done
10007   done
10008 IFS=$as_save_IFS
10009 
10010   ;;
10011 esac
10012 fi
10013 NAWK=$ac_cv_path_NAWK
10014 if test -n "$NAWK"; then
10015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10016 $as_echo "$NAWK" >&6; }
10017 else
10018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019 $as_echo "no" >&6; }
10020 fi
10021 
10022 
10023   test -n "$NAWK" && break
10024 done
10025 
10026     else
10027       # If it succeeded, then it was overridden by the user. We will use it
10028       # for the tool.
10029 
10030       # First remove it from the list of overridden variables, so we can test
10031       # for unknown variables in the end.
10032       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10033 
10034       # Check if we try to supply an empty value
10035       if test "x$NAWK" = x; then
10036         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10037 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10038         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10039 $as_echo_n "checking for NAWK... " >&6; }
10040         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10041 $as_echo "disabled" >&6; }
10042       else
10043         # Check if the provided tool contains a complete path.
10044         tool_specified="$NAWK"
10045         tool_basename="${tool_specified##*/}"
10046         if test "x$tool_basename" = "x$tool_specified"; then
10047           # A command without a complete path is provided, search $PATH.
10048           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10049 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10050           # Extract the first word of "$tool_basename", so it can be a program name with args.
10051 set dummy $tool_basename; ac_word=$2
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10053 $as_echo_n "checking for $ac_word... " >&6; }
10054 if ${ac_cv_path_NAWK+:} false; then :
10055   $as_echo_n "(cached) " >&6
10056 else
10057   case $NAWK in
10058   [\\/]* | ?:[\\/]*)
10059   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10060   ;;
10061   *)
10062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10063 for as_dir in $PATH
10064 do
10065   IFS=$as_save_IFS
10066   test -z "$as_dir" && as_dir=.
10067     for ac_exec_ext in '' $ac_executable_extensions; do
10068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10069     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10071     break 2
10072   fi
10073 done
10074   done
10075 IFS=$as_save_IFS
10076 
10077   ;;
10078 esac
10079 fi
10080 NAWK=$ac_cv_path_NAWK
10081 if test -n "$NAWK"; then
10082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10083 $as_echo "$NAWK" >&6; }
10084 else
10085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10086 $as_echo "no" >&6; }
10087 fi
10088 
10089 
10090           if test "x$NAWK" = x; then
10091             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10092           fi
10093         else
10094           # Otherwise we believe it is a complete path. Use it as it is.
10095           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10096 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10097           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10098 $as_echo_n "checking for NAWK... " >&6; }
10099           if test ! -x "$tool_specified"; then
10100             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10101 $as_echo "not found" >&6; }
10102             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10103           fi
10104           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10105 $as_echo "$tool_specified" >&6; }
10106         fi
10107       fi
10108     fi
10109 
10110   fi
10111 
10112 
10113 
10114   if test "x$NAWK" = x; then
10115     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10116   fi
10117 
10118 
10119 
10120 
10121 
10122   # Publish this variable in the help.
10123 
10124 
10125   if [ -z "${PRINTF+x}" ]; then
10126     # The variable is not set by user, try to locate tool using the code snippet
10127     for ac_prog in printf
10128 do
10129   # Extract the first word of "$ac_prog", so it can be a program name with args.
10130 set dummy $ac_prog; ac_word=$2
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10132 $as_echo_n "checking for $ac_word... " >&6; }
10133 if ${ac_cv_path_PRINTF+:} false; then :
10134   $as_echo_n "(cached) " >&6
10135 else
10136   case $PRINTF in
10137   [\\/]* | ?:[\\/]*)
10138   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10139   ;;
10140   *)
10141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10142 for as_dir in $PATH
10143 do
10144   IFS=$as_save_IFS
10145   test -z "$as_dir" && as_dir=.
10146     for ac_exec_ext in '' $ac_executable_extensions; do
10147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10148     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10150     break 2
10151   fi
10152 done
10153   done
10154 IFS=$as_save_IFS
10155 
10156   ;;
10157 esac
10158 fi
10159 PRINTF=$ac_cv_path_PRINTF
10160 if test -n "$PRINTF"; then
10161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10162 $as_echo "$PRINTF" >&6; }
10163 else
10164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165 $as_echo "no" >&6; }
10166 fi
10167 
10168 
10169   test -n "$PRINTF" && break
10170 done
10171 
10172   else
10173     # The variable is set, but is it from the command line or the environment?
10174 
10175     # Try to remove the string !PRINTF! from our list.
10176     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10177     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10178       # If it failed, the variable was not from the command line. Ignore it,
10179       # but warn the user (except for BASH, which is always set by the calling BASH).
10180       if test "xPRINTF" != xBASH; then
10181         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10182 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10183       fi
10184       # Try to locate tool using the code snippet
10185       for ac_prog in printf
10186 do
10187   # Extract the first word of "$ac_prog", so it can be a program name with args.
10188 set dummy $ac_prog; ac_word=$2
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10190 $as_echo_n "checking for $ac_word... " >&6; }
10191 if ${ac_cv_path_PRINTF+:} false; then :
10192   $as_echo_n "(cached) " >&6
10193 else
10194   case $PRINTF in
10195   [\\/]* | ?:[\\/]*)
10196   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10197   ;;
10198   *)
10199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10200 for as_dir in $PATH
10201 do
10202   IFS=$as_save_IFS
10203   test -z "$as_dir" && as_dir=.
10204     for ac_exec_ext in '' $ac_executable_extensions; do
10205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10206     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10208     break 2
10209   fi
10210 done
10211   done
10212 IFS=$as_save_IFS
10213 
10214   ;;
10215 esac
10216 fi
10217 PRINTF=$ac_cv_path_PRINTF
10218 if test -n "$PRINTF"; then
10219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10220 $as_echo "$PRINTF" >&6; }
10221 else
10222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223 $as_echo "no" >&6; }
10224 fi
10225 
10226 
10227   test -n "$PRINTF" && break
10228 done
10229 
10230     else
10231       # If it succeeded, then it was overridden by the user. We will use it
10232       # for the tool.
10233 
10234       # First remove it from the list of overridden variables, so we can test
10235       # for unknown variables in the end.
10236       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10237 
10238       # Check if we try to supply an empty value
10239       if test "x$PRINTF" = x; then
10240         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10241 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10242         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10243 $as_echo_n "checking for PRINTF... " >&6; }
10244         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10245 $as_echo "disabled" >&6; }
10246       else
10247         # Check if the provided tool contains a complete path.
10248         tool_specified="$PRINTF"
10249         tool_basename="${tool_specified##*/}"
10250         if test "x$tool_basename" = "x$tool_specified"; then
10251           # A command without a complete path is provided, search $PATH.
10252           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10253 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10254           # Extract the first word of "$tool_basename", so it can be a program name with args.
10255 set dummy $tool_basename; ac_word=$2
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10257 $as_echo_n "checking for $ac_word... " >&6; }
10258 if ${ac_cv_path_PRINTF+:} false; then :
10259   $as_echo_n "(cached) " >&6
10260 else
10261   case $PRINTF in
10262   [\\/]* | ?:[\\/]*)
10263   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10264   ;;
10265   *)
10266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10267 for as_dir in $PATH
10268 do
10269   IFS=$as_save_IFS
10270   test -z "$as_dir" && as_dir=.
10271     for ac_exec_ext in '' $ac_executable_extensions; do
10272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10273     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10275     break 2
10276   fi
10277 done
10278   done
10279 IFS=$as_save_IFS
10280 
10281   ;;
10282 esac
10283 fi
10284 PRINTF=$ac_cv_path_PRINTF
10285 if test -n "$PRINTF"; then
10286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10287 $as_echo "$PRINTF" >&6; }
10288 else
10289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290 $as_echo "no" >&6; }
10291 fi
10292 
10293 
10294           if test "x$PRINTF" = x; then
10295             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10296           fi
10297         else
10298           # Otherwise we believe it is a complete path. Use it as it is.
10299           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10300 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10301           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10302 $as_echo_n "checking for PRINTF... " >&6; }
10303           if test ! -x "$tool_specified"; then
10304             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10305 $as_echo "not found" >&6; }
10306             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10307           fi
10308           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10309 $as_echo "$tool_specified" >&6; }
10310         fi
10311       fi
10312     fi
10313 
10314   fi
10315 
10316 
10317 
10318   if test "x$PRINTF" = x; then
10319     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10320   fi
10321 
10322 
10323 
10324 
10325 
10326   # Publish this variable in the help.
10327 
10328 
10329   if [ -z "${RM+x}" ]; then
10330     # The variable is not set by user, try to locate tool using the code snippet
10331     for ac_prog in rm
10332 do
10333   # Extract the first word of "$ac_prog", so it can be a program name with args.
10334 set dummy $ac_prog; ac_word=$2
10335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10336 $as_echo_n "checking for $ac_word... " >&6; }
10337 if ${ac_cv_path_RM+:} false; then :
10338   $as_echo_n "(cached) " >&6
10339 else
10340   case $RM in
10341   [\\/]* | ?:[\\/]*)
10342   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10343   ;;
10344   *)
10345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10346 for as_dir in $PATH
10347 do
10348   IFS=$as_save_IFS
10349   test -z "$as_dir" && as_dir=.
10350     for ac_exec_ext in '' $ac_executable_extensions; do
10351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10352     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10354     break 2
10355   fi
10356 done
10357   done
10358 IFS=$as_save_IFS
10359 
10360   ;;
10361 esac
10362 fi
10363 RM=$ac_cv_path_RM
10364 if test -n "$RM"; then
10365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10366 $as_echo "$RM" >&6; }
10367 else
10368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369 $as_echo "no" >&6; }
10370 fi
10371 
10372 
10373   test -n "$RM" && break
10374 done
10375 
10376   else
10377     # The variable is set, but is it from the command line or the environment?
10378 
10379     # Try to remove the string !RM! from our list.
10380     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10381     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10382       # If it failed, the variable was not from the command line. Ignore it,
10383       # but warn the user (except for BASH, which is always set by the calling BASH).
10384       if test "xRM" != xBASH; then
10385         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10386 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10387       fi
10388       # Try to locate tool using the code snippet
10389       for ac_prog in rm
10390 do
10391   # Extract the first word of "$ac_prog", so it can be a program name with args.
10392 set dummy $ac_prog; ac_word=$2
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394 $as_echo_n "checking for $ac_word... " >&6; }
10395 if ${ac_cv_path_RM+:} false; then :
10396   $as_echo_n "(cached) " >&6
10397 else
10398   case $RM in
10399   [\\/]* | ?:[\\/]*)
10400   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10401   ;;
10402   *)
10403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404 for as_dir in $PATH
10405 do
10406   IFS=$as_save_IFS
10407   test -z "$as_dir" && as_dir=.
10408     for ac_exec_ext in '' $ac_executable_extensions; do
10409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10410     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412     break 2
10413   fi
10414 done
10415   done
10416 IFS=$as_save_IFS
10417 
10418   ;;
10419 esac
10420 fi
10421 RM=$ac_cv_path_RM
10422 if test -n "$RM"; then
10423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10424 $as_echo "$RM" >&6; }
10425 else
10426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427 $as_echo "no" >&6; }
10428 fi
10429 
10430 
10431   test -n "$RM" && break
10432 done
10433 
10434     else
10435       # If it succeeded, then it was overridden by the user. We will use it
10436       # for the tool.
10437 
10438       # First remove it from the list of overridden variables, so we can test
10439       # for unknown variables in the end.
10440       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10441 
10442       # Check if we try to supply an empty value
10443       if test "x$RM" = x; then
10444         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10445 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10446         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10447 $as_echo_n "checking for RM... " >&6; }
10448         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10449 $as_echo "disabled" >&6; }
10450       else
10451         # Check if the provided tool contains a complete path.
10452         tool_specified="$RM"
10453         tool_basename="${tool_specified##*/}"
10454         if test "x$tool_basename" = "x$tool_specified"; then
10455           # A command without a complete path is provided, search $PATH.
10456           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10457 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10458           # Extract the first word of "$tool_basename", so it can be a program name with args.
10459 set dummy $tool_basename; ac_word=$2
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10461 $as_echo_n "checking for $ac_word... " >&6; }
10462 if ${ac_cv_path_RM+:} false; then :
10463   $as_echo_n "(cached) " >&6
10464 else
10465   case $RM in
10466   [\\/]* | ?:[\\/]*)
10467   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10468   ;;
10469   *)
10470   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10471 for as_dir in $PATH
10472 do
10473   IFS=$as_save_IFS
10474   test -z "$as_dir" && as_dir=.
10475     for ac_exec_ext in '' $ac_executable_extensions; do
10476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10477     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10479     break 2
10480   fi
10481 done
10482   done
10483 IFS=$as_save_IFS
10484 
10485   ;;
10486 esac
10487 fi
10488 RM=$ac_cv_path_RM
10489 if test -n "$RM"; then
10490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10491 $as_echo "$RM" >&6; }
10492 else
10493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10494 $as_echo "no" >&6; }
10495 fi
10496 
10497 
10498           if test "x$RM" = x; then
10499             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10500           fi
10501         else
10502           # Otherwise we believe it is a complete path. Use it as it is.
10503           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10504 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10505           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10506 $as_echo_n "checking for RM... " >&6; }
10507           if test ! -x "$tool_specified"; then
10508             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10509 $as_echo "not found" >&6; }
10510             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10511           fi
10512           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10513 $as_echo "$tool_specified" >&6; }
10514         fi
10515       fi
10516     fi
10517 
10518   fi
10519 
10520 
10521 
10522   if test "x$RM" = x; then
10523     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10524   fi
10525 
10526 
10527 
10528 
10529 
10530   # Publish this variable in the help.
10531 
10532 
10533   if [ -z "${RMDIR+x}" ]; then
10534     # The variable is not set by user, try to locate tool using the code snippet
10535     for ac_prog in rmdir
10536 do
10537   # Extract the first word of "$ac_prog", so it can be a program name with args.
10538 set dummy $ac_prog; ac_word=$2
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10540 $as_echo_n "checking for $ac_word... " >&6; }
10541 if ${ac_cv_path_RMDIR+:} false; then :
10542   $as_echo_n "(cached) " >&6
10543 else
10544   case $RMDIR in
10545   [\\/]* | ?:[\\/]*)
10546   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10547   ;;
10548   *)
10549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10550 for as_dir in $PATH
10551 do
10552   IFS=$as_save_IFS
10553   test -z "$as_dir" && as_dir=.
10554     for ac_exec_ext in '' $ac_executable_extensions; do
10555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10556     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10558     break 2
10559   fi
10560 done
10561   done
10562 IFS=$as_save_IFS
10563 
10564   ;;
10565 esac
10566 fi
10567 RMDIR=$ac_cv_path_RMDIR
10568 if test -n "$RMDIR"; then
10569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10570 $as_echo "$RMDIR" >&6; }
10571 else
10572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10573 $as_echo "no" >&6; }
10574 fi
10575 
10576 
10577   test -n "$RMDIR" && break
10578 done
10579 
10580   else
10581     # The variable is set, but is it from the command line or the environment?
10582 
10583     # Try to remove the string !RMDIR! from our list.
10584     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10585     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10586       # If it failed, the variable was not from the command line. Ignore it,
10587       # but warn the user (except for BASH, which is always set by the calling BASH).
10588       if test "xRMDIR" != xBASH; then
10589         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10590 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10591       fi
10592       # Try to locate tool using the code snippet
10593       for ac_prog in rmdir
10594 do
10595   # Extract the first word of "$ac_prog", so it can be a program name with args.
10596 set dummy $ac_prog; ac_word=$2
10597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10598 $as_echo_n "checking for $ac_word... " >&6; }
10599 if ${ac_cv_path_RMDIR+:} false; then :
10600   $as_echo_n "(cached) " >&6
10601 else
10602   case $RMDIR in
10603   [\\/]* | ?:[\\/]*)
10604   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10605   ;;
10606   *)
10607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608 for as_dir in $PATH
10609 do
10610   IFS=$as_save_IFS
10611   test -z "$as_dir" && as_dir=.
10612     for ac_exec_ext in '' $ac_executable_extensions; do
10613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10614     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10616     break 2
10617   fi
10618 done
10619   done
10620 IFS=$as_save_IFS
10621 
10622   ;;
10623 esac
10624 fi
10625 RMDIR=$ac_cv_path_RMDIR
10626 if test -n "$RMDIR"; then
10627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10628 $as_echo "$RMDIR" >&6; }
10629 else
10630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631 $as_echo "no" >&6; }
10632 fi
10633 
10634 
10635   test -n "$RMDIR" && break
10636 done
10637 
10638     else
10639       # If it succeeded, then it was overridden by the user. We will use it
10640       # for the tool.
10641 
10642       # First remove it from the list of overridden variables, so we can test
10643       # for unknown variables in the end.
10644       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10645 
10646       # Check if we try to supply an empty value
10647       if test "x$RMDIR" = x; then
10648         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10649 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10650         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10651 $as_echo_n "checking for RMDIR... " >&6; }
10652         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10653 $as_echo "disabled" >&6; }
10654       else
10655         # Check if the provided tool contains a complete path.
10656         tool_specified="$RMDIR"
10657         tool_basename="${tool_specified##*/}"
10658         if test "x$tool_basename" = "x$tool_specified"; then
10659           # A command without a complete path is provided, search $PATH.
10660           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10661 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10662           # Extract the first word of "$tool_basename", so it can be a program name with args.
10663 set dummy $tool_basename; ac_word=$2
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665 $as_echo_n "checking for $ac_word... " >&6; }
10666 if ${ac_cv_path_RMDIR+:} false; then :
10667   $as_echo_n "(cached) " >&6
10668 else
10669   case $RMDIR in
10670   [\\/]* | ?:[\\/]*)
10671   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10672   ;;
10673   *)
10674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675 for as_dir in $PATH
10676 do
10677   IFS=$as_save_IFS
10678   test -z "$as_dir" && as_dir=.
10679     for ac_exec_ext in '' $ac_executable_extensions; do
10680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10681     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683     break 2
10684   fi
10685 done
10686   done
10687 IFS=$as_save_IFS
10688 
10689   ;;
10690 esac
10691 fi
10692 RMDIR=$ac_cv_path_RMDIR
10693 if test -n "$RMDIR"; then
10694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10695 $as_echo "$RMDIR" >&6; }
10696 else
10697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698 $as_echo "no" >&6; }
10699 fi
10700 
10701 
10702           if test "x$RMDIR" = x; then
10703             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10704           fi
10705         else
10706           # Otherwise we believe it is a complete path. Use it as it is.
10707           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10708 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10709           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10710 $as_echo_n "checking for RMDIR... " >&6; }
10711           if test ! -x "$tool_specified"; then
10712             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10713 $as_echo "not found" >&6; }
10714             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10715           fi
10716           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10717 $as_echo "$tool_specified" >&6; }
10718         fi
10719       fi
10720     fi
10721 
10722   fi
10723 
10724 
10725 
10726   if test "x$RMDIR" = x; then
10727     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10728   fi
10729 
10730 
10731 
10732 
10733 
10734   # Publish this variable in the help.
10735 
10736 
10737   if [ -z "${SH+x}" ]; then
10738     # The variable is not set by user, try to locate tool using the code snippet
10739     for ac_prog in sh
10740 do
10741   # Extract the first word of "$ac_prog", so it can be a program name with args.
10742 set dummy $ac_prog; ac_word=$2
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10744 $as_echo_n "checking for $ac_word... " >&6; }
10745 if ${ac_cv_path_SH+:} false; then :
10746   $as_echo_n "(cached) " >&6
10747 else
10748   case $SH in
10749   [\\/]* | ?:[\\/]*)
10750   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10751   ;;
10752   *)
10753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10754 for as_dir in $PATH
10755 do
10756   IFS=$as_save_IFS
10757   test -z "$as_dir" && as_dir=.
10758     for ac_exec_ext in '' $ac_executable_extensions; do
10759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10760     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10762     break 2
10763   fi
10764 done
10765   done
10766 IFS=$as_save_IFS
10767 
10768   ;;
10769 esac
10770 fi
10771 SH=$ac_cv_path_SH
10772 if test -n "$SH"; then
10773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10774 $as_echo "$SH" >&6; }
10775 else
10776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777 $as_echo "no" >&6; }
10778 fi
10779 
10780 
10781   test -n "$SH" && break
10782 done
10783 
10784   else
10785     # The variable is set, but is it from the command line or the environment?
10786 
10787     # Try to remove the string !SH! from our list.
10788     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10789     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10790       # If it failed, the variable was not from the command line. Ignore it,
10791       # but warn the user (except for BASH, which is always set by the calling BASH).
10792       if test "xSH" != xBASH; then
10793         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10794 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10795       fi
10796       # Try to locate tool using the code snippet
10797       for ac_prog in sh
10798 do
10799   # Extract the first word of "$ac_prog", so it can be a program name with args.
10800 set dummy $ac_prog; ac_word=$2
10801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802 $as_echo_n "checking for $ac_word... " >&6; }
10803 if ${ac_cv_path_SH+:} false; then :
10804   $as_echo_n "(cached) " >&6
10805 else
10806   case $SH in
10807   [\\/]* | ?:[\\/]*)
10808   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10809   ;;
10810   *)
10811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812 for as_dir in $PATH
10813 do
10814   IFS=$as_save_IFS
10815   test -z "$as_dir" && as_dir=.
10816     for ac_exec_ext in '' $ac_executable_extensions; do
10817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820     break 2
10821   fi
10822 done
10823   done
10824 IFS=$as_save_IFS
10825 
10826   ;;
10827 esac
10828 fi
10829 SH=$ac_cv_path_SH
10830 if test -n "$SH"; then
10831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10832 $as_echo "$SH" >&6; }
10833 else
10834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835 $as_echo "no" >&6; }
10836 fi
10837 
10838 
10839   test -n "$SH" && break
10840 done
10841 
10842     else
10843       # If it succeeded, then it was overridden by the user. We will use it
10844       # for the tool.
10845 
10846       # First remove it from the list of overridden variables, so we can test
10847       # for unknown variables in the end.
10848       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10849 
10850       # Check if we try to supply an empty value
10851       if test "x$SH" = x; then
10852         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10853 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10854         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10855 $as_echo_n "checking for SH... " >&6; }
10856         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10857 $as_echo "disabled" >&6; }
10858       else
10859         # Check if the provided tool contains a complete path.
10860         tool_specified="$SH"
10861         tool_basename="${tool_specified##*/}"
10862         if test "x$tool_basename" = "x$tool_specified"; then
10863           # A command without a complete path is provided, search $PATH.
10864           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10865 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10866           # Extract the first word of "$tool_basename", so it can be a program name with args.
10867 set dummy $tool_basename; ac_word=$2
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10869 $as_echo_n "checking for $ac_word... " >&6; }
10870 if ${ac_cv_path_SH+:} false; then :
10871   $as_echo_n "(cached) " >&6
10872 else
10873   case $SH in
10874   [\\/]* | ?:[\\/]*)
10875   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10876   ;;
10877   *)
10878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10879 for as_dir in $PATH
10880 do
10881   IFS=$as_save_IFS
10882   test -z "$as_dir" && as_dir=.
10883     for ac_exec_ext in '' $ac_executable_extensions; do
10884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10885     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10887     break 2
10888   fi
10889 done
10890   done
10891 IFS=$as_save_IFS
10892 
10893   ;;
10894 esac
10895 fi
10896 SH=$ac_cv_path_SH
10897 if test -n "$SH"; then
10898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10899 $as_echo "$SH" >&6; }
10900 else
10901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902 $as_echo "no" >&6; }
10903 fi
10904 
10905 
10906           if test "x$SH" = x; then
10907             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10908           fi
10909         else
10910           # Otherwise we believe it is a complete path. Use it as it is.
10911           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10912 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10913           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10914 $as_echo_n "checking for SH... " >&6; }
10915           if test ! -x "$tool_specified"; then
10916             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10917 $as_echo "not found" >&6; }
10918             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10919           fi
10920           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10921 $as_echo "$tool_specified" >&6; }
10922         fi
10923       fi
10924     fi
10925 
10926   fi
10927 
10928 
10929 
10930   if test "x$SH" = x; then
10931     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10932   fi
10933 
10934 
10935 
10936 
10937 
10938   # Publish this variable in the help.
10939 
10940 
10941   if [ -z "${SORT+x}" ]; then
10942     # The variable is not set by user, try to locate tool using the code snippet
10943     for ac_prog in sort
10944 do
10945   # Extract the first word of "$ac_prog", so it can be a program name with args.
10946 set dummy $ac_prog; ac_word=$2
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10948 $as_echo_n "checking for $ac_word... " >&6; }
10949 if ${ac_cv_path_SORT+:} false; then :
10950   $as_echo_n "(cached) " >&6
10951 else
10952   case $SORT in
10953   [\\/]* | ?:[\\/]*)
10954   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10955   ;;
10956   *)
10957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10958 for as_dir in $PATH
10959 do
10960   IFS=$as_save_IFS
10961   test -z "$as_dir" && as_dir=.
10962     for ac_exec_ext in '' $ac_executable_extensions; do
10963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10964     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10966     break 2
10967   fi
10968 done
10969   done
10970 IFS=$as_save_IFS
10971 
10972   ;;
10973 esac
10974 fi
10975 SORT=$ac_cv_path_SORT
10976 if test -n "$SORT"; then
10977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10978 $as_echo "$SORT" >&6; }
10979 else
10980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981 $as_echo "no" >&6; }
10982 fi
10983 
10984 
10985   test -n "$SORT" && break
10986 done
10987 
10988   else
10989     # The variable is set, but is it from the command line or the environment?
10990 
10991     # Try to remove the string !SORT! from our list.
10992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10994       # If it failed, the variable was not from the command line. Ignore it,
10995       # but warn the user (except for BASH, which is always set by the calling BASH).
10996       if test "xSORT" != xBASH; then
10997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10998 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10999       fi
11000       # Try to locate tool using the code snippet
11001       for ac_prog in sort
11002 do
11003   # Extract the first word of "$ac_prog", so it can be a program name with args.
11004 set dummy $ac_prog; ac_word=$2
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11006 $as_echo_n "checking for $ac_word... " >&6; }
11007 if ${ac_cv_path_SORT+:} false; then :
11008   $as_echo_n "(cached) " >&6
11009 else
11010   case $SORT in
11011   [\\/]* | ?:[\\/]*)
11012   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11013   ;;
11014   *)
11015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11016 for as_dir in $PATH
11017 do
11018   IFS=$as_save_IFS
11019   test -z "$as_dir" && as_dir=.
11020     for ac_exec_ext in '' $ac_executable_extensions; do
11021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11022     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11024     break 2
11025   fi
11026 done
11027   done
11028 IFS=$as_save_IFS
11029 
11030   ;;
11031 esac
11032 fi
11033 SORT=$ac_cv_path_SORT
11034 if test -n "$SORT"; then
11035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11036 $as_echo "$SORT" >&6; }
11037 else
11038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11039 $as_echo "no" >&6; }
11040 fi
11041 
11042 
11043   test -n "$SORT" && break
11044 done
11045 
11046     else
11047       # If it succeeded, then it was overridden by the user. We will use it
11048       # for the tool.
11049 
11050       # First remove it from the list of overridden variables, so we can test
11051       # for unknown variables in the end.
11052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11053 
11054       # Check if we try to supply an empty value
11055       if test "x$SORT" = x; then
11056         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11057 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11059 $as_echo_n "checking for SORT... " >&6; }
11060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11061 $as_echo "disabled" >&6; }
11062       else
11063         # Check if the provided tool contains a complete path.
11064         tool_specified="$SORT"
11065         tool_basename="${tool_specified##*/}"
11066         if test "x$tool_basename" = "x$tool_specified"; then
11067           # A command without a complete path is provided, search $PATH.
11068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11069 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11070           # Extract the first word of "$tool_basename", so it can be a program name with args.
11071 set dummy $tool_basename; ac_word=$2
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11073 $as_echo_n "checking for $ac_word... " >&6; }
11074 if ${ac_cv_path_SORT+:} false; then :
11075   $as_echo_n "(cached) " >&6
11076 else
11077   case $SORT in
11078   [\\/]* | ?:[\\/]*)
11079   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11080   ;;
11081   *)
11082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11083 for as_dir in $PATH
11084 do
11085   IFS=$as_save_IFS
11086   test -z "$as_dir" && as_dir=.
11087     for ac_exec_ext in '' $ac_executable_extensions; do
11088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11089     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11091     break 2
11092   fi
11093 done
11094   done
11095 IFS=$as_save_IFS
11096 
11097   ;;
11098 esac
11099 fi
11100 SORT=$ac_cv_path_SORT
11101 if test -n "$SORT"; then
11102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11103 $as_echo "$SORT" >&6; }
11104 else
11105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11106 $as_echo "no" >&6; }
11107 fi
11108 
11109 
11110           if test "x$SORT" = x; then
11111             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11112           fi
11113         else
11114           # Otherwise we believe it is a complete path. Use it as it is.
11115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11116 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11117           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11118 $as_echo_n "checking for SORT... " >&6; }
11119           if test ! -x "$tool_specified"; then
11120             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11121 $as_echo "not found" >&6; }
11122             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11123           fi
11124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11125 $as_echo "$tool_specified" >&6; }
11126         fi
11127       fi
11128     fi
11129 
11130   fi
11131 
11132 
11133 
11134   if test "x$SORT" = x; then
11135     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11136   fi
11137 
11138 
11139 
11140 
11141 
11142   # Publish this variable in the help.
11143 
11144 
11145   if [ -z "${TAIL+x}" ]; then
11146     # The variable is not set by user, try to locate tool using the code snippet
11147     for ac_prog in tail
11148 do
11149   # Extract the first word of "$ac_prog", so it can be a program name with args.
11150 set dummy $ac_prog; ac_word=$2
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11152 $as_echo_n "checking for $ac_word... " >&6; }
11153 if ${ac_cv_path_TAIL+:} false; then :
11154   $as_echo_n "(cached) " >&6
11155 else
11156   case $TAIL in
11157   [\\/]* | ?:[\\/]*)
11158   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11159   ;;
11160   *)
11161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11162 for as_dir in $PATH
11163 do
11164   IFS=$as_save_IFS
11165   test -z "$as_dir" && as_dir=.
11166     for ac_exec_ext in '' $ac_executable_extensions; do
11167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11168     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11170     break 2
11171   fi
11172 done
11173   done
11174 IFS=$as_save_IFS
11175 
11176   ;;
11177 esac
11178 fi
11179 TAIL=$ac_cv_path_TAIL
11180 if test -n "$TAIL"; then
11181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11182 $as_echo "$TAIL" >&6; }
11183 else
11184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11185 $as_echo "no" >&6; }
11186 fi
11187 
11188 
11189   test -n "$TAIL" && break
11190 done
11191 
11192   else
11193     # The variable is set, but is it from the command line or the environment?
11194 
11195     # Try to remove the string !TAIL! from our list.
11196     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11197     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11198       # If it failed, the variable was not from the command line. Ignore it,
11199       # but warn the user (except for BASH, which is always set by the calling BASH).
11200       if test "xTAIL" != xBASH; then
11201         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11202 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11203       fi
11204       # Try to locate tool using the code snippet
11205       for ac_prog in tail
11206 do
11207   # Extract the first word of "$ac_prog", so it can be a program name with args.
11208 set dummy $ac_prog; ac_word=$2
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210 $as_echo_n "checking for $ac_word... " >&6; }
11211 if ${ac_cv_path_TAIL+:} false; then :
11212   $as_echo_n "(cached) " >&6
11213 else
11214   case $TAIL in
11215   [\\/]* | ?:[\\/]*)
11216   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11217   ;;
11218   *)
11219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220 for as_dir in $PATH
11221 do
11222   IFS=$as_save_IFS
11223   test -z "$as_dir" && as_dir=.
11224     for ac_exec_ext in '' $ac_executable_extensions; do
11225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228     break 2
11229   fi
11230 done
11231   done
11232 IFS=$as_save_IFS
11233 
11234   ;;
11235 esac
11236 fi
11237 TAIL=$ac_cv_path_TAIL
11238 if test -n "$TAIL"; then
11239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11240 $as_echo "$TAIL" >&6; }
11241 else
11242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243 $as_echo "no" >&6; }
11244 fi
11245 
11246 
11247   test -n "$TAIL" && break
11248 done
11249 
11250     else
11251       # If it succeeded, then it was overridden by the user. We will use it
11252       # for the tool.
11253 
11254       # First remove it from the list of overridden variables, so we can test
11255       # for unknown variables in the end.
11256       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11257 
11258       # Check if we try to supply an empty value
11259       if test "x$TAIL" = x; then
11260         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11261 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11262         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11263 $as_echo_n "checking for TAIL... " >&6; }
11264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11265 $as_echo "disabled" >&6; }
11266       else
11267         # Check if the provided tool contains a complete path.
11268         tool_specified="$TAIL"
11269         tool_basename="${tool_specified##*/}"
11270         if test "x$tool_basename" = "x$tool_specified"; then
11271           # A command without a complete path is provided, search $PATH.
11272           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11273 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11274           # Extract the first word of "$tool_basename", so it can be a program name with args.
11275 set dummy $tool_basename; ac_word=$2
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11277 $as_echo_n "checking for $ac_word... " >&6; }
11278 if ${ac_cv_path_TAIL+:} false; then :
11279   $as_echo_n "(cached) " >&6
11280 else
11281   case $TAIL in
11282   [\\/]* | ?:[\\/]*)
11283   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11284   ;;
11285   *)
11286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11287 for as_dir in $PATH
11288 do
11289   IFS=$as_save_IFS
11290   test -z "$as_dir" && as_dir=.
11291     for ac_exec_ext in '' $ac_executable_extensions; do
11292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11293     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11295     break 2
11296   fi
11297 done
11298   done
11299 IFS=$as_save_IFS
11300 
11301   ;;
11302 esac
11303 fi
11304 TAIL=$ac_cv_path_TAIL
11305 if test -n "$TAIL"; then
11306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11307 $as_echo "$TAIL" >&6; }
11308 else
11309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11310 $as_echo "no" >&6; }
11311 fi
11312 
11313 
11314           if test "x$TAIL" = x; then
11315             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11316           fi
11317         else
11318           # Otherwise we believe it is a complete path. Use it as it is.
11319           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11320 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11321           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11322 $as_echo_n "checking for TAIL... " >&6; }
11323           if test ! -x "$tool_specified"; then
11324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11325 $as_echo "not found" >&6; }
11326             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11327           fi
11328           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11329 $as_echo "$tool_specified" >&6; }
11330         fi
11331       fi
11332     fi
11333 
11334   fi
11335 
11336 
11337 
11338   if test "x$TAIL" = x; then
11339     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11340   fi
11341 
11342 
11343 
11344 
11345 
11346   # Publish this variable in the help.
11347 
11348 
11349   if [ -z "${TAR+x}" ]; then
11350     # The variable is not set by user, try to locate tool using the code snippet
11351     for ac_prog in gtar tar
11352 do
11353   # Extract the first word of "$ac_prog", so it can be a program name with args.
11354 set dummy $ac_prog; ac_word=$2
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11356 $as_echo_n "checking for $ac_word... " >&6; }
11357 if ${ac_cv_path_TAR+:} false; then :
11358   $as_echo_n "(cached) " >&6
11359 else
11360   case $TAR in
11361   [\\/]* | ?:[\\/]*)
11362   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11363   ;;
11364   *)
11365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11366 for as_dir in $PATH
11367 do
11368   IFS=$as_save_IFS
11369   test -z "$as_dir" && as_dir=.
11370     for ac_exec_ext in '' $ac_executable_extensions; do
11371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11372     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11374     break 2
11375   fi
11376 done
11377   done
11378 IFS=$as_save_IFS
11379 
11380   ;;
11381 esac
11382 fi
11383 TAR=$ac_cv_path_TAR
11384 if test -n "$TAR"; then
11385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11386 $as_echo "$TAR" >&6; }
11387 else
11388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389 $as_echo "no" >&6; }
11390 fi
11391 
11392 
11393   test -n "$TAR" && break
11394 done
11395 
11396   else
11397     # The variable is set, but is it from the command line or the environment?
11398 
11399     # Try to remove the string !TAR! from our list.
11400     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11401     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11402       # If it failed, the variable was not from the command line. Ignore it,
11403       # but warn the user (except for BASH, which is always set by the calling BASH).
11404       if test "xTAR" != xBASH; then
11405         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11406 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11407       fi
11408       # Try to locate tool using the code snippet
11409       for ac_prog in gtar tar
11410 do
11411   # Extract the first word of "$ac_prog", so it can be a program name with args.
11412 set dummy $ac_prog; ac_word=$2
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11414 $as_echo_n "checking for $ac_word... " >&6; }
11415 if ${ac_cv_path_TAR+:} false; then :
11416   $as_echo_n "(cached) " >&6
11417 else
11418   case $TAR in
11419   [\\/]* | ?:[\\/]*)
11420   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11421   ;;
11422   *)
11423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11424 for as_dir in $PATH
11425 do
11426   IFS=$as_save_IFS
11427   test -z "$as_dir" && as_dir=.
11428     for ac_exec_ext in '' $ac_executable_extensions; do
11429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11430     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11432     break 2
11433   fi
11434 done
11435   done
11436 IFS=$as_save_IFS
11437 
11438   ;;
11439 esac
11440 fi
11441 TAR=$ac_cv_path_TAR
11442 if test -n "$TAR"; then
11443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11444 $as_echo "$TAR" >&6; }
11445 else
11446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447 $as_echo "no" >&6; }
11448 fi
11449 
11450 
11451   test -n "$TAR" && break
11452 done
11453 
11454     else
11455       # If it succeeded, then it was overridden by the user. We will use it
11456       # for the tool.
11457 
11458       # First remove it from the list of overridden variables, so we can test
11459       # for unknown variables in the end.
11460       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11461 
11462       # Check if we try to supply an empty value
11463       if test "x$TAR" = x; then
11464         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11465 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11466         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11467 $as_echo_n "checking for TAR... " >&6; }
11468         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11469 $as_echo "disabled" >&6; }
11470       else
11471         # Check if the provided tool contains a complete path.
11472         tool_specified="$TAR"
11473         tool_basename="${tool_specified##*/}"
11474         if test "x$tool_basename" = "x$tool_specified"; then
11475           # A command without a complete path is provided, search $PATH.
11476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11477 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11478           # Extract the first word of "$tool_basename", so it can be a program name with args.
11479 set dummy $tool_basename; ac_word=$2
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11481 $as_echo_n "checking for $ac_word... " >&6; }
11482 if ${ac_cv_path_TAR+:} false; then :
11483   $as_echo_n "(cached) " >&6
11484 else
11485   case $TAR in
11486   [\\/]* | ?:[\\/]*)
11487   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11488   ;;
11489   *)
11490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11491 for as_dir in $PATH
11492 do
11493   IFS=$as_save_IFS
11494   test -z "$as_dir" && as_dir=.
11495     for ac_exec_ext in '' $ac_executable_extensions; do
11496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11497     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11499     break 2
11500   fi
11501 done
11502   done
11503 IFS=$as_save_IFS
11504 
11505   ;;
11506 esac
11507 fi
11508 TAR=$ac_cv_path_TAR
11509 if test -n "$TAR"; then
11510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11511 $as_echo "$TAR" >&6; }
11512 else
11513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11514 $as_echo "no" >&6; }
11515 fi
11516 
11517 
11518           if test "x$TAR" = x; then
11519             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11520           fi
11521         else
11522           # Otherwise we believe it is a complete path. Use it as it is.
11523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11524 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11525           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11526 $as_echo_n "checking for TAR... " >&6; }
11527           if test ! -x "$tool_specified"; then
11528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11529 $as_echo "not found" >&6; }
11530             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11531           fi
11532           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11533 $as_echo "$tool_specified" >&6; }
11534         fi
11535       fi
11536     fi
11537 
11538   fi
11539 
11540 
11541 
11542   if test "x$TAR" = x; then
11543     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11544   fi
11545 
11546 
11547 
11548 
11549 
11550   # Publish this variable in the help.
11551 
11552 
11553   if [ -z "${TEE+x}" ]; then
11554     # The variable is not set by user, try to locate tool using the code snippet
11555     for ac_prog in tee
11556 do
11557   # Extract the first word of "$ac_prog", so it can be a program name with args.
11558 set dummy $ac_prog; ac_word=$2
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11560 $as_echo_n "checking for $ac_word... " >&6; }
11561 if ${ac_cv_path_TEE+:} false; then :
11562   $as_echo_n "(cached) " >&6
11563 else
11564   case $TEE in
11565   [\\/]* | ?:[\\/]*)
11566   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11567   ;;
11568   *)
11569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11570 for as_dir in $PATH
11571 do
11572   IFS=$as_save_IFS
11573   test -z "$as_dir" && as_dir=.
11574     for ac_exec_ext in '' $ac_executable_extensions; do
11575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11576     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11578     break 2
11579   fi
11580 done
11581   done
11582 IFS=$as_save_IFS
11583 
11584   ;;
11585 esac
11586 fi
11587 TEE=$ac_cv_path_TEE
11588 if test -n "$TEE"; then
11589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11590 $as_echo "$TEE" >&6; }
11591 else
11592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11593 $as_echo "no" >&6; }
11594 fi
11595 
11596 
11597   test -n "$TEE" && break
11598 done
11599 
11600   else
11601     # The variable is set, but is it from the command line or the environment?
11602 
11603     # Try to remove the string !TEE! from our list.
11604     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11605     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11606       # If it failed, the variable was not from the command line. Ignore it,
11607       # but warn the user (except for BASH, which is always set by the calling BASH).
11608       if test "xTEE" != xBASH; then
11609         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11610 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11611       fi
11612       # Try to locate tool using the code snippet
11613       for ac_prog in tee
11614 do
11615   # Extract the first word of "$ac_prog", so it can be a program name with args.
11616 set dummy $ac_prog; ac_word=$2
11617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11618 $as_echo_n "checking for $ac_word... " >&6; }
11619 if ${ac_cv_path_TEE+:} false; then :
11620   $as_echo_n "(cached) " >&6
11621 else
11622   case $TEE in
11623   [\\/]* | ?:[\\/]*)
11624   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11625   ;;
11626   *)
11627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628 for as_dir in $PATH
11629 do
11630   IFS=$as_save_IFS
11631   test -z "$as_dir" && as_dir=.
11632     for ac_exec_ext in '' $ac_executable_extensions; do
11633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11634     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11636     break 2
11637   fi
11638 done
11639   done
11640 IFS=$as_save_IFS
11641 
11642   ;;
11643 esac
11644 fi
11645 TEE=$ac_cv_path_TEE
11646 if test -n "$TEE"; then
11647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11648 $as_echo "$TEE" >&6; }
11649 else
11650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651 $as_echo "no" >&6; }
11652 fi
11653 
11654 
11655   test -n "$TEE" && break
11656 done
11657 
11658     else
11659       # If it succeeded, then it was overridden by the user. We will use it
11660       # for the tool.
11661 
11662       # First remove it from the list of overridden variables, so we can test
11663       # for unknown variables in the end.
11664       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11665 
11666       # Check if we try to supply an empty value
11667       if test "x$TEE" = x; then
11668         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11669 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11670         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11671 $as_echo_n "checking for TEE... " >&6; }
11672         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11673 $as_echo "disabled" >&6; }
11674       else
11675         # Check if the provided tool contains a complete path.
11676         tool_specified="$TEE"
11677         tool_basename="${tool_specified##*/}"
11678         if test "x$tool_basename" = "x$tool_specified"; then
11679           # A command without a complete path is provided, search $PATH.
11680           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11681 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11682           # Extract the first word of "$tool_basename", so it can be a program name with args.
11683 set dummy $tool_basename; ac_word=$2
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11685 $as_echo_n "checking for $ac_word... " >&6; }
11686 if ${ac_cv_path_TEE+:} false; then :
11687   $as_echo_n "(cached) " >&6
11688 else
11689   case $TEE in
11690   [\\/]* | ?:[\\/]*)
11691   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11692   ;;
11693   *)
11694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11695 for as_dir in $PATH
11696 do
11697   IFS=$as_save_IFS
11698   test -z "$as_dir" && as_dir=.
11699     for ac_exec_ext in '' $ac_executable_extensions; do
11700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11701     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11703     break 2
11704   fi
11705 done
11706   done
11707 IFS=$as_save_IFS
11708 
11709   ;;
11710 esac
11711 fi
11712 TEE=$ac_cv_path_TEE
11713 if test -n "$TEE"; then
11714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11715 $as_echo "$TEE" >&6; }
11716 else
11717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11718 $as_echo "no" >&6; }
11719 fi
11720 
11721 
11722           if test "x$TEE" = x; then
11723             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11724           fi
11725         else
11726           # Otherwise we believe it is a complete path. Use it as it is.
11727           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11728 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11729           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11730 $as_echo_n "checking for TEE... " >&6; }
11731           if test ! -x "$tool_specified"; then
11732             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11733 $as_echo "not found" >&6; }
11734             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11735           fi
11736           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11737 $as_echo "$tool_specified" >&6; }
11738         fi
11739       fi
11740     fi
11741 
11742   fi
11743 
11744 
11745 
11746   if test "x$TEE" = x; then
11747     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11748   fi
11749 
11750 
11751 
11752 
11753 
11754   # Publish this variable in the help.
11755 
11756 
11757   if [ -z "${TOUCH+x}" ]; then
11758     # The variable is not set by user, try to locate tool using the code snippet
11759     for ac_prog in touch
11760 do
11761   # Extract the first word of "$ac_prog", so it can be a program name with args.
11762 set dummy $ac_prog; ac_word=$2
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11764 $as_echo_n "checking for $ac_word... " >&6; }
11765 if ${ac_cv_path_TOUCH+:} false; then :
11766   $as_echo_n "(cached) " >&6
11767 else
11768   case $TOUCH in
11769   [\\/]* | ?:[\\/]*)
11770   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11771   ;;
11772   *)
11773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11774 for as_dir in $PATH
11775 do
11776   IFS=$as_save_IFS
11777   test -z "$as_dir" && as_dir=.
11778     for ac_exec_ext in '' $ac_executable_extensions; do
11779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11780     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11782     break 2
11783   fi
11784 done
11785   done
11786 IFS=$as_save_IFS
11787 
11788   ;;
11789 esac
11790 fi
11791 TOUCH=$ac_cv_path_TOUCH
11792 if test -n "$TOUCH"; then
11793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11794 $as_echo "$TOUCH" >&6; }
11795 else
11796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11797 $as_echo "no" >&6; }
11798 fi
11799 
11800 
11801   test -n "$TOUCH" && break
11802 done
11803 
11804   else
11805     # The variable is set, but is it from the command line or the environment?
11806 
11807     # Try to remove the string !TOUCH! from our list.
11808     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11809     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11810       # If it failed, the variable was not from the command line. Ignore it,
11811       # but warn the user (except for BASH, which is always set by the calling BASH).
11812       if test "xTOUCH" != xBASH; then
11813         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11814 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11815       fi
11816       # Try to locate tool using the code snippet
11817       for ac_prog in touch
11818 do
11819   # Extract the first word of "$ac_prog", so it can be a program name with args.
11820 set dummy $ac_prog; ac_word=$2
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822 $as_echo_n "checking for $ac_word... " >&6; }
11823 if ${ac_cv_path_TOUCH+:} false; then :
11824   $as_echo_n "(cached) " >&6
11825 else
11826   case $TOUCH in
11827   [\\/]* | ?:[\\/]*)
11828   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11829   ;;
11830   *)
11831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11832 for as_dir in $PATH
11833 do
11834   IFS=$as_save_IFS
11835   test -z "$as_dir" && as_dir=.
11836     for ac_exec_ext in '' $ac_executable_extensions; do
11837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11838     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11840     break 2
11841   fi
11842 done
11843   done
11844 IFS=$as_save_IFS
11845 
11846   ;;
11847 esac
11848 fi
11849 TOUCH=$ac_cv_path_TOUCH
11850 if test -n "$TOUCH"; then
11851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11852 $as_echo "$TOUCH" >&6; }
11853 else
11854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855 $as_echo "no" >&6; }
11856 fi
11857 
11858 
11859   test -n "$TOUCH" && break
11860 done
11861 
11862     else
11863       # If it succeeded, then it was overridden by the user. We will use it
11864       # for the tool.
11865 
11866       # First remove it from the list of overridden variables, so we can test
11867       # for unknown variables in the end.
11868       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11869 
11870       # Check if we try to supply an empty value
11871       if test "x$TOUCH" = x; then
11872         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11873 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11874         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11875 $as_echo_n "checking for TOUCH... " >&6; }
11876         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11877 $as_echo "disabled" >&6; }
11878       else
11879         # Check if the provided tool contains a complete path.
11880         tool_specified="$TOUCH"
11881         tool_basename="${tool_specified##*/}"
11882         if test "x$tool_basename" = "x$tool_specified"; then
11883           # A command without a complete path is provided, search $PATH.
11884           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11885 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11886           # Extract the first word of "$tool_basename", so it can be a program name with args.
11887 set dummy $tool_basename; ac_word=$2
11888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11889 $as_echo_n "checking for $ac_word... " >&6; }
11890 if ${ac_cv_path_TOUCH+:} false; then :
11891   $as_echo_n "(cached) " >&6
11892 else
11893   case $TOUCH in
11894   [\\/]* | ?:[\\/]*)
11895   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11896   ;;
11897   *)
11898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11899 for as_dir in $PATH
11900 do
11901   IFS=$as_save_IFS
11902   test -z "$as_dir" && as_dir=.
11903     for ac_exec_ext in '' $ac_executable_extensions; do
11904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11905     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11907     break 2
11908   fi
11909 done
11910   done
11911 IFS=$as_save_IFS
11912 
11913   ;;
11914 esac
11915 fi
11916 TOUCH=$ac_cv_path_TOUCH
11917 if test -n "$TOUCH"; then
11918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11919 $as_echo "$TOUCH" >&6; }
11920 else
11921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11922 $as_echo "no" >&6; }
11923 fi
11924 
11925 
11926           if test "x$TOUCH" = x; then
11927             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11928           fi
11929         else
11930           # Otherwise we believe it is a complete path. Use it as it is.
11931           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11932 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11933           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11934 $as_echo_n "checking for TOUCH... " >&6; }
11935           if test ! -x "$tool_specified"; then
11936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11937 $as_echo "not found" >&6; }
11938             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11939           fi
11940           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11941 $as_echo "$tool_specified" >&6; }
11942         fi
11943       fi
11944     fi
11945 
11946   fi
11947 
11948 
11949 
11950   if test "x$TOUCH" = x; then
11951     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11952   fi
11953 
11954 
11955 
11956 
11957 
11958   # Publish this variable in the help.
11959 
11960 
11961   if [ -z "${TR+x}" ]; then
11962     # The variable is not set by user, try to locate tool using the code snippet
11963     for ac_prog in tr
11964 do
11965   # Extract the first word of "$ac_prog", so it can be a program name with args.
11966 set dummy $ac_prog; ac_word=$2
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11968 $as_echo_n "checking for $ac_word... " >&6; }
11969 if ${ac_cv_path_TR+:} false; then :
11970   $as_echo_n "(cached) " >&6
11971 else
11972   case $TR in
11973   [\\/]* | ?:[\\/]*)
11974   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11975   ;;
11976   *)
11977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11978 for as_dir in $PATH
11979 do
11980   IFS=$as_save_IFS
11981   test -z "$as_dir" && as_dir=.
11982     for ac_exec_ext in '' $ac_executable_extensions; do
11983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11984     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11986     break 2
11987   fi
11988 done
11989   done
11990 IFS=$as_save_IFS
11991 
11992   ;;
11993 esac
11994 fi
11995 TR=$ac_cv_path_TR
11996 if test -n "$TR"; then
11997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11998 $as_echo "$TR" >&6; }
11999 else
12000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12001 $as_echo "no" >&6; }
12002 fi
12003 
12004 
12005   test -n "$TR" && break
12006 done
12007 
12008   else
12009     # The variable is set, but is it from the command line or the environment?
12010 
12011     # Try to remove the string !TR! from our list.
12012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12014       # If it failed, the variable was not from the command line. Ignore it,
12015       # but warn the user (except for BASH, which is always set by the calling BASH).
12016       if test "xTR" != xBASH; then
12017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12018 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12019       fi
12020       # Try to locate tool using the code snippet
12021       for ac_prog in tr
12022 do
12023   # Extract the first word of "$ac_prog", so it can be a program name with args.
12024 set dummy $ac_prog; ac_word=$2
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026 $as_echo_n "checking for $ac_word... " >&6; }
12027 if ${ac_cv_path_TR+:} false; then :
12028   $as_echo_n "(cached) " >&6
12029 else
12030   case $TR in
12031   [\\/]* | ?:[\\/]*)
12032   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12033   ;;
12034   *)
12035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036 for as_dir in $PATH
12037 do
12038   IFS=$as_save_IFS
12039   test -z "$as_dir" && as_dir=.
12040     for ac_exec_ext in '' $ac_executable_extensions; do
12041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044     break 2
12045   fi
12046 done
12047   done
12048 IFS=$as_save_IFS
12049 
12050   ;;
12051 esac
12052 fi
12053 TR=$ac_cv_path_TR
12054 if test -n "$TR"; then
12055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12056 $as_echo "$TR" >&6; }
12057 else
12058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059 $as_echo "no" >&6; }
12060 fi
12061 
12062 
12063   test -n "$TR" && break
12064 done
12065 
12066     else
12067       # If it succeeded, then it was overridden by the user. We will use it
12068       # for the tool.
12069 
12070       # First remove it from the list of overridden variables, so we can test
12071       # for unknown variables in the end.
12072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12073 
12074       # Check if we try to supply an empty value
12075       if test "x$TR" = x; then
12076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12077 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12079 $as_echo_n "checking for TR... " >&6; }
12080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12081 $as_echo "disabled" >&6; }
12082       else
12083         # Check if the provided tool contains a complete path.
12084         tool_specified="$TR"
12085         tool_basename="${tool_specified##*/}"
12086         if test "x$tool_basename" = "x$tool_specified"; then
12087           # A command without a complete path is provided, search $PATH.
12088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12089 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12090           # Extract the first word of "$tool_basename", so it can be a program name with args.
12091 set dummy $tool_basename; ac_word=$2
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12093 $as_echo_n "checking for $ac_word... " >&6; }
12094 if ${ac_cv_path_TR+:} false; then :
12095   $as_echo_n "(cached) " >&6
12096 else
12097   case $TR in
12098   [\\/]* | ?:[\\/]*)
12099   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12100   ;;
12101   *)
12102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12103 for as_dir in $PATH
12104 do
12105   IFS=$as_save_IFS
12106   test -z "$as_dir" && as_dir=.
12107     for ac_exec_ext in '' $ac_executable_extensions; do
12108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12109     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12111     break 2
12112   fi
12113 done
12114   done
12115 IFS=$as_save_IFS
12116 
12117   ;;
12118 esac
12119 fi
12120 TR=$ac_cv_path_TR
12121 if test -n "$TR"; then
12122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12123 $as_echo "$TR" >&6; }
12124 else
12125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12126 $as_echo "no" >&6; }
12127 fi
12128 
12129 
12130           if test "x$TR" = x; then
12131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12132           fi
12133         else
12134           # Otherwise we believe it is a complete path. Use it as it is.
12135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12136 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12138 $as_echo_n "checking for TR... " >&6; }
12139           if test ! -x "$tool_specified"; then
12140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12141 $as_echo "not found" >&6; }
12142             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12143           fi
12144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12145 $as_echo "$tool_specified" >&6; }
12146         fi
12147       fi
12148     fi
12149 
12150   fi
12151 
12152 
12153 
12154   if test "x$TR" = x; then
12155     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12156   fi
12157 
12158 
12159 
12160 
12161 
12162   # Publish this variable in the help.
12163 
12164 
12165   if [ -z "${UNAME+x}" ]; then
12166     # The variable is not set by user, try to locate tool using the code snippet
12167     for ac_prog in uname
12168 do
12169   # Extract the first word of "$ac_prog", so it can be a program name with args.
12170 set dummy $ac_prog; ac_word=$2
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12172 $as_echo_n "checking for $ac_word... " >&6; }
12173 if ${ac_cv_path_UNAME+:} false; then :
12174   $as_echo_n "(cached) " >&6
12175 else
12176   case $UNAME in
12177   [\\/]* | ?:[\\/]*)
12178   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12179   ;;
12180   *)
12181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12182 for as_dir in $PATH
12183 do
12184   IFS=$as_save_IFS
12185   test -z "$as_dir" && as_dir=.
12186     for ac_exec_ext in '' $ac_executable_extensions; do
12187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12188     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12190     break 2
12191   fi
12192 done
12193   done
12194 IFS=$as_save_IFS
12195 
12196   ;;
12197 esac
12198 fi
12199 UNAME=$ac_cv_path_UNAME
12200 if test -n "$UNAME"; then
12201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12202 $as_echo "$UNAME" >&6; }
12203 else
12204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12205 $as_echo "no" >&6; }
12206 fi
12207 
12208 
12209   test -n "$UNAME" && break
12210 done
12211 
12212   else
12213     # The variable is set, but is it from the command line or the environment?
12214 
12215     # Try to remove the string !UNAME! from our list.
12216     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12217     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12218       # If it failed, the variable was not from the command line. Ignore it,
12219       # but warn the user (except for BASH, which is always set by the calling BASH).
12220       if test "xUNAME" != xBASH; then
12221         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12222 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12223       fi
12224       # Try to locate tool using the code snippet
12225       for ac_prog in uname
12226 do
12227   # Extract the first word of "$ac_prog", so it can be a program name with args.
12228 set dummy $ac_prog; ac_word=$2
12229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12230 $as_echo_n "checking for $ac_word... " >&6; }
12231 if ${ac_cv_path_UNAME+:} false; then :
12232   $as_echo_n "(cached) " >&6
12233 else
12234   case $UNAME in
12235   [\\/]* | ?:[\\/]*)
12236   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12237   ;;
12238   *)
12239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12240 for as_dir in $PATH
12241 do
12242   IFS=$as_save_IFS
12243   test -z "$as_dir" && as_dir=.
12244     for ac_exec_ext in '' $ac_executable_extensions; do
12245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12246     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12248     break 2
12249   fi
12250 done
12251   done
12252 IFS=$as_save_IFS
12253 
12254   ;;
12255 esac
12256 fi
12257 UNAME=$ac_cv_path_UNAME
12258 if test -n "$UNAME"; then
12259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12260 $as_echo "$UNAME" >&6; }
12261 else
12262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12263 $as_echo "no" >&6; }
12264 fi
12265 
12266 
12267   test -n "$UNAME" && break
12268 done
12269 
12270     else
12271       # If it succeeded, then it was overridden by the user. We will use it
12272       # for the tool.
12273 
12274       # First remove it from the list of overridden variables, so we can test
12275       # for unknown variables in the end.
12276       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12277 
12278       # Check if we try to supply an empty value
12279       if test "x$UNAME" = x; then
12280         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12281 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12282         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12283 $as_echo_n "checking for UNAME... " >&6; }
12284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12285 $as_echo "disabled" >&6; }
12286       else
12287         # Check if the provided tool contains a complete path.
12288         tool_specified="$UNAME"
12289         tool_basename="${tool_specified##*/}"
12290         if test "x$tool_basename" = "x$tool_specified"; then
12291           # A command without a complete path is provided, search $PATH.
12292           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12293 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12294           # Extract the first word of "$tool_basename", so it can be a program name with args.
12295 set dummy $tool_basename; ac_word=$2
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12297 $as_echo_n "checking for $ac_word... " >&6; }
12298 if ${ac_cv_path_UNAME+:} false; then :
12299   $as_echo_n "(cached) " >&6
12300 else
12301   case $UNAME in
12302   [\\/]* | ?:[\\/]*)
12303   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12304   ;;
12305   *)
12306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12307 for as_dir in $PATH
12308 do
12309   IFS=$as_save_IFS
12310   test -z "$as_dir" && as_dir=.
12311     for ac_exec_ext in '' $ac_executable_extensions; do
12312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12313     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12315     break 2
12316   fi
12317 done
12318   done
12319 IFS=$as_save_IFS
12320 
12321   ;;
12322 esac
12323 fi
12324 UNAME=$ac_cv_path_UNAME
12325 if test -n "$UNAME"; then
12326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12327 $as_echo "$UNAME" >&6; }
12328 else
12329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12330 $as_echo "no" >&6; }
12331 fi
12332 
12333 
12334           if test "x$UNAME" = x; then
12335             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12336           fi
12337         else
12338           # Otherwise we believe it is a complete path. Use it as it is.
12339           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12340 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12341           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12342 $as_echo_n "checking for UNAME... " >&6; }
12343           if test ! -x "$tool_specified"; then
12344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12345 $as_echo "not found" >&6; }
12346             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12347           fi
12348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12349 $as_echo "$tool_specified" >&6; }
12350         fi
12351       fi
12352     fi
12353 
12354   fi
12355 
12356 
12357 
12358   if test "x$UNAME" = x; then
12359     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12360   fi
12361 
12362 
12363 
12364 
12365 
12366   # Publish this variable in the help.
12367 
12368 
12369   if [ -z "${UNIQ+x}" ]; then
12370     # The variable is not set by user, try to locate tool using the code snippet
12371     for ac_prog in uniq
12372 do
12373   # Extract the first word of "$ac_prog", so it can be a program name with args.
12374 set dummy $ac_prog; ac_word=$2
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12376 $as_echo_n "checking for $ac_word... " >&6; }
12377 if ${ac_cv_path_UNIQ+:} false; then :
12378   $as_echo_n "(cached) " >&6
12379 else
12380   case $UNIQ in
12381   [\\/]* | ?:[\\/]*)
12382   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12383   ;;
12384   *)
12385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12386 for as_dir in $PATH
12387 do
12388   IFS=$as_save_IFS
12389   test -z "$as_dir" && as_dir=.
12390     for ac_exec_ext in '' $ac_executable_extensions; do
12391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12392     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12394     break 2
12395   fi
12396 done
12397   done
12398 IFS=$as_save_IFS
12399 
12400   ;;
12401 esac
12402 fi
12403 UNIQ=$ac_cv_path_UNIQ
12404 if test -n "$UNIQ"; then
12405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12406 $as_echo "$UNIQ" >&6; }
12407 else
12408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12409 $as_echo "no" >&6; }
12410 fi
12411 
12412 
12413   test -n "$UNIQ" && break
12414 done
12415 
12416   else
12417     # The variable is set, but is it from the command line or the environment?
12418 
12419     # Try to remove the string !UNIQ! from our list.
12420     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12421     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12422       # If it failed, the variable was not from the command line. Ignore it,
12423       # but warn the user (except for BASH, which is always set by the calling BASH).
12424       if test "xUNIQ" != xBASH; then
12425         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12426 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12427       fi
12428       # Try to locate tool using the code snippet
12429       for ac_prog in uniq
12430 do
12431   # Extract the first word of "$ac_prog", so it can be a program name with args.
12432 set dummy $ac_prog; ac_word=$2
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12434 $as_echo_n "checking for $ac_word... " >&6; }
12435 if ${ac_cv_path_UNIQ+:} false; then :
12436   $as_echo_n "(cached) " >&6
12437 else
12438   case $UNIQ in
12439   [\\/]* | ?:[\\/]*)
12440   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12441   ;;
12442   *)
12443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12444 for as_dir in $PATH
12445 do
12446   IFS=$as_save_IFS
12447   test -z "$as_dir" && as_dir=.
12448     for ac_exec_ext in '' $ac_executable_extensions; do
12449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12450     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12452     break 2
12453   fi
12454 done
12455   done
12456 IFS=$as_save_IFS
12457 
12458   ;;
12459 esac
12460 fi
12461 UNIQ=$ac_cv_path_UNIQ
12462 if test -n "$UNIQ"; then
12463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12464 $as_echo "$UNIQ" >&6; }
12465 else
12466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12467 $as_echo "no" >&6; }
12468 fi
12469 
12470 
12471   test -n "$UNIQ" && break
12472 done
12473 
12474     else
12475       # If it succeeded, then it was overridden by the user. We will use it
12476       # for the tool.
12477 
12478       # First remove it from the list of overridden variables, so we can test
12479       # for unknown variables in the end.
12480       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12481 
12482       # Check if we try to supply an empty value
12483       if test "x$UNIQ" = x; then
12484         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12485 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12486         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12487 $as_echo_n "checking for UNIQ... " >&6; }
12488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12489 $as_echo "disabled" >&6; }
12490       else
12491         # Check if the provided tool contains a complete path.
12492         tool_specified="$UNIQ"
12493         tool_basename="${tool_specified##*/}"
12494         if test "x$tool_basename" = "x$tool_specified"; then
12495           # A command without a complete path is provided, search $PATH.
12496           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12497 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12498           # Extract the first word of "$tool_basename", so it can be a program name with args.
12499 set dummy $tool_basename; ac_word=$2
12500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12501 $as_echo_n "checking for $ac_word... " >&6; }
12502 if ${ac_cv_path_UNIQ+:} false; then :
12503   $as_echo_n "(cached) " >&6
12504 else
12505   case $UNIQ in
12506   [\\/]* | ?:[\\/]*)
12507   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12508   ;;
12509   *)
12510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12511 for as_dir in $PATH
12512 do
12513   IFS=$as_save_IFS
12514   test -z "$as_dir" && as_dir=.
12515     for ac_exec_ext in '' $ac_executable_extensions; do
12516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12517     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12519     break 2
12520   fi
12521 done
12522   done
12523 IFS=$as_save_IFS
12524 
12525   ;;
12526 esac
12527 fi
12528 UNIQ=$ac_cv_path_UNIQ
12529 if test -n "$UNIQ"; then
12530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12531 $as_echo "$UNIQ" >&6; }
12532 else
12533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12534 $as_echo "no" >&6; }
12535 fi
12536 
12537 
12538           if test "x$UNIQ" = x; then
12539             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12540           fi
12541         else
12542           # Otherwise we believe it is a complete path. Use it as it is.
12543           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12544 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12545           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12546 $as_echo_n "checking for UNIQ... " >&6; }
12547           if test ! -x "$tool_specified"; then
12548             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12549 $as_echo "not found" >&6; }
12550             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12551           fi
12552           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12553 $as_echo "$tool_specified" >&6; }
12554         fi
12555       fi
12556     fi
12557 
12558   fi
12559 
12560 
12561 
12562   if test "x$UNIQ" = x; then
12563     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12564   fi
12565 
12566 
12567 
12568 
12569 
12570   # Publish this variable in the help.
12571 
12572 
12573   if [ -z "${WC+x}" ]; then
12574     # The variable is not set by user, try to locate tool using the code snippet
12575     for ac_prog in wc
12576 do
12577   # Extract the first word of "$ac_prog", so it can be a program name with args.
12578 set dummy $ac_prog; ac_word=$2
12579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12580 $as_echo_n "checking for $ac_word... " >&6; }
12581 if ${ac_cv_path_WC+:} false; then :
12582   $as_echo_n "(cached) " >&6
12583 else
12584   case $WC in
12585   [\\/]* | ?:[\\/]*)
12586   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12587   ;;
12588   *)
12589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12590 for as_dir in $PATH
12591 do
12592   IFS=$as_save_IFS
12593   test -z "$as_dir" && as_dir=.
12594     for ac_exec_ext in '' $ac_executable_extensions; do
12595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12596     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12598     break 2
12599   fi
12600 done
12601   done
12602 IFS=$as_save_IFS
12603 
12604   ;;
12605 esac
12606 fi
12607 WC=$ac_cv_path_WC
12608 if test -n "$WC"; then
12609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12610 $as_echo "$WC" >&6; }
12611 else
12612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12613 $as_echo "no" >&6; }
12614 fi
12615 
12616 
12617   test -n "$WC" && break
12618 done
12619 
12620   else
12621     # The variable is set, but is it from the command line or the environment?
12622 
12623     # Try to remove the string !WC! from our list.
12624     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12625     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12626       # If it failed, the variable was not from the command line. Ignore it,
12627       # but warn the user (except for BASH, which is always set by the calling BASH).
12628       if test "xWC" != xBASH; then
12629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12630 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12631       fi
12632       # Try to locate tool using the code snippet
12633       for ac_prog in wc
12634 do
12635   # Extract the first word of "$ac_prog", so it can be a program name with args.
12636 set dummy $ac_prog; ac_word=$2
12637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12638 $as_echo_n "checking for $ac_word... " >&6; }
12639 if ${ac_cv_path_WC+:} false; then :
12640   $as_echo_n "(cached) " >&6
12641 else
12642   case $WC in
12643   [\\/]* | ?:[\\/]*)
12644   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12645   ;;
12646   *)
12647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12648 for as_dir in $PATH
12649 do
12650   IFS=$as_save_IFS
12651   test -z "$as_dir" && as_dir=.
12652     for ac_exec_ext in '' $ac_executable_extensions; do
12653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12654     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12656     break 2
12657   fi
12658 done
12659   done
12660 IFS=$as_save_IFS
12661 
12662   ;;
12663 esac
12664 fi
12665 WC=$ac_cv_path_WC
12666 if test -n "$WC"; then
12667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12668 $as_echo "$WC" >&6; }
12669 else
12670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12671 $as_echo "no" >&6; }
12672 fi
12673 
12674 
12675   test -n "$WC" && break
12676 done
12677 
12678     else
12679       # If it succeeded, then it was overridden by the user. We will use it
12680       # for the tool.
12681 
12682       # First remove it from the list of overridden variables, so we can test
12683       # for unknown variables in the end.
12684       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12685 
12686       # Check if we try to supply an empty value
12687       if test "x$WC" = x; then
12688         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12689 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12690         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12691 $as_echo_n "checking for WC... " >&6; }
12692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12693 $as_echo "disabled" >&6; }
12694       else
12695         # Check if the provided tool contains a complete path.
12696         tool_specified="$WC"
12697         tool_basename="${tool_specified##*/}"
12698         if test "x$tool_basename" = "x$tool_specified"; then
12699           # A command without a complete path is provided, search $PATH.
12700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12701 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12702           # Extract the first word of "$tool_basename", so it can be a program name with args.
12703 set dummy $tool_basename; ac_word=$2
12704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12705 $as_echo_n "checking for $ac_word... " >&6; }
12706 if ${ac_cv_path_WC+:} false; then :
12707   $as_echo_n "(cached) " >&6
12708 else
12709   case $WC in
12710   [\\/]* | ?:[\\/]*)
12711   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12712   ;;
12713   *)
12714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12715 for as_dir in $PATH
12716 do
12717   IFS=$as_save_IFS
12718   test -z "$as_dir" && as_dir=.
12719     for ac_exec_ext in '' $ac_executable_extensions; do
12720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12721     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12723     break 2
12724   fi
12725 done
12726   done
12727 IFS=$as_save_IFS
12728 
12729   ;;
12730 esac
12731 fi
12732 WC=$ac_cv_path_WC
12733 if test -n "$WC"; then
12734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12735 $as_echo "$WC" >&6; }
12736 else
12737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12738 $as_echo "no" >&6; }
12739 fi
12740 
12741 
12742           if test "x$WC" = x; then
12743             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12744           fi
12745         else
12746           # Otherwise we believe it is a complete path. Use it as it is.
12747           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12748 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12749           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12750 $as_echo_n "checking for WC... " >&6; }
12751           if test ! -x "$tool_specified"; then
12752             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12753 $as_echo "not found" >&6; }
12754             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12755           fi
12756           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12757 $as_echo "$tool_specified" >&6; }
12758         fi
12759       fi
12760     fi
12761 
12762   fi
12763 
12764 
12765 
12766   if test "x$WC" = x; then
12767     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12768   fi
12769 
12770 
12771 
12772 
12773 
12774   # Publish this variable in the help.
12775 
12776 
12777   if [ -z "${WHICH+x}" ]; then
12778     # The variable is not set by user, try to locate tool using the code snippet
12779     for ac_prog in which
12780 do
12781   # Extract the first word of "$ac_prog", so it can be a program name with args.
12782 set dummy $ac_prog; ac_word=$2
12783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12784 $as_echo_n "checking for $ac_word... " >&6; }
12785 if ${ac_cv_path_WHICH+:} false; then :
12786   $as_echo_n "(cached) " >&6
12787 else
12788   case $WHICH in
12789   [\\/]* | ?:[\\/]*)
12790   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12791   ;;
12792   *)
12793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12794 for as_dir in $PATH
12795 do
12796   IFS=$as_save_IFS
12797   test -z "$as_dir" && as_dir=.
12798     for ac_exec_ext in '' $ac_executable_extensions; do
12799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12800     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12802     break 2
12803   fi
12804 done
12805   done
12806 IFS=$as_save_IFS
12807 
12808   ;;
12809 esac
12810 fi
12811 WHICH=$ac_cv_path_WHICH
12812 if test -n "$WHICH"; then
12813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12814 $as_echo "$WHICH" >&6; }
12815 else
12816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12817 $as_echo "no" >&6; }
12818 fi
12819 
12820 
12821   test -n "$WHICH" && break
12822 done
12823 
12824   else
12825     # The variable is set, but is it from the command line or the environment?
12826 
12827     # Try to remove the string !WHICH! from our list.
12828     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12829     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12830       # If it failed, the variable was not from the command line. Ignore it,
12831       # but warn the user (except for BASH, which is always set by the calling BASH).
12832       if test "xWHICH" != xBASH; then
12833         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12834 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12835       fi
12836       # Try to locate tool using the code snippet
12837       for ac_prog in which
12838 do
12839   # Extract the first word of "$ac_prog", so it can be a program name with args.
12840 set dummy $ac_prog; ac_word=$2
12841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842 $as_echo_n "checking for $ac_word... " >&6; }
12843 if ${ac_cv_path_WHICH+:} false; then :
12844   $as_echo_n "(cached) " >&6
12845 else
12846   case $WHICH in
12847   [\\/]* | ?:[\\/]*)
12848   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12849   ;;
12850   *)
12851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852 for as_dir in $PATH
12853 do
12854   IFS=$as_save_IFS
12855   test -z "$as_dir" && as_dir=.
12856     for ac_exec_ext in '' $ac_executable_extensions; do
12857   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12859     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860     break 2
12861   fi
12862 done
12863   done
12864 IFS=$as_save_IFS
12865 
12866   ;;
12867 esac
12868 fi
12869 WHICH=$ac_cv_path_WHICH
12870 if test -n "$WHICH"; then
12871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12872 $as_echo "$WHICH" >&6; }
12873 else
12874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875 $as_echo "no" >&6; }
12876 fi
12877 
12878 
12879   test -n "$WHICH" && break
12880 done
12881 
12882     else
12883       # If it succeeded, then it was overridden by the user. We will use it
12884       # for the tool.
12885 
12886       # First remove it from the list of overridden variables, so we can test
12887       # for unknown variables in the end.
12888       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12889 
12890       # Check if we try to supply an empty value
12891       if test "x$WHICH" = x; then
12892         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12893 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12894         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12895 $as_echo_n "checking for WHICH... " >&6; }
12896         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12897 $as_echo "disabled" >&6; }
12898       else
12899         # Check if the provided tool contains a complete path.
12900         tool_specified="$WHICH"
12901         tool_basename="${tool_specified##*/}"
12902         if test "x$tool_basename" = "x$tool_specified"; then
12903           # A command without a complete path is provided, search $PATH.
12904           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12905 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12906           # Extract the first word of "$tool_basename", so it can be a program name with args.
12907 set dummy $tool_basename; ac_word=$2
12908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12909 $as_echo_n "checking for $ac_word... " >&6; }
12910 if ${ac_cv_path_WHICH+:} false; then :
12911   $as_echo_n "(cached) " >&6
12912 else
12913   case $WHICH in
12914   [\\/]* | ?:[\\/]*)
12915   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12916   ;;
12917   *)
12918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12919 for as_dir in $PATH
12920 do
12921   IFS=$as_save_IFS
12922   test -z "$as_dir" && as_dir=.
12923     for ac_exec_ext in '' $ac_executable_extensions; do
12924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12925     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12927     break 2
12928   fi
12929 done
12930   done
12931 IFS=$as_save_IFS
12932 
12933   ;;
12934 esac
12935 fi
12936 WHICH=$ac_cv_path_WHICH
12937 if test -n "$WHICH"; then
12938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12939 $as_echo "$WHICH" >&6; }
12940 else
12941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12942 $as_echo "no" >&6; }
12943 fi
12944 
12945 
12946           if test "x$WHICH" = x; then
12947             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12948           fi
12949         else
12950           # Otherwise we believe it is a complete path. Use it as it is.
12951           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12952 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12953           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12954 $as_echo_n "checking for WHICH... " >&6; }
12955           if test ! -x "$tool_specified"; then
12956             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12957 $as_echo "not found" >&6; }
12958             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12959           fi
12960           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12961 $as_echo "$tool_specified" >&6; }
12962         fi
12963       fi
12964     fi
12965 
12966   fi
12967 
12968 
12969 
12970   if test "x$WHICH" = x; then
12971     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12972   fi
12973 
12974 
12975 
12976 
12977 
12978   # Publish this variable in the help.
12979 
12980 
12981   if [ -z "${XARGS+x}" ]; then
12982     # The variable is not set by user, try to locate tool using the code snippet
12983     for ac_prog in xargs
12984 do
12985   # Extract the first word of "$ac_prog", so it can be a program name with args.
12986 set dummy $ac_prog; ac_word=$2
12987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12988 $as_echo_n "checking for $ac_word... " >&6; }
12989 if ${ac_cv_path_XARGS+:} false; then :
12990   $as_echo_n "(cached) " >&6
12991 else
12992   case $XARGS in
12993   [\\/]* | ?:[\\/]*)
12994   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12995   ;;
12996   *)
12997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12998 for as_dir in $PATH
12999 do
13000   IFS=$as_save_IFS
13001   test -z "$as_dir" && as_dir=.
13002     for ac_exec_ext in '' $ac_executable_extensions; do
13003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13004     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13006     break 2
13007   fi
13008 done
13009   done
13010 IFS=$as_save_IFS
13011 
13012   ;;
13013 esac
13014 fi
13015 XARGS=$ac_cv_path_XARGS
13016 if test -n "$XARGS"; then
13017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13018 $as_echo "$XARGS" >&6; }
13019 else
13020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13021 $as_echo "no" >&6; }
13022 fi
13023 
13024 
13025   test -n "$XARGS" && break
13026 done
13027 
13028   else
13029     # The variable is set, but is it from the command line or the environment?
13030 
13031     # Try to remove the string !XARGS! from our list.
13032     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13033     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13034       # If it failed, the variable was not from the command line. Ignore it,
13035       # but warn the user (except for BASH, which is always set by the calling BASH).
13036       if test "xXARGS" != xBASH; then
13037         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13038 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13039       fi
13040       # Try to locate tool using the code snippet
13041       for ac_prog in xargs
13042 do
13043   # Extract the first word of "$ac_prog", so it can be a program name with args.
13044 set dummy $ac_prog; ac_word=$2
13045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13046 $as_echo_n "checking for $ac_word... " >&6; }
13047 if ${ac_cv_path_XARGS+:} false; then :
13048   $as_echo_n "(cached) " >&6
13049 else
13050   case $XARGS in
13051   [\\/]* | ?:[\\/]*)
13052   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13053   ;;
13054   *)
13055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13056 for as_dir in $PATH
13057 do
13058   IFS=$as_save_IFS
13059   test -z "$as_dir" && as_dir=.
13060     for ac_exec_ext in '' $ac_executable_extensions; do
13061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13062     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13064     break 2
13065   fi
13066 done
13067   done
13068 IFS=$as_save_IFS
13069 
13070   ;;
13071 esac
13072 fi
13073 XARGS=$ac_cv_path_XARGS
13074 if test -n "$XARGS"; then
13075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13076 $as_echo "$XARGS" >&6; }
13077 else
13078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13079 $as_echo "no" >&6; }
13080 fi
13081 
13082 
13083   test -n "$XARGS" && break
13084 done
13085 
13086     else
13087       # If it succeeded, then it was overridden by the user. We will use it
13088       # for the tool.
13089 
13090       # First remove it from the list of overridden variables, so we can test
13091       # for unknown variables in the end.
13092       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13093 
13094       # Check if we try to supply an empty value
13095       if test "x$XARGS" = x; then
13096         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13097 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13098         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13099 $as_echo_n "checking for XARGS... " >&6; }
13100         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13101 $as_echo "disabled" >&6; }
13102       else
13103         # Check if the provided tool contains a complete path.
13104         tool_specified="$XARGS"
13105         tool_basename="${tool_specified##*/}"
13106         if test "x$tool_basename" = "x$tool_specified"; then
13107           # A command without a complete path is provided, search $PATH.
13108           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13109 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13110           # Extract the first word of "$tool_basename", so it can be a program name with args.
13111 set dummy $tool_basename; ac_word=$2
13112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13113 $as_echo_n "checking for $ac_word... " >&6; }
13114 if ${ac_cv_path_XARGS+:} false; then :
13115   $as_echo_n "(cached) " >&6
13116 else
13117   case $XARGS in
13118   [\\/]* | ?:[\\/]*)
13119   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13120   ;;
13121   *)
13122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13123 for as_dir in $PATH
13124 do
13125   IFS=$as_save_IFS
13126   test -z "$as_dir" && as_dir=.
13127     for ac_exec_ext in '' $ac_executable_extensions; do
13128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13129     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13131     break 2
13132   fi
13133 done
13134   done
13135 IFS=$as_save_IFS
13136 
13137   ;;
13138 esac
13139 fi
13140 XARGS=$ac_cv_path_XARGS
13141 if test -n "$XARGS"; then
13142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13143 $as_echo "$XARGS" >&6; }
13144 else
13145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13146 $as_echo "no" >&6; }
13147 fi
13148 
13149 
13150           if test "x$XARGS" = x; then
13151             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13152           fi
13153         else
13154           # Otherwise we believe it is a complete path. Use it as it is.
13155           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13156 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13157           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13158 $as_echo_n "checking for XARGS... " >&6; }
13159           if test ! -x "$tool_specified"; then
13160             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13161 $as_echo "not found" >&6; }
13162             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13163           fi
13164           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13165 $as_echo "$tool_specified" >&6; }
13166         fi
13167       fi
13168     fi
13169 
13170   fi
13171 
13172 
13173 
13174   if test "x$XARGS" = x; then
13175     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13176   fi
13177 
13178 
13179 
13180   # Then required tools that require some special treatment.
13181 
13182 
13183   # Publish this variable in the help.
13184 
13185 
13186   if [ -z "${AWK+x}" ]; then
13187     # The variable is not set by user, try to locate tool using the code snippet
13188     for ac_prog in gawk mawk nawk awk
13189 do
13190   # Extract the first word of "$ac_prog", so it can be a program name with args.
13191 set dummy $ac_prog; ac_word=$2
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13193 $as_echo_n "checking for $ac_word... " >&6; }
13194 if ${ac_cv_prog_AWK+:} false; then :
13195   $as_echo_n "(cached) " >&6
13196 else
13197   if test -n "$AWK"; then
13198   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13199 else
13200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13201 for as_dir in $PATH
13202 do
13203   IFS=$as_save_IFS
13204   test -z "$as_dir" && as_dir=.
13205     for ac_exec_ext in '' $ac_executable_extensions; do
13206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13207     ac_cv_prog_AWK="$ac_prog"
13208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13209     break 2
13210   fi
13211 done
13212   done
13213 IFS=$as_save_IFS
13214 
13215 fi
13216 fi
13217 AWK=$ac_cv_prog_AWK
13218 if test -n "$AWK"; then
13219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13220 $as_echo "$AWK" >&6; }
13221 else
13222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13223 $as_echo "no" >&6; }
13224 fi
13225 
13226 
13227   test -n "$AWK" && break
13228 done
13229 
13230   else
13231     # The variable is set, but is it from the command line or the environment?
13232 
13233     # Try to remove the string !AWK! from our list.
13234     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13235     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13236       # If it failed, the variable was not from the command line. Ignore it,
13237       # but warn the user (except for BASH, which is always set by the calling BASH).
13238       if test "xAWK" != xBASH; then
13239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13240 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13241       fi
13242       # Try to locate tool using the code snippet
13243       for ac_prog in gawk mawk nawk awk
13244 do
13245   # Extract the first word of "$ac_prog", so it can be a program name with args.
13246 set dummy $ac_prog; ac_word=$2
13247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13248 $as_echo_n "checking for $ac_word... " >&6; }
13249 if ${ac_cv_prog_AWK+:} false; then :
13250   $as_echo_n "(cached) " >&6
13251 else
13252   if test -n "$AWK"; then
13253   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13254 else
13255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13256 for as_dir in $PATH
13257 do
13258   IFS=$as_save_IFS
13259   test -z "$as_dir" && as_dir=.
13260     for ac_exec_ext in '' $ac_executable_extensions; do
13261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13262     ac_cv_prog_AWK="$ac_prog"
13263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13264     break 2
13265   fi
13266 done
13267   done
13268 IFS=$as_save_IFS
13269 
13270 fi
13271 fi
13272 AWK=$ac_cv_prog_AWK
13273 if test -n "$AWK"; then
13274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13275 $as_echo "$AWK" >&6; }
13276 else
13277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13278 $as_echo "no" >&6; }
13279 fi
13280 
13281 
13282   test -n "$AWK" && break
13283 done
13284 
13285     else
13286       # If it succeeded, then it was overridden by the user. We will use it
13287       # for the tool.
13288 
13289       # First remove it from the list of overridden variables, so we can test
13290       # for unknown variables in the end.
13291       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13292 
13293       # Check if we try to supply an empty value
13294       if test "x$AWK" = x; then
13295         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13296 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13298 $as_echo_n "checking for AWK... " >&6; }
13299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13300 $as_echo "disabled" >&6; }
13301       else
13302         # Check if the provided tool contains a complete path.
13303         tool_specified="$AWK"
13304         tool_basename="${tool_specified##*/}"
13305         if test "x$tool_basename" = "x$tool_specified"; then
13306           # A command without a complete path is provided, search $PATH.
13307           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13308 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13309           # Extract the first word of "$tool_basename", so it can be a program name with args.
13310 set dummy $tool_basename; ac_word=$2
13311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13312 $as_echo_n "checking for $ac_word... " >&6; }
13313 if ${ac_cv_path_AWK+:} false; then :
13314   $as_echo_n "(cached) " >&6
13315 else
13316   case $AWK in
13317   [\\/]* | ?:[\\/]*)
13318   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13319   ;;
13320   *)
13321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13322 for as_dir in $PATH
13323 do
13324   IFS=$as_save_IFS
13325   test -z "$as_dir" && as_dir=.
13326     for ac_exec_ext in '' $ac_executable_extensions; do
13327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13328     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13330     break 2
13331   fi
13332 done
13333   done
13334 IFS=$as_save_IFS
13335 
13336   ;;
13337 esac
13338 fi
13339 AWK=$ac_cv_path_AWK
13340 if test -n "$AWK"; then
13341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13342 $as_echo "$AWK" >&6; }
13343 else
13344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13345 $as_echo "no" >&6; }
13346 fi
13347 
13348 
13349           if test "x$AWK" = x; then
13350             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13351           fi
13352         else
13353           # Otherwise we believe it is a complete path. Use it as it is.
13354           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13355 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13356           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13357 $as_echo_n "checking for AWK... " >&6; }
13358           if test ! -x "$tool_specified"; then
13359             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13360 $as_echo "not found" >&6; }
13361             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13362           fi
13363           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13364 $as_echo "$tool_specified" >&6; }
13365         fi
13366       fi
13367     fi
13368 
13369   fi
13370 
13371 
13372   if test "x$AWK" = x; then
13373     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13374   fi
13375 
13376 
13377 
13378 
13379   # Publish this variable in the help.
13380 
13381 
13382   if [ -z "${GREP+x}" ]; then
13383     # The variable is not set by user, try to locate tool using the code snippet
13384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13385 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13386 if ${ac_cv_path_GREP+:} false; then :
13387   $as_echo_n "(cached) " >&6
13388 else
13389   if test -z "$GREP"; then
13390   ac_path_GREP_found=false
13391   # Loop through the user's path and test for each of PROGNAME-LIST
13392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13393 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13394 do
13395   IFS=$as_save_IFS
13396   test -z "$as_dir" && as_dir=.
13397     for ac_prog in grep ggrep; do
13398     for ac_exec_ext in '' $ac_executable_extensions; do
13399       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13400       as_fn_executable_p "$ac_path_GREP" || continue
13401 # Check for GNU ac_path_GREP and select it if it is found.
13402   # Check for GNU $ac_path_GREP
13403 case `"$ac_path_GREP" --version 2>&1` in
13404 *GNU*)
13405   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13406 *)
13407   ac_count=0
13408   $as_echo_n 0123456789 >"conftest.in"
13409   while :
13410   do
13411     cat "conftest.in" "conftest.in" >"conftest.tmp"
13412     mv "conftest.tmp" "conftest.in"
13413     cp "conftest.in" "conftest.nl"
13414     $as_echo 'GREP' >> "conftest.nl"
13415     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13416     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13417     as_fn_arith $ac_count + 1 && ac_count=$as_val
13418     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13419       # Best one so far, save it but keep looking for a better one
13420       ac_cv_path_GREP="$ac_path_GREP"
13421       ac_path_GREP_max=$ac_count
13422     fi
13423     # 10*(2^10) chars as input seems more than enough
13424     test $ac_count -gt 10 && break
13425   done
13426   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13427 esac
13428 
13429       $ac_path_GREP_found && break 3
13430     done
13431   done
13432   done
13433 IFS=$as_save_IFS
13434   if test -z "$ac_cv_path_GREP"; then
13435     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13436   fi
13437 else
13438   ac_cv_path_GREP=$GREP
13439 fi
13440 
13441 fi
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13443 $as_echo "$ac_cv_path_GREP" >&6; }
13444  GREP="$ac_cv_path_GREP"
13445 
13446 
13447   else
13448     # The variable is set, but is it from the command line or the environment?
13449 
13450     # Try to remove the string !GREP! from our list.
13451     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13452     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13453       # If it failed, the variable was not from the command line. Ignore it,
13454       # but warn the user (except for BASH, which is always set by the calling BASH).
13455       if test "xGREP" != xBASH; then
13456         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13457 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13458       fi
13459       # Try to locate tool using the code snippet
13460       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13461 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13462 if ${ac_cv_path_GREP+:} false; then :
13463   $as_echo_n "(cached) " >&6
13464 else
13465   if test -z "$GREP"; then
13466   ac_path_GREP_found=false
13467   # Loop through the user's path and test for each of PROGNAME-LIST
13468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13469 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13470 do
13471   IFS=$as_save_IFS
13472   test -z "$as_dir" && as_dir=.
13473     for ac_prog in grep ggrep; do
13474     for ac_exec_ext in '' $ac_executable_extensions; do
13475       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13476       as_fn_executable_p "$ac_path_GREP" || continue
13477 # Check for GNU ac_path_GREP and select it if it is found.
13478   # Check for GNU $ac_path_GREP
13479 case `"$ac_path_GREP" --version 2>&1` in
13480 *GNU*)
13481   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13482 *)
13483   ac_count=0
13484   $as_echo_n 0123456789 >"conftest.in"
13485   while :
13486   do
13487     cat "conftest.in" "conftest.in" >"conftest.tmp"
13488     mv "conftest.tmp" "conftest.in"
13489     cp "conftest.in" "conftest.nl"
13490     $as_echo 'GREP' >> "conftest.nl"
13491     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13492     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13493     as_fn_arith $ac_count + 1 && ac_count=$as_val
13494     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13495       # Best one so far, save it but keep looking for a better one
13496       ac_cv_path_GREP="$ac_path_GREP"
13497       ac_path_GREP_max=$ac_count
13498     fi
13499     # 10*(2^10) chars as input seems more than enough
13500     test $ac_count -gt 10 && break
13501   done
13502   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13503 esac
13504 
13505       $ac_path_GREP_found && break 3
13506     done
13507   done
13508   done
13509 IFS=$as_save_IFS
13510   if test -z "$ac_cv_path_GREP"; then
13511     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13512   fi
13513 else
13514   ac_cv_path_GREP=$GREP
13515 fi
13516 
13517 fi
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13519 $as_echo "$ac_cv_path_GREP" >&6; }
13520  GREP="$ac_cv_path_GREP"
13521 
13522 
13523     else
13524       # If it succeeded, then it was overridden by the user. We will use it
13525       # for the tool.
13526 
13527       # First remove it from the list of overridden variables, so we can test
13528       # for unknown variables in the end.
13529       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13530 
13531       # Check if we try to supply an empty value
13532       if test "x$GREP" = x; then
13533         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13534 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13536 $as_echo_n "checking for GREP... " >&6; }
13537         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13538 $as_echo "disabled" >&6; }
13539       else
13540         # Check if the provided tool contains a complete path.
13541         tool_specified="$GREP"
13542         tool_basename="${tool_specified##*/}"
13543         if test "x$tool_basename" = "x$tool_specified"; then
13544           # A command without a complete path is provided, search $PATH.
13545           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13546 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13547           # Extract the first word of "$tool_basename", so it can be a program name with args.
13548 set dummy $tool_basename; ac_word=$2
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13550 $as_echo_n "checking for $ac_word... " >&6; }
13551 if ${ac_cv_path_GREP+:} false; then :
13552   $as_echo_n "(cached) " >&6
13553 else
13554   case $GREP in
13555   [\\/]* | ?:[\\/]*)
13556   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13557   ;;
13558   *)
13559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13560 for as_dir in $PATH
13561 do
13562   IFS=$as_save_IFS
13563   test -z "$as_dir" && as_dir=.
13564     for ac_exec_ext in '' $ac_executable_extensions; do
13565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13566     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13568     break 2
13569   fi
13570 done
13571   done
13572 IFS=$as_save_IFS
13573 
13574   ;;
13575 esac
13576 fi
13577 GREP=$ac_cv_path_GREP
13578 if test -n "$GREP"; then
13579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13580 $as_echo "$GREP" >&6; }
13581 else
13582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13583 $as_echo "no" >&6; }
13584 fi
13585 
13586 
13587           if test "x$GREP" = x; then
13588             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13589           fi
13590         else
13591           # Otherwise we believe it is a complete path. Use it as it is.
13592           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13593 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13594           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13595 $as_echo_n "checking for GREP... " >&6; }
13596           if test ! -x "$tool_specified"; then
13597             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13598 $as_echo "not found" >&6; }
13599             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13600           fi
13601           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13602 $as_echo "$tool_specified" >&6; }
13603         fi
13604       fi
13605     fi
13606 
13607   fi
13608 
13609 
13610   if test "x$GREP" = x; then
13611     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13612   fi
13613 
13614 
13615 
13616 
13617   # Publish this variable in the help.
13618 
13619 
13620   if [ -z "${EGREP+x}" ]; then
13621     # The variable is not set by user, try to locate tool using the code snippet
13622     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13623 $as_echo_n "checking for egrep... " >&6; }
13624 if ${ac_cv_path_EGREP+:} false; then :
13625   $as_echo_n "(cached) " >&6
13626 else
13627   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13628    then ac_cv_path_EGREP="$GREP -E"
13629    else
13630      if test -z "$EGREP"; then
13631   ac_path_EGREP_found=false
13632   # Loop through the user's path and test for each of PROGNAME-LIST
13633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13634 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13635 do
13636   IFS=$as_save_IFS
13637   test -z "$as_dir" && as_dir=.
13638     for ac_prog in egrep; do
13639     for ac_exec_ext in '' $ac_executable_extensions; do
13640       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13641       as_fn_executable_p "$ac_path_EGREP" || continue
13642 # Check for GNU ac_path_EGREP and select it if it is found.
13643   # Check for GNU $ac_path_EGREP
13644 case `"$ac_path_EGREP" --version 2>&1` in
13645 *GNU*)
13646   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13647 *)
13648   ac_count=0
13649   $as_echo_n 0123456789 >"conftest.in"
13650   while :
13651   do
13652     cat "conftest.in" "conftest.in" >"conftest.tmp"
13653     mv "conftest.tmp" "conftest.in"
13654     cp "conftest.in" "conftest.nl"
13655     $as_echo 'EGREP' >> "conftest.nl"
13656     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13657     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13658     as_fn_arith $ac_count + 1 && ac_count=$as_val
13659     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13660       # Best one so far, save it but keep looking for a better one
13661       ac_cv_path_EGREP="$ac_path_EGREP"
13662       ac_path_EGREP_max=$ac_count
13663     fi
13664     # 10*(2^10) chars as input seems more than enough
13665     test $ac_count -gt 10 && break
13666   done
13667   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13668 esac
13669 
13670       $ac_path_EGREP_found && break 3
13671     done
13672   done
13673   done
13674 IFS=$as_save_IFS
13675   if test -z "$ac_cv_path_EGREP"; then
13676     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13677   fi
13678 else
13679   ac_cv_path_EGREP=$EGREP
13680 fi
13681 
13682    fi
13683 fi
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13685 $as_echo "$ac_cv_path_EGREP" >&6; }
13686  EGREP="$ac_cv_path_EGREP"
13687 
13688 
13689   else
13690     # The variable is set, but is it from the command line or the environment?
13691 
13692     # Try to remove the string !EGREP! from our list.
13693     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13694     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13695       # If it failed, the variable was not from the command line. Ignore it,
13696       # but warn the user (except for BASH, which is always set by the calling BASH).
13697       if test "xEGREP" != xBASH; then
13698         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13699 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13700       fi
13701       # Try to locate tool using the code snippet
13702       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13703 $as_echo_n "checking for egrep... " >&6; }
13704 if ${ac_cv_path_EGREP+:} false; then :
13705   $as_echo_n "(cached) " >&6
13706 else
13707   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13708    then ac_cv_path_EGREP="$GREP -E"
13709    else
13710      if test -z "$EGREP"; then
13711   ac_path_EGREP_found=false
13712   # Loop through the user's path and test for each of PROGNAME-LIST
13713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13714 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13715 do
13716   IFS=$as_save_IFS
13717   test -z "$as_dir" && as_dir=.
13718     for ac_prog in egrep; do
13719     for ac_exec_ext in '' $ac_executable_extensions; do
13720       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13721       as_fn_executable_p "$ac_path_EGREP" || continue
13722 # Check for GNU ac_path_EGREP and select it if it is found.
13723   # Check for GNU $ac_path_EGREP
13724 case `"$ac_path_EGREP" --version 2>&1` in
13725 *GNU*)
13726   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13727 *)
13728   ac_count=0
13729   $as_echo_n 0123456789 >"conftest.in"
13730   while :
13731   do
13732     cat "conftest.in" "conftest.in" >"conftest.tmp"
13733     mv "conftest.tmp" "conftest.in"
13734     cp "conftest.in" "conftest.nl"
13735     $as_echo 'EGREP' >> "conftest.nl"
13736     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13737     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13738     as_fn_arith $ac_count + 1 && ac_count=$as_val
13739     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13740       # Best one so far, save it but keep looking for a better one
13741       ac_cv_path_EGREP="$ac_path_EGREP"
13742       ac_path_EGREP_max=$ac_count
13743     fi
13744     # 10*(2^10) chars as input seems more than enough
13745     test $ac_count -gt 10 && break
13746   done
13747   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13748 esac
13749 
13750       $ac_path_EGREP_found && break 3
13751     done
13752   done
13753   done
13754 IFS=$as_save_IFS
13755   if test -z "$ac_cv_path_EGREP"; then
13756     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13757   fi
13758 else
13759   ac_cv_path_EGREP=$EGREP
13760 fi
13761 
13762    fi
13763 fi
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13765 $as_echo "$ac_cv_path_EGREP" >&6; }
13766  EGREP="$ac_cv_path_EGREP"
13767 
13768 
13769     else
13770       # If it succeeded, then it was overridden by the user. We will use it
13771       # for the tool.
13772 
13773       # First remove it from the list of overridden variables, so we can test
13774       # for unknown variables in the end.
13775       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13776 
13777       # Check if we try to supply an empty value
13778       if test "x$EGREP" = x; then
13779         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13780 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13782 $as_echo_n "checking for EGREP... " >&6; }
13783         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13784 $as_echo "disabled" >&6; }
13785       else
13786         # Check if the provided tool contains a complete path.
13787         tool_specified="$EGREP"
13788         tool_basename="${tool_specified##*/}"
13789         if test "x$tool_basename" = "x$tool_specified"; then
13790           # A command without a complete path is provided, search $PATH.
13791           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13792 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13793           # Extract the first word of "$tool_basename", so it can be a program name with args.
13794 set dummy $tool_basename; ac_word=$2
13795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13796 $as_echo_n "checking for $ac_word... " >&6; }
13797 if ${ac_cv_path_EGREP+:} false; then :
13798   $as_echo_n "(cached) " >&6
13799 else
13800   case $EGREP in
13801   [\\/]* | ?:[\\/]*)
13802   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13803   ;;
13804   *)
13805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13806 for as_dir in $PATH
13807 do
13808   IFS=$as_save_IFS
13809   test -z "$as_dir" && as_dir=.
13810     for ac_exec_ext in '' $ac_executable_extensions; do
13811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13812     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13814     break 2
13815   fi
13816 done
13817   done
13818 IFS=$as_save_IFS
13819 
13820   ;;
13821 esac
13822 fi
13823 EGREP=$ac_cv_path_EGREP
13824 if test -n "$EGREP"; then
13825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13826 $as_echo "$EGREP" >&6; }
13827 else
13828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13829 $as_echo "no" >&6; }
13830 fi
13831 
13832 
13833           if test "x$EGREP" = x; then
13834             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13835           fi
13836         else
13837           # Otherwise we believe it is a complete path. Use it as it is.
13838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13839 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13840           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13841 $as_echo_n "checking for EGREP... " >&6; }
13842           if test ! -x "$tool_specified"; then
13843             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13844 $as_echo "not found" >&6; }
13845             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13846           fi
13847           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13848 $as_echo "$tool_specified" >&6; }
13849         fi
13850       fi
13851     fi
13852 
13853   fi
13854 
13855 
13856   if test "x$EGREP" = x; then
13857     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13858   fi
13859 
13860 
13861 
13862 
13863   # Publish this variable in the help.
13864 
13865 
13866   if [ -z "${FGREP+x}" ]; then
13867     # The variable is not set by user, try to locate tool using the code snippet
13868     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13869 $as_echo_n "checking for fgrep... " >&6; }
13870 if ${ac_cv_path_FGREP+:} false; then :
13871   $as_echo_n "(cached) " >&6
13872 else
13873   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13874    then ac_cv_path_FGREP="$GREP -F"
13875    else
13876      if test -z "$FGREP"; then
13877   ac_path_FGREP_found=false
13878   # Loop through the user's path and test for each of PROGNAME-LIST
13879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13880 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13881 do
13882   IFS=$as_save_IFS
13883   test -z "$as_dir" && as_dir=.
13884     for ac_prog in fgrep; do
13885     for ac_exec_ext in '' $ac_executable_extensions; do
13886       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13887       as_fn_executable_p "$ac_path_FGREP" || continue
13888 # Check for GNU ac_path_FGREP and select it if it is found.
13889   # Check for GNU $ac_path_FGREP
13890 case `"$ac_path_FGREP" --version 2>&1` in
13891 *GNU*)
13892   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13893 *)
13894   ac_count=0
13895   $as_echo_n 0123456789 >"conftest.in"
13896   while :
13897   do
13898     cat "conftest.in" "conftest.in" >"conftest.tmp"
13899     mv "conftest.tmp" "conftest.in"
13900     cp "conftest.in" "conftest.nl"
13901     $as_echo 'FGREP' >> "conftest.nl"
13902     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13903     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13904     as_fn_arith $ac_count + 1 && ac_count=$as_val
13905     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13906       # Best one so far, save it but keep looking for a better one
13907       ac_cv_path_FGREP="$ac_path_FGREP"
13908       ac_path_FGREP_max=$ac_count
13909     fi
13910     # 10*(2^10) chars as input seems more than enough
13911     test $ac_count -gt 10 && break
13912   done
13913   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13914 esac
13915 
13916       $ac_path_FGREP_found && break 3
13917     done
13918   done
13919   done
13920 IFS=$as_save_IFS
13921   if test -z "$ac_cv_path_FGREP"; then
13922     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13923   fi
13924 else
13925   ac_cv_path_FGREP=$FGREP
13926 fi
13927 
13928    fi
13929 fi
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13931 $as_echo "$ac_cv_path_FGREP" >&6; }
13932  FGREP="$ac_cv_path_FGREP"
13933 
13934 
13935   else
13936     # The variable is set, but is it from the command line or the environment?
13937 
13938     # Try to remove the string !FGREP! from our list.
13939     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13940     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13941       # If it failed, the variable was not from the command line. Ignore it,
13942       # but warn the user (except for BASH, which is always set by the calling BASH).
13943       if test "xFGREP" != xBASH; then
13944         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13945 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13946       fi
13947       # Try to locate tool using the code snippet
13948       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13949 $as_echo_n "checking for fgrep... " >&6; }
13950 if ${ac_cv_path_FGREP+:} false; then :
13951   $as_echo_n "(cached) " >&6
13952 else
13953   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13954    then ac_cv_path_FGREP="$GREP -F"
13955    else
13956      if test -z "$FGREP"; then
13957   ac_path_FGREP_found=false
13958   # Loop through the user's path and test for each of PROGNAME-LIST
13959   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13960 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13961 do
13962   IFS=$as_save_IFS
13963   test -z "$as_dir" && as_dir=.
13964     for ac_prog in fgrep; do
13965     for ac_exec_ext in '' $ac_executable_extensions; do
13966       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13967       as_fn_executable_p "$ac_path_FGREP" || continue
13968 # Check for GNU ac_path_FGREP and select it if it is found.
13969   # Check for GNU $ac_path_FGREP
13970 case `"$ac_path_FGREP" --version 2>&1` in
13971 *GNU*)
13972   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13973 *)
13974   ac_count=0
13975   $as_echo_n 0123456789 >"conftest.in"
13976   while :
13977   do
13978     cat "conftest.in" "conftest.in" >"conftest.tmp"
13979     mv "conftest.tmp" "conftest.in"
13980     cp "conftest.in" "conftest.nl"
13981     $as_echo 'FGREP' >> "conftest.nl"
13982     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13983     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13984     as_fn_arith $ac_count + 1 && ac_count=$as_val
13985     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13986       # Best one so far, save it but keep looking for a better one
13987       ac_cv_path_FGREP="$ac_path_FGREP"
13988       ac_path_FGREP_max=$ac_count
13989     fi
13990     # 10*(2^10) chars as input seems more than enough
13991     test $ac_count -gt 10 && break
13992   done
13993   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13994 esac
13995 
13996       $ac_path_FGREP_found && break 3
13997     done
13998   done
13999   done
14000 IFS=$as_save_IFS
14001   if test -z "$ac_cv_path_FGREP"; then
14002     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14003   fi
14004 else
14005   ac_cv_path_FGREP=$FGREP
14006 fi
14007 
14008    fi
14009 fi
14010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14011 $as_echo "$ac_cv_path_FGREP" >&6; }
14012  FGREP="$ac_cv_path_FGREP"
14013 
14014 
14015     else
14016       # If it succeeded, then it was overridden by the user. We will use it
14017       # for the tool.
14018 
14019       # First remove it from the list of overridden variables, so we can test
14020       # for unknown variables in the end.
14021       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14022 
14023       # Check if we try to supply an empty value
14024       if test "x$FGREP" = x; then
14025         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14026 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14027         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14028 $as_echo_n "checking for FGREP... " >&6; }
14029         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14030 $as_echo "disabled" >&6; }
14031       else
14032         # Check if the provided tool contains a complete path.
14033         tool_specified="$FGREP"
14034         tool_basename="${tool_specified##*/}"
14035         if test "x$tool_basename" = "x$tool_specified"; then
14036           # A command without a complete path is provided, search $PATH.
14037           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14038 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14039           # Extract the first word of "$tool_basename", so it can be a program name with args.
14040 set dummy $tool_basename; ac_word=$2
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14042 $as_echo_n "checking for $ac_word... " >&6; }
14043 if ${ac_cv_path_FGREP+:} false; then :
14044   $as_echo_n "(cached) " >&6
14045 else
14046   case $FGREP in
14047   [\\/]* | ?:[\\/]*)
14048   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14049   ;;
14050   *)
14051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14052 for as_dir in $PATH
14053 do
14054   IFS=$as_save_IFS
14055   test -z "$as_dir" && as_dir=.
14056     for ac_exec_ext in '' $ac_executable_extensions; do
14057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14058     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14060     break 2
14061   fi
14062 done
14063   done
14064 IFS=$as_save_IFS
14065 
14066   ;;
14067 esac
14068 fi
14069 FGREP=$ac_cv_path_FGREP
14070 if test -n "$FGREP"; then
14071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14072 $as_echo "$FGREP" >&6; }
14073 else
14074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14075 $as_echo "no" >&6; }
14076 fi
14077 
14078 
14079           if test "x$FGREP" = x; then
14080             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14081           fi
14082         else
14083           # Otherwise we believe it is a complete path. Use it as it is.
14084           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14085 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14086           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14087 $as_echo_n "checking for FGREP... " >&6; }
14088           if test ! -x "$tool_specified"; then
14089             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14090 $as_echo "not found" >&6; }
14091             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14092           fi
14093           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14094 $as_echo "$tool_specified" >&6; }
14095         fi
14096       fi
14097     fi
14098 
14099   fi
14100 
14101 
14102   if test "x$FGREP" = x; then
14103     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14104   fi
14105 
14106 
14107 
14108 
14109   # Publish this variable in the help.
14110 
14111 
14112   if [ -z "${SED+x}" ]; then
14113     # The variable is not set by user, try to locate tool using the code snippet
14114     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14115 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14116 if ${ac_cv_path_SED+:} false; then :
14117   $as_echo_n "(cached) " >&6
14118 else
14119             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14120      for ac_i in 1 2 3 4 5 6 7; do
14121        ac_script="$ac_script$as_nl$ac_script"
14122      done
14123      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14124      { ac_script=; unset ac_script;}
14125      if test -z "$SED"; then
14126   ac_path_SED_found=false
14127   # Loop through the user's path and test for each of PROGNAME-LIST
14128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14129 for as_dir in $PATH
14130 do
14131   IFS=$as_save_IFS
14132   test -z "$as_dir" && as_dir=.
14133     for ac_prog in sed gsed; do
14134     for ac_exec_ext in '' $ac_executable_extensions; do
14135       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14136       as_fn_executable_p "$ac_path_SED" || continue
14137 # Check for GNU ac_path_SED and select it if it is found.
14138   # Check for GNU $ac_path_SED
14139 case `"$ac_path_SED" --version 2>&1` in
14140 *GNU*)
14141   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14142 *)
14143   ac_count=0
14144   $as_echo_n 0123456789 >"conftest.in"
14145   while :
14146   do
14147     cat "conftest.in" "conftest.in" >"conftest.tmp"
14148     mv "conftest.tmp" "conftest.in"
14149     cp "conftest.in" "conftest.nl"
14150     $as_echo '' >> "conftest.nl"
14151     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14152     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14153     as_fn_arith $ac_count + 1 && ac_count=$as_val
14154     if test $ac_count -gt ${ac_path_SED_max-0}; then
14155       # Best one so far, save it but keep looking for a better one
14156       ac_cv_path_SED="$ac_path_SED"
14157       ac_path_SED_max=$ac_count
14158     fi
14159     # 10*(2^10) chars as input seems more than enough
14160     test $ac_count -gt 10 && break
14161   done
14162   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14163 esac
14164 
14165       $ac_path_SED_found && break 3
14166     done
14167   done
14168   done
14169 IFS=$as_save_IFS
14170   if test -z "$ac_cv_path_SED"; then
14171     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14172   fi
14173 else
14174   ac_cv_path_SED=$SED
14175 fi
14176 
14177 fi
14178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14179 $as_echo "$ac_cv_path_SED" >&6; }
14180  SED="$ac_cv_path_SED"
14181   rm -f conftest.sed
14182 
14183   else
14184     # The variable is set, but is it from the command line or the environment?
14185 
14186     # Try to remove the string !SED! from our list.
14187     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14188     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14189       # If it failed, the variable was not from the command line. Ignore it,
14190       # but warn the user (except for BASH, which is always set by the calling BASH).
14191       if test "xSED" != xBASH; then
14192         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14193 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14194       fi
14195       # Try to locate tool using the code snippet
14196       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14197 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14198 if ${ac_cv_path_SED+:} false; then :
14199   $as_echo_n "(cached) " >&6
14200 else
14201             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14202      for ac_i in 1 2 3 4 5 6 7; do
14203        ac_script="$ac_script$as_nl$ac_script"
14204      done
14205      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14206      { ac_script=; unset ac_script;}
14207      if test -z "$SED"; then
14208   ac_path_SED_found=false
14209   # Loop through the user's path and test for each of PROGNAME-LIST
14210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14211 for as_dir in $PATH
14212 do
14213   IFS=$as_save_IFS
14214   test -z "$as_dir" && as_dir=.
14215     for ac_prog in sed gsed; do
14216     for ac_exec_ext in '' $ac_executable_extensions; do
14217       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14218       as_fn_executable_p "$ac_path_SED" || continue
14219 # Check for GNU ac_path_SED and select it if it is found.
14220   # Check for GNU $ac_path_SED
14221 case `"$ac_path_SED" --version 2>&1` in
14222 *GNU*)
14223   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14224 *)
14225   ac_count=0
14226   $as_echo_n 0123456789 >"conftest.in"
14227   while :
14228   do
14229     cat "conftest.in" "conftest.in" >"conftest.tmp"
14230     mv "conftest.tmp" "conftest.in"
14231     cp "conftest.in" "conftest.nl"
14232     $as_echo '' >> "conftest.nl"
14233     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14234     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14235     as_fn_arith $ac_count + 1 && ac_count=$as_val
14236     if test $ac_count -gt ${ac_path_SED_max-0}; then
14237       # Best one so far, save it but keep looking for a better one
14238       ac_cv_path_SED="$ac_path_SED"
14239       ac_path_SED_max=$ac_count
14240     fi
14241     # 10*(2^10) chars as input seems more than enough
14242     test $ac_count -gt 10 && break
14243   done
14244   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14245 esac
14246 
14247       $ac_path_SED_found && break 3
14248     done
14249   done
14250   done
14251 IFS=$as_save_IFS
14252   if test -z "$ac_cv_path_SED"; then
14253     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14254   fi
14255 else
14256   ac_cv_path_SED=$SED
14257 fi
14258 
14259 fi
14260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14261 $as_echo "$ac_cv_path_SED" >&6; }
14262  SED="$ac_cv_path_SED"
14263   rm -f conftest.sed
14264 
14265     else
14266       # If it succeeded, then it was overridden by the user. We will use it
14267       # for the tool.
14268 
14269       # First remove it from the list of overridden variables, so we can test
14270       # for unknown variables in the end.
14271       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14272 
14273       # Check if we try to supply an empty value
14274       if test "x$SED" = x; then
14275         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14276 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14277         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14278 $as_echo_n "checking for SED... " >&6; }
14279         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14280 $as_echo "disabled" >&6; }
14281       else
14282         # Check if the provided tool contains a complete path.
14283         tool_specified="$SED"
14284         tool_basename="${tool_specified##*/}"
14285         if test "x$tool_basename" = "x$tool_specified"; then
14286           # A command without a complete path is provided, search $PATH.
14287           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14288 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14289           # Extract the first word of "$tool_basename", so it can be a program name with args.
14290 set dummy $tool_basename; ac_word=$2
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14292 $as_echo_n "checking for $ac_word... " >&6; }
14293 if ${ac_cv_path_SED+:} false; then :
14294   $as_echo_n "(cached) " >&6
14295 else
14296   case $SED in
14297   [\\/]* | ?:[\\/]*)
14298   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14299   ;;
14300   *)
14301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14302 for as_dir in $PATH
14303 do
14304   IFS=$as_save_IFS
14305   test -z "$as_dir" && as_dir=.
14306     for ac_exec_ext in '' $ac_executable_extensions; do
14307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14308     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14310     break 2
14311   fi
14312 done
14313   done
14314 IFS=$as_save_IFS
14315 
14316   ;;
14317 esac
14318 fi
14319 SED=$ac_cv_path_SED
14320 if test -n "$SED"; then
14321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14322 $as_echo "$SED" >&6; }
14323 else
14324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14325 $as_echo "no" >&6; }
14326 fi
14327 
14328 
14329           if test "x$SED" = x; then
14330             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14331           fi
14332         else
14333           # Otherwise we believe it is a complete path. Use it as it is.
14334           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14335 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14336           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14337 $as_echo_n "checking for SED... " >&6; }
14338           if test ! -x "$tool_specified"; then
14339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14340 $as_echo "not found" >&6; }
14341             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14342           fi
14343           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14344 $as_echo "$tool_specified" >&6; }
14345         fi
14346       fi
14347     fi
14348 
14349   fi
14350 
14351 
14352   if test "x$SED" = x; then
14353     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14354   fi
14355 
14356 
14357 
14358   # Always force rm.
14359   RM="$RM -f"
14360 
14361   # pwd behaves differently on various platforms and some don't support the -L flag.
14362   # Always use the bash builtin pwd to get uniform behavior.
14363   THEPWDCMD=pwd
14364 
14365   # These are not required on all platforms
14366 
14367 
14368   # Publish this variable in the help.
14369 
14370 
14371   if [ -z "${CYGPATH+x}" ]; then
14372     # The variable is not set by user, try to locate tool using the code snippet
14373     for ac_prog in cygpath
14374 do
14375   # Extract the first word of "$ac_prog", so it can be a program name with args.
14376 set dummy $ac_prog; ac_word=$2
14377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14378 $as_echo_n "checking for $ac_word... " >&6; }
14379 if ${ac_cv_path_CYGPATH+:} false; then :
14380   $as_echo_n "(cached) " >&6
14381 else
14382   case $CYGPATH in
14383   [\\/]* | ?:[\\/]*)
14384   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14385   ;;
14386   *)
14387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14388 for as_dir in $PATH
14389 do
14390   IFS=$as_save_IFS
14391   test -z "$as_dir" && as_dir=.
14392     for ac_exec_ext in '' $ac_executable_extensions; do
14393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14394     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14396     break 2
14397   fi
14398 done
14399   done
14400 IFS=$as_save_IFS
14401 
14402   ;;
14403 esac
14404 fi
14405 CYGPATH=$ac_cv_path_CYGPATH
14406 if test -n "$CYGPATH"; then
14407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14408 $as_echo "$CYGPATH" >&6; }
14409 else
14410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14411 $as_echo "no" >&6; }
14412 fi
14413 
14414 
14415   test -n "$CYGPATH" && break
14416 done
14417 
14418   else
14419     # The variable is set, but is it from the command line or the environment?
14420 
14421     # Try to remove the string !CYGPATH! from our list.
14422     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14423     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14424       # If it failed, the variable was not from the command line. Ignore it,
14425       # but warn the user (except for BASH, which is always set by the calling BASH).
14426       if test "xCYGPATH" != xBASH; then
14427         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14428 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14429       fi
14430       # Try to locate tool using the code snippet
14431       for ac_prog in cygpath
14432 do
14433   # Extract the first word of "$ac_prog", so it can be a program name with args.
14434 set dummy $ac_prog; ac_word=$2
14435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14436 $as_echo_n "checking for $ac_word... " >&6; }
14437 if ${ac_cv_path_CYGPATH+:} false; then :
14438   $as_echo_n "(cached) " >&6
14439 else
14440   case $CYGPATH in
14441   [\\/]* | ?:[\\/]*)
14442   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14443   ;;
14444   *)
14445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14446 for as_dir in $PATH
14447 do
14448   IFS=$as_save_IFS
14449   test -z "$as_dir" && as_dir=.
14450     for ac_exec_ext in '' $ac_executable_extensions; do
14451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14452     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14454     break 2
14455   fi
14456 done
14457   done
14458 IFS=$as_save_IFS
14459 
14460   ;;
14461 esac
14462 fi
14463 CYGPATH=$ac_cv_path_CYGPATH
14464 if test -n "$CYGPATH"; then
14465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14466 $as_echo "$CYGPATH" >&6; }
14467 else
14468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469 $as_echo "no" >&6; }
14470 fi
14471 
14472 
14473   test -n "$CYGPATH" && break
14474 done
14475 
14476     else
14477       # If it succeeded, then it was overridden by the user. We will use it
14478       # for the tool.
14479 
14480       # First remove it from the list of overridden variables, so we can test
14481       # for unknown variables in the end.
14482       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14483 
14484       # Check if we try to supply an empty value
14485       if test "x$CYGPATH" = x; then
14486         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14487 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14488         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14489 $as_echo_n "checking for CYGPATH... " >&6; }
14490         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14491 $as_echo "disabled" >&6; }
14492       else
14493         # Check if the provided tool contains a complete path.
14494         tool_specified="$CYGPATH"
14495         tool_basename="${tool_specified##*/}"
14496         if test "x$tool_basename" = "x$tool_specified"; then
14497           # A command without a complete path is provided, search $PATH.
14498           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14499 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14500           # Extract the first word of "$tool_basename", so it can be a program name with args.
14501 set dummy $tool_basename; ac_word=$2
14502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14503 $as_echo_n "checking for $ac_word... " >&6; }
14504 if ${ac_cv_path_CYGPATH+:} false; then :
14505   $as_echo_n "(cached) " >&6
14506 else
14507   case $CYGPATH in
14508   [\\/]* | ?:[\\/]*)
14509   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14510   ;;
14511   *)
14512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14513 for as_dir in $PATH
14514 do
14515   IFS=$as_save_IFS
14516   test -z "$as_dir" && as_dir=.
14517     for ac_exec_ext in '' $ac_executable_extensions; do
14518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14519     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14521     break 2
14522   fi
14523 done
14524   done
14525 IFS=$as_save_IFS
14526 
14527   ;;
14528 esac
14529 fi
14530 CYGPATH=$ac_cv_path_CYGPATH
14531 if test -n "$CYGPATH"; then
14532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14533 $as_echo "$CYGPATH" >&6; }
14534 else
14535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14536 $as_echo "no" >&6; }
14537 fi
14538 
14539 
14540           if test "x$CYGPATH" = x; then
14541             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14542           fi
14543         else
14544           # Otherwise we believe it is a complete path. Use it as it is.
14545           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14546 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14547           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14548 $as_echo_n "checking for CYGPATH... " >&6; }
14549           if test ! -x "$tool_specified"; then
14550             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14551 $as_echo "not found" >&6; }
14552             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14553           fi
14554           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14555 $as_echo "$tool_specified" >&6; }
14556         fi
14557       fi
14558     fi
14559 
14560   fi
14561 
14562 
14563 
14564 
14565   # Publish this variable in the help.
14566 
14567 
14568   if [ -z "${READLINK+x}" ]; then
14569     # The variable is not set by user, try to locate tool using the code snippet
14570     for ac_prog in greadlink readlink
14571 do
14572   # Extract the first word of "$ac_prog", so it can be a program name with args.
14573 set dummy $ac_prog; ac_word=$2
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14575 $as_echo_n "checking for $ac_word... " >&6; }
14576 if ${ac_cv_path_READLINK+:} false; then :
14577   $as_echo_n "(cached) " >&6
14578 else
14579   case $READLINK in
14580   [\\/]* | ?:[\\/]*)
14581   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14582   ;;
14583   *)
14584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14585 for as_dir in $PATH
14586 do
14587   IFS=$as_save_IFS
14588   test -z "$as_dir" && as_dir=.
14589     for ac_exec_ext in '' $ac_executable_extensions; do
14590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14591     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14593     break 2
14594   fi
14595 done
14596   done
14597 IFS=$as_save_IFS
14598 
14599   ;;
14600 esac
14601 fi
14602 READLINK=$ac_cv_path_READLINK
14603 if test -n "$READLINK"; then
14604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14605 $as_echo "$READLINK" >&6; }
14606 else
14607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14608 $as_echo "no" >&6; }
14609 fi
14610 
14611 
14612   test -n "$READLINK" && break
14613 done
14614 
14615   else
14616     # The variable is set, but is it from the command line or the environment?
14617 
14618     # Try to remove the string !READLINK! from our list.
14619     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14620     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14621       # If it failed, the variable was not from the command line. Ignore it,
14622       # but warn the user (except for BASH, which is always set by the calling BASH).
14623       if test "xREADLINK" != xBASH; then
14624         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14625 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14626       fi
14627       # Try to locate tool using the code snippet
14628       for ac_prog in greadlink readlink
14629 do
14630   # Extract the first word of "$ac_prog", so it can be a program name with args.
14631 set dummy $ac_prog; ac_word=$2
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14633 $as_echo_n "checking for $ac_word... " >&6; }
14634 if ${ac_cv_path_READLINK+:} false; then :
14635   $as_echo_n "(cached) " >&6
14636 else
14637   case $READLINK in
14638   [\\/]* | ?:[\\/]*)
14639   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14640   ;;
14641   *)
14642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14643 for as_dir in $PATH
14644 do
14645   IFS=$as_save_IFS
14646   test -z "$as_dir" && as_dir=.
14647     for ac_exec_ext in '' $ac_executable_extensions; do
14648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14649     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14651     break 2
14652   fi
14653 done
14654   done
14655 IFS=$as_save_IFS
14656 
14657   ;;
14658 esac
14659 fi
14660 READLINK=$ac_cv_path_READLINK
14661 if test -n "$READLINK"; then
14662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14663 $as_echo "$READLINK" >&6; }
14664 else
14665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14666 $as_echo "no" >&6; }
14667 fi
14668 
14669 
14670   test -n "$READLINK" && break
14671 done
14672 
14673     else
14674       # If it succeeded, then it was overridden by the user. We will use it
14675       # for the tool.
14676 
14677       # First remove it from the list of overridden variables, so we can test
14678       # for unknown variables in the end.
14679       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14680 
14681       # Check if we try to supply an empty value
14682       if test "x$READLINK" = x; then
14683         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14684 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14685         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14686 $as_echo_n "checking for READLINK... " >&6; }
14687         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14688 $as_echo "disabled" >&6; }
14689       else
14690         # Check if the provided tool contains a complete path.
14691         tool_specified="$READLINK"
14692         tool_basename="${tool_specified##*/}"
14693         if test "x$tool_basename" = "x$tool_specified"; then
14694           # A command without a complete path is provided, search $PATH.
14695           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14696 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14697           # Extract the first word of "$tool_basename", so it can be a program name with args.
14698 set dummy $tool_basename; ac_word=$2
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14700 $as_echo_n "checking for $ac_word... " >&6; }
14701 if ${ac_cv_path_READLINK+:} false; then :
14702   $as_echo_n "(cached) " >&6
14703 else
14704   case $READLINK in
14705   [\\/]* | ?:[\\/]*)
14706   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14707   ;;
14708   *)
14709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14710 for as_dir in $PATH
14711 do
14712   IFS=$as_save_IFS
14713   test -z "$as_dir" && as_dir=.
14714     for ac_exec_ext in '' $ac_executable_extensions; do
14715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14716     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14718     break 2
14719   fi
14720 done
14721   done
14722 IFS=$as_save_IFS
14723 
14724   ;;
14725 esac
14726 fi
14727 READLINK=$ac_cv_path_READLINK
14728 if test -n "$READLINK"; then
14729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14730 $as_echo "$READLINK" >&6; }
14731 else
14732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14733 $as_echo "no" >&6; }
14734 fi
14735 
14736 
14737           if test "x$READLINK" = x; then
14738             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14739           fi
14740         else
14741           # Otherwise we believe it is a complete path. Use it as it is.
14742           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14743 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14744           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14745 $as_echo_n "checking for READLINK... " >&6; }
14746           if test ! -x "$tool_specified"; then
14747             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14748 $as_echo "not found" >&6; }
14749             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14750           fi
14751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14752 $as_echo "$tool_specified" >&6; }
14753         fi
14754       fi
14755     fi
14756 
14757   fi
14758 
14759 
14760 
14761 
14762   # Publish this variable in the help.
14763 
14764 
14765   if [ -z "${DF+x}" ]; then
14766     # The variable is not set by user, try to locate tool using the code snippet
14767     for ac_prog in df
14768 do
14769   # Extract the first word of "$ac_prog", so it can be a program name with args.
14770 set dummy $ac_prog; ac_word=$2
14771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14772 $as_echo_n "checking for $ac_word... " >&6; }
14773 if ${ac_cv_path_DF+:} false; then :
14774   $as_echo_n "(cached) " >&6
14775 else
14776   case $DF in
14777   [\\/]* | ?:[\\/]*)
14778   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14779   ;;
14780   *)
14781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14782 for as_dir in $PATH
14783 do
14784   IFS=$as_save_IFS
14785   test -z "$as_dir" && as_dir=.
14786     for ac_exec_ext in '' $ac_executable_extensions; do
14787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14788     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14790     break 2
14791   fi
14792 done
14793   done
14794 IFS=$as_save_IFS
14795 
14796   ;;
14797 esac
14798 fi
14799 DF=$ac_cv_path_DF
14800 if test -n "$DF"; then
14801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14802 $as_echo "$DF" >&6; }
14803 else
14804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14805 $as_echo "no" >&6; }
14806 fi
14807 
14808 
14809   test -n "$DF" && break
14810 done
14811 
14812   else
14813     # The variable is set, but is it from the command line or the environment?
14814 
14815     # Try to remove the string !DF! from our list.
14816     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14817     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14818       # If it failed, the variable was not from the command line. Ignore it,
14819       # but warn the user (except for BASH, which is always set by the calling BASH).
14820       if test "xDF" != xBASH; then
14821         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14822 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14823       fi
14824       # Try to locate tool using the code snippet
14825       for ac_prog in df
14826 do
14827   # Extract the first word of "$ac_prog", so it can be a program name with args.
14828 set dummy $ac_prog; ac_word=$2
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14830 $as_echo_n "checking for $ac_word... " >&6; }
14831 if ${ac_cv_path_DF+:} false; then :
14832   $as_echo_n "(cached) " >&6
14833 else
14834   case $DF in
14835   [\\/]* | ?:[\\/]*)
14836   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14837   ;;
14838   *)
14839   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14840 for as_dir in $PATH
14841 do
14842   IFS=$as_save_IFS
14843   test -z "$as_dir" && as_dir=.
14844     for ac_exec_ext in '' $ac_executable_extensions; do
14845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14846     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14848     break 2
14849   fi
14850 done
14851   done
14852 IFS=$as_save_IFS
14853 
14854   ;;
14855 esac
14856 fi
14857 DF=$ac_cv_path_DF
14858 if test -n "$DF"; then
14859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14860 $as_echo "$DF" >&6; }
14861 else
14862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14863 $as_echo "no" >&6; }
14864 fi
14865 
14866 
14867   test -n "$DF" && break
14868 done
14869 
14870     else
14871       # If it succeeded, then it was overridden by the user. We will use it
14872       # for the tool.
14873 
14874       # First remove it from the list of overridden variables, so we can test
14875       # for unknown variables in the end.
14876       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14877 
14878       # Check if we try to supply an empty value
14879       if test "x$DF" = x; then
14880         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14881 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14882         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14883 $as_echo_n "checking for DF... " >&6; }
14884         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14885 $as_echo "disabled" >&6; }
14886       else
14887         # Check if the provided tool contains a complete path.
14888         tool_specified="$DF"
14889         tool_basename="${tool_specified##*/}"
14890         if test "x$tool_basename" = "x$tool_specified"; then
14891           # A command without a complete path is provided, search $PATH.
14892           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14893 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14894           # Extract the first word of "$tool_basename", so it can be a program name with args.
14895 set dummy $tool_basename; ac_word=$2
14896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14897 $as_echo_n "checking for $ac_word... " >&6; }
14898 if ${ac_cv_path_DF+:} false; then :
14899   $as_echo_n "(cached) " >&6
14900 else
14901   case $DF in
14902   [\\/]* | ?:[\\/]*)
14903   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14904   ;;
14905   *)
14906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14907 for as_dir in $PATH
14908 do
14909   IFS=$as_save_IFS
14910   test -z "$as_dir" && as_dir=.
14911     for ac_exec_ext in '' $ac_executable_extensions; do
14912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14913     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14915     break 2
14916   fi
14917 done
14918   done
14919 IFS=$as_save_IFS
14920 
14921   ;;
14922 esac
14923 fi
14924 DF=$ac_cv_path_DF
14925 if test -n "$DF"; then
14926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14927 $as_echo "$DF" >&6; }
14928 else
14929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14930 $as_echo "no" >&6; }
14931 fi
14932 
14933 
14934           if test "x$DF" = x; then
14935             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14936           fi
14937         else
14938           # Otherwise we believe it is a complete path. Use it as it is.
14939           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14940 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14941           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14942 $as_echo_n "checking for DF... " >&6; }
14943           if test ! -x "$tool_specified"; then
14944             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14945 $as_echo "not found" >&6; }
14946             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14947           fi
14948           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14949 $as_echo "$tool_specified" >&6; }
14950         fi
14951       fi
14952     fi
14953 
14954   fi
14955 
14956 
14957 
14958 
14959   # Publish this variable in the help.
14960 
14961 
14962   if [ -z "${CPIO+x}" ]; then
14963     # The variable is not set by user, try to locate tool using the code snippet
14964     for ac_prog in cpio bsdcpio
14965 do
14966   # Extract the first word of "$ac_prog", so it can be a program name with args.
14967 set dummy $ac_prog; ac_word=$2
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14969 $as_echo_n "checking for $ac_word... " >&6; }
14970 if ${ac_cv_path_CPIO+:} false; then :
14971   $as_echo_n "(cached) " >&6
14972 else
14973   case $CPIO in
14974   [\\/]* | ?:[\\/]*)
14975   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14976   ;;
14977   *)
14978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14979 for as_dir in $PATH
14980 do
14981   IFS=$as_save_IFS
14982   test -z "$as_dir" && as_dir=.
14983     for ac_exec_ext in '' $ac_executable_extensions; do
14984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14985     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14987     break 2
14988   fi
14989 done
14990   done
14991 IFS=$as_save_IFS
14992 
14993   ;;
14994 esac
14995 fi
14996 CPIO=$ac_cv_path_CPIO
14997 if test -n "$CPIO"; then
14998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14999 $as_echo "$CPIO" >&6; }
15000 else
15001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15002 $as_echo "no" >&6; }
15003 fi
15004 
15005 
15006   test -n "$CPIO" && break
15007 done
15008 
15009   else
15010     # The variable is set, but is it from the command line or the environment?
15011 
15012     # Try to remove the string !CPIO! from our list.
15013     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15014     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15015       # If it failed, the variable was not from the command line. Ignore it,
15016       # but warn the user (except for BASH, which is always set by the calling BASH).
15017       if test "xCPIO" != xBASH; then
15018         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15019 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15020       fi
15021       # Try to locate tool using the code snippet
15022       for ac_prog in cpio bsdcpio
15023 do
15024   # Extract the first word of "$ac_prog", so it can be a program name with args.
15025 set dummy $ac_prog; ac_word=$2
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15027 $as_echo_n "checking for $ac_word... " >&6; }
15028 if ${ac_cv_path_CPIO+:} false; then :
15029   $as_echo_n "(cached) " >&6
15030 else
15031   case $CPIO in
15032   [\\/]* | ?:[\\/]*)
15033   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15034   ;;
15035   *)
15036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15037 for as_dir in $PATH
15038 do
15039   IFS=$as_save_IFS
15040   test -z "$as_dir" && as_dir=.
15041     for ac_exec_ext in '' $ac_executable_extensions; do
15042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15043     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15045     break 2
15046   fi
15047 done
15048   done
15049 IFS=$as_save_IFS
15050 
15051   ;;
15052 esac
15053 fi
15054 CPIO=$ac_cv_path_CPIO
15055 if test -n "$CPIO"; then
15056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15057 $as_echo "$CPIO" >&6; }
15058 else
15059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15060 $as_echo "no" >&6; }
15061 fi
15062 
15063 
15064   test -n "$CPIO" && break
15065 done
15066 
15067     else
15068       # If it succeeded, then it was overridden by the user. We will use it
15069       # for the tool.
15070 
15071       # First remove it from the list of overridden variables, so we can test
15072       # for unknown variables in the end.
15073       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15074 
15075       # Check if we try to supply an empty value
15076       if test "x$CPIO" = x; then
15077         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15078 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15079         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15080 $as_echo_n "checking for CPIO... " >&6; }
15081         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15082 $as_echo "disabled" >&6; }
15083       else
15084         # Check if the provided tool contains a complete path.
15085         tool_specified="$CPIO"
15086         tool_basename="${tool_specified##*/}"
15087         if test "x$tool_basename" = "x$tool_specified"; then
15088           # A command without a complete path is provided, search $PATH.
15089           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15090 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15091           # Extract the first word of "$tool_basename", so it can be a program name with args.
15092 set dummy $tool_basename; ac_word=$2
15093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15094 $as_echo_n "checking for $ac_word... " >&6; }
15095 if ${ac_cv_path_CPIO+:} false; then :
15096   $as_echo_n "(cached) " >&6
15097 else
15098   case $CPIO in
15099   [\\/]* | ?:[\\/]*)
15100   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15101   ;;
15102   *)
15103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15104 for as_dir in $PATH
15105 do
15106   IFS=$as_save_IFS
15107   test -z "$as_dir" && as_dir=.
15108     for ac_exec_ext in '' $ac_executable_extensions; do
15109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15110     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15112     break 2
15113   fi
15114 done
15115   done
15116 IFS=$as_save_IFS
15117 
15118   ;;
15119 esac
15120 fi
15121 CPIO=$ac_cv_path_CPIO
15122 if test -n "$CPIO"; then
15123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15124 $as_echo "$CPIO" >&6; }
15125 else
15126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15127 $as_echo "no" >&6; }
15128 fi
15129 
15130 
15131           if test "x$CPIO" = x; then
15132             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15133           fi
15134         else
15135           # Otherwise we believe it is a complete path. Use it as it is.
15136           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15137 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15138           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15139 $as_echo_n "checking for CPIO... " >&6; }
15140           if test ! -x "$tool_specified"; then
15141             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15142 $as_echo "not found" >&6; }
15143             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15144           fi
15145           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15146 $as_echo "$tool_specified" >&6; }
15147         fi
15148       fi
15149     fi
15150 
15151   fi
15152 
15153 
15154 
15155 
15156   # Publish this variable in the help.
15157 
15158 
15159   if [ -z "${NICE+x}" ]; then
15160     # The variable is not set by user, try to locate tool using the code snippet
15161     for ac_prog in nice
15162 do
15163   # Extract the first word of "$ac_prog", so it can be a program name with args.
15164 set dummy $ac_prog; ac_word=$2
15165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15166 $as_echo_n "checking for $ac_word... " >&6; }
15167 if ${ac_cv_path_NICE+:} false; then :
15168   $as_echo_n "(cached) " >&6
15169 else
15170   case $NICE in
15171   [\\/]* | ?:[\\/]*)
15172   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15173   ;;
15174   *)
15175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15176 for as_dir in $PATH
15177 do
15178   IFS=$as_save_IFS
15179   test -z "$as_dir" && as_dir=.
15180     for ac_exec_ext in '' $ac_executable_extensions; do
15181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15182     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15184     break 2
15185   fi
15186 done
15187   done
15188 IFS=$as_save_IFS
15189 
15190   ;;
15191 esac
15192 fi
15193 NICE=$ac_cv_path_NICE
15194 if test -n "$NICE"; then
15195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15196 $as_echo "$NICE" >&6; }
15197 else
15198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15199 $as_echo "no" >&6; }
15200 fi
15201 
15202 
15203   test -n "$NICE" && break
15204 done
15205 
15206   else
15207     # The variable is set, but is it from the command line or the environment?
15208 
15209     # Try to remove the string !NICE! from our list.
15210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15212       # If it failed, the variable was not from the command line. Ignore it,
15213       # but warn the user (except for BASH, which is always set by the calling BASH).
15214       if test "xNICE" != xBASH; then
15215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15216 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15217       fi
15218       # Try to locate tool using the code snippet
15219       for ac_prog in nice
15220 do
15221   # Extract the first word of "$ac_prog", so it can be a program name with args.
15222 set dummy $ac_prog; ac_word=$2
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15224 $as_echo_n "checking for $ac_word... " >&6; }
15225 if ${ac_cv_path_NICE+:} false; then :
15226   $as_echo_n "(cached) " >&6
15227 else
15228   case $NICE in
15229   [\\/]* | ?:[\\/]*)
15230   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15231   ;;
15232   *)
15233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234 for as_dir in $PATH
15235 do
15236   IFS=$as_save_IFS
15237   test -z "$as_dir" && as_dir=.
15238     for ac_exec_ext in '' $ac_executable_extensions; do
15239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15242     break 2
15243   fi
15244 done
15245   done
15246 IFS=$as_save_IFS
15247 
15248   ;;
15249 esac
15250 fi
15251 NICE=$ac_cv_path_NICE
15252 if test -n "$NICE"; then
15253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15254 $as_echo "$NICE" >&6; }
15255 else
15256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15257 $as_echo "no" >&6; }
15258 fi
15259 
15260 
15261   test -n "$NICE" && break
15262 done
15263 
15264     else
15265       # If it succeeded, then it was overridden by the user. We will use it
15266       # for the tool.
15267 
15268       # First remove it from the list of overridden variables, so we can test
15269       # for unknown variables in the end.
15270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15271 
15272       # Check if we try to supply an empty value
15273       if test "x$NICE" = x; then
15274         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15275 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15277 $as_echo_n "checking for NICE... " >&6; }
15278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15279 $as_echo "disabled" >&6; }
15280       else
15281         # Check if the provided tool contains a complete path.
15282         tool_specified="$NICE"
15283         tool_basename="${tool_specified##*/}"
15284         if test "x$tool_basename" = "x$tool_specified"; then
15285           # A command without a complete path is provided, search $PATH.
15286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15287 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15288           # Extract the first word of "$tool_basename", so it can be a program name with args.
15289 set dummy $tool_basename; ac_word=$2
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15291 $as_echo_n "checking for $ac_word... " >&6; }
15292 if ${ac_cv_path_NICE+:} false; then :
15293   $as_echo_n "(cached) " >&6
15294 else
15295   case $NICE in
15296   [\\/]* | ?:[\\/]*)
15297   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15298   ;;
15299   *)
15300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15301 for as_dir in $PATH
15302 do
15303   IFS=$as_save_IFS
15304   test -z "$as_dir" && as_dir=.
15305     for ac_exec_ext in '' $ac_executable_extensions; do
15306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15307     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15309     break 2
15310   fi
15311 done
15312   done
15313 IFS=$as_save_IFS
15314 
15315   ;;
15316 esac
15317 fi
15318 NICE=$ac_cv_path_NICE
15319 if test -n "$NICE"; then
15320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15321 $as_echo "$NICE" >&6; }
15322 else
15323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15324 $as_echo "no" >&6; }
15325 fi
15326 
15327 
15328           if test "x$NICE" = x; then
15329             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15330           fi
15331         else
15332           # Otherwise we believe it is a complete path. Use it as it is.
15333           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15334 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15335           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15336 $as_echo_n "checking for NICE... " >&6; }
15337           if test ! -x "$tool_specified"; then
15338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15339 $as_echo "not found" >&6; }
15340             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15341           fi
15342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15343 $as_echo "$tool_specified" >&6; }
15344         fi
15345       fi
15346     fi
15347 
15348   fi
15349 
15350 
15351 
15352 
15353   # Publish this variable in the help.
15354 
15355 
15356   if [ -z "${PANDOC+x}" ]; then
15357     # The variable is not set by user, try to locate tool using the code snippet
15358     for ac_prog in pandoc
15359 do
15360   # Extract the first word of "$ac_prog", so it can be a program name with args.
15361 set dummy $ac_prog; ac_word=$2
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15363 $as_echo_n "checking for $ac_word... " >&6; }
15364 if ${ac_cv_path_PANDOC+:} false; then :
15365   $as_echo_n "(cached) " >&6
15366 else
15367   case $PANDOC in
15368   [\\/]* | ?:[\\/]*)
15369   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15370   ;;
15371   *)
15372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15373 for as_dir in $PATH
15374 do
15375   IFS=$as_save_IFS
15376   test -z "$as_dir" && as_dir=.
15377     for ac_exec_ext in '' $ac_executable_extensions; do
15378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15379     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15381     break 2
15382   fi
15383 done
15384   done
15385 IFS=$as_save_IFS
15386 
15387   ;;
15388 esac
15389 fi
15390 PANDOC=$ac_cv_path_PANDOC
15391 if test -n "$PANDOC"; then
15392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15393 $as_echo "$PANDOC" >&6; }
15394 else
15395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15396 $as_echo "no" >&6; }
15397 fi
15398 
15399 
15400   test -n "$PANDOC" && break
15401 done
15402 
15403   else
15404     # The variable is set, but is it from the command line or the environment?
15405 
15406     # Try to remove the string !PANDOC! from our list.
15407     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15408     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15409       # If it failed, the variable was not from the command line. Ignore it,
15410       # but warn the user (except for BASH, which is always set by the calling BASH).
15411       if test "xPANDOC" != xBASH; then
15412         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15413 $as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15414       fi
15415       # Try to locate tool using the code snippet
15416       for ac_prog in pandoc
15417 do
15418   # Extract the first word of "$ac_prog", so it can be a program name with args.
15419 set dummy $ac_prog; ac_word=$2
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15421 $as_echo_n "checking for $ac_word... " >&6; }
15422 if ${ac_cv_path_PANDOC+:} false; then :
15423   $as_echo_n "(cached) " >&6
15424 else
15425   case $PANDOC in
15426   [\\/]* | ?:[\\/]*)
15427   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15428   ;;
15429   *)
15430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15431 for as_dir in $PATH
15432 do
15433   IFS=$as_save_IFS
15434   test -z "$as_dir" && as_dir=.
15435     for ac_exec_ext in '' $ac_executable_extensions; do
15436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15437     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15439     break 2
15440   fi
15441 done
15442   done
15443 IFS=$as_save_IFS
15444 
15445   ;;
15446 esac
15447 fi
15448 PANDOC=$ac_cv_path_PANDOC
15449 if test -n "$PANDOC"; then
15450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15451 $as_echo "$PANDOC" >&6; }
15452 else
15453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15454 $as_echo "no" >&6; }
15455 fi
15456 
15457 
15458   test -n "$PANDOC" && break
15459 done
15460 
15461     else
15462       # If it succeeded, then it was overridden by the user. We will use it
15463       # for the tool.
15464 
15465       # First remove it from the list of overridden variables, so we can test
15466       # for unknown variables in the end.
15467       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15468 
15469       # Check if we try to supply an empty value
15470       if test "x$PANDOC" = x; then
15471         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15472 $as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15473         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15474 $as_echo_n "checking for PANDOC... " >&6; }
15475         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15476 $as_echo "disabled" >&6; }
15477       else
15478         # Check if the provided tool contains a complete path.
15479         tool_specified="$PANDOC"
15480         tool_basename="${tool_specified##*/}"
15481         if test "x$tool_basename" = "x$tool_specified"; then
15482           # A command without a complete path is provided, search $PATH.
15483           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15484 $as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15485           # Extract the first word of "$tool_basename", so it can be a program name with args.
15486 set dummy $tool_basename; ac_word=$2
15487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15488 $as_echo_n "checking for $ac_word... " >&6; }
15489 if ${ac_cv_path_PANDOC+:} false; then :
15490   $as_echo_n "(cached) " >&6
15491 else
15492   case $PANDOC in
15493   [\\/]* | ?:[\\/]*)
15494   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15495   ;;
15496   *)
15497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15498 for as_dir in $PATH
15499 do
15500   IFS=$as_save_IFS
15501   test -z "$as_dir" && as_dir=.
15502     for ac_exec_ext in '' $ac_executable_extensions; do
15503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15504     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15506     break 2
15507   fi
15508 done
15509   done
15510 IFS=$as_save_IFS
15511 
15512   ;;
15513 esac
15514 fi
15515 PANDOC=$ac_cv_path_PANDOC
15516 if test -n "$PANDOC"; then
15517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15518 $as_echo "$PANDOC" >&6; }
15519 else
15520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15521 $as_echo "no" >&6; }
15522 fi
15523 
15524 
15525           if test "x$PANDOC" = x; then
15526             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15527           fi
15528         else
15529           # Otherwise we believe it is a complete path. Use it as it is.
15530           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15531 $as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15532           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15533 $as_echo_n "checking for PANDOC... " >&6; }
15534           if test ! -x "$tool_specified"; then
15535             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15536 $as_echo "not found" >&6; }
15537             as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15538           fi
15539           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15540 $as_echo "$tool_specified" >&6; }
15541         fi
15542       fi
15543     fi
15544 
15545   fi
15546 
15547 
15548 
15549 
15550 # Now we can determine OpenJDK build and target platforms. This is required to
15551 # have early on.
15552 # Make sure we can run config.sub.
15553 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15554   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15555 
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15557 $as_echo_n "checking build system type... " >&6; }
15558 if ${ac_cv_build+:} false; then :
15559   $as_echo_n "(cached) " >&6
15560 else
15561   ac_build_alias=$build_alias
15562 test "x$ac_build_alias" = x &&
15563   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15564 test "x$ac_build_alias" = x &&
15565   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15566 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15567   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15568 
15569 fi
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15571 $as_echo "$ac_cv_build" >&6; }
15572 case $ac_cv_build in
15573 *-*-*) ;;
15574 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15575 esac
15576 build=$ac_cv_build
15577 ac_save_IFS=$IFS; IFS='-'
15578 set x $ac_cv_build
15579 shift
15580 build_cpu=$1
15581 build_vendor=$2
15582 shift; shift
15583 # Remember, the first character of IFS is used to create $*,
15584 # except with old shells:
15585 build_os=$*
15586 IFS=$ac_save_IFS
15587 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15588 
15589 
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15591 $as_echo_n "checking host system type... " >&6; }
15592 if ${ac_cv_host+:} false; then :
15593   $as_echo_n "(cached) " >&6
15594 else
15595   if test "x$host_alias" = x; then
15596   ac_cv_host=$ac_cv_build
15597 else
15598   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15599     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15600 fi
15601 
15602 fi
15603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15604 $as_echo "$ac_cv_host" >&6; }
15605 case $ac_cv_host in
15606 *-*-*) ;;
15607 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15608 esac
15609 host=$ac_cv_host
15610 ac_save_IFS=$IFS; IFS='-'
15611 set x $ac_cv_host
15612 shift
15613 host_cpu=$1
15614 host_vendor=$2
15615 shift; shift
15616 # Remember, the first character of IFS is used to create $*,
15617 # except with old shells:
15618 host_os=$*
15619 IFS=$ac_save_IFS
15620 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15621 
15622 
15623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15624 $as_echo_n "checking target system type... " >&6; }
15625 if ${ac_cv_target+:} false; then :
15626   $as_echo_n "(cached) " >&6
15627 else
15628   if test "x$target_alias" = x; then
15629   ac_cv_target=$ac_cv_host
15630 else
15631   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15632     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15633 fi
15634 
15635 fi
15636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15637 $as_echo "$ac_cv_target" >&6; }
15638 case $ac_cv_target in
15639 *-*-*) ;;
15640 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15641 esac
15642 target=$ac_cv_target
15643 ac_save_IFS=$IFS; IFS='-'
15644 set x $ac_cv_target
15645 shift
15646 target_cpu=$1
15647 target_vendor=$2
15648 shift; shift
15649 # Remember, the first character of IFS is used to create $*,
15650 # except with old shells:
15651 target_os=$*
15652 IFS=$ac_save_IFS
15653 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15654 
15655 
15656 # The aliases save the names the user supplied, while $host etc.
15657 # will get canonicalized.
15658 test -n "$target_alias" &&
15659   test "$program_prefix$program_suffix$program_transform_name" = \
15660     NONENONEs,x,x, &&
15661   program_prefix=${target_alias}-
15662 
15663   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15664   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15665   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15666   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15667   # to use the configure naming style.
15668 
15669 
15670 
15671 
15672 
15673   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15674   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15675   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15676   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15677   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15678   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15679 
15680 
15681 
15682   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15683 
15684   case "$build_os" in
15685     *linux*)
15686       VAR_OS=linux
15687       VAR_OS_TYPE=unix
15688       ;;
15689     *solaris*)
15690       VAR_OS=solaris
15691       VAR_OS_TYPE=unix
15692       ;;
15693     *darwin*)
15694       VAR_OS=macosx
15695       VAR_OS_TYPE=unix
15696       ;;
15697     *bsd*)
15698       VAR_OS=bsd
15699       VAR_OS_TYPE=unix
15700       ;;
15701     *cygwin*)
15702       VAR_OS=windows
15703       VAR_OS_ENV=windows.cygwin
15704       ;;
15705     *mingw*)
15706       VAR_OS=windows
15707       VAR_OS_ENV=windows.msys
15708       ;;
15709     *aix*)
15710       VAR_OS=aix
15711       VAR_OS_TYPE=unix
15712       ;;
15713     *)
15714       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15715       ;;
15716   esac
15717 
15718 
15719   # First argument is the cpu name from the trip/quad
15720   case "$build_cpu" in
15721     x86_64)
15722       VAR_CPU=x86_64
15723       VAR_CPU_ARCH=x86
15724       VAR_CPU_BITS=64
15725       VAR_CPU_ENDIAN=little
15726       ;;
15727     i?86)
15728       VAR_CPU=x86
15729       VAR_CPU_ARCH=x86
15730       VAR_CPU_BITS=32
15731       VAR_CPU_ENDIAN=little
15732       ;;
15733     alpha*)
15734       VAR_CPU=alpha
15735       VAR_CPU_ARCH=alpha
15736       VAR_CPU_BITS=64
15737       VAR_CPU_ENDIAN=little
15738       ;;
15739     arm*)
15740       VAR_CPU=arm
15741       VAR_CPU_ARCH=arm
15742       VAR_CPU_BITS=32
15743       VAR_CPU_ENDIAN=little
15744       ;;
15745     aarch64)
15746       VAR_CPU=aarch64
15747       VAR_CPU_ARCH=aarch64
15748       VAR_CPU_BITS=64
15749       VAR_CPU_ENDIAN=little
15750       ;;
15751     m68k)
15752       VAR_CPU=m68k
15753       VAR_CPU_ARCH=m68k
15754       VAR_CPU_BITS=32
15755       VAR_CPU_ENDIAN=big
15756       ;;
15757     mips)
15758       VAR_CPU=mips
15759       VAR_CPU_ARCH=mips
15760       VAR_CPU_BITS=32
15761       VAR_CPU_ENDIAN=big
15762       ;;
15763     mipsel)
15764       VAR_CPU=mipsel
15765       VAR_CPU_ARCH=mipsel
15766       VAR_CPU_BITS=32
15767       VAR_CPU_ENDIAN=little
15768       ;;
15769     mips64)
15770       VAR_CPU=mips64
15771       VAR_CPU_ARCH=mips64
15772       VAR_CPU_BITS=64
15773       VAR_CPU_ENDIAN=big
15774       ;;
15775     mips64el)
15776       VAR_CPU=mips64el
15777       VAR_CPU_ARCH=mips64el
15778       VAR_CPU_BITS=64
15779       VAR_CPU_ENDIAN=little
15780       ;;
15781     powerpc)
15782       VAR_CPU=ppc
15783       VAR_CPU_ARCH=ppc
15784       VAR_CPU_BITS=32
15785       VAR_CPU_ENDIAN=big
15786       ;;
15787     powerpc64)
15788       VAR_CPU=ppc64
15789       VAR_CPU_ARCH=ppc
15790       VAR_CPU_BITS=64
15791       VAR_CPU_ENDIAN=big
15792       ;;
15793     powerpc64le)
15794       VAR_CPU=ppc64le
15795       VAR_CPU_ARCH=ppc
15796       VAR_CPU_BITS=64
15797       VAR_CPU_ENDIAN=little
15798       ;;
15799     s390)
15800       VAR_CPU=s390
15801       VAR_CPU_ARCH=s390
15802       VAR_CPU_BITS=32
15803       VAR_CPU_ENDIAN=big
15804       ;;
15805     s390x)
15806       VAR_CPU=s390x
15807       VAR_CPU_ARCH=s390
15808       VAR_CPU_BITS=64
15809       VAR_CPU_ENDIAN=big
15810       ;;
15811     sh*eb)
15812       VAR_CPU=sh
15813       VAR_CPU_ARCH=sh
15814       VAR_CPU_BITS=32
15815       VAR_CPU_ENDIAN=big
15816       ;;
15817     sh*)
15818       VAR_CPU=sh
15819       VAR_CPU_ARCH=sh
15820       VAR_CPU_BITS=32
15821       VAR_CPU_ENDIAN=little
15822       ;;
15823     sparc)
15824       VAR_CPU=sparc
15825       VAR_CPU_ARCH=sparc
15826       VAR_CPU_BITS=32
15827       VAR_CPU_ENDIAN=big
15828       ;;
15829     sparcv9|sparc64)
15830       VAR_CPU=sparcv9
15831       VAR_CPU_ARCH=sparc
15832       VAR_CPU_BITS=64
15833       VAR_CPU_ENDIAN=big
15834       ;;
15835     *)
15836       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15837       ;;
15838   esac
15839 
15840   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15841   OPENJDK_BUILD_OS="$VAR_OS"
15842   if test "x$VAR_OS_TYPE" != x; then
15843     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15844   else
15845     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15846   fi
15847   if test "x$VAR_OS_ENV" != x; then
15848     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15849   else
15850     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15851   fi
15852   OPENJDK_BUILD_CPU="$VAR_CPU"
15853   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15854   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15855   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15856 
15857 
15858 
15859 
15860 
15861 
15862 
15863 
15864   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15865 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15867 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15868 
15869   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15870 
15871   case "$host_os" in
15872     *linux*)
15873       VAR_OS=linux
15874       VAR_OS_TYPE=unix
15875       ;;
15876     *solaris*)
15877       VAR_OS=solaris
15878       VAR_OS_TYPE=unix
15879       ;;
15880     *darwin*)
15881       VAR_OS=macosx
15882       VAR_OS_TYPE=unix
15883       ;;
15884     *bsd*)
15885       VAR_OS=bsd
15886       VAR_OS_TYPE=unix
15887       ;;
15888     *cygwin*)
15889       VAR_OS=windows
15890       VAR_OS_ENV=windows.cygwin
15891       ;;
15892     *mingw*)
15893       VAR_OS=windows
15894       VAR_OS_ENV=windows.msys
15895       ;;
15896     *aix*)
15897       VAR_OS=aix
15898       VAR_OS_TYPE=unix
15899       ;;
15900     *)
15901       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15902       ;;
15903   esac
15904 
15905 
15906   # First argument is the cpu name from the trip/quad
15907   case "$host_cpu" in
15908     x86_64)
15909       VAR_CPU=x86_64
15910       VAR_CPU_ARCH=x86
15911       VAR_CPU_BITS=64
15912       VAR_CPU_ENDIAN=little
15913       ;;
15914     i?86)
15915       VAR_CPU=x86
15916       VAR_CPU_ARCH=x86
15917       VAR_CPU_BITS=32
15918       VAR_CPU_ENDIAN=little
15919       ;;
15920     alpha*)
15921       VAR_CPU=alpha
15922       VAR_CPU_ARCH=alpha
15923       VAR_CPU_BITS=64
15924       VAR_CPU_ENDIAN=little
15925       ;;
15926     arm*)
15927       VAR_CPU=arm
15928       VAR_CPU_ARCH=arm
15929       VAR_CPU_BITS=32
15930       VAR_CPU_ENDIAN=little
15931       ;;
15932     aarch64)
15933       VAR_CPU=aarch64
15934       VAR_CPU_ARCH=aarch64
15935       VAR_CPU_BITS=64
15936       VAR_CPU_ENDIAN=little
15937       ;;
15938     m68k)
15939       VAR_CPU=m68k
15940       VAR_CPU_ARCH=m68k
15941       VAR_CPU_BITS=32
15942       VAR_CPU_ENDIAN=big
15943       ;;
15944     mips)
15945       VAR_CPU=mips
15946       VAR_CPU_ARCH=mips
15947       VAR_CPU_BITS=32
15948       VAR_CPU_ENDIAN=big
15949       ;;
15950     mipsel)
15951       VAR_CPU=mipsel
15952       VAR_CPU_ARCH=mipsel
15953       VAR_CPU_BITS=32
15954       VAR_CPU_ENDIAN=little
15955       ;;
15956     mips64)
15957       VAR_CPU=mips64
15958       VAR_CPU_ARCH=mips64
15959       VAR_CPU_BITS=64
15960       VAR_CPU_ENDIAN=big
15961       ;;
15962     mips64el)
15963       VAR_CPU=mips64el
15964       VAR_CPU_ARCH=mips64el
15965       VAR_CPU_BITS=64
15966       VAR_CPU_ENDIAN=little
15967       ;;
15968     powerpc)
15969       VAR_CPU=ppc
15970       VAR_CPU_ARCH=ppc
15971       VAR_CPU_BITS=32
15972       VAR_CPU_ENDIAN=big
15973       ;;
15974     powerpc64)
15975       VAR_CPU=ppc64
15976       VAR_CPU_ARCH=ppc
15977       VAR_CPU_BITS=64
15978       VAR_CPU_ENDIAN=big
15979       ;;
15980     powerpc64le)
15981       VAR_CPU=ppc64le
15982       VAR_CPU_ARCH=ppc
15983       VAR_CPU_BITS=64
15984       VAR_CPU_ENDIAN=little
15985       ;;
15986     s390)
15987       VAR_CPU=s390
15988       VAR_CPU_ARCH=s390
15989       VAR_CPU_BITS=32
15990       VAR_CPU_ENDIAN=big
15991       ;;
15992     s390x)
15993       VAR_CPU=s390x
15994       VAR_CPU_ARCH=s390
15995       VAR_CPU_BITS=64
15996       VAR_CPU_ENDIAN=big
15997       ;;
15998     sh*eb)
15999       VAR_CPU=sh
16000       VAR_CPU_ARCH=sh
16001       VAR_CPU_BITS=32
16002       VAR_CPU_ENDIAN=big
16003       ;;
16004     sh*)
16005       VAR_CPU=sh
16006       VAR_CPU_ARCH=sh
16007       VAR_CPU_BITS=32
16008       VAR_CPU_ENDIAN=little
16009       ;;
16010     sparc)
16011       VAR_CPU=sparc
16012       VAR_CPU_ARCH=sparc
16013       VAR_CPU_BITS=32
16014       VAR_CPU_ENDIAN=big
16015       ;;
16016     sparcv9|sparc64)
16017       VAR_CPU=sparcv9
16018       VAR_CPU_ARCH=sparc
16019       VAR_CPU_BITS=64
16020       VAR_CPU_ENDIAN=big
16021       ;;
16022     *)
16023       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
16024       ;;
16025   esac
16026 
16027   # ... and setup our own variables. (Do this explicitly to facilitate searching)
16028   OPENJDK_TARGET_OS="$VAR_OS"
16029   if test "x$VAR_OS_TYPE" != x; then
16030     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
16031   else
16032     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
16033   fi
16034   if test "x$VAR_OS_ENV" != x; then
16035     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
16036   else
16037     OPENJDK_TARGET_OS_ENV="$VAR_OS"
16038   fi
16039   OPENJDK_TARGET_CPU="$VAR_CPU"
16040   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
16041   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
16042   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
16043 
16044 
16045 
16046 
16047 
16048 
16049 
16050 
16051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16052 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
16053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16054 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16055 
16056 
16057 
16058 # Check whether --with-target-bits was given.
16059 if test "${with_target_bits+set}" = set; then :
16060   withval=$with_target_bits;
16061 fi
16062 
16063 
16064   # We have three types of compiles:
16065   # native  == normal compilation, target system == build system
16066   # cross   == traditional cross compilation, target system != build system; special toolchain needed
16067   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16068   #
16069   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16070     # We're doing a proper cross-compilation
16071     COMPILE_TYPE="cross"
16072   else
16073     COMPILE_TYPE="native"
16074   fi
16075 
16076   if test "x$with_target_bits" != x; then
16077     if test "x$COMPILE_TYPE" = "xcross"; then
16078       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16079     fi
16080 
16081     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16082       # A reduced build is requested
16083       COMPILE_TYPE="reduced"
16084       OPENJDK_TARGET_CPU_BITS=32
16085       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16086         OPENJDK_TARGET_CPU=x86
16087       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16088         OPENJDK_TARGET_CPU=sparc
16089       else
16090         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16091       fi
16092     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16093       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
16094     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16095       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16096 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16097     else
16098       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16099     fi
16100   fi
16101 
16102 
16103   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16104 $as_echo_n "checking compilation type... " >&6; }
16105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16106 $as_echo "$COMPILE_TYPE" >&6; }
16107 
16108 
16109   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16110     OPENJDK_MODULE_TARGET_OS_NAME="macos"
16111   else
16112     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16113   fi
16114 
16115   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16116     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16117   else
16118     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16119   fi
16120 
16121   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16122 
16123 
16124 
16125   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16126     RELEASE_FILE_OS_NAME=SunOS
16127   fi
16128   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16129     RELEASE_FILE_OS_NAME=Linux
16130   fi
16131   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16132     RELEASE_FILE_OS_NAME=Windows
16133   fi
16134   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16135     RELEASE_FILE_OS_NAME="Darwin"
16136   fi
16137   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16138     RELEASE_FILE_OS_NAME="AIX"
16139   fi
16140   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16141 
16142 
16143 
16144 
16145 
16146 
16147   # Also store the legacy naming of the cpu.
16148   # Ie i586 and amd64 instead of x86 and x86_64
16149   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16150   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16151     OPENJDK_TARGET_CPU_LEGACY="i586"
16152   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16153     # On all platforms except MacOSX replace x86_64 with amd64.
16154     OPENJDK_TARGET_CPU_LEGACY="amd64"
16155   elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
16156     # Avoid name collisions with variables named alpha
16157     OPENJDK_TARGET_CPU_LEGACY="_alpha_"
16158   elif test "x$OPENJDK_TARGET_CPU" = xsh; then
16159     # Avoid name collisions with variables named sh
16160     OPENJDK_TARGET_CPU_LEGACY="_sh_"
16161   fi
16162 
16163 
16164   # And the second legacy naming of the cpu.
16165   # Ie i386 and amd64 instead of x86 and x86_64.
16166   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16167   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16168     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16169   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16170     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16171   fi
16172 
16173 
16174   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16175   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16176   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16177   OPENJDK_TARGET_CPU_ISADIR=""
16178   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16179     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16180       OPENJDK_TARGET_CPU_ISADIR="/amd64"
16181     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16182       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16183     fi
16184   fi
16185 
16186 
16187   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16188   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16189   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16190     # On linux only, we replace x86 with i386.
16191     OPENJDK_TARGET_CPU_OSARCH="i386"
16192   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16193     # On all platforms except macosx, we replace x86_64 with amd64.
16194     OPENJDK_TARGET_CPU_OSARCH="amd64"
16195   fi
16196 
16197 
16198   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16199   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16200     OPENJDK_TARGET_CPU_JLI="i386"
16201   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16202     # On all platforms except macosx, we replace x86_64 with amd64.
16203     OPENJDK_TARGET_CPU_JLI="amd64"
16204   fi
16205 
16206   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16207       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16208   else
16209       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16210   fi
16211 
16212 
16213   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16214   # Macosx is osx and x86_64 is x64
16215   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16216     OPENJDK_TARGET_OS_BUNDLE="osx"
16217   else
16218     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16219   fi
16220   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16221     OPENJDK_TARGET_CPU_BUNDLE="x64"
16222   else
16223     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16224   fi
16225   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16226 
16227 
16228   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16229     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16230     # unpack200.exe. This variable is used in
16231     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16232     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16233       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16234     fi
16235   fi
16236 
16237   if test "x$COMPILE_TYPE" = "xcross"; then
16238     # FIXME: ... or should this include reduced builds..?
16239     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16240   else
16241     DEFINE_CROSS_COMPILE_ARCH=""
16242   fi
16243 
16244 
16245   # Convert openjdk platform names to hotspot names
16246 
16247   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16248   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16249     HOTSPOT_TARGET_OS=bsd
16250   fi
16251 
16252 
16253   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16254   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16255     HOTSPOT_TARGET_OS_TYPE=posix
16256   fi
16257 
16258 
16259   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16260   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16261     HOTSPOT_TARGET_CPU=x86_32
16262   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16263     HOTSPOT_TARGET_CPU=sparc
16264   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16265     HOTSPOT_TARGET_CPU=ppc_64
16266   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16267     HOTSPOT_TARGET_CPU=ppc_64
16268   fi
16269 
16270 
16271   # This is identical with OPENJDK_*, but define anyway for consistency.
16272   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16273 
16274 
16275   # Setup HOTSPOT_TARGET_CPU_DEFINE
16276   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16277     HOTSPOT_TARGET_CPU_DEFINE=IA32
16278   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16279     HOTSPOT_TARGET_CPU_DEFINE=AMD64
16280   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16281     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16282   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16283     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16284   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16285     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16286   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16287     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16288 
16289   # The cpu defines below are for zero, we don't support them directly.
16290   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16291     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16292   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16293     HOTSPOT_TARGET_CPU_DEFINE=PPC32
16294   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16295     HOTSPOT_TARGET_CPU_DEFINE=S390
16296   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16297     HOTSPOT_TARGET_CPU_DEFINE=S390
16298   elif test "x$OPENJDK_TARGET_CPU" != x; then
16299     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16300   fi
16301 
16302 
16303 
16304 
16305   # Also store the legacy naming of the cpu.
16306   # Ie i586 and amd64 instead of x86 and x86_64
16307   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16308   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16309     OPENJDK_BUILD_CPU_LEGACY="i586"
16310   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16311     # On all platforms except MacOSX replace x86_64 with amd64.
16312     OPENJDK_BUILD_CPU_LEGACY="amd64"
16313   elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
16314     # Avoid name collisions with variables named alpha
16315     OPENJDK_BUILD_CPU_LEGACY="_alpha_"
16316   elif test "x$OPENJDK_BUILD_CPU" = xsh; then
16317     # Avoid name collisions with variables named sh
16318     OPENJDK_BUILD_CPU_LEGACY="_sh_"
16319   fi
16320 
16321 
16322   # And the second legacy naming of the cpu.
16323   # Ie i386 and amd64 instead of x86 and x86_64.
16324   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16325   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16326     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16327   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16328     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16329   fi
16330 
16331 
16332   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16333   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16334   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16335   OPENJDK_BUILD_CPU_ISADIR=""
16336   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16337     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16338       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16339     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16340       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16341     fi
16342   fi
16343 
16344 
16345   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16346   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16347   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16348     # On linux only, we replace x86 with i386.
16349     OPENJDK_BUILD_CPU_OSARCH="i386"
16350   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16351     # On all platforms except macosx, we replace x86_64 with amd64.
16352     OPENJDK_BUILD_CPU_OSARCH="amd64"
16353   fi
16354 
16355 
16356   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16357   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16358     OPENJDK_BUILD_CPU_JLI="i386"
16359   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16360     # On all platforms except macosx, we replace x86_64 with amd64.
16361     OPENJDK_BUILD_CPU_JLI="amd64"
16362   fi
16363 
16364   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16365       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16366   else
16367       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16368   fi
16369 
16370 
16371   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16372   # Macosx is osx and x86_64 is x64
16373   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16374     OPENJDK_BUILD_OS_BUNDLE="osx"
16375   else
16376     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16377   fi
16378   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16379     OPENJDK_BUILD_CPU_BUNDLE="x64"
16380   else
16381     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16382   fi
16383   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16384 
16385 
16386   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16387     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16388     # unpack200.exe. This variable is used in
16389     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16390     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16391       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16392     fi
16393   fi
16394 
16395   if test "x$COMPILE_TYPE" = "xcross"; then
16396     # FIXME: ... or should this include reduced builds..?
16397     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16398   else
16399     DEFINE_CROSS_COMPILE_ARCH=""
16400   fi
16401 
16402 
16403   # Convert openjdk platform names to hotspot names
16404 
16405   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16406   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16407     HOTSPOT_BUILD_OS=bsd
16408   fi
16409 
16410 
16411   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16412   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16413     HOTSPOT_BUILD_OS_TYPE=posix
16414   fi
16415 
16416 
16417   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16418   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16419     HOTSPOT_BUILD_CPU=x86_32
16420   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16421     HOTSPOT_BUILD_CPU=sparc
16422   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16423     HOTSPOT_BUILD_CPU=ppc_64
16424   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16425     HOTSPOT_BUILD_CPU=ppc_64
16426   fi
16427 
16428 
16429   # This is identical with OPENJDK_*, but define anyway for consistency.
16430   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16431 
16432 
16433   # Setup HOTSPOT_BUILD_CPU_DEFINE
16434   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16435     HOTSPOT_BUILD_CPU_DEFINE=IA32
16436   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16437     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16438   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16439     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16440   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16441     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16442   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16443     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16444   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16445     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16446 
16447   # The cpu defines below are for zero, we don't support them directly.
16448   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16449     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16450   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16451     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16452   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16453     HOTSPOT_BUILD_CPU_DEFINE=S390
16454   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16455     HOTSPOT_BUILD_CPU_DEFINE=S390
16456   elif test "x$OPENJDK_BUILD_CPU" != x; then
16457     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16458   fi
16459 
16460 
16461 
16462 
16463 
16464 
16465 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16466 
16467   # Save the current directory this script was started from
16468   CURDIR="$PWD"
16469 
16470   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16471   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16472   # was not available at that time.
16473   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16474   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16475     ORIGINAL_PATH="$REWRITTEN_PATH"
16476     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16477 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16478   fi
16479 
16480   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16481     PATH_SEP=";"
16482 
16483   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16484   if test $SRC_ROOT_LENGTH -gt 100; then
16485     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16486   fi
16487 
16488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16489     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16490 $as_echo_n "checking cygwin release... " >&6; }
16491     CYGWIN_VERSION=`$UNAME -r`
16492     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16493 $as_echo "$CYGWIN_VERSION" >&6; }
16494     WINDOWS_ENV_VENDOR='cygwin'
16495     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16496 
16497     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16498     if test "x$CYGWIN_VERSION_OLD" != x; then
16499       { $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
16500 $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;}
16501       as_fn_error $? "Cannot continue" "$LINENO" 5
16502     fi
16503     if test "x$CYGPATH" = x; then
16504       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16505     fi
16506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16507 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16508     # The cmd output ends with Windows line endings (CR/LF)
16509     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16510     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16511     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16512     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16513 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16514     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16515     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16516     if test "x$test_cygdrive_prefix" = x; then
16517       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16518     fi
16519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16521 $as_echo_n "checking msys release... " >&6; }
16522     MSYS_VERSION=`$UNAME -r`
16523     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16524 $as_echo "$MSYS_VERSION" >&6; }
16525 
16526     WINDOWS_ENV_VENDOR='msys'
16527     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16528 
16529     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16530 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16531     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16532     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16533 
16534   windows_path="$MSYS_ROOT_PATH"
16535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16536     unix_path=`$CYGPATH -u "$windows_path"`
16537     MSYS_ROOT_PATH="$unix_path"
16538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16540     MSYS_ROOT_PATH="$unix_path"
16541   fi
16542 
16543     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16544 $as_echo "$MSYS_ROOT_PATH" >&6; }
16545     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16546   else
16547     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16548   fi
16549 
16550   # Test if windows or unix (cygwin/msys) find is first in path.
16551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16552 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16553   FIND_BINARY_OUTPUT=`find --version 2>&1`
16554   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16555     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16556 $as_echo "unix style" >&6; }
16557   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16559 $as_echo "Windows" >&6; }
16560     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16561 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16562     { $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
16563 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16564     as_fn_error $? "Cannot continue" "$LINENO" 5
16565   else
16566     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16567 $as_echo "unknown" >&6; }
16568     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16569 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16570   fi
16571 
16572   else
16573     PATH_SEP=":"
16574   fi
16575 
16576 
16577   # We get the top-level directory from the supporting wrappers.
16578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16579 $as_echo_n "checking for top-level directory... " >&6; }
16580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16581 $as_echo "$TOPDIR" >&6; }
16582 
16583 
16584   # Save the original version of TOPDIR for string comparisons
16585   ORIGINAL_TOPDIR="$TOPDIR"
16586 
16587 
16588   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16589 
16590   # Only process if variable expands to non-empty
16591 
16592   if test "x$CURDIR" != x; then
16593     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16594 
16595   # Input might be given as Windows format, start by converting to
16596   # unix format.
16597   path="$CURDIR"
16598   new_path=`$CYGPATH -u "$path"`
16599 
16600   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16601   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16602   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16603   # "foo.exe" is OK but "foo" is an error.
16604   #
16605   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16606   # It is also a way to make sure we got the proper file name for the real test later on.
16607   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16608   if test "x$test_shortpath" = x; then
16609     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16610 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16611     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16612   fi
16613 
16614   # Call helper function which possibly converts this using DOS-style short mode.
16615   # If so, the updated path is stored in $new_path.
16616 
16617   input_path="$new_path"
16618   # Check if we need to convert this using DOS-style short mode. If the path
16619   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16620   # take no chances and rewrite it.
16621   # Note: m4 eats our [], so we need to use [ and ] instead.
16622   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16623   if test "x$has_forbidden_chars" != x; then
16624     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16625     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16626     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16627     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16628       # Going to short mode and back again did indeed matter. Since short mode is
16629       # case insensitive, let's make it lowercase to improve readability.
16630       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16631       # Now convert it back to Unix-style (cygpath)
16632       input_path=`$CYGPATH -u "$shortmode_path"`
16633       new_path="$input_path"
16634     fi
16635   fi
16636 
16637   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16638   if test "x$test_cygdrive_prefix" = x; then
16639     # As a simple fix, exclude /usr/bin since it's not a real path.
16640     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16641       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16642       # a path prefixed by /cygdrive for fixpath to work.
16643       new_path="$CYGWIN_ROOT_PATH$input_path"
16644     fi
16645   fi
16646 
16647 
16648   if test "x$path" != "x$new_path"; then
16649     CURDIR="$new_path"
16650     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16651 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16652   fi
16653 
16654     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16655 
16656   path="$CURDIR"
16657   has_colon=`$ECHO $path | $GREP ^.:`
16658   new_path="$path"
16659   if test "x$has_colon" = x; then
16660     # Not in mixed or Windows style, start by that.
16661     new_path=`cmd //c echo $path`
16662   fi
16663 
16664 
16665   input_path="$new_path"
16666   # Check if we need to convert this using DOS-style short mode. If the path
16667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16668   # take no chances and rewrite it.
16669   # Note: m4 eats our [], so we need to use [ and ] instead.
16670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16671   if test "x$has_forbidden_chars" != x; then
16672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16673     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16674   fi
16675 
16676 
16677   windows_path="$new_path"
16678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16679     unix_path=`$CYGPATH -u "$windows_path"`
16680     new_path="$unix_path"
16681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16682     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16683     new_path="$unix_path"
16684   fi
16685 
16686   if test "x$path" != "x$new_path"; then
16687     CURDIR="$new_path"
16688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16689 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16690   fi
16691 
16692   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16693   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16694 
16695     else
16696       # We're on a unix platform. Hooray! :)
16697       path="$CURDIR"
16698       has_space=`$ECHO "$path" | $GREP " "`
16699       if test "x$has_space" != x; then
16700         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16701 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16702         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16703       fi
16704 
16705       # Use eval to expand a potential ~
16706       eval path="$path"
16707       if test ! -f "$path" && test ! -d "$path"; then
16708         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16709       fi
16710 
16711       if test -d "$path"; then
16712         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16713       else
16714         dir="`$DIRNAME "$path"`"
16715         base="`$BASENAME "$path"`"
16716         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16717       fi
16718     fi
16719   fi
16720 
16721 
16722   # Only process if variable expands to non-empty
16723 
16724   if test "x$TOPDIR" != x; then
16725     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16726 
16727   # Input might be given as Windows format, start by converting to
16728   # unix format.
16729   path="$TOPDIR"
16730   new_path=`$CYGPATH -u "$path"`
16731 
16732   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16733   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16734   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16735   # "foo.exe" is OK but "foo" is an error.
16736   #
16737   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16738   # It is also a way to make sure we got the proper file name for the real test later on.
16739   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16740   if test "x$test_shortpath" = x; then
16741     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16742 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16743     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16744   fi
16745 
16746   # Call helper function which possibly converts this using DOS-style short mode.
16747   # If so, the updated path is stored in $new_path.
16748 
16749   input_path="$new_path"
16750   # Check if we need to convert this using DOS-style short mode. If the path
16751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16752   # take no chances and rewrite it.
16753   # Note: m4 eats our [], so we need to use [ and ] instead.
16754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16755   if test "x$has_forbidden_chars" != x; then
16756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16757     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16758     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16759     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16760       # Going to short mode and back again did indeed matter. Since short mode is
16761       # case insensitive, let's make it lowercase to improve readability.
16762       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16763       # Now convert it back to Unix-style (cygpath)
16764       input_path=`$CYGPATH -u "$shortmode_path"`
16765       new_path="$input_path"
16766     fi
16767   fi
16768 
16769   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16770   if test "x$test_cygdrive_prefix" = x; then
16771     # As a simple fix, exclude /usr/bin since it's not a real path.
16772     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16773       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16774       # a path prefixed by /cygdrive for fixpath to work.
16775       new_path="$CYGWIN_ROOT_PATH$input_path"
16776     fi
16777   fi
16778 
16779 
16780   if test "x$path" != "x$new_path"; then
16781     TOPDIR="$new_path"
16782     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16783 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16784   fi
16785 
16786     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16787 
16788   path="$TOPDIR"
16789   has_colon=`$ECHO $path | $GREP ^.:`
16790   new_path="$path"
16791   if test "x$has_colon" = x; then
16792     # Not in mixed or Windows style, start by that.
16793     new_path=`cmd //c echo $path`
16794   fi
16795 
16796 
16797   input_path="$new_path"
16798   # Check if we need to convert this using DOS-style short mode. If the path
16799   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16800   # take no chances and rewrite it.
16801   # Note: m4 eats our [], so we need to use [ and ] instead.
16802   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16803   if test "x$has_forbidden_chars" != x; then
16804     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16805     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16806   fi
16807 
16808 
16809   windows_path="$new_path"
16810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16811     unix_path=`$CYGPATH -u "$windows_path"`
16812     new_path="$unix_path"
16813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16815     new_path="$unix_path"
16816   fi
16817 
16818   if test "x$path" != "x$new_path"; then
16819     TOPDIR="$new_path"
16820     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16821 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16822   fi
16823 
16824   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16825   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16826 
16827     else
16828       # We're on a unix platform. Hooray! :)
16829       path="$TOPDIR"
16830       has_space=`$ECHO "$path" | $GREP " "`
16831       if test "x$has_space" != x; then
16832         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16833 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16834         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16835       fi
16836 
16837       # Use eval to expand a potential ~
16838       eval path="$path"
16839       if test ! -f "$path" && test ! -d "$path"; then
16840         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16841       fi
16842 
16843       if test -d "$path"; then
16844         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16845       else
16846         dir="`$DIRNAME "$path"`"
16847         base="`$BASENAME "$path"`"
16848         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16849       fi
16850     fi
16851   fi
16852 
16853   # SRC_ROOT is a traditional alias for TOPDIR.
16854   SRC_ROOT=$TOPDIR
16855 
16856   # Calculate a canonical version of TOPDIR for string comparisons
16857   CANONICAL_TOPDIR=$TOPDIR
16858 
16859   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16860     # Follow a chain of symbolic links. Use readlink
16861     # where it exists, else fall back to horribly
16862     # complicated shell code.
16863     if test "x$READLINK_TESTED" != yes; then
16864       # On MacOSX there is a readlink tool with a different
16865       # purpose than the GNU readlink tool. Check the found readlink.
16866       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16867       if test "x$ISGNU" = x; then
16868         # A readlink that we do not know how to use.
16869         # Are there other non-GNU readlinks out there?
16870         READLINK_TESTED=yes
16871         READLINK=
16872       fi
16873     fi
16874 
16875     if test "x$READLINK" != x; then
16876       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16877     else
16878       # Save the current directory for restoring afterwards
16879       STARTDIR=$PWD
16880       COUNTER=0
16881       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16882       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16883       cd $sym_link_dir
16884       # Use -P flag to resolve symlinks in directories.
16885       cd `$THEPWDCMD -P`
16886       sym_link_dir=`$THEPWDCMD -P`
16887       # Resolve file symlinks
16888       while test $COUNTER -lt 20; do
16889         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16890         if test "x$ISLINK" == x; then
16891           # This is not a symbolic link! We are done!
16892           break
16893         fi
16894         # Again resolve directory symlinks since the target of the just found
16895         # link could be in a different directory
16896         cd `$DIRNAME $ISLINK`
16897         sym_link_dir=`$THEPWDCMD -P`
16898         sym_link_file=`$BASENAME $ISLINK`
16899         let COUNTER=COUNTER+1
16900       done
16901       cd $STARTDIR
16902       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16903     fi
16904   fi
16905 
16906 
16907 
16908   # Locate the directory of this script.
16909   AUTOCONF_DIR=$TOPDIR/make/autoconf
16910 
16911   # Setup username (for use in adhoc version strings etc)
16912   # Outer [ ] to quote m4.
16913    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16914 
16915 
16916 
16917 # Check if it's a pure open build or if custom sources are to be used.
16918 
16919   # Check whether --enable-openjdk-only was given.
16920 if test "${enable_openjdk_only+set}" = set; then :
16921   enableval=$enable_openjdk_only;
16922 else
16923   enable_openjdk_only="no"
16924 fi
16925 
16926 
16927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16928 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16930 $as_echo "$enable_openjdk_only" >&6; }
16931   if test "x$enable_openjdk_only" = "xyes"; then
16932     SUPPRESS_CUSTOM_EXTENSIONS="true"
16933   elif test "x$enable_openjdk_only" = "xno"; then
16934     SUPPRESS_CUSTOM_EXTENSIONS="false"
16935   else
16936     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16937   fi
16938 
16939   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16940   # the IncludeCustomExtension macro.
16941 
16942 
16943 # Check whether --with-custom-make-dir was given.
16944 if test "${with_custom_make_dir+set}" = set; then :
16945   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
16946 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16947 fi
16948 
16949 
16950 
16951 
16952 # These are needed to be able to create a configuration name (and thus the output directory)
16953 
16954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16955 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16956 
16957 # Check whether --with-jdk-variant was given.
16958 if test "${with_jdk_variant+set}" = set; then :
16959   withval=$with_jdk_variant;
16960 fi
16961 
16962 
16963   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16964     JDK_VARIANT="normal"
16965   else
16966     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16967   fi
16968 
16969 
16970 
16971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16972 $as_echo "$JDK_VARIANT" >&6; }
16973 
16974 
16975   DEBUG_LEVEL="release"
16976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16977 $as_echo_n "checking which debug level to use... " >&6; }
16978   # Check whether --enable-debug was given.
16979 if test "${enable_debug+set}" = set; then :
16980   enableval=$enable_debug;
16981         ENABLE_DEBUG="${enableval}"
16982         DEBUG_LEVEL="fastdebug"
16983 
16984 else
16985   ENABLE_DEBUG="no"
16986 fi
16987 
16988 
16989 
16990 # Check whether --with-debug-level was given.
16991 if test "${with_debug_level+set}" = set; then :
16992   withval=$with_debug_level;
16993         DEBUG_LEVEL="${withval}"
16994         if test "x$ENABLE_DEBUG" = xyes; then
16995           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16996         fi
16997 
16998 fi
16999 
17000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
17001 $as_echo "$DEBUG_LEVEL" >&6; }
17002 
17003   if test "x$DEBUG_LEVEL" != xrelease && \
17004       test "x$DEBUG_LEVEL" != xoptimized && \
17005       test "x$DEBUG_LEVEL" != xfastdebug && \
17006       test "x$DEBUG_LEVEL" != xslowdebug; then
17007     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
17008   fi
17009 
17010   # Translate DEBUG_LEVEL to debug level used by Hotspot
17011   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
17012   if test "x$DEBUG_LEVEL" = xrelease; then
17013     HOTSPOT_DEBUG_LEVEL="product"
17014   elif test "x$DEBUG_LEVEL" = xslowdebug; then
17015     HOTSPOT_DEBUG_LEVEL="debug"
17016   fi
17017 
17018   if test "x$DEBUG_LEVEL" = xoptimized; then
17019     # The debug level 'optimized' is a little special because it is currently only
17020     # applicable to the HotSpot build where it means to build a completely
17021     # optimized version of the VM without any debugging code (like for the
17022     # 'release' debug level which is called 'product' in the HotSpot build) but
17023     # with the exception that it can contain additional code which is otherwise
17024     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
17025     # test new and/or experimental features which are not intended for customer
17026     # shipment. Because these new features need to be tested and benchmarked in
17027     # real world scenarios, we want to build the containing JDK at the 'release'
17028     # debug level.
17029     DEBUG_LEVEL="release"
17030   fi
17031 
17032 
17033 
17034 
17035 
17036 
17037 # Check whether --with-jvm-variants was given.
17038 if test "${with_jvm_variants+set}" = set; then :
17039   withval=$with_jvm_variants;
17040 fi
17041 
17042 
17043 
17044 
17045 # Check whether --with-cpu-port was given.
17046 if test "${with_cpu_port+set}" = set; then :
17047   withval=$with_cpu_port;
17048 fi
17049 
17050 
17051   if test "x$with_cpu_port" != x; then
17052     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17053       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17054     fi
17055     if test "x$with_cpu_port" != xarm64 && \
17056         test "x$with_cpu_port" != xaarch64; then
17057       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17058     fi
17059     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17060   fi
17061 
17062 
17063   if test "x$with_jvm_variants" = x; then
17064     with_jvm_variants="server"
17065   fi
17066   JVM_VARIANTS_OPT="$with_jvm_variants"
17067 
17068   # Has the user listed more than one variant?
17069   # Additional [] needed to keep m4 from mangling shell constructs.
17070   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17071     BUILDING_MULTIPLE_JVM_VARIANTS=true
17072   else
17073     BUILDING_MULTIPLE_JVM_VARIANTS=false
17074   fi
17075   # Replace the commas with AND for use in the build directory name.
17076   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17077 
17078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17079 $as_echo_n "checking which variants of the JVM to build... " >&6; }
17080   # JVM_VARIANTS is a space-separated list.
17081   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17082   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17084 $as_echo "$JVM_VARIANTS" >&6; }
17085 
17086   # Check that the selected variants are valid
17087 
17088   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17089   # Notice that the original variant failes on SLES 10 and 11
17090   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17091   STACK=${JVM_VARIANTS// /$'\n'}
17092   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17093   if test "x$INVALID_VARIANTS" != x; then
17094     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17095 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17096     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17097   fi
17098 
17099   # All "special" variants share the same output directory ("server")
17100   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17101   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17102   STACK=${JVM_VARIANTS// /$'\n'}
17103   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17104   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17105     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17106   fi
17107 
17108   # The "main" variant is the one used by other libs to link against during the
17109   # build.
17110   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17111     MAIN_VARIANT_PRIO_ORDER="server client minimal"
17112     for variant in $MAIN_VARIANT_PRIO_ORDER; do
17113       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17114         JVM_VARIANT_MAIN="$variant"
17115         break
17116       fi
17117     done
17118   else
17119     JVM_VARIANT_MAIN="$JVM_VARIANTS"
17120   fi
17121 
17122 
17123 
17124 
17125 
17126   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17127     # zero behaves as a platform and rewrites these values. This is really weird. :(
17128     # We are guaranteed that we do not build any other variants when building zero.
17129     HOTSPOT_TARGET_CPU=zero
17130     HOTSPOT_TARGET_CPU_ARCH=zero
17131   fi
17132 
17133 
17134 # With basic setup done, call the custom early hook.
17135 
17136 
17137 # Check if we have devkits, extra paths or sysroot set.
17138 
17139 
17140 # Check whether --with-devkit was given.
17141 if test "${with_devkit+set}" = set; then :
17142   withval=$with_devkit;
17143 
17144   # Only process if variable expands to non-empty
17145 
17146   if test "x$with_devkit" != x; then
17147     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17148 
17149   # Input might be given as Windows format, start by converting to
17150   # unix format.
17151   path="$with_devkit"
17152   new_path=`$CYGPATH -u "$path"`
17153 
17154   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17155   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17156   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17157   # "foo.exe" is OK but "foo" is an error.
17158   #
17159   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17160   # It is also a way to make sure we got the proper file name for the real test later on.
17161   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17162   if test "x$test_shortpath" = x; then
17163     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17164 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17165     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17166   fi
17167 
17168   # Call helper function which possibly converts this using DOS-style short mode.
17169   # If so, the updated path is stored in $new_path.
17170 
17171   input_path="$new_path"
17172   # Check if we need to convert this using DOS-style short mode. If the path
17173   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17174   # take no chances and rewrite it.
17175   # Note: m4 eats our [], so we need to use [ and ] instead.
17176   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17177   if test "x$has_forbidden_chars" != x; then
17178     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17179     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17180     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17181     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17182       # Going to short mode and back again did indeed matter. Since short mode is
17183       # case insensitive, let's make it lowercase to improve readability.
17184       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17185       # Now convert it back to Unix-style (cygpath)
17186       input_path=`$CYGPATH -u "$shortmode_path"`
17187       new_path="$input_path"
17188     fi
17189   fi
17190 
17191   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17192   if test "x$test_cygdrive_prefix" = x; then
17193     # As a simple fix, exclude /usr/bin since it's not a real path.
17194     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17195       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17196       # a path prefixed by /cygdrive for fixpath to work.
17197       new_path="$CYGWIN_ROOT_PATH$input_path"
17198     fi
17199   fi
17200 
17201 
17202   if test "x$path" != "x$new_path"; then
17203     with_devkit="$new_path"
17204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17205 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17206   fi
17207 
17208     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17209 
17210   path="$with_devkit"
17211   has_colon=`$ECHO $path | $GREP ^.:`
17212   new_path="$path"
17213   if test "x$has_colon" = x; then
17214     # Not in mixed or Windows style, start by that.
17215     new_path=`cmd //c echo $path`
17216   fi
17217 
17218 
17219   input_path="$new_path"
17220   # Check if we need to convert this using DOS-style short mode. If the path
17221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17222   # take no chances and rewrite it.
17223   # Note: m4 eats our [], so we need to use [ and ] instead.
17224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17225   if test "x$has_forbidden_chars" != x; then
17226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17227     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17228   fi
17229 
17230 
17231   windows_path="$new_path"
17232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17233     unix_path=`$CYGPATH -u "$windows_path"`
17234     new_path="$unix_path"
17235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17237     new_path="$unix_path"
17238   fi
17239 
17240   if test "x$path" != "x$new_path"; then
17241     with_devkit="$new_path"
17242     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17243 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17244   fi
17245 
17246   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17247   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17248 
17249     else
17250       # We're on a unix platform. Hooray! :)
17251       path="$with_devkit"
17252       has_space=`$ECHO "$path" | $GREP " "`
17253       if test "x$has_space" != x; then
17254         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17255 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17256         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17257       fi
17258 
17259       # Use eval to expand a potential ~
17260       eval path="$path"
17261       if test ! -f "$path" && test ! -d "$path"; then
17262         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17263       fi
17264 
17265       if test -d "$path"; then
17266         with_devkit="`cd "$path"; $THEPWDCMD -L`"
17267       else
17268         dir="`$DIRNAME "$path"`"
17269         base="`$BASENAME "$path"`"
17270         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17271       fi
17272     fi
17273   fi
17274 
17275         DEVKIT_ROOT="$with_devkit"
17276         # Check for a meta data info file in the root of the devkit
17277         if test -f "$DEVKIT_ROOT/devkit.info"; then
17278           . $DEVKIT_ROOT/devkit.info
17279           # This potentially sets the following:
17280           # A descriptive name of the devkit
17281 
17282   if test "x$DEVKIT_NAME" = x; then
17283     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17284   fi
17285 
17286           # Corresponds to --with-extra-path
17287 
17288   if test "x$DEVKIT_EXTRA_PATH" = x; then
17289     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17290   fi
17291 
17292           # Corresponds to --with-toolchain-path
17293 
17294   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17295     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17296   fi
17297 
17298           # Corresponds to --with-sysroot
17299 
17300   if test "x$DEVKIT_SYSROOT" = x; then
17301     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17302   fi
17303 
17304 
17305           # Identifies the Visual Studio version in the devkit
17306 
17307   if test "x$DEVKIT_VS_VERSION" = x; then
17308     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17309   fi
17310 
17311           # The Visual Studio include environment variable
17312 
17313   if test "x$DEVKIT_VS_INCLUDE" = x; then
17314     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17315   fi
17316 
17317           # The Visual Studio lib environment variable
17318 
17319   if test "x$DEVKIT_VS_LIB" = x; then
17320     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17321   fi
17322 
17323           # Corresponds to --with-msvcr-dll
17324 
17325   if test "x$DEVKIT_MSVCR_DLL" = x; then
17326     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17327   fi
17328 
17329           # Corresponds to --with-msvcp-dll
17330 
17331   if test "x$DEVKIT_MSVCP_DLL" = x; then
17332     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17333   fi
17334 
17335         fi
17336 
17337         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17338 $as_echo_n "checking for devkit... " >&6; }
17339         if test "x$DEVKIT_NAME" != x; then
17340           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17341 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17342         else
17343           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17344 $as_echo "$DEVKIT_ROOT" >&6; }
17345         fi
17346 
17347 
17348   if test "x$DEVKIT_EXTRA_PATH" != x; then
17349     if test "x$EXTRA_PATH" = x; then
17350       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17351     else
17352       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17353     fi
17354   fi
17355 
17356 
17357         # Fallback default of just /bin if DEVKIT_PATH is not defined
17358         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17359           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17360         fi
17361 
17362   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17363     if test "x$TOOLCHAIN_PATH" = x; then
17364       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17365     else
17366       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17367     fi
17368   fi
17369 
17370 
17371         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17372         # places for backwards compatiblity.
17373         if test "x$DEVKIT_SYSROOT" != x; then
17374           SYSROOT="$DEVKIT_SYSROOT"
17375         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17376           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17377         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17378           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17379         fi
17380 
17381 
17382 fi
17383 
17384 
17385   # You can force the sysroot if the sysroot encoded into the compiler tools
17386   # is not correct.
17387 
17388 # Check whether --with-sys-root was given.
17389 if test "${with_sys_root+set}" = set; then :
17390   withval=$with_sys_root; SYSROOT=$with_sys_root
17391 
17392 fi
17393 
17394 
17395 
17396 # Check whether --with-sysroot was given.
17397 if test "${with_sysroot+set}" = set; then :
17398   withval=$with_sysroot; SYSROOT=$with_sysroot
17399 
17400 fi
17401 
17402 
17403 
17404 # Check whether --with-tools-dir was given.
17405 if test "${with_tools_dir+set}" = set; then :
17406   withval=$with_tools_dir;
17407   if test "x$with_tools_dir" != x; then
17408     if test "x$TOOLCHAIN_PATH" = x; then
17409       TOOLCHAIN_PATH="$with_tools_dir"
17410     else
17411       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17412     fi
17413   fi
17414 
17415 
17416 fi
17417 
17418 
17419 
17420 # Check whether --with-toolchain-path was given.
17421 if test "${with_toolchain_path+set}" = set; then :
17422   withval=$with_toolchain_path;
17423   if test "x$with_toolchain_path" != x; then
17424     if test "x$TOOLCHAIN_PATH" = x; then
17425       TOOLCHAIN_PATH="$with_toolchain_path"
17426     else
17427       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17428     fi
17429   fi
17430 
17431 
17432 fi
17433 
17434 
17435 
17436 # Check whether --with-extra-path was given.
17437 if test "${with_extra_path+set}" = set; then :
17438   withval=$with_extra_path;
17439   if test "x$with_extra_path" != x; then
17440     if test "x$EXTRA_PATH" = x; then
17441       EXTRA_PATH="$with_extra_path"
17442     else
17443       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17444     fi
17445   fi
17446 
17447 
17448 fi
17449 
17450 
17451   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17452     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17453     # If not, detect if Xcode is installed by running xcodebuild -version
17454     # if no Xcode installed, xcodebuild exits with 1
17455     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17456     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17457       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17458       # fall back on the stub binary in /usr/bin/xcodebuild
17459       # Extract the first word of "xcodebuild", so it can be a program name with args.
17460 set dummy xcodebuild; ac_word=$2
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17462 $as_echo_n "checking for $ac_word... " >&6; }
17463 if ${ac_cv_path_XCODEBUILD+:} false; then :
17464   $as_echo_n "(cached) " >&6
17465 else
17466   case $XCODEBUILD in
17467   [\\/]* | ?:[\\/]*)
17468   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17469   ;;
17470   *)
17471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17472 for as_dir in $TOOLCHAIN_PATH
17473 do
17474   IFS=$as_save_IFS
17475   test -z "$as_dir" && as_dir=.
17476     for ac_exec_ext in '' $ac_executable_extensions; do
17477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17478     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17480     break 2
17481   fi
17482 done
17483   done
17484 IFS=$as_save_IFS
17485 
17486   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17487   ;;
17488 esac
17489 fi
17490 XCODEBUILD=$ac_cv_path_XCODEBUILD
17491 if test -n "$XCODEBUILD"; then
17492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17493 $as_echo "$XCODEBUILD" >&6; }
17494 else
17495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17496 $as_echo "no" >&6; }
17497 fi
17498 
17499 
17500     else
17501       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17502       # when only the command line tools are installed there are no SDKs, so headers
17503       # are copied into the system frameworks
17504       XCODEBUILD=
17505 
17506     fi
17507 
17508     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17509 $as_echo_n "checking for sdk name... " >&6; }
17510 
17511 # Check whether --with-sdk-name was given.
17512 if test "${with_sdk_name+set}" = set; then :
17513   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17514 
17515 fi
17516 
17517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17518 $as_echo "$SDKNAME" >&6; }
17519 
17520     # if toolchain path is specified then don't rely on system headers, they may not compile
17521     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17522     test -z "$TOOLCHAIN_PATH" && \
17523       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17524 
17525     if test -z "$SYSROOT"; then
17526       if test -n "$XCODEBUILD"; then
17527         # if we don't have system headers, use default SDK name (last resort)
17528         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17529           SDKNAME=${SDKNAME:-macosx}
17530         fi
17531 
17532         if test -n "$SDKNAME"; then
17533           # Call xcodebuild to determine SYSROOT
17534           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17535         fi
17536       else
17537         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17538           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
17539         fi
17540       fi
17541     else
17542       # warn user if --with-sdk-name was also set
17543       if test -n "$with_sdk_name"; then
17544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17545 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17546       fi
17547     fi
17548 
17549     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17550       # If no system framework headers, then SYSROOT must be set, or we won't build
17551       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
17552     fi
17553 
17554     # Perform a basic sanity test
17555     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17556       if test -z "$SYSROOT"; then
17557         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
17558       else
17559         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17560       fi
17561     fi
17562 
17563     # set SDKROOT too, Xcode tools will pick it up
17564     SDKROOT="$SYSROOT"
17565 
17566   fi
17567 
17568   # Prepend the extra path to the global path
17569 
17570   if test "x$EXTRA_PATH" != x; then
17571     if test "x$PATH" = x; then
17572       PATH="$EXTRA_PATH"
17573     else
17574       PATH="$EXTRA_PATH:$PATH"
17575     fi
17576   fi
17577 
17578 
17579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17580 $as_echo_n "checking for sysroot... " >&6; }
17581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17582 $as_echo "$SYSROOT" >&6; }
17583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17584 $as_echo_n "checking for toolchain path... " >&6; }
17585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17586 $as_echo "$TOOLCHAIN_PATH" >&6; }
17587   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17588 $as_echo_n "checking for extra path... " >&6; }
17589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17590 $as_echo "$EXTRA_PATH" >&6; }
17591 
17592 
17593 # To properly create a configuration name, we need to have the OpenJDK target
17594 # and options (variants and debug level) parsed.
17595 
17596 
17597 
17598 # Check whether --with-conf-name was given.
17599 if test "${with_conf_name+set}" = set; then :
17600   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17601 fi
17602 
17603 
17604 # Check whether --with-output-base-dir was given.
17605 if test "${with_output_base_dir+set}" = set; then :
17606   withval=$with_output_base_dir;  OUTPUT_BASE=${with_output_base_dir}
17607 else
17608    OUTPUT_BASE="$SRC_ROOT/build"
17609 fi
17610 
17611 
17612   # Test from where we are running configure, in or outside of src root.
17613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17614 $as_echo_n "checking where to store configuration... " >&6; }
17615   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17616       || test "x$CURDIR" = "x$SRC_ROOT/make/autoconf" \
17617       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17618     # We are running configure from the src root.
17619     # Create a default ./build/target-variant-debuglevel output root.
17620     if test "x${CONF_NAME}" = x; then
17621       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17622 $as_echo "in default location" >&6; }
17623       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17624     else
17625       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17626 $as_echo "in build directory with custom name" >&6; }
17627     fi
17628     OUTPUT_ROOT="${OUTPUT_BASE}/${CONF_NAME}"
17629     $MKDIR -p "$OUTPUT_ROOT"
17630     if test ! -d "$OUTPUT_ROOT"; then
17631       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17632     fi
17633   else
17634     # We are running configure from outside of the src dir.
17635     # Then use the current directory as output dir!
17636     # If configuration is situated in normal build directory, just use the build
17637     # directory name as configuration name, otherwise use the complete path.
17638     if test "x${CONF_NAME}" = x; then
17639       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17640     fi
17641     OUTPUT_ROOT="$CURDIR"
17642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17643 $as_echo "in current directory" >&6; }
17644 
17645     # WARNING: This might be a bad thing to do. You need to be sure you want to
17646     # have a configuration in this directory. Do some sanity checks!
17647 
17648     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17649       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17650       # other files
17651       files_present=`$LS $OUTPUT_ROOT`
17652       # Configure has already touched config.log and confdefs.h in the current dir when this check
17653       # is performed.
17654       filtered_files=`$ECHO "$files_present" \
17655           | $SED -e 's/config.log//g' \
17656               -e 's/configure.log//g' \
17657               -e 's/confdefs.h//g' \
17658               -e 's/ //g' \
17659           | $TR -d '\n'`
17660       if test "x$filtered_files" != x; then
17661         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17662 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17663         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17664 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17665         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17666 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17667         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17668 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17669         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17670 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17671         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17672 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17673         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17674 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17675         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17676       fi
17677     fi
17678   fi
17679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17680 $as_echo_n "checking what configuration name to use... " >&6; }
17681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17682 $as_echo "$CONF_NAME" >&6; }
17683 
17684 
17685   # Only process if variable expands to non-empty
17686 
17687   if test "x$OUTPUT_ROOT" != x; then
17688     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17689 
17690   # Input might be given as Windows format, start by converting to
17691   # unix format.
17692   path="$OUTPUT_ROOT"
17693   new_path=`$CYGPATH -u "$path"`
17694 
17695   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17696   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17697   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17698   # "foo.exe" is OK but "foo" is an error.
17699   #
17700   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17701   # It is also a way to make sure we got the proper file name for the real test later on.
17702   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17703   if test "x$test_shortpath" = x; then
17704     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17705 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17706     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17707   fi
17708 
17709   # Call helper function which possibly converts this using DOS-style short mode.
17710   # If so, the updated path is stored in $new_path.
17711 
17712   input_path="$new_path"
17713   # Check if we need to convert this using DOS-style short mode. If the path
17714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17715   # take no chances and rewrite it.
17716   # Note: m4 eats our [], so we need to use [ and ] instead.
17717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17718   if test "x$has_forbidden_chars" != x; then
17719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17720     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17721     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17722     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17723       # Going to short mode and back again did indeed matter. Since short mode is
17724       # case insensitive, let's make it lowercase to improve readability.
17725       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17726       # Now convert it back to Unix-style (cygpath)
17727       input_path=`$CYGPATH -u "$shortmode_path"`
17728       new_path="$input_path"
17729     fi
17730   fi
17731 
17732   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17733   if test "x$test_cygdrive_prefix" = x; then
17734     # As a simple fix, exclude /usr/bin since it's not a real path.
17735     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17736       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17737       # a path prefixed by /cygdrive for fixpath to work.
17738       new_path="$CYGWIN_ROOT_PATH$input_path"
17739     fi
17740   fi
17741 
17742 
17743   if test "x$path" != "x$new_path"; then
17744     OUTPUT_ROOT="$new_path"
17745     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17746 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17747   fi
17748 
17749     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17750 
17751   path="$OUTPUT_ROOT"
17752   has_colon=`$ECHO $path | $GREP ^.:`
17753   new_path="$path"
17754   if test "x$has_colon" = x; then
17755     # Not in mixed or Windows style, start by that.
17756     new_path=`cmd //c echo $path`
17757   fi
17758 
17759 
17760   input_path="$new_path"
17761   # Check if we need to convert this using DOS-style short mode. If the path
17762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17763   # take no chances and rewrite it.
17764   # Note: m4 eats our [], so we need to use [ and ] instead.
17765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17766   if test "x$has_forbidden_chars" != x; then
17767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17768     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17769   fi
17770 
17771 
17772   windows_path="$new_path"
17773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17774     unix_path=`$CYGPATH -u "$windows_path"`
17775     new_path="$unix_path"
17776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17778     new_path="$unix_path"
17779   fi
17780 
17781   if test "x$path" != "x$new_path"; then
17782     OUTPUT_ROOT="$new_path"
17783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17784 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17785   fi
17786 
17787   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17788   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17789 
17790     else
17791       # We're on a unix platform. Hooray! :)
17792       path="$OUTPUT_ROOT"
17793       has_space=`$ECHO "$path" | $GREP " "`
17794       if test "x$has_space" != x; then
17795         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17796 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17797         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17798       fi
17799 
17800       # Use eval to expand a potential ~
17801       eval path="$path"
17802       if test ! -f "$path" && test ! -d "$path"; then
17803         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17804       fi
17805 
17806       if test -d "$path"; then
17807         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17808       else
17809         dir="`$DIRNAME "$path"`"
17810         base="`$BASENAME "$path"`"
17811         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17812       fi
17813     fi
17814   fi
17815 
17816 
17817   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17818   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17819 
17820   SPEC="$OUTPUT_ROOT/spec.gmk"
17821 
17822 
17823 
17824 
17825 
17826   # The spec.gmk file contains all variables for the make system.
17827   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17828 
17829   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17830   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17831 
17832   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17833   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17834 
17835   # The compare.sh is used to compare the build output to other builds.
17836   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17837 
17838   # The generated Makefile knows where the spec.gmk is and where the source is.
17839   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17840   # which will look for generated configurations
17841   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17842 
17843 
17844 
17845 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17846 
17847   for ac_prog in apt-get yum brew port pkgutil pkgadd
17848 do
17849   # Extract the first word of "$ac_prog", so it can be a program name with args.
17850 set dummy $ac_prog; ac_word=$2
17851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17852 $as_echo_n "checking for $ac_word... " >&6; }
17853 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17854   $as_echo_n "(cached) " >&6
17855 else
17856   if test -n "$PKGHANDLER"; then
17857   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17858 else
17859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17860 for as_dir in $PATH
17861 do
17862   IFS=$as_save_IFS
17863   test -z "$as_dir" && as_dir=.
17864     for ac_exec_ext in '' $ac_executable_extensions; do
17865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17866     ac_cv_prog_PKGHANDLER="$ac_prog"
17867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17868     break 2
17869   fi
17870 done
17871   done
17872 IFS=$as_save_IFS
17873 
17874 fi
17875 fi
17876 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17877 if test -n "$PKGHANDLER"; then
17878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17879 $as_echo "$PKGHANDLER" >&6; }
17880 else
17881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17882 $as_echo "no" >&6; }
17883 fi
17884 
17885 
17886   test -n "$PKGHANDLER" && break
17887 done
17888 
17889 
17890 
17891 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17892 
17893 
17894 
17895   # Publish this variable in the help.
17896 
17897 
17898   if [ -z "${MAKE+x}" ]; then
17899     # The variable is not set by user, try to locate tool using the code snippet
17900 
17901     # Try our hardest to locate a correct version of GNU make
17902     for ac_prog in gmake
17903 do
17904   # Extract the first word of "$ac_prog", so it can be a program name with args.
17905 set dummy $ac_prog; ac_word=$2
17906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17907 $as_echo_n "checking for $ac_word... " >&6; }
17908 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17909   $as_echo_n "(cached) " >&6
17910 else
17911   case $CHECK_GMAKE in
17912   [\\/]* | ?:[\\/]*)
17913   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17914   ;;
17915   *)
17916   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17917 for as_dir in $PATH
17918 do
17919   IFS=$as_save_IFS
17920   test -z "$as_dir" && as_dir=.
17921     for ac_exec_ext in '' $ac_executable_extensions; do
17922   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17923     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17925     break 2
17926   fi
17927 done
17928   done
17929 IFS=$as_save_IFS
17930 
17931   ;;
17932 esac
17933 fi
17934 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17935 if test -n "$CHECK_GMAKE"; then
17936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17937 $as_echo "$CHECK_GMAKE" >&6; }
17938 else
17939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17940 $as_echo "no" >&6; }
17941 fi
17942 
17943 
17944   test -n "$CHECK_GMAKE" && break
17945 done
17946 
17947 
17948   MAKE_CANDIDATE=""$CHECK_GMAKE""
17949   DESCRIPTION="gmake in PATH"
17950 
17951   # On Cygwin, we require a newer version of make than on other platforms
17952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17953     MAKE_VERSION_EXPR="-e 4\."
17954     MAKE_REQUIRED_VERSION="4.0"
17955    else
17956     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17957     MAKE_REQUIRED_VERSION="3.81"
17958   fi
17959 
17960   if test "x$MAKE_CANDIDATE" != x; then
17961     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17962 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17963     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17964     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17965     if test "x$IS_GNU_MAKE" = x; then
17966       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17967 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17968     else
17969       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17970       if test "x$IS_MODERN_MAKE" = x; then
17971         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17972 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17973       else
17974         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17975           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17976             MAKE_EXPECTED_ENV='cygwin'
17977           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17978             MAKE_EXPECTED_ENV='msys'
17979           else
17980             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17981           fi
17982           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17983           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17984         else
17985           # Not relevant for non-Windows
17986           IS_MAKE_CORRECT_ENV=true
17987         fi
17988         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17989           { $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
17990 $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;}
17991         else
17992           FOUND_MAKE=$MAKE_CANDIDATE
17993 
17994   # Only process if variable expands to non-empty
17995 
17996   if test "x$FOUND_MAKE" != x; then
17997     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17998 
17999   # First separate the path from the arguments. This will split at the first
18000   # space.
18001   complete="$FOUND_MAKE"
18002   path="${complete%% *}"
18003   tmp="$complete EOL"
18004   arguments="${tmp#* }"
18005 
18006   # Input might be given as Windows format, start by converting to
18007   # unix format.
18008   new_path=`$CYGPATH -u "$path"`
18009 
18010   # Now try to locate executable using which
18011   new_path=`$WHICH "$new_path" 2> /dev/null`
18012   # bat and cmd files are not always considered executable in cygwin causing which
18013   # to not find them
18014   if test "x$new_path" = x \
18015       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18016       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18017     new_path=`$CYGPATH -u "$path"`
18018   fi
18019   if test "x$new_path" = x; then
18020     # Oops. Which didn't find the executable.
18021     # The splitting of arguments from the executable at a space might have been incorrect,
18022     # since paths with space are more likely in Windows. Give it another try with the whole
18023     # argument.
18024     path="$complete"
18025     arguments="EOL"
18026     new_path=`$CYGPATH -u "$path"`
18027     new_path=`$WHICH "$new_path" 2> /dev/null`
18028     # bat and cmd files are not always considered executable in cygwin causing which
18029     # to not find them
18030     if test "x$new_path" = x \
18031         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18032         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18033       new_path=`$CYGPATH -u "$path"`
18034     fi
18035     if test "x$new_path" = x; then
18036       # It's still not found. Now this is an unrecoverable error.
18037       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18038 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18039       has_space=`$ECHO "$complete" | $GREP " "`
18040       if test "x$has_space" != x; then
18041         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18042 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18043       fi
18044       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18045     fi
18046   fi
18047 
18048   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18049   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18050   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18051   # "foo.exe" is OK but "foo" is an error.
18052   #
18053   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18054   # It is also a way to make sure we got the proper file name for the real test later on.
18055   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18056   if test "x$test_shortpath" = x; then
18057     # Short path failed, file does not exist as specified.
18058     # Try adding .exe or .cmd
18059     if test -f "${new_path}.exe"; then
18060       input_to_shortpath="${new_path}.exe"
18061     elif test -f "${new_path}.cmd"; then
18062       input_to_shortpath="${new_path}.cmd"
18063     else
18064       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18065 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18066       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18067 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18068       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18069     fi
18070   else
18071     input_to_shortpath="$new_path"
18072   fi
18073 
18074   # Call helper function which possibly converts this using DOS-style short mode.
18075   # If so, the updated path is stored in $new_path.
18076   new_path="$input_to_shortpath"
18077 
18078   input_path="$input_to_shortpath"
18079   # Check if we need to convert this using DOS-style short mode. If the path
18080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18081   # take no chances and rewrite it.
18082   # Note: m4 eats our [], so we need to use [ and ] instead.
18083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18084   if test "x$has_forbidden_chars" != x; then
18085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18086     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18087     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18088     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18089       # Going to short mode and back again did indeed matter. Since short mode is
18090       # case insensitive, let's make it lowercase to improve readability.
18091       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18092       # Now convert it back to Unix-style (cygpath)
18093       input_path=`$CYGPATH -u "$shortmode_path"`
18094       new_path="$input_path"
18095     fi
18096   fi
18097 
18098   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18099   if test "x$test_cygdrive_prefix" = x; then
18100     # As a simple fix, exclude /usr/bin since it's not a real path.
18101     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18102       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18103       # a path prefixed by /cygdrive for fixpath to work.
18104       new_path="$CYGWIN_ROOT_PATH$input_path"
18105     fi
18106   fi
18107 
18108   # remove trailing .exe if any
18109   new_path="${new_path/%.exe/}"
18110 
18111     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18112 
18113   # First separate the path from the arguments. This will split at the first
18114   # space.
18115   complete="$FOUND_MAKE"
18116   path="${complete%% *}"
18117   tmp="$complete EOL"
18118   arguments="${tmp#* }"
18119 
18120   # Input might be given as Windows format, start by converting to
18121   # unix format.
18122   new_path="$path"
18123 
18124   windows_path="$new_path"
18125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18126     unix_path=`$CYGPATH -u "$windows_path"`
18127     new_path="$unix_path"
18128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18130     new_path="$unix_path"
18131   fi
18132 
18133 
18134   # Now try to locate executable using which
18135   new_path=`$WHICH "$new_path" 2> /dev/null`
18136 
18137   if test "x$new_path" = x; then
18138     # Oops. Which didn't find the executable.
18139     # The splitting of arguments from the executable at a space might have been incorrect,
18140     # since paths with space are more likely in Windows. Give it another try with the whole
18141     # argument.
18142     path="$complete"
18143     arguments="EOL"
18144     new_path="$path"
18145 
18146   windows_path="$new_path"
18147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18148     unix_path=`$CYGPATH -u "$windows_path"`
18149     new_path="$unix_path"
18150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18152     new_path="$unix_path"
18153   fi
18154 
18155 
18156     new_path=`$WHICH "$new_path" 2> /dev/null`
18157     # bat and cmd files are not always considered executable in MSYS causing which
18158     # to not find them
18159     if test "x$new_path" = x \
18160         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18161         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18162       new_path="$path"
18163 
18164   windows_path="$new_path"
18165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18166     unix_path=`$CYGPATH -u "$windows_path"`
18167     new_path="$unix_path"
18168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18170     new_path="$unix_path"
18171   fi
18172 
18173     fi
18174 
18175     if test "x$new_path" = x; then
18176       # It's still not found. Now this is an unrecoverable error.
18177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18178 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18179       has_space=`$ECHO "$complete" | $GREP " "`
18180       if test "x$has_space" != x; then
18181         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18182 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18183       fi
18184       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18185     fi
18186   fi
18187 
18188   # Now new_path has a complete unix path to the binary
18189   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18190     # Keep paths in /bin as-is, but remove trailing .exe if any
18191     new_path="${new_path/%.exe/}"
18192     # Do not save /bin paths to all_fixpath_prefixes!
18193   else
18194     # Not in mixed or Windows style, start by that.
18195     new_path=`cmd //c echo $new_path`
18196 
18197   input_path="$new_path"
18198   # Check if we need to convert this using DOS-style short mode. If the path
18199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18200   # take no chances and rewrite it.
18201   # Note: m4 eats our [], so we need to use [ and ] instead.
18202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18203   if test "x$has_forbidden_chars" != x; then
18204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18205     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18206   fi
18207 
18208     # Output is in $new_path
18209 
18210   windows_path="$new_path"
18211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18212     unix_path=`$CYGPATH -u "$windows_path"`
18213     new_path="$unix_path"
18214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18216     new_path="$unix_path"
18217   fi
18218 
18219     # remove trailing .exe if any
18220     new_path="${new_path/%.exe/}"
18221 
18222     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18223     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18224   fi
18225 
18226     else
18227       # We're on a unix platform. Hooray! :)
18228       # First separate the path from the arguments. This will split at the first
18229       # space.
18230       complete="$FOUND_MAKE"
18231       path="${complete%% *}"
18232       tmp="$complete EOL"
18233       arguments="${tmp#* }"
18234 
18235       # Cannot rely on the command "which" here since it doesn't always work.
18236       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18237       if test -z "$is_absolute_path"; then
18238         # Path to executable is not absolute. Find it.
18239         IFS_save="$IFS"
18240         IFS=:
18241         for p in $PATH; do
18242           if test -f "$p/$path" && test -x "$p/$path"; then
18243             new_path="$p/$path"
18244             break
18245           fi
18246         done
18247         IFS="$IFS_save"
18248       else
18249         # This is an absolute path, we can use it without further modifications.
18250         new_path="$path"
18251       fi
18252 
18253       if test "x$new_path" = x; then
18254         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18255 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18256         has_space=`$ECHO "$complete" | $GREP " "`
18257         if test "x$has_space" != x; then
18258           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18259 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18260         fi
18261         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18262       fi
18263     fi
18264 
18265     # Now join together the path and the arguments once again
18266     if test "x$arguments" != xEOL; then
18267       new_complete="$new_path ${arguments% *}"
18268     else
18269       new_complete="$new_path"
18270     fi
18271 
18272     if test "x$complete" != "x$new_complete"; then
18273       FOUND_MAKE="$new_complete"
18274       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18275 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18276     fi
18277   fi
18278 
18279         fi
18280       fi
18281     fi
18282   fi
18283 
18284 
18285     if test "x$FOUND_MAKE" = x; then
18286       for ac_prog in make
18287 do
18288   # Extract the first word of "$ac_prog", so it can be a program name with args.
18289 set dummy $ac_prog; ac_word=$2
18290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18291 $as_echo_n "checking for $ac_word... " >&6; }
18292 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18293   $as_echo_n "(cached) " >&6
18294 else
18295   case $CHECK_MAKE in
18296   [\\/]* | ?:[\\/]*)
18297   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18298   ;;
18299   *)
18300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18301 for as_dir in $PATH
18302 do
18303   IFS=$as_save_IFS
18304   test -z "$as_dir" && as_dir=.
18305     for ac_exec_ext in '' $ac_executable_extensions; do
18306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18307     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18309     break 2
18310   fi
18311 done
18312   done
18313 IFS=$as_save_IFS
18314 
18315   ;;
18316 esac
18317 fi
18318 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18319 if test -n "$CHECK_MAKE"; then
18320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18321 $as_echo "$CHECK_MAKE" >&6; }
18322 else
18323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18324 $as_echo "no" >&6; }
18325 fi
18326 
18327 
18328   test -n "$CHECK_MAKE" && break
18329 done
18330 
18331 
18332   MAKE_CANDIDATE=""$CHECK_MAKE""
18333   DESCRIPTION="make in PATH"
18334 
18335   # On Cygwin, we require a newer version of make than on other platforms
18336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18337     MAKE_VERSION_EXPR="-e 4\."
18338     MAKE_REQUIRED_VERSION="4.0"
18339    else
18340     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18341     MAKE_REQUIRED_VERSION="3.81"
18342   fi
18343 
18344   if test "x$MAKE_CANDIDATE" != x; then
18345     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18346 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18347     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18348     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18349     if test "x$IS_GNU_MAKE" = x; then
18350       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18351 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18352     else
18353       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18354       if test "x$IS_MODERN_MAKE" = x; then
18355         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18356 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18357       else
18358         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18359           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18360             MAKE_EXPECTED_ENV='cygwin'
18361           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18362             MAKE_EXPECTED_ENV='msys'
18363           else
18364             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18365           fi
18366           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18367           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18368         else
18369           # Not relevant for non-Windows
18370           IS_MAKE_CORRECT_ENV=true
18371         fi
18372         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18373           { $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
18374 $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;}
18375         else
18376           FOUND_MAKE=$MAKE_CANDIDATE
18377 
18378   # Only process if variable expands to non-empty
18379 
18380   if test "x$FOUND_MAKE" != x; then
18381     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18382 
18383   # First separate the path from the arguments. This will split at the first
18384   # space.
18385   complete="$FOUND_MAKE"
18386   path="${complete%% *}"
18387   tmp="$complete EOL"
18388   arguments="${tmp#* }"
18389 
18390   # Input might be given as Windows format, start by converting to
18391   # unix format.
18392   new_path=`$CYGPATH -u "$path"`
18393 
18394   # Now try to locate executable using which
18395   new_path=`$WHICH "$new_path" 2> /dev/null`
18396   # bat and cmd files are not always considered executable in cygwin causing which
18397   # to not find them
18398   if test "x$new_path" = x \
18399       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18400       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18401     new_path=`$CYGPATH -u "$path"`
18402   fi
18403   if test "x$new_path" = x; then
18404     # Oops. Which didn't find the executable.
18405     # The splitting of arguments from the executable at a space might have been incorrect,
18406     # since paths with space are more likely in Windows. Give it another try with the whole
18407     # argument.
18408     path="$complete"
18409     arguments="EOL"
18410     new_path=`$CYGPATH -u "$path"`
18411     new_path=`$WHICH "$new_path" 2> /dev/null`
18412     # bat and cmd files are not always considered executable in cygwin causing which
18413     # to not find them
18414     if test "x$new_path" = x \
18415         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18416         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18417       new_path=`$CYGPATH -u "$path"`
18418     fi
18419     if test "x$new_path" = x; then
18420       # It's still not found. Now this is an unrecoverable error.
18421       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18422 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18423       has_space=`$ECHO "$complete" | $GREP " "`
18424       if test "x$has_space" != x; then
18425         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18426 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18427       fi
18428       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18429     fi
18430   fi
18431 
18432   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18433   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18434   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18435   # "foo.exe" is OK but "foo" is an error.
18436   #
18437   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18438   # It is also a way to make sure we got the proper file name for the real test later on.
18439   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18440   if test "x$test_shortpath" = x; then
18441     # Short path failed, file does not exist as specified.
18442     # Try adding .exe or .cmd
18443     if test -f "${new_path}.exe"; then
18444       input_to_shortpath="${new_path}.exe"
18445     elif test -f "${new_path}.cmd"; then
18446       input_to_shortpath="${new_path}.cmd"
18447     else
18448       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18449 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18450       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18451 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18452       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18453     fi
18454   else
18455     input_to_shortpath="$new_path"
18456   fi
18457 
18458   # Call helper function which possibly converts this using DOS-style short mode.
18459   # If so, the updated path is stored in $new_path.
18460   new_path="$input_to_shortpath"
18461 
18462   input_path="$input_to_shortpath"
18463   # Check if we need to convert this using DOS-style short mode. If the path
18464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18465   # take no chances and rewrite it.
18466   # Note: m4 eats our [], so we need to use [ and ] instead.
18467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18468   if test "x$has_forbidden_chars" != x; then
18469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18470     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18471     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18472     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18473       # Going to short mode and back again did indeed matter. Since short mode is
18474       # case insensitive, let's make it lowercase to improve readability.
18475       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18476       # Now convert it back to Unix-style (cygpath)
18477       input_path=`$CYGPATH -u "$shortmode_path"`
18478       new_path="$input_path"
18479     fi
18480   fi
18481 
18482   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18483   if test "x$test_cygdrive_prefix" = x; then
18484     # As a simple fix, exclude /usr/bin since it's not a real path.
18485     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18486       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18487       # a path prefixed by /cygdrive for fixpath to work.
18488       new_path="$CYGWIN_ROOT_PATH$input_path"
18489     fi
18490   fi
18491 
18492   # remove trailing .exe if any
18493   new_path="${new_path/%.exe/}"
18494 
18495     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18496 
18497   # First separate the path from the arguments. This will split at the first
18498   # space.
18499   complete="$FOUND_MAKE"
18500   path="${complete%% *}"
18501   tmp="$complete EOL"
18502   arguments="${tmp#* }"
18503 
18504   # Input might be given as Windows format, start by converting to
18505   # unix format.
18506   new_path="$path"
18507 
18508   windows_path="$new_path"
18509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18510     unix_path=`$CYGPATH -u "$windows_path"`
18511     new_path="$unix_path"
18512   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18513     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18514     new_path="$unix_path"
18515   fi
18516 
18517 
18518   # Now try to locate executable using which
18519   new_path=`$WHICH "$new_path" 2> /dev/null`
18520 
18521   if test "x$new_path" = x; then
18522     # Oops. Which didn't find the executable.
18523     # The splitting of arguments from the executable at a space might have been incorrect,
18524     # since paths with space are more likely in Windows. Give it another try with the whole
18525     # argument.
18526     path="$complete"
18527     arguments="EOL"
18528     new_path="$path"
18529 
18530   windows_path="$new_path"
18531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18532     unix_path=`$CYGPATH -u "$windows_path"`
18533     new_path="$unix_path"
18534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18536     new_path="$unix_path"
18537   fi
18538 
18539 
18540     new_path=`$WHICH "$new_path" 2> /dev/null`
18541     # bat and cmd files are not always considered executable in MSYS causing which
18542     # to not find them
18543     if test "x$new_path" = x \
18544         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18545         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18546       new_path="$path"
18547 
18548   windows_path="$new_path"
18549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18550     unix_path=`$CYGPATH -u "$windows_path"`
18551     new_path="$unix_path"
18552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18554     new_path="$unix_path"
18555   fi
18556 
18557     fi
18558 
18559     if test "x$new_path" = x; then
18560       # It's still not found. Now this is an unrecoverable error.
18561       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18562 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18563       has_space=`$ECHO "$complete" | $GREP " "`
18564       if test "x$has_space" != x; then
18565         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18566 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18567       fi
18568       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18569     fi
18570   fi
18571 
18572   # Now new_path has a complete unix path to the binary
18573   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18574     # Keep paths in /bin as-is, but remove trailing .exe if any
18575     new_path="${new_path/%.exe/}"
18576     # Do not save /bin paths to all_fixpath_prefixes!
18577   else
18578     # Not in mixed or Windows style, start by that.
18579     new_path=`cmd //c echo $new_path`
18580 
18581   input_path="$new_path"
18582   # Check if we need to convert this using DOS-style short mode. If the path
18583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18584   # take no chances and rewrite it.
18585   # Note: m4 eats our [], so we need to use [ and ] instead.
18586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18587   if test "x$has_forbidden_chars" != x; then
18588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18589     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18590   fi
18591 
18592     # Output is in $new_path
18593 
18594   windows_path="$new_path"
18595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18596     unix_path=`$CYGPATH -u "$windows_path"`
18597     new_path="$unix_path"
18598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18600     new_path="$unix_path"
18601   fi
18602 
18603     # remove trailing .exe if any
18604     new_path="${new_path/%.exe/}"
18605 
18606     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18607     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18608   fi
18609 
18610     else
18611       # We're on a unix platform. Hooray! :)
18612       # First separate the path from the arguments. This will split at the first
18613       # space.
18614       complete="$FOUND_MAKE"
18615       path="${complete%% *}"
18616       tmp="$complete EOL"
18617       arguments="${tmp#* }"
18618 
18619       # Cannot rely on the command "which" here since it doesn't always work.
18620       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18621       if test -z "$is_absolute_path"; then
18622         # Path to executable is not absolute. Find it.
18623         IFS_save="$IFS"
18624         IFS=:
18625         for p in $PATH; do
18626           if test -f "$p/$path" && test -x "$p/$path"; then
18627             new_path="$p/$path"
18628             break
18629           fi
18630         done
18631         IFS="$IFS_save"
18632       else
18633         # This is an absolute path, we can use it without further modifications.
18634         new_path="$path"
18635       fi
18636 
18637       if test "x$new_path" = x; then
18638         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18639 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18640         has_space=`$ECHO "$complete" | $GREP " "`
18641         if test "x$has_space" != x; then
18642           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18643 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18644         fi
18645         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18646       fi
18647     fi
18648 
18649     # Now join together the path and the arguments once again
18650     if test "x$arguments" != xEOL; then
18651       new_complete="$new_path ${arguments% *}"
18652     else
18653       new_complete="$new_path"
18654     fi
18655 
18656     if test "x$complete" != "x$new_complete"; then
18657       FOUND_MAKE="$new_complete"
18658       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18659 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18660     fi
18661   fi
18662 
18663         fi
18664       fi
18665     fi
18666   fi
18667 
18668     fi
18669 
18670     if test "x$FOUND_MAKE" = x; then
18671       if test "x$TOOLCHAIN_PATH" != x; then
18672         # We have a toolchain path, check that as well before giving up.
18673         OLD_PATH=$PATH
18674         PATH=$TOOLCHAIN_PATH:$PATH
18675         for ac_prog in gmake
18676 do
18677   # Extract the first word of "$ac_prog", so it can be a program name with args.
18678 set dummy $ac_prog; ac_word=$2
18679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18680 $as_echo_n "checking for $ac_word... " >&6; }
18681 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18682   $as_echo_n "(cached) " >&6
18683 else
18684   case $CHECK_TOOLSDIR_GMAKE in
18685   [\\/]* | ?:[\\/]*)
18686   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18687   ;;
18688   *)
18689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18690 for as_dir in $PATH
18691 do
18692   IFS=$as_save_IFS
18693   test -z "$as_dir" && as_dir=.
18694     for ac_exec_ext in '' $ac_executable_extensions; do
18695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18696     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18698     break 2
18699   fi
18700 done
18701   done
18702 IFS=$as_save_IFS
18703 
18704   ;;
18705 esac
18706 fi
18707 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18708 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18710 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18711 else
18712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18713 $as_echo "no" >&6; }
18714 fi
18715 
18716 
18717   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18718 done
18719 
18720 
18721   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18722   DESCRIPTION="gmake in tools-dir"
18723 
18724   # On Cygwin, we require a newer version of make than on other platforms
18725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18726     MAKE_VERSION_EXPR="-e 4\."
18727     MAKE_REQUIRED_VERSION="4.0"
18728    else
18729     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18730     MAKE_REQUIRED_VERSION="3.81"
18731   fi
18732 
18733   if test "x$MAKE_CANDIDATE" != x; then
18734     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18735 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18736     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18737     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18738     if test "x$IS_GNU_MAKE" = x; then
18739       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18740 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18741     else
18742       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18743       if test "x$IS_MODERN_MAKE" = x; then
18744         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18745 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18746       else
18747         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18748           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18749             MAKE_EXPECTED_ENV='cygwin'
18750           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18751             MAKE_EXPECTED_ENV='msys'
18752           else
18753             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18754           fi
18755           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18756           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18757         else
18758           # Not relevant for non-Windows
18759           IS_MAKE_CORRECT_ENV=true
18760         fi
18761         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18762           { $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
18763 $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;}
18764         else
18765           FOUND_MAKE=$MAKE_CANDIDATE
18766 
18767   # Only process if variable expands to non-empty
18768 
18769   if test "x$FOUND_MAKE" != x; then
18770     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18771 
18772   # First separate the path from the arguments. This will split at the first
18773   # space.
18774   complete="$FOUND_MAKE"
18775   path="${complete%% *}"
18776   tmp="$complete EOL"
18777   arguments="${tmp#* }"
18778 
18779   # Input might be given as Windows format, start by converting to
18780   # unix format.
18781   new_path=`$CYGPATH -u "$path"`
18782 
18783   # Now try to locate executable using which
18784   new_path=`$WHICH "$new_path" 2> /dev/null`
18785   # bat and cmd files are not always considered executable in cygwin causing which
18786   # to not find them
18787   if test "x$new_path" = x \
18788       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18789       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18790     new_path=`$CYGPATH -u "$path"`
18791   fi
18792   if test "x$new_path" = x; then
18793     # Oops. Which didn't find the executable.
18794     # The splitting of arguments from the executable at a space might have been incorrect,
18795     # since paths with space are more likely in Windows. Give it another try with the whole
18796     # argument.
18797     path="$complete"
18798     arguments="EOL"
18799     new_path=`$CYGPATH -u "$path"`
18800     new_path=`$WHICH "$new_path" 2> /dev/null`
18801     # bat and cmd files are not always considered executable in cygwin causing which
18802     # to not find them
18803     if test "x$new_path" = x \
18804         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18805         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18806       new_path=`$CYGPATH -u "$path"`
18807     fi
18808     if test "x$new_path" = x; then
18809       # It's still not found. Now this is an unrecoverable error.
18810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18811 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18812       has_space=`$ECHO "$complete" | $GREP " "`
18813       if test "x$has_space" != x; then
18814         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18815 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18816       fi
18817       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18818     fi
18819   fi
18820 
18821   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18822   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18823   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18824   # "foo.exe" is OK but "foo" is an error.
18825   #
18826   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18827   # It is also a way to make sure we got the proper file name for the real test later on.
18828   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18829   if test "x$test_shortpath" = x; then
18830     # Short path failed, file does not exist as specified.
18831     # Try adding .exe or .cmd
18832     if test -f "${new_path}.exe"; then
18833       input_to_shortpath="${new_path}.exe"
18834     elif test -f "${new_path}.cmd"; then
18835       input_to_shortpath="${new_path}.cmd"
18836     else
18837       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18838 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18839       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18840 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18841       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18842     fi
18843   else
18844     input_to_shortpath="$new_path"
18845   fi
18846 
18847   # Call helper function which possibly converts this using DOS-style short mode.
18848   # If so, the updated path is stored in $new_path.
18849   new_path="$input_to_shortpath"
18850 
18851   input_path="$input_to_shortpath"
18852   # Check if we need to convert this using DOS-style short mode. If the path
18853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18854   # take no chances and rewrite it.
18855   # Note: m4 eats our [], so we need to use [ and ] instead.
18856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18857   if test "x$has_forbidden_chars" != x; then
18858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18862       # Going to short mode and back again did indeed matter. Since short mode is
18863       # case insensitive, let's make it lowercase to improve readability.
18864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18865       # Now convert it back to Unix-style (cygpath)
18866       input_path=`$CYGPATH -u "$shortmode_path"`
18867       new_path="$input_path"
18868     fi
18869   fi
18870 
18871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18872   if test "x$test_cygdrive_prefix" = x; then
18873     # As a simple fix, exclude /usr/bin since it's not a real path.
18874     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18876       # a path prefixed by /cygdrive for fixpath to work.
18877       new_path="$CYGWIN_ROOT_PATH$input_path"
18878     fi
18879   fi
18880 
18881   # remove trailing .exe if any
18882   new_path="${new_path/%.exe/}"
18883 
18884     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18885 
18886   # First separate the path from the arguments. This will split at the first
18887   # space.
18888   complete="$FOUND_MAKE"
18889   path="${complete%% *}"
18890   tmp="$complete EOL"
18891   arguments="${tmp#* }"
18892 
18893   # Input might be given as Windows format, start by converting to
18894   # unix format.
18895   new_path="$path"
18896 
18897   windows_path="$new_path"
18898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18899     unix_path=`$CYGPATH -u "$windows_path"`
18900     new_path="$unix_path"
18901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18903     new_path="$unix_path"
18904   fi
18905 
18906 
18907   # Now try to locate executable using which
18908   new_path=`$WHICH "$new_path" 2> /dev/null`
18909 
18910   if test "x$new_path" = x; then
18911     # Oops. Which didn't find the executable.
18912     # The splitting of arguments from the executable at a space might have been incorrect,
18913     # since paths with space are more likely in Windows. Give it another try with the whole
18914     # argument.
18915     path="$complete"
18916     arguments="EOL"
18917     new_path="$path"
18918 
18919   windows_path="$new_path"
18920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18921     unix_path=`$CYGPATH -u "$windows_path"`
18922     new_path="$unix_path"
18923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18925     new_path="$unix_path"
18926   fi
18927 
18928 
18929     new_path=`$WHICH "$new_path" 2> /dev/null`
18930     # bat and cmd files are not always considered executable in MSYS causing which
18931     # to not find them
18932     if test "x$new_path" = x \
18933         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18934         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18935       new_path="$path"
18936 
18937   windows_path="$new_path"
18938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18939     unix_path=`$CYGPATH -u "$windows_path"`
18940     new_path="$unix_path"
18941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18943     new_path="$unix_path"
18944   fi
18945 
18946     fi
18947 
18948     if test "x$new_path" = x; then
18949       # It's still not found. Now this is an unrecoverable error.
18950       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18951 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18952       has_space=`$ECHO "$complete" | $GREP " "`
18953       if test "x$has_space" != x; then
18954         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18955 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18956       fi
18957       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18958     fi
18959   fi
18960 
18961   # Now new_path has a complete unix path to the binary
18962   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18963     # Keep paths in /bin as-is, but remove trailing .exe if any
18964     new_path="${new_path/%.exe/}"
18965     # Do not save /bin paths to all_fixpath_prefixes!
18966   else
18967     # Not in mixed or Windows style, start by that.
18968     new_path=`cmd //c echo $new_path`
18969 
18970   input_path="$new_path"
18971   # Check if we need to convert this using DOS-style short mode. If the path
18972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18973   # take no chances and rewrite it.
18974   # Note: m4 eats our [], so we need to use [ and ] instead.
18975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18976   if test "x$has_forbidden_chars" != x; then
18977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18978     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18979   fi
18980 
18981     # Output is in $new_path
18982 
18983   windows_path="$new_path"
18984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18985     unix_path=`$CYGPATH -u "$windows_path"`
18986     new_path="$unix_path"
18987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18989     new_path="$unix_path"
18990   fi
18991 
18992     # remove trailing .exe if any
18993     new_path="${new_path/%.exe/}"
18994 
18995     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18996     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18997   fi
18998 
18999     else
19000       # We're on a unix platform. Hooray! :)
19001       # First separate the path from the arguments. This will split at the first
19002       # space.
19003       complete="$FOUND_MAKE"
19004       path="${complete%% *}"
19005       tmp="$complete EOL"
19006       arguments="${tmp#* }"
19007 
19008       # Cannot rely on the command "which" here since it doesn't always work.
19009       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19010       if test -z "$is_absolute_path"; then
19011         # Path to executable is not absolute. Find it.
19012         IFS_save="$IFS"
19013         IFS=:
19014         for p in $PATH; do
19015           if test -f "$p/$path" && test -x "$p/$path"; then
19016             new_path="$p/$path"
19017             break
19018           fi
19019         done
19020         IFS="$IFS_save"
19021       else
19022         # This is an absolute path, we can use it without further modifications.
19023         new_path="$path"
19024       fi
19025 
19026       if test "x$new_path" = x; then
19027         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19028 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19029         has_space=`$ECHO "$complete" | $GREP " "`
19030         if test "x$has_space" != x; then
19031           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19032 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19033         fi
19034         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19035       fi
19036     fi
19037 
19038     # Now join together the path and the arguments once again
19039     if test "x$arguments" != xEOL; then
19040       new_complete="$new_path ${arguments% *}"
19041     else
19042       new_complete="$new_path"
19043     fi
19044 
19045     if test "x$complete" != "x$new_complete"; then
19046       FOUND_MAKE="$new_complete"
19047       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19048 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19049     fi
19050   fi
19051 
19052         fi
19053       fi
19054     fi
19055   fi
19056 
19057         if test "x$FOUND_MAKE" = x; then
19058           for ac_prog in make
19059 do
19060   # Extract the first word of "$ac_prog", so it can be a program name with args.
19061 set dummy $ac_prog; ac_word=$2
19062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19063 $as_echo_n "checking for $ac_word... " >&6; }
19064 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19065   $as_echo_n "(cached) " >&6
19066 else
19067   case $CHECK_TOOLSDIR_MAKE in
19068   [\\/]* | ?:[\\/]*)
19069   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19070   ;;
19071   *)
19072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19073 for as_dir in $PATH
19074 do
19075   IFS=$as_save_IFS
19076   test -z "$as_dir" && as_dir=.
19077     for ac_exec_ext in '' $ac_executable_extensions; do
19078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19079     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19081     break 2
19082   fi
19083 done
19084   done
19085 IFS=$as_save_IFS
19086 
19087   ;;
19088 esac
19089 fi
19090 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19091 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19093 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19094 else
19095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19096 $as_echo "no" >&6; }
19097 fi
19098 
19099 
19100   test -n "$CHECK_TOOLSDIR_MAKE" && break
19101 done
19102 
19103 
19104   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19105   DESCRIPTION="make in tools-dir"
19106 
19107   # On Cygwin, we require a newer version of make than on other platforms
19108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19109     MAKE_VERSION_EXPR="-e 4\."
19110     MAKE_REQUIRED_VERSION="4.0"
19111    else
19112     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19113     MAKE_REQUIRED_VERSION="3.81"
19114   fi
19115 
19116   if test "x$MAKE_CANDIDATE" != x; then
19117     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19118 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19119     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19120     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19121     if test "x$IS_GNU_MAKE" = x; then
19122       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19123 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19124     else
19125       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19126       if test "x$IS_MODERN_MAKE" = x; then
19127         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19128 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19129       else
19130         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19131           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19132             MAKE_EXPECTED_ENV='cygwin'
19133           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19134             MAKE_EXPECTED_ENV='msys'
19135           else
19136             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19137           fi
19138           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19139           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19140         else
19141           # Not relevant for non-Windows
19142           IS_MAKE_CORRECT_ENV=true
19143         fi
19144         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19145           { $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
19146 $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;}
19147         else
19148           FOUND_MAKE=$MAKE_CANDIDATE
19149 
19150   # Only process if variable expands to non-empty
19151 
19152   if test "x$FOUND_MAKE" != x; then
19153     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19154 
19155   # First separate the path from the arguments. This will split at the first
19156   # space.
19157   complete="$FOUND_MAKE"
19158   path="${complete%% *}"
19159   tmp="$complete EOL"
19160   arguments="${tmp#* }"
19161 
19162   # Input might be given as Windows format, start by converting to
19163   # unix format.
19164   new_path=`$CYGPATH -u "$path"`
19165 
19166   # Now try to locate executable using which
19167   new_path=`$WHICH "$new_path" 2> /dev/null`
19168   # bat and cmd files are not always considered executable in cygwin causing which
19169   # to not find them
19170   if test "x$new_path" = x \
19171       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19172       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19173     new_path=`$CYGPATH -u "$path"`
19174   fi
19175   if test "x$new_path" = x; then
19176     # Oops. Which didn't find the executable.
19177     # The splitting of arguments from the executable at a space might have been incorrect,
19178     # since paths with space are more likely in Windows. Give it another try with the whole
19179     # argument.
19180     path="$complete"
19181     arguments="EOL"
19182     new_path=`$CYGPATH -u "$path"`
19183     new_path=`$WHICH "$new_path" 2> /dev/null`
19184     # bat and cmd files are not always considered executable in cygwin causing which
19185     # to not find them
19186     if test "x$new_path" = x \
19187         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19188         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19189       new_path=`$CYGPATH -u "$path"`
19190     fi
19191     if test "x$new_path" = x; then
19192       # It's still not found. Now this is an unrecoverable error.
19193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19194 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19195       has_space=`$ECHO "$complete" | $GREP " "`
19196       if test "x$has_space" != x; then
19197         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19198 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19199       fi
19200       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19201     fi
19202   fi
19203 
19204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19207   # "foo.exe" is OK but "foo" is an error.
19208   #
19209   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19210   # It is also a way to make sure we got the proper file name for the real test later on.
19211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19212   if test "x$test_shortpath" = x; then
19213     # Short path failed, file does not exist as specified.
19214     # Try adding .exe or .cmd
19215     if test -f "${new_path}.exe"; then
19216       input_to_shortpath="${new_path}.exe"
19217     elif test -f "${new_path}.cmd"; then
19218       input_to_shortpath="${new_path}.cmd"
19219     else
19220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19221 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19222       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19223 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19224       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19225     fi
19226   else
19227     input_to_shortpath="$new_path"
19228   fi
19229 
19230   # Call helper function which possibly converts this using DOS-style short mode.
19231   # If so, the updated path is stored in $new_path.
19232   new_path="$input_to_shortpath"
19233 
19234   input_path="$input_to_shortpath"
19235   # Check if we need to convert this using DOS-style short mode. If the path
19236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19237   # take no chances and rewrite it.
19238   # Note: m4 eats our [], so we need to use [ and ] instead.
19239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19240   if test "x$has_forbidden_chars" != x; then
19241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19242     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19243     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19244     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19245       # Going to short mode and back again did indeed matter. Since short mode is
19246       # case insensitive, let's make it lowercase to improve readability.
19247       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19248       # Now convert it back to Unix-style (cygpath)
19249       input_path=`$CYGPATH -u "$shortmode_path"`
19250       new_path="$input_path"
19251     fi
19252   fi
19253 
19254   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19255   if test "x$test_cygdrive_prefix" = x; then
19256     # As a simple fix, exclude /usr/bin since it's not a real path.
19257     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19258       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19259       # a path prefixed by /cygdrive for fixpath to work.
19260       new_path="$CYGWIN_ROOT_PATH$input_path"
19261     fi
19262   fi
19263 
19264   # remove trailing .exe if any
19265   new_path="${new_path/%.exe/}"
19266 
19267     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19268 
19269   # First separate the path from the arguments. This will split at the first
19270   # space.
19271   complete="$FOUND_MAKE"
19272   path="${complete%% *}"
19273   tmp="$complete EOL"
19274   arguments="${tmp#* }"
19275 
19276   # Input might be given as Windows format, start by converting to
19277   # unix format.
19278   new_path="$path"
19279 
19280   windows_path="$new_path"
19281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19282     unix_path=`$CYGPATH -u "$windows_path"`
19283     new_path="$unix_path"
19284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19285     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19286     new_path="$unix_path"
19287   fi
19288 
19289 
19290   # Now try to locate executable using which
19291   new_path=`$WHICH "$new_path" 2> /dev/null`
19292 
19293   if test "x$new_path" = x; then
19294     # Oops. Which didn't find the executable.
19295     # The splitting of arguments from the executable at a space might have been incorrect,
19296     # since paths with space are more likely in Windows. Give it another try with the whole
19297     # argument.
19298     path="$complete"
19299     arguments="EOL"
19300     new_path="$path"
19301 
19302   windows_path="$new_path"
19303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19304     unix_path=`$CYGPATH -u "$windows_path"`
19305     new_path="$unix_path"
19306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19308     new_path="$unix_path"
19309   fi
19310 
19311 
19312     new_path=`$WHICH "$new_path" 2> /dev/null`
19313     # bat and cmd files are not always considered executable in MSYS causing which
19314     # to not find them
19315     if test "x$new_path" = x \
19316         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19317         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19318       new_path="$path"
19319 
19320   windows_path="$new_path"
19321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19322     unix_path=`$CYGPATH -u "$windows_path"`
19323     new_path="$unix_path"
19324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19326     new_path="$unix_path"
19327   fi
19328 
19329     fi
19330 
19331     if test "x$new_path" = x; then
19332       # It's still not found. Now this is an unrecoverable error.
19333       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19334 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19335       has_space=`$ECHO "$complete" | $GREP " "`
19336       if test "x$has_space" != x; then
19337         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19338 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19339       fi
19340       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19341     fi
19342   fi
19343 
19344   # Now new_path has a complete unix path to the binary
19345   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19346     # Keep paths in /bin as-is, but remove trailing .exe if any
19347     new_path="${new_path/%.exe/}"
19348     # Do not save /bin paths to all_fixpath_prefixes!
19349   else
19350     # Not in mixed or Windows style, start by that.
19351     new_path=`cmd //c echo $new_path`
19352 
19353   input_path="$new_path"
19354   # Check if we need to convert this using DOS-style short mode. If the path
19355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19356   # take no chances and rewrite it.
19357   # Note: m4 eats our [], so we need to use [ and ] instead.
19358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19359   if test "x$has_forbidden_chars" != x; then
19360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19361     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19362   fi
19363 
19364     # Output is in $new_path
19365 
19366   windows_path="$new_path"
19367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19368     unix_path=`$CYGPATH -u "$windows_path"`
19369     new_path="$unix_path"
19370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19372     new_path="$unix_path"
19373   fi
19374 
19375     # remove trailing .exe if any
19376     new_path="${new_path/%.exe/}"
19377 
19378     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19379     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19380   fi
19381 
19382     else
19383       # We're on a unix platform. Hooray! :)
19384       # First separate the path from the arguments. This will split at the first
19385       # space.
19386       complete="$FOUND_MAKE"
19387       path="${complete%% *}"
19388       tmp="$complete EOL"
19389       arguments="${tmp#* }"
19390 
19391       # Cannot rely on the command "which" here since it doesn't always work.
19392       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19393       if test -z "$is_absolute_path"; then
19394         # Path to executable is not absolute. Find it.
19395         IFS_save="$IFS"
19396         IFS=:
19397         for p in $PATH; do
19398           if test -f "$p/$path" && test -x "$p/$path"; then
19399             new_path="$p/$path"
19400             break
19401           fi
19402         done
19403         IFS="$IFS_save"
19404       else
19405         # This is an absolute path, we can use it without further modifications.
19406         new_path="$path"
19407       fi
19408 
19409       if test "x$new_path" = x; then
19410         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19411 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19412         has_space=`$ECHO "$complete" | $GREP " "`
19413         if test "x$has_space" != x; then
19414           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19415 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19416         fi
19417         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19418       fi
19419     fi
19420 
19421     # Now join together the path and the arguments once again
19422     if test "x$arguments" != xEOL; then
19423       new_complete="$new_path ${arguments% *}"
19424     else
19425       new_complete="$new_path"
19426     fi
19427 
19428     if test "x$complete" != "x$new_complete"; then
19429       FOUND_MAKE="$new_complete"
19430       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19431 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19432     fi
19433   fi
19434 
19435         fi
19436       fi
19437     fi
19438   fi
19439 
19440         fi
19441         PATH=$OLD_PATH
19442       fi
19443     fi
19444 
19445     if test "x$FOUND_MAKE" = x; then
19446       as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19447     fi
19448 
19449   else
19450     # The variable is set, but is it from the command line or the environment?
19451 
19452     # Try to remove the string !MAKE! from our list.
19453     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19454     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19455       # If it failed, the variable was not from the command line. Ignore it,
19456       # but warn the user (except for BASH, which is always set by the calling BASH).
19457       if test "xMAKE" != xBASH; then
19458         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19459 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19460       fi
19461       # Try to locate tool using the code snippet
19462 
19463     # Try our hardest to locate a correct version of GNU make
19464     for ac_prog in gmake
19465 do
19466   # Extract the first word of "$ac_prog", so it can be a program name with args.
19467 set dummy $ac_prog; ac_word=$2
19468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19469 $as_echo_n "checking for $ac_word... " >&6; }
19470 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19471   $as_echo_n "(cached) " >&6
19472 else
19473   case $CHECK_GMAKE in
19474   [\\/]* | ?:[\\/]*)
19475   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19476   ;;
19477   *)
19478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19479 for as_dir in $PATH
19480 do
19481   IFS=$as_save_IFS
19482   test -z "$as_dir" && as_dir=.
19483     for ac_exec_ext in '' $ac_executable_extensions; do
19484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19485     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19487     break 2
19488   fi
19489 done
19490   done
19491 IFS=$as_save_IFS
19492 
19493   ;;
19494 esac
19495 fi
19496 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19497 if test -n "$CHECK_GMAKE"; then
19498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19499 $as_echo "$CHECK_GMAKE" >&6; }
19500 else
19501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19502 $as_echo "no" >&6; }
19503 fi
19504 
19505 
19506   test -n "$CHECK_GMAKE" && break
19507 done
19508 
19509 
19510   MAKE_CANDIDATE=""$CHECK_GMAKE""
19511   DESCRIPTION="gmake in PATH"
19512 
19513   # On Cygwin, we require a newer version of make than on other platforms
19514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19515     MAKE_VERSION_EXPR="-e 4\."
19516     MAKE_REQUIRED_VERSION="4.0"
19517    else
19518     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19519     MAKE_REQUIRED_VERSION="3.81"
19520   fi
19521 
19522   if test "x$MAKE_CANDIDATE" != x; then
19523     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19524 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19525     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19526     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19527     if test "x$IS_GNU_MAKE" = x; then
19528       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19529 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19530     else
19531       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19532       if test "x$IS_MODERN_MAKE" = x; then
19533         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19534 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19535       else
19536         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19537           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19538             MAKE_EXPECTED_ENV='cygwin'
19539           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19540             MAKE_EXPECTED_ENV='msys'
19541           else
19542             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19543           fi
19544           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19545           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19546         else
19547           # Not relevant for non-Windows
19548           IS_MAKE_CORRECT_ENV=true
19549         fi
19550         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19551           { $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
19552 $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;}
19553         else
19554           FOUND_MAKE=$MAKE_CANDIDATE
19555 
19556   # Only process if variable expands to non-empty
19557 
19558   if test "x$FOUND_MAKE" != x; then
19559     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19560 
19561   # First separate the path from the arguments. This will split at the first
19562   # space.
19563   complete="$FOUND_MAKE"
19564   path="${complete%% *}"
19565   tmp="$complete EOL"
19566   arguments="${tmp#* }"
19567 
19568   # Input might be given as Windows format, start by converting to
19569   # unix format.
19570   new_path=`$CYGPATH -u "$path"`
19571 
19572   # Now try to locate executable using which
19573   new_path=`$WHICH "$new_path" 2> /dev/null`
19574   # bat and cmd files are not always considered executable in cygwin causing which
19575   # to not find them
19576   if test "x$new_path" = x \
19577       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19578       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19579     new_path=`$CYGPATH -u "$path"`
19580   fi
19581   if test "x$new_path" = x; then
19582     # Oops. Which didn't find the executable.
19583     # The splitting of arguments from the executable at a space might have been incorrect,
19584     # since paths with space are more likely in Windows. Give it another try with the whole
19585     # argument.
19586     path="$complete"
19587     arguments="EOL"
19588     new_path=`$CYGPATH -u "$path"`
19589     new_path=`$WHICH "$new_path" 2> /dev/null`
19590     # bat and cmd files are not always considered executable in cygwin causing which
19591     # to not find them
19592     if test "x$new_path" = x \
19593         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19594         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19595       new_path=`$CYGPATH -u "$path"`
19596     fi
19597     if test "x$new_path" = x; then
19598       # It's still not found. Now this is an unrecoverable error.
19599       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19600 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19601       has_space=`$ECHO "$complete" | $GREP " "`
19602       if test "x$has_space" != x; then
19603         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19604 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19605       fi
19606       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19607     fi
19608   fi
19609 
19610   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19611   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19612   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19613   # "foo.exe" is OK but "foo" is an error.
19614   #
19615   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19616   # It is also a way to make sure we got the proper file name for the real test later on.
19617   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19618   if test "x$test_shortpath" = x; then
19619     # Short path failed, file does not exist as specified.
19620     # Try adding .exe or .cmd
19621     if test -f "${new_path}.exe"; then
19622       input_to_shortpath="${new_path}.exe"
19623     elif test -f "${new_path}.cmd"; then
19624       input_to_shortpath="${new_path}.cmd"
19625     else
19626       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19627 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19628       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19629 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19630       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19631     fi
19632   else
19633     input_to_shortpath="$new_path"
19634   fi
19635 
19636   # Call helper function which possibly converts this using DOS-style short mode.
19637   # If so, the updated path is stored in $new_path.
19638   new_path="$input_to_shortpath"
19639 
19640   input_path="$input_to_shortpath"
19641   # Check if we need to convert this using DOS-style short mode. If the path
19642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19643   # take no chances and rewrite it.
19644   # Note: m4 eats our [], so we need to use [ and ] instead.
19645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19646   if test "x$has_forbidden_chars" != x; then
19647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19651       # Going to short mode and back again did indeed matter. Since short mode is
19652       # case insensitive, let's make it lowercase to improve readability.
19653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19654       # Now convert it back to Unix-style (cygpath)
19655       input_path=`$CYGPATH -u "$shortmode_path"`
19656       new_path="$input_path"
19657     fi
19658   fi
19659 
19660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19661   if test "x$test_cygdrive_prefix" = x; then
19662     # As a simple fix, exclude /usr/bin since it's not a real path.
19663     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19665       # a path prefixed by /cygdrive for fixpath to work.
19666       new_path="$CYGWIN_ROOT_PATH$input_path"
19667     fi
19668   fi
19669 
19670   # remove trailing .exe if any
19671   new_path="${new_path/%.exe/}"
19672 
19673     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19674 
19675   # First separate the path from the arguments. This will split at the first
19676   # space.
19677   complete="$FOUND_MAKE"
19678   path="${complete%% *}"
19679   tmp="$complete EOL"
19680   arguments="${tmp#* }"
19681 
19682   # Input might be given as Windows format, start by converting to
19683   # unix format.
19684   new_path="$path"
19685 
19686   windows_path="$new_path"
19687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19688     unix_path=`$CYGPATH -u "$windows_path"`
19689     new_path="$unix_path"
19690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19692     new_path="$unix_path"
19693   fi
19694 
19695 
19696   # Now try to locate executable using which
19697   new_path=`$WHICH "$new_path" 2> /dev/null`
19698 
19699   if test "x$new_path" = x; then
19700     # Oops. Which didn't find the executable.
19701     # The splitting of arguments from the executable at a space might have been incorrect,
19702     # since paths with space are more likely in Windows. Give it another try with the whole
19703     # argument.
19704     path="$complete"
19705     arguments="EOL"
19706     new_path="$path"
19707 
19708   windows_path="$new_path"
19709   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19710     unix_path=`$CYGPATH -u "$windows_path"`
19711     new_path="$unix_path"
19712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19713     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19714     new_path="$unix_path"
19715   fi
19716 
19717 
19718     new_path=`$WHICH "$new_path" 2> /dev/null`
19719     # bat and cmd files are not always considered executable in MSYS causing which
19720     # to not find them
19721     if test "x$new_path" = x \
19722         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19723         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19724       new_path="$path"
19725 
19726   windows_path="$new_path"
19727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19728     unix_path=`$CYGPATH -u "$windows_path"`
19729     new_path="$unix_path"
19730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19732     new_path="$unix_path"
19733   fi
19734 
19735     fi
19736 
19737     if test "x$new_path" = x; then
19738       # It's still not found. Now this is an unrecoverable error.
19739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19740 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19741       has_space=`$ECHO "$complete" | $GREP " "`
19742       if test "x$has_space" != x; then
19743         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19744 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19745       fi
19746       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19747     fi
19748   fi
19749 
19750   # Now new_path has a complete unix path to the binary
19751   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19752     # Keep paths in /bin as-is, but remove trailing .exe if any
19753     new_path="${new_path/%.exe/}"
19754     # Do not save /bin paths to all_fixpath_prefixes!
19755   else
19756     # Not in mixed or Windows style, start by that.
19757     new_path=`cmd //c echo $new_path`
19758 
19759   input_path="$new_path"
19760   # Check if we need to convert this using DOS-style short mode. If the path
19761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19762   # take no chances and rewrite it.
19763   # Note: m4 eats our [], so we need to use [ and ] instead.
19764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19765   if test "x$has_forbidden_chars" != x; then
19766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19767     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19768   fi
19769 
19770     # Output is in $new_path
19771 
19772   windows_path="$new_path"
19773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19774     unix_path=`$CYGPATH -u "$windows_path"`
19775     new_path="$unix_path"
19776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19778     new_path="$unix_path"
19779   fi
19780 
19781     # remove trailing .exe if any
19782     new_path="${new_path/%.exe/}"
19783 
19784     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19785     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19786   fi
19787 
19788     else
19789       # We're on a unix platform. Hooray! :)
19790       # First separate the path from the arguments. This will split at the first
19791       # space.
19792       complete="$FOUND_MAKE"
19793       path="${complete%% *}"
19794       tmp="$complete EOL"
19795       arguments="${tmp#* }"
19796 
19797       # Cannot rely on the command "which" here since it doesn't always work.
19798       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19799       if test -z "$is_absolute_path"; then
19800         # Path to executable is not absolute. Find it.
19801         IFS_save="$IFS"
19802         IFS=:
19803         for p in $PATH; do
19804           if test -f "$p/$path" && test -x "$p/$path"; then
19805             new_path="$p/$path"
19806             break
19807           fi
19808         done
19809         IFS="$IFS_save"
19810       else
19811         # This is an absolute path, we can use it without further modifications.
19812         new_path="$path"
19813       fi
19814 
19815       if test "x$new_path" = x; then
19816         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19817 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19818         has_space=`$ECHO "$complete" | $GREP " "`
19819         if test "x$has_space" != x; then
19820           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19821 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19822         fi
19823         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19824       fi
19825     fi
19826 
19827     # Now join together the path and the arguments once again
19828     if test "x$arguments" != xEOL; then
19829       new_complete="$new_path ${arguments% *}"
19830     else
19831       new_complete="$new_path"
19832     fi
19833 
19834     if test "x$complete" != "x$new_complete"; then
19835       FOUND_MAKE="$new_complete"
19836       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19837 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19838     fi
19839   fi
19840 
19841         fi
19842       fi
19843     fi
19844   fi
19845 
19846 
19847     if test "x$FOUND_MAKE" = x; then
19848       for ac_prog in make
19849 do
19850   # Extract the first word of "$ac_prog", so it can be a program name with args.
19851 set dummy $ac_prog; ac_word=$2
19852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19853 $as_echo_n "checking for $ac_word... " >&6; }
19854 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19855   $as_echo_n "(cached) " >&6
19856 else
19857   case $CHECK_MAKE in
19858   [\\/]* | ?:[\\/]*)
19859   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19860   ;;
19861   *)
19862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19863 for as_dir in $PATH
19864 do
19865   IFS=$as_save_IFS
19866   test -z "$as_dir" && as_dir=.
19867     for ac_exec_ext in '' $ac_executable_extensions; do
19868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19869     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19871     break 2
19872   fi
19873 done
19874   done
19875 IFS=$as_save_IFS
19876 
19877   ;;
19878 esac
19879 fi
19880 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19881 if test -n "$CHECK_MAKE"; then
19882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19883 $as_echo "$CHECK_MAKE" >&6; }
19884 else
19885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19886 $as_echo "no" >&6; }
19887 fi
19888 
19889 
19890   test -n "$CHECK_MAKE" && break
19891 done
19892 
19893 
19894   MAKE_CANDIDATE=""$CHECK_MAKE""
19895   DESCRIPTION="make in PATH"
19896 
19897   # On Cygwin, we require a newer version of make than on other platforms
19898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19899     MAKE_VERSION_EXPR="-e 4\."
19900     MAKE_REQUIRED_VERSION="4.0"
19901    else
19902     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19903     MAKE_REQUIRED_VERSION="3.81"
19904   fi
19905 
19906   if test "x$MAKE_CANDIDATE" != x; then
19907     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19908 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19909     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19910     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19911     if test "x$IS_GNU_MAKE" = x; then
19912       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19913 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19914     else
19915       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19916       if test "x$IS_MODERN_MAKE" = x; then
19917         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19918 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19919       else
19920         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19921           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19922             MAKE_EXPECTED_ENV='cygwin'
19923           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19924             MAKE_EXPECTED_ENV='msys'
19925           else
19926             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19927           fi
19928           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19929           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19930         else
19931           # Not relevant for non-Windows
19932           IS_MAKE_CORRECT_ENV=true
19933         fi
19934         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19935           { $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
19936 $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;}
19937         else
19938           FOUND_MAKE=$MAKE_CANDIDATE
19939 
19940   # Only process if variable expands to non-empty
19941 
19942   if test "x$FOUND_MAKE" != x; then
19943     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19944 
19945   # First separate the path from the arguments. This will split at the first
19946   # space.
19947   complete="$FOUND_MAKE"
19948   path="${complete%% *}"
19949   tmp="$complete EOL"
19950   arguments="${tmp#* }"
19951 
19952   # Input might be given as Windows format, start by converting to
19953   # unix format.
19954   new_path=`$CYGPATH -u "$path"`
19955 
19956   # Now try to locate executable using which
19957   new_path=`$WHICH "$new_path" 2> /dev/null`
19958   # bat and cmd files are not always considered executable in cygwin causing which
19959   # to not find them
19960   if test "x$new_path" = x \
19961       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19962       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19963     new_path=`$CYGPATH -u "$path"`
19964   fi
19965   if test "x$new_path" = x; then
19966     # Oops. Which didn't find the executable.
19967     # The splitting of arguments from the executable at a space might have been incorrect,
19968     # since paths with space are more likely in Windows. Give it another try with the whole
19969     # argument.
19970     path="$complete"
19971     arguments="EOL"
19972     new_path=`$CYGPATH -u "$path"`
19973     new_path=`$WHICH "$new_path" 2> /dev/null`
19974     # bat and cmd files are not always considered executable in cygwin causing which
19975     # to not find them
19976     if test "x$new_path" = x \
19977         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19978         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19979       new_path=`$CYGPATH -u "$path"`
19980     fi
19981     if test "x$new_path" = x; then
19982       # It's still not found. Now this is an unrecoverable error.
19983       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19984 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19985       has_space=`$ECHO "$complete" | $GREP " "`
19986       if test "x$has_space" != x; then
19987         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19988 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19989       fi
19990       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19991     fi
19992   fi
19993 
19994   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19995   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19996   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19997   # "foo.exe" is OK but "foo" is an error.
19998   #
19999   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20000   # It is also a way to make sure we got the proper file name for the real test later on.
20001   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20002   if test "x$test_shortpath" = x; then
20003     # Short path failed, file does not exist as specified.
20004     # Try adding .exe or .cmd
20005     if test -f "${new_path}.exe"; then
20006       input_to_shortpath="${new_path}.exe"
20007     elif test -f "${new_path}.cmd"; then
20008       input_to_shortpath="${new_path}.cmd"
20009     else
20010       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20011 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20012       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20013 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20014       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20015     fi
20016   else
20017     input_to_shortpath="$new_path"
20018   fi
20019 
20020   # Call helper function which possibly converts this using DOS-style short mode.
20021   # If so, the updated path is stored in $new_path.
20022   new_path="$input_to_shortpath"
20023 
20024   input_path="$input_to_shortpath"
20025   # Check if we need to convert this using DOS-style short mode. If the path
20026   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20027   # take no chances and rewrite it.
20028   # Note: m4 eats our [], so we need to use [ and ] instead.
20029   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20030   if test "x$has_forbidden_chars" != x; then
20031     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20032     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20033     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20034     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20035       # Going to short mode and back again did indeed matter. Since short mode is
20036       # case insensitive, let's make it lowercase to improve readability.
20037       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20038       # Now convert it back to Unix-style (cygpath)
20039       input_path=`$CYGPATH -u "$shortmode_path"`
20040       new_path="$input_path"
20041     fi
20042   fi
20043 
20044   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20045   if test "x$test_cygdrive_prefix" = x; then
20046     # As a simple fix, exclude /usr/bin since it's not a real path.
20047     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20048       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20049       # a path prefixed by /cygdrive for fixpath to work.
20050       new_path="$CYGWIN_ROOT_PATH$input_path"
20051     fi
20052   fi
20053 
20054   # remove trailing .exe if any
20055   new_path="${new_path/%.exe/}"
20056 
20057     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20058 
20059   # First separate the path from the arguments. This will split at the first
20060   # space.
20061   complete="$FOUND_MAKE"
20062   path="${complete%% *}"
20063   tmp="$complete EOL"
20064   arguments="${tmp#* }"
20065 
20066   # Input might be given as Windows format, start by converting to
20067   # unix format.
20068   new_path="$path"
20069 
20070   windows_path="$new_path"
20071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20072     unix_path=`$CYGPATH -u "$windows_path"`
20073     new_path="$unix_path"
20074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20076     new_path="$unix_path"
20077   fi
20078 
20079 
20080   # Now try to locate executable using which
20081   new_path=`$WHICH "$new_path" 2> /dev/null`
20082 
20083   if test "x$new_path" = x; then
20084     # Oops. Which didn't find the executable.
20085     # The splitting of arguments from the executable at a space might have been incorrect,
20086     # since paths with space are more likely in Windows. Give it another try with the whole
20087     # argument.
20088     path="$complete"
20089     arguments="EOL"
20090     new_path="$path"
20091 
20092   windows_path="$new_path"
20093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20094     unix_path=`$CYGPATH -u "$windows_path"`
20095     new_path="$unix_path"
20096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20098     new_path="$unix_path"
20099   fi
20100 
20101 
20102     new_path=`$WHICH "$new_path" 2> /dev/null`
20103     # bat and cmd files are not always considered executable in MSYS causing which
20104     # to not find them
20105     if test "x$new_path" = x \
20106         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20107         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20108       new_path="$path"
20109 
20110   windows_path="$new_path"
20111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20112     unix_path=`$CYGPATH -u "$windows_path"`
20113     new_path="$unix_path"
20114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20116     new_path="$unix_path"
20117   fi
20118 
20119     fi
20120 
20121     if test "x$new_path" = x; then
20122       # It's still not found. Now this is an unrecoverable error.
20123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20124 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20125       has_space=`$ECHO "$complete" | $GREP " "`
20126       if test "x$has_space" != x; then
20127         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20128 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20129       fi
20130       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20131     fi
20132   fi
20133 
20134   # Now new_path has a complete unix path to the binary
20135   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20136     # Keep paths in /bin as-is, but remove trailing .exe if any
20137     new_path="${new_path/%.exe/}"
20138     # Do not save /bin paths to all_fixpath_prefixes!
20139   else
20140     # Not in mixed or Windows style, start by that.
20141     new_path=`cmd //c echo $new_path`
20142 
20143   input_path="$new_path"
20144   # Check if we need to convert this using DOS-style short mode. If the path
20145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20146   # take no chances and rewrite it.
20147   # Note: m4 eats our [], so we need to use [ and ] instead.
20148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20149   if test "x$has_forbidden_chars" != x; then
20150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20152   fi
20153 
20154     # Output is in $new_path
20155 
20156   windows_path="$new_path"
20157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20158     unix_path=`$CYGPATH -u "$windows_path"`
20159     new_path="$unix_path"
20160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20162     new_path="$unix_path"
20163   fi
20164 
20165     # remove trailing .exe if any
20166     new_path="${new_path/%.exe/}"
20167 
20168     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20169     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20170   fi
20171 
20172     else
20173       # We're on a unix platform. Hooray! :)
20174       # First separate the path from the arguments. This will split at the first
20175       # space.
20176       complete="$FOUND_MAKE"
20177       path="${complete%% *}"
20178       tmp="$complete EOL"
20179       arguments="${tmp#* }"
20180 
20181       # Cannot rely on the command "which" here since it doesn't always work.
20182       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20183       if test -z "$is_absolute_path"; then
20184         # Path to executable is not absolute. Find it.
20185         IFS_save="$IFS"
20186         IFS=:
20187         for p in $PATH; do
20188           if test -f "$p/$path" && test -x "$p/$path"; then
20189             new_path="$p/$path"
20190             break
20191           fi
20192         done
20193         IFS="$IFS_save"
20194       else
20195         # This is an absolute path, we can use it without further modifications.
20196         new_path="$path"
20197       fi
20198 
20199       if test "x$new_path" = x; then
20200         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20201 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20202         has_space=`$ECHO "$complete" | $GREP " "`
20203         if test "x$has_space" != x; then
20204           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20205 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20206         fi
20207         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20208       fi
20209     fi
20210 
20211     # Now join together the path and the arguments once again
20212     if test "x$arguments" != xEOL; then
20213       new_complete="$new_path ${arguments% *}"
20214     else
20215       new_complete="$new_path"
20216     fi
20217 
20218     if test "x$complete" != "x$new_complete"; then
20219       FOUND_MAKE="$new_complete"
20220       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20221 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20222     fi
20223   fi
20224 
20225         fi
20226       fi
20227     fi
20228   fi
20229 
20230     fi
20231 
20232     if test "x$FOUND_MAKE" = x; then
20233       if test "x$TOOLCHAIN_PATH" != x; then
20234         # We have a toolchain path, check that as well before giving up.
20235         OLD_PATH=$PATH
20236         PATH=$TOOLCHAIN_PATH:$PATH
20237         for ac_prog in gmake
20238 do
20239   # Extract the first word of "$ac_prog", so it can be a program name with args.
20240 set dummy $ac_prog; ac_word=$2
20241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20242 $as_echo_n "checking for $ac_word... " >&6; }
20243 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20244   $as_echo_n "(cached) " >&6
20245 else
20246   case $CHECK_TOOLSDIR_GMAKE in
20247   [\\/]* | ?:[\\/]*)
20248   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20249   ;;
20250   *)
20251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20252 for as_dir in $PATH
20253 do
20254   IFS=$as_save_IFS
20255   test -z "$as_dir" && as_dir=.
20256     for ac_exec_ext in '' $ac_executable_extensions; do
20257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20258     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20260     break 2
20261   fi
20262 done
20263   done
20264 IFS=$as_save_IFS
20265 
20266   ;;
20267 esac
20268 fi
20269 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20270 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20272 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20273 else
20274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20275 $as_echo "no" >&6; }
20276 fi
20277 
20278 
20279   test -n "$CHECK_TOOLSDIR_GMAKE" && break
20280 done
20281 
20282 
20283   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20284   DESCRIPTION="gmake in tools-dir"
20285 
20286   # On Cygwin, we require a newer version of make than on other platforms
20287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20288     MAKE_VERSION_EXPR="-e 4\."
20289     MAKE_REQUIRED_VERSION="4.0"
20290    else
20291     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20292     MAKE_REQUIRED_VERSION="3.81"
20293   fi
20294 
20295   if test "x$MAKE_CANDIDATE" != x; then
20296     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20297 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20298     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20299     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20300     if test "x$IS_GNU_MAKE" = x; then
20301       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20302 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20303     else
20304       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20305       if test "x$IS_MODERN_MAKE" = x; then
20306         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20307 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20308       else
20309         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20310           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20311             MAKE_EXPECTED_ENV='cygwin'
20312           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20313             MAKE_EXPECTED_ENV='msys'
20314           else
20315             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20316           fi
20317           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20318           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20319         else
20320           # Not relevant for non-Windows
20321           IS_MAKE_CORRECT_ENV=true
20322         fi
20323         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20324           { $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
20325 $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;}
20326         else
20327           FOUND_MAKE=$MAKE_CANDIDATE
20328 
20329   # Only process if variable expands to non-empty
20330 
20331   if test "x$FOUND_MAKE" != x; then
20332     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20333 
20334   # First separate the path from the arguments. This will split at the first
20335   # space.
20336   complete="$FOUND_MAKE"
20337   path="${complete%% *}"
20338   tmp="$complete EOL"
20339   arguments="${tmp#* }"
20340 
20341   # Input might be given as Windows format, start by converting to
20342   # unix format.
20343   new_path=`$CYGPATH -u "$path"`
20344 
20345   # Now try to locate executable using which
20346   new_path=`$WHICH "$new_path" 2> /dev/null`
20347   # bat and cmd files are not always considered executable in cygwin causing which
20348   # to not find them
20349   if test "x$new_path" = x \
20350       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20351       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20352     new_path=`$CYGPATH -u "$path"`
20353   fi
20354   if test "x$new_path" = x; then
20355     # Oops. Which didn't find the executable.
20356     # The splitting of arguments from the executable at a space might have been incorrect,
20357     # since paths with space are more likely in Windows. Give it another try with the whole
20358     # argument.
20359     path="$complete"
20360     arguments="EOL"
20361     new_path=`$CYGPATH -u "$path"`
20362     new_path=`$WHICH "$new_path" 2> /dev/null`
20363     # bat and cmd files are not always considered executable in cygwin causing which
20364     # to not find them
20365     if test "x$new_path" = x \
20366         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20367         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20368       new_path=`$CYGPATH -u "$path"`
20369     fi
20370     if test "x$new_path" = x; then
20371       # It's still not found. Now this is an unrecoverable error.
20372       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20373 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20374       has_space=`$ECHO "$complete" | $GREP " "`
20375       if test "x$has_space" != x; then
20376         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20377 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20378       fi
20379       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20380     fi
20381   fi
20382 
20383   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20384   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20385   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20386   # "foo.exe" is OK but "foo" is an error.
20387   #
20388   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20389   # It is also a way to make sure we got the proper file name for the real test later on.
20390   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20391   if test "x$test_shortpath" = x; then
20392     # Short path failed, file does not exist as specified.
20393     # Try adding .exe or .cmd
20394     if test -f "${new_path}.exe"; then
20395       input_to_shortpath="${new_path}.exe"
20396     elif test -f "${new_path}.cmd"; then
20397       input_to_shortpath="${new_path}.cmd"
20398     else
20399       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20400 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20401       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20402 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20403       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20404     fi
20405   else
20406     input_to_shortpath="$new_path"
20407   fi
20408 
20409   # Call helper function which possibly converts this using DOS-style short mode.
20410   # If so, the updated path is stored in $new_path.
20411   new_path="$input_to_shortpath"
20412 
20413   input_path="$input_to_shortpath"
20414   # Check if we need to convert this using DOS-style short mode. If the path
20415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20416   # take no chances and rewrite it.
20417   # Note: m4 eats our [], so we need to use [ and ] instead.
20418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20419   if test "x$has_forbidden_chars" != x; then
20420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20421     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20422     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20423     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20424       # Going to short mode and back again did indeed matter. Since short mode is
20425       # case insensitive, let's make it lowercase to improve readability.
20426       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20427       # Now convert it back to Unix-style (cygpath)
20428       input_path=`$CYGPATH -u "$shortmode_path"`
20429       new_path="$input_path"
20430     fi
20431   fi
20432 
20433   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20434   if test "x$test_cygdrive_prefix" = x; then
20435     # As a simple fix, exclude /usr/bin since it's not a real path.
20436     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20437       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20438       # a path prefixed by /cygdrive for fixpath to work.
20439       new_path="$CYGWIN_ROOT_PATH$input_path"
20440     fi
20441   fi
20442 
20443   # remove trailing .exe if any
20444   new_path="${new_path/%.exe/}"
20445 
20446     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20447 
20448   # First separate the path from the arguments. This will split at the first
20449   # space.
20450   complete="$FOUND_MAKE"
20451   path="${complete%% *}"
20452   tmp="$complete EOL"
20453   arguments="${tmp#* }"
20454 
20455   # Input might be given as Windows format, start by converting to
20456   # unix format.
20457   new_path="$path"
20458 
20459   windows_path="$new_path"
20460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20461     unix_path=`$CYGPATH -u "$windows_path"`
20462     new_path="$unix_path"
20463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20465     new_path="$unix_path"
20466   fi
20467 
20468 
20469   # Now try to locate executable using which
20470   new_path=`$WHICH "$new_path" 2> /dev/null`
20471 
20472   if test "x$new_path" = x; then
20473     # Oops. Which didn't find the executable.
20474     # The splitting of arguments from the executable at a space might have been incorrect,
20475     # since paths with space are more likely in Windows. Give it another try with the whole
20476     # argument.
20477     path="$complete"
20478     arguments="EOL"
20479     new_path="$path"
20480 
20481   windows_path="$new_path"
20482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20483     unix_path=`$CYGPATH -u "$windows_path"`
20484     new_path="$unix_path"
20485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20487     new_path="$unix_path"
20488   fi
20489 
20490 
20491     new_path=`$WHICH "$new_path" 2> /dev/null`
20492     # bat and cmd files are not always considered executable in MSYS causing which
20493     # to not find them
20494     if test "x$new_path" = x \
20495         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20496         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20497       new_path="$path"
20498 
20499   windows_path="$new_path"
20500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20501     unix_path=`$CYGPATH -u "$windows_path"`
20502     new_path="$unix_path"
20503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20505     new_path="$unix_path"
20506   fi
20507 
20508     fi
20509 
20510     if test "x$new_path" = x; then
20511       # It's still not found. Now this is an unrecoverable error.
20512       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20513 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20514       has_space=`$ECHO "$complete" | $GREP " "`
20515       if test "x$has_space" != x; then
20516         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20517 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20518       fi
20519       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20520     fi
20521   fi
20522 
20523   # Now new_path has a complete unix path to the binary
20524   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20525     # Keep paths in /bin as-is, but remove trailing .exe if any
20526     new_path="${new_path/%.exe/}"
20527     # Do not save /bin paths to all_fixpath_prefixes!
20528   else
20529     # Not in mixed or Windows style, start by that.
20530     new_path=`cmd //c echo $new_path`
20531 
20532   input_path="$new_path"
20533   # Check if we need to convert this using DOS-style short mode. If the path
20534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20535   # take no chances and rewrite it.
20536   # Note: m4 eats our [], so we need to use [ and ] instead.
20537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20538   if test "x$has_forbidden_chars" != x; then
20539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20540     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20541   fi
20542 
20543     # Output is in $new_path
20544 
20545   windows_path="$new_path"
20546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20547     unix_path=`$CYGPATH -u "$windows_path"`
20548     new_path="$unix_path"
20549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20551     new_path="$unix_path"
20552   fi
20553 
20554     # remove trailing .exe if any
20555     new_path="${new_path/%.exe/}"
20556 
20557     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20558     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20559   fi
20560 
20561     else
20562       # We're on a unix platform. Hooray! :)
20563       # First separate the path from the arguments. This will split at the first
20564       # space.
20565       complete="$FOUND_MAKE"
20566       path="${complete%% *}"
20567       tmp="$complete EOL"
20568       arguments="${tmp#* }"
20569 
20570       # Cannot rely on the command "which" here since it doesn't always work.
20571       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20572       if test -z "$is_absolute_path"; then
20573         # Path to executable is not absolute. Find it.
20574         IFS_save="$IFS"
20575         IFS=:
20576         for p in $PATH; do
20577           if test -f "$p/$path" && test -x "$p/$path"; then
20578             new_path="$p/$path"
20579             break
20580           fi
20581         done
20582         IFS="$IFS_save"
20583       else
20584         # This is an absolute path, we can use it without further modifications.
20585         new_path="$path"
20586       fi
20587 
20588       if test "x$new_path" = x; then
20589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20590 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20591         has_space=`$ECHO "$complete" | $GREP " "`
20592         if test "x$has_space" != x; then
20593           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20594 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20595         fi
20596         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20597       fi
20598     fi
20599 
20600     # Now join together the path and the arguments once again
20601     if test "x$arguments" != xEOL; then
20602       new_complete="$new_path ${arguments% *}"
20603     else
20604       new_complete="$new_path"
20605     fi
20606 
20607     if test "x$complete" != "x$new_complete"; then
20608       FOUND_MAKE="$new_complete"
20609       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20610 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20611     fi
20612   fi
20613 
20614         fi
20615       fi
20616     fi
20617   fi
20618 
20619         if test "x$FOUND_MAKE" = x; then
20620           for ac_prog in make
20621 do
20622   # Extract the first word of "$ac_prog", so it can be a program name with args.
20623 set dummy $ac_prog; ac_word=$2
20624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20625 $as_echo_n "checking for $ac_word... " >&6; }
20626 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20627   $as_echo_n "(cached) " >&6
20628 else
20629   case $CHECK_TOOLSDIR_MAKE in
20630   [\\/]* | ?:[\\/]*)
20631   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20632   ;;
20633   *)
20634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20635 for as_dir in $PATH
20636 do
20637   IFS=$as_save_IFS
20638   test -z "$as_dir" && as_dir=.
20639     for ac_exec_ext in '' $ac_executable_extensions; do
20640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20641     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20643     break 2
20644   fi
20645 done
20646   done
20647 IFS=$as_save_IFS
20648 
20649   ;;
20650 esac
20651 fi
20652 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20653 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20655 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20656 else
20657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20658 $as_echo "no" >&6; }
20659 fi
20660 
20661 
20662   test -n "$CHECK_TOOLSDIR_MAKE" && break
20663 done
20664 
20665 
20666   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20667   DESCRIPTION="make in tools-dir"
20668 
20669   # On Cygwin, we require a newer version of make than on other platforms
20670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20671     MAKE_VERSION_EXPR="-e 4\."
20672     MAKE_REQUIRED_VERSION="4.0"
20673    else
20674     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20675     MAKE_REQUIRED_VERSION="3.81"
20676   fi
20677 
20678   if test "x$MAKE_CANDIDATE" != x; then
20679     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20680 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20681     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20682     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20683     if test "x$IS_GNU_MAKE" = x; then
20684       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20685 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20686     else
20687       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20688       if test "x$IS_MODERN_MAKE" = x; then
20689         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20690 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20691       else
20692         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20693           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20694             MAKE_EXPECTED_ENV='cygwin'
20695           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20696             MAKE_EXPECTED_ENV='msys'
20697           else
20698             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20699           fi
20700           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20701           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20702         else
20703           # Not relevant for non-Windows
20704           IS_MAKE_CORRECT_ENV=true
20705         fi
20706         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20707           { $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
20708 $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;}
20709         else
20710           FOUND_MAKE=$MAKE_CANDIDATE
20711 
20712   # Only process if variable expands to non-empty
20713 
20714   if test "x$FOUND_MAKE" != x; then
20715     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20716 
20717   # First separate the path from the arguments. This will split at the first
20718   # space.
20719   complete="$FOUND_MAKE"
20720   path="${complete%% *}"
20721   tmp="$complete EOL"
20722   arguments="${tmp#* }"
20723 
20724   # Input might be given as Windows format, start by converting to
20725   # unix format.
20726   new_path=`$CYGPATH -u "$path"`
20727 
20728   # Now try to locate executable using which
20729   new_path=`$WHICH "$new_path" 2> /dev/null`
20730   # bat and cmd files are not always considered executable in cygwin causing which
20731   # to not find them
20732   if test "x$new_path" = x \
20733       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20734       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20735     new_path=`$CYGPATH -u "$path"`
20736   fi
20737   if test "x$new_path" = x; then
20738     # Oops. Which didn't find the executable.
20739     # The splitting of arguments from the executable at a space might have been incorrect,
20740     # since paths with space are more likely in Windows. Give it another try with the whole
20741     # argument.
20742     path="$complete"
20743     arguments="EOL"
20744     new_path=`$CYGPATH -u "$path"`
20745     new_path=`$WHICH "$new_path" 2> /dev/null`
20746     # bat and cmd files are not always considered executable in cygwin causing which
20747     # to not find them
20748     if test "x$new_path" = x \
20749         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20750         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20751       new_path=`$CYGPATH -u "$path"`
20752     fi
20753     if test "x$new_path" = x; then
20754       # It's still not found. Now this is an unrecoverable error.
20755       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20756 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20757       has_space=`$ECHO "$complete" | $GREP " "`
20758       if test "x$has_space" != x; then
20759         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20760 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20761       fi
20762       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20763     fi
20764   fi
20765 
20766   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20767   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20768   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20769   # "foo.exe" is OK but "foo" is an error.
20770   #
20771   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20772   # It is also a way to make sure we got the proper file name for the real test later on.
20773   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20774   if test "x$test_shortpath" = x; then
20775     # Short path failed, file does not exist as specified.
20776     # Try adding .exe or .cmd
20777     if test -f "${new_path}.exe"; then
20778       input_to_shortpath="${new_path}.exe"
20779     elif test -f "${new_path}.cmd"; then
20780       input_to_shortpath="${new_path}.cmd"
20781     else
20782       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20783 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20784       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20785 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20786       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20787     fi
20788   else
20789     input_to_shortpath="$new_path"
20790   fi
20791 
20792   # Call helper function which possibly converts this using DOS-style short mode.
20793   # If so, the updated path is stored in $new_path.
20794   new_path="$input_to_shortpath"
20795 
20796   input_path="$input_to_shortpath"
20797   # Check if we need to convert this using DOS-style short mode. If the path
20798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20799   # take no chances and rewrite it.
20800   # Note: m4 eats our [], so we need to use [ and ] instead.
20801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20802   if test "x$has_forbidden_chars" != x; then
20803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20804     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20805     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20806     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20807       # Going to short mode and back again did indeed matter. Since short mode is
20808       # case insensitive, let's make it lowercase to improve readability.
20809       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20810       # Now convert it back to Unix-style (cygpath)
20811       input_path=`$CYGPATH -u "$shortmode_path"`
20812       new_path="$input_path"
20813     fi
20814   fi
20815 
20816   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20817   if test "x$test_cygdrive_prefix" = x; then
20818     # As a simple fix, exclude /usr/bin since it's not a real path.
20819     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20820       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20821       # a path prefixed by /cygdrive for fixpath to work.
20822       new_path="$CYGWIN_ROOT_PATH$input_path"
20823     fi
20824   fi
20825 
20826   # remove trailing .exe if any
20827   new_path="${new_path/%.exe/}"
20828 
20829     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20830 
20831   # First separate the path from the arguments. This will split at the first
20832   # space.
20833   complete="$FOUND_MAKE"
20834   path="${complete%% *}"
20835   tmp="$complete EOL"
20836   arguments="${tmp#* }"
20837 
20838   # Input might be given as Windows format, start by converting to
20839   # unix format.
20840   new_path="$path"
20841 
20842   windows_path="$new_path"
20843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20844     unix_path=`$CYGPATH -u "$windows_path"`
20845     new_path="$unix_path"
20846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20848     new_path="$unix_path"
20849   fi
20850 
20851 
20852   # Now try to locate executable using which
20853   new_path=`$WHICH "$new_path" 2> /dev/null`
20854 
20855   if test "x$new_path" = x; then
20856     # Oops. Which didn't find the executable.
20857     # The splitting of arguments from the executable at a space might have been incorrect,
20858     # since paths with space are more likely in Windows. Give it another try with the whole
20859     # argument.
20860     path="$complete"
20861     arguments="EOL"
20862     new_path="$path"
20863 
20864   windows_path="$new_path"
20865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20866     unix_path=`$CYGPATH -u "$windows_path"`
20867     new_path="$unix_path"
20868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20870     new_path="$unix_path"
20871   fi
20872 
20873 
20874     new_path=`$WHICH "$new_path" 2> /dev/null`
20875     # bat and cmd files are not always considered executable in MSYS causing which
20876     # to not find them
20877     if test "x$new_path" = x \
20878         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20879         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20880       new_path="$path"
20881 
20882   windows_path="$new_path"
20883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20884     unix_path=`$CYGPATH -u "$windows_path"`
20885     new_path="$unix_path"
20886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20887     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20888     new_path="$unix_path"
20889   fi
20890 
20891     fi
20892 
20893     if test "x$new_path" = x; then
20894       # It's still not found. Now this is an unrecoverable error.
20895       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20896 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20897       has_space=`$ECHO "$complete" | $GREP " "`
20898       if test "x$has_space" != x; then
20899         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20900 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20901       fi
20902       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20903     fi
20904   fi
20905 
20906   # Now new_path has a complete unix path to the binary
20907   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20908     # Keep paths in /bin as-is, but remove trailing .exe if any
20909     new_path="${new_path/%.exe/}"
20910     # Do not save /bin paths to all_fixpath_prefixes!
20911   else
20912     # Not in mixed or Windows style, start by that.
20913     new_path=`cmd //c echo $new_path`
20914 
20915   input_path="$new_path"
20916   # Check if we need to convert this using DOS-style short mode. If the path
20917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20918   # take no chances and rewrite it.
20919   # Note: m4 eats our [], so we need to use [ and ] instead.
20920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20921   if test "x$has_forbidden_chars" != x; then
20922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20924   fi
20925 
20926     # Output is in $new_path
20927 
20928   windows_path="$new_path"
20929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20930     unix_path=`$CYGPATH -u "$windows_path"`
20931     new_path="$unix_path"
20932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20934     new_path="$unix_path"
20935   fi
20936 
20937     # remove trailing .exe if any
20938     new_path="${new_path/%.exe/}"
20939 
20940     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20941     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20942   fi
20943 
20944     else
20945       # We're on a unix platform. Hooray! :)
20946       # First separate the path from the arguments. This will split at the first
20947       # space.
20948       complete="$FOUND_MAKE"
20949       path="${complete%% *}"
20950       tmp="$complete EOL"
20951       arguments="${tmp#* }"
20952 
20953       # Cannot rely on the command "which" here since it doesn't always work.
20954       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20955       if test -z "$is_absolute_path"; then
20956         # Path to executable is not absolute. Find it.
20957         IFS_save="$IFS"
20958         IFS=:
20959         for p in $PATH; do
20960           if test -f "$p/$path" && test -x "$p/$path"; then
20961             new_path="$p/$path"
20962             break
20963           fi
20964         done
20965         IFS="$IFS_save"
20966       else
20967         # This is an absolute path, we can use it without further modifications.
20968         new_path="$path"
20969       fi
20970 
20971       if test "x$new_path" = x; then
20972         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20973 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20974         has_space=`$ECHO "$complete" | $GREP " "`
20975         if test "x$has_space" != x; then
20976           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20977 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20978         fi
20979         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20980       fi
20981     fi
20982 
20983     # Now join together the path and the arguments once again
20984     if test "x$arguments" != xEOL; then
20985       new_complete="$new_path ${arguments% *}"
20986     else
20987       new_complete="$new_path"
20988     fi
20989 
20990     if test "x$complete" != "x$new_complete"; then
20991       FOUND_MAKE="$new_complete"
20992       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20993 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20994     fi
20995   fi
20996 
20997         fi
20998       fi
20999     fi
21000   fi
21001 
21002         fi
21003         PATH=$OLD_PATH
21004       fi
21005     fi
21006 
21007     if test "x$FOUND_MAKE" = x; then
21008       as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
21009     fi
21010 
21011     else
21012       # If it succeeded, then it was overridden by the user. We will use it
21013       # for the tool.
21014 
21015       # First remove it from the list of overridden variables, so we can test
21016       # for unknown variables in the end.
21017       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21018 
21019       # Check if we try to supply an empty value
21020       if test "x$MAKE" = x; then
21021         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
21022 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
21023         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21024 $as_echo_n "checking for MAKE... " >&6; }
21025         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21026 $as_echo "disabled" >&6; }
21027       else
21028         # Check if the provided tool contains a complete path.
21029         tool_specified="$MAKE"
21030         tool_basename="${tool_specified##*/}"
21031         if test "x$tool_basename" = "x$tool_specified"; then
21032           # A command without a complete path is provided, search $PATH.
21033           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
21034 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
21035           # Extract the first word of "$tool_basename", so it can be a program name with args.
21036 set dummy $tool_basename; ac_word=$2
21037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21038 $as_echo_n "checking for $ac_word... " >&6; }
21039 if ${ac_cv_path_MAKE+:} false; then :
21040   $as_echo_n "(cached) " >&6
21041 else
21042   case $MAKE in
21043   [\\/]* | ?:[\\/]*)
21044   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
21045   ;;
21046   *)
21047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21048 for as_dir in $PATH
21049 do
21050   IFS=$as_save_IFS
21051   test -z "$as_dir" && as_dir=.
21052     for ac_exec_ext in '' $ac_executable_extensions; do
21053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21054     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21056     break 2
21057   fi
21058 done
21059   done
21060 IFS=$as_save_IFS
21061 
21062   ;;
21063 esac
21064 fi
21065 MAKE=$ac_cv_path_MAKE
21066 if test -n "$MAKE"; then
21067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21068 $as_echo "$MAKE" >&6; }
21069 else
21070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21071 $as_echo "no" >&6; }
21072 fi
21073 
21074 
21075           if test "x$MAKE" = x; then
21076             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21077           fi
21078         else
21079           # Otherwise we believe it is a complete path. Use it as it is.
21080           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21081 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21082           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21083 $as_echo_n "checking for MAKE... " >&6; }
21084           if test ! -x "$tool_specified"; then
21085             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21086 $as_echo "not found" >&6; }
21087             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21088           fi
21089           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21090 $as_echo "$tool_specified" >&6; }
21091         fi
21092       fi
21093     fi
21094 
21095     # If MAKE was set by user, verify the version
21096 
21097   MAKE_CANDIDATE=""$MAKE""
21098   DESCRIPTION="user supplied MAKE=$MAKE"
21099 
21100   # On Cygwin, we require a newer version of make than on other platforms
21101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21102     MAKE_VERSION_EXPR="-e 4\."
21103     MAKE_REQUIRED_VERSION="4.0"
21104    else
21105     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21106     MAKE_REQUIRED_VERSION="3.81"
21107   fi
21108 
21109   if test "x$MAKE_CANDIDATE" != x; then
21110     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21111 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21112     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21113     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21114     if test "x$IS_GNU_MAKE" = x; then
21115       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21116 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21117     else
21118       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21119       if test "x$IS_MODERN_MAKE" = x; then
21120         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
21121 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
21122       else
21123         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21124           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21125             MAKE_EXPECTED_ENV='cygwin'
21126           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21127             MAKE_EXPECTED_ENV='msys'
21128           else
21129             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21130           fi
21131           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21132           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21133         else
21134           # Not relevant for non-Windows
21135           IS_MAKE_CORRECT_ENV=true
21136         fi
21137         if test "x$IS_MAKE_CORRECT_ENV" = x; then
21138           { $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
21139 $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;}
21140         else
21141           FOUND_MAKE=$MAKE_CANDIDATE
21142 
21143   # Only process if variable expands to non-empty
21144 
21145   if test "x$FOUND_MAKE" != x; then
21146     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21147 
21148   # First separate the path from the arguments. This will split at the first
21149   # space.
21150   complete="$FOUND_MAKE"
21151   path="${complete%% *}"
21152   tmp="$complete EOL"
21153   arguments="${tmp#* }"
21154 
21155   # Input might be given as Windows format, start by converting to
21156   # unix format.
21157   new_path=`$CYGPATH -u "$path"`
21158 
21159   # Now try to locate executable using which
21160   new_path=`$WHICH "$new_path" 2> /dev/null`
21161   # bat and cmd files are not always considered executable in cygwin causing which
21162   # to not find them
21163   if test "x$new_path" = x \
21164       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21165       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21166     new_path=`$CYGPATH -u "$path"`
21167   fi
21168   if test "x$new_path" = x; then
21169     # Oops. Which didn't find the executable.
21170     # The splitting of arguments from the executable at a space might have been incorrect,
21171     # since paths with space are more likely in Windows. Give it another try with the whole
21172     # argument.
21173     path="$complete"
21174     arguments="EOL"
21175     new_path=`$CYGPATH -u "$path"`
21176     new_path=`$WHICH "$new_path" 2> /dev/null`
21177     # bat and cmd files are not always considered executable in cygwin causing which
21178     # to not find them
21179     if test "x$new_path" = x \
21180         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21181         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21182       new_path=`$CYGPATH -u "$path"`
21183     fi
21184     if test "x$new_path" = x; then
21185       # It's still not found. Now this is an unrecoverable error.
21186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21187 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21188       has_space=`$ECHO "$complete" | $GREP " "`
21189       if test "x$has_space" != x; then
21190         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21191 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21192       fi
21193       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21194     fi
21195   fi
21196 
21197   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21198   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21199   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21200   # "foo.exe" is OK but "foo" is an error.
21201   #
21202   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21203   # It is also a way to make sure we got the proper file name for the real test later on.
21204   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21205   if test "x$test_shortpath" = x; then
21206     # Short path failed, file does not exist as specified.
21207     # Try adding .exe or .cmd
21208     if test -f "${new_path}.exe"; then
21209       input_to_shortpath="${new_path}.exe"
21210     elif test -f "${new_path}.cmd"; then
21211       input_to_shortpath="${new_path}.cmd"
21212     else
21213       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21214 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21215       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21216 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21217       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21218     fi
21219   else
21220     input_to_shortpath="$new_path"
21221   fi
21222 
21223   # Call helper function which possibly converts this using DOS-style short mode.
21224   # If so, the updated path is stored in $new_path.
21225   new_path="$input_to_shortpath"
21226 
21227   input_path="$input_to_shortpath"
21228   # Check if we need to convert this using DOS-style short mode. If the path
21229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21230   # take no chances and rewrite it.
21231   # Note: m4 eats our [], so we need to use [ and ] instead.
21232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21233   if test "x$has_forbidden_chars" != x; then
21234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21238       # Going to short mode and back again did indeed matter. Since short mode is
21239       # case insensitive, let's make it lowercase to improve readability.
21240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21241       # Now convert it back to Unix-style (cygpath)
21242       input_path=`$CYGPATH -u "$shortmode_path"`
21243       new_path="$input_path"
21244     fi
21245   fi
21246 
21247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21248   if test "x$test_cygdrive_prefix" = x; then
21249     # As a simple fix, exclude /usr/bin since it's not a real path.
21250     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21252       # a path prefixed by /cygdrive for fixpath to work.
21253       new_path="$CYGWIN_ROOT_PATH$input_path"
21254     fi
21255   fi
21256 
21257   # remove trailing .exe if any
21258   new_path="${new_path/%.exe/}"
21259 
21260     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21261 
21262   # First separate the path from the arguments. This will split at the first
21263   # space.
21264   complete="$FOUND_MAKE"
21265   path="${complete%% *}"
21266   tmp="$complete EOL"
21267   arguments="${tmp#* }"
21268 
21269   # Input might be given as Windows format, start by converting to
21270   # unix format.
21271   new_path="$path"
21272 
21273   windows_path="$new_path"
21274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21275     unix_path=`$CYGPATH -u "$windows_path"`
21276     new_path="$unix_path"
21277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21279     new_path="$unix_path"
21280   fi
21281 
21282 
21283   # Now try to locate executable using which
21284   new_path=`$WHICH "$new_path" 2> /dev/null`
21285 
21286   if test "x$new_path" = x; then
21287     # Oops. Which didn't find the executable.
21288     # The splitting of arguments from the executable at a space might have been incorrect,
21289     # since paths with space are more likely in Windows. Give it another try with the whole
21290     # argument.
21291     path="$complete"
21292     arguments="EOL"
21293     new_path="$path"
21294 
21295   windows_path="$new_path"
21296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21297     unix_path=`$CYGPATH -u "$windows_path"`
21298     new_path="$unix_path"
21299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21301     new_path="$unix_path"
21302   fi
21303 
21304 
21305     new_path=`$WHICH "$new_path" 2> /dev/null`
21306     # bat and cmd files are not always considered executable in MSYS causing which
21307     # to not find them
21308     if test "x$new_path" = x \
21309         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21310         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21311       new_path="$path"
21312 
21313   windows_path="$new_path"
21314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21315     unix_path=`$CYGPATH -u "$windows_path"`
21316     new_path="$unix_path"
21317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21319     new_path="$unix_path"
21320   fi
21321 
21322     fi
21323 
21324     if test "x$new_path" = x; then
21325       # It's still not found. Now this is an unrecoverable error.
21326       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21327 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21328       has_space=`$ECHO "$complete" | $GREP " "`
21329       if test "x$has_space" != x; then
21330         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21331 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21332       fi
21333       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21334     fi
21335   fi
21336 
21337   # Now new_path has a complete unix path to the binary
21338   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21339     # Keep paths in /bin as-is, but remove trailing .exe if any
21340     new_path="${new_path/%.exe/}"
21341     # Do not save /bin paths to all_fixpath_prefixes!
21342   else
21343     # Not in mixed or Windows style, start by that.
21344     new_path=`cmd //c echo $new_path`
21345 
21346   input_path="$new_path"
21347   # Check if we need to convert this using DOS-style short mode. If the path
21348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21349   # take no chances and rewrite it.
21350   # Note: m4 eats our [], so we need to use [ and ] instead.
21351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21352   if test "x$has_forbidden_chars" != x; then
21353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21354     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21355   fi
21356 
21357     # Output is in $new_path
21358 
21359   windows_path="$new_path"
21360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21361     unix_path=`$CYGPATH -u "$windows_path"`
21362     new_path="$unix_path"
21363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21365     new_path="$unix_path"
21366   fi
21367 
21368     # remove trailing .exe if any
21369     new_path="${new_path/%.exe/}"
21370 
21371     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21372     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21373   fi
21374 
21375     else
21376       # We're on a unix platform. Hooray! :)
21377       # First separate the path from the arguments. This will split at the first
21378       # space.
21379       complete="$FOUND_MAKE"
21380       path="${complete%% *}"
21381       tmp="$complete EOL"
21382       arguments="${tmp#* }"
21383 
21384       # Cannot rely on the command "which" here since it doesn't always work.
21385       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21386       if test -z "$is_absolute_path"; then
21387         # Path to executable is not absolute. Find it.
21388         IFS_save="$IFS"
21389         IFS=:
21390         for p in $PATH; do
21391           if test -f "$p/$path" && test -x "$p/$path"; then
21392             new_path="$p/$path"
21393             break
21394           fi
21395         done
21396         IFS="$IFS_save"
21397       else
21398         # This is an absolute path, we can use it without further modifications.
21399         new_path="$path"
21400       fi
21401 
21402       if test "x$new_path" = x; then
21403         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21404 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21405         has_space=`$ECHO "$complete" | $GREP " "`
21406         if test "x$has_space" != x; then
21407           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21408 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21409         fi
21410         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21411       fi
21412     fi
21413 
21414     # Now join together the path and the arguments once again
21415     if test "x$arguments" != xEOL; then
21416       new_complete="$new_path ${arguments% *}"
21417     else
21418       new_complete="$new_path"
21419     fi
21420 
21421     if test "x$complete" != "x$new_complete"; then
21422       FOUND_MAKE="$new_complete"
21423       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21424 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21425     fi
21426   fi
21427 
21428         fi
21429       fi
21430     fi
21431   fi
21432 
21433     if test "x$FOUND_MAKE" = x; then
21434       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21435     fi
21436 
21437   fi
21438 
21439 
21440   MAKE=$FOUND_MAKE
21441 
21442   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21443 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21444 
21445 
21446   # Check if make supports the output sync option and if so, setup using it.
21447   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21448 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21449   if $MAKE --version -O > /dev/null 2>&1; then
21450     OUTPUT_SYNC_SUPPORTED=true
21451     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21452 $as_echo "yes" >&6; }
21453     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21454 $as_echo_n "checking for output-sync value... " >&6; }
21455 
21456 # Check whether --with-output-sync was given.
21457 if test "${with_output_sync+set}" = set; then :
21458   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21459 fi
21460 
21461     if test "x$OUTPUT_SYNC" = "x"; then
21462       OUTPUT_SYNC=none
21463     fi
21464     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21465 $as_echo "$OUTPUT_SYNC" >&6; }
21466     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21467       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21468     fi
21469   else
21470     OUTPUT_SYNC_SUPPORTED=false
21471     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21472 $as_echo "no" >&6; }
21473   fi
21474 
21475 
21476 
21477 
21478 
21479 
21480   # Test if find supports -delete
21481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21482 $as_echo_n "checking if find supports -delete... " >&6; }
21483   FIND_DELETE="-delete"
21484 
21485   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21486 
21487   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21488 
21489   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21490   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21491     # No, it does not.
21492     $RM $DELETEDIR/TestIfFindSupportsDelete
21493     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21494       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21495       FIND_DELETE="-print | $XARGS $RM"
21496     else
21497       FIND_DELETE="-exec $RM \{\} \+"
21498     fi
21499     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21500 $as_echo "no" >&6; }
21501   else
21502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21503 $as_echo "yes" >&6; }
21504   fi
21505   $RMDIR $DELETEDIR
21506 
21507 
21508 
21509   # Test which kind of tar was found
21510   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21511     TAR_TYPE="gnu"
21512   elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21513     TAR_TYPE="bsd"
21514   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21515     TAR_TYPE="bsd"
21516   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21517     TAR_TYPE="solaris"
21518   fi
21519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21520 $as_echo_n "checking what type of tar was found... " >&6; }
21521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21522 $as_echo "$TAR_TYPE" >&6; }
21523 
21524   TAR_CREATE_FILE_PARAM=""
21525 
21526   if test "x$TAR_TYPE" = "xgnu"; then
21527     TAR_INCLUDE_PARAM="T"
21528     TAR_SUPPORTS_TRANSFORM="true"
21529     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21530       # When using gnu tar for Solaris targets, need to use compatibility mode
21531       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21532     fi
21533   else
21534     TAR_INCLUDE_PARAM="I"
21535     TAR_SUPPORTS_TRANSFORM="false"
21536   fi
21537 
21538 
21539 
21540 
21541 
21542 
21543   # Test that grep supports -Fx with a list of pattern which includes null pattern.
21544   # This is a problem for the grep resident on AIX.
21545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21546 $as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21547   # Multiple subsequent spaces..
21548   STACK_SPACES='aaa   bbb   ccc'
21549   # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21550   # patterns in it.
21551   STACK_LIST=${STACK_SPACES// /$'\n'}
21552   NEEDLE_SPACES='ccc bbb aaa'
21553   NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21554   RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21555   if test "x$RESULT" == "x"; then
21556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21557 $as_echo "yes" >&6; }
21558   else
21559     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21560       ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21561     fi
21562     as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21563   fi
21564 
21565 
21566   # These tools might not be installed by default,
21567   # need hint on how to install them.
21568 
21569 
21570 
21571   # Publish this variable in the help.
21572 
21573 
21574   if [ -z "${UNZIP+x}" ]; then
21575     # The variable is not set by user, try to locate tool using the code snippet
21576     for ac_prog in unzip
21577 do
21578   # Extract the first word of "$ac_prog", so it can be a program name with args.
21579 set dummy $ac_prog; ac_word=$2
21580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21581 $as_echo_n "checking for $ac_word... " >&6; }
21582 if ${ac_cv_path_UNZIP+:} false; then :
21583   $as_echo_n "(cached) " >&6
21584 else
21585   case $UNZIP in
21586   [\\/]* | ?:[\\/]*)
21587   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21588   ;;
21589   *)
21590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21591 for as_dir in $PATH
21592 do
21593   IFS=$as_save_IFS
21594   test -z "$as_dir" && as_dir=.
21595     for ac_exec_ext in '' $ac_executable_extensions; do
21596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21597     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21599     break 2
21600   fi
21601 done
21602   done
21603 IFS=$as_save_IFS
21604 
21605   ;;
21606 esac
21607 fi
21608 UNZIP=$ac_cv_path_UNZIP
21609 if test -n "$UNZIP"; then
21610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21611 $as_echo "$UNZIP" >&6; }
21612 else
21613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21614 $as_echo "no" >&6; }
21615 fi
21616 
21617 
21618   test -n "$UNZIP" && break
21619 done
21620 
21621   else
21622     # The variable is set, but is it from the command line or the environment?
21623 
21624     # Try to remove the string !UNZIP! from our list.
21625     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21626     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21627       # If it failed, the variable was not from the command line. Ignore it,
21628       # but warn the user (except for BASH, which is always set by the calling BASH).
21629       if test "xUNZIP" != xBASH; then
21630         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21631 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21632       fi
21633       # Try to locate tool using the code snippet
21634       for ac_prog in unzip
21635 do
21636   # Extract the first word of "$ac_prog", so it can be a program name with args.
21637 set dummy $ac_prog; ac_word=$2
21638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21639 $as_echo_n "checking for $ac_word... " >&6; }
21640 if ${ac_cv_path_UNZIP+:} false; then :
21641   $as_echo_n "(cached) " >&6
21642 else
21643   case $UNZIP in
21644   [\\/]* | ?:[\\/]*)
21645   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21646   ;;
21647   *)
21648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21649 for as_dir in $PATH
21650 do
21651   IFS=$as_save_IFS
21652   test -z "$as_dir" && as_dir=.
21653     for ac_exec_ext in '' $ac_executable_extensions; do
21654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21655     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21657     break 2
21658   fi
21659 done
21660   done
21661 IFS=$as_save_IFS
21662 
21663   ;;
21664 esac
21665 fi
21666 UNZIP=$ac_cv_path_UNZIP
21667 if test -n "$UNZIP"; then
21668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21669 $as_echo "$UNZIP" >&6; }
21670 else
21671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21672 $as_echo "no" >&6; }
21673 fi
21674 
21675 
21676   test -n "$UNZIP" && break
21677 done
21678 
21679     else
21680       # If it succeeded, then it was overridden by the user. We will use it
21681       # for the tool.
21682 
21683       # First remove it from the list of overridden variables, so we can test
21684       # for unknown variables in the end.
21685       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21686 
21687       # Check if we try to supply an empty value
21688       if test "x$UNZIP" = x; then
21689         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21690 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21691         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21692 $as_echo_n "checking for UNZIP... " >&6; }
21693         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21694 $as_echo "disabled" >&6; }
21695       else
21696         # Check if the provided tool contains a complete path.
21697         tool_specified="$UNZIP"
21698         tool_basename="${tool_specified##*/}"
21699         if test "x$tool_basename" = "x$tool_specified"; then
21700           # A command without a complete path is provided, search $PATH.
21701           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21702 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21703           # Extract the first word of "$tool_basename", so it can be a program name with args.
21704 set dummy $tool_basename; ac_word=$2
21705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21706 $as_echo_n "checking for $ac_word... " >&6; }
21707 if ${ac_cv_path_UNZIP+:} false; then :
21708   $as_echo_n "(cached) " >&6
21709 else
21710   case $UNZIP in
21711   [\\/]* | ?:[\\/]*)
21712   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21713   ;;
21714   *)
21715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21716 for as_dir in $PATH
21717 do
21718   IFS=$as_save_IFS
21719   test -z "$as_dir" && as_dir=.
21720     for ac_exec_ext in '' $ac_executable_extensions; do
21721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21722     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21724     break 2
21725   fi
21726 done
21727   done
21728 IFS=$as_save_IFS
21729 
21730   ;;
21731 esac
21732 fi
21733 UNZIP=$ac_cv_path_UNZIP
21734 if test -n "$UNZIP"; then
21735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21736 $as_echo "$UNZIP" >&6; }
21737 else
21738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21739 $as_echo "no" >&6; }
21740 fi
21741 
21742 
21743           if test "x$UNZIP" = x; then
21744             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21745           fi
21746         else
21747           # Otherwise we believe it is a complete path. Use it as it is.
21748           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21749 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21750           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21751 $as_echo_n "checking for UNZIP... " >&6; }
21752           if test ! -x "$tool_specified"; then
21753             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21754 $as_echo "not found" >&6; }
21755             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21756           fi
21757           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21758 $as_echo "$tool_specified" >&6; }
21759         fi
21760       fi
21761     fi
21762 
21763   fi
21764 
21765 
21766 
21767   if test "x$UNZIP" = x; then
21768     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21769   fi
21770 
21771 
21772   # Since zip uses "ZIP" as a environment variable for passing options, we need
21773   # to name our variable differently, hence ZIPEXE.
21774 
21775 
21776 
21777   # Publish this variable in the help.
21778 
21779 
21780   if [ -z "${ZIPEXE+x}" ]; then
21781     # The variable is not set by user, try to locate tool using the code snippet
21782     for ac_prog in zip
21783 do
21784   # Extract the first word of "$ac_prog", so it can be a program name with args.
21785 set dummy $ac_prog; ac_word=$2
21786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21787 $as_echo_n "checking for $ac_word... " >&6; }
21788 if ${ac_cv_path_ZIPEXE+:} false; then :
21789   $as_echo_n "(cached) " >&6
21790 else
21791   case $ZIPEXE in
21792   [\\/]* | ?:[\\/]*)
21793   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21794   ;;
21795   *)
21796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21797 for as_dir in $PATH
21798 do
21799   IFS=$as_save_IFS
21800   test -z "$as_dir" && as_dir=.
21801     for ac_exec_ext in '' $ac_executable_extensions; do
21802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21803     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21805     break 2
21806   fi
21807 done
21808   done
21809 IFS=$as_save_IFS
21810 
21811   ;;
21812 esac
21813 fi
21814 ZIPEXE=$ac_cv_path_ZIPEXE
21815 if test -n "$ZIPEXE"; then
21816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21817 $as_echo "$ZIPEXE" >&6; }
21818 else
21819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21820 $as_echo "no" >&6; }
21821 fi
21822 
21823 
21824   test -n "$ZIPEXE" && break
21825 done
21826 
21827   else
21828     # The variable is set, but is it from the command line or the environment?
21829 
21830     # Try to remove the string !ZIPEXE! from our list.
21831     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21832     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21833       # If it failed, the variable was not from the command line. Ignore it,
21834       # but warn the user (except for BASH, which is always set by the calling BASH).
21835       if test "xZIPEXE" != xBASH; then
21836         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21837 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21838       fi
21839       # Try to locate tool using the code snippet
21840       for ac_prog in zip
21841 do
21842   # Extract the first word of "$ac_prog", so it can be a program name with args.
21843 set dummy $ac_prog; ac_word=$2
21844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21845 $as_echo_n "checking for $ac_word... " >&6; }
21846 if ${ac_cv_path_ZIPEXE+:} false; then :
21847   $as_echo_n "(cached) " >&6
21848 else
21849   case $ZIPEXE in
21850   [\\/]* | ?:[\\/]*)
21851   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21852   ;;
21853   *)
21854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21855 for as_dir in $PATH
21856 do
21857   IFS=$as_save_IFS
21858   test -z "$as_dir" && as_dir=.
21859     for ac_exec_ext in '' $ac_executable_extensions; do
21860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21861     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21863     break 2
21864   fi
21865 done
21866   done
21867 IFS=$as_save_IFS
21868 
21869   ;;
21870 esac
21871 fi
21872 ZIPEXE=$ac_cv_path_ZIPEXE
21873 if test -n "$ZIPEXE"; then
21874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21875 $as_echo "$ZIPEXE" >&6; }
21876 else
21877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21878 $as_echo "no" >&6; }
21879 fi
21880 
21881 
21882   test -n "$ZIPEXE" && break
21883 done
21884 
21885     else
21886       # If it succeeded, then it was overridden by the user. We will use it
21887       # for the tool.
21888 
21889       # First remove it from the list of overridden variables, so we can test
21890       # for unknown variables in the end.
21891       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21892 
21893       # Check if we try to supply an empty value
21894       if test "x$ZIPEXE" = x; then
21895         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21896 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21897         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21898 $as_echo_n "checking for ZIPEXE... " >&6; }
21899         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21900 $as_echo "disabled" >&6; }
21901       else
21902         # Check if the provided tool contains a complete path.
21903         tool_specified="$ZIPEXE"
21904         tool_basename="${tool_specified##*/}"
21905         if test "x$tool_basename" = "x$tool_specified"; then
21906           # A command without a complete path is provided, search $PATH.
21907           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21908 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21909           # Extract the first word of "$tool_basename", so it can be a program name with args.
21910 set dummy $tool_basename; ac_word=$2
21911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21912 $as_echo_n "checking for $ac_word... " >&6; }
21913 if ${ac_cv_path_ZIPEXE+:} false; then :
21914   $as_echo_n "(cached) " >&6
21915 else
21916   case $ZIPEXE in
21917   [\\/]* | ?:[\\/]*)
21918   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21919   ;;
21920   *)
21921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21922 for as_dir in $PATH
21923 do
21924   IFS=$as_save_IFS
21925   test -z "$as_dir" && as_dir=.
21926     for ac_exec_ext in '' $ac_executable_extensions; do
21927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21928     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21930     break 2
21931   fi
21932 done
21933   done
21934 IFS=$as_save_IFS
21935 
21936   ;;
21937 esac
21938 fi
21939 ZIPEXE=$ac_cv_path_ZIPEXE
21940 if test -n "$ZIPEXE"; then
21941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21942 $as_echo "$ZIPEXE" >&6; }
21943 else
21944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21945 $as_echo "no" >&6; }
21946 fi
21947 
21948 
21949           if test "x$ZIPEXE" = x; then
21950             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21951           fi
21952         else
21953           # Otherwise we believe it is a complete path. Use it as it is.
21954           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21955 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21956           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21957 $as_echo_n "checking for ZIPEXE... " >&6; }
21958           if test ! -x "$tool_specified"; then
21959             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21960 $as_echo "not found" >&6; }
21961             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21962           fi
21963           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21964 $as_echo "$tool_specified" >&6; }
21965         fi
21966       fi
21967     fi
21968 
21969   fi
21970 
21971 
21972 
21973   if test "x$ZIPEXE" = x; then
21974     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21975   fi
21976 
21977 
21978 
21979   # Non-required basic tools
21980 
21981 
21982 
21983   # Publish this variable in the help.
21984 
21985 
21986   if [ -z "${LDD+x}" ]; then
21987     # The variable is not set by user, try to locate tool using the code snippet
21988     for ac_prog in ldd
21989 do
21990   # Extract the first word of "$ac_prog", so it can be a program name with args.
21991 set dummy $ac_prog; ac_word=$2
21992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21993 $as_echo_n "checking for $ac_word... " >&6; }
21994 if ${ac_cv_path_LDD+:} false; then :
21995   $as_echo_n "(cached) " >&6
21996 else
21997   case $LDD in
21998   [\\/]* | ?:[\\/]*)
21999   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22000   ;;
22001   *)
22002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22003 for as_dir in $PATH
22004 do
22005   IFS=$as_save_IFS
22006   test -z "$as_dir" && as_dir=.
22007     for ac_exec_ext in '' $ac_executable_extensions; do
22008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22009     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22011     break 2
22012   fi
22013 done
22014   done
22015 IFS=$as_save_IFS
22016 
22017   ;;
22018 esac
22019 fi
22020 LDD=$ac_cv_path_LDD
22021 if test -n "$LDD"; then
22022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22023 $as_echo "$LDD" >&6; }
22024 else
22025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22026 $as_echo "no" >&6; }
22027 fi
22028 
22029 
22030   test -n "$LDD" && break
22031 done
22032 
22033   else
22034     # The variable is set, but is it from the command line or the environment?
22035 
22036     # Try to remove the string !LDD! from our list.
22037     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
22038     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22039       # If it failed, the variable was not from the command line. Ignore it,
22040       # but warn the user (except for BASH, which is always set by the calling BASH).
22041       if test "xLDD" != xBASH; then
22042         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
22043 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
22044       fi
22045       # Try to locate tool using the code snippet
22046       for ac_prog in ldd
22047 do
22048   # Extract the first word of "$ac_prog", so it can be a program name with args.
22049 set dummy $ac_prog; ac_word=$2
22050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22051 $as_echo_n "checking for $ac_word... " >&6; }
22052 if ${ac_cv_path_LDD+:} false; then :
22053   $as_echo_n "(cached) " >&6
22054 else
22055   case $LDD in
22056   [\\/]* | ?:[\\/]*)
22057   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22058   ;;
22059   *)
22060   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22061 for as_dir in $PATH
22062 do
22063   IFS=$as_save_IFS
22064   test -z "$as_dir" && as_dir=.
22065     for ac_exec_ext in '' $ac_executable_extensions; do
22066   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22067     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22068     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22069     break 2
22070   fi
22071 done
22072   done
22073 IFS=$as_save_IFS
22074 
22075   ;;
22076 esac
22077 fi
22078 LDD=$ac_cv_path_LDD
22079 if test -n "$LDD"; then
22080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22081 $as_echo "$LDD" >&6; }
22082 else
22083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22084 $as_echo "no" >&6; }
22085 fi
22086 
22087 
22088   test -n "$LDD" && break
22089 done
22090 
22091     else
22092       # If it succeeded, then it was overridden by the user. We will use it
22093       # for the tool.
22094 
22095       # First remove it from the list of overridden variables, so we can test
22096       # for unknown variables in the end.
22097       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22098 
22099       # Check if we try to supply an empty value
22100       if test "x$LDD" = x; then
22101         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22102 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22103         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22104 $as_echo_n "checking for LDD... " >&6; }
22105         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22106 $as_echo "disabled" >&6; }
22107       else
22108         # Check if the provided tool contains a complete path.
22109         tool_specified="$LDD"
22110         tool_basename="${tool_specified##*/}"
22111         if test "x$tool_basename" = "x$tool_specified"; then
22112           # A command without a complete path is provided, search $PATH.
22113           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22114 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22115           # Extract the first word of "$tool_basename", so it can be a program name with args.
22116 set dummy $tool_basename; ac_word=$2
22117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22118 $as_echo_n "checking for $ac_word... " >&6; }
22119 if ${ac_cv_path_LDD+:} false; then :
22120   $as_echo_n "(cached) " >&6
22121 else
22122   case $LDD in
22123   [\\/]* | ?:[\\/]*)
22124   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22125   ;;
22126   *)
22127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22128 for as_dir in $PATH
22129 do
22130   IFS=$as_save_IFS
22131   test -z "$as_dir" && as_dir=.
22132     for ac_exec_ext in '' $ac_executable_extensions; do
22133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22134     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22136     break 2
22137   fi
22138 done
22139   done
22140 IFS=$as_save_IFS
22141 
22142   ;;
22143 esac
22144 fi
22145 LDD=$ac_cv_path_LDD
22146 if test -n "$LDD"; then
22147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22148 $as_echo "$LDD" >&6; }
22149 else
22150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22151 $as_echo "no" >&6; }
22152 fi
22153 
22154 
22155           if test "x$LDD" = x; then
22156             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22157           fi
22158         else
22159           # Otherwise we believe it is a complete path. Use it as it is.
22160           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22161 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22162           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22163 $as_echo_n "checking for LDD... " >&6; }
22164           if test ! -x "$tool_specified"; then
22165             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22166 $as_echo "not found" >&6; }
22167             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22168           fi
22169           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22170 $as_echo "$tool_specified" >&6; }
22171         fi
22172       fi
22173     fi
22174 
22175   fi
22176 
22177 
22178   if test "x$LDD" = "x"; then
22179     # List shared lib dependencies is used for
22180     # debug output and checking for forbidden dependencies.
22181     # We can build without it.
22182     LDD="true"
22183   fi
22184 
22185 
22186   # Publish this variable in the help.
22187 
22188 
22189   if [ -z "${OTOOL+x}" ]; then
22190     # The variable is not set by user, try to locate tool using the code snippet
22191     for ac_prog in otool
22192 do
22193   # Extract the first word of "$ac_prog", so it can be a program name with args.
22194 set dummy $ac_prog; ac_word=$2
22195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22196 $as_echo_n "checking for $ac_word... " >&6; }
22197 if ${ac_cv_path_OTOOL+:} false; then :
22198   $as_echo_n "(cached) " >&6
22199 else
22200   case $OTOOL in
22201   [\\/]* | ?:[\\/]*)
22202   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22203   ;;
22204   *)
22205   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22206 for as_dir in $PATH
22207 do
22208   IFS=$as_save_IFS
22209   test -z "$as_dir" && as_dir=.
22210     for ac_exec_ext in '' $ac_executable_extensions; do
22211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22212     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22214     break 2
22215   fi
22216 done
22217   done
22218 IFS=$as_save_IFS
22219 
22220   ;;
22221 esac
22222 fi
22223 OTOOL=$ac_cv_path_OTOOL
22224 if test -n "$OTOOL"; then
22225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22226 $as_echo "$OTOOL" >&6; }
22227 else
22228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22229 $as_echo "no" >&6; }
22230 fi
22231 
22232 
22233   test -n "$OTOOL" && break
22234 done
22235 
22236   else
22237     # The variable is set, but is it from the command line or the environment?
22238 
22239     # Try to remove the string !OTOOL! from our list.
22240     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22241     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22242       # If it failed, the variable was not from the command line. Ignore it,
22243       # but warn the user (except for BASH, which is always set by the calling BASH).
22244       if test "xOTOOL" != xBASH; then
22245         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22246 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22247       fi
22248       # Try to locate tool using the code snippet
22249       for ac_prog in otool
22250 do
22251   # Extract the first word of "$ac_prog", so it can be a program name with args.
22252 set dummy $ac_prog; ac_word=$2
22253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22254 $as_echo_n "checking for $ac_word... " >&6; }
22255 if ${ac_cv_path_OTOOL+:} false; then :
22256   $as_echo_n "(cached) " >&6
22257 else
22258   case $OTOOL in
22259   [\\/]* | ?:[\\/]*)
22260   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22261   ;;
22262   *)
22263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22264 for as_dir in $PATH
22265 do
22266   IFS=$as_save_IFS
22267   test -z "$as_dir" && as_dir=.
22268     for ac_exec_ext in '' $ac_executable_extensions; do
22269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22270     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22272     break 2
22273   fi
22274 done
22275   done
22276 IFS=$as_save_IFS
22277 
22278   ;;
22279 esac
22280 fi
22281 OTOOL=$ac_cv_path_OTOOL
22282 if test -n "$OTOOL"; then
22283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22284 $as_echo "$OTOOL" >&6; }
22285 else
22286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22287 $as_echo "no" >&6; }
22288 fi
22289 
22290 
22291   test -n "$OTOOL" && break
22292 done
22293 
22294     else
22295       # If it succeeded, then it was overridden by the user. We will use it
22296       # for the tool.
22297 
22298       # First remove it from the list of overridden variables, so we can test
22299       # for unknown variables in the end.
22300       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22301 
22302       # Check if we try to supply an empty value
22303       if test "x$OTOOL" = x; then
22304         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22305 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22306         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22307 $as_echo_n "checking for OTOOL... " >&6; }
22308         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22309 $as_echo "disabled" >&6; }
22310       else
22311         # Check if the provided tool contains a complete path.
22312         tool_specified="$OTOOL"
22313         tool_basename="${tool_specified##*/}"
22314         if test "x$tool_basename" = "x$tool_specified"; then
22315           # A command without a complete path is provided, search $PATH.
22316           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22317 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22318           # Extract the first word of "$tool_basename", so it can be a program name with args.
22319 set dummy $tool_basename; ac_word=$2
22320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22321 $as_echo_n "checking for $ac_word... " >&6; }
22322 if ${ac_cv_path_OTOOL+:} false; then :
22323   $as_echo_n "(cached) " >&6
22324 else
22325   case $OTOOL in
22326   [\\/]* | ?:[\\/]*)
22327   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22328   ;;
22329   *)
22330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22331 for as_dir in $PATH
22332 do
22333   IFS=$as_save_IFS
22334   test -z "$as_dir" && as_dir=.
22335     for ac_exec_ext in '' $ac_executable_extensions; do
22336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22337     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22339     break 2
22340   fi
22341 done
22342   done
22343 IFS=$as_save_IFS
22344 
22345   ;;
22346 esac
22347 fi
22348 OTOOL=$ac_cv_path_OTOOL
22349 if test -n "$OTOOL"; then
22350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22351 $as_echo "$OTOOL" >&6; }
22352 else
22353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22354 $as_echo "no" >&6; }
22355 fi
22356 
22357 
22358           if test "x$OTOOL" = x; then
22359             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22360           fi
22361         else
22362           # Otherwise we believe it is a complete path. Use it as it is.
22363           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22364 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22365           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22366 $as_echo_n "checking for OTOOL... " >&6; }
22367           if test ! -x "$tool_specified"; then
22368             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22369 $as_echo "not found" >&6; }
22370             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22371           fi
22372           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22373 $as_echo "$tool_specified" >&6; }
22374         fi
22375       fi
22376     fi
22377 
22378   fi
22379 
22380 
22381   if test "x$OTOOL" = "x"; then
22382     OTOOL="true"
22383   fi
22384 
22385 
22386   # Publish this variable in the help.
22387 
22388 
22389   if [ -z "${READELF+x}" ]; then
22390     # The variable is not set by user, try to locate tool using the code snippet
22391     for ac_prog in greadelf readelf
22392 do
22393   # Extract the first word of "$ac_prog", so it can be a program name with args.
22394 set dummy $ac_prog; ac_word=$2
22395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22396 $as_echo_n "checking for $ac_word... " >&6; }
22397 if ${ac_cv_path_READELF+:} false; then :
22398   $as_echo_n "(cached) " >&6
22399 else
22400   case $READELF in
22401   [\\/]* | ?:[\\/]*)
22402   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22403   ;;
22404   *)
22405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22406 for as_dir in $PATH
22407 do
22408   IFS=$as_save_IFS
22409   test -z "$as_dir" && as_dir=.
22410     for ac_exec_ext in '' $ac_executable_extensions; do
22411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22412     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22414     break 2
22415   fi
22416 done
22417   done
22418 IFS=$as_save_IFS
22419 
22420   ;;
22421 esac
22422 fi
22423 READELF=$ac_cv_path_READELF
22424 if test -n "$READELF"; then
22425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22426 $as_echo "$READELF" >&6; }
22427 else
22428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22429 $as_echo "no" >&6; }
22430 fi
22431 
22432 
22433   test -n "$READELF" && break
22434 done
22435 
22436   else
22437     # The variable is set, but is it from the command line or the environment?
22438 
22439     # Try to remove the string !READELF! from our list.
22440     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22441     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22442       # If it failed, the variable was not from the command line. Ignore it,
22443       # but warn the user (except for BASH, which is always set by the calling BASH).
22444       if test "xREADELF" != xBASH; then
22445         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22446 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22447       fi
22448       # Try to locate tool using the code snippet
22449       for ac_prog in greadelf readelf
22450 do
22451   # Extract the first word of "$ac_prog", so it can be a program name with args.
22452 set dummy $ac_prog; ac_word=$2
22453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22454 $as_echo_n "checking for $ac_word... " >&6; }
22455 if ${ac_cv_path_READELF+:} false; then :
22456   $as_echo_n "(cached) " >&6
22457 else
22458   case $READELF in
22459   [\\/]* | ?:[\\/]*)
22460   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22461   ;;
22462   *)
22463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22464 for as_dir in $PATH
22465 do
22466   IFS=$as_save_IFS
22467   test -z "$as_dir" && as_dir=.
22468     for ac_exec_ext in '' $ac_executable_extensions; do
22469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22470     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22472     break 2
22473   fi
22474 done
22475   done
22476 IFS=$as_save_IFS
22477 
22478   ;;
22479 esac
22480 fi
22481 READELF=$ac_cv_path_READELF
22482 if test -n "$READELF"; then
22483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22484 $as_echo "$READELF" >&6; }
22485 else
22486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22487 $as_echo "no" >&6; }
22488 fi
22489 
22490 
22491   test -n "$READELF" && break
22492 done
22493 
22494     else
22495       # If it succeeded, then it was overridden by the user. We will use it
22496       # for the tool.
22497 
22498       # First remove it from the list of overridden variables, so we can test
22499       # for unknown variables in the end.
22500       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22501 
22502       # Check if we try to supply an empty value
22503       if test "x$READELF" = x; then
22504         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22505 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22507 $as_echo_n "checking for READELF... " >&6; }
22508         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22509 $as_echo "disabled" >&6; }
22510       else
22511         # Check if the provided tool contains a complete path.
22512         tool_specified="$READELF"
22513         tool_basename="${tool_specified##*/}"
22514         if test "x$tool_basename" = "x$tool_specified"; then
22515           # A command without a complete path is provided, search $PATH.
22516           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22517 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22518           # Extract the first word of "$tool_basename", so it can be a program name with args.
22519 set dummy $tool_basename; ac_word=$2
22520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22521 $as_echo_n "checking for $ac_word... " >&6; }
22522 if ${ac_cv_path_READELF+:} false; then :
22523   $as_echo_n "(cached) " >&6
22524 else
22525   case $READELF in
22526   [\\/]* | ?:[\\/]*)
22527   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22528   ;;
22529   *)
22530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22531 for as_dir in $PATH
22532 do
22533   IFS=$as_save_IFS
22534   test -z "$as_dir" && as_dir=.
22535     for ac_exec_ext in '' $ac_executable_extensions; do
22536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22537     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22539     break 2
22540   fi
22541 done
22542   done
22543 IFS=$as_save_IFS
22544 
22545   ;;
22546 esac
22547 fi
22548 READELF=$ac_cv_path_READELF
22549 if test -n "$READELF"; then
22550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22551 $as_echo "$READELF" >&6; }
22552 else
22553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22554 $as_echo "no" >&6; }
22555 fi
22556 
22557 
22558           if test "x$READELF" = x; then
22559             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22560           fi
22561         else
22562           # Otherwise we believe it is a complete path. Use it as it is.
22563           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22564 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22565           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22566 $as_echo_n "checking for READELF... " >&6; }
22567           if test ! -x "$tool_specified"; then
22568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22569 $as_echo "not found" >&6; }
22570             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22571           fi
22572           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22573 $as_echo "$tool_specified" >&6; }
22574         fi
22575       fi
22576     fi
22577 
22578   fi
22579 
22580 
22581 
22582 
22583   # Publish this variable in the help.
22584 
22585 
22586   if [ -z "${DOT+x}" ]; then
22587     # The variable is not set by user, try to locate tool using the code snippet
22588     for ac_prog in dot
22589 do
22590   # Extract the first word of "$ac_prog", so it can be a program name with args.
22591 set dummy $ac_prog; ac_word=$2
22592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22593 $as_echo_n "checking for $ac_word... " >&6; }
22594 if ${ac_cv_path_DOT+:} false; then :
22595   $as_echo_n "(cached) " >&6
22596 else
22597   case $DOT in
22598   [\\/]* | ?:[\\/]*)
22599   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22600   ;;
22601   *)
22602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22603 for as_dir in $PATH
22604 do
22605   IFS=$as_save_IFS
22606   test -z "$as_dir" && as_dir=.
22607     for ac_exec_ext in '' $ac_executable_extensions; do
22608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22609     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22611     break 2
22612   fi
22613 done
22614   done
22615 IFS=$as_save_IFS
22616 
22617   ;;
22618 esac
22619 fi
22620 DOT=$ac_cv_path_DOT
22621 if test -n "$DOT"; then
22622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22623 $as_echo "$DOT" >&6; }
22624 else
22625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22626 $as_echo "no" >&6; }
22627 fi
22628 
22629 
22630   test -n "$DOT" && break
22631 done
22632 
22633   else
22634     # The variable is set, but is it from the command line or the environment?
22635 
22636     # Try to remove the string !DOT! from our list.
22637     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22638     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22639       # If it failed, the variable was not from the command line. Ignore it,
22640       # but warn the user (except for BASH, which is always set by the calling BASH).
22641       if test "xDOT" != xBASH; then
22642         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22643 $as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22644       fi
22645       # Try to locate tool using the code snippet
22646       for ac_prog in dot
22647 do
22648   # Extract the first word of "$ac_prog", so it can be a program name with args.
22649 set dummy $ac_prog; ac_word=$2
22650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22651 $as_echo_n "checking for $ac_word... " >&6; }
22652 if ${ac_cv_path_DOT+:} false; then :
22653   $as_echo_n "(cached) " >&6
22654 else
22655   case $DOT in
22656   [\\/]* | ?:[\\/]*)
22657   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22658   ;;
22659   *)
22660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22661 for as_dir in $PATH
22662 do
22663   IFS=$as_save_IFS
22664   test -z "$as_dir" && as_dir=.
22665     for ac_exec_ext in '' $ac_executable_extensions; do
22666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22667     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22669     break 2
22670   fi
22671 done
22672   done
22673 IFS=$as_save_IFS
22674 
22675   ;;
22676 esac
22677 fi
22678 DOT=$ac_cv_path_DOT
22679 if test -n "$DOT"; then
22680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22681 $as_echo "$DOT" >&6; }
22682 else
22683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22684 $as_echo "no" >&6; }
22685 fi
22686 
22687 
22688   test -n "$DOT" && break
22689 done
22690 
22691     else
22692       # If it succeeded, then it was overridden by the user. We will use it
22693       # for the tool.
22694 
22695       # First remove it from the list of overridden variables, so we can test
22696       # for unknown variables in the end.
22697       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22698 
22699       # Check if we try to supply an empty value
22700       if test "x$DOT" = x; then
22701         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22702 $as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22703         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22704 $as_echo_n "checking for DOT... " >&6; }
22705         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22706 $as_echo "disabled" >&6; }
22707       else
22708         # Check if the provided tool contains a complete path.
22709         tool_specified="$DOT"
22710         tool_basename="${tool_specified##*/}"
22711         if test "x$tool_basename" = "x$tool_specified"; then
22712           # A command without a complete path is provided, search $PATH.
22713           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22714 $as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22715           # Extract the first word of "$tool_basename", so it can be a program name with args.
22716 set dummy $tool_basename; ac_word=$2
22717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22718 $as_echo_n "checking for $ac_word... " >&6; }
22719 if ${ac_cv_path_DOT+:} false; then :
22720   $as_echo_n "(cached) " >&6
22721 else
22722   case $DOT in
22723   [\\/]* | ?:[\\/]*)
22724   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22725   ;;
22726   *)
22727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22728 for as_dir in $PATH
22729 do
22730   IFS=$as_save_IFS
22731   test -z "$as_dir" && as_dir=.
22732     for ac_exec_ext in '' $ac_executable_extensions; do
22733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22734     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22736     break 2
22737   fi
22738 done
22739   done
22740 IFS=$as_save_IFS
22741 
22742   ;;
22743 esac
22744 fi
22745 DOT=$ac_cv_path_DOT
22746 if test -n "$DOT"; then
22747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22748 $as_echo "$DOT" >&6; }
22749 else
22750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22751 $as_echo "no" >&6; }
22752 fi
22753 
22754 
22755           if test "x$DOT" = x; then
22756             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22757           fi
22758         else
22759           # Otherwise we believe it is a complete path. Use it as it is.
22760           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22761 $as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22762           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22763 $as_echo_n "checking for DOT... " >&6; }
22764           if test ! -x "$tool_specified"; then
22765             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22766 $as_echo "not found" >&6; }
22767             as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22768           fi
22769           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22770 $as_echo "$tool_specified" >&6; }
22771         fi
22772       fi
22773     fi
22774 
22775   fi
22776 
22777 
22778 
22779 
22780   # Publish this variable in the help.
22781 
22782 
22783   if [ -z "${HG+x}" ]; then
22784     # The variable is not set by user, try to locate tool using the code snippet
22785     for ac_prog in hg
22786 do
22787   # Extract the first word of "$ac_prog", so it can be a program name with args.
22788 set dummy $ac_prog; ac_word=$2
22789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22790 $as_echo_n "checking for $ac_word... " >&6; }
22791 if ${ac_cv_path_HG+:} false; then :
22792   $as_echo_n "(cached) " >&6
22793 else
22794   case $HG in
22795   [\\/]* | ?:[\\/]*)
22796   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22797   ;;
22798   *)
22799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22800 for as_dir in $PATH
22801 do
22802   IFS=$as_save_IFS
22803   test -z "$as_dir" && as_dir=.
22804     for ac_exec_ext in '' $ac_executable_extensions; do
22805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22806     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22808     break 2
22809   fi
22810 done
22811   done
22812 IFS=$as_save_IFS
22813 
22814   ;;
22815 esac
22816 fi
22817 HG=$ac_cv_path_HG
22818 if test -n "$HG"; then
22819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22820 $as_echo "$HG" >&6; }
22821 else
22822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22823 $as_echo "no" >&6; }
22824 fi
22825 
22826 
22827   test -n "$HG" && break
22828 done
22829 
22830   else
22831     # The variable is set, but is it from the command line or the environment?
22832 
22833     # Try to remove the string !HG! from our list.
22834     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22835     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22836       # If it failed, the variable was not from the command line. Ignore it,
22837       # but warn the user (except for BASH, which is always set by the calling BASH).
22838       if test "xHG" != xBASH; then
22839         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22840 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22841       fi
22842       # Try to locate tool using the code snippet
22843       for ac_prog in hg
22844 do
22845   # Extract the first word of "$ac_prog", so it can be a program name with args.
22846 set dummy $ac_prog; ac_word=$2
22847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22848 $as_echo_n "checking for $ac_word... " >&6; }
22849 if ${ac_cv_path_HG+:} false; then :
22850   $as_echo_n "(cached) " >&6
22851 else
22852   case $HG in
22853   [\\/]* | ?:[\\/]*)
22854   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22855   ;;
22856   *)
22857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22858 for as_dir in $PATH
22859 do
22860   IFS=$as_save_IFS
22861   test -z "$as_dir" && as_dir=.
22862     for ac_exec_ext in '' $ac_executable_extensions; do
22863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22864     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22866     break 2
22867   fi
22868 done
22869   done
22870 IFS=$as_save_IFS
22871 
22872   ;;
22873 esac
22874 fi
22875 HG=$ac_cv_path_HG
22876 if test -n "$HG"; then
22877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22878 $as_echo "$HG" >&6; }
22879 else
22880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22881 $as_echo "no" >&6; }
22882 fi
22883 
22884 
22885   test -n "$HG" && break
22886 done
22887 
22888     else
22889       # If it succeeded, then it was overridden by the user. We will use it
22890       # for the tool.
22891 
22892       # First remove it from the list of overridden variables, so we can test
22893       # for unknown variables in the end.
22894       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22895 
22896       # Check if we try to supply an empty value
22897       if test "x$HG" = x; then
22898         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22899 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22900         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22901 $as_echo_n "checking for HG... " >&6; }
22902         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22903 $as_echo "disabled" >&6; }
22904       else
22905         # Check if the provided tool contains a complete path.
22906         tool_specified="$HG"
22907         tool_basename="${tool_specified##*/}"
22908         if test "x$tool_basename" = "x$tool_specified"; then
22909           # A command without a complete path is provided, search $PATH.
22910           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22911 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22912           # Extract the first word of "$tool_basename", so it can be a program name with args.
22913 set dummy $tool_basename; ac_word=$2
22914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915 $as_echo_n "checking for $ac_word... " >&6; }
22916 if ${ac_cv_path_HG+:} false; then :
22917   $as_echo_n "(cached) " >&6
22918 else
22919   case $HG in
22920   [\\/]* | ?:[\\/]*)
22921   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22922   ;;
22923   *)
22924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22925 for as_dir in $PATH
22926 do
22927   IFS=$as_save_IFS
22928   test -z "$as_dir" && as_dir=.
22929     for ac_exec_ext in '' $ac_executable_extensions; do
22930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22931     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22933     break 2
22934   fi
22935 done
22936   done
22937 IFS=$as_save_IFS
22938 
22939   ;;
22940 esac
22941 fi
22942 HG=$ac_cv_path_HG
22943 if test -n "$HG"; then
22944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22945 $as_echo "$HG" >&6; }
22946 else
22947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22948 $as_echo "no" >&6; }
22949 fi
22950 
22951 
22952           if test "x$HG" = x; then
22953             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22954           fi
22955         else
22956           # Otherwise we believe it is a complete path. Use it as it is.
22957           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22958 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22959           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22960 $as_echo_n "checking for HG... " >&6; }
22961           if test ! -x "$tool_specified"; then
22962             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22963 $as_echo "not found" >&6; }
22964             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22965           fi
22966           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22967 $as_echo "$tool_specified" >&6; }
22968         fi
22969       fi
22970     fi
22971 
22972   fi
22973 
22974 
22975 
22976 
22977   # Publish this variable in the help.
22978 
22979 
22980   if [ -z "${STAT+x}" ]; then
22981     # The variable is not set by user, try to locate tool using the code snippet
22982     for ac_prog in stat
22983 do
22984   # Extract the first word of "$ac_prog", so it can be a program name with args.
22985 set dummy $ac_prog; ac_word=$2
22986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22987 $as_echo_n "checking for $ac_word... " >&6; }
22988 if ${ac_cv_path_STAT+:} false; then :
22989   $as_echo_n "(cached) " >&6
22990 else
22991   case $STAT in
22992   [\\/]* | ?:[\\/]*)
22993   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22994   ;;
22995   *)
22996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22997 for as_dir in $PATH
22998 do
22999   IFS=$as_save_IFS
23000   test -z "$as_dir" && as_dir=.
23001     for ac_exec_ext in '' $ac_executable_extensions; do
23002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23003     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23005     break 2
23006   fi
23007 done
23008   done
23009 IFS=$as_save_IFS
23010 
23011   ;;
23012 esac
23013 fi
23014 STAT=$ac_cv_path_STAT
23015 if test -n "$STAT"; then
23016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23017 $as_echo "$STAT" >&6; }
23018 else
23019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020 $as_echo "no" >&6; }
23021 fi
23022 
23023 
23024   test -n "$STAT" && break
23025 done
23026 
23027   else
23028     # The variable is set, but is it from the command line or the environment?
23029 
23030     # Try to remove the string !STAT! from our list.
23031     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
23032     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23033       # If it failed, the variable was not from the command line. Ignore it,
23034       # but warn the user (except for BASH, which is always set by the calling BASH).
23035       if test "xSTAT" != xBASH; then
23036         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
23037 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
23038       fi
23039       # Try to locate tool using the code snippet
23040       for ac_prog in stat
23041 do
23042   # Extract the first word of "$ac_prog", so it can be a program name with args.
23043 set dummy $ac_prog; ac_word=$2
23044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23045 $as_echo_n "checking for $ac_word... " >&6; }
23046 if ${ac_cv_path_STAT+:} false; then :
23047   $as_echo_n "(cached) " >&6
23048 else
23049   case $STAT in
23050   [\\/]* | ?:[\\/]*)
23051   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23052   ;;
23053   *)
23054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23055 for as_dir in $PATH
23056 do
23057   IFS=$as_save_IFS
23058   test -z "$as_dir" && as_dir=.
23059     for ac_exec_ext in '' $ac_executable_extensions; do
23060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23061     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23063     break 2
23064   fi
23065 done
23066   done
23067 IFS=$as_save_IFS
23068 
23069   ;;
23070 esac
23071 fi
23072 STAT=$ac_cv_path_STAT
23073 if test -n "$STAT"; then
23074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23075 $as_echo "$STAT" >&6; }
23076 else
23077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23078 $as_echo "no" >&6; }
23079 fi
23080 
23081 
23082   test -n "$STAT" && break
23083 done
23084 
23085     else
23086       # If it succeeded, then it was overridden by the user. We will use it
23087       # for the tool.
23088 
23089       # First remove it from the list of overridden variables, so we can test
23090       # for unknown variables in the end.
23091       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23092 
23093       # Check if we try to supply an empty value
23094       if test "x$STAT" = x; then
23095         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23096 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23098 $as_echo_n "checking for STAT... " >&6; }
23099         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23100 $as_echo "disabled" >&6; }
23101       else
23102         # Check if the provided tool contains a complete path.
23103         tool_specified="$STAT"
23104         tool_basename="${tool_specified##*/}"
23105         if test "x$tool_basename" = "x$tool_specified"; then
23106           # A command without a complete path is provided, search $PATH.
23107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23108 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23109           # Extract the first word of "$tool_basename", so it can be a program name with args.
23110 set dummy $tool_basename; ac_word=$2
23111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112 $as_echo_n "checking for $ac_word... " >&6; }
23113 if ${ac_cv_path_STAT+:} false; then :
23114   $as_echo_n "(cached) " >&6
23115 else
23116   case $STAT in
23117   [\\/]* | ?:[\\/]*)
23118   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23119   ;;
23120   *)
23121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122 for as_dir in $PATH
23123 do
23124   IFS=$as_save_IFS
23125   test -z "$as_dir" && as_dir=.
23126     for ac_exec_ext in '' $ac_executable_extensions; do
23127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130     break 2
23131   fi
23132 done
23133   done
23134 IFS=$as_save_IFS
23135 
23136   ;;
23137 esac
23138 fi
23139 STAT=$ac_cv_path_STAT
23140 if test -n "$STAT"; then
23141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23142 $as_echo "$STAT" >&6; }
23143 else
23144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145 $as_echo "no" >&6; }
23146 fi
23147 
23148 
23149           if test "x$STAT" = x; then
23150             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23151           fi
23152         else
23153           # Otherwise we believe it is a complete path. Use it as it is.
23154           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23155 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23156           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23157 $as_echo_n "checking for STAT... " >&6; }
23158           if test ! -x "$tool_specified"; then
23159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23160 $as_echo "not found" >&6; }
23161             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23162           fi
23163           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23164 $as_echo "$tool_specified" >&6; }
23165         fi
23166       fi
23167     fi
23168 
23169   fi
23170 
23171 
23172 
23173 
23174   # Publish this variable in the help.
23175 
23176 
23177   if [ -z "${TIME+x}" ]; then
23178     # The variable is not set by user, try to locate tool using the code snippet
23179     for ac_prog in time
23180 do
23181   # Extract the first word of "$ac_prog", so it can be a program name with args.
23182 set dummy $ac_prog; ac_word=$2
23183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23184 $as_echo_n "checking for $ac_word... " >&6; }
23185 if ${ac_cv_path_TIME+:} false; then :
23186   $as_echo_n "(cached) " >&6
23187 else
23188   case $TIME in
23189   [\\/]* | ?:[\\/]*)
23190   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23191   ;;
23192   *)
23193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23194 for as_dir in $PATH
23195 do
23196   IFS=$as_save_IFS
23197   test -z "$as_dir" && as_dir=.
23198     for ac_exec_ext in '' $ac_executable_extensions; do
23199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23200     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23202     break 2
23203   fi
23204 done
23205   done
23206 IFS=$as_save_IFS
23207 
23208   ;;
23209 esac
23210 fi
23211 TIME=$ac_cv_path_TIME
23212 if test -n "$TIME"; then
23213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23214 $as_echo "$TIME" >&6; }
23215 else
23216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23217 $as_echo "no" >&6; }
23218 fi
23219 
23220 
23221   test -n "$TIME" && break
23222 done
23223 
23224   else
23225     # The variable is set, but is it from the command line or the environment?
23226 
23227     # Try to remove the string !TIME! from our list.
23228     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23229     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23230       # If it failed, the variable was not from the command line. Ignore it,
23231       # but warn the user (except for BASH, which is always set by the calling BASH).
23232       if test "xTIME" != xBASH; then
23233         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23234 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23235       fi
23236       # Try to locate tool using the code snippet
23237       for ac_prog in time
23238 do
23239   # Extract the first word of "$ac_prog", so it can be a program name with args.
23240 set dummy $ac_prog; ac_word=$2
23241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23242 $as_echo_n "checking for $ac_word... " >&6; }
23243 if ${ac_cv_path_TIME+:} false; then :
23244   $as_echo_n "(cached) " >&6
23245 else
23246   case $TIME in
23247   [\\/]* | ?:[\\/]*)
23248   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23249   ;;
23250   *)
23251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23252 for as_dir in $PATH
23253 do
23254   IFS=$as_save_IFS
23255   test -z "$as_dir" && as_dir=.
23256     for ac_exec_ext in '' $ac_executable_extensions; do
23257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23258     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23260     break 2
23261   fi
23262 done
23263   done
23264 IFS=$as_save_IFS
23265 
23266   ;;
23267 esac
23268 fi
23269 TIME=$ac_cv_path_TIME
23270 if test -n "$TIME"; then
23271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23272 $as_echo "$TIME" >&6; }
23273 else
23274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23275 $as_echo "no" >&6; }
23276 fi
23277 
23278 
23279   test -n "$TIME" && break
23280 done
23281 
23282     else
23283       # If it succeeded, then it was overridden by the user. We will use it
23284       # for the tool.
23285 
23286       # First remove it from the list of overridden variables, so we can test
23287       # for unknown variables in the end.
23288       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23289 
23290       # Check if we try to supply an empty value
23291       if test "x$TIME" = x; then
23292         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23293 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23294         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23295 $as_echo_n "checking for TIME... " >&6; }
23296         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23297 $as_echo "disabled" >&6; }
23298       else
23299         # Check if the provided tool contains a complete path.
23300         tool_specified="$TIME"
23301         tool_basename="${tool_specified##*/}"
23302         if test "x$tool_basename" = "x$tool_specified"; then
23303           # A command without a complete path is provided, search $PATH.
23304           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23305 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23306           # Extract the first word of "$tool_basename", so it can be a program name with args.
23307 set dummy $tool_basename; ac_word=$2
23308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23309 $as_echo_n "checking for $ac_word... " >&6; }
23310 if ${ac_cv_path_TIME+:} false; then :
23311   $as_echo_n "(cached) " >&6
23312 else
23313   case $TIME in
23314   [\\/]* | ?:[\\/]*)
23315   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23316   ;;
23317   *)
23318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23319 for as_dir in $PATH
23320 do
23321   IFS=$as_save_IFS
23322   test -z "$as_dir" && as_dir=.
23323     for ac_exec_ext in '' $ac_executable_extensions; do
23324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23325     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23327     break 2
23328   fi
23329 done
23330   done
23331 IFS=$as_save_IFS
23332 
23333   ;;
23334 esac
23335 fi
23336 TIME=$ac_cv_path_TIME
23337 if test -n "$TIME"; then
23338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23339 $as_echo "$TIME" >&6; }
23340 else
23341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23342 $as_echo "no" >&6; }
23343 fi
23344 
23345 
23346           if test "x$TIME" = x; then
23347             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23348           fi
23349         else
23350           # Otherwise we believe it is a complete path. Use it as it is.
23351           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23352 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23353           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23354 $as_echo_n "checking for TIME... " >&6; }
23355           if test ! -x "$tool_specified"; then
23356             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23357 $as_echo "not found" >&6; }
23358             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23359           fi
23360           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23361 $as_echo "$tool_specified" >&6; }
23362         fi
23363       fi
23364     fi
23365 
23366   fi
23367 
23368 
23369 
23370 
23371   # Publish this variable in the help.
23372 
23373 
23374   if [ -z "${FLOCK+x}" ]; then
23375     # The variable is not set by user, try to locate tool using the code snippet
23376     for ac_prog in flock
23377 do
23378   # Extract the first word of "$ac_prog", so it can be a program name with args.
23379 set dummy $ac_prog; ac_word=$2
23380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23381 $as_echo_n "checking for $ac_word... " >&6; }
23382 if ${ac_cv_path_FLOCK+:} false; then :
23383   $as_echo_n "(cached) " >&6
23384 else
23385   case $FLOCK in
23386   [\\/]* | ?:[\\/]*)
23387   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23388   ;;
23389   *)
23390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23391 for as_dir in $PATH
23392 do
23393   IFS=$as_save_IFS
23394   test -z "$as_dir" && as_dir=.
23395     for ac_exec_ext in '' $ac_executable_extensions; do
23396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23397     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23399     break 2
23400   fi
23401 done
23402   done
23403 IFS=$as_save_IFS
23404 
23405   ;;
23406 esac
23407 fi
23408 FLOCK=$ac_cv_path_FLOCK
23409 if test -n "$FLOCK"; then
23410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23411 $as_echo "$FLOCK" >&6; }
23412 else
23413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23414 $as_echo "no" >&6; }
23415 fi
23416 
23417 
23418   test -n "$FLOCK" && break
23419 done
23420 
23421   else
23422     # The variable is set, but is it from the command line or the environment?
23423 
23424     # Try to remove the string !FLOCK! from our list.
23425     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23426     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23427       # If it failed, the variable was not from the command line. Ignore it,
23428       # but warn the user (except for BASH, which is always set by the calling BASH).
23429       if test "xFLOCK" != xBASH; then
23430         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23431 $as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23432       fi
23433       # Try to locate tool using the code snippet
23434       for ac_prog in flock
23435 do
23436   # Extract the first word of "$ac_prog", so it can be a program name with args.
23437 set dummy $ac_prog; ac_word=$2
23438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23439 $as_echo_n "checking for $ac_word... " >&6; }
23440 if ${ac_cv_path_FLOCK+:} false; then :
23441   $as_echo_n "(cached) " >&6
23442 else
23443   case $FLOCK in
23444   [\\/]* | ?:[\\/]*)
23445   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23446   ;;
23447   *)
23448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23449 for as_dir in $PATH
23450 do
23451   IFS=$as_save_IFS
23452   test -z "$as_dir" && as_dir=.
23453     for ac_exec_ext in '' $ac_executable_extensions; do
23454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23455     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23457     break 2
23458   fi
23459 done
23460   done
23461 IFS=$as_save_IFS
23462 
23463   ;;
23464 esac
23465 fi
23466 FLOCK=$ac_cv_path_FLOCK
23467 if test -n "$FLOCK"; then
23468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23469 $as_echo "$FLOCK" >&6; }
23470 else
23471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23472 $as_echo "no" >&6; }
23473 fi
23474 
23475 
23476   test -n "$FLOCK" && break
23477 done
23478 
23479     else
23480       # If it succeeded, then it was overridden by the user. We will use it
23481       # for the tool.
23482 
23483       # First remove it from the list of overridden variables, so we can test
23484       # for unknown variables in the end.
23485       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23486 
23487       # Check if we try to supply an empty value
23488       if test "x$FLOCK" = x; then
23489         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23490 $as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23491         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23492 $as_echo_n "checking for FLOCK... " >&6; }
23493         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23494 $as_echo "disabled" >&6; }
23495       else
23496         # Check if the provided tool contains a complete path.
23497         tool_specified="$FLOCK"
23498         tool_basename="${tool_specified##*/}"
23499         if test "x$tool_basename" = "x$tool_specified"; then
23500           # A command without a complete path is provided, search $PATH.
23501           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23502 $as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23503           # Extract the first word of "$tool_basename", so it can be a program name with args.
23504 set dummy $tool_basename; ac_word=$2
23505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23506 $as_echo_n "checking for $ac_word... " >&6; }
23507 if ${ac_cv_path_FLOCK+:} false; then :
23508   $as_echo_n "(cached) " >&6
23509 else
23510   case $FLOCK in
23511   [\\/]* | ?:[\\/]*)
23512   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23513   ;;
23514   *)
23515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23516 for as_dir in $PATH
23517 do
23518   IFS=$as_save_IFS
23519   test -z "$as_dir" && as_dir=.
23520     for ac_exec_ext in '' $ac_executable_extensions; do
23521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23522     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23524     break 2
23525   fi
23526 done
23527   done
23528 IFS=$as_save_IFS
23529 
23530   ;;
23531 esac
23532 fi
23533 FLOCK=$ac_cv_path_FLOCK
23534 if test -n "$FLOCK"; then
23535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23536 $as_echo "$FLOCK" >&6; }
23537 else
23538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23539 $as_echo "no" >&6; }
23540 fi
23541 
23542 
23543           if test "x$FLOCK" = x; then
23544             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23545           fi
23546         else
23547           # Otherwise we believe it is a complete path. Use it as it is.
23548           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23549 $as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23550           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23551 $as_echo_n "checking for FLOCK... " >&6; }
23552           if test ! -x "$tool_specified"; then
23553             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23554 $as_echo "not found" >&6; }
23555             as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23556           fi
23557           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23558 $as_echo "$tool_specified" >&6; }
23559         fi
23560       fi
23561     fi
23562 
23563   fi
23564 
23565 
23566   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23567   # be in the user path.
23568 
23569 
23570   # Publish this variable in the help.
23571 
23572 
23573   if [ -z "${DTRACE+x}" ]; then
23574     # The variable is not set by user, try to locate tool using the code snippet
23575     for ac_prog in dtrace
23576 do
23577   # Extract the first word of "$ac_prog", so it can be a program name with args.
23578 set dummy $ac_prog; ac_word=$2
23579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23580 $as_echo_n "checking for $ac_word... " >&6; }
23581 if ${ac_cv_path_DTRACE+:} false; then :
23582   $as_echo_n "(cached) " >&6
23583 else
23584   case $DTRACE in
23585   [\\/]* | ?:[\\/]*)
23586   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23587   ;;
23588   *)
23589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23590 as_dummy="$PATH:/usr/sbin"
23591 for as_dir in $as_dummy
23592 do
23593   IFS=$as_save_IFS
23594   test -z "$as_dir" && as_dir=.
23595     for ac_exec_ext in '' $ac_executable_extensions; do
23596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23597     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23599     break 2
23600   fi
23601 done
23602   done
23603 IFS=$as_save_IFS
23604 
23605   ;;
23606 esac
23607 fi
23608 DTRACE=$ac_cv_path_DTRACE
23609 if test -n "$DTRACE"; then
23610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23611 $as_echo "$DTRACE" >&6; }
23612 else
23613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23614 $as_echo "no" >&6; }
23615 fi
23616 
23617 
23618   test -n "$DTRACE" && break
23619 done
23620 
23621   else
23622     # The variable is set, but is it from the command line or the environment?
23623 
23624     # Try to remove the string !DTRACE! from our list.
23625     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23626     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23627       # If it failed, the variable was not from the command line. Ignore it,
23628       # but warn the user (except for BASH, which is always set by the calling BASH).
23629       if test "xDTRACE" != xBASH; then
23630         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23631 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23632       fi
23633       # Try to locate tool using the code snippet
23634       for ac_prog in dtrace
23635 do
23636   # Extract the first word of "$ac_prog", so it can be a program name with args.
23637 set dummy $ac_prog; ac_word=$2
23638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23639 $as_echo_n "checking for $ac_word... " >&6; }
23640 if ${ac_cv_path_DTRACE+:} false; then :
23641   $as_echo_n "(cached) " >&6
23642 else
23643   case $DTRACE in
23644   [\\/]* | ?:[\\/]*)
23645   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23646   ;;
23647   *)
23648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23649 as_dummy="$PATH:/usr/sbin"
23650 for as_dir in $as_dummy
23651 do
23652   IFS=$as_save_IFS
23653   test -z "$as_dir" && as_dir=.
23654     for ac_exec_ext in '' $ac_executable_extensions; do
23655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23656     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23658     break 2
23659   fi
23660 done
23661   done
23662 IFS=$as_save_IFS
23663 
23664   ;;
23665 esac
23666 fi
23667 DTRACE=$ac_cv_path_DTRACE
23668 if test -n "$DTRACE"; then
23669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23670 $as_echo "$DTRACE" >&6; }
23671 else
23672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23673 $as_echo "no" >&6; }
23674 fi
23675 
23676 
23677   test -n "$DTRACE" && break
23678 done
23679 
23680     else
23681       # If it succeeded, then it was overridden by the user. We will use it
23682       # for the tool.
23683 
23684       # First remove it from the list of overridden variables, so we can test
23685       # for unknown variables in the end.
23686       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23687 
23688       # Check if we try to supply an empty value
23689       if test "x$DTRACE" = x; then
23690         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23691 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23692         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23693 $as_echo_n "checking for DTRACE... " >&6; }
23694         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23695 $as_echo "disabled" >&6; }
23696       else
23697         # Check if the provided tool contains a complete path.
23698         tool_specified="$DTRACE"
23699         tool_basename="${tool_specified##*/}"
23700         if test "x$tool_basename" = "x$tool_specified"; then
23701           # A command without a complete path is provided, search $PATH.
23702           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23703 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23704           # Extract the first word of "$tool_basename", so it can be a program name with args.
23705 set dummy $tool_basename; ac_word=$2
23706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23707 $as_echo_n "checking for $ac_word... " >&6; }
23708 if ${ac_cv_path_DTRACE+:} false; then :
23709   $as_echo_n "(cached) " >&6
23710 else
23711   case $DTRACE in
23712   [\\/]* | ?:[\\/]*)
23713   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23714   ;;
23715   *)
23716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23717 for as_dir in $PATH
23718 do
23719   IFS=$as_save_IFS
23720   test -z "$as_dir" && as_dir=.
23721     for ac_exec_ext in '' $ac_executable_extensions; do
23722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23723     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23725     break 2
23726   fi
23727 done
23728   done
23729 IFS=$as_save_IFS
23730 
23731   ;;
23732 esac
23733 fi
23734 DTRACE=$ac_cv_path_DTRACE
23735 if test -n "$DTRACE"; then
23736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23737 $as_echo "$DTRACE" >&6; }
23738 else
23739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23740 $as_echo "no" >&6; }
23741 fi
23742 
23743 
23744           if test "x$DTRACE" = x; then
23745             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23746           fi
23747         else
23748           # Otherwise we believe it is a complete path. Use it as it is.
23749           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23750 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23751           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23752 $as_echo_n "checking for DTRACE... " >&6; }
23753           if test ! -x "$tool_specified"; then
23754             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23755 $as_echo "not found" >&6; }
23756             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23757           fi
23758           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23759 $as_echo "$tool_specified" >&6; }
23760         fi
23761       fi
23762     fi
23763 
23764   fi
23765 
23766 
23767 
23768 
23769   # Publish this variable in the help.
23770 
23771 
23772   if [ -z "${PATCH+x}" ]; then
23773     # The variable is not set by user, try to locate tool using the code snippet
23774     for ac_prog in gpatch patch
23775 do
23776   # Extract the first word of "$ac_prog", so it can be a program name with args.
23777 set dummy $ac_prog; ac_word=$2
23778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23779 $as_echo_n "checking for $ac_word... " >&6; }
23780 if ${ac_cv_path_PATCH+:} false; then :
23781   $as_echo_n "(cached) " >&6
23782 else
23783   case $PATCH in
23784   [\\/]* | ?:[\\/]*)
23785   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23786   ;;
23787   *)
23788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23789 for as_dir in $PATH
23790 do
23791   IFS=$as_save_IFS
23792   test -z "$as_dir" && as_dir=.
23793     for ac_exec_ext in '' $ac_executable_extensions; do
23794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23795     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23797     break 2
23798   fi
23799 done
23800   done
23801 IFS=$as_save_IFS
23802 
23803   ;;
23804 esac
23805 fi
23806 PATCH=$ac_cv_path_PATCH
23807 if test -n "$PATCH"; then
23808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23809 $as_echo "$PATCH" >&6; }
23810 else
23811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23812 $as_echo "no" >&6; }
23813 fi
23814 
23815 
23816   test -n "$PATCH" && break
23817 done
23818 
23819   else
23820     # The variable is set, but is it from the command line or the environment?
23821 
23822     # Try to remove the string !PATCH! from our list.
23823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23825       # If it failed, the variable was not from the command line. Ignore it,
23826       # but warn the user (except for BASH, which is always set by the calling BASH).
23827       if test "xPATCH" != xBASH; then
23828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23829 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23830       fi
23831       # Try to locate tool using the code snippet
23832       for ac_prog in gpatch patch
23833 do
23834   # Extract the first word of "$ac_prog", so it can be a program name with args.
23835 set dummy $ac_prog; ac_word=$2
23836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23837 $as_echo_n "checking for $ac_word... " >&6; }
23838 if ${ac_cv_path_PATCH+:} false; then :
23839   $as_echo_n "(cached) " >&6
23840 else
23841   case $PATCH in
23842   [\\/]* | ?:[\\/]*)
23843   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23844   ;;
23845   *)
23846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23847 for as_dir in $PATH
23848 do
23849   IFS=$as_save_IFS
23850   test -z "$as_dir" && as_dir=.
23851     for ac_exec_ext in '' $ac_executable_extensions; do
23852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23853     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23855     break 2
23856   fi
23857 done
23858   done
23859 IFS=$as_save_IFS
23860 
23861   ;;
23862 esac
23863 fi
23864 PATCH=$ac_cv_path_PATCH
23865 if test -n "$PATCH"; then
23866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23867 $as_echo "$PATCH" >&6; }
23868 else
23869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23870 $as_echo "no" >&6; }
23871 fi
23872 
23873 
23874   test -n "$PATCH" && break
23875 done
23876 
23877     else
23878       # If it succeeded, then it was overridden by the user. We will use it
23879       # for the tool.
23880 
23881       # First remove it from the list of overridden variables, so we can test
23882       # for unknown variables in the end.
23883       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23884 
23885       # Check if we try to supply an empty value
23886       if test "x$PATCH" = x; then
23887         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23888 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23889         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23890 $as_echo_n "checking for PATCH... " >&6; }
23891         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23892 $as_echo "disabled" >&6; }
23893       else
23894         # Check if the provided tool contains a complete path.
23895         tool_specified="$PATCH"
23896         tool_basename="${tool_specified##*/}"
23897         if test "x$tool_basename" = "x$tool_specified"; then
23898           # A command without a complete path is provided, search $PATH.
23899           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23900 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23901           # Extract the first word of "$tool_basename", so it can be a program name with args.
23902 set dummy $tool_basename; ac_word=$2
23903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23904 $as_echo_n "checking for $ac_word... " >&6; }
23905 if ${ac_cv_path_PATCH+:} false; then :
23906   $as_echo_n "(cached) " >&6
23907 else
23908   case $PATCH in
23909   [\\/]* | ?:[\\/]*)
23910   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23911   ;;
23912   *)
23913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23914 for as_dir in $PATH
23915 do
23916   IFS=$as_save_IFS
23917   test -z "$as_dir" && as_dir=.
23918     for ac_exec_ext in '' $ac_executable_extensions; do
23919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23920     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23922     break 2
23923   fi
23924 done
23925   done
23926 IFS=$as_save_IFS
23927 
23928   ;;
23929 esac
23930 fi
23931 PATCH=$ac_cv_path_PATCH
23932 if test -n "$PATCH"; then
23933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23934 $as_echo "$PATCH" >&6; }
23935 else
23936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23937 $as_echo "no" >&6; }
23938 fi
23939 
23940 
23941           if test "x$PATCH" = x; then
23942             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23943           fi
23944         else
23945           # Otherwise we believe it is a complete path. Use it as it is.
23946           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23947 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23948           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23949 $as_echo_n "checking for PATCH... " >&6; }
23950           if test ! -x "$tool_specified"; then
23951             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23952 $as_echo "not found" >&6; }
23953             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23954           fi
23955           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23956 $as_echo "$tool_specified" >&6; }
23957         fi
23958       fi
23959     fi
23960 
23961   fi
23962 
23963 
23964   # Check if it's GNU time
23965   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23966   if test "x$IS_GNU_TIME" != x; then
23967     IS_GNU_TIME=yes
23968   else
23969     IS_GNU_TIME=no
23970   fi
23971 
23972 
23973   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23974 
23975 
23976 
23977   # Publish this variable in the help.
23978 
23979 
23980   if [ -z "${DSYMUTIL+x}" ]; then
23981     # The variable is not set by user, try to locate tool using the code snippet
23982     for ac_prog in dsymutil
23983 do
23984   # Extract the first word of "$ac_prog", so it can be a program name with args.
23985 set dummy $ac_prog; ac_word=$2
23986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23987 $as_echo_n "checking for $ac_word... " >&6; }
23988 if ${ac_cv_path_DSYMUTIL+:} false; then :
23989   $as_echo_n "(cached) " >&6
23990 else
23991   case $DSYMUTIL in
23992   [\\/]* | ?:[\\/]*)
23993   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23994   ;;
23995   *)
23996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23997 for as_dir in $PATH
23998 do
23999   IFS=$as_save_IFS
24000   test -z "$as_dir" && as_dir=.
24001     for ac_exec_ext in '' $ac_executable_extensions; do
24002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24003     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24005     break 2
24006   fi
24007 done
24008   done
24009 IFS=$as_save_IFS
24010 
24011   ;;
24012 esac
24013 fi
24014 DSYMUTIL=$ac_cv_path_DSYMUTIL
24015 if test -n "$DSYMUTIL"; then
24016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24017 $as_echo "$DSYMUTIL" >&6; }
24018 else
24019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24020 $as_echo "no" >&6; }
24021 fi
24022 
24023 
24024   test -n "$DSYMUTIL" && break
24025 done
24026 
24027   else
24028     # The variable is set, but is it from the command line or the environment?
24029 
24030     # Try to remove the string !DSYMUTIL! from our list.
24031     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
24032     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24033       # If it failed, the variable was not from the command line. Ignore it,
24034       # but warn the user (except for BASH, which is always set by the calling BASH).
24035       if test "xDSYMUTIL" != xBASH; then
24036         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
24037 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
24038       fi
24039       # Try to locate tool using the code snippet
24040       for ac_prog in dsymutil
24041 do
24042   # Extract the first word of "$ac_prog", so it can be a program name with args.
24043 set dummy $ac_prog; ac_word=$2
24044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24045 $as_echo_n "checking for $ac_word... " >&6; }
24046 if ${ac_cv_path_DSYMUTIL+:} false; then :
24047   $as_echo_n "(cached) " >&6
24048 else
24049   case $DSYMUTIL in
24050   [\\/]* | ?:[\\/]*)
24051   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24052   ;;
24053   *)
24054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24055 for as_dir in $PATH
24056 do
24057   IFS=$as_save_IFS
24058   test -z "$as_dir" && as_dir=.
24059     for ac_exec_ext in '' $ac_executable_extensions; do
24060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24061     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24063     break 2
24064   fi
24065 done
24066   done
24067 IFS=$as_save_IFS
24068 
24069   ;;
24070 esac
24071 fi
24072 DSYMUTIL=$ac_cv_path_DSYMUTIL
24073 if test -n "$DSYMUTIL"; then
24074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24075 $as_echo "$DSYMUTIL" >&6; }
24076 else
24077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24078 $as_echo "no" >&6; }
24079 fi
24080 
24081 
24082   test -n "$DSYMUTIL" && break
24083 done
24084 
24085     else
24086       # If it succeeded, then it was overridden by the user. We will use it
24087       # for the tool.
24088 
24089       # First remove it from the list of overridden variables, so we can test
24090       # for unknown variables in the end.
24091       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24092 
24093       # Check if we try to supply an empty value
24094       if test "x$DSYMUTIL" = x; then
24095         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24096 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24098 $as_echo_n "checking for DSYMUTIL... " >&6; }
24099         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24100 $as_echo "disabled" >&6; }
24101       else
24102         # Check if the provided tool contains a complete path.
24103         tool_specified="$DSYMUTIL"
24104         tool_basename="${tool_specified##*/}"
24105         if test "x$tool_basename" = "x$tool_specified"; then
24106           # A command without a complete path is provided, search $PATH.
24107           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24108 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24109           # Extract the first word of "$tool_basename", so it can be a program name with args.
24110 set dummy $tool_basename; ac_word=$2
24111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24112 $as_echo_n "checking for $ac_word... " >&6; }
24113 if ${ac_cv_path_DSYMUTIL+:} false; then :
24114   $as_echo_n "(cached) " >&6
24115 else
24116   case $DSYMUTIL in
24117   [\\/]* | ?:[\\/]*)
24118   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24119   ;;
24120   *)
24121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24122 for as_dir in $PATH
24123 do
24124   IFS=$as_save_IFS
24125   test -z "$as_dir" && as_dir=.
24126     for ac_exec_ext in '' $ac_executable_extensions; do
24127   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24128     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24129     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24130     break 2
24131   fi
24132 done
24133   done
24134 IFS=$as_save_IFS
24135 
24136   ;;
24137 esac
24138 fi
24139 DSYMUTIL=$ac_cv_path_DSYMUTIL
24140 if test -n "$DSYMUTIL"; then
24141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24142 $as_echo "$DSYMUTIL" >&6; }
24143 else
24144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24145 $as_echo "no" >&6; }
24146 fi
24147 
24148 
24149           if test "x$DSYMUTIL" = x; then
24150             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24151           fi
24152         else
24153           # Otherwise we believe it is a complete path. Use it as it is.
24154           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24155 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24156           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24157 $as_echo_n "checking for DSYMUTIL... " >&6; }
24158           if test ! -x "$tool_specified"; then
24159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24160 $as_echo "not found" >&6; }
24161             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24162           fi
24163           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24164 $as_echo "$tool_specified" >&6; }
24165         fi
24166       fi
24167     fi
24168 
24169   fi
24170 
24171 
24172 
24173   if test "x$DSYMUTIL" = x; then
24174     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24175   fi
24176 
24177 
24178 
24179 
24180 
24181   # Publish this variable in the help.
24182 
24183 
24184   if [ -z "${XATTR+x}" ]; then
24185     # The variable is not set by user, try to locate tool using the code snippet
24186     for ac_prog in xattr
24187 do
24188   # Extract the first word of "$ac_prog", so it can be a program name with args.
24189 set dummy $ac_prog; ac_word=$2
24190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24191 $as_echo_n "checking for $ac_word... " >&6; }
24192 if ${ac_cv_path_XATTR+:} false; then :
24193   $as_echo_n "(cached) " >&6
24194 else
24195   case $XATTR in
24196   [\\/]* | ?:[\\/]*)
24197   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24198   ;;
24199   *)
24200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24201 for as_dir in $PATH
24202 do
24203   IFS=$as_save_IFS
24204   test -z "$as_dir" && as_dir=.
24205     for ac_exec_ext in '' $ac_executable_extensions; do
24206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24207     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24209     break 2
24210   fi
24211 done
24212   done
24213 IFS=$as_save_IFS
24214 
24215   ;;
24216 esac
24217 fi
24218 XATTR=$ac_cv_path_XATTR
24219 if test -n "$XATTR"; then
24220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24221 $as_echo "$XATTR" >&6; }
24222 else
24223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24224 $as_echo "no" >&6; }
24225 fi
24226 
24227 
24228   test -n "$XATTR" && break
24229 done
24230 
24231   else
24232     # The variable is set, but is it from the command line or the environment?
24233 
24234     # Try to remove the string !XATTR! from our list.
24235     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24236     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24237       # If it failed, the variable was not from the command line. Ignore it,
24238       # but warn the user (except for BASH, which is always set by the calling BASH).
24239       if test "xXATTR" != xBASH; then
24240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24241 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24242       fi
24243       # Try to locate tool using the code snippet
24244       for ac_prog in xattr
24245 do
24246   # Extract the first word of "$ac_prog", so it can be a program name with args.
24247 set dummy $ac_prog; ac_word=$2
24248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24249 $as_echo_n "checking for $ac_word... " >&6; }
24250 if ${ac_cv_path_XATTR+:} false; then :
24251   $as_echo_n "(cached) " >&6
24252 else
24253   case $XATTR in
24254   [\\/]* | ?:[\\/]*)
24255   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24256   ;;
24257   *)
24258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24259 for as_dir in $PATH
24260 do
24261   IFS=$as_save_IFS
24262   test -z "$as_dir" && as_dir=.
24263     for ac_exec_ext in '' $ac_executable_extensions; do
24264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24265     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24267     break 2
24268   fi
24269 done
24270   done
24271 IFS=$as_save_IFS
24272 
24273   ;;
24274 esac
24275 fi
24276 XATTR=$ac_cv_path_XATTR
24277 if test -n "$XATTR"; then
24278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24279 $as_echo "$XATTR" >&6; }
24280 else
24281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24282 $as_echo "no" >&6; }
24283 fi
24284 
24285 
24286   test -n "$XATTR" && break
24287 done
24288 
24289     else
24290       # If it succeeded, then it was overridden by the user. We will use it
24291       # for the tool.
24292 
24293       # First remove it from the list of overridden variables, so we can test
24294       # for unknown variables in the end.
24295       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24296 
24297       # Check if we try to supply an empty value
24298       if test "x$XATTR" = x; then
24299         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24300 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24302 $as_echo_n "checking for XATTR... " >&6; }
24303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24304 $as_echo "disabled" >&6; }
24305       else
24306         # Check if the provided tool contains a complete path.
24307         tool_specified="$XATTR"
24308         tool_basename="${tool_specified##*/}"
24309         if test "x$tool_basename" = "x$tool_specified"; then
24310           # A command without a complete path is provided, search $PATH.
24311           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24312 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24313           # Extract the first word of "$tool_basename", so it can be a program name with args.
24314 set dummy $tool_basename; ac_word=$2
24315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24316 $as_echo_n "checking for $ac_word... " >&6; }
24317 if ${ac_cv_path_XATTR+:} false; then :
24318   $as_echo_n "(cached) " >&6
24319 else
24320   case $XATTR in
24321   [\\/]* | ?:[\\/]*)
24322   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24323   ;;
24324   *)
24325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24326 for as_dir in $PATH
24327 do
24328   IFS=$as_save_IFS
24329   test -z "$as_dir" && as_dir=.
24330     for ac_exec_ext in '' $ac_executable_extensions; do
24331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24332     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24334     break 2
24335   fi
24336 done
24337   done
24338 IFS=$as_save_IFS
24339 
24340   ;;
24341 esac
24342 fi
24343 XATTR=$ac_cv_path_XATTR
24344 if test -n "$XATTR"; then
24345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24346 $as_echo "$XATTR" >&6; }
24347 else
24348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24349 $as_echo "no" >&6; }
24350 fi
24351 
24352 
24353           if test "x$XATTR" = x; then
24354             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24355           fi
24356         else
24357           # Otherwise we believe it is a complete path. Use it as it is.
24358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24359 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24360           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24361 $as_echo_n "checking for XATTR... " >&6; }
24362           if test ! -x "$tool_specified"; then
24363             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24364 $as_echo "not found" >&6; }
24365             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24366           fi
24367           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24368 $as_echo "$tool_specified" >&6; }
24369         fi
24370       fi
24371     fi
24372 
24373   fi
24374 
24375 
24376 
24377   if test "x$XATTR" = x; then
24378     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24379   fi
24380 
24381 
24382 
24383 
24384   # Publish this variable in the help.
24385 
24386 
24387   if [ -z "${CODESIGN+x}" ]; then
24388     # The variable is not set by user, try to locate tool using the code snippet
24389     for ac_prog in codesign
24390 do
24391   # Extract the first word of "$ac_prog", so it can be a program name with args.
24392 set dummy $ac_prog; ac_word=$2
24393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24394 $as_echo_n "checking for $ac_word... " >&6; }
24395 if ${ac_cv_path_CODESIGN+:} false; then :
24396   $as_echo_n "(cached) " >&6
24397 else
24398   case $CODESIGN in
24399   [\\/]* | ?:[\\/]*)
24400   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24401   ;;
24402   *)
24403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24404 for as_dir in $PATH
24405 do
24406   IFS=$as_save_IFS
24407   test -z "$as_dir" && as_dir=.
24408     for ac_exec_ext in '' $ac_executable_extensions; do
24409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24410     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24412     break 2
24413   fi
24414 done
24415   done
24416 IFS=$as_save_IFS
24417 
24418   ;;
24419 esac
24420 fi
24421 CODESIGN=$ac_cv_path_CODESIGN
24422 if test -n "$CODESIGN"; then
24423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24424 $as_echo "$CODESIGN" >&6; }
24425 else
24426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24427 $as_echo "no" >&6; }
24428 fi
24429 
24430 
24431   test -n "$CODESIGN" && break
24432 done
24433 
24434   else
24435     # The variable is set, but is it from the command line or the environment?
24436 
24437     # Try to remove the string !CODESIGN! from our list.
24438     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24439     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24440       # If it failed, the variable was not from the command line. Ignore it,
24441       # but warn the user (except for BASH, which is always set by the calling BASH).
24442       if test "xCODESIGN" != xBASH; then
24443         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24444 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24445       fi
24446       # Try to locate tool using the code snippet
24447       for ac_prog in codesign
24448 do
24449   # Extract the first word of "$ac_prog", so it can be a program name with args.
24450 set dummy $ac_prog; ac_word=$2
24451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24452 $as_echo_n "checking for $ac_word... " >&6; }
24453 if ${ac_cv_path_CODESIGN+:} false; then :
24454   $as_echo_n "(cached) " >&6
24455 else
24456   case $CODESIGN in
24457   [\\/]* | ?:[\\/]*)
24458   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24459   ;;
24460   *)
24461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24462 for as_dir in $PATH
24463 do
24464   IFS=$as_save_IFS
24465   test -z "$as_dir" && as_dir=.
24466     for ac_exec_ext in '' $ac_executable_extensions; do
24467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24468     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24470     break 2
24471   fi
24472 done
24473   done
24474 IFS=$as_save_IFS
24475 
24476   ;;
24477 esac
24478 fi
24479 CODESIGN=$ac_cv_path_CODESIGN
24480 if test -n "$CODESIGN"; then
24481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24482 $as_echo "$CODESIGN" >&6; }
24483 else
24484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24485 $as_echo "no" >&6; }
24486 fi
24487 
24488 
24489   test -n "$CODESIGN" && break
24490 done
24491 
24492     else
24493       # If it succeeded, then it was overridden by the user. We will use it
24494       # for the tool.
24495 
24496       # First remove it from the list of overridden variables, so we can test
24497       # for unknown variables in the end.
24498       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24499 
24500       # Check if we try to supply an empty value
24501       if test "x$CODESIGN" = x; then
24502         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24503 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24504         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24505 $as_echo_n "checking for CODESIGN... " >&6; }
24506         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24507 $as_echo "disabled" >&6; }
24508       else
24509         # Check if the provided tool contains a complete path.
24510         tool_specified="$CODESIGN"
24511         tool_basename="${tool_specified##*/}"
24512         if test "x$tool_basename" = "x$tool_specified"; then
24513           # A command without a complete path is provided, search $PATH.
24514           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24515 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24516           # Extract the first word of "$tool_basename", so it can be a program name with args.
24517 set dummy $tool_basename; ac_word=$2
24518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24519 $as_echo_n "checking for $ac_word... " >&6; }
24520 if ${ac_cv_path_CODESIGN+:} false; then :
24521   $as_echo_n "(cached) " >&6
24522 else
24523   case $CODESIGN in
24524   [\\/]* | ?:[\\/]*)
24525   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24526   ;;
24527   *)
24528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24529 for as_dir in $PATH
24530 do
24531   IFS=$as_save_IFS
24532   test -z "$as_dir" && as_dir=.
24533     for ac_exec_ext in '' $ac_executable_extensions; do
24534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24535     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24537     break 2
24538   fi
24539 done
24540   done
24541 IFS=$as_save_IFS
24542 
24543   ;;
24544 esac
24545 fi
24546 CODESIGN=$ac_cv_path_CODESIGN
24547 if test -n "$CODESIGN"; then
24548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24549 $as_echo "$CODESIGN" >&6; }
24550 else
24551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24552 $as_echo "no" >&6; }
24553 fi
24554 
24555 
24556           if test "x$CODESIGN" = x; then
24557             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24558           fi
24559         else
24560           # Otherwise we believe it is a complete path. Use it as it is.
24561           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24562 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24563           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24564 $as_echo_n "checking for CODESIGN... " >&6; }
24565           if test ! -x "$tool_specified"; then
24566             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24567 $as_echo "not found" >&6; }
24568             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24569           fi
24570           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24571 $as_echo "$tool_specified" >&6; }
24572         fi
24573       fi
24574     fi
24575 
24576   fi
24577 
24578 
24579     if test "x$CODESIGN" != "x"; then
24580       # Verify that the openjdk_codesign certificate is present
24581       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24582 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24583       $RM codesign-testfile
24584       $TOUCH codesign-testfile
24585       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24586       $RM codesign-testfile
24587       if test "x$CODESIGN" = x; then
24588         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24589 $as_echo "no" >&6; }
24590       else
24591         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24592 $as_echo "yes" >&6; }
24593       fi
24594     fi
24595 
24596 
24597 
24598   # Publish this variable in the help.
24599 
24600 
24601   if [ -z "${SETFILE+x}" ]; then
24602     # The variable is not set by user, try to locate tool using the code snippet
24603     for ac_prog in SetFile
24604 do
24605   # Extract the first word of "$ac_prog", so it can be a program name with args.
24606 set dummy $ac_prog; ac_word=$2
24607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24608 $as_echo_n "checking for $ac_word... " >&6; }
24609 if ${ac_cv_path_SETFILE+:} false; then :
24610   $as_echo_n "(cached) " >&6
24611 else
24612   case $SETFILE in
24613   [\\/]* | ?:[\\/]*)
24614   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24615   ;;
24616   *)
24617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24618 for as_dir in $PATH
24619 do
24620   IFS=$as_save_IFS
24621   test -z "$as_dir" && as_dir=.
24622     for ac_exec_ext in '' $ac_executable_extensions; do
24623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24624     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24626     break 2
24627   fi
24628 done
24629   done
24630 IFS=$as_save_IFS
24631 
24632   ;;
24633 esac
24634 fi
24635 SETFILE=$ac_cv_path_SETFILE
24636 if test -n "$SETFILE"; then
24637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24638 $as_echo "$SETFILE" >&6; }
24639 else
24640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24641 $as_echo "no" >&6; }
24642 fi
24643 
24644 
24645   test -n "$SETFILE" && break
24646 done
24647 
24648   else
24649     # The variable is set, but is it from the command line or the environment?
24650 
24651     # Try to remove the string !SETFILE! from our list.
24652     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24653     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24654       # If it failed, the variable was not from the command line. Ignore it,
24655       # but warn the user (except for BASH, which is always set by the calling BASH).
24656       if test "xSETFILE" != xBASH; then
24657         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24658 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24659       fi
24660       # Try to locate tool using the code snippet
24661       for ac_prog in SetFile
24662 do
24663   # Extract the first word of "$ac_prog", so it can be a program name with args.
24664 set dummy $ac_prog; ac_word=$2
24665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24666 $as_echo_n "checking for $ac_word... " >&6; }
24667 if ${ac_cv_path_SETFILE+:} false; then :
24668   $as_echo_n "(cached) " >&6
24669 else
24670   case $SETFILE in
24671   [\\/]* | ?:[\\/]*)
24672   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24673   ;;
24674   *)
24675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24676 for as_dir in $PATH
24677 do
24678   IFS=$as_save_IFS
24679   test -z "$as_dir" && as_dir=.
24680     for ac_exec_ext in '' $ac_executable_extensions; do
24681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24682     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24684     break 2
24685   fi
24686 done
24687   done
24688 IFS=$as_save_IFS
24689 
24690   ;;
24691 esac
24692 fi
24693 SETFILE=$ac_cv_path_SETFILE
24694 if test -n "$SETFILE"; then
24695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24696 $as_echo "$SETFILE" >&6; }
24697 else
24698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24699 $as_echo "no" >&6; }
24700 fi
24701 
24702 
24703   test -n "$SETFILE" && break
24704 done
24705 
24706     else
24707       # If it succeeded, then it was overridden by the user. We will use it
24708       # for the tool.
24709 
24710       # First remove it from the list of overridden variables, so we can test
24711       # for unknown variables in the end.
24712       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24713 
24714       # Check if we try to supply an empty value
24715       if test "x$SETFILE" = x; then
24716         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24717 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24718         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24719 $as_echo_n "checking for SETFILE... " >&6; }
24720         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24721 $as_echo "disabled" >&6; }
24722       else
24723         # Check if the provided tool contains a complete path.
24724         tool_specified="$SETFILE"
24725         tool_basename="${tool_specified##*/}"
24726         if test "x$tool_basename" = "x$tool_specified"; then
24727           # A command without a complete path is provided, search $PATH.
24728           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24729 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24730           # Extract the first word of "$tool_basename", so it can be a program name with args.
24731 set dummy $tool_basename; ac_word=$2
24732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24733 $as_echo_n "checking for $ac_word... " >&6; }
24734 if ${ac_cv_path_SETFILE+:} false; then :
24735   $as_echo_n "(cached) " >&6
24736 else
24737   case $SETFILE in
24738   [\\/]* | ?:[\\/]*)
24739   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24740   ;;
24741   *)
24742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24743 for as_dir in $PATH
24744 do
24745   IFS=$as_save_IFS
24746   test -z "$as_dir" && as_dir=.
24747     for ac_exec_ext in '' $ac_executable_extensions; do
24748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24749     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24751     break 2
24752   fi
24753 done
24754   done
24755 IFS=$as_save_IFS
24756 
24757   ;;
24758 esac
24759 fi
24760 SETFILE=$ac_cv_path_SETFILE
24761 if test -n "$SETFILE"; then
24762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24763 $as_echo "$SETFILE" >&6; }
24764 else
24765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24766 $as_echo "no" >&6; }
24767 fi
24768 
24769 
24770           if test "x$SETFILE" = x; then
24771             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24772           fi
24773         else
24774           # Otherwise we believe it is a complete path. Use it as it is.
24775           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24776 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24777           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24778 $as_echo_n "checking for SETFILE... " >&6; }
24779           if test ! -x "$tool_specified"; then
24780             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24781 $as_echo "not found" >&6; }
24782             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24783           fi
24784           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24785 $as_echo "$tool_specified" >&6; }
24786         fi
24787       fi
24788     fi
24789 
24790   fi
24791 
24792 
24793 
24794   if test "x$SETFILE" = x; then
24795     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24796   fi
24797 
24798 
24799   fi
24800 
24801 
24802   # Check bash version
24803   # Extra [ ] to stop m4 mangling
24804    BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24806 $as_echo_n "checking bash version... " >&6; }
24807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24808 $as_echo "$BASH_VER" >&6; }
24809 
24810   BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24811   BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24812   if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24813     as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24814   fi
24815 
24816   # Test if bash supports pipefail.
24817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24818 $as_echo_n "checking if bash supports pipefail... " >&6; }
24819   if ${BASH} -c 'set -o pipefail'; then
24820     BASH_ARGS="$BASH_ARGS -o pipefail"
24821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24822 $as_echo "yes" >&6; }
24823   else
24824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24825 $as_echo "no" >&6; }
24826   fi
24827 
24828   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24829 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24830   if ${BASH} -e -c 'true'; then
24831     BASH_ARGS="$BASH_ARGS -e"
24832     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24833 $as_echo "yes" >&6; }
24834   else
24835     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24836 $as_echo "no" >&6; }
24837   fi
24838 
24839 
24840 
24841 
24842 # Check if pkg-config is available.
24843 
24844 
24845 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24846         if test -n "$ac_tool_prefix"; then
24847   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24848 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24850 $as_echo_n "checking for $ac_word... " >&6; }
24851 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24852   $as_echo_n "(cached) " >&6
24853 else
24854   case $PKG_CONFIG in
24855   [\\/]* | ?:[\\/]*)
24856   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24857   ;;
24858   *)
24859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24860 for as_dir in $PATH
24861 do
24862   IFS=$as_save_IFS
24863   test -z "$as_dir" && as_dir=.
24864     for ac_exec_ext in '' $ac_executable_extensions; do
24865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24866     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24868     break 2
24869   fi
24870 done
24871   done
24872 IFS=$as_save_IFS
24873 
24874   ;;
24875 esac
24876 fi
24877 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24878 if test -n "$PKG_CONFIG"; then
24879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24880 $as_echo "$PKG_CONFIG" >&6; }
24881 else
24882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24883 $as_echo "no" >&6; }
24884 fi
24885 
24886 
24887 fi
24888 if test -z "$ac_cv_path_PKG_CONFIG"; then
24889   ac_pt_PKG_CONFIG=$PKG_CONFIG
24890   # Extract the first word of "pkg-config", so it can be a program name with args.
24891 set dummy pkg-config; ac_word=$2
24892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24893 $as_echo_n "checking for $ac_word... " >&6; }
24894 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24895   $as_echo_n "(cached) " >&6
24896 else
24897   case $ac_pt_PKG_CONFIG in
24898   [\\/]* | ?:[\\/]*)
24899   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24900   ;;
24901   *)
24902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24903 for as_dir in $PATH
24904 do
24905   IFS=$as_save_IFS
24906   test -z "$as_dir" && as_dir=.
24907     for ac_exec_ext in '' $ac_executable_extensions; do
24908   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24909     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24911     break 2
24912   fi
24913 done
24914   done
24915 IFS=$as_save_IFS
24916 
24917   ;;
24918 esac
24919 fi
24920 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24921 if test -n "$ac_pt_PKG_CONFIG"; then
24922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24923 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24924 else
24925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24926 $as_echo "no" >&6; }
24927 fi
24928 
24929   if test "x$ac_pt_PKG_CONFIG" = x; then
24930     PKG_CONFIG=""
24931   else
24932     case $cross_compiling:$ac_tool_warned in
24933 yes:)
24934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24935 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24936 ac_tool_warned=yes ;;
24937 esac
24938     PKG_CONFIG=$ac_pt_PKG_CONFIG
24939   fi
24940 else
24941   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24942 fi
24943 
24944 fi
24945 if test -n "$PKG_CONFIG"; then
24946         _pkg_min_version=0.9.0
24947         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24948 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24949         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24950                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24951 $as_echo "yes" >&6; }
24952         else
24953                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24954 $as_echo "no" >&6; }
24955                 PKG_CONFIG=""
24956         fi
24957 
24958 fi
24959 
24960 # After basic tools have been setup, we can check build os specific details.
24961 
24962   ###############################################################################
24963 
24964   # Note that this is the build platform OS version!
24965 
24966   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24967   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24968   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24969   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24970 
24971 
24972 
24973 
24974 
24975 # Misc basic settings
24976 
24977 
24978 # Check whether --with-default-make-target was given.
24979 if test "${with_default_make_target+set}" = set; then :
24980   withval=$with_default_make_target;
24981 fi
24982 
24983   if test "x$with_default_make_target" = "x" \
24984       || test "x$with_default_make_target" = "xyes"; then
24985     DEFAULT_MAKE_TARGET="exploded-image"
24986   elif test "x$with_default_make_target" = "xno"; then
24987     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24988   else
24989     DEFAULT_MAKE_TARGET="$with_default_make_target"
24990   fi
24991 
24992 
24993 
24994 
24995 ###############################################################################
24996 #
24997 # Determine OpenJDK variants, options and version numbers.
24998 #
24999 ###############################################################################
25000 
25001 # We need build & target for this.
25002 
25003   # Should we build a JDK without a graphical UI?
25004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
25005 $as_echo_n "checking headless only... " >&6; }
25006   # Check whether --enable-headless-only was given.
25007 if test "${enable_headless_only+set}" = set; then :
25008   enableval=$enable_headless_only;
25009 fi
25010 
25011 
25012   if test "x$enable_headless_only" = "xyes"; then
25013     ENABLE_HEADLESS_ONLY="true"
25014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25015 $as_echo "yes" >&6; }
25016   elif test "x$enable_headless_only" = "xno"; then
25017     ENABLE_HEADLESS_ONLY="false"
25018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25019 $as_echo "no" >&6; }
25020   elif test "x$enable_headless_only" = "x"; then
25021     ENABLE_HEADLESS_ONLY="false"
25022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25023 $as_echo "no" >&6; }
25024   else
25025     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
25026   fi
25027 
25028 
25029 
25030   # Should we build the complete docs, or just a lightweight version?
25031   # Check whether --enable-full-docs was given.
25032 if test "${enable_full_docs+set}" = set; then :
25033   enableval=$enable_full_docs;
25034 fi
25035 
25036 
25037   # Verify dependencies
25038   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
25039 $as_echo_n "checking for graphviz dot... " >&6; }
25040   if test "x$DOT" != "x"; then
25041     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25042 $as_echo "yes" >&6; }
25043   else
25044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25045 $as_echo "no, cannot generate full docs" >&6; }
25046     FULL_DOCS_DEP_MISSING=true
25047   fi
25048 
25049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
25050 $as_echo_n "checking for pandoc... " >&6; }
25051   if test "x$PANDOC" != "x"; then
25052     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25053 $as_echo "yes" >&6; }
25054   else
25055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
25056 $as_echo "no, cannot generate full docs" >&6; }
25057     FULL_DOCS_DEP_MISSING=true
25058   fi
25059 
25060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
25061 $as_echo_n "checking full docs... " >&6; }
25062   if test "x$enable_full_docs" = xyes; then
25063     if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
25064       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25065 $as_echo "no, missing dependencies" >&6; }
25066 
25067   # Print a helpful message on how to acquire the necessary build dependency.
25068   # dot is the help tag: freetype, cups, alsa etc
25069   MISSING_DEPENDENCY=dot
25070 
25071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25072     cygwin_help $MISSING_DEPENDENCY
25073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25074     msys_help $MISSING_DEPENDENCY
25075   else
25076     PKGHANDLER_COMMAND=
25077 
25078     case $PKGHANDLER in
25079       apt-get)
25080         apt_help     $MISSING_DEPENDENCY ;;
25081       yum)
25082         yum_help     $MISSING_DEPENDENCY ;;
25083       brew)
25084         brew_help    $MISSING_DEPENDENCY ;;
25085       port)
25086         port_help    $MISSING_DEPENDENCY ;;
25087       pkgutil)
25088         pkgutil_help $MISSING_DEPENDENCY ;;
25089       pkgadd)
25090         pkgadd_help  $MISSING_DEPENDENCY ;;
25091     esac
25092 
25093     if test "x$PKGHANDLER_COMMAND" != x; then
25094       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25095     fi
25096   fi
25097 
25098       as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25099     else
25100       ENABLE_FULL_DOCS=true
25101       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25102 $as_echo "yes, forced" >&6; }
25103     fi
25104   elif test "x$enable_full_docs" = xno; then
25105     ENABLE_FULL_DOCS=false
25106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25107 $as_echo "no, forced" >&6; }
25108   elif test "x$enable_full_docs" = x; then
25109     # Check for prerequisites
25110     if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25111       ENABLE_FULL_DOCS=false
25112       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25113 $as_echo "no, missing dependencies" >&6; }
25114     else
25115       ENABLE_FULL_DOCS=true
25116       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25117 $as_echo "yes, dependencies present" >&6; }
25118     fi
25119   else
25120     as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25121   fi
25122 
25123 
25124 
25125   # Choose cacerts source file
25126 
25127 # Check whether --with-cacerts-file was given.
25128 if test "${with_cacerts_file+set}" = set; then :
25129   withval=$with_cacerts_file;
25130 fi
25131 
25132   if test "x$with_cacerts_file" != x; then
25133     CACERTS_FILE=$with_cacerts_file
25134   fi
25135 
25136 
25137   # Enable or disable unlimited crypto
25138   # Check whether --enable-unlimited-crypto was given.
25139 if test "${enable_unlimited_crypto+set}" = set; then :
25140   enableval=$enable_unlimited_crypto;
25141 else
25142   enable_unlimited_crypto=yes
25143 fi
25144 
25145   if test "x$enable_unlimited_crypto" = "xyes"; then
25146     UNLIMITED_CRYPTO=true
25147   else
25148     UNLIMITED_CRYPTO=false
25149   fi
25150 
25151 
25152   # Should we build the serviceability agent (SA)?
25153   INCLUDE_SA=true
25154   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25155     INCLUDE_SA=false
25156   fi
25157   if test "x$OPENJDK_TARGET_OS" = xaix ; then
25158     INCLUDE_SA=false
25159   fi
25160 
25161 
25162   # Compress jars
25163   COMPRESS_JARS=false
25164 
25165 
25166 
25167   # Setup default copyright year. Mostly overridden when building close to a new year.
25168 
25169 # Check whether --with-copyright-year was given.
25170 if test "${with_copyright_year+set}" = set; then :
25171   withval=$with_copyright_year;
25172 fi
25173 
25174   if test "x$with_copyright_year" = xyes; then
25175     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25176   elif test "x$with_copyright_year" != x; then
25177     COPYRIGHT_YEAR="$with_copyright_year"
25178   else
25179     COPYRIGHT_YEAR=`$DATE +'%Y'`
25180   fi
25181 
25182 
25183 
25184   # Check whether --enable-keep-packaged-modules was given.
25185 if test "${enable_keep_packaged_modules+set}" = set; then :
25186   enableval=$enable_keep_packaged_modules;
25187 fi
25188 
25189 
25190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25191 $as_echo_n "checking if packaged modules are kept... " >&6; }
25192   if test "x$enable_keep_packaged_modules" = "xyes"; then
25193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25194 $as_echo "yes" >&6; }
25195     JLINK_KEEP_PACKAGED_MODULES=true
25196   elif test "x$enable_keep_packaged_modules" = "xno"; then
25197     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25198 $as_echo "no" >&6; }
25199     JLINK_KEEP_PACKAGED_MODULES=false
25200   elif test "x$enable_keep_packaged_modules" = "x"; then
25201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25202 $as_echo "yes (default)" >&6; }
25203     JLINK_KEEP_PACKAGED_MODULES=true
25204   else
25205     { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25206 $as_echo "error" >&6; }
25207     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25208   fi
25209 
25210 
25211 
25212 
25213   # Warn user that old version arguments are deprecated.
25214 
25215 
25216 # Check whether --with-milestone was given.
25217 if test "${with_milestone+set}" = set; then :
25218   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25219 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25220 fi
25221 
25222 
25223 
25224 
25225 # Check whether --with-update-version was given.
25226 if test "${with_update_version+set}" = set; then :
25227   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25228 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25229 fi
25230 
25231 
25232 
25233 
25234 # Check whether --with-user-release-suffix was given.
25235 if test "${with_user_release_suffix+set}" = set; then :
25236   withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
25237 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25238 fi
25239 
25240 
25241 
25242 
25243 # Check whether --with-build-number was given.
25244 if test "${with_build_number+set}" = set; then :
25245   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25246 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25247 fi
25248 
25249 
25250 
25251   # Source the version numbers file
25252   . $AUTOCONF_DIR/version-numbers
25253 
25254   # Some non-version number information is set in that file
25255 
25256 
25257 
25258 
25259 
25260 
25261 
25262 
25263 
25264   # Override version from arguments
25265 
25266   # If --with-version-string is set, process it first. It is possible to
25267   # override parts with more specific flags, since these are processed later.
25268 
25269 # Check whether --with-version-string was given.
25270 if test "${with_version_string+set}" = set; then :
25271   withval=$with_version_string;
25272 fi
25273 
25274   if test "x$with_version_string" = xyes; then
25275     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25276   elif test "x$with_version_string" != x; then
25277     # Additional [] needed to keep m4 from mangling shell constructs.
25278     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25279       VERSION_MAJOR=${BASH_REMATCH[1]}
25280       VERSION_MINOR=${BASH_REMATCH[3]}
25281       VERSION_SECURITY=${BASH_REMATCH[5]}
25282       VERSION_PATCH=${BASH_REMATCH[7]}
25283       VERSION_PRE=${BASH_REMATCH[9]}
25284       version_plus_separator=${BASH_REMATCH[11]}
25285       VERSION_BUILD=${BASH_REMATCH[12]}
25286       VERSION_OPT=${BASH_REMATCH[14]}
25287       # Unspecified numerical fields are interpreted as 0.
25288       if test "x$VERSION_MINOR" = x; then
25289         VERSION_MINOR=0
25290       fi
25291       if test "x$VERSION_SECURITY" = x; then
25292         VERSION_SECURITY=0
25293       fi
25294       if test "x$VERSION_PATCH" = x; then
25295         VERSION_PATCH=0
25296       fi
25297       if test "x$version_plus_separator" != x \
25298           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25299         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25300       fi
25301       # Stop the version part process from setting default values.
25302       # We still allow them to explicitly override though.
25303       NO_DEFAULT_VERSION_PARTS=true
25304     else
25305       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25306     fi
25307   fi
25308 
25309 
25310 # Check whether --with-version-pre was given.
25311 if test "${with_version_pre+set}" = set; then :
25312   withval=$with_version_pre; with_version_pre_present=true
25313 else
25314   with_version_pre_present=false
25315 fi
25316 
25317 
25318   if test "x$with_version_pre_present" = xtrue; then
25319     if test "x$with_version_pre" = xyes; then
25320       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25321     elif test "x$with_version_pre" = xno; then
25322       # Interpret --without-* as empty string instead of the literal "no"
25323       VERSION_PRE=
25324     else
25325       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25326        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25327       if test "x$VERSION_PRE" != "x$with_version_pre"; then
25328         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25329 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25330       fi
25331     fi
25332   else
25333     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25334       # Default is to use "internal" as pre
25335       VERSION_PRE="internal"
25336     fi
25337   fi
25338 
25339 
25340 # Check whether --with-version-opt was given.
25341 if test "${with_version_opt+set}" = set; then :
25342   withval=$with_version_opt; with_version_opt_present=true
25343 else
25344   with_version_opt_present=false
25345 fi
25346 
25347 
25348   if test "x$with_version_opt_present" = xtrue; then
25349     if test "x$with_version_opt" = xyes; then
25350       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25351     elif test "x$with_version_opt" = xno; then
25352       # Interpret --without-* as empty string instead of the literal "no"
25353       VERSION_OPT=
25354     else
25355       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25356        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25357       if test "x$VERSION_OPT" != "x$with_version_opt"; then
25358         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25359 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25360       fi
25361     fi
25362   else
25363     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25364       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25365       # Outer [ ] to quote m4.
25366        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25367       VERSION_OPT="adhoc.$USERNAME.$basedirname"
25368     fi
25369   fi
25370 
25371 
25372 # Check whether --with-version-build was given.
25373 if test "${with_version_build+set}" = set; then :
25374   withval=$with_version_build; with_version_build_present=true
25375 else
25376   with_version_build_present=false
25377 fi
25378 
25379 
25380   if test "x$with_version_build_present" = xtrue; then
25381     if test "x$with_version_build" = xyes; then
25382       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25383     elif test "x$with_version_build" = xno; then
25384       # Interpret --without-* as empty string instead of the literal "no"
25385       VERSION_BUILD=
25386     elif test "x$with_version_build" = x; then
25387       VERSION_BUILD=
25388     else
25389 
25390   # Additional [] needed to keep m4 from mangling shell constructs.
25391   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25392     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25393   fi
25394   # Extract the version number without leading zeros.
25395   cleaned_value=${BASH_REMATCH[1]}
25396   if test "x$cleaned_value" = x; then
25397     # Special case for zero
25398     cleaned_value=${BASH_REMATCH[2]}
25399   fi
25400 
25401   if test $cleaned_value -gt 255; then
25402     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25403   fi
25404   if test "x$cleaned_value" != "x$with_version_build"; then
25405     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25406 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25407   fi
25408   VERSION_BUILD=$cleaned_value
25409 
25410     fi
25411   else
25412     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25413       # Default is to not have a build number.
25414       VERSION_BUILD=""
25415       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25416       VERSION_BUILD=0
25417     fi
25418   fi
25419 
25420 
25421 # Check whether --with-version-major was given.
25422 if test "${with_version_major+set}" = set; then :
25423   withval=$with_version_major; with_version_major_present=true
25424 else
25425   with_version_major_present=false
25426 fi
25427 
25428 
25429   if test "x$with_version_major_present" = xtrue; then
25430     if test "x$with_version_major" = xyes; then
25431       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25432     else
25433 
25434   # Additional [] needed to keep m4 from mangling shell constructs.
25435   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25436     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25437   fi
25438   # Extract the version number without leading zeros.
25439   cleaned_value=${BASH_REMATCH[1]}
25440   if test "x$cleaned_value" = x; then
25441     # Special case for zero
25442     cleaned_value=${BASH_REMATCH[2]}
25443   fi
25444 
25445   if test $cleaned_value -gt 255; then
25446     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25447   fi
25448   if test "x$cleaned_value" != "x$with_version_major"; then
25449     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25450 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25451   fi
25452   VERSION_MAJOR=$cleaned_value
25453 
25454     fi
25455   else
25456     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25457       # Default is to get value from version-numbers
25458       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25459     fi
25460   fi
25461 
25462 
25463 # Check whether --with-version-minor was given.
25464 if test "${with_version_minor+set}" = set; then :
25465   withval=$with_version_minor; with_version_minor_present=true
25466 else
25467   with_version_minor_present=false
25468 fi
25469 
25470 
25471   if test "x$with_version_minor_present" = xtrue; then
25472     if test "x$with_version_minor" = xyes; then
25473       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25474     elif test "x$with_version_minor" = xno; then
25475       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25476       VERSION_MINOR=0
25477     elif test "x$with_version_minor" = x; then
25478       VERSION_MINOR=0
25479     else
25480 
25481   # Additional [] needed to keep m4 from mangling shell constructs.
25482   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25483     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25484   fi
25485   # Extract the version number without leading zeros.
25486   cleaned_value=${BASH_REMATCH[1]}
25487   if test "x$cleaned_value" = x; then
25488     # Special case for zero
25489     cleaned_value=${BASH_REMATCH[2]}
25490   fi
25491 
25492   if test $cleaned_value -gt 255; then
25493     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25494   fi
25495   if test "x$cleaned_value" != "x$with_version_minor"; then
25496     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25497 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25498   fi
25499   VERSION_MINOR=$cleaned_value
25500 
25501     fi
25502   else
25503     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25504       # Default is 0, if unspecified
25505       VERSION_MINOR=$DEFAULT_VERSION_MINOR
25506     fi
25507   fi
25508 
25509 
25510 # Check whether --with-version-security was given.
25511 if test "${with_version_security+set}" = set; then :
25512   withval=$with_version_security; with_version_security_present=true
25513 else
25514   with_version_security_present=false
25515 fi
25516 
25517 
25518   if test "x$with_version_security_present" = xtrue; then
25519     if test "x$with_version_security" = xyes; then
25520       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25521     elif test "x$with_version_security" = xno; then
25522       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25523       VERSION_SECURITY=0
25524     elif test "x$with_version_security" = x; then
25525       VERSION_SECURITY=0
25526     else
25527 
25528   # Additional [] needed to keep m4 from mangling shell constructs.
25529   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25530     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25531   fi
25532   # Extract the version number without leading zeros.
25533   cleaned_value=${BASH_REMATCH[1]}
25534   if test "x$cleaned_value" = x; then
25535     # Special case for zero
25536     cleaned_value=${BASH_REMATCH[2]}
25537   fi
25538 
25539   if test $cleaned_value -gt 255; then
25540     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25541   fi
25542   if test "x$cleaned_value" != "x$with_version_security"; then
25543     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25544 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25545   fi
25546   VERSION_SECURITY=$cleaned_value
25547 
25548     fi
25549   else
25550     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25551       # Default is 0, if unspecified
25552       VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25553     fi
25554   fi
25555 
25556 
25557 # Check whether --with-version-patch was given.
25558 if test "${with_version_patch+set}" = set; then :
25559   withval=$with_version_patch; with_version_patch_present=true
25560 else
25561   with_version_patch_present=false
25562 fi
25563 
25564 
25565   if test "x$with_version_patch_present" = xtrue; then
25566     if test "x$with_version_patch" = xyes; then
25567       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25568     elif test "x$with_version_patch" = xno; then
25569       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25570       VERSION_PATCH=0
25571     elif test "x$with_version_patch" = x; then
25572       VERSION_PATCH=0
25573     else
25574 
25575   # Additional [] needed to keep m4 from mangling shell constructs.
25576   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25577     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25578   fi
25579   # Extract the version number without leading zeros.
25580   cleaned_value=${BASH_REMATCH[1]}
25581   if test "x$cleaned_value" = x; then
25582     # Special case for zero
25583     cleaned_value=${BASH_REMATCH[2]}
25584   fi
25585 
25586   if test $cleaned_value -gt 255; then
25587     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25588   fi
25589   if test "x$cleaned_value" != "x$with_version_patch"; then
25590     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25591 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25592   fi
25593   VERSION_PATCH=$cleaned_value
25594 
25595     fi
25596   else
25597     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25598       # Default is 0, if unspecified
25599       VERSION_PATCH=$DEFAULT_VERSION_PATCH
25600     fi
25601   fi
25602 
25603   # Calculate derived version properties
25604 
25605   # Set VERSION_IS_GA based on if VERSION_PRE has a value
25606   if test "x$VERSION_PRE" = x; then
25607     VERSION_IS_GA=true
25608   else
25609     VERSION_IS_GA=false
25610   fi
25611 
25612   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25613   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25614 
25615   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25616   # Strip trailing zeroes from stripped_version_number
25617   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25618   VERSION_NUMBER=$stripped_version_number
25619 
25620   # The complete version string, with additional build information
25621   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25622     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25623   else
25624     # If either build or opt is set, we need a + separator
25625     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25626   fi
25627 
25628   # The short version string, just VERSION_NUMBER and PRE, if present.
25629   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25630 
25631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25632 $as_echo_n "checking for version string... " >&6; }
25633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25634 $as_echo "$VERSION_STRING" >&6; }
25635 
25636 
25637 
25638 
25639 
25640 
25641 
25642 
25643 
25644 
25645 
25646 
25647 
25648 
25649 
25650 ###############################################################################
25651 #
25652 # Setup BootJDK, used to bootstrap the build.
25653 #
25654 ###############################################################################
25655 
25656 
25657   BOOT_JDK_FOUND=no
25658 
25659 # Check whether --with-boot-jdk was given.
25660 if test "${with_boot_jdk+set}" = set; then :
25661   withval=$with_boot_jdk;
25662 fi
25663 
25664 
25665   # We look for the Boot JDK through various means, going from more certain to
25666   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25667   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25668   # must check if this is indeed valid; otherwise we'll continue looking.
25669 
25670   # Test: Is bootjdk explicitly set by command line arguments?
25671 
25672   if test "x$BOOT_JDK_FOUND" = xno; then
25673     # Now execute the test
25674 
25675   if test "x$with_boot_jdk" != x; then
25676     BOOT_JDK=$with_boot_jdk
25677     BOOT_JDK_FOUND=maybe
25678     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25679 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25680   fi
25681 
25682 
25683     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25684     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25685       # Do we have a bin/java?
25686       if test ! -x "$BOOT_JDK/bin/java"; then
25687         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25689         BOOT_JDK_FOUND=no
25690       else
25691         # Do we have a bin/javac?
25692         if test ! -x "$BOOT_JDK/bin/javac"; then
25693           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25695           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25696 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25697           BOOT_JDK_FOUND=no
25698         else
25699           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25700           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25701 
25702           # Extra M4 quote needed to protect [] in grep expression.
25703           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25704           if test "x$FOUND_CORRECT_VERSION" = x; then
25705             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25707             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25708 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25709             BOOT_JDK_FOUND=no
25710           else
25711             # We're done! :-)
25712             BOOT_JDK_FOUND=yes
25713 
25714   # Only process if variable expands to non-empty
25715 
25716   if test "x$BOOT_JDK" != x; then
25717     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25718 
25719   # Input might be given as Windows format, start by converting to
25720   # unix format.
25721   path="$BOOT_JDK"
25722   new_path=`$CYGPATH -u "$path"`
25723 
25724   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25725   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25726   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25727   # "foo.exe" is OK but "foo" is an error.
25728   #
25729   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25730   # It is also a way to make sure we got the proper file name for the real test later on.
25731   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25732   if test "x$test_shortpath" = x; then
25733     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25734 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25735     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25736   fi
25737 
25738   # Call helper function which possibly converts this using DOS-style short mode.
25739   # If so, the updated path is stored in $new_path.
25740 
25741   input_path="$new_path"
25742   # Check if we need to convert this using DOS-style short mode. If the path
25743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25744   # take no chances and rewrite it.
25745   # Note: m4 eats our [], so we need to use [ and ] instead.
25746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25747   if test "x$has_forbidden_chars" != x; then
25748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25752       # Going to short mode and back again did indeed matter. Since short mode is
25753       # case insensitive, let's make it lowercase to improve readability.
25754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25755       # Now convert it back to Unix-style (cygpath)
25756       input_path=`$CYGPATH -u "$shortmode_path"`
25757       new_path="$input_path"
25758     fi
25759   fi
25760 
25761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25762   if test "x$test_cygdrive_prefix" = x; then
25763     # As a simple fix, exclude /usr/bin since it's not a real path.
25764     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25766       # a path prefixed by /cygdrive for fixpath to work.
25767       new_path="$CYGWIN_ROOT_PATH$input_path"
25768     fi
25769   fi
25770 
25771 
25772   if test "x$path" != "x$new_path"; then
25773     BOOT_JDK="$new_path"
25774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25775 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25776   fi
25777 
25778     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25779 
25780   path="$BOOT_JDK"
25781   has_colon=`$ECHO $path | $GREP ^.:`
25782   new_path="$path"
25783   if test "x$has_colon" = x; then
25784     # Not in mixed or Windows style, start by that.
25785     new_path=`cmd //c echo $path`
25786   fi
25787 
25788 
25789   input_path="$new_path"
25790   # Check if we need to convert this using DOS-style short mode. If the path
25791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25792   # take no chances and rewrite it.
25793   # Note: m4 eats our [], so we need to use [ and ] instead.
25794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25795   if test "x$has_forbidden_chars" != x; then
25796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25797     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25798   fi
25799 
25800 
25801   windows_path="$new_path"
25802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25803     unix_path=`$CYGPATH -u "$windows_path"`
25804     new_path="$unix_path"
25805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25807     new_path="$unix_path"
25808   fi
25809 
25810   if test "x$path" != "x$new_path"; then
25811     BOOT_JDK="$new_path"
25812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25813 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25814   fi
25815 
25816   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25817   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25818 
25819     else
25820       # We're on a unix platform. Hooray! :)
25821       path="$BOOT_JDK"
25822       has_space=`$ECHO "$path" | $GREP " "`
25823       if test "x$has_space" != x; then
25824         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25825 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25826         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25827       fi
25828 
25829       # Use eval to expand a potential ~
25830       eval path="$path"
25831       if test ! -f "$path" && test ! -d "$path"; then
25832         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25833       fi
25834 
25835       if test -d "$path"; then
25836         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25837       else
25838         dir="`$DIRNAME "$path"`"
25839         base="`$BASENAME "$path"`"
25840         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25841       fi
25842     fi
25843   fi
25844 
25845             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25846 $as_echo_n "checking for Boot JDK... " >&6; }
25847             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25848 $as_echo "$BOOT_JDK" >&6; }
25849             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25850 $as_echo_n "checking Boot JDK version... " >&6; }
25851             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25852             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25853 $as_echo "$BOOT_JDK_VERSION" >&6; }
25854           fi # end check jdk version
25855         fi # end check javac
25856       fi # end check java
25857     fi # end check boot jdk found
25858   fi
25859 
25860   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25861     # Having specified an argument which is incorrect will produce an instant failure;
25862     # we should not go on looking
25863     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25864   fi
25865 
25866   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25867 
25868   if test "x$BOOT_JDK_FOUND" = xno; then
25869     # Now execute the test
25870 
25871   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25872     # First check at user selected default
25873 
25874   if test "x$BOOT_JDK_FOUND" = xno; then
25875     # Now execute the test
25876 
25877   if test -x /usr/libexec/java_home; then
25878     BOOT_JDK=`/usr/libexec/java_home `
25879     BOOT_JDK_FOUND=maybe
25880     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25881 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25882   fi
25883 
25884 
25885     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25886     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25887       # Do we have a bin/java?
25888       if test ! -x "$BOOT_JDK/bin/java"; then
25889         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25890 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25891         BOOT_JDK_FOUND=no
25892       else
25893         # Do we have a bin/javac?
25894         if test ! -x "$BOOT_JDK/bin/javac"; then
25895           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25896 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25897           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25898 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25899           BOOT_JDK_FOUND=no
25900         else
25901           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25902           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25903 
25904           # Extra M4 quote needed to protect [] in grep expression.
25905           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25906           if test "x$FOUND_CORRECT_VERSION" = x; then
25907             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25908 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25909             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25910 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25911             BOOT_JDK_FOUND=no
25912           else
25913             # We're done! :-)
25914             BOOT_JDK_FOUND=yes
25915 
25916   # Only process if variable expands to non-empty
25917 
25918   if test "x$BOOT_JDK" != x; then
25919     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25920 
25921   # Input might be given as Windows format, start by converting to
25922   # unix format.
25923   path="$BOOT_JDK"
25924   new_path=`$CYGPATH -u "$path"`
25925 
25926   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25927   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25928   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25929   # "foo.exe" is OK but "foo" is an error.
25930   #
25931   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25932   # It is also a way to make sure we got the proper file name for the real test later on.
25933   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25934   if test "x$test_shortpath" = x; then
25935     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25936 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25937     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25938   fi
25939 
25940   # Call helper function which possibly converts this using DOS-style short mode.
25941   # If so, the updated path is stored in $new_path.
25942 
25943   input_path="$new_path"
25944   # Check if we need to convert this using DOS-style short mode. If the path
25945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25946   # take no chances and rewrite it.
25947   # Note: m4 eats our [], so we need to use [ and ] instead.
25948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25949   if test "x$has_forbidden_chars" != x; then
25950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25951     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25952     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25953     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25954       # Going to short mode and back again did indeed matter. Since short mode is
25955       # case insensitive, let's make it lowercase to improve readability.
25956       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25957       # Now convert it back to Unix-style (cygpath)
25958       input_path=`$CYGPATH -u "$shortmode_path"`
25959       new_path="$input_path"
25960     fi
25961   fi
25962 
25963   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25964   if test "x$test_cygdrive_prefix" = x; then
25965     # As a simple fix, exclude /usr/bin since it's not a real path.
25966     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25967       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25968       # a path prefixed by /cygdrive for fixpath to work.
25969       new_path="$CYGWIN_ROOT_PATH$input_path"
25970     fi
25971   fi
25972 
25973 
25974   if test "x$path" != "x$new_path"; then
25975     BOOT_JDK="$new_path"
25976     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25977 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25978   fi
25979 
25980     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25981 
25982   path="$BOOT_JDK"
25983   has_colon=`$ECHO $path | $GREP ^.:`
25984   new_path="$path"
25985   if test "x$has_colon" = x; then
25986     # Not in mixed or Windows style, start by that.
25987     new_path=`cmd //c echo $path`
25988   fi
25989 
25990 
25991   input_path="$new_path"
25992   # Check if we need to convert this using DOS-style short mode. If the path
25993   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25994   # take no chances and rewrite it.
25995   # Note: m4 eats our [], so we need to use [ and ] instead.
25996   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25997   if test "x$has_forbidden_chars" != x; then
25998     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25999     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26000   fi
26001 
26002 
26003   windows_path="$new_path"
26004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26005     unix_path=`$CYGPATH -u "$windows_path"`
26006     new_path="$unix_path"
26007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26009     new_path="$unix_path"
26010   fi
26011 
26012   if test "x$path" != "x$new_path"; then
26013     BOOT_JDK="$new_path"
26014     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26015 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26016   fi
26017 
26018   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26019   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26020 
26021     else
26022       # We're on a unix platform. Hooray! :)
26023       path="$BOOT_JDK"
26024       has_space=`$ECHO "$path" | $GREP " "`
26025       if test "x$has_space" != x; then
26026         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26027 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26028         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26029       fi
26030 
26031       # Use eval to expand a potential ~
26032       eval path="$path"
26033       if test ! -f "$path" && test ! -d "$path"; then
26034         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26035       fi
26036 
26037       if test -d "$path"; then
26038         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26039       else
26040         dir="`$DIRNAME "$path"`"
26041         base="`$BASENAME "$path"`"
26042         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26043       fi
26044     fi
26045   fi
26046 
26047             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26048 $as_echo_n "checking for Boot JDK... " >&6; }
26049             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26050 $as_echo "$BOOT_JDK" >&6; }
26051             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26052 $as_echo_n "checking Boot JDK version... " >&6; }
26053             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26054             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26055 $as_echo "$BOOT_JDK_VERSION" >&6; }
26056           fi # end check jdk version
26057         fi # end check javac
26058       fi # end check java
26059     fi # end check boot jdk found
26060   fi
26061 
26062     # If that did not work out (e.g. too old), try explicit versions instead
26063 
26064   if test "x$BOOT_JDK_FOUND" = xno; then
26065     # Now execute the test
26066 
26067   if test -x /usr/libexec/java_home; then
26068     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
26069     BOOT_JDK_FOUND=maybe
26070     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
26071 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
26072   fi
26073 
26074 
26075     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26076     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26077       # Do we have a bin/java?
26078       if test ! -x "$BOOT_JDK/bin/java"; then
26079         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26081         BOOT_JDK_FOUND=no
26082       else
26083         # Do we have a bin/javac?
26084         if test ! -x "$BOOT_JDK/bin/javac"; then
26085           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26087           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26088 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26089           BOOT_JDK_FOUND=no
26090         else
26091           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26092           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26093 
26094           # Extra M4 quote needed to protect [] in grep expression.
26095           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26096           if test "x$FOUND_CORRECT_VERSION" = x; then
26097             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26098 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26099             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26100 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26101             BOOT_JDK_FOUND=no
26102           else
26103             # We're done! :-)
26104             BOOT_JDK_FOUND=yes
26105 
26106   # Only process if variable expands to non-empty
26107 
26108   if test "x$BOOT_JDK" != x; then
26109     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26110 
26111   # Input might be given as Windows format, start by converting to
26112   # unix format.
26113   path="$BOOT_JDK"
26114   new_path=`$CYGPATH -u "$path"`
26115 
26116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26119   # "foo.exe" is OK but "foo" is an error.
26120   #
26121   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26122   # It is also a way to make sure we got the proper file name for the real test later on.
26123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26124   if test "x$test_shortpath" = x; then
26125     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26126 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26127     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26128   fi
26129 
26130   # Call helper function which possibly converts this using DOS-style short mode.
26131   # If so, the updated path is stored in $new_path.
26132 
26133   input_path="$new_path"
26134   # Check if we need to convert this using DOS-style short mode. If the path
26135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26136   # take no chances and rewrite it.
26137   # Note: m4 eats our [], so we need to use [ and ] instead.
26138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26139   if test "x$has_forbidden_chars" != x; then
26140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26144       # Going to short mode and back again did indeed matter. Since short mode is
26145       # case insensitive, let's make it lowercase to improve readability.
26146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26147       # Now convert it back to Unix-style (cygpath)
26148       input_path=`$CYGPATH -u "$shortmode_path"`
26149       new_path="$input_path"
26150     fi
26151   fi
26152 
26153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26154   if test "x$test_cygdrive_prefix" = x; then
26155     # As a simple fix, exclude /usr/bin since it's not a real path.
26156     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26158       # a path prefixed by /cygdrive for fixpath to work.
26159       new_path="$CYGWIN_ROOT_PATH$input_path"
26160     fi
26161   fi
26162 
26163 
26164   if test "x$path" != "x$new_path"; then
26165     BOOT_JDK="$new_path"
26166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26167 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26168   fi
26169 
26170     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26171 
26172   path="$BOOT_JDK"
26173   has_colon=`$ECHO $path | $GREP ^.:`
26174   new_path="$path"
26175   if test "x$has_colon" = x; then
26176     # Not in mixed or Windows style, start by that.
26177     new_path=`cmd //c echo $path`
26178   fi
26179 
26180 
26181   input_path="$new_path"
26182   # Check if we need to convert this using DOS-style short mode. If the path
26183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26184   # take no chances and rewrite it.
26185   # Note: m4 eats our [], so we need to use [ and ] instead.
26186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26187   if test "x$has_forbidden_chars" != x; then
26188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26190   fi
26191 
26192 
26193   windows_path="$new_path"
26194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26195     unix_path=`$CYGPATH -u "$windows_path"`
26196     new_path="$unix_path"
26197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26199     new_path="$unix_path"
26200   fi
26201 
26202   if test "x$path" != "x$new_path"; then
26203     BOOT_JDK="$new_path"
26204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26205 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26206   fi
26207 
26208   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26209   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26210 
26211     else
26212       # We're on a unix platform. Hooray! :)
26213       path="$BOOT_JDK"
26214       has_space=`$ECHO "$path" | $GREP " "`
26215       if test "x$has_space" != x; then
26216         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26218         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26219       fi
26220 
26221       # Use eval to expand a potential ~
26222       eval path="$path"
26223       if test ! -f "$path" && test ! -d "$path"; then
26224         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26225       fi
26226 
26227       if test -d "$path"; then
26228         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26229       else
26230         dir="`$DIRNAME "$path"`"
26231         base="`$BASENAME "$path"`"
26232         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26233       fi
26234     fi
26235   fi
26236 
26237             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26238 $as_echo_n "checking for Boot JDK... " >&6; }
26239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26240 $as_echo "$BOOT_JDK" >&6; }
26241             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26242 $as_echo_n "checking Boot JDK version... " >&6; }
26243             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26244             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26245 $as_echo "$BOOT_JDK_VERSION" >&6; }
26246           fi # end check jdk version
26247         fi # end check javac
26248       fi # end check java
26249     fi # end check boot jdk found
26250   fi
26251 
26252 
26253   if test "x$BOOT_JDK_FOUND" = xno; then
26254     # Now execute the test
26255 
26256   if test -x /usr/libexec/java_home; then
26257     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26258     BOOT_JDK_FOUND=maybe
26259     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26260 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26261   fi
26262 
26263 
26264     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26265     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26266       # Do we have a bin/java?
26267       if test ! -x "$BOOT_JDK/bin/java"; then
26268         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26269 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26270         BOOT_JDK_FOUND=no
26271       else
26272         # Do we have a bin/javac?
26273         if test ! -x "$BOOT_JDK/bin/javac"; then
26274           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26276           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26277 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26278           BOOT_JDK_FOUND=no
26279         else
26280           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26281           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26282 
26283           # Extra M4 quote needed to protect [] in grep expression.
26284           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26285           if test "x$FOUND_CORRECT_VERSION" = x; then
26286             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26287 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26288             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26289 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26290             BOOT_JDK_FOUND=no
26291           else
26292             # We're done! :-)
26293             BOOT_JDK_FOUND=yes
26294 
26295   # Only process if variable expands to non-empty
26296 
26297   if test "x$BOOT_JDK" != x; then
26298     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26299 
26300   # Input might be given as Windows format, start by converting to
26301   # unix format.
26302   path="$BOOT_JDK"
26303   new_path=`$CYGPATH -u "$path"`
26304 
26305   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26306   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26307   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26308   # "foo.exe" is OK but "foo" is an error.
26309   #
26310   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26311   # It is also a way to make sure we got the proper file name for the real test later on.
26312   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26313   if test "x$test_shortpath" = x; then
26314     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26315 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26316     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26317   fi
26318 
26319   # Call helper function which possibly converts this using DOS-style short mode.
26320   # If so, the updated path is stored in $new_path.
26321 
26322   input_path="$new_path"
26323   # Check if we need to convert this using DOS-style short mode. If the path
26324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26325   # take no chances and rewrite it.
26326   # Note: m4 eats our [], so we need to use [ and ] instead.
26327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26328   if test "x$has_forbidden_chars" != x; then
26329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26330     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26331     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26332     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26333       # Going to short mode and back again did indeed matter. Since short mode is
26334       # case insensitive, let's make it lowercase to improve readability.
26335       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26336       # Now convert it back to Unix-style (cygpath)
26337       input_path=`$CYGPATH -u "$shortmode_path"`
26338       new_path="$input_path"
26339     fi
26340   fi
26341 
26342   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26343   if test "x$test_cygdrive_prefix" = x; then
26344     # As a simple fix, exclude /usr/bin since it's not a real path.
26345     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26346       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26347       # a path prefixed by /cygdrive for fixpath to work.
26348       new_path="$CYGWIN_ROOT_PATH$input_path"
26349     fi
26350   fi
26351 
26352 
26353   if test "x$path" != "x$new_path"; then
26354     BOOT_JDK="$new_path"
26355     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26356 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26357   fi
26358 
26359     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26360 
26361   path="$BOOT_JDK"
26362   has_colon=`$ECHO $path | $GREP ^.:`
26363   new_path="$path"
26364   if test "x$has_colon" = x; then
26365     # Not in mixed or Windows style, start by that.
26366     new_path=`cmd //c echo $path`
26367   fi
26368 
26369 
26370   input_path="$new_path"
26371   # Check if we need to convert this using DOS-style short mode. If the path
26372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26373   # take no chances and rewrite it.
26374   # Note: m4 eats our [], so we need to use [ and ] instead.
26375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26376   if test "x$has_forbidden_chars" != x; then
26377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26378     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26379   fi
26380 
26381 
26382   windows_path="$new_path"
26383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26384     unix_path=`$CYGPATH -u "$windows_path"`
26385     new_path="$unix_path"
26386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26388     new_path="$unix_path"
26389   fi
26390 
26391   if test "x$path" != "x$new_path"; then
26392     BOOT_JDK="$new_path"
26393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26394 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26395   fi
26396 
26397   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26398   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26399 
26400     else
26401       # We're on a unix platform. Hooray! :)
26402       path="$BOOT_JDK"
26403       has_space=`$ECHO "$path" | $GREP " "`
26404       if test "x$has_space" != x; then
26405         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26406 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26407         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26408       fi
26409 
26410       # Use eval to expand a potential ~
26411       eval path="$path"
26412       if test ! -f "$path" && test ! -d "$path"; then
26413         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26414       fi
26415 
26416       if test -d "$path"; then
26417         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26418       else
26419         dir="`$DIRNAME "$path"`"
26420         base="`$BASENAME "$path"`"
26421         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26422       fi
26423     fi
26424   fi
26425 
26426             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26427 $as_echo_n "checking for Boot JDK... " >&6; }
26428             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26429 $as_echo "$BOOT_JDK" >&6; }
26430             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26431 $as_echo_n "checking Boot JDK version... " >&6; }
26432             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26433             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26434 $as_echo "$BOOT_JDK_VERSION" >&6; }
26435           fi # end check jdk version
26436         fi # end check javac
26437       fi # end check java
26438     fi # end check boot jdk found
26439   fi
26440 
26441 
26442   if test "x$BOOT_JDK_FOUND" = xno; then
26443     # Now execute the test
26444 
26445   if test -x /usr/libexec/java_home; then
26446     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26447     BOOT_JDK_FOUND=maybe
26448     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26449 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26450   fi
26451 
26452 
26453     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26454     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26455       # Do we have a bin/java?
26456       if test ! -x "$BOOT_JDK/bin/java"; then
26457         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26458 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26459         BOOT_JDK_FOUND=no
26460       else
26461         # Do we have a bin/javac?
26462         if test ! -x "$BOOT_JDK/bin/javac"; then
26463           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26465           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26466 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26467           BOOT_JDK_FOUND=no
26468         else
26469           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26470           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26471 
26472           # Extra M4 quote needed to protect [] in grep expression.
26473           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26474           if test "x$FOUND_CORRECT_VERSION" = x; then
26475             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26477             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26478 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26479             BOOT_JDK_FOUND=no
26480           else
26481             # We're done! :-)
26482             BOOT_JDK_FOUND=yes
26483 
26484   # Only process if variable expands to non-empty
26485 
26486   if test "x$BOOT_JDK" != x; then
26487     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488 
26489   # Input might be given as Windows format, start by converting to
26490   # unix format.
26491   path="$BOOT_JDK"
26492   new_path=`$CYGPATH -u "$path"`
26493 
26494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26497   # "foo.exe" is OK but "foo" is an error.
26498   #
26499   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26500   # It is also a way to make sure we got the proper file name for the real test later on.
26501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26502   if test "x$test_shortpath" = x; then
26503     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26504 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26505     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26506   fi
26507 
26508   # Call helper function which possibly converts this using DOS-style short mode.
26509   # If so, the updated path is stored in $new_path.
26510 
26511   input_path="$new_path"
26512   # Check if we need to convert this using DOS-style short mode. If the path
26513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26514   # take no chances and rewrite it.
26515   # Note: m4 eats our [], so we need to use [ and ] instead.
26516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26517   if test "x$has_forbidden_chars" != x; then
26518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26519     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26520     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26521     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26522       # Going to short mode and back again did indeed matter. Since short mode is
26523       # case insensitive, let's make it lowercase to improve readability.
26524       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26525       # Now convert it back to Unix-style (cygpath)
26526       input_path=`$CYGPATH -u "$shortmode_path"`
26527       new_path="$input_path"
26528     fi
26529   fi
26530 
26531   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26532   if test "x$test_cygdrive_prefix" = x; then
26533     # As a simple fix, exclude /usr/bin since it's not a real path.
26534     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26535       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26536       # a path prefixed by /cygdrive for fixpath to work.
26537       new_path="$CYGWIN_ROOT_PATH$input_path"
26538     fi
26539   fi
26540 
26541 
26542   if test "x$path" != "x$new_path"; then
26543     BOOT_JDK="$new_path"
26544     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26545 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26546   fi
26547 
26548     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26549 
26550   path="$BOOT_JDK"
26551   has_colon=`$ECHO $path | $GREP ^.:`
26552   new_path="$path"
26553   if test "x$has_colon" = x; then
26554     # Not in mixed or Windows style, start by that.
26555     new_path=`cmd //c echo $path`
26556   fi
26557 
26558 
26559   input_path="$new_path"
26560   # Check if we need to convert this using DOS-style short mode. If the path
26561   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26562   # take no chances and rewrite it.
26563   # Note: m4 eats our [], so we need to use [ and ] instead.
26564   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26565   if test "x$has_forbidden_chars" != x; then
26566     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26567     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26568   fi
26569 
26570 
26571   windows_path="$new_path"
26572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26573     unix_path=`$CYGPATH -u "$windows_path"`
26574     new_path="$unix_path"
26575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26577     new_path="$unix_path"
26578   fi
26579 
26580   if test "x$path" != "x$new_path"; then
26581     BOOT_JDK="$new_path"
26582     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26583 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26584   fi
26585 
26586   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26587   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26588 
26589     else
26590       # We're on a unix platform. Hooray! :)
26591       path="$BOOT_JDK"
26592       has_space=`$ECHO "$path" | $GREP " "`
26593       if test "x$has_space" != x; then
26594         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26595 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26596         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26597       fi
26598 
26599       # Use eval to expand a potential ~
26600       eval path="$path"
26601       if test ! -f "$path" && test ! -d "$path"; then
26602         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26603       fi
26604 
26605       if test -d "$path"; then
26606         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26607       else
26608         dir="`$DIRNAME "$path"`"
26609         base="`$BASENAME "$path"`"
26610         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26611       fi
26612     fi
26613   fi
26614 
26615             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26616 $as_echo_n "checking for Boot JDK... " >&6; }
26617             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26618 $as_echo "$BOOT_JDK" >&6; }
26619             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26620 $as_echo_n "checking Boot JDK version... " >&6; }
26621             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26622             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26623 $as_echo "$BOOT_JDK_VERSION" >&6; }
26624           fi # end check jdk version
26625         fi # end check javac
26626       fi # end check java
26627     fi # end check boot jdk found
26628   fi
26629 
26630   fi
26631 
26632 
26633     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26634     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26635       # Do we have a bin/java?
26636       if test ! -x "$BOOT_JDK/bin/java"; then
26637         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26639         BOOT_JDK_FOUND=no
26640       else
26641         # Do we have a bin/javac?
26642         if test ! -x "$BOOT_JDK/bin/javac"; then
26643           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26644 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26645           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26646 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26647           BOOT_JDK_FOUND=no
26648         else
26649           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26650           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26651 
26652           # Extra M4 quote needed to protect [] in grep expression.
26653           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26654           if test "x$FOUND_CORRECT_VERSION" = x; then
26655             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26656 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26657             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26658 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26659             BOOT_JDK_FOUND=no
26660           else
26661             # We're done! :-)
26662             BOOT_JDK_FOUND=yes
26663 
26664   # Only process if variable expands to non-empty
26665 
26666   if test "x$BOOT_JDK" != x; then
26667     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26668 
26669   # Input might be given as Windows format, start by converting to
26670   # unix format.
26671   path="$BOOT_JDK"
26672   new_path=`$CYGPATH -u "$path"`
26673 
26674   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26675   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26676   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26677   # "foo.exe" is OK but "foo" is an error.
26678   #
26679   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26680   # It is also a way to make sure we got the proper file name for the real test later on.
26681   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26682   if test "x$test_shortpath" = x; then
26683     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26684 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26685     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26686   fi
26687 
26688   # Call helper function which possibly converts this using DOS-style short mode.
26689   # If so, the updated path is stored in $new_path.
26690 
26691   input_path="$new_path"
26692   # Check if we need to convert this using DOS-style short mode. If the path
26693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26694   # take no chances and rewrite it.
26695   # Note: m4 eats our [], so we need to use [ and ] instead.
26696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26697   if test "x$has_forbidden_chars" != x; then
26698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26699     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26700     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26701     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26702       # Going to short mode and back again did indeed matter. Since short mode is
26703       # case insensitive, let's make it lowercase to improve readability.
26704       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26705       # Now convert it back to Unix-style (cygpath)
26706       input_path=`$CYGPATH -u "$shortmode_path"`
26707       new_path="$input_path"
26708     fi
26709   fi
26710 
26711   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26712   if test "x$test_cygdrive_prefix" = x; then
26713     # As a simple fix, exclude /usr/bin since it's not a real path.
26714     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26715       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26716       # a path prefixed by /cygdrive for fixpath to work.
26717       new_path="$CYGWIN_ROOT_PATH$input_path"
26718     fi
26719   fi
26720 
26721 
26722   if test "x$path" != "x$new_path"; then
26723     BOOT_JDK="$new_path"
26724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26725 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26726   fi
26727 
26728     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26729 
26730   path="$BOOT_JDK"
26731   has_colon=`$ECHO $path | $GREP ^.:`
26732   new_path="$path"
26733   if test "x$has_colon" = x; then
26734     # Not in mixed or Windows style, start by that.
26735     new_path=`cmd //c echo $path`
26736   fi
26737 
26738 
26739   input_path="$new_path"
26740   # Check if we need to convert this using DOS-style short mode. If the path
26741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26742   # take no chances and rewrite it.
26743   # Note: m4 eats our [], so we need to use [ and ] instead.
26744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26745   if test "x$has_forbidden_chars" != x; then
26746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26747     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26748   fi
26749 
26750 
26751   windows_path="$new_path"
26752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26753     unix_path=`$CYGPATH -u "$windows_path"`
26754     new_path="$unix_path"
26755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26757     new_path="$unix_path"
26758   fi
26759 
26760   if test "x$path" != "x$new_path"; then
26761     BOOT_JDK="$new_path"
26762     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26763 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26764   fi
26765 
26766   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26767   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26768 
26769     else
26770       # We're on a unix platform. Hooray! :)
26771       path="$BOOT_JDK"
26772       has_space=`$ECHO "$path" | $GREP " "`
26773       if test "x$has_space" != x; then
26774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26775 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26776         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26777       fi
26778 
26779       # Use eval to expand a potential ~
26780       eval path="$path"
26781       if test ! -f "$path" && test ! -d "$path"; then
26782         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26783       fi
26784 
26785       if test -d "$path"; then
26786         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26787       else
26788         dir="`$DIRNAME "$path"`"
26789         base="`$BASENAME "$path"`"
26790         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26791       fi
26792     fi
26793   fi
26794 
26795             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26796 $as_echo_n "checking for Boot JDK... " >&6; }
26797             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26798 $as_echo "$BOOT_JDK" >&6; }
26799             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26800 $as_echo_n "checking Boot JDK version... " >&6; }
26801             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26802             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26803 $as_echo "$BOOT_JDK_VERSION" >&6; }
26804           fi # end check jdk version
26805         fi # end check javac
26806       fi # end check java
26807     fi # end check boot jdk found
26808   fi
26809 
26810 
26811   # Test: Is $JAVA_HOME set?
26812 
26813   if test "x$BOOT_JDK_FOUND" = xno; then
26814     # Now execute the test
26815 
26816   if test "x$JAVA_HOME" != x; then
26817     JAVA_HOME_PROCESSED="$JAVA_HOME"
26818 
26819   # Only process if variable expands to non-empty
26820 
26821   if test "x$JAVA_HOME_PROCESSED" != x; then
26822     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26823 
26824   # Input might be given as Windows format, start by converting to
26825   # unix format.
26826   path="$JAVA_HOME_PROCESSED"
26827   new_path=`$CYGPATH -u "$path"`
26828 
26829   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26830   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26831   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26832   # "foo.exe" is OK but "foo" is an error.
26833   #
26834   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26835   # It is also a way to make sure we got the proper file name for the real test later on.
26836   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26837   if test "x$test_shortpath" = x; then
26838     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26839 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26840     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26841   fi
26842 
26843   # Call helper function which possibly converts this using DOS-style short mode.
26844   # If so, the updated path is stored in $new_path.
26845 
26846   input_path="$new_path"
26847   # Check if we need to convert this using DOS-style short mode. If the path
26848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26849   # take no chances and rewrite it.
26850   # Note: m4 eats our [], so we need to use [ and ] instead.
26851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26852   if test "x$has_forbidden_chars" != x; then
26853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26854     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26855     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26856     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26857       # Going to short mode and back again did indeed matter. Since short mode is
26858       # case insensitive, let's make it lowercase to improve readability.
26859       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26860       # Now convert it back to Unix-style (cygpath)
26861       input_path=`$CYGPATH -u "$shortmode_path"`
26862       new_path="$input_path"
26863     fi
26864   fi
26865 
26866   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26867   if test "x$test_cygdrive_prefix" = x; then
26868     # As a simple fix, exclude /usr/bin since it's not a real path.
26869     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26870       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26871       # a path prefixed by /cygdrive for fixpath to work.
26872       new_path="$CYGWIN_ROOT_PATH$input_path"
26873     fi
26874   fi
26875 
26876 
26877   if test "x$path" != "x$new_path"; then
26878     JAVA_HOME_PROCESSED="$new_path"
26879     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26880 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26881   fi
26882 
26883     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26884 
26885   path="$JAVA_HOME_PROCESSED"
26886   has_colon=`$ECHO $path | $GREP ^.:`
26887   new_path="$path"
26888   if test "x$has_colon" = x; then
26889     # Not in mixed or Windows style, start by that.
26890     new_path=`cmd //c echo $path`
26891   fi
26892 
26893 
26894   input_path="$new_path"
26895   # Check if we need to convert this using DOS-style short mode. If the path
26896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26897   # take no chances and rewrite it.
26898   # Note: m4 eats our [], so we need to use [ and ] instead.
26899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26900   if test "x$has_forbidden_chars" != x; then
26901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26902     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26903   fi
26904 
26905 
26906   windows_path="$new_path"
26907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26908     unix_path=`$CYGPATH -u "$windows_path"`
26909     new_path="$unix_path"
26910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26912     new_path="$unix_path"
26913   fi
26914 
26915   if test "x$path" != "x$new_path"; then
26916     JAVA_HOME_PROCESSED="$new_path"
26917     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26918 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26919   fi
26920 
26921   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26922   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26923 
26924     else
26925       # We're on a unix platform. Hooray! :)
26926       path="$JAVA_HOME_PROCESSED"
26927       has_space=`$ECHO "$path" | $GREP " "`
26928       if test "x$has_space" != x; then
26929         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26930 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26931         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26932       fi
26933 
26934       # Use eval to expand a potential ~
26935       eval path="$path"
26936       if test ! -f "$path" && test ! -d "$path"; then
26937         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26938       fi
26939 
26940       if test -d "$path"; then
26941         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26942       else
26943         dir="`$DIRNAME "$path"`"
26944         base="`$BASENAME "$path"`"
26945         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26946       fi
26947     fi
26948   fi
26949 
26950     if test ! -d "$JAVA_HOME_PROCESSED"; then
26951       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26952 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26953     else
26954       # Aha, the user has set a JAVA_HOME
26955       # let us use that as the Boot JDK.
26956       BOOT_JDK="$JAVA_HOME_PROCESSED"
26957       BOOT_JDK_FOUND=maybe
26958       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26959 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26960     fi
26961   fi
26962 
26963 
26964     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26965     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26966       # Do we have a bin/java?
26967       if test ! -x "$BOOT_JDK/bin/java"; then
26968         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26969 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26970         BOOT_JDK_FOUND=no
26971       else
26972         # Do we have a bin/javac?
26973         if test ! -x "$BOOT_JDK/bin/javac"; then
26974           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26975 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26976           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26977 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26978           BOOT_JDK_FOUND=no
26979         else
26980           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26981           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26982 
26983           # Extra M4 quote needed to protect [] in grep expression.
26984           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26985           if test "x$FOUND_CORRECT_VERSION" = x; then
26986             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26987 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26988             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26989 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26990             BOOT_JDK_FOUND=no
26991           else
26992             # We're done! :-)
26993             BOOT_JDK_FOUND=yes
26994 
26995   # Only process if variable expands to non-empty
26996 
26997   if test "x$BOOT_JDK" != x; then
26998     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26999 
27000   # Input might be given as Windows format, start by converting to
27001   # unix format.
27002   path="$BOOT_JDK"
27003   new_path=`$CYGPATH -u "$path"`
27004 
27005   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27006   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27007   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27008   # "foo.exe" is OK but "foo" is an error.
27009   #
27010   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27011   # It is also a way to make sure we got the proper file name for the real test later on.
27012   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27013   if test "x$test_shortpath" = x; then
27014     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27015 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27016     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27017   fi
27018 
27019   # Call helper function which possibly converts this using DOS-style short mode.
27020   # If so, the updated path is stored in $new_path.
27021 
27022   input_path="$new_path"
27023   # Check if we need to convert this using DOS-style short mode. If the path
27024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27025   # take no chances and rewrite it.
27026   # Note: m4 eats our [], so we need to use [ and ] instead.
27027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27028   if test "x$has_forbidden_chars" != x; then
27029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27030     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27031     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27032     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27033       # Going to short mode and back again did indeed matter. Since short mode is
27034       # case insensitive, let's make it lowercase to improve readability.
27035       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27036       # Now convert it back to Unix-style (cygpath)
27037       input_path=`$CYGPATH -u "$shortmode_path"`
27038       new_path="$input_path"
27039     fi
27040   fi
27041 
27042   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27043   if test "x$test_cygdrive_prefix" = x; then
27044     # As a simple fix, exclude /usr/bin since it's not a real path.
27045     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27046       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27047       # a path prefixed by /cygdrive for fixpath to work.
27048       new_path="$CYGWIN_ROOT_PATH$input_path"
27049     fi
27050   fi
27051 
27052 
27053   if test "x$path" != "x$new_path"; then
27054     BOOT_JDK="$new_path"
27055     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27056 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27057   fi
27058 
27059     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060 
27061   path="$BOOT_JDK"
27062   has_colon=`$ECHO $path | $GREP ^.:`
27063   new_path="$path"
27064   if test "x$has_colon" = x; then
27065     # Not in mixed or Windows style, start by that.
27066     new_path=`cmd //c echo $path`
27067   fi
27068 
27069 
27070   input_path="$new_path"
27071   # Check if we need to convert this using DOS-style short mode. If the path
27072   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27073   # take no chances and rewrite it.
27074   # Note: m4 eats our [], so we need to use [ and ] instead.
27075   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27076   if test "x$has_forbidden_chars" != x; then
27077     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27078     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27079   fi
27080 
27081 
27082   windows_path="$new_path"
27083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27084     unix_path=`$CYGPATH -u "$windows_path"`
27085     new_path="$unix_path"
27086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27088     new_path="$unix_path"
27089   fi
27090 
27091   if test "x$path" != "x$new_path"; then
27092     BOOT_JDK="$new_path"
27093     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27094 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27095   fi
27096 
27097   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27098   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27099 
27100     else
27101       # We're on a unix platform. Hooray! :)
27102       path="$BOOT_JDK"
27103       has_space=`$ECHO "$path" | $GREP " "`
27104       if test "x$has_space" != x; then
27105         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27106 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27107         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27108       fi
27109 
27110       # Use eval to expand a potential ~
27111       eval path="$path"
27112       if test ! -f "$path" && test ! -d "$path"; then
27113         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27114       fi
27115 
27116       if test -d "$path"; then
27117         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27118       else
27119         dir="`$DIRNAME "$path"`"
27120         base="`$BASENAME "$path"`"
27121         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27122       fi
27123     fi
27124   fi
27125 
27126             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27127 $as_echo_n "checking for Boot JDK... " >&6; }
27128             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27129 $as_echo "$BOOT_JDK" >&6; }
27130             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27131 $as_echo_n "checking Boot JDK version... " >&6; }
27132             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27133             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27134 $as_echo "$BOOT_JDK_VERSION" >&6; }
27135           fi # end check jdk version
27136         fi # end check javac
27137       fi # end check java
27138     fi # end check boot jdk found
27139   fi
27140 
27141 
27142   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27143 
27144   if test "x$BOOT_JDK_FOUND" = xno; then
27145     # Now execute the test
27146 
27147   # Extract the first word of "javac", so it can be a program name with args.
27148 set dummy javac; ac_word=$2
27149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27150 $as_echo_n "checking for $ac_word... " >&6; }
27151 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27152   $as_echo_n "(cached) " >&6
27153 else
27154   case $JAVAC_CHECK in
27155   [\\/]* | ?:[\\/]*)
27156   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27157   ;;
27158   *)
27159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27160 for as_dir in $PATH
27161 do
27162   IFS=$as_save_IFS
27163   test -z "$as_dir" && as_dir=.
27164     for ac_exec_ext in '' $ac_executable_extensions; do
27165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27166     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27168     break 2
27169   fi
27170 done
27171   done
27172 IFS=$as_save_IFS
27173 
27174   ;;
27175 esac
27176 fi
27177 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27178 if test -n "$JAVAC_CHECK"; then
27179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27180 $as_echo "$JAVAC_CHECK" >&6; }
27181 else
27182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27183 $as_echo "no" >&6; }
27184 fi
27185 
27186 
27187   # Extract the first word of "java", so it can be a program name with args.
27188 set dummy java; ac_word=$2
27189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27190 $as_echo_n "checking for $ac_word... " >&6; }
27191 if ${ac_cv_path_JAVA_CHECK+:} false; then :
27192   $as_echo_n "(cached) " >&6
27193 else
27194   case $JAVA_CHECK in
27195   [\\/]* | ?:[\\/]*)
27196   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27197   ;;
27198   *)
27199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27200 for as_dir in $PATH
27201 do
27202   IFS=$as_save_IFS
27203   test -z "$as_dir" && as_dir=.
27204     for ac_exec_ext in '' $ac_executable_extensions; do
27205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27206     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27208     break 2
27209   fi
27210 done
27211   done
27212 IFS=$as_save_IFS
27213 
27214   ;;
27215 esac
27216 fi
27217 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27218 if test -n "$JAVA_CHECK"; then
27219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27220 $as_echo "$JAVA_CHECK" >&6; }
27221 else
27222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27223 $as_echo "no" >&6; }
27224 fi
27225 
27226 
27227   BINARY="$JAVAC_CHECK"
27228   if test "x$JAVAC_CHECK" = x; then
27229     BINARY="$JAVA_CHECK"
27230   fi
27231   if test "x$BINARY" != x; then
27232     # So there is a java(c) binary, it might be part of a JDK.
27233     # Lets find the JDK/JRE directory by following symbolic links.
27234     # Linux/GNU systems often have links from /usr/bin/java to
27235     # /etc/alternatives/java to the real JDK binary.
27236 
27237   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27238     # Follow a chain of symbolic links. Use readlink
27239     # where it exists, else fall back to horribly
27240     # complicated shell code.
27241     if test "x$READLINK_TESTED" != yes; then
27242       # On MacOSX there is a readlink tool with a different
27243       # purpose than the GNU readlink tool. Check the found readlink.
27244       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27245       if test "x$ISGNU" = x; then
27246         # A readlink that we do not know how to use.
27247         # Are there other non-GNU readlinks out there?
27248         READLINK_TESTED=yes
27249         READLINK=
27250       fi
27251     fi
27252 
27253     if test "x$READLINK" != x; then
27254       BINARY=`$READLINK -f $BINARY`
27255     else
27256       # Save the current directory for restoring afterwards
27257       STARTDIR=$PWD
27258       COUNTER=0
27259       sym_link_dir=`$DIRNAME $BINARY`
27260       sym_link_file=`$BASENAME $BINARY`
27261       cd $sym_link_dir
27262       # Use -P flag to resolve symlinks in directories.
27263       cd `$THEPWDCMD -P`
27264       sym_link_dir=`$THEPWDCMD -P`
27265       # Resolve file symlinks
27266       while test $COUNTER -lt 20; do
27267         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27268         if test "x$ISLINK" == x; then
27269           # This is not a symbolic link! We are done!
27270           break
27271         fi
27272         # Again resolve directory symlinks since the target of the just found
27273         # link could be in a different directory
27274         cd `$DIRNAME $ISLINK`
27275         sym_link_dir=`$THEPWDCMD -P`
27276         sym_link_file=`$BASENAME $ISLINK`
27277         let COUNTER=COUNTER+1
27278       done
27279       cd $STARTDIR
27280       BINARY=$sym_link_dir/$sym_link_file
27281     fi
27282   fi
27283 
27284     BOOT_JDK=`dirname "$BINARY"`
27285     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27286     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27287       # Looks like we found ourselves an JDK
27288       BOOT_JDK_FOUND=maybe
27289       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27290 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27291     fi
27292   fi
27293 
27294 
27295     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27296     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27297       # Do we have a bin/java?
27298       if test ! -x "$BOOT_JDK/bin/java"; then
27299         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27301         BOOT_JDK_FOUND=no
27302       else
27303         # Do we have a bin/javac?
27304         if test ! -x "$BOOT_JDK/bin/javac"; then
27305           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27306 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27307           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27308 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27309           BOOT_JDK_FOUND=no
27310         else
27311           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27312           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27313 
27314           # Extra M4 quote needed to protect [] in grep expression.
27315           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27316           if test "x$FOUND_CORRECT_VERSION" = x; then
27317             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27319             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27320 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27321             BOOT_JDK_FOUND=no
27322           else
27323             # We're done! :-)
27324             BOOT_JDK_FOUND=yes
27325 
27326   # Only process if variable expands to non-empty
27327 
27328   if test "x$BOOT_JDK" != x; then
27329     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27330 
27331   # Input might be given as Windows format, start by converting to
27332   # unix format.
27333   path="$BOOT_JDK"
27334   new_path=`$CYGPATH -u "$path"`
27335 
27336   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27337   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27338   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27339   # "foo.exe" is OK but "foo" is an error.
27340   #
27341   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27342   # It is also a way to make sure we got the proper file name for the real test later on.
27343   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27344   if test "x$test_shortpath" = x; then
27345     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27346 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27347     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27348   fi
27349 
27350   # Call helper function which possibly converts this using DOS-style short mode.
27351   # If so, the updated path is stored in $new_path.
27352 
27353   input_path="$new_path"
27354   # Check if we need to convert this using DOS-style short mode. If the path
27355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27356   # take no chances and rewrite it.
27357   # Note: m4 eats our [], so we need to use [ and ] instead.
27358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27359   if test "x$has_forbidden_chars" != x; then
27360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27361     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27362     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27363     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27364       # Going to short mode and back again did indeed matter. Since short mode is
27365       # case insensitive, let's make it lowercase to improve readability.
27366       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27367       # Now convert it back to Unix-style (cygpath)
27368       input_path=`$CYGPATH -u "$shortmode_path"`
27369       new_path="$input_path"
27370     fi
27371   fi
27372 
27373   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27374   if test "x$test_cygdrive_prefix" = x; then
27375     # As a simple fix, exclude /usr/bin since it's not a real path.
27376     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27377       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27378       # a path prefixed by /cygdrive for fixpath to work.
27379       new_path="$CYGWIN_ROOT_PATH$input_path"
27380     fi
27381   fi
27382 
27383 
27384   if test "x$path" != "x$new_path"; then
27385     BOOT_JDK="$new_path"
27386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27387 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27388   fi
27389 
27390     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27391 
27392   path="$BOOT_JDK"
27393   has_colon=`$ECHO $path | $GREP ^.:`
27394   new_path="$path"
27395   if test "x$has_colon" = x; then
27396     # Not in mixed or Windows style, start by that.
27397     new_path=`cmd //c echo $path`
27398   fi
27399 
27400 
27401   input_path="$new_path"
27402   # Check if we need to convert this using DOS-style short mode. If the path
27403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27404   # take no chances and rewrite it.
27405   # Note: m4 eats our [], so we need to use [ and ] instead.
27406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27407   if test "x$has_forbidden_chars" != x; then
27408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27410   fi
27411 
27412 
27413   windows_path="$new_path"
27414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27415     unix_path=`$CYGPATH -u "$windows_path"`
27416     new_path="$unix_path"
27417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27418     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27419     new_path="$unix_path"
27420   fi
27421 
27422   if test "x$path" != "x$new_path"; then
27423     BOOT_JDK="$new_path"
27424     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27425 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27426   fi
27427 
27428   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27429   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27430 
27431     else
27432       # We're on a unix platform. Hooray! :)
27433       path="$BOOT_JDK"
27434       has_space=`$ECHO "$path" | $GREP " "`
27435       if test "x$has_space" != x; then
27436         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27437 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27438         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27439       fi
27440 
27441       # Use eval to expand a potential ~
27442       eval path="$path"
27443       if test ! -f "$path" && test ! -d "$path"; then
27444         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27445       fi
27446 
27447       if test -d "$path"; then
27448         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27449       else
27450         dir="`$DIRNAME "$path"`"
27451         base="`$BASENAME "$path"`"
27452         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27453       fi
27454     fi
27455   fi
27456 
27457             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27458 $as_echo_n "checking for Boot JDK... " >&6; }
27459             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27460 $as_echo "$BOOT_JDK" >&6; }
27461             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27462 $as_echo_n "checking Boot JDK version... " >&6; }
27463             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27464             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27465 $as_echo "$BOOT_JDK_VERSION" >&6; }
27466           fi # end check jdk version
27467         fi # end check javac
27468       fi # end check java
27469     fi # end check boot jdk found
27470   fi
27471 
27472 
27473   # Test: Is there a JDK installed in default, well-known locations?
27474 
27475   if test "x$BOOT_JDK_FOUND" = xno; then
27476     # Now execute the test
27477 
27478   if test "x$OPENJDK_TARGET_OS" = xwindows; then
27479 
27480   if test "x$BOOT_JDK_FOUND" = xno; then
27481     # Now execute the test
27482 
27483   if test "x$ProgramW6432" != x; then
27484     VIRTUAL_DIR="$ProgramW6432/Java"
27485 
27486   windows_path="$VIRTUAL_DIR"
27487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27488     unix_path=`$CYGPATH -u "$windows_path"`
27489     VIRTUAL_DIR="$unix_path"
27490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27492     VIRTUAL_DIR="$unix_path"
27493   fi
27494 
27495 
27496   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27497   BOOT_JDK_SUFFIX=""
27498   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27499   if test "x$ALL_JDKS_FOUND" != x; then
27500     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27501 
27502   if test "x$BOOT_JDK_FOUND" = xno; then
27503     # Now execute the test
27504 
27505         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27506         if test -d "$BOOT_JDK"; then
27507           BOOT_JDK_FOUND=maybe
27508           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27509 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27510         fi
27511 
27512 
27513     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27514     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27515       # Do we have a bin/java?
27516       if test ! -x "$BOOT_JDK/bin/java"; then
27517         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27518 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27519         BOOT_JDK_FOUND=no
27520       else
27521         # Do we have a bin/javac?
27522         if test ! -x "$BOOT_JDK/bin/javac"; then
27523           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27524 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27525           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27526 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27527           BOOT_JDK_FOUND=no
27528         else
27529           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27530           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27531 
27532           # Extra M4 quote needed to protect [] in grep expression.
27533           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27534           if test "x$FOUND_CORRECT_VERSION" = x; then
27535             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27536 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27537             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27538 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27539             BOOT_JDK_FOUND=no
27540           else
27541             # We're done! :-)
27542             BOOT_JDK_FOUND=yes
27543 
27544   # Only process if variable expands to non-empty
27545 
27546   if test "x$BOOT_JDK" != x; then
27547     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27548 
27549   # Input might be given as Windows format, start by converting to
27550   # unix format.
27551   path="$BOOT_JDK"
27552   new_path=`$CYGPATH -u "$path"`
27553 
27554   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27555   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27556   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27557   # "foo.exe" is OK but "foo" is an error.
27558   #
27559   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27560   # It is also a way to make sure we got the proper file name for the real test later on.
27561   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27562   if test "x$test_shortpath" = x; then
27563     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27564 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27565     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27566   fi
27567 
27568   # Call helper function which possibly converts this using DOS-style short mode.
27569   # If so, the updated path is stored in $new_path.
27570 
27571   input_path="$new_path"
27572   # Check if we need to convert this using DOS-style short mode. If the path
27573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27574   # take no chances and rewrite it.
27575   # Note: m4 eats our [], so we need to use [ and ] instead.
27576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27577   if test "x$has_forbidden_chars" != x; then
27578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27579     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27580     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27581     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27582       # Going to short mode and back again did indeed matter. Since short mode is
27583       # case insensitive, let's make it lowercase to improve readability.
27584       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27585       # Now convert it back to Unix-style (cygpath)
27586       input_path=`$CYGPATH -u "$shortmode_path"`
27587       new_path="$input_path"
27588     fi
27589   fi
27590 
27591   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27592   if test "x$test_cygdrive_prefix" = x; then
27593     # As a simple fix, exclude /usr/bin since it's not a real path.
27594     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27595       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27596       # a path prefixed by /cygdrive for fixpath to work.
27597       new_path="$CYGWIN_ROOT_PATH$input_path"
27598     fi
27599   fi
27600 
27601 
27602   if test "x$path" != "x$new_path"; then
27603     BOOT_JDK="$new_path"
27604     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27605 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27606   fi
27607 
27608     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27609 
27610   path="$BOOT_JDK"
27611   has_colon=`$ECHO $path | $GREP ^.:`
27612   new_path="$path"
27613   if test "x$has_colon" = x; then
27614     # Not in mixed or Windows style, start by that.
27615     new_path=`cmd //c echo $path`
27616   fi
27617 
27618 
27619   input_path="$new_path"
27620   # Check if we need to convert this using DOS-style short mode. If the path
27621   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27622   # take no chances and rewrite it.
27623   # Note: m4 eats our [], so we need to use [ and ] instead.
27624   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27625   if test "x$has_forbidden_chars" != x; then
27626     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27627     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27628   fi
27629 
27630 
27631   windows_path="$new_path"
27632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27633     unix_path=`$CYGPATH -u "$windows_path"`
27634     new_path="$unix_path"
27635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27637     new_path="$unix_path"
27638   fi
27639 
27640   if test "x$path" != "x$new_path"; then
27641     BOOT_JDK="$new_path"
27642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27643 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27644   fi
27645 
27646   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27647   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27648 
27649     else
27650       # We're on a unix platform. Hooray! :)
27651       path="$BOOT_JDK"
27652       has_space=`$ECHO "$path" | $GREP " "`
27653       if test "x$has_space" != x; then
27654         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27655 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27656         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27657       fi
27658 
27659       # Use eval to expand a potential ~
27660       eval path="$path"
27661       if test ! -f "$path" && test ! -d "$path"; then
27662         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27663       fi
27664 
27665       if test -d "$path"; then
27666         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27667       else
27668         dir="`$DIRNAME "$path"`"
27669         base="`$BASENAME "$path"`"
27670         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27671       fi
27672     fi
27673   fi
27674 
27675             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27676 $as_echo_n "checking for Boot JDK... " >&6; }
27677             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27678 $as_echo "$BOOT_JDK" >&6; }
27679             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27680 $as_echo_n "checking Boot JDK version... " >&6; }
27681             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27682             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27683 $as_echo "$BOOT_JDK_VERSION" >&6; }
27684           fi # end check jdk version
27685         fi # end check javac
27686       fi # end check java
27687     fi # end check boot jdk found
27688   fi
27689 
27690     done
27691   fi
27692 
27693   fi
27694 
27695 
27696     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27697     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27698       # Do we have a bin/java?
27699       if test ! -x "$BOOT_JDK/bin/java"; then
27700         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27701 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27702         BOOT_JDK_FOUND=no
27703       else
27704         # Do we have a bin/javac?
27705         if test ! -x "$BOOT_JDK/bin/javac"; then
27706           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27707 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27708           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27709 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27710           BOOT_JDK_FOUND=no
27711         else
27712           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27713           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27714 
27715           # Extra M4 quote needed to protect [] in grep expression.
27716           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27717           if test "x$FOUND_CORRECT_VERSION" = x; then
27718             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27720             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27721 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27722             BOOT_JDK_FOUND=no
27723           else
27724             # We're done! :-)
27725             BOOT_JDK_FOUND=yes
27726 
27727   # Only process if variable expands to non-empty
27728 
27729   if test "x$BOOT_JDK" != x; then
27730     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27731 
27732   # Input might be given as Windows format, start by converting to
27733   # unix format.
27734   path="$BOOT_JDK"
27735   new_path=`$CYGPATH -u "$path"`
27736 
27737   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27738   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27739   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27740   # "foo.exe" is OK but "foo" is an error.
27741   #
27742   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27743   # It is also a way to make sure we got the proper file name for the real test later on.
27744   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27745   if test "x$test_shortpath" = x; then
27746     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27747 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27748     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27749   fi
27750 
27751   # Call helper function which possibly converts this using DOS-style short mode.
27752   # If so, the updated path is stored in $new_path.
27753 
27754   input_path="$new_path"
27755   # Check if we need to convert this using DOS-style short mode. If the path
27756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27757   # take no chances and rewrite it.
27758   # Note: m4 eats our [], so we need to use [ and ] instead.
27759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27760   if test "x$has_forbidden_chars" != x; then
27761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27762     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27763     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27764     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27765       # Going to short mode and back again did indeed matter. Since short mode is
27766       # case insensitive, let's make it lowercase to improve readability.
27767       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27768       # Now convert it back to Unix-style (cygpath)
27769       input_path=`$CYGPATH -u "$shortmode_path"`
27770       new_path="$input_path"
27771     fi
27772   fi
27773 
27774   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27775   if test "x$test_cygdrive_prefix" = x; then
27776     # As a simple fix, exclude /usr/bin since it's not a real path.
27777     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27778       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27779       # a path prefixed by /cygdrive for fixpath to work.
27780       new_path="$CYGWIN_ROOT_PATH$input_path"
27781     fi
27782   fi
27783 
27784 
27785   if test "x$path" != "x$new_path"; then
27786     BOOT_JDK="$new_path"
27787     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27788 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27789   fi
27790 
27791     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27792 
27793   path="$BOOT_JDK"
27794   has_colon=`$ECHO $path | $GREP ^.:`
27795   new_path="$path"
27796   if test "x$has_colon" = x; then
27797     # Not in mixed or Windows style, start by that.
27798     new_path=`cmd //c echo $path`
27799   fi
27800 
27801 
27802   input_path="$new_path"
27803   # Check if we need to convert this using DOS-style short mode. If the path
27804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27805   # take no chances and rewrite it.
27806   # Note: m4 eats our [], so we need to use [ and ] instead.
27807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27808   if test "x$has_forbidden_chars" != x; then
27809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27810     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27811   fi
27812 
27813 
27814   windows_path="$new_path"
27815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27816     unix_path=`$CYGPATH -u "$windows_path"`
27817     new_path="$unix_path"
27818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27820     new_path="$unix_path"
27821   fi
27822 
27823   if test "x$path" != "x$new_path"; then
27824     BOOT_JDK="$new_path"
27825     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27826 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27827   fi
27828 
27829   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27830   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27831 
27832     else
27833       # We're on a unix platform. Hooray! :)
27834       path="$BOOT_JDK"
27835       has_space=`$ECHO "$path" | $GREP " "`
27836       if test "x$has_space" != x; then
27837         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27838 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27839         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27840       fi
27841 
27842       # Use eval to expand a potential ~
27843       eval path="$path"
27844       if test ! -f "$path" && test ! -d "$path"; then
27845         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27846       fi
27847 
27848       if test -d "$path"; then
27849         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27850       else
27851         dir="`$DIRNAME "$path"`"
27852         base="`$BASENAME "$path"`"
27853         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27854       fi
27855     fi
27856   fi
27857 
27858             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27859 $as_echo_n "checking for Boot JDK... " >&6; }
27860             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27861 $as_echo "$BOOT_JDK" >&6; }
27862             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27863 $as_echo_n "checking Boot JDK version... " >&6; }
27864             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27865             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27866 $as_echo "$BOOT_JDK_VERSION" >&6; }
27867           fi # end check jdk version
27868         fi # end check javac
27869       fi # end check java
27870     fi # end check boot jdk found
27871   fi
27872 
27873 
27874   if test "x$BOOT_JDK_FOUND" = xno; then
27875     # Now execute the test
27876 
27877   if test "x$PROGRAMW6432" != x; then
27878     VIRTUAL_DIR="$PROGRAMW6432/Java"
27879 
27880   windows_path="$VIRTUAL_DIR"
27881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27882     unix_path=`$CYGPATH -u "$windows_path"`
27883     VIRTUAL_DIR="$unix_path"
27884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27886     VIRTUAL_DIR="$unix_path"
27887   fi
27888 
27889 
27890   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27891   BOOT_JDK_SUFFIX=""
27892   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27893   if test "x$ALL_JDKS_FOUND" != x; then
27894     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27895 
27896   if test "x$BOOT_JDK_FOUND" = xno; then
27897     # Now execute the test
27898 
27899         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27900         if test -d "$BOOT_JDK"; then
27901           BOOT_JDK_FOUND=maybe
27902           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27903 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27904         fi
27905 
27906 
27907     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27908     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27909       # Do we have a bin/java?
27910       if test ! -x "$BOOT_JDK/bin/java"; then
27911         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27913         BOOT_JDK_FOUND=no
27914       else
27915         # Do we have a bin/javac?
27916         if test ! -x "$BOOT_JDK/bin/javac"; then
27917           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27918 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27919           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27920 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27921           BOOT_JDK_FOUND=no
27922         else
27923           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27924           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27925 
27926           # Extra M4 quote needed to protect [] in grep expression.
27927           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27928           if test "x$FOUND_CORRECT_VERSION" = x; then
27929             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27930 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27931             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27932 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27933             BOOT_JDK_FOUND=no
27934           else
27935             # We're done! :-)
27936             BOOT_JDK_FOUND=yes
27937 
27938   # Only process if variable expands to non-empty
27939 
27940   if test "x$BOOT_JDK" != x; then
27941     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27942 
27943   # Input might be given as Windows format, start by converting to
27944   # unix format.
27945   path="$BOOT_JDK"
27946   new_path=`$CYGPATH -u "$path"`
27947 
27948   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27949   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27950   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27951   # "foo.exe" is OK but "foo" is an error.
27952   #
27953   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27954   # It is also a way to make sure we got the proper file name for the real test later on.
27955   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27956   if test "x$test_shortpath" = x; then
27957     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27958 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27959     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27960   fi
27961 
27962   # Call helper function which possibly converts this using DOS-style short mode.
27963   # If so, the updated path is stored in $new_path.
27964 
27965   input_path="$new_path"
27966   # Check if we need to convert this using DOS-style short mode. If the path
27967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27968   # take no chances and rewrite it.
27969   # Note: m4 eats our [], so we need to use [ and ] instead.
27970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27971   if test "x$has_forbidden_chars" != x; then
27972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27973     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27974     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27975     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27976       # Going to short mode and back again did indeed matter. Since short mode is
27977       # case insensitive, let's make it lowercase to improve readability.
27978       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27979       # Now convert it back to Unix-style (cygpath)
27980       input_path=`$CYGPATH -u "$shortmode_path"`
27981       new_path="$input_path"
27982     fi
27983   fi
27984 
27985   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27986   if test "x$test_cygdrive_prefix" = x; then
27987     # As a simple fix, exclude /usr/bin since it's not a real path.
27988     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27989       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27990       # a path prefixed by /cygdrive for fixpath to work.
27991       new_path="$CYGWIN_ROOT_PATH$input_path"
27992     fi
27993   fi
27994 
27995 
27996   if test "x$path" != "x$new_path"; then
27997     BOOT_JDK="$new_path"
27998     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27999 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28000   fi
28001 
28002     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28003 
28004   path="$BOOT_JDK"
28005   has_colon=`$ECHO $path | $GREP ^.:`
28006   new_path="$path"
28007   if test "x$has_colon" = x; then
28008     # Not in mixed or Windows style, start by that.
28009     new_path=`cmd //c echo $path`
28010   fi
28011 
28012 
28013   input_path="$new_path"
28014   # Check if we need to convert this using DOS-style short mode. If the path
28015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28016   # take no chances and rewrite it.
28017   # Note: m4 eats our [], so we need to use [ and ] instead.
28018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28019   if test "x$has_forbidden_chars" != x; then
28020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28021     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28022   fi
28023 
28024 
28025   windows_path="$new_path"
28026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28027     unix_path=`$CYGPATH -u "$windows_path"`
28028     new_path="$unix_path"
28029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28030     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28031     new_path="$unix_path"
28032   fi
28033 
28034   if test "x$path" != "x$new_path"; then
28035     BOOT_JDK="$new_path"
28036     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28037 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28038   fi
28039 
28040   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28041   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28042 
28043     else
28044       # We're on a unix platform. Hooray! :)
28045       path="$BOOT_JDK"
28046       has_space=`$ECHO "$path" | $GREP " "`
28047       if test "x$has_space" != x; then
28048         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28049 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28050         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28051       fi
28052 
28053       # Use eval to expand a potential ~
28054       eval path="$path"
28055       if test ! -f "$path" && test ! -d "$path"; then
28056         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28057       fi
28058 
28059       if test -d "$path"; then
28060         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28061       else
28062         dir="`$DIRNAME "$path"`"
28063         base="`$BASENAME "$path"`"
28064         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28065       fi
28066     fi
28067   fi
28068 
28069             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28070 $as_echo_n "checking for Boot JDK... " >&6; }
28071             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28072 $as_echo "$BOOT_JDK" >&6; }
28073             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28074 $as_echo_n "checking Boot JDK version... " >&6; }
28075             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28076             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28077 $as_echo "$BOOT_JDK_VERSION" >&6; }
28078           fi # end check jdk version
28079         fi # end check javac
28080       fi # end check java
28081     fi # end check boot jdk found
28082   fi
28083 
28084     done
28085   fi
28086 
28087   fi
28088 
28089 
28090     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28091     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28092       # Do we have a bin/java?
28093       if test ! -x "$BOOT_JDK/bin/java"; then
28094         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28095 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28096         BOOT_JDK_FOUND=no
28097       else
28098         # Do we have a bin/javac?
28099         if test ! -x "$BOOT_JDK/bin/javac"; then
28100           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28101 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28102           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28103 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28104           BOOT_JDK_FOUND=no
28105         else
28106           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28107           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28108 
28109           # Extra M4 quote needed to protect [] in grep expression.
28110           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28111           if test "x$FOUND_CORRECT_VERSION" = x; then
28112             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28113 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28114             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28115 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28116             BOOT_JDK_FOUND=no
28117           else
28118             # We're done! :-)
28119             BOOT_JDK_FOUND=yes
28120 
28121   # Only process if variable expands to non-empty
28122 
28123   if test "x$BOOT_JDK" != x; then
28124     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28125 
28126   # Input might be given as Windows format, start by converting to
28127   # unix format.
28128   path="$BOOT_JDK"
28129   new_path=`$CYGPATH -u "$path"`
28130 
28131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28134   # "foo.exe" is OK but "foo" is an error.
28135   #
28136   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28137   # It is also a way to make sure we got the proper file name for the real test later on.
28138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28139   if test "x$test_shortpath" = x; then
28140     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28141 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28142     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28143   fi
28144 
28145   # Call helper function which possibly converts this using DOS-style short mode.
28146   # If so, the updated path is stored in $new_path.
28147 
28148   input_path="$new_path"
28149   # Check if we need to convert this using DOS-style short mode. If the path
28150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28151   # take no chances and rewrite it.
28152   # Note: m4 eats our [], so we need to use [ and ] instead.
28153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28154   if test "x$has_forbidden_chars" != x; then
28155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28159       # Going to short mode and back again did indeed matter. Since short mode is
28160       # case insensitive, let's make it lowercase to improve readability.
28161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28162       # Now convert it back to Unix-style (cygpath)
28163       input_path=`$CYGPATH -u "$shortmode_path"`
28164       new_path="$input_path"
28165     fi
28166   fi
28167 
28168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28169   if test "x$test_cygdrive_prefix" = x; then
28170     # As a simple fix, exclude /usr/bin since it's not a real path.
28171     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28173       # a path prefixed by /cygdrive for fixpath to work.
28174       new_path="$CYGWIN_ROOT_PATH$input_path"
28175     fi
28176   fi
28177 
28178 
28179   if test "x$path" != "x$new_path"; then
28180     BOOT_JDK="$new_path"
28181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28182 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28183   fi
28184 
28185     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28186 
28187   path="$BOOT_JDK"
28188   has_colon=`$ECHO $path | $GREP ^.:`
28189   new_path="$path"
28190   if test "x$has_colon" = x; then
28191     # Not in mixed or Windows style, start by that.
28192     new_path=`cmd //c echo $path`
28193   fi
28194 
28195 
28196   input_path="$new_path"
28197   # Check if we need to convert this using DOS-style short mode. If the path
28198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28199   # take no chances and rewrite it.
28200   # Note: m4 eats our [], so we need to use [ and ] instead.
28201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28202   if test "x$has_forbidden_chars" != x; then
28203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28204     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28205   fi
28206 
28207 
28208   windows_path="$new_path"
28209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28210     unix_path=`$CYGPATH -u "$windows_path"`
28211     new_path="$unix_path"
28212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28214     new_path="$unix_path"
28215   fi
28216 
28217   if test "x$path" != "x$new_path"; then
28218     BOOT_JDK="$new_path"
28219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28220 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28221   fi
28222 
28223   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28224   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28225 
28226     else
28227       # We're on a unix platform. Hooray! :)
28228       path="$BOOT_JDK"
28229       has_space=`$ECHO "$path" | $GREP " "`
28230       if test "x$has_space" != x; then
28231         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28232 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28233         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28234       fi
28235 
28236       # Use eval to expand a potential ~
28237       eval path="$path"
28238       if test ! -f "$path" && test ! -d "$path"; then
28239         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28240       fi
28241 
28242       if test -d "$path"; then
28243         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28244       else
28245         dir="`$DIRNAME "$path"`"
28246         base="`$BASENAME "$path"`"
28247         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28248       fi
28249     fi
28250   fi
28251 
28252             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28253 $as_echo_n "checking for Boot JDK... " >&6; }
28254             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28255 $as_echo "$BOOT_JDK" >&6; }
28256             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28257 $as_echo_n "checking Boot JDK version... " >&6; }
28258             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28259             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28260 $as_echo "$BOOT_JDK_VERSION" >&6; }
28261           fi # end check jdk version
28262         fi # end check javac
28263       fi # end check java
28264     fi # end check boot jdk found
28265   fi
28266 
28267 
28268   if test "x$BOOT_JDK_FOUND" = xno; then
28269     # Now execute the test
28270 
28271   if test "x$PROGRAMFILES" != x; then
28272     VIRTUAL_DIR="$PROGRAMFILES/Java"
28273 
28274   windows_path="$VIRTUAL_DIR"
28275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28276     unix_path=`$CYGPATH -u "$windows_path"`
28277     VIRTUAL_DIR="$unix_path"
28278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28279     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28280     VIRTUAL_DIR="$unix_path"
28281   fi
28282 
28283 
28284   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28285   BOOT_JDK_SUFFIX=""
28286   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28287   if test "x$ALL_JDKS_FOUND" != x; then
28288     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28289 
28290   if test "x$BOOT_JDK_FOUND" = xno; then
28291     # Now execute the test
28292 
28293         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28294         if test -d "$BOOT_JDK"; then
28295           BOOT_JDK_FOUND=maybe
28296           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28297 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28298         fi
28299 
28300 
28301     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28302     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28303       # Do we have a bin/java?
28304       if test ! -x "$BOOT_JDK/bin/java"; then
28305         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28306 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28307         BOOT_JDK_FOUND=no
28308       else
28309         # Do we have a bin/javac?
28310         if test ! -x "$BOOT_JDK/bin/javac"; then
28311           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28312 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28313           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28314 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28315           BOOT_JDK_FOUND=no
28316         else
28317           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28318           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28319 
28320           # Extra M4 quote needed to protect [] in grep expression.
28321           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28322           if test "x$FOUND_CORRECT_VERSION" = x; then
28323             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28324 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28325             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28326 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28327             BOOT_JDK_FOUND=no
28328           else
28329             # We're done! :-)
28330             BOOT_JDK_FOUND=yes
28331 
28332   # Only process if variable expands to non-empty
28333 
28334   if test "x$BOOT_JDK" != x; then
28335     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28336 
28337   # Input might be given as Windows format, start by converting to
28338   # unix format.
28339   path="$BOOT_JDK"
28340   new_path=`$CYGPATH -u "$path"`
28341 
28342   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28343   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28344   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28345   # "foo.exe" is OK but "foo" is an error.
28346   #
28347   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28348   # It is also a way to make sure we got the proper file name for the real test later on.
28349   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28350   if test "x$test_shortpath" = x; then
28351     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28352 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28353     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28354   fi
28355 
28356   # Call helper function which possibly converts this using DOS-style short mode.
28357   # If so, the updated path is stored in $new_path.
28358 
28359   input_path="$new_path"
28360   # Check if we need to convert this using DOS-style short mode. If the path
28361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28362   # take no chances and rewrite it.
28363   # Note: m4 eats our [], so we need to use [ and ] instead.
28364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28365   if test "x$has_forbidden_chars" != x; then
28366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28367     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28368     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28369     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28370       # Going to short mode and back again did indeed matter. Since short mode is
28371       # case insensitive, let's make it lowercase to improve readability.
28372       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28373       # Now convert it back to Unix-style (cygpath)
28374       input_path=`$CYGPATH -u "$shortmode_path"`
28375       new_path="$input_path"
28376     fi
28377   fi
28378 
28379   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28380   if test "x$test_cygdrive_prefix" = x; then
28381     # As a simple fix, exclude /usr/bin since it's not a real path.
28382     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28383       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28384       # a path prefixed by /cygdrive for fixpath to work.
28385       new_path="$CYGWIN_ROOT_PATH$input_path"
28386     fi
28387   fi
28388 
28389 
28390   if test "x$path" != "x$new_path"; then
28391     BOOT_JDK="$new_path"
28392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28393 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28394   fi
28395 
28396     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28397 
28398   path="$BOOT_JDK"
28399   has_colon=`$ECHO $path | $GREP ^.:`
28400   new_path="$path"
28401   if test "x$has_colon" = x; then
28402     # Not in mixed or Windows style, start by that.
28403     new_path=`cmd //c echo $path`
28404   fi
28405 
28406 
28407   input_path="$new_path"
28408   # Check if we need to convert this using DOS-style short mode. If the path
28409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28410   # take no chances and rewrite it.
28411   # Note: m4 eats our [], so we need to use [ and ] instead.
28412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28413   if test "x$has_forbidden_chars" != x; then
28414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28415     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28416   fi
28417 
28418 
28419   windows_path="$new_path"
28420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28421     unix_path=`$CYGPATH -u "$windows_path"`
28422     new_path="$unix_path"
28423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28425     new_path="$unix_path"
28426   fi
28427 
28428   if test "x$path" != "x$new_path"; then
28429     BOOT_JDK="$new_path"
28430     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28431 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28432   fi
28433 
28434   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28435   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28436 
28437     else
28438       # We're on a unix platform. Hooray! :)
28439       path="$BOOT_JDK"
28440       has_space=`$ECHO "$path" | $GREP " "`
28441       if test "x$has_space" != x; then
28442         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28443 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28444         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28445       fi
28446 
28447       # Use eval to expand a potential ~
28448       eval path="$path"
28449       if test ! -f "$path" && test ! -d "$path"; then
28450         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28451       fi
28452 
28453       if test -d "$path"; then
28454         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28455       else
28456         dir="`$DIRNAME "$path"`"
28457         base="`$BASENAME "$path"`"
28458         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28459       fi
28460     fi
28461   fi
28462 
28463             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28464 $as_echo_n "checking for Boot JDK... " >&6; }
28465             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28466 $as_echo "$BOOT_JDK" >&6; }
28467             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28468 $as_echo_n "checking Boot JDK version... " >&6; }
28469             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28470             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28471 $as_echo "$BOOT_JDK_VERSION" >&6; }
28472           fi # end check jdk version
28473         fi # end check javac
28474       fi # end check java
28475     fi # end check boot jdk found
28476   fi
28477 
28478     done
28479   fi
28480 
28481   fi
28482 
28483 
28484     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28485     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28486       # Do we have a bin/java?
28487       if test ! -x "$BOOT_JDK/bin/java"; then
28488         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28489 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28490         BOOT_JDK_FOUND=no
28491       else
28492         # Do we have a bin/javac?
28493         if test ! -x "$BOOT_JDK/bin/javac"; then
28494           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28495 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28496           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28497 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28498           BOOT_JDK_FOUND=no
28499         else
28500           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28501           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28502 
28503           # Extra M4 quote needed to protect [] in grep expression.
28504           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28505           if test "x$FOUND_CORRECT_VERSION" = x; then
28506             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28507 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28508             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28509 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28510             BOOT_JDK_FOUND=no
28511           else
28512             # We're done! :-)
28513             BOOT_JDK_FOUND=yes
28514 
28515   # Only process if variable expands to non-empty
28516 
28517   if test "x$BOOT_JDK" != x; then
28518     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28519 
28520   # Input might be given as Windows format, start by converting to
28521   # unix format.
28522   path="$BOOT_JDK"
28523   new_path=`$CYGPATH -u "$path"`
28524 
28525   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28526   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28527   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28528   # "foo.exe" is OK but "foo" is an error.
28529   #
28530   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28531   # It is also a way to make sure we got the proper file name for the real test later on.
28532   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28533   if test "x$test_shortpath" = x; then
28534     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28535 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28536     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28537   fi
28538 
28539   # Call helper function which possibly converts this using DOS-style short mode.
28540   # If so, the updated path is stored in $new_path.
28541 
28542   input_path="$new_path"
28543   # Check if we need to convert this using DOS-style short mode. If the path
28544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28545   # take no chances and rewrite it.
28546   # Note: m4 eats our [], so we need to use [ and ] instead.
28547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28548   if test "x$has_forbidden_chars" != x; then
28549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28550     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28551     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28552     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28553       # Going to short mode and back again did indeed matter. Since short mode is
28554       # case insensitive, let's make it lowercase to improve readability.
28555       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28556       # Now convert it back to Unix-style (cygpath)
28557       input_path=`$CYGPATH -u "$shortmode_path"`
28558       new_path="$input_path"
28559     fi
28560   fi
28561 
28562   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28563   if test "x$test_cygdrive_prefix" = x; then
28564     # As a simple fix, exclude /usr/bin since it's not a real path.
28565     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28566       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28567       # a path prefixed by /cygdrive for fixpath to work.
28568       new_path="$CYGWIN_ROOT_PATH$input_path"
28569     fi
28570   fi
28571 
28572 
28573   if test "x$path" != "x$new_path"; then
28574     BOOT_JDK="$new_path"
28575     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28576 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28577   fi
28578 
28579     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28580 
28581   path="$BOOT_JDK"
28582   has_colon=`$ECHO $path | $GREP ^.:`
28583   new_path="$path"
28584   if test "x$has_colon" = x; then
28585     # Not in mixed or Windows style, start by that.
28586     new_path=`cmd //c echo $path`
28587   fi
28588 
28589 
28590   input_path="$new_path"
28591   # Check if we need to convert this using DOS-style short mode. If the path
28592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28593   # take no chances and rewrite it.
28594   # Note: m4 eats our [], so we need to use [ and ] instead.
28595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28596   if test "x$has_forbidden_chars" != x; then
28597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28598     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28599   fi
28600 
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   if test "x$path" != "x$new_path"; then
28612     BOOT_JDK="$new_path"
28613     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28614 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28615   fi
28616 
28617   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28618   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28619 
28620     else
28621       # We're on a unix platform. Hooray! :)
28622       path="$BOOT_JDK"
28623       has_space=`$ECHO "$path" | $GREP " "`
28624       if test "x$has_space" != x; then
28625         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28626 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28627         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28628       fi
28629 
28630       # Use eval to expand a potential ~
28631       eval path="$path"
28632       if test ! -f "$path" && test ! -d "$path"; then
28633         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28634       fi
28635 
28636       if test -d "$path"; then
28637         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28638       else
28639         dir="`$DIRNAME "$path"`"
28640         base="`$BASENAME "$path"`"
28641         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28642       fi
28643     fi
28644   fi
28645 
28646             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28647 $as_echo_n "checking for Boot JDK... " >&6; }
28648             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28649 $as_echo "$BOOT_JDK" >&6; }
28650             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28651 $as_echo_n "checking Boot JDK version... " >&6; }
28652             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28653             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28654 $as_echo "$BOOT_JDK_VERSION" >&6; }
28655           fi # end check jdk version
28656         fi # end check javac
28657       fi # end check java
28658     fi # end check boot jdk found
28659   fi
28660 
28661 
28662   if test "x$BOOT_JDK_FOUND" = xno; then
28663     # Now execute the test
28664 
28665   if test "x$ProgramFiles" != x; then
28666     VIRTUAL_DIR="$ProgramFiles/Java"
28667 
28668   windows_path="$VIRTUAL_DIR"
28669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28670     unix_path=`$CYGPATH -u "$windows_path"`
28671     VIRTUAL_DIR="$unix_path"
28672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28673     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28674     VIRTUAL_DIR="$unix_path"
28675   fi
28676 
28677 
28678   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28679   BOOT_JDK_SUFFIX=""
28680   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28681   if test "x$ALL_JDKS_FOUND" != x; then
28682     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28683 
28684   if test "x$BOOT_JDK_FOUND" = xno; then
28685     # Now execute the test
28686 
28687         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28688         if test -d "$BOOT_JDK"; then
28689           BOOT_JDK_FOUND=maybe
28690           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28691 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28692         fi
28693 
28694 
28695     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28696     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28697       # Do we have a bin/java?
28698       if test ! -x "$BOOT_JDK/bin/java"; then
28699         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28700 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28701         BOOT_JDK_FOUND=no
28702       else
28703         # Do we have a bin/javac?
28704         if test ! -x "$BOOT_JDK/bin/javac"; then
28705           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28707           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28708 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28709           BOOT_JDK_FOUND=no
28710         else
28711           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28712           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28713 
28714           # Extra M4 quote needed to protect [] in grep expression.
28715           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28716           if test "x$FOUND_CORRECT_VERSION" = x; then
28717             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28719             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28720 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28721             BOOT_JDK_FOUND=no
28722           else
28723             # We're done! :-)
28724             BOOT_JDK_FOUND=yes
28725 
28726   # Only process if variable expands to non-empty
28727 
28728   if test "x$BOOT_JDK" != x; then
28729     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28730 
28731   # Input might be given as Windows format, start by converting to
28732   # unix format.
28733   path="$BOOT_JDK"
28734   new_path=`$CYGPATH -u "$path"`
28735 
28736   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28737   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28738   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28739   # "foo.exe" is OK but "foo" is an error.
28740   #
28741   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28742   # It is also a way to make sure we got the proper file name for the real test later on.
28743   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28744   if test "x$test_shortpath" = x; then
28745     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28746 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28747     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28748   fi
28749 
28750   # Call helper function which possibly converts this using DOS-style short mode.
28751   # If so, the updated path is stored in $new_path.
28752 
28753   input_path="$new_path"
28754   # Check if we need to convert this using DOS-style short mode. If the path
28755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28756   # take no chances and rewrite it.
28757   # Note: m4 eats our [], so we need to use [ and ] instead.
28758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28759   if test "x$has_forbidden_chars" != x; then
28760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28761     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28762     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28763     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28764       # Going to short mode and back again did indeed matter. Since short mode is
28765       # case insensitive, let's make it lowercase to improve readability.
28766       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28767       # Now convert it back to Unix-style (cygpath)
28768       input_path=`$CYGPATH -u "$shortmode_path"`
28769       new_path="$input_path"
28770     fi
28771   fi
28772 
28773   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28774   if test "x$test_cygdrive_prefix" = x; then
28775     # As a simple fix, exclude /usr/bin since it's not a real path.
28776     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28777       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28778       # a path prefixed by /cygdrive for fixpath to work.
28779       new_path="$CYGWIN_ROOT_PATH$input_path"
28780     fi
28781   fi
28782 
28783 
28784   if test "x$path" != "x$new_path"; then
28785     BOOT_JDK="$new_path"
28786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28787 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28788   fi
28789 
28790     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28791 
28792   path="$BOOT_JDK"
28793   has_colon=`$ECHO $path | $GREP ^.:`
28794   new_path="$path"
28795   if test "x$has_colon" = x; then
28796     # Not in mixed or Windows style, start by that.
28797     new_path=`cmd //c echo $path`
28798   fi
28799 
28800 
28801   input_path="$new_path"
28802   # Check if we need to convert this using DOS-style short mode. If the path
28803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28804   # take no chances and rewrite it.
28805   # Note: m4 eats our [], so we need to use [ and ] instead.
28806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28807   if test "x$has_forbidden_chars" != x; then
28808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28809     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28810   fi
28811 
28812 
28813   windows_path="$new_path"
28814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28815     unix_path=`$CYGPATH -u "$windows_path"`
28816     new_path="$unix_path"
28817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28819     new_path="$unix_path"
28820   fi
28821 
28822   if test "x$path" != "x$new_path"; then
28823     BOOT_JDK="$new_path"
28824     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28825 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28826   fi
28827 
28828   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28829   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28830 
28831     else
28832       # We're on a unix platform. Hooray! :)
28833       path="$BOOT_JDK"
28834       has_space=`$ECHO "$path" | $GREP " "`
28835       if test "x$has_space" != x; then
28836         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28837 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28838         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28839       fi
28840 
28841       # Use eval to expand a potential ~
28842       eval path="$path"
28843       if test ! -f "$path" && test ! -d "$path"; then
28844         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28845       fi
28846 
28847       if test -d "$path"; then
28848         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28849       else
28850         dir="`$DIRNAME "$path"`"
28851         base="`$BASENAME "$path"`"
28852         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28853       fi
28854     fi
28855   fi
28856 
28857             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28858 $as_echo_n "checking for Boot JDK... " >&6; }
28859             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28860 $as_echo "$BOOT_JDK" >&6; }
28861             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28862 $as_echo_n "checking Boot JDK version... " >&6; }
28863             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28864             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28865 $as_echo "$BOOT_JDK_VERSION" >&6; }
28866           fi # end check jdk version
28867         fi # end check javac
28868       fi # end check java
28869     fi # end check boot jdk found
28870   fi
28871 
28872     done
28873   fi
28874 
28875   fi
28876 
28877 
28878     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28879     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28880       # Do we have a bin/java?
28881       if test ! -x "$BOOT_JDK/bin/java"; then
28882         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28884         BOOT_JDK_FOUND=no
28885       else
28886         # Do we have a bin/javac?
28887         if test ! -x "$BOOT_JDK/bin/javac"; then
28888           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28889 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28890           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28891 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28892           BOOT_JDK_FOUND=no
28893         else
28894           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28895           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28896 
28897           # Extra M4 quote needed to protect [] in grep expression.
28898           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28899           if test "x$FOUND_CORRECT_VERSION" = x; then
28900             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28901 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28902             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28903 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28904             BOOT_JDK_FOUND=no
28905           else
28906             # We're done! :-)
28907             BOOT_JDK_FOUND=yes
28908 
28909   # Only process if variable expands to non-empty
28910 
28911   if test "x$BOOT_JDK" != x; then
28912     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28913 
28914   # Input might be given as Windows format, start by converting to
28915   # unix format.
28916   path="$BOOT_JDK"
28917   new_path=`$CYGPATH -u "$path"`
28918 
28919   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28920   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28921   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28922   # "foo.exe" is OK but "foo" is an error.
28923   #
28924   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28925   # It is also a way to make sure we got the proper file name for the real test later on.
28926   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28927   if test "x$test_shortpath" = x; then
28928     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28929 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28930     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28931   fi
28932 
28933   # Call helper function which possibly converts this using DOS-style short mode.
28934   # If so, the updated path is stored in $new_path.
28935 
28936   input_path="$new_path"
28937   # Check if we need to convert this using DOS-style short mode. If the path
28938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28939   # take no chances and rewrite it.
28940   # Note: m4 eats our [], so we need to use [ and ] instead.
28941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28942   if test "x$has_forbidden_chars" != x; then
28943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28944     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28945     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28946     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28947       # Going to short mode and back again did indeed matter. Since short mode is
28948       # case insensitive, let's make it lowercase to improve readability.
28949       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28950       # Now convert it back to Unix-style (cygpath)
28951       input_path=`$CYGPATH -u "$shortmode_path"`
28952       new_path="$input_path"
28953     fi
28954   fi
28955 
28956   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28957   if test "x$test_cygdrive_prefix" = x; then
28958     # As a simple fix, exclude /usr/bin since it's not a real path.
28959     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28960       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28961       # a path prefixed by /cygdrive for fixpath to work.
28962       new_path="$CYGWIN_ROOT_PATH$input_path"
28963     fi
28964   fi
28965 
28966 
28967   if test "x$path" != "x$new_path"; then
28968     BOOT_JDK="$new_path"
28969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28970 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28971   fi
28972 
28973     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28974 
28975   path="$BOOT_JDK"
28976   has_colon=`$ECHO $path | $GREP ^.:`
28977   new_path="$path"
28978   if test "x$has_colon" = x; then
28979     # Not in mixed or Windows style, start by that.
28980     new_path=`cmd //c echo $path`
28981   fi
28982 
28983 
28984   input_path="$new_path"
28985   # Check if we need to convert this using DOS-style short mode. If the path
28986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28987   # take no chances and rewrite it.
28988   # Note: m4 eats our [], so we need to use [ and ] instead.
28989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28990   if test "x$has_forbidden_chars" != x; then
28991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28993   fi
28994 
28995 
28996   windows_path="$new_path"
28997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28998     unix_path=`$CYGPATH -u "$windows_path"`
28999     new_path="$unix_path"
29000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29002     new_path="$unix_path"
29003   fi
29004 
29005   if test "x$path" != "x$new_path"; then
29006     BOOT_JDK="$new_path"
29007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29008 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29009   fi
29010 
29011   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29012   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29013 
29014     else
29015       # We're on a unix platform. Hooray! :)
29016       path="$BOOT_JDK"
29017       has_space=`$ECHO "$path" | $GREP " "`
29018       if test "x$has_space" != x; then
29019         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29020 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29021         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29022       fi
29023 
29024       # Use eval to expand a potential ~
29025       eval path="$path"
29026       if test ! -f "$path" && test ! -d "$path"; then
29027         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29028       fi
29029 
29030       if test -d "$path"; then
29031         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29032       else
29033         dir="`$DIRNAME "$path"`"
29034         base="`$BASENAME "$path"`"
29035         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29036       fi
29037     fi
29038   fi
29039 
29040             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29041 $as_echo_n "checking for Boot JDK... " >&6; }
29042             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29043 $as_echo "$BOOT_JDK" >&6; }
29044             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29045 $as_echo_n "checking Boot JDK version... " >&6; }
29046             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29047             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29048 $as_echo "$BOOT_JDK_VERSION" >&6; }
29049           fi # end check jdk version
29050         fi # end check javac
29051       fi # end check java
29052     fi # end check boot jdk found
29053   fi
29054 
29055 
29056   if test "x$BOOT_JDK_FOUND" = xno; then
29057     # Now execute the test
29058 
29059   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
29060   BOOT_JDK_SUFFIX=""
29061   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29062   if test "x$ALL_JDKS_FOUND" != x; then
29063     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29064 
29065   if test "x$BOOT_JDK_FOUND" = xno; then
29066     # Now execute the test
29067 
29068         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29069         if test -d "$BOOT_JDK"; then
29070           BOOT_JDK_FOUND=maybe
29071           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29072 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29073         fi
29074 
29075 
29076     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29077     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29078       # Do we have a bin/java?
29079       if test ! -x "$BOOT_JDK/bin/java"; then
29080         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29081 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29082         BOOT_JDK_FOUND=no
29083       else
29084         # Do we have a bin/javac?
29085         if test ! -x "$BOOT_JDK/bin/javac"; then
29086           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29087 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29088           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29089 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29090           BOOT_JDK_FOUND=no
29091         else
29092           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29093           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29094 
29095           # Extra M4 quote needed to protect [] in grep expression.
29096           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29097           if test "x$FOUND_CORRECT_VERSION" = x; then
29098             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29099 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29100             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29101 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29102             BOOT_JDK_FOUND=no
29103           else
29104             # We're done! :-)
29105             BOOT_JDK_FOUND=yes
29106 
29107   # Only process if variable expands to non-empty
29108 
29109   if test "x$BOOT_JDK" != x; then
29110     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29111 
29112   # Input might be given as Windows format, start by converting to
29113   # unix format.
29114   path="$BOOT_JDK"
29115   new_path=`$CYGPATH -u "$path"`
29116 
29117   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29118   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29119   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29120   # "foo.exe" is OK but "foo" is an error.
29121   #
29122   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29123   # It is also a way to make sure we got the proper file name for the real test later on.
29124   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29125   if test "x$test_shortpath" = x; then
29126     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29128     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29129   fi
29130 
29131   # Call helper function which possibly converts this using DOS-style short mode.
29132   # If so, the updated path is stored in $new_path.
29133 
29134   input_path="$new_path"
29135   # Check if we need to convert this using DOS-style short mode. If the path
29136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29137   # take no chances and rewrite it.
29138   # Note: m4 eats our [], so we need to use [ and ] instead.
29139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29140   if test "x$has_forbidden_chars" != x; then
29141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29142     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29143     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29144     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29145       # Going to short mode and back again did indeed matter. Since short mode is
29146       # case insensitive, let's make it lowercase to improve readability.
29147       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29148       # Now convert it back to Unix-style (cygpath)
29149       input_path=`$CYGPATH -u "$shortmode_path"`
29150       new_path="$input_path"
29151     fi
29152   fi
29153 
29154   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29155   if test "x$test_cygdrive_prefix" = x; then
29156     # As a simple fix, exclude /usr/bin since it's not a real path.
29157     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29158       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29159       # a path prefixed by /cygdrive for fixpath to work.
29160       new_path="$CYGWIN_ROOT_PATH$input_path"
29161     fi
29162   fi
29163 
29164 
29165   if test "x$path" != "x$new_path"; then
29166     BOOT_JDK="$new_path"
29167     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29168 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29169   fi
29170 
29171     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29172 
29173   path="$BOOT_JDK"
29174   has_colon=`$ECHO $path | $GREP ^.:`
29175   new_path="$path"
29176   if test "x$has_colon" = x; then
29177     # Not in mixed or Windows style, start by that.
29178     new_path=`cmd //c echo $path`
29179   fi
29180 
29181 
29182   input_path="$new_path"
29183   # Check if we need to convert this using DOS-style short mode. If the path
29184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29185   # take no chances and rewrite it.
29186   # Note: m4 eats our [], so we need to use [ and ] instead.
29187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29188   if test "x$has_forbidden_chars" != x; then
29189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29190     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29191   fi
29192 
29193 
29194   windows_path="$new_path"
29195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29196     unix_path=`$CYGPATH -u "$windows_path"`
29197     new_path="$unix_path"
29198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29200     new_path="$unix_path"
29201   fi
29202 
29203   if test "x$path" != "x$new_path"; then
29204     BOOT_JDK="$new_path"
29205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29206 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29207   fi
29208 
29209   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29210   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29211 
29212     else
29213       # We're on a unix platform. Hooray! :)
29214       path="$BOOT_JDK"
29215       has_space=`$ECHO "$path" | $GREP " "`
29216       if test "x$has_space" != x; then
29217         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29218 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29219         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29220       fi
29221 
29222       # Use eval to expand a potential ~
29223       eval path="$path"
29224       if test ! -f "$path" && test ! -d "$path"; then
29225         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29226       fi
29227 
29228       if test -d "$path"; then
29229         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29230       else
29231         dir="`$DIRNAME "$path"`"
29232         base="`$BASENAME "$path"`"
29233         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29234       fi
29235     fi
29236   fi
29237 
29238             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29239 $as_echo_n "checking for Boot JDK... " >&6; }
29240             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29241 $as_echo "$BOOT_JDK" >&6; }
29242             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29243 $as_echo_n "checking Boot JDK version... " >&6; }
29244             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29245             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29246 $as_echo "$BOOT_JDK_VERSION" >&6; }
29247           fi # end check jdk version
29248         fi # end check javac
29249       fi # end check java
29250     fi # end check boot jdk found
29251   fi
29252 
29253     done
29254   fi
29255 
29256 
29257     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29258     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29259       # Do we have a bin/java?
29260       if test ! -x "$BOOT_JDK/bin/java"; then
29261         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29263         BOOT_JDK_FOUND=no
29264       else
29265         # Do we have a bin/javac?
29266         if test ! -x "$BOOT_JDK/bin/javac"; then
29267           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29268 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29269           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29270 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29271           BOOT_JDK_FOUND=no
29272         else
29273           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29274           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29275 
29276           # Extra M4 quote needed to protect [] in grep expression.
29277           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29278           if test "x$FOUND_CORRECT_VERSION" = x; then
29279             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29280 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29281             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29282 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29283             BOOT_JDK_FOUND=no
29284           else
29285             # We're done! :-)
29286             BOOT_JDK_FOUND=yes
29287 
29288   # Only process if variable expands to non-empty
29289 
29290   if test "x$BOOT_JDK" != x; then
29291     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29292 
29293   # Input might be given as Windows format, start by converting to
29294   # unix format.
29295   path="$BOOT_JDK"
29296   new_path=`$CYGPATH -u "$path"`
29297 
29298   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29299   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29300   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29301   # "foo.exe" is OK but "foo" is an error.
29302   #
29303   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29304   # It is also a way to make sure we got the proper file name for the real test later on.
29305   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29306   if test "x$test_shortpath" = x; then
29307     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29308 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29309     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29310   fi
29311 
29312   # Call helper function which possibly converts this using DOS-style short mode.
29313   # If so, the updated path is stored in $new_path.
29314 
29315   input_path="$new_path"
29316   # Check if we need to convert this using DOS-style short mode. If the path
29317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29318   # take no chances and rewrite it.
29319   # Note: m4 eats our [], so we need to use [ and ] instead.
29320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29321   if test "x$has_forbidden_chars" != x; then
29322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29323     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29324     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29325     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29326       # Going to short mode and back again did indeed matter. Since short mode is
29327       # case insensitive, let's make it lowercase to improve readability.
29328       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29329       # Now convert it back to Unix-style (cygpath)
29330       input_path=`$CYGPATH -u "$shortmode_path"`
29331       new_path="$input_path"
29332     fi
29333   fi
29334 
29335   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29336   if test "x$test_cygdrive_prefix" = x; then
29337     # As a simple fix, exclude /usr/bin since it's not a real path.
29338     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29339       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29340       # a path prefixed by /cygdrive for fixpath to work.
29341       new_path="$CYGWIN_ROOT_PATH$input_path"
29342     fi
29343   fi
29344 
29345 
29346   if test "x$path" != "x$new_path"; then
29347     BOOT_JDK="$new_path"
29348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29349 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29350   fi
29351 
29352     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29353 
29354   path="$BOOT_JDK"
29355   has_colon=`$ECHO $path | $GREP ^.:`
29356   new_path="$path"
29357   if test "x$has_colon" = x; then
29358     # Not in mixed or Windows style, start by that.
29359     new_path=`cmd //c echo $path`
29360   fi
29361 
29362 
29363   input_path="$new_path"
29364   # Check if we need to convert this using DOS-style short mode. If the path
29365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29366   # take no chances and rewrite it.
29367   # Note: m4 eats our [], so we need to use [ and ] instead.
29368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29369   if test "x$has_forbidden_chars" != x; then
29370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29371     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29372   fi
29373 
29374 
29375   windows_path="$new_path"
29376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29377     unix_path=`$CYGPATH -u "$windows_path"`
29378     new_path="$unix_path"
29379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29381     new_path="$unix_path"
29382   fi
29383 
29384   if test "x$path" != "x$new_path"; then
29385     BOOT_JDK="$new_path"
29386     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29387 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29388   fi
29389 
29390   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29391   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29392 
29393     else
29394       # We're on a unix platform. Hooray! :)
29395       path="$BOOT_JDK"
29396       has_space=`$ECHO "$path" | $GREP " "`
29397       if test "x$has_space" != x; then
29398         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29399 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29400         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29401       fi
29402 
29403       # Use eval to expand a potential ~
29404       eval path="$path"
29405       if test ! -f "$path" && test ! -d "$path"; then
29406         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29407       fi
29408 
29409       if test -d "$path"; then
29410         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29411       else
29412         dir="`$DIRNAME "$path"`"
29413         base="`$BASENAME "$path"`"
29414         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29415       fi
29416     fi
29417   fi
29418 
29419             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29420 $as_echo_n "checking for Boot JDK... " >&6; }
29421             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29422 $as_echo "$BOOT_JDK" >&6; }
29423             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29424 $as_echo_n "checking Boot JDK version... " >&6; }
29425             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29426             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29427 $as_echo "$BOOT_JDK_VERSION" >&6; }
29428           fi # end check jdk version
29429         fi # end check javac
29430       fi # end check java
29431     fi # end check boot jdk found
29432   fi
29433 
29434   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29435 
29436   if test "x$BOOT_JDK_FOUND" = xno; then
29437     # Now execute the test
29438 
29439   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29440   BOOT_JDK_SUFFIX="/Contents/Home"
29441   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29442   if test "x$ALL_JDKS_FOUND" != x; then
29443     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29444 
29445   if test "x$BOOT_JDK_FOUND" = xno; then
29446     # Now execute the test
29447 
29448         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29449         if test -d "$BOOT_JDK"; then
29450           BOOT_JDK_FOUND=maybe
29451           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29452 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29453         fi
29454 
29455 
29456     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29457     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29458       # Do we have a bin/java?
29459       if test ! -x "$BOOT_JDK/bin/java"; then
29460         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29461 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29462         BOOT_JDK_FOUND=no
29463       else
29464         # Do we have a bin/javac?
29465         if test ! -x "$BOOT_JDK/bin/javac"; then
29466           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29467 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29468           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29469 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29470           BOOT_JDK_FOUND=no
29471         else
29472           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29473           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29474 
29475           # Extra M4 quote needed to protect [] in grep expression.
29476           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29477           if test "x$FOUND_CORRECT_VERSION" = x; then
29478             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29480             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29481 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29482             BOOT_JDK_FOUND=no
29483           else
29484             # We're done! :-)
29485             BOOT_JDK_FOUND=yes
29486 
29487   # Only process if variable expands to non-empty
29488 
29489   if test "x$BOOT_JDK" != x; then
29490     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29491 
29492   # Input might be given as Windows format, start by converting to
29493   # unix format.
29494   path="$BOOT_JDK"
29495   new_path=`$CYGPATH -u "$path"`
29496 
29497   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29498   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29499   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29500   # "foo.exe" is OK but "foo" is an error.
29501   #
29502   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29503   # It is also a way to make sure we got the proper file name for the real test later on.
29504   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29505   if test "x$test_shortpath" = x; then
29506     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29507 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29508     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29509   fi
29510 
29511   # Call helper function which possibly converts this using DOS-style short mode.
29512   # If so, the updated path is stored in $new_path.
29513 
29514   input_path="$new_path"
29515   # Check if we need to convert this using DOS-style short mode. If the path
29516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29517   # take no chances and rewrite it.
29518   # Note: m4 eats our [], so we need to use [ and ] instead.
29519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29520   if test "x$has_forbidden_chars" != x; then
29521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29522     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29523     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29524     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29525       # Going to short mode and back again did indeed matter. Since short mode is
29526       # case insensitive, let's make it lowercase to improve readability.
29527       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29528       # Now convert it back to Unix-style (cygpath)
29529       input_path=`$CYGPATH -u "$shortmode_path"`
29530       new_path="$input_path"
29531     fi
29532   fi
29533 
29534   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29535   if test "x$test_cygdrive_prefix" = x; then
29536     # As a simple fix, exclude /usr/bin since it's not a real path.
29537     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29538       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29539       # a path prefixed by /cygdrive for fixpath to work.
29540       new_path="$CYGWIN_ROOT_PATH$input_path"
29541     fi
29542   fi
29543 
29544 
29545   if test "x$path" != "x$new_path"; then
29546     BOOT_JDK="$new_path"
29547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29549   fi
29550 
29551     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29552 
29553   path="$BOOT_JDK"
29554   has_colon=`$ECHO $path | $GREP ^.:`
29555   new_path="$path"
29556   if test "x$has_colon" = x; then
29557     # Not in mixed or Windows style, start by that.
29558     new_path=`cmd //c echo $path`
29559   fi
29560 
29561 
29562   input_path="$new_path"
29563   # Check if we need to convert this using DOS-style short mode. If the path
29564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29565   # take no chances and rewrite it.
29566   # Note: m4 eats our [], so we need to use [ and ] instead.
29567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29568   if test "x$has_forbidden_chars" != x; then
29569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29570     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29571   fi
29572 
29573 
29574   windows_path="$new_path"
29575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29576     unix_path=`$CYGPATH -u "$windows_path"`
29577     new_path="$unix_path"
29578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29580     new_path="$unix_path"
29581   fi
29582 
29583   if test "x$path" != "x$new_path"; then
29584     BOOT_JDK="$new_path"
29585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29586 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29587   fi
29588 
29589   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29590   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29591 
29592     else
29593       # We're on a unix platform. Hooray! :)
29594       path="$BOOT_JDK"
29595       has_space=`$ECHO "$path" | $GREP " "`
29596       if test "x$has_space" != x; then
29597         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29598 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29599         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29600       fi
29601 
29602       # Use eval to expand a potential ~
29603       eval path="$path"
29604       if test ! -f "$path" && test ! -d "$path"; then
29605         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29606       fi
29607 
29608       if test -d "$path"; then
29609         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29610       else
29611         dir="`$DIRNAME "$path"`"
29612         base="`$BASENAME "$path"`"
29613         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29614       fi
29615     fi
29616   fi
29617 
29618             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29619 $as_echo_n "checking for Boot JDK... " >&6; }
29620             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29621 $as_echo "$BOOT_JDK" >&6; }
29622             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29623 $as_echo_n "checking Boot JDK version... " >&6; }
29624             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29625             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29626 $as_echo "$BOOT_JDK_VERSION" >&6; }
29627           fi # end check jdk version
29628         fi # end check javac
29629       fi # end check java
29630     fi # end check boot jdk found
29631   fi
29632 
29633     done
29634   fi
29635 
29636 
29637     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29638     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29639       # Do we have a bin/java?
29640       if test ! -x "$BOOT_JDK/bin/java"; then
29641         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29642 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29643         BOOT_JDK_FOUND=no
29644       else
29645         # Do we have a bin/javac?
29646         if test ! -x "$BOOT_JDK/bin/javac"; then
29647           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29649           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29650 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29651           BOOT_JDK_FOUND=no
29652         else
29653           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29654           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29655 
29656           # Extra M4 quote needed to protect [] in grep expression.
29657           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29658           if test "x$FOUND_CORRECT_VERSION" = x; then
29659             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29660 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29661             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29662 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29663             BOOT_JDK_FOUND=no
29664           else
29665             # We're done! :-)
29666             BOOT_JDK_FOUND=yes
29667 
29668   # Only process if variable expands to non-empty
29669 
29670   if test "x$BOOT_JDK" != x; then
29671     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29672 
29673   # Input might be given as Windows format, start by converting to
29674   # unix format.
29675   path="$BOOT_JDK"
29676   new_path=`$CYGPATH -u "$path"`
29677 
29678   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29679   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29680   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29681   # "foo.exe" is OK but "foo" is an error.
29682   #
29683   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29684   # It is also a way to make sure we got the proper file name for the real test later on.
29685   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29686   if test "x$test_shortpath" = x; then
29687     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29688 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29689     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29690   fi
29691 
29692   # Call helper function which possibly converts this using DOS-style short mode.
29693   # If so, the updated path is stored in $new_path.
29694 
29695   input_path="$new_path"
29696   # Check if we need to convert this using DOS-style short mode. If the path
29697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29698   # take no chances and rewrite it.
29699   # Note: m4 eats our [], so we need to use [ and ] instead.
29700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29701   if test "x$has_forbidden_chars" != x; then
29702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29703     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29704     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29705     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29706       # Going to short mode and back again did indeed matter. Since short mode is
29707       # case insensitive, let's make it lowercase to improve readability.
29708       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29709       # Now convert it back to Unix-style (cygpath)
29710       input_path=`$CYGPATH -u "$shortmode_path"`
29711       new_path="$input_path"
29712     fi
29713   fi
29714 
29715   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29716   if test "x$test_cygdrive_prefix" = x; then
29717     # As a simple fix, exclude /usr/bin since it's not a real path.
29718     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29719       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29720       # a path prefixed by /cygdrive for fixpath to work.
29721       new_path="$CYGWIN_ROOT_PATH$input_path"
29722     fi
29723   fi
29724 
29725 
29726   if test "x$path" != "x$new_path"; then
29727     BOOT_JDK="$new_path"
29728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29729 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29730   fi
29731 
29732     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29733 
29734   path="$BOOT_JDK"
29735   has_colon=`$ECHO $path | $GREP ^.:`
29736   new_path="$path"
29737   if test "x$has_colon" = x; then
29738     # Not in mixed or Windows style, start by that.
29739     new_path=`cmd //c echo $path`
29740   fi
29741 
29742 
29743   input_path="$new_path"
29744   # Check if we need to convert this using DOS-style short mode. If the path
29745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29746   # take no chances and rewrite it.
29747   # Note: m4 eats our [], so we need to use [ and ] instead.
29748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29749   if test "x$has_forbidden_chars" != x; then
29750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29751     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29752   fi
29753 
29754 
29755   windows_path="$new_path"
29756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29757     unix_path=`$CYGPATH -u "$windows_path"`
29758     new_path="$unix_path"
29759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29761     new_path="$unix_path"
29762   fi
29763 
29764   if test "x$path" != "x$new_path"; then
29765     BOOT_JDK="$new_path"
29766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29767 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29768   fi
29769 
29770   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29771   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29772 
29773     else
29774       # We're on a unix platform. Hooray! :)
29775       path="$BOOT_JDK"
29776       has_space=`$ECHO "$path" | $GREP " "`
29777       if test "x$has_space" != x; then
29778         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29779 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29780         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29781       fi
29782 
29783       # Use eval to expand a potential ~
29784       eval path="$path"
29785       if test ! -f "$path" && test ! -d "$path"; then
29786         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29787       fi
29788 
29789       if test -d "$path"; then
29790         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29791       else
29792         dir="`$DIRNAME "$path"`"
29793         base="`$BASENAME "$path"`"
29794         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29795       fi
29796     fi
29797   fi
29798 
29799             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29800 $as_echo_n "checking for Boot JDK... " >&6; }
29801             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29802 $as_echo "$BOOT_JDK" >&6; }
29803             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29804 $as_echo_n "checking Boot JDK version... " >&6; }
29805             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29806             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29807 $as_echo "$BOOT_JDK_VERSION" >&6; }
29808           fi # end check jdk version
29809         fi # end check javac
29810       fi # end check java
29811     fi # end check boot jdk found
29812   fi
29813 
29814 
29815   if test "x$BOOT_JDK_FOUND" = xno; then
29816     # Now execute the test
29817 
29818   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29819   BOOT_JDK_SUFFIX="/Contents/Home"
29820   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29821   if test "x$ALL_JDKS_FOUND" != x; then
29822     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29823 
29824   if test "x$BOOT_JDK_FOUND" = xno; then
29825     # Now execute the test
29826 
29827         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29828         if test -d "$BOOT_JDK"; then
29829           BOOT_JDK_FOUND=maybe
29830           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29831 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29832         fi
29833 
29834 
29835     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29836     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29837       # Do we have a bin/java?
29838       if test ! -x "$BOOT_JDK/bin/java"; then
29839         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29840 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29841         BOOT_JDK_FOUND=no
29842       else
29843         # Do we have a bin/javac?
29844         if test ! -x "$BOOT_JDK/bin/javac"; then
29845           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29846 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29847           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29848 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29849           BOOT_JDK_FOUND=no
29850         else
29851           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29852           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29853 
29854           # Extra M4 quote needed to protect [] in grep expression.
29855           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29856           if test "x$FOUND_CORRECT_VERSION" = x; then
29857             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29858 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29859             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29860 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29861             BOOT_JDK_FOUND=no
29862           else
29863             # We're done! :-)
29864             BOOT_JDK_FOUND=yes
29865 
29866   # Only process if variable expands to non-empty
29867 
29868   if test "x$BOOT_JDK" != x; then
29869     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29870 
29871   # Input might be given as Windows format, start by converting to
29872   # unix format.
29873   path="$BOOT_JDK"
29874   new_path=`$CYGPATH -u "$path"`
29875 
29876   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29877   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29878   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29879   # "foo.exe" is OK but "foo" is an error.
29880   #
29881   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29882   # It is also a way to make sure we got the proper file name for the real test later on.
29883   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29884   if test "x$test_shortpath" = x; then
29885     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29886 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29887     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29888   fi
29889 
29890   # Call helper function which possibly converts this using DOS-style short mode.
29891   # If so, the updated path is stored in $new_path.
29892 
29893   input_path="$new_path"
29894   # Check if we need to convert this using DOS-style short mode. If the path
29895   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29896   # take no chances and rewrite it.
29897   # Note: m4 eats our [], so we need to use [ and ] instead.
29898   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29899   if test "x$has_forbidden_chars" != x; then
29900     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29901     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29902     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29903     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29904       # Going to short mode and back again did indeed matter. Since short mode is
29905       # case insensitive, let's make it lowercase to improve readability.
29906       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29907       # Now convert it back to Unix-style (cygpath)
29908       input_path=`$CYGPATH -u "$shortmode_path"`
29909       new_path="$input_path"
29910     fi
29911   fi
29912 
29913   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29914   if test "x$test_cygdrive_prefix" = x; then
29915     # As a simple fix, exclude /usr/bin since it's not a real path.
29916     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29917       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29918       # a path prefixed by /cygdrive for fixpath to work.
29919       new_path="$CYGWIN_ROOT_PATH$input_path"
29920     fi
29921   fi
29922 
29923 
29924   if test "x$path" != "x$new_path"; then
29925     BOOT_JDK="$new_path"
29926     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29927 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29928   fi
29929 
29930     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29931 
29932   path="$BOOT_JDK"
29933   has_colon=`$ECHO $path | $GREP ^.:`
29934   new_path="$path"
29935   if test "x$has_colon" = x; then
29936     # Not in mixed or Windows style, start by that.
29937     new_path=`cmd //c echo $path`
29938   fi
29939 
29940 
29941   input_path="$new_path"
29942   # Check if we need to convert this using DOS-style short mode. If the path
29943   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29944   # take no chances and rewrite it.
29945   # Note: m4 eats our [], so we need to use [ and ] instead.
29946   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29947   if test "x$has_forbidden_chars" != x; then
29948     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29949     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29950   fi
29951 
29952 
29953   windows_path="$new_path"
29954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29955     unix_path=`$CYGPATH -u "$windows_path"`
29956     new_path="$unix_path"
29957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29959     new_path="$unix_path"
29960   fi
29961 
29962   if test "x$path" != "x$new_path"; then
29963     BOOT_JDK="$new_path"
29964     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29965 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29966   fi
29967 
29968   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29969   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29970 
29971     else
29972       # We're on a unix platform. Hooray! :)
29973       path="$BOOT_JDK"
29974       has_space=`$ECHO "$path" | $GREP " "`
29975       if test "x$has_space" != x; then
29976         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29977 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29978         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29979       fi
29980 
29981       # Use eval to expand a potential ~
29982       eval path="$path"
29983       if test ! -f "$path" && test ! -d "$path"; then
29984         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29985       fi
29986 
29987       if test -d "$path"; then
29988         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29989       else
29990         dir="`$DIRNAME "$path"`"
29991         base="`$BASENAME "$path"`"
29992         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29993       fi
29994     fi
29995   fi
29996 
29997             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29998 $as_echo_n "checking for Boot JDK... " >&6; }
29999             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30000 $as_echo "$BOOT_JDK" >&6; }
30001             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30002 $as_echo_n "checking Boot JDK version... " >&6; }
30003             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30004             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30005 $as_echo "$BOOT_JDK_VERSION" >&6; }
30006           fi # end check jdk version
30007         fi # end check javac
30008       fi # end check java
30009     fi # end check boot jdk found
30010   fi
30011 
30012     done
30013   fi
30014 
30015 
30016     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30017     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30018       # Do we have a bin/java?
30019       if test ! -x "$BOOT_JDK/bin/java"; then
30020         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30021 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30022         BOOT_JDK_FOUND=no
30023       else
30024         # Do we have a bin/javac?
30025         if test ! -x "$BOOT_JDK/bin/javac"; then
30026           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30027 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30028           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30029 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30030           BOOT_JDK_FOUND=no
30031         else
30032           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30033           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30034 
30035           # Extra M4 quote needed to protect [] in grep expression.
30036           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30037           if test "x$FOUND_CORRECT_VERSION" = x; then
30038             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30039 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30040             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30041 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30042             BOOT_JDK_FOUND=no
30043           else
30044             # We're done! :-)
30045             BOOT_JDK_FOUND=yes
30046 
30047   # Only process if variable expands to non-empty
30048 
30049   if test "x$BOOT_JDK" != x; then
30050     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30051 
30052   # Input might be given as Windows format, start by converting to
30053   # unix format.
30054   path="$BOOT_JDK"
30055   new_path=`$CYGPATH -u "$path"`
30056 
30057   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30058   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30059   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30060   # "foo.exe" is OK but "foo" is an error.
30061   #
30062   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30063   # It is also a way to make sure we got the proper file name for the real test later on.
30064   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30065   if test "x$test_shortpath" = x; then
30066     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30068     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30069   fi
30070 
30071   # Call helper function which possibly converts this using DOS-style short mode.
30072   # If so, the updated path is stored in $new_path.
30073 
30074   input_path="$new_path"
30075   # Check if we need to convert this using DOS-style short mode. If the path
30076   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30077   # take no chances and rewrite it.
30078   # Note: m4 eats our [], so we need to use [ and ] instead.
30079   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30080   if test "x$has_forbidden_chars" != x; then
30081     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30082     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30083     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30084     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30085       # Going to short mode and back again did indeed matter. Since short mode is
30086       # case insensitive, let's make it lowercase to improve readability.
30087       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30088       # Now convert it back to Unix-style (cygpath)
30089       input_path=`$CYGPATH -u "$shortmode_path"`
30090       new_path="$input_path"
30091     fi
30092   fi
30093 
30094   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30095   if test "x$test_cygdrive_prefix" = x; then
30096     # As a simple fix, exclude /usr/bin since it's not a real path.
30097     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30098       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30099       # a path prefixed by /cygdrive for fixpath to work.
30100       new_path="$CYGWIN_ROOT_PATH$input_path"
30101     fi
30102   fi
30103 
30104 
30105   if test "x$path" != "x$new_path"; then
30106     BOOT_JDK="$new_path"
30107     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30108 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30109   fi
30110 
30111     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30112 
30113   path="$BOOT_JDK"
30114   has_colon=`$ECHO $path | $GREP ^.:`
30115   new_path="$path"
30116   if test "x$has_colon" = x; then
30117     # Not in mixed or Windows style, start by that.
30118     new_path=`cmd //c echo $path`
30119   fi
30120 
30121 
30122   input_path="$new_path"
30123   # Check if we need to convert this using DOS-style short mode. If the path
30124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30125   # take no chances and rewrite it.
30126   # Note: m4 eats our [], so we need to use [ and ] instead.
30127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30128   if test "x$has_forbidden_chars" != x; then
30129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30130     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30131   fi
30132 
30133 
30134   windows_path="$new_path"
30135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30136     unix_path=`$CYGPATH -u "$windows_path"`
30137     new_path="$unix_path"
30138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30140     new_path="$unix_path"
30141   fi
30142 
30143   if test "x$path" != "x$new_path"; then
30144     BOOT_JDK="$new_path"
30145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30146 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30147   fi
30148 
30149   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30150   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30151 
30152     else
30153       # We're on a unix platform. Hooray! :)
30154       path="$BOOT_JDK"
30155       has_space=`$ECHO "$path" | $GREP " "`
30156       if test "x$has_space" != x; then
30157         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30158 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30159         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30160       fi
30161 
30162       # Use eval to expand a potential ~
30163       eval path="$path"
30164       if test ! -f "$path" && test ! -d "$path"; then
30165         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30166       fi
30167 
30168       if test -d "$path"; then
30169         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30170       else
30171         dir="`$DIRNAME "$path"`"
30172         base="`$BASENAME "$path"`"
30173         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30174       fi
30175     fi
30176   fi
30177 
30178             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30179 $as_echo_n "checking for Boot JDK... " >&6; }
30180             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30181 $as_echo "$BOOT_JDK" >&6; }
30182             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30183 $as_echo_n "checking Boot JDK version... " >&6; }
30184             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30185             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30186 $as_echo "$BOOT_JDK_VERSION" >&6; }
30187           fi # end check jdk version
30188         fi # end check javac
30189       fi # end check java
30190     fi # end check boot jdk found
30191   fi
30192 
30193   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30194 
30195   if test "x$BOOT_JDK_FOUND" = xno; then
30196     # Now execute the test
30197 
30198   BOOT_JDK_PREFIX="/usr/lib/jvm"
30199   BOOT_JDK_SUFFIX=""
30200   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30201   if test "x$ALL_JDKS_FOUND" != x; then
30202     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30203 
30204   if test "x$BOOT_JDK_FOUND" = xno; then
30205     # Now execute the test
30206 
30207         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30208         if test -d "$BOOT_JDK"; then
30209           BOOT_JDK_FOUND=maybe
30210           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30211 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30212         fi
30213 
30214 
30215     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30216     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30217       # Do we have a bin/java?
30218       if test ! -x "$BOOT_JDK/bin/java"; then
30219         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30220 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30221         BOOT_JDK_FOUND=no
30222       else
30223         # Do we have a bin/javac?
30224         if test ! -x "$BOOT_JDK/bin/javac"; then
30225           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30227           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30228 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30229           BOOT_JDK_FOUND=no
30230         else
30231           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30232           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30233 
30234           # Extra M4 quote needed to protect [] in grep expression.
30235           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30236           if test "x$FOUND_CORRECT_VERSION" = x; then
30237             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30238 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30239             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30240 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30241             BOOT_JDK_FOUND=no
30242           else
30243             # We're done! :-)
30244             BOOT_JDK_FOUND=yes
30245 
30246   # Only process if variable expands to non-empty
30247 
30248   if test "x$BOOT_JDK" != x; then
30249     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30250 
30251   # Input might be given as Windows format, start by converting to
30252   # unix format.
30253   path="$BOOT_JDK"
30254   new_path=`$CYGPATH -u "$path"`
30255 
30256   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30257   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30258   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30259   # "foo.exe" is OK but "foo" is an error.
30260   #
30261   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30262   # It is also a way to make sure we got the proper file name for the real test later on.
30263   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30264   if test "x$test_shortpath" = x; then
30265     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30266 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30267     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30268   fi
30269 
30270   # Call helper function which possibly converts this using DOS-style short mode.
30271   # If so, the updated path is stored in $new_path.
30272 
30273   input_path="$new_path"
30274   # Check if we need to convert this using DOS-style short mode. If the path
30275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30276   # take no chances and rewrite it.
30277   # Note: m4 eats our [], so we need to use [ and ] instead.
30278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30279   if test "x$has_forbidden_chars" != x; then
30280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30281     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30282     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30283     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30284       # Going to short mode and back again did indeed matter. Since short mode is
30285       # case insensitive, let's make it lowercase to improve readability.
30286       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30287       # Now convert it back to Unix-style (cygpath)
30288       input_path=`$CYGPATH -u "$shortmode_path"`
30289       new_path="$input_path"
30290     fi
30291   fi
30292 
30293   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30294   if test "x$test_cygdrive_prefix" = x; then
30295     # As a simple fix, exclude /usr/bin since it's not a real path.
30296     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30297       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30298       # a path prefixed by /cygdrive for fixpath to work.
30299       new_path="$CYGWIN_ROOT_PATH$input_path"
30300     fi
30301   fi
30302 
30303 
30304   if test "x$path" != "x$new_path"; then
30305     BOOT_JDK="$new_path"
30306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30307 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30308   fi
30309 
30310     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30311 
30312   path="$BOOT_JDK"
30313   has_colon=`$ECHO $path | $GREP ^.:`
30314   new_path="$path"
30315   if test "x$has_colon" = x; then
30316     # Not in mixed or Windows style, start by that.
30317     new_path=`cmd //c echo $path`
30318   fi
30319 
30320 
30321   input_path="$new_path"
30322   # Check if we need to convert this using DOS-style short mode. If the path
30323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30324   # take no chances and rewrite it.
30325   # Note: m4 eats our [], so we need to use [ and ] instead.
30326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30327   if test "x$has_forbidden_chars" != x; then
30328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30330   fi
30331 
30332 
30333   windows_path="$new_path"
30334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30335     unix_path=`$CYGPATH -u "$windows_path"`
30336     new_path="$unix_path"
30337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30339     new_path="$unix_path"
30340   fi
30341 
30342   if test "x$path" != "x$new_path"; then
30343     BOOT_JDK="$new_path"
30344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30345 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30346   fi
30347 
30348   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30349   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30350 
30351     else
30352       # We're on a unix platform. Hooray! :)
30353       path="$BOOT_JDK"
30354       has_space=`$ECHO "$path" | $GREP " "`
30355       if test "x$has_space" != x; then
30356         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30357 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30358         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30359       fi
30360 
30361       # Use eval to expand a potential ~
30362       eval path="$path"
30363       if test ! -f "$path" && test ! -d "$path"; then
30364         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30365       fi
30366 
30367       if test -d "$path"; then
30368         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30369       else
30370         dir="`$DIRNAME "$path"`"
30371         base="`$BASENAME "$path"`"
30372         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30373       fi
30374     fi
30375   fi
30376 
30377             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30378 $as_echo_n "checking for Boot JDK... " >&6; }
30379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30380 $as_echo "$BOOT_JDK" >&6; }
30381             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30382 $as_echo_n "checking Boot JDK version... " >&6; }
30383             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30384             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30385 $as_echo "$BOOT_JDK_VERSION" >&6; }
30386           fi # end check jdk version
30387         fi # end check javac
30388       fi # end check java
30389     fi # end check boot jdk found
30390   fi
30391 
30392     done
30393   fi
30394 
30395 
30396     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30397     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30398       # Do we have a bin/java?
30399       if test ! -x "$BOOT_JDK/bin/java"; then
30400         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30401 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30402         BOOT_JDK_FOUND=no
30403       else
30404         # Do we have a bin/javac?
30405         if test ! -x "$BOOT_JDK/bin/javac"; then
30406           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30407 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30408           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30409 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30410           BOOT_JDK_FOUND=no
30411         else
30412           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30413           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30414 
30415           # Extra M4 quote needed to protect [] in grep expression.
30416           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30417           if test "x$FOUND_CORRECT_VERSION" = x; then
30418             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30419 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30420             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30421 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30422             BOOT_JDK_FOUND=no
30423           else
30424             # We're done! :-)
30425             BOOT_JDK_FOUND=yes
30426 
30427   # Only process if variable expands to non-empty
30428 
30429   if test "x$BOOT_JDK" != x; then
30430     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30431 
30432   # Input might be given as Windows format, start by converting to
30433   # unix format.
30434   path="$BOOT_JDK"
30435   new_path=`$CYGPATH -u "$path"`
30436 
30437   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30438   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30439   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30440   # "foo.exe" is OK but "foo" is an error.
30441   #
30442   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30443   # It is also a way to make sure we got the proper file name for the real test later on.
30444   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30445   if test "x$test_shortpath" = x; then
30446     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30447 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30448     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30449   fi
30450 
30451   # Call helper function which possibly converts this using DOS-style short mode.
30452   # If so, the updated path is stored in $new_path.
30453 
30454   input_path="$new_path"
30455   # Check if we need to convert this using DOS-style short mode. If the path
30456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30457   # take no chances and rewrite it.
30458   # Note: m4 eats our [], so we need to use [ and ] instead.
30459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30460   if test "x$has_forbidden_chars" != x; then
30461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30462     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30463     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30464     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30465       # Going to short mode and back again did indeed matter. Since short mode is
30466       # case insensitive, let's make it lowercase to improve readability.
30467       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30468       # Now convert it back to Unix-style (cygpath)
30469       input_path=`$CYGPATH -u "$shortmode_path"`
30470       new_path="$input_path"
30471     fi
30472   fi
30473 
30474   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30475   if test "x$test_cygdrive_prefix" = x; then
30476     # As a simple fix, exclude /usr/bin since it's not a real path.
30477     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30478       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30479       # a path prefixed by /cygdrive for fixpath to work.
30480       new_path="$CYGWIN_ROOT_PATH$input_path"
30481     fi
30482   fi
30483 
30484 
30485   if test "x$path" != "x$new_path"; then
30486     BOOT_JDK="$new_path"
30487     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30488 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30489   fi
30490 
30491     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30492 
30493   path="$BOOT_JDK"
30494   has_colon=`$ECHO $path | $GREP ^.:`
30495   new_path="$path"
30496   if test "x$has_colon" = x; then
30497     # Not in mixed or Windows style, start by that.
30498     new_path=`cmd //c echo $path`
30499   fi
30500 
30501 
30502   input_path="$new_path"
30503   # Check if we need to convert this using DOS-style short mode. If the path
30504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30505   # take no chances and rewrite it.
30506   # Note: m4 eats our [], so we need to use [ and ] instead.
30507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30508   if test "x$has_forbidden_chars" != x; then
30509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30510     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30511   fi
30512 
30513 
30514   windows_path="$new_path"
30515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30516     unix_path=`$CYGPATH -u "$windows_path"`
30517     new_path="$unix_path"
30518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30520     new_path="$unix_path"
30521   fi
30522 
30523   if test "x$path" != "x$new_path"; then
30524     BOOT_JDK="$new_path"
30525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30526 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30527   fi
30528 
30529   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30530   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30531 
30532     else
30533       # We're on a unix platform. Hooray! :)
30534       path="$BOOT_JDK"
30535       has_space=`$ECHO "$path" | $GREP " "`
30536       if test "x$has_space" != x; then
30537         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30538 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30539         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30540       fi
30541 
30542       # Use eval to expand a potential ~
30543       eval path="$path"
30544       if test ! -f "$path" && test ! -d "$path"; then
30545         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30546       fi
30547 
30548       if test -d "$path"; then
30549         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30550       else
30551         dir="`$DIRNAME "$path"`"
30552         base="`$BASENAME "$path"`"
30553         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30554       fi
30555     fi
30556   fi
30557 
30558             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30559 $as_echo_n "checking for Boot JDK... " >&6; }
30560             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30561 $as_echo "$BOOT_JDK" >&6; }
30562             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30563 $as_echo_n "checking Boot JDK version... " >&6; }
30564             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30565             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30566 $as_echo "$BOOT_JDK_VERSION" >&6; }
30567           fi # end check jdk version
30568         fi # end check javac
30569       fi # end check java
30570     fi # end check boot jdk found
30571   fi
30572 
30573   fi
30574 
30575 
30576     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30577     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30578       # Do we have a bin/java?
30579       if test ! -x "$BOOT_JDK/bin/java"; then
30580         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30581 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30582         BOOT_JDK_FOUND=no
30583       else
30584         # Do we have a bin/javac?
30585         if test ! -x "$BOOT_JDK/bin/javac"; then
30586           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30587 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30588           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30589 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30590           BOOT_JDK_FOUND=no
30591         else
30592           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30593           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30594 
30595           # Extra M4 quote needed to protect [] in grep expression.
30596           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30597           if test "x$FOUND_CORRECT_VERSION" = x; then
30598             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30599 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30600             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30601 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30602             BOOT_JDK_FOUND=no
30603           else
30604             # We're done! :-)
30605             BOOT_JDK_FOUND=yes
30606 
30607   # Only process if variable expands to non-empty
30608 
30609   if test "x$BOOT_JDK" != x; then
30610     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30611 
30612   # Input might be given as Windows format, start by converting to
30613   # unix format.
30614   path="$BOOT_JDK"
30615   new_path=`$CYGPATH -u "$path"`
30616 
30617   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30618   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30619   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30620   # "foo.exe" is OK but "foo" is an error.
30621   #
30622   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30623   # It is also a way to make sure we got the proper file name for the real test later on.
30624   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30625   if test "x$test_shortpath" = x; then
30626     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30627 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30628     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30629   fi
30630 
30631   # Call helper function which possibly converts this using DOS-style short mode.
30632   # If so, the updated path is stored in $new_path.
30633 
30634   input_path="$new_path"
30635   # Check if we need to convert this using DOS-style short mode. If the path
30636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30637   # take no chances and rewrite it.
30638   # Note: m4 eats our [], so we need to use [ and ] instead.
30639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30640   if test "x$has_forbidden_chars" != x; then
30641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30642     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30643     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30644     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30645       # Going to short mode and back again did indeed matter. Since short mode is
30646       # case insensitive, let's make it lowercase to improve readability.
30647       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30648       # Now convert it back to Unix-style (cygpath)
30649       input_path=`$CYGPATH -u "$shortmode_path"`
30650       new_path="$input_path"
30651     fi
30652   fi
30653 
30654   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30655   if test "x$test_cygdrive_prefix" = x; then
30656     # As a simple fix, exclude /usr/bin since it's not a real path.
30657     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30658       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30659       # a path prefixed by /cygdrive for fixpath to work.
30660       new_path="$CYGWIN_ROOT_PATH$input_path"
30661     fi
30662   fi
30663 
30664 
30665   if test "x$path" != "x$new_path"; then
30666     BOOT_JDK="$new_path"
30667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30668 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30669   fi
30670 
30671     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30672 
30673   path="$BOOT_JDK"
30674   has_colon=`$ECHO $path | $GREP ^.:`
30675   new_path="$path"
30676   if test "x$has_colon" = x; then
30677     # Not in mixed or Windows style, start by that.
30678     new_path=`cmd //c echo $path`
30679   fi
30680 
30681 
30682   input_path="$new_path"
30683   # Check if we need to convert this using DOS-style short mode. If the path
30684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30685   # take no chances and rewrite it.
30686   # Note: m4 eats our [], so we need to use [ and ] instead.
30687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30688   if test "x$has_forbidden_chars" != x; then
30689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30691   fi
30692 
30693 
30694   windows_path="$new_path"
30695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30696     unix_path=`$CYGPATH -u "$windows_path"`
30697     new_path="$unix_path"
30698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30700     new_path="$unix_path"
30701   fi
30702 
30703   if test "x$path" != "x$new_path"; then
30704     BOOT_JDK="$new_path"
30705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30706 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30707   fi
30708 
30709   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30710   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30711 
30712     else
30713       # We're on a unix platform. Hooray! :)
30714       path="$BOOT_JDK"
30715       has_space=`$ECHO "$path" | $GREP " "`
30716       if test "x$has_space" != x; then
30717         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30718 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30719         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30720       fi
30721 
30722       # Use eval to expand a potential ~
30723       eval path="$path"
30724       if test ! -f "$path" && test ! -d "$path"; then
30725         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30726       fi
30727 
30728       if test -d "$path"; then
30729         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30730       else
30731         dir="`$DIRNAME "$path"`"
30732         base="`$BASENAME "$path"`"
30733         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30734       fi
30735     fi
30736   fi
30737 
30738             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30739 $as_echo_n "checking for Boot JDK... " >&6; }
30740             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30741 $as_echo "$BOOT_JDK" >&6; }
30742             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30743 $as_echo_n "checking Boot JDK version... " >&6; }
30744             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30746 $as_echo "$BOOT_JDK_VERSION" >&6; }
30747           fi # end check jdk version
30748         fi # end check javac
30749       fi # end check java
30750     fi # end check boot jdk found
30751   fi
30752 
30753 
30754   # If we haven't found anything yet, we've truly lost. Give up.
30755   if test "x$BOOT_JDK_FOUND" = xno; then
30756 
30757   # Print a helpful message on how to acquire the necessary build dependency.
30758   # openjdk is the help tag: freetype, cups, alsa etc
30759   MISSING_DEPENDENCY=openjdk
30760 
30761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30762     cygwin_help $MISSING_DEPENDENCY
30763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30764     msys_help $MISSING_DEPENDENCY
30765   else
30766     PKGHANDLER_COMMAND=
30767 
30768     case $PKGHANDLER in
30769       apt-get)
30770         apt_help     $MISSING_DEPENDENCY ;;
30771       yum)
30772         yum_help     $MISSING_DEPENDENCY ;;
30773       brew)
30774         brew_help    $MISSING_DEPENDENCY ;;
30775       port)
30776         port_help    $MISSING_DEPENDENCY ;;
30777       pkgutil)
30778         pkgutil_help $MISSING_DEPENDENCY ;;
30779       pkgadd)
30780         pkgadd_help  $MISSING_DEPENDENCY ;;
30781     esac
30782 
30783     if test "x$PKGHANDLER_COMMAND" != x; then
30784       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30785     fi
30786   fi
30787 
30788     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30789 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30790     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30791 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30792     as_fn_error $? "Cannot continue" "$LINENO" 5
30793   fi
30794 
30795 
30796 
30797   # Setup tools from the Boot JDK.
30798 
30799   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30800 
30801   # Publish this variable in the help.
30802 
30803 
30804   if [ -z "${JAVA+x}" ]; then
30805     # The variable is not set by user, try to locate tool using the code snippet
30806 
30807       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30808 $as_echo_n "checking for java in Boot JDK... " >&6; }
30809       JAVA=$BOOT_JDK/bin/java
30810       if test ! -x $JAVA; then
30811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30812 $as_echo "not found" >&6; }
30813         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30814 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30815         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30816       fi
30817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30818 $as_echo "ok" >&6; }
30819 
30820 
30821   else
30822     # The variable is set, but is it from the command line or the environment?
30823 
30824     # Try to remove the string !JAVA! from our list.
30825     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30826     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30827       # If it failed, the variable was not from the command line. Ignore it,
30828       # but warn the user (except for BASH, which is always set by the calling BASH).
30829       if test "xJAVA" != xBASH; then
30830         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30831 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30832       fi
30833       # Try to locate tool using the code snippet
30834 
30835       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30836 $as_echo_n "checking for java in Boot JDK... " >&6; }
30837       JAVA=$BOOT_JDK/bin/java
30838       if test ! -x $JAVA; then
30839         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30840 $as_echo "not found" >&6; }
30841         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30842 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30843         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30844       fi
30845       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30846 $as_echo "ok" >&6; }
30847 
30848 
30849     else
30850       # If it succeeded, then it was overridden by the user. We will use it
30851       # for the tool.
30852 
30853       # First remove it from the list of overridden variables, so we can test
30854       # for unknown variables in the end.
30855       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30856 
30857       # Check if we try to supply an empty value
30858       if test "x$JAVA" = x; then
30859         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30860 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30861         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30862 $as_echo_n "checking for JAVA... " >&6; }
30863         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30864 $as_echo "disabled" >&6; }
30865       else
30866         # Check if the provided tool contains a complete path.
30867         tool_specified="$JAVA"
30868         tool_basename="${tool_specified##*/}"
30869         if test "x$tool_basename" = "x$tool_specified"; then
30870           # A command without a complete path is provided, search $PATH.
30871           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30872 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30873           # Extract the first word of "$tool_basename", so it can be a program name with args.
30874 set dummy $tool_basename; ac_word=$2
30875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30876 $as_echo_n "checking for $ac_word... " >&6; }
30877 if ${ac_cv_path_JAVA+:} false; then :
30878   $as_echo_n "(cached) " >&6
30879 else
30880   case $JAVA in
30881   [\\/]* | ?:[\\/]*)
30882   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30883   ;;
30884   *)
30885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30886 for as_dir in $PATH
30887 do
30888   IFS=$as_save_IFS
30889   test -z "$as_dir" && as_dir=.
30890     for ac_exec_ext in '' $ac_executable_extensions; do
30891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30892     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30894     break 2
30895   fi
30896 done
30897   done
30898 IFS=$as_save_IFS
30899 
30900   ;;
30901 esac
30902 fi
30903 JAVA=$ac_cv_path_JAVA
30904 if test -n "$JAVA"; then
30905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30906 $as_echo "$JAVA" >&6; }
30907 else
30908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30909 $as_echo "no" >&6; }
30910 fi
30911 
30912 
30913           if test "x$JAVA" = x; then
30914             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30915           fi
30916         else
30917           # Otherwise we believe it is a complete path. Use it as it is.
30918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30919 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30920           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30921 $as_echo_n "checking for JAVA... " >&6; }
30922           if test ! -x "$tool_specified"; then
30923             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30924 $as_echo "not found" >&6; }
30925             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30926           fi
30927           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30928 $as_echo "$tool_specified" >&6; }
30929         fi
30930       fi
30931     fi
30932 
30933   fi
30934 
30935 
30936 
30937   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30938 
30939   # Publish this variable in the help.
30940 
30941 
30942   if [ -z "${JAVAC+x}" ]; then
30943     # The variable is not set by user, try to locate tool using the code snippet
30944 
30945       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30946 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30947       JAVAC=$BOOT_JDK/bin/javac
30948       if test ! -x $JAVAC; then
30949         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30950 $as_echo "not found" >&6; }
30951         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30952 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30953         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30954       fi
30955       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30956 $as_echo "ok" >&6; }
30957 
30958 
30959   else
30960     # The variable is set, but is it from the command line or the environment?
30961 
30962     # Try to remove the string !JAVAC! from our list.
30963     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30964     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30965       # If it failed, the variable was not from the command line. Ignore it,
30966       # but warn the user (except for BASH, which is always set by the calling BASH).
30967       if test "xJAVAC" != xBASH; then
30968         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30969 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30970       fi
30971       # Try to locate tool using the code snippet
30972 
30973       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30974 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30975       JAVAC=$BOOT_JDK/bin/javac
30976       if test ! -x $JAVAC; then
30977         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30978 $as_echo "not found" >&6; }
30979         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30980 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30981         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30982       fi
30983       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30984 $as_echo "ok" >&6; }
30985 
30986 
30987     else
30988       # If it succeeded, then it was overridden by the user. We will use it
30989       # for the tool.
30990 
30991       # First remove it from the list of overridden variables, so we can test
30992       # for unknown variables in the end.
30993       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30994 
30995       # Check if we try to supply an empty value
30996       if test "x$JAVAC" = x; then
30997         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30998 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30999         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31000 $as_echo_n "checking for JAVAC... " >&6; }
31001         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31002 $as_echo "disabled" >&6; }
31003       else
31004         # Check if the provided tool contains a complete path.
31005         tool_specified="$JAVAC"
31006         tool_basename="${tool_specified##*/}"
31007         if test "x$tool_basename" = "x$tool_specified"; then
31008           # A command without a complete path is provided, search $PATH.
31009           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
31010 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
31011           # Extract the first word of "$tool_basename", so it can be a program name with args.
31012 set dummy $tool_basename; ac_word=$2
31013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31014 $as_echo_n "checking for $ac_word... " >&6; }
31015 if ${ac_cv_path_JAVAC+:} false; then :
31016   $as_echo_n "(cached) " >&6
31017 else
31018   case $JAVAC in
31019   [\\/]* | ?:[\\/]*)
31020   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
31021   ;;
31022   *)
31023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31024 for as_dir in $PATH
31025 do
31026   IFS=$as_save_IFS
31027   test -z "$as_dir" && as_dir=.
31028     for ac_exec_ext in '' $ac_executable_extensions; do
31029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31030     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
31031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31032     break 2
31033   fi
31034 done
31035   done
31036 IFS=$as_save_IFS
31037 
31038   ;;
31039 esac
31040 fi
31041 JAVAC=$ac_cv_path_JAVAC
31042 if test -n "$JAVAC"; then
31043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
31044 $as_echo "$JAVAC" >&6; }
31045 else
31046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31047 $as_echo "no" >&6; }
31048 fi
31049 
31050 
31051           if test "x$JAVAC" = x; then
31052             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31053           fi
31054         else
31055           # Otherwise we believe it is a complete path. Use it as it is.
31056           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
31057 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
31058           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31059 $as_echo_n "checking for JAVAC... " >&6; }
31060           if test ! -x "$tool_specified"; then
31061             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31062 $as_echo "not found" >&6; }
31063             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
31064           fi
31065           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31066 $as_echo "$tool_specified" >&6; }
31067         fi
31068       fi
31069     fi
31070 
31071   fi
31072 
31073 
31074 
31075   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31076 
31077   # Publish this variable in the help.
31078 
31079 
31080   if [ -z "${JAVAH+x}" ]; then
31081     # The variable is not set by user, try to locate tool using the code snippet
31082 
31083       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31084 $as_echo_n "checking for javah in Boot JDK... " >&6; }
31085       JAVAH=$BOOT_JDK/bin/javah
31086       if test ! -x $JAVAH; then
31087         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31088 $as_echo "not found" >&6; }
31089         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31090 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31091         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31092       fi
31093       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31094 $as_echo "ok" >&6; }
31095 
31096 
31097   else
31098     # The variable is set, but is it from the command line or the environment?
31099 
31100     # Try to remove the string !JAVAH! from our list.
31101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31103       # If it failed, the variable was not from the command line. Ignore it,
31104       # but warn the user (except for BASH, which is always set by the calling BASH).
31105       if test "xJAVAH" != xBASH; then
31106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31107 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31108       fi
31109       # Try to locate tool using the code snippet
31110 
31111       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31112 $as_echo_n "checking for javah in Boot JDK... " >&6; }
31113       JAVAH=$BOOT_JDK/bin/javah
31114       if test ! -x $JAVAH; then
31115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31116 $as_echo "not found" >&6; }
31117         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31118 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31119         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31120       fi
31121       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31122 $as_echo "ok" >&6; }
31123 
31124 
31125     else
31126       # If it succeeded, then it was overridden by the user. We will use it
31127       # for the tool.
31128 
31129       # First remove it from the list of overridden variables, so we can test
31130       # for unknown variables in the end.
31131       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31132 
31133       # Check if we try to supply an empty value
31134       if test "x$JAVAH" = x; then
31135         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31136 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31137         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31138 $as_echo_n "checking for JAVAH... " >&6; }
31139         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31140 $as_echo "disabled" >&6; }
31141       else
31142         # Check if the provided tool contains a complete path.
31143         tool_specified="$JAVAH"
31144         tool_basename="${tool_specified##*/}"
31145         if test "x$tool_basename" = "x$tool_specified"; then
31146           # A command without a complete path is provided, search $PATH.
31147           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31148 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31149           # Extract the first word of "$tool_basename", so it can be a program name with args.
31150 set dummy $tool_basename; ac_word=$2
31151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31152 $as_echo_n "checking for $ac_word... " >&6; }
31153 if ${ac_cv_path_JAVAH+:} false; then :
31154   $as_echo_n "(cached) " >&6
31155 else
31156   case $JAVAH in
31157   [\\/]* | ?:[\\/]*)
31158   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31159   ;;
31160   *)
31161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31162 for as_dir in $PATH
31163 do
31164   IFS=$as_save_IFS
31165   test -z "$as_dir" && as_dir=.
31166     for ac_exec_ext in '' $ac_executable_extensions; do
31167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31168     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31170     break 2
31171   fi
31172 done
31173   done
31174 IFS=$as_save_IFS
31175 
31176   ;;
31177 esac
31178 fi
31179 JAVAH=$ac_cv_path_JAVAH
31180 if test -n "$JAVAH"; then
31181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31182 $as_echo "$JAVAH" >&6; }
31183 else
31184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31185 $as_echo "no" >&6; }
31186 fi
31187 
31188 
31189           if test "x$JAVAH" = x; then
31190             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31191           fi
31192         else
31193           # Otherwise we believe it is a complete path. Use it as it is.
31194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31195 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31196           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31197 $as_echo_n "checking for JAVAH... " >&6; }
31198           if test ! -x "$tool_specified"; then
31199             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31200 $as_echo "not found" >&6; }
31201             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31202           fi
31203           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31204 $as_echo "$tool_specified" >&6; }
31205         fi
31206       fi
31207     fi
31208 
31209   fi
31210 
31211 
31212 
31213   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31214 
31215   # Publish this variable in the help.
31216 
31217 
31218   if [ -z "${JAR+x}" ]; then
31219     # The variable is not set by user, try to locate tool using the code snippet
31220 
31221       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31222 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31223       JAR=$BOOT_JDK/bin/jar
31224       if test ! -x $JAR; then
31225         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31226 $as_echo "not found" >&6; }
31227         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31228 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31229         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31230       fi
31231       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31232 $as_echo "ok" >&6; }
31233 
31234 
31235   else
31236     # The variable is set, but is it from the command line or the environment?
31237 
31238     # Try to remove the string !JAR! from our list.
31239     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31240     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31241       # If it failed, the variable was not from the command line. Ignore it,
31242       # but warn the user (except for BASH, which is always set by the calling BASH).
31243       if test "xJAR" != xBASH; then
31244         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31245 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31246       fi
31247       # Try to locate tool using the code snippet
31248 
31249       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31250 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31251       JAR=$BOOT_JDK/bin/jar
31252       if test ! -x $JAR; then
31253         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31254 $as_echo "not found" >&6; }
31255         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31256 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31257         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31258       fi
31259       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31260 $as_echo "ok" >&6; }
31261 
31262 
31263     else
31264       # If it succeeded, then it was overridden by the user. We will use it
31265       # for the tool.
31266 
31267       # First remove it from the list of overridden variables, so we can test
31268       # for unknown variables in the end.
31269       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31270 
31271       # Check if we try to supply an empty value
31272       if test "x$JAR" = x; then
31273         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31274 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31275         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31276 $as_echo_n "checking for JAR... " >&6; }
31277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31278 $as_echo "disabled" >&6; }
31279       else
31280         # Check if the provided tool contains a complete path.
31281         tool_specified="$JAR"
31282         tool_basename="${tool_specified##*/}"
31283         if test "x$tool_basename" = "x$tool_specified"; then
31284           # A command without a complete path is provided, search $PATH.
31285           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31286 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31287           # Extract the first word of "$tool_basename", so it can be a program name with args.
31288 set dummy $tool_basename; ac_word=$2
31289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31290 $as_echo_n "checking for $ac_word... " >&6; }
31291 if ${ac_cv_path_JAR+:} false; then :
31292   $as_echo_n "(cached) " >&6
31293 else
31294   case $JAR in
31295   [\\/]* | ?:[\\/]*)
31296   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31297   ;;
31298   *)
31299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31300 for as_dir in $PATH
31301 do
31302   IFS=$as_save_IFS
31303   test -z "$as_dir" && as_dir=.
31304     for ac_exec_ext in '' $ac_executable_extensions; do
31305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31306     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31308     break 2
31309   fi
31310 done
31311   done
31312 IFS=$as_save_IFS
31313 
31314   ;;
31315 esac
31316 fi
31317 JAR=$ac_cv_path_JAR
31318 if test -n "$JAR"; then
31319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31320 $as_echo "$JAR" >&6; }
31321 else
31322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31323 $as_echo "no" >&6; }
31324 fi
31325 
31326 
31327           if test "x$JAR" = x; then
31328             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31329           fi
31330         else
31331           # Otherwise we believe it is a complete path. Use it as it is.
31332           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31333 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31334           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31335 $as_echo_n "checking for JAR... " >&6; }
31336           if test ! -x "$tool_specified"; then
31337             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31338 $as_echo "not found" >&6; }
31339             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31340           fi
31341           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31342 $as_echo "$tool_specified" >&6; }
31343         fi
31344       fi
31345     fi
31346 
31347   fi
31348 
31349 
31350 
31351   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31352 
31353   # Publish this variable in the help.
31354 
31355 
31356   if [ -z "${JARSIGNER+x}" ]; then
31357     # The variable is not set by user, try to locate tool using the code snippet
31358 
31359       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31360 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31361       JARSIGNER=$BOOT_JDK/bin/jarsigner
31362       if test ! -x $JARSIGNER; then
31363         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31364 $as_echo "not found" >&6; }
31365         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31366 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31367         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31368       fi
31369       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31370 $as_echo "ok" >&6; }
31371 
31372 
31373   else
31374     # The variable is set, but is it from the command line or the environment?
31375 
31376     # Try to remove the string !JARSIGNER! from our list.
31377     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31378     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31379       # If it failed, the variable was not from the command line. Ignore it,
31380       # but warn the user (except for BASH, which is always set by the calling BASH).
31381       if test "xJARSIGNER" != xBASH; then
31382         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31383 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31384       fi
31385       # Try to locate tool using the code snippet
31386 
31387       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31388 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31389       JARSIGNER=$BOOT_JDK/bin/jarsigner
31390       if test ! -x $JARSIGNER; then
31391         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31392 $as_echo "not found" >&6; }
31393         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31394 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31395         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31396       fi
31397       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31398 $as_echo "ok" >&6; }
31399 
31400 
31401     else
31402       # If it succeeded, then it was overridden by the user. We will use it
31403       # for the tool.
31404 
31405       # First remove it from the list of overridden variables, so we can test
31406       # for unknown variables in the end.
31407       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31408 
31409       # Check if we try to supply an empty value
31410       if test "x$JARSIGNER" = x; then
31411         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31412 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31414 $as_echo_n "checking for JARSIGNER... " >&6; }
31415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31416 $as_echo "disabled" >&6; }
31417       else
31418         # Check if the provided tool contains a complete path.
31419         tool_specified="$JARSIGNER"
31420         tool_basename="${tool_specified##*/}"
31421         if test "x$tool_basename" = "x$tool_specified"; then
31422           # A command without a complete path is provided, search $PATH.
31423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31424 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31425           # Extract the first word of "$tool_basename", so it can be a program name with args.
31426 set dummy $tool_basename; ac_word=$2
31427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31428 $as_echo_n "checking for $ac_word... " >&6; }
31429 if ${ac_cv_path_JARSIGNER+:} false; then :
31430   $as_echo_n "(cached) " >&6
31431 else
31432   case $JARSIGNER in
31433   [\\/]* | ?:[\\/]*)
31434   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31435   ;;
31436   *)
31437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31438 for as_dir in $PATH
31439 do
31440   IFS=$as_save_IFS
31441   test -z "$as_dir" && as_dir=.
31442     for ac_exec_ext in '' $ac_executable_extensions; do
31443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31444     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31446     break 2
31447   fi
31448 done
31449   done
31450 IFS=$as_save_IFS
31451 
31452   ;;
31453 esac
31454 fi
31455 JARSIGNER=$ac_cv_path_JARSIGNER
31456 if test -n "$JARSIGNER"; then
31457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31458 $as_echo "$JARSIGNER" >&6; }
31459 else
31460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31461 $as_echo "no" >&6; }
31462 fi
31463 
31464 
31465           if test "x$JARSIGNER" = x; then
31466             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31467           fi
31468         else
31469           # Otherwise we believe it is a complete path. Use it as it is.
31470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31471 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31472           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31473 $as_echo_n "checking for JARSIGNER... " >&6; }
31474           if test ! -x "$tool_specified"; then
31475             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31476 $as_echo "not found" >&6; }
31477             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31478           fi
31479           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31480 $as_echo "$tool_specified" >&6; }
31481         fi
31482       fi
31483     fi
31484 
31485   fi
31486 
31487 
31488 
31489   # Finally, set some other options...
31490 
31491   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31492   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31493 
31494 
31495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31496 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
31497   if "$JAVA" --list-modules > /dev/null 2>&1; then
31498     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31499 $as_echo "yes" >&6; }
31500     BOOT_JDK_MODULAR="true"
31501   else
31502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31503 $as_echo "no" >&6; }
31504     BOOT_JDK_MODULAR="false"
31505   fi
31506 
31507 
31508 
31509 
31510   # Check if the boot jdk is 32 or 64 bit
31511   if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31512     BOOT_JDK_BITS="64"
31513   else
31514     BOOT_JDK_BITS="32"
31515   fi
31516   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31517 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31519 $as_echo "$BOOT_JDK_BITS" >&6; }
31520 
31521 
31522 
31523 # Check whether --with-build-jdk was given.
31524 if test "${with_build_jdk+set}" = set; then :
31525   withval=$with_build_jdk;
31526 fi
31527 
31528 
31529   CREATE_BUILDJDK=false
31530   EXTERNAL_BUILDJDK=false
31531   BUILD_JDK_FOUND="no"
31532   if test "x$with_build_jdk" != "x"; then
31533 
31534   if test "x$BUILD_JDK_FOUND" = xno; then
31535     # Execute the test
31536 
31537        if test "x$with_build_jdk" != x; then
31538          BUILD_JDK=$with_build_jdk
31539          BUILD_JDK_FOUND=maybe
31540          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31541 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31542        fi
31543 
31544     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31545     if test "x$BUILD_JDK_FOUND" = xmaybe; then
31546       # Do we have a bin/java?
31547       if test ! -x "$BUILD_JDK/bin/java"; then
31548         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31549 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31550         BUILD_JDK_FOUND=no
31551       elif test ! -x "$BUILD_JDK/bin/jlink"; then
31552         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31553 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31554         BUILD_JDK_FOUND=no
31555       elif test ! -x "$BUILD_JDK/bin/jmod"; then
31556         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31557 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31558         BUILD_JDK_FOUND=no
31559       elif test ! -x "$BUILD_JDK/bin/javac"; then
31560         # Do we have a bin/javac?
31561         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31562 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31563         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31564 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31565         BUILD_JDK_FOUND=no
31566       else
31567         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31568         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31569 
31570         # Extra M4 quote needed to protect [] in grep expression.
31571         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31572         if test "x$FOUND_CORRECT_VERSION" = x; then
31573           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31574 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31575           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31576 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31577           BUILD_JDK_FOUND=no
31578         else
31579           # We're done!
31580           BUILD_JDK_FOUND=yes
31581 
31582   # Only process if variable expands to non-empty
31583 
31584   if test "x$BUILD_JDK" != x; then
31585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31586 
31587   # Input might be given as Windows format, start by converting to
31588   # unix format.
31589   path="$BUILD_JDK"
31590   new_path=`$CYGPATH -u "$path"`
31591 
31592   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31593   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31594   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31595   # "foo.exe" is OK but "foo" is an error.
31596   #
31597   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31598   # It is also a way to make sure we got the proper file name for the real test later on.
31599   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31600   if test "x$test_shortpath" = x; then
31601     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31602 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31603     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31604   fi
31605 
31606   # Call helper function which possibly converts this using DOS-style short mode.
31607   # If so, the updated path is stored in $new_path.
31608 
31609   input_path="$new_path"
31610   # Check if we need to convert this using DOS-style short mode. If the path
31611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31612   # take no chances and rewrite it.
31613   # Note: m4 eats our [], so we need to use [ and ] instead.
31614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31615   if test "x$has_forbidden_chars" != x; then
31616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31620       # Going to short mode and back again did indeed matter. Since short mode is
31621       # case insensitive, let's make it lowercase to improve readability.
31622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31623       # Now convert it back to Unix-style (cygpath)
31624       input_path=`$CYGPATH -u "$shortmode_path"`
31625       new_path="$input_path"
31626     fi
31627   fi
31628 
31629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31630   if test "x$test_cygdrive_prefix" = x; then
31631     # As a simple fix, exclude /usr/bin since it's not a real path.
31632     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31634       # a path prefixed by /cygdrive for fixpath to work.
31635       new_path="$CYGWIN_ROOT_PATH$input_path"
31636     fi
31637   fi
31638 
31639 
31640   if test "x$path" != "x$new_path"; then
31641     BUILD_JDK="$new_path"
31642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31643 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31644   fi
31645 
31646     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31647 
31648   path="$BUILD_JDK"
31649   has_colon=`$ECHO $path | $GREP ^.:`
31650   new_path="$path"
31651   if test "x$has_colon" = x; then
31652     # Not in mixed or Windows style, start by that.
31653     new_path=`cmd //c echo $path`
31654   fi
31655 
31656 
31657   input_path="$new_path"
31658   # Check if we need to convert this using DOS-style short mode. If the path
31659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31660   # take no chances and rewrite it.
31661   # Note: m4 eats our [], so we need to use [ and ] instead.
31662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31663   if test "x$has_forbidden_chars" != x; then
31664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31666   fi
31667 
31668 
31669   windows_path="$new_path"
31670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31671     unix_path=`$CYGPATH -u "$windows_path"`
31672     new_path="$unix_path"
31673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31675     new_path="$unix_path"
31676   fi
31677 
31678   if test "x$path" != "x$new_path"; then
31679     BUILD_JDK="$new_path"
31680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31681 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31682   fi
31683 
31684   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31685   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31686 
31687     else
31688       # We're on a unix platform. Hooray! :)
31689       path="$BUILD_JDK"
31690       has_space=`$ECHO "$path" | $GREP " "`
31691       if test "x$has_space" != x; then
31692         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31693 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31694         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31695       fi
31696 
31697       # Use eval to expand a potential ~
31698       eval path="$path"
31699       if test ! -f "$path" && test ! -d "$path"; then
31700         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31701       fi
31702 
31703       if test -d "$path"; then
31704         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31705       else
31706         dir="`$DIRNAME "$path"`"
31707         base="`$BASENAME "$path"`"
31708         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31709       fi
31710     fi
31711   fi
31712 
31713           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31714 $as_echo_n "checking for Build JDK... " >&6; }
31715           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31716 $as_echo "$BUILD_JDK" >&6; }
31717           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31718 $as_echo_n "checking Build JDK version... " >&6; }
31719           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31720           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31721 $as_echo "$BUILD_JDK_VERSION" >&6; }
31722         fi # end check jdk version
31723       fi # end check java
31724     fi # end check build jdk found
31725   fi
31726 
31727     EXTERNAL_BUILDJDK=true
31728   else
31729     if test "x$COMPILE_TYPE" = "xcross"; then
31730       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31731       BUILD_JDK_FOUND=yes
31732       CREATE_BUILDJDK=true
31733       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31734 $as_echo_n "checking for Build JDK... " >&6; }
31735       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31736 $as_echo "yes, will build it for the host platform" >&6; }
31737     else
31738       BUILD_JDK="\$(JDK_OUTPUTDIR)"
31739       BUILD_JDK_FOUND=yes
31740       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31741 $as_echo_n "checking for Build JDK... " >&6; }
31742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31743 $as_echo "yes, will use output dir" >&6; }
31744     fi
31745   fi
31746 
31747   JMOD="$BUILD_JDK/bin/jmod"
31748   JLINK="$BUILD_JDK/bin/jlink"
31749 
31750 
31751 
31752   if test "x$BUILD_JDK_FOUND" != "xyes"; then
31753     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31754 $as_echo_n "checking for Build JDK... " >&6; }
31755     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31756 $as_echo "no" >&6; }
31757     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31758   fi
31759 
31760 
31761 
31762 
31763 
31764 
31765 ###############################################################################
31766 #
31767 # Configure the sources to use. We can add or override individual directories.
31768 #
31769 ###############################################################################
31770 
31771 
31772   # Where are the sources.
31773   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31774   CORBA_TOPDIR="$SRC_ROOT/corba"
31775   JAXP_TOPDIR="$SRC_ROOT/jaxp"
31776   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31777   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31778   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31779   JDK_TOPDIR="$SRC_ROOT/jdk"
31780 
31781 
31782 
31783 
31784 
31785 
31786 
31787 
31788 
31789   # This feature is no longer supported.
31790 
31791 
31792 
31793 # Check whether --with-add-source-root was given.
31794 if test "${with_add_source_root+set}" = set; then :
31795   withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
31796 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31797 fi
31798 
31799 
31800 
31801 
31802 # Check whether --with-override-source-root was given.
31803 if test "${with_override_source_root+set}" = set; then :
31804   withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
31805 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31806 fi
31807 
31808 
31809 
31810 
31811 # Check whether --with-adds-and-overrides was given.
31812 if test "${with_adds_and_overrides+set}" = set; then :
31813   withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
31814 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31815 fi
31816 
31817 
31818 
31819 
31820 # Check whether --with-override-langtools was given.
31821 if test "${with_override_langtools+set}" = set; then :
31822   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31823 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31824 fi
31825 
31826 
31827 
31828 
31829 # Check whether --with-override-corba was given.
31830 if test "${with_override_corba+set}" = set; then :
31831   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31832 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31833 fi
31834 
31835 
31836 
31837 
31838 # Check whether --with-override-jaxp was given.
31839 if test "${with_override_jaxp+set}" = set; then :
31840   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31841 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31842 fi
31843 
31844 
31845 
31846 
31847 # Check whether --with-override-jaxws was given.
31848 if test "${with_override_jaxws+set}" = set; then :
31849   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31850 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31851 fi
31852 
31853 
31854 
31855 
31856 # Check whether --with-override-hotspot was given.
31857 if test "${with_override_hotspot+set}" = set; then :
31858   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31859 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31860 fi
31861 
31862 
31863 
31864 
31865 # Check whether --with-override-nashorn was given.
31866 if test "${with_override_nashorn+set}" = set; then :
31867   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31868 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31869 fi
31870 
31871 
31872 
31873 
31874 # Check whether --with-override-jdk was given.
31875 if test "${with_override_jdk+set}" = set; then :
31876   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31877 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31878 fi
31879 
31880 
31881 
31882 
31883   BUILD_OUTPUT="$OUTPUT_ROOT"
31884 
31885   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31886 
31887 
31888 
31889 # Check whether --with-import_hotspot was given.
31890 if test "${with_import_hotspot+set}" = set; then :
31891   withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31892 $as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31893 fi
31894 
31895 
31896 
31897 
31898 
31899 
31900 # Check whether --with-import-modules was given.
31901 if test "${with_import_modules+set}" = set; then :
31902   withval=$with_import_modules;
31903 fi
31904 
31905 
31906   if test "x$with_import_modules" != x \
31907       && test "x$with_import_modules" != "xno"; then
31908     if test -d "$with_import_modules"; then
31909       IMPORT_MODULES_TOPDIR="$with_import_modules"
31910 
31911   # Only process if variable expands to non-empty
31912 
31913   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31914     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31915 
31916   # Input might be given as Windows format, start by converting to
31917   # unix format.
31918   path="$IMPORT_MODULES_TOPDIR"
31919   new_path=`$CYGPATH -u "$path"`
31920 
31921   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31922   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31923   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31924   # "foo.exe" is OK but "foo" is an error.
31925   #
31926   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31927   # It is also a way to make sure we got the proper file name for the real test later on.
31928   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31929   if test "x$test_shortpath" = x; then
31930     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31931 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31932     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31933   fi
31934 
31935   # Call helper function which possibly converts this using DOS-style short mode.
31936   # If so, the updated path is stored in $new_path.
31937 
31938   input_path="$new_path"
31939   # Check if we need to convert this using DOS-style short mode. If the path
31940   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31941   # take no chances and rewrite it.
31942   # Note: m4 eats our [], so we need to use [ and ] instead.
31943   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31944   if test "x$has_forbidden_chars" != x; then
31945     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31946     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31947     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31948     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31949       # Going to short mode and back again did indeed matter. Since short mode is
31950       # case insensitive, let's make it lowercase to improve readability.
31951       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31952       # Now convert it back to Unix-style (cygpath)
31953       input_path=`$CYGPATH -u "$shortmode_path"`
31954       new_path="$input_path"
31955     fi
31956   fi
31957 
31958   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31959   if test "x$test_cygdrive_prefix" = x; then
31960     # As a simple fix, exclude /usr/bin since it's not a real path.
31961     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31962       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31963       # a path prefixed by /cygdrive for fixpath to work.
31964       new_path="$CYGWIN_ROOT_PATH$input_path"
31965     fi
31966   fi
31967 
31968 
31969   if test "x$path" != "x$new_path"; then
31970     IMPORT_MODULES_TOPDIR="$new_path"
31971     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31972 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31973   fi
31974 
31975     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31976 
31977   path="$IMPORT_MODULES_TOPDIR"
31978   has_colon=`$ECHO $path | $GREP ^.:`
31979   new_path="$path"
31980   if test "x$has_colon" = x; then
31981     # Not in mixed or Windows style, start by that.
31982     new_path=`cmd //c echo $path`
31983   fi
31984 
31985 
31986   input_path="$new_path"
31987   # Check if we need to convert this using DOS-style short mode. If the path
31988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31989   # take no chances and rewrite it.
31990   # Note: m4 eats our [], so we need to use [ and ] instead.
31991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31992   if test "x$has_forbidden_chars" != x; then
31993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31995   fi
31996 
31997 
31998   windows_path="$new_path"
31999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32000     unix_path=`$CYGPATH -u "$windows_path"`
32001     new_path="$unix_path"
32002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32004     new_path="$unix_path"
32005   fi
32006 
32007   if test "x$path" != "x$new_path"; then
32008     IMPORT_MODULES_TOPDIR="$new_path"
32009     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
32010 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
32011   fi
32012 
32013   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32014   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32015 
32016     else
32017       # We're on a unix platform. Hooray! :)
32018       path="$IMPORT_MODULES_TOPDIR"
32019       has_space=`$ECHO "$path" | $GREP " "`
32020       if test "x$has_space" != x; then
32021         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
32022 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
32023         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32024       fi
32025 
32026       # Use eval to expand a potential ~
32027       eval path="$path"
32028       if test ! -f "$path" && test ! -d "$path"; then
32029         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
32030       fi
32031 
32032       if test -d "$path"; then
32033         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
32034       else
32035         dir="`$DIRNAME "$path"`"
32036         base="`$BASENAME "$path"`"
32037         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
32038       fi
32039     fi
32040   fi
32041 
32042     elif test -e "$with_import_modules"; then
32043       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
32044       $RM -rf "$IMPORT_MODULES_TOPDIR"
32045       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
32046       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
32047         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32048       fi
32049     else
32050       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
32051     fi
32052   fi
32053 
32054   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
32055     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
32056   fi
32057   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
32058     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
32059   fi
32060   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
32061     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
32062   fi
32063   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
32064     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
32065   fi
32066   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
32067     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
32068   fi
32069   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
32070     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
32071   fi
32072   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
32073     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
32074   fi
32075   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
32076     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
32077   fi
32078 
32079 
32080 
32081 
32082 
32083 
32084 
32085 
32086 
32087 
32088 
32089 ###############################################################################
32090 #
32091 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
32092 # native code.
32093 #
32094 ###############################################################################
32095 
32096 # See if we are doing a complete static build or not
32097 
32098   # Check whether --enable-static-build was given.
32099 if test "${enable_static_build+set}" = set; then :
32100   enableval=$enable_static_build;
32101 fi
32102 
32103   STATIC_BUILD=false
32104   if test "x$enable_static_build" = "xyes"; then
32105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32106 $as_echo_n "checking if static build is enabled... " >&6; }
32107     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32108 $as_echo "yes" >&6; }
32109     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
32110       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
32111     fi
32112     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
32113     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32114     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32115     STATIC_BUILD=true
32116   elif test "x$enable_static_build" = "xno"; then
32117     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32118 $as_echo_n "checking if static build is enabled... " >&6; }
32119     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32120 $as_echo "no" >&6; }
32121   elif test "x$enable_static_build" != "x"; then
32122     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32123   fi
32124 
32125 
32126 
32127 
32128 # First determine the toolchain type (compiler family)
32129 
32130 
32131 # Check whether --with-toolchain-type was given.
32132 if test "${with_toolchain_type+set}" = set; then :
32133   withval=$with_toolchain_type;
32134 fi
32135 
32136 
32137   # Use indirect variable referencing
32138   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32139   VALID_TOOLCHAINS=${!toolchain_var_name}
32140 
32141   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32142     if test -n "$XCODEBUILD"; then
32143       # On Mac OS X, default toolchain to clang after Xcode 5
32144       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32145       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32146       if test $? -ne 0; then
32147         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32148       fi
32149       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32150           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32151           $CUT -f 1 -d .`
32152       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32153 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32154       if test $XCODE_MAJOR_VERSION -ge 5; then
32155           DEFAULT_TOOLCHAIN="clang"
32156       else
32157           DEFAULT_TOOLCHAIN="gcc"
32158       fi
32159     else
32160       # If Xcode is not installed, but the command line tools are
32161       # then we can't run xcodebuild. On these systems we should
32162       # default to clang
32163       DEFAULT_TOOLCHAIN="clang"
32164     fi
32165   else
32166     # First toolchain type in the list is the default
32167     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32168   fi
32169 
32170   if test "x$with_toolchain_type" = xlist; then
32171     # List all toolchains
32172     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32173 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32174     for toolchain in $VALID_TOOLCHAINS; do
32175       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32176       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32177       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32178     done
32179 
32180     exit 0
32181   elif test "x$with_toolchain_type" != x; then
32182     # User override; check that it is valid
32183     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32184       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32185 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32186       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32187 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32188       as_fn_error $? "Cannot continue." "$LINENO" 5
32189     fi
32190     TOOLCHAIN_TYPE=$with_toolchain_type
32191   else
32192     # No flag given, use default
32193     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32194   fi
32195 
32196 
32197   TOOLCHAIN_CC_BINARY_clang="clang"
32198   TOOLCHAIN_CC_BINARY_gcc="gcc"
32199   TOOLCHAIN_CC_BINARY_microsoft="cl"
32200   TOOLCHAIN_CC_BINARY_solstudio="cc"
32201   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32202 
32203   TOOLCHAIN_CXX_BINARY_clang="clang++"
32204   TOOLCHAIN_CXX_BINARY_gcc="g++"
32205   TOOLCHAIN_CXX_BINARY_microsoft="cl"
32206   TOOLCHAIN_CXX_BINARY_solstudio="CC"
32207   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32208 
32209   # Use indirect variable referencing
32210   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32211   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32212   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32213   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32214   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32215   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32216   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32217   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32218 
32219 
32220   # Define filename patterns
32221   if test "x$OPENJDK_TARGET_OS" = xwindows; then
32222     LIBRARY_PREFIX=
32223     SHARED_LIBRARY_SUFFIX='.dll'
32224     STATIC_LIBRARY_SUFFIX='.lib'
32225     SHARED_LIBRARY='$1.dll'
32226     STATIC_LIBRARY='$1.lib'
32227     OBJ_SUFFIX='.obj'
32228     EXE_SUFFIX='.exe'
32229   else
32230     LIBRARY_PREFIX=lib
32231     SHARED_LIBRARY_SUFFIX='.so'
32232     STATIC_LIBRARY_SUFFIX='.a'
32233     SHARED_LIBRARY='lib$1.so'
32234     STATIC_LIBRARY='lib$1.a'
32235     OBJ_SUFFIX='.o'
32236     EXE_SUFFIX=''
32237     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32238       # For full static builds, we're overloading the SHARED_LIBRARY
32239       # variables in order to limit the amount of changes required.
32240       # It would be better to remove SHARED and just use LIBRARY and
32241       # LIBRARY_SUFFIX for libraries that can be built either
32242       # shared or static and use STATIC_* for libraries that are
32243       # always built statically.
32244       if test "x$STATIC_BUILD" = xtrue; then
32245         SHARED_LIBRARY='lib$1.a'
32246         SHARED_LIBRARY_SUFFIX='.a'
32247       else
32248         SHARED_LIBRARY='lib$1.dylib'
32249         SHARED_LIBRARY_SUFFIX='.dylib'
32250       fi
32251     fi
32252   fi
32253 
32254 
32255 
32256 
32257 
32258 
32259 
32260 
32261 
32262 
32263   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32264     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32265 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32266   else
32267     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32268 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32269   fi
32270 
32271 
32272 # User supplied flags should be used when configure detects compilers
32273 
32274   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32275     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32276 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32277   fi
32278 
32279   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32280     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32281 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32282   fi
32283 
32284   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32285     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32286 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32287   fi
32288 
32289 
32290 # Check whether --with-extra-cflags was given.
32291 if test "${with_extra_cflags+set}" = set; then :
32292   withval=$with_extra_cflags;
32293 fi
32294 
32295 
32296 
32297 # Check whether --with-extra-cxxflags was given.
32298 if test "${with_extra_cxxflags+set}" = set; then :
32299   withval=$with_extra_cxxflags;
32300 fi
32301 
32302 
32303 
32304 # Check whether --with-extra-ldflags was given.
32305 if test "${with_extra_ldflags+set}" = set; then :
32306   withval=$with_extra_ldflags;
32307 fi
32308 
32309 
32310   EXTRA_CFLAGS="$with_extra_cflags"
32311   EXTRA_CXXFLAGS="$with_extra_cxxflags"
32312   EXTRA_LDFLAGS="$with_extra_ldflags"
32313 
32314 
32315 
32316 
32317 
32318   # The global CFLAGS and LDLAGS variables are used by configure tests and
32319   # should include the extra parameters
32320   CFLAGS="$EXTRA_CFLAGS"
32321   CXXFLAGS="$EXTRA_CXXFLAGS"
32322   LDFLAGS="$EXTRA_LDFLAGS"
32323   CPPFLAGS=""
32324 
32325 # The sysroot cflags are needed for configure to be able to run the compilers
32326 
32327   if test "x$SYSROOT" != "x"; then
32328     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32329       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32330         # Solaris Studio does not have a concept of sysroot. Instead we must
32331         # make sure the default include and lib dirs are appended to each
32332         # compile and link command line. Must also add -I-xbuiltin to enable
32333         # inlining of system functions and intrinsics.
32334         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32335         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32336             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32337       fi
32338     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32339       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32340       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32341     elif test "x$TOOLCHAIN_TYPE" = xclang; then
32342       SYSROOT_CFLAGS="-isysroot $SYSROOT"
32343       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32344     fi
32345     # The global CFLAGS and LDFLAGS variables need these for configure to function
32346     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32347     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32348     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32349     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32350   fi
32351 
32352   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32353     # We also need -iframework<path>/System/Library/Frameworks
32354     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32355     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32356     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32357     # set this here so it doesn't have to be peppered throughout the forest
32358     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32359     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32360   fi
32361 
32362 
32363 
32364 
32365 
32366 # Then detect the actual binaries needed
32367 
32368   # FIXME: Is this needed?
32369   ac_ext=cpp
32370 ac_cpp='$CXXCPP $CPPFLAGS'
32371 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32372 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32373 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32374 
32375 
32376   # Store the CFLAGS etc passed to the configure script.
32377   ORG_CFLAGS="$CFLAGS"
32378   ORG_CXXFLAGS="$CXXFLAGS"
32379 
32380   # autoconf magic only relies on PATH, so update it if tools dir is specified
32381   OLD_PATH="$PATH"
32382 
32383   # On Windows, we need to detect the visual studio installation first.
32384   # This will change the PATH, but we need to keep that new PATH even
32385   # after toolchain detection is done, since the compiler (on x86) uses
32386   # it for DLL resolution in runtime.
32387   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32388       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32389 
32390   # Store path to cygwin link.exe to help excluding it when searching for
32391   # VS linker. This must be done before changing the PATH when looking for VS.
32392   # Extract the first word of "link", so it can be a program name with args.
32393 set dummy link; ac_word=$2
32394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32395 $as_echo_n "checking for $ac_word... " >&6; }
32396 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32397   $as_echo_n "(cached) " >&6
32398 else
32399   case $CYGWIN_LINK in
32400   [\\/]* | ?:[\\/]*)
32401   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32402   ;;
32403   *)
32404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32405 for as_dir in $PATH
32406 do
32407   IFS=$as_save_IFS
32408   test -z "$as_dir" && as_dir=.
32409     for ac_exec_ext in '' $ac_executable_extensions; do
32410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32411     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32413     break 2
32414   fi
32415 done
32416   done
32417 IFS=$as_save_IFS
32418 
32419   ;;
32420 esac
32421 fi
32422 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32423 if test -n "$CYGWIN_LINK"; then
32424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32425 $as_echo "$CYGWIN_LINK" >&6; }
32426 else
32427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32428 $as_echo "no" >&6; }
32429 fi
32430 
32431 
32432   if test "x$CYGWIN_LINK" != x; then
32433     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32434 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32435     "$CYGWIN_LINK" --version > /dev/null
32436     if test $? -eq 0 ; then
32437       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32438 $as_echo "yes" >&6; }
32439     else
32440       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32441 $as_echo "no" >&6; }
32442       # This might be the VS linker. Don't exclude it later on.
32443       CYGWIN_LINK=""
32444     fi
32445   fi
32446 
32447   # First-hand choice is to locate and run the vsvars bat file.
32448 
32449 
32450 # Check whether --with-toolchain-version was given.
32451 if test "${with_toolchain_version+set}" = set; then :
32452   withval=$with_toolchain_version;
32453 fi
32454 
32455 
32456   if test "x$with_toolchain_version" = xlist; then
32457     # List all toolchains
32458     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32459 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32460     for version in $VALID_VS_VERSIONS; do
32461       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32462       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32463     done
32464 
32465     exit 0
32466   elif test "x$DEVKIT_VS_VERSION" != x; then
32467     VS_VERSION=$DEVKIT_VS_VERSION
32468     TOOLCHAIN_VERSION=$VS_VERSION
32469     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32470     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32471     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32472     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32473     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32474     VS_PATH="$TOOLCHAIN_PATH:$PATH"
32475 
32476     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32477     # can still be exported as INCLUDE for compiler invocations without
32478     # SYSROOT_CFLAGS
32479     OLDIFS="$IFS"
32480     IFS=";"
32481     for i in $DEVKIT_VS_INCLUDE; do
32482       ipath=$i
32483 
32484   unix_path="$ipath"
32485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32486     windows_path=`$CYGPATH -m "$unix_path"`
32487     ipath="$windows_path"
32488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32489     windows_path=`cmd //c echo $unix_path`
32490     ipath="$windows_path"
32491   fi
32492 
32493       VS_INCLUDE="$VS_INCLUDE;$ipath"
32494     done
32495     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32496     # as LIB for compiler invocations without SYSROOT_LDFLAGS
32497     for i in $DEVKIT_VS_LIB; do
32498       libpath=$i
32499 
32500   unix_path="$libpath"
32501   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32502     windows_path=`$CYGPATH -m "$unix_path"`
32503     libpath="$windows_path"
32504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32505     windows_path=`cmd //c echo $unix_path`
32506     libpath="$windows_path"
32507   fi
32508 
32509       VS_LIB="$VS_LIB;$libpath"
32510     done
32511     IFS="$OLDIFS"
32512 
32513     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32514 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32515 
32516   elif test "x$with_toolchain_version" != x; then
32517     # User override; check that it is valid
32518     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32519       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32520 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32521       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32522 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32523       as_fn_error $? "Cannot continue." "$LINENO" 5
32524     fi
32525     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32526   else
32527     # No flag given, use default
32528     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32529   fi
32530 
32531   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32532 
32533   VS_VERSION="$VS_VERSION"
32534   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32535   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32536   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32537   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32538 
32539   # When using --with-tools-dir, assume it points to the correct and default
32540   # version of Visual Studio or that --with-toolchain-version was also set.
32541   if test "x$with_tools_dir" != x; then
32542 
32543   if test "x$VS_ENV_CMD" = x; then
32544     VS_VERSION="${VS_VERSION}"
32545     VS_BASE="$with_tools_dir/../.."
32546     METHOD="--with-tools-dir"
32547 
32548     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32549       VCVARSFILE="vc/bin/vcvars32.bat"
32550     else
32551       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32552     fi
32553 
32554 
32555   windows_path="$VS_BASE"
32556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32557     unix_path=`$CYGPATH -u "$windows_path"`
32558     VS_BASE="$unix_path"
32559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32561     VS_BASE="$unix_path"
32562   fi
32563 
32564     if test -d "$VS_BASE"; then
32565       if test -f "$VS_BASE/$VCVARSFILE"; then
32566         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32567 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32568         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32569         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32570         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32571         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32572       else
32573         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32574 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32575         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32576 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32577       fi
32578     fi
32579   fi
32580 
32581 
32582   if test "x$VS_ENV_CMD" = x; then
32583     VS_VERSION="${VS_VERSION}"
32584     VS_BASE="$with_tools_dir/../../.."
32585     METHOD="--with-tools-dir"
32586 
32587     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32588       VCVARSFILE="vc/bin/vcvars32.bat"
32589     else
32590       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32591     fi
32592 
32593 
32594   windows_path="$VS_BASE"
32595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32596     unix_path=`$CYGPATH -u "$windows_path"`
32597     VS_BASE="$unix_path"
32598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32600     VS_BASE="$unix_path"
32601   fi
32602 
32603     if test -d "$VS_BASE"; then
32604       if test -f "$VS_BASE/$VCVARSFILE"; then
32605         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32606 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32607         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32608         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32609         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32610         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32611       else
32612         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32613 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32614         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32615 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32616       fi
32617     fi
32618   fi
32619 
32620     if test "x$VS_ENV_CMD" = x; then
32621       # Having specified an argument which is incorrect will produce an instant failure;
32622       # we should not go on looking
32623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32624 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32625       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32626 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32627       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32628 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32629       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32630     fi
32631   fi
32632 
32633   VS_ENV_CMD=""
32634   VS_ENV_ARGS=""
32635 
32636   if test "x$VS_COMNTOOLS" != x; then
32637 
32638   if test "x$VS_ENV_CMD" = x; then
32639     VS_VERSION="${VS_VERSION}"
32640     VS_BASE="$VS_COMNTOOLS/../.."
32641     METHOD="$VS_COMNTOOLS_VAR variable"
32642 
32643     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32644       VCVARSFILE="vc/bin/vcvars32.bat"
32645     else
32646       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32647     fi
32648 
32649 
32650   windows_path="$VS_BASE"
32651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32652     unix_path=`$CYGPATH -u "$windows_path"`
32653     VS_BASE="$unix_path"
32654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32656     VS_BASE="$unix_path"
32657   fi
32658 
32659     if test -d "$VS_BASE"; then
32660       if test -f "$VS_BASE/$VCVARSFILE"; then
32661         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32662 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32663         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32664         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32665         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32666         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32667       else
32668         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32669 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32670         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32671 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32672       fi
32673     fi
32674   fi
32675 
32676   fi
32677   if test "x$PROGRAMFILES" != x; then
32678 
32679   if test "x$VS_ENV_CMD" = x; then
32680     VS_VERSION="${VS_VERSION}"
32681     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32682     METHOD="well-known name"
32683 
32684     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32685       VCVARSFILE="vc/bin/vcvars32.bat"
32686     else
32687       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32688     fi
32689 
32690 
32691   windows_path="$VS_BASE"
32692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32693     unix_path=`$CYGPATH -u "$windows_path"`
32694     VS_BASE="$unix_path"
32695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32696     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32697     VS_BASE="$unix_path"
32698   fi
32699 
32700     if test -d "$VS_BASE"; then
32701       if test -f "$VS_BASE/$VCVARSFILE"; then
32702         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32703 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32704         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32705         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32706         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32707         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32708       else
32709         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32710 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32711         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32712 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32713       fi
32714     fi
32715   fi
32716 
32717   fi
32718   # Work around the insanely named ProgramFiles(x86) env variable
32719   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32720   if test "x$PROGRAMFILES_X86" != x; then
32721 
32722   if test "x$VS_ENV_CMD" = x; then
32723     VS_VERSION="${VS_VERSION}"
32724     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32725     METHOD="well-known name"
32726 
32727     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32728       VCVARSFILE="vc/bin/vcvars32.bat"
32729     else
32730       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32731     fi
32732 
32733 
32734   windows_path="$VS_BASE"
32735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32736     unix_path=`$CYGPATH -u "$windows_path"`
32737     VS_BASE="$unix_path"
32738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32740     VS_BASE="$unix_path"
32741   fi
32742 
32743     if test -d "$VS_BASE"; then
32744       if test -f "$VS_BASE/$VCVARSFILE"; then
32745         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32746 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32747         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32748         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32749         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32750         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32751       else
32752         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32753 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32754         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32755 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32756       fi
32757     fi
32758   fi
32759 
32760   fi
32761 
32762   if test "x$VS_ENV_CMD" = x; then
32763     VS_VERSION="${VS_VERSION}"
32764     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32765     METHOD="well-known name"
32766 
32767     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32768       VCVARSFILE="vc/bin/vcvars32.bat"
32769     else
32770       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32771     fi
32772 
32773 
32774   windows_path="$VS_BASE"
32775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32776     unix_path=`$CYGPATH -u "$windows_path"`
32777     VS_BASE="$unix_path"
32778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32780     VS_BASE="$unix_path"
32781   fi
32782 
32783     if test -d "$VS_BASE"; then
32784       if test -f "$VS_BASE/$VCVARSFILE"; then
32785         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32786 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32787         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32788         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32789         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32790         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32791       else
32792         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32793 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32794         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32795 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32796       fi
32797     fi
32798   fi
32799 
32800 
32801   if test "x$VS_ENV_CMD" = x; then
32802     VS_VERSION="${VS_VERSION}"
32803     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32804     METHOD="well-known name"
32805 
32806     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32807       VCVARSFILE="vc/bin/vcvars32.bat"
32808     else
32809       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32810     fi
32811 
32812 
32813   windows_path="$VS_BASE"
32814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32815     unix_path=`$CYGPATH -u "$windows_path"`
32816     VS_BASE="$unix_path"
32817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32819     VS_BASE="$unix_path"
32820   fi
32821 
32822     if test -d "$VS_BASE"; then
32823       if test -f "$VS_BASE/$VCVARSFILE"; then
32824         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32825 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32826         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32827         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32828         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32829         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32830       else
32831         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32832 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32833         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32834 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32835       fi
32836     fi
32837   fi
32838 
32839 
32840   if test "x$SDK_INSTALL_DIR" != x; then
32841     if test "x$ProgramW6432" != x; then
32842 
32843   if test "x$VS_ENV_CMD" = x; then
32844     VS_VERSION="${VS_VERSION}"
32845     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32846     METHOD="well-known name"
32847 
32848   windows_path="$WIN_SDK_BASE"
32849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32850     unix_path=`$CYGPATH -u "$windows_path"`
32851     WIN_SDK_BASE="$unix_path"
32852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32854     WIN_SDK_BASE="$unix_path"
32855   fi
32856 
32857     if test -d "$WIN_SDK_BASE"; then
32858       # There have been cases of partial or broken SDK installations. A missing
32859       # lib dir is not going to work.
32860       if test ! -d "$WIN_SDK_BASE/lib"; then
32861         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32862 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32863         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32864 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32865       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32866         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32867 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32868         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32869         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32870           VS_ENV_ARGS="/x86"
32871         else
32872           VS_ENV_ARGS="/x64"
32873         fi
32874         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32875         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32876         # TODO: improve detection for other versions of SDK
32877         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32878       else
32879         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32880 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32881         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32882 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32883       fi
32884     fi
32885   fi
32886 
32887     fi
32888     if test "x$PROGRAMW6432" != x; then
32889 
32890   if test "x$VS_ENV_CMD" = x; then
32891     VS_VERSION="${VS_VERSION}"
32892     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32893     METHOD="well-known name"
32894 
32895   windows_path="$WIN_SDK_BASE"
32896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32897     unix_path=`$CYGPATH -u "$windows_path"`
32898     WIN_SDK_BASE="$unix_path"
32899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32901     WIN_SDK_BASE="$unix_path"
32902   fi
32903 
32904     if test -d "$WIN_SDK_BASE"; then
32905       # There have been cases of partial or broken SDK installations. A missing
32906       # lib dir is not going to work.
32907       if test ! -d "$WIN_SDK_BASE/lib"; then
32908         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32909 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32910         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32911 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32912       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32913         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32914 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32915         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32916         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32917           VS_ENV_ARGS="/x86"
32918         else
32919           VS_ENV_ARGS="/x64"
32920         fi
32921         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32922         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32923         # TODO: improve detection for other versions of SDK
32924         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32925       else
32926         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32927 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32928         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32929 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32930       fi
32931     fi
32932   fi
32933 
32934     fi
32935     if test "x$PROGRAMFILES" != x; then
32936 
32937   if test "x$VS_ENV_CMD" = x; then
32938     VS_VERSION="${VS_VERSION}"
32939     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32940     METHOD="well-known name"
32941 
32942   windows_path="$WIN_SDK_BASE"
32943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32944     unix_path=`$CYGPATH -u "$windows_path"`
32945     WIN_SDK_BASE="$unix_path"
32946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32948     WIN_SDK_BASE="$unix_path"
32949   fi
32950 
32951     if test -d "$WIN_SDK_BASE"; then
32952       # There have been cases of partial or broken SDK installations. A missing
32953       # lib dir is not going to work.
32954       if test ! -d "$WIN_SDK_BASE/lib"; then
32955         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32956 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32957         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32958 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32959       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32960         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32961 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32962         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32963         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32964           VS_ENV_ARGS="/x86"
32965         else
32966           VS_ENV_ARGS="/x64"
32967         fi
32968         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32969         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32970         # TODO: improve detection for other versions of SDK
32971         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32972       else
32973         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32974 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32975         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32976 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32977       fi
32978     fi
32979   fi
32980 
32981     fi
32982 
32983   if test "x$VS_ENV_CMD" = x; then
32984     VS_VERSION="${VS_VERSION}"
32985     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32986     METHOD="well-known name"
32987 
32988   windows_path="$WIN_SDK_BASE"
32989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32990     unix_path=`$CYGPATH -u "$windows_path"`
32991     WIN_SDK_BASE="$unix_path"
32992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32994     WIN_SDK_BASE="$unix_path"
32995   fi
32996 
32997     if test -d "$WIN_SDK_BASE"; then
32998       # There have been cases of partial or broken SDK installations. A missing
32999       # lib dir is not going to work.
33000       if test ! -d "$WIN_SDK_BASE/lib"; then
33001         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33002 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33003         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
33004 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
33005       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
33006         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33007 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33008         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
33009         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
33010           VS_ENV_ARGS="/x86"
33011         else
33012           VS_ENV_ARGS="/x64"
33013         fi
33014         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
33015         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33016         # TODO: improve detection for other versions of SDK
33017         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33018       else
33019         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33020 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33021         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33022 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33023       fi
33024     fi
33025   fi
33026 
33027 
33028   if test "x$VS_ENV_CMD" = x; then
33029     VS_VERSION="${VS_VERSION}"
33030     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
33031     METHOD="well-known name"
33032 
33033   windows_path="$WIN_SDK_BASE"
33034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33035     unix_path=`$CYGPATH -u "$windows_path"`
33036     WIN_SDK_BASE="$unix_path"
33037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33039     WIN_SDK_BASE="$unix_path"
33040   fi
33041 
33042     if test -d "$WIN_SDK_BASE"; then
33043       # There have been cases of partial or broken SDK installations. A missing
33044       # lib dir is not going to work.
33045       if test ! -d "$WIN_SDK_BASE/lib"; then
33046         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33047 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33048         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
33049 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
33050       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
33051         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33052 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33053         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
33054         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
33055           VS_ENV_ARGS="/x86"
33056         else
33057           VS_ENV_ARGS="/x64"
33058         fi
33059         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
33060         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33061         # TODO: improve detection for other versions of SDK
33062         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33063       else
33064         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33065 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33066         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33067 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33068       fi
33069     fi
33070   fi
33071 
33072   fi
33073 
33074     if test "x$VS_ENV_CMD" != x; then
33075       TOOLCHAIN_VERSION=$VS_VERSION
33076       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
33077       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
33078       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
33079       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
33080       # The rest of the variables are already evaled while probing
33081       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
33082 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
33083       break
33084     fi
33085   done
33086 
33087 
33088   # If we have a devkit, skip all of the below.
33089   if test "x$DEVKIT_VS_VERSION" = x; then
33090     if test "x$VS_ENV_CMD" != x; then
33091       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
33092 
33093   # Only process if variable expands to non-empty
33094 
33095   if test "x$VS_ENV_CMD" != x; then
33096     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33097 
33098   # First separate the path from the arguments. This will split at the first
33099   # space.
33100   complete="$VS_ENV_CMD"
33101   path="${complete%% *}"
33102   tmp="$complete EOL"
33103   arguments="${tmp#* }"
33104 
33105   # Input might be given as Windows format, start by converting to
33106   # unix format.
33107   new_path=`$CYGPATH -u "$path"`
33108 
33109   # Now try to locate executable using which
33110   new_path=`$WHICH "$new_path" 2> /dev/null`
33111   # bat and cmd files are not always considered executable in cygwin causing which
33112   # to not find them
33113   if test "x$new_path" = x \
33114       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33115       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33116     new_path=`$CYGPATH -u "$path"`
33117   fi
33118   if test "x$new_path" = x; then
33119     # Oops. Which didn't find the executable.
33120     # The splitting of arguments from the executable at a space might have been incorrect,
33121     # since paths with space are more likely in Windows. Give it another try with the whole
33122     # argument.
33123     path="$complete"
33124     arguments="EOL"
33125     new_path=`$CYGPATH -u "$path"`
33126     new_path=`$WHICH "$new_path" 2> /dev/null`
33127     # bat and cmd files are not always considered executable in cygwin causing which
33128     # to not find them
33129     if test "x$new_path" = x \
33130         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33131         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33132       new_path=`$CYGPATH -u "$path"`
33133     fi
33134     if test "x$new_path" = x; then
33135       # It's still not found. Now this is an unrecoverable error.
33136       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33137 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33138       has_space=`$ECHO "$complete" | $GREP " "`
33139       if test "x$has_space" != x; then
33140         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33141 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33142       fi
33143       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33144     fi
33145   fi
33146 
33147   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33148   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33149   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33150   # "foo.exe" is OK but "foo" is an error.
33151   #
33152   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33153   # It is also a way to make sure we got the proper file name for the real test later on.
33154   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33155   if test "x$test_shortpath" = x; then
33156     # Short path failed, file does not exist as specified.
33157     # Try adding .exe or .cmd
33158     if test -f "${new_path}.exe"; then
33159       input_to_shortpath="${new_path}.exe"
33160     elif test -f "${new_path}.cmd"; then
33161       input_to_shortpath="${new_path}.cmd"
33162     else
33163       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33164 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33165       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33166 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33167       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33168     fi
33169   else
33170     input_to_shortpath="$new_path"
33171   fi
33172 
33173   # Call helper function which possibly converts this using DOS-style short mode.
33174   # If so, the updated path is stored in $new_path.
33175   new_path="$input_to_shortpath"
33176 
33177   input_path="$input_to_shortpath"
33178   # Check if we need to convert this using DOS-style short mode. If the path
33179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33180   # take no chances and rewrite it.
33181   # Note: m4 eats our [], so we need to use [ and ] instead.
33182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33183   if test "x$has_forbidden_chars" != x; then
33184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33185     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33186     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33187     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33188       # Going to short mode and back again did indeed matter. Since short mode is
33189       # case insensitive, let's make it lowercase to improve readability.
33190       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33191       # Now convert it back to Unix-style (cygpath)
33192       input_path=`$CYGPATH -u "$shortmode_path"`
33193       new_path="$input_path"
33194     fi
33195   fi
33196 
33197   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33198   if test "x$test_cygdrive_prefix" = x; then
33199     # As a simple fix, exclude /usr/bin since it's not a real path.
33200     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33201       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33202       # a path prefixed by /cygdrive for fixpath to work.
33203       new_path="$CYGWIN_ROOT_PATH$input_path"
33204     fi
33205   fi
33206 
33207   # remove trailing .exe if any
33208   new_path="${new_path/%.exe/}"
33209 
33210     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33211 
33212   # First separate the path from the arguments. This will split at the first
33213   # space.
33214   complete="$VS_ENV_CMD"
33215   path="${complete%% *}"
33216   tmp="$complete EOL"
33217   arguments="${tmp#* }"
33218 
33219   # Input might be given as Windows format, start by converting to
33220   # unix format.
33221   new_path="$path"
33222 
33223   windows_path="$new_path"
33224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33225     unix_path=`$CYGPATH -u "$windows_path"`
33226     new_path="$unix_path"
33227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33229     new_path="$unix_path"
33230   fi
33231 
33232 
33233   # Now try to locate executable using which
33234   new_path=`$WHICH "$new_path" 2> /dev/null`
33235 
33236   if test "x$new_path" = x; then
33237     # Oops. Which didn't find the executable.
33238     # The splitting of arguments from the executable at a space might have been incorrect,
33239     # since paths with space are more likely in Windows. Give it another try with the whole
33240     # argument.
33241     path="$complete"
33242     arguments="EOL"
33243     new_path="$path"
33244 
33245   windows_path="$new_path"
33246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33247     unix_path=`$CYGPATH -u "$windows_path"`
33248     new_path="$unix_path"
33249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33251     new_path="$unix_path"
33252   fi
33253 
33254 
33255     new_path=`$WHICH "$new_path" 2> /dev/null`
33256     # bat and cmd files are not always considered executable in MSYS causing which
33257     # to not find them
33258     if test "x$new_path" = x \
33259         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33260         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33261       new_path="$path"
33262 
33263   windows_path="$new_path"
33264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33265     unix_path=`$CYGPATH -u "$windows_path"`
33266     new_path="$unix_path"
33267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33269     new_path="$unix_path"
33270   fi
33271 
33272     fi
33273 
33274     if test "x$new_path" = x; then
33275       # It's still not found. Now this is an unrecoverable error.
33276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33277 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33278       has_space=`$ECHO "$complete" | $GREP " "`
33279       if test "x$has_space" != x; then
33280         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33281 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33282       fi
33283       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33284     fi
33285   fi
33286 
33287   # Now new_path has a complete unix path to the binary
33288   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33289     # Keep paths in /bin as-is, but remove trailing .exe if any
33290     new_path="${new_path/%.exe/}"
33291     # Do not save /bin paths to all_fixpath_prefixes!
33292   else
33293     # Not in mixed or Windows style, start by that.
33294     new_path=`cmd //c echo $new_path`
33295 
33296   input_path="$new_path"
33297   # Check if we need to convert this using DOS-style short mode. If the path
33298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33299   # take no chances and rewrite it.
33300   # Note: m4 eats our [], so we need to use [ and ] instead.
33301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33302   if test "x$has_forbidden_chars" != x; then
33303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33304     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33305   fi
33306 
33307     # Output is in $new_path
33308 
33309   windows_path="$new_path"
33310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33311     unix_path=`$CYGPATH -u "$windows_path"`
33312     new_path="$unix_path"
33313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33315     new_path="$unix_path"
33316   fi
33317 
33318     # remove trailing .exe if any
33319     new_path="${new_path/%.exe/}"
33320 
33321     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33322     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33323   fi
33324 
33325     else
33326       # We're on a unix platform. Hooray! :)
33327       # First separate the path from the arguments. This will split at the first
33328       # space.
33329       complete="$VS_ENV_CMD"
33330       path="${complete%% *}"
33331       tmp="$complete EOL"
33332       arguments="${tmp#* }"
33333 
33334       # Cannot rely on the command "which" here since it doesn't always work.
33335       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33336       if test -z "$is_absolute_path"; then
33337         # Path to executable is not absolute. Find it.
33338         IFS_save="$IFS"
33339         IFS=:
33340         for p in $PATH; do
33341           if test -f "$p/$path" && test -x "$p/$path"; then
33342             new_path="$p/$path"
33343             break
33344           fi
33345         done
33346         IFS="$IFS_save"
33347       else
33348         # This is an absolute path, we can use it without further modifications.
33349         new_path="$path"
33350       fi
33351 
33352       if test "x$new_path" = x; then
33353         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33354 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33355         has_space=`$ECHO "$complete" | $GREP " "`
33356         if test "x$has_space" != x; then
33357           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33358 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33359         fi
33360         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33361       fi
33362     fi
33363 
33364     # Now join together the path and the arguments once again
33365     if test "x$arguments" != xEOL; then
33366       new_complete="$new_path ${arguments% *}"
33367     else
33368       new_complete="$new_path"
33369     fi
33370 
33371     if test "x$complete" != "x$new_complete"; then
33372       VS_ENV_CMD="$new_complete"
33373       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33374 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33375     fi
33376   fi
33377 
33378 
33379       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33380       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33381 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33382 
33383       # We need to create a couple of temporary files.
33384       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33385       $MKDIR -p $VS_ENV_TMP_DIR
33386 
33387       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33388       # Instead create a shell script which will set the relevant variables when run.
33389       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33390 
33391   unix_path="$WINPATH_VS_ENV_CMD"
33392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33393     windows_path=`$CYGPATH -m "$unix_path"`
33394     WINPATH_VS_ENV_CMD="$windows_path"
33395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33396     windows_path=`cmd //c echo $unix_path`
33397     WINPATH_VS_ENV_CMD="$windows_path"
33398   fi
33399 
33400       WINPATH_BASH="$BASH"
33401 
33402   unix_path="$WINPATH_BASH"
33403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33404     windows_path=`$CYGPATH -m "$unix_path"`
33405     WINPATH_BASH="$windows_path"
33406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33407     windows_path=`cmd //c echo $unix_path`
33408     WINPATH_BASH="$windows_path"
33409   fi
33410 
33411 
33412       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33413       # script (executable by bash) that will setup the important variables.
33414       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33415       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33416       # This will end up something like:
33417       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33418       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33419       # These will end up something like:
33420       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33421       # The trailing space for everyone except PATH is no typo, but is needed due
33422       # to trailing \ in the Windows paths. These will be stripped later.
33423       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33424           >> $EXTRACT_VC_ENV_BAT_FILE
33425       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33426           >> $EXTRACT_VC_ENV_BAT_FILE
33427       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33428           >> $EXTRACT_VC_ENV_BAT_FILE
33429       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33430           >> $EXTRACT_VC_ENV_BAT_FILE
33431       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33432           >> $EXTRACT_VC_ENV_BAT_FILE
33433       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33434           >> $EXTRACT_VC_ENV_BAT_FILE
33435 
33436       # Now execute the newly created bat file.
33437       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33438       # Change directory so we don't need to mess with Windows paths in redirects.
33439       cd $VS_ENV_TMP_DIR
33440       cmd /c extract-vs-env.bat | $CAT
33441       cd $CURDIR
33442 
33443       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33444         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33445 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33446         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33447 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33448         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33449 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33450         as_fn_error $? "Cannot continue" "$LINENO" 5
33451       fi
33452 
33453       # Now set all paths and other env variables. This will allow the rest of
33454       # the configure script to find and run the compiler in the proper way.
33455       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33456 $as_echo "$as_me: Setting extracted environment variables" >&6;}
33457       . $VS_ENV_TMP_DIR/set-vs-env.sh
33458       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33459       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33460     else
33461       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33462       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33463 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33464     fi
33465   fi
33466 
33467   # At this point, we should have correct variables in the environment, or we can't continue.
33468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33469 $as_echo_n "checking for Visual Studio variables... " >&6; }
33470 
33471   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33472       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33473     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33475 $as_echo "present but broken" >&6; }
33476       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33477     else
33478       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33479 $as_echo "ok" >&6; }
33480       # Remove any trailing "\" ";" and " " from the variables.
33481       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33482       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33483       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33484       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33485       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33486       # Remove any paths containing # (typically F#) as that messes up make. This
33487       # is needed if visual studio was installed with F# support.
33488       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33489 
33490 
33491 
33492 
33493 
33494       # Convert VS_INCLUDE into SYSROOT_CFLAGS
33495       OLDIFS="$IFS"
33496       IFS=";"
33497       for i in $VS_INCLUDE; do
33498         ipath=$i
33499         # Only process non-empty elements
33500         if test "x$ipath" != x; then
33501           IFS="$OLDIFS"
33502           # Check that directory exists before calling fixup_path
33503           testpath=$ipath
33504 
33505   windows_path="$testpath"
33506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33507     unix_path=`$CYGPATH -u "$windows_path"`
33508     testpath="$unix_path"
33509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33511     testpath="$unix_path"
33512   fi
33513 
33514           if test -d "$testpath"; then
33515 
33516   # Only process if variable expands to non-empty
33517 
33518   if test "x$ipath" != x; then
33519     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33520 
33521   # Input might be given as Windows format, start by converting to
33522   # unix format.
33523   path="$ipath"
33524   new_path=`$CYGPATH -u "$path"`
33525 
33526   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33527   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33528   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33529   # "foo.exe" is OK but "foo" is an error.
33530   #
33531   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33532   # It is also a way to make sure we got the proper file name for the real test later on.
33533   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33534   if test "x$test_shortpath" = x; then
33535     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33536 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33537     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33538   fi
33539 
33540   # Call helper function which possibly converts this using DOS-style short mode.
33541   # If so, the updated path is stored in $new_path.
33542 
33543   input_path="$new_path"
33544   # Check if we need to convert this using DOS-style short mode. If the path
33545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33546   # take no chances and rewrite it.
33547   # Note: m4 eats our [], so we need to use [ and ] instead.
33548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33549   if test "x$has_forbidden_chars" != x; then
33550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33551     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33552     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33553     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33554       # Going to short mode and back again did indeed matter. Since short mode is
33555       # case insensitive, let's make it lowercase to improve readability.
33556       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33557       # Now convert it back to Unix-style (cygpath)
33558       input_path=`$CYGPATH -u "$shortmode_path"`
33559       new_path="$input_path"
33560     fi
33561   fi
33562 
33563   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33564   if test "x$test_cygdrive_prefix" = x; then
33565     # As a simple fix, exclude /usr/bin since it's not a real path.
33566     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33567       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33568       # a path prefixed by /cygdrive for fixpath to work.
33569       new_path="$CYGWIN_ROOT_PATH$input_path"
33570     fi
33571   fi
33572 
33573 
33574   if test "x$path" != "x$new_path"; then
33575     ipath="$new_path"
33576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33577 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33578   fi
33579 
33580     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33581 
33582   path="$ipath"
33583   has_colon=`$ECHO $path | $GREP ^.:`
33584   new_path="$path"
33585   if test "x$has_colon" = x; then
33586     # Not in mixed or Windows style, start by that.
33587     new_path=`cmd //c echo $path`
33588   fi
33589 
33590 
33591   input_path="$new_path"
33592   # Check if we need to convert this using DOS-style short mode. If the path
33593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33594   # take no chances and rewrite it.
33595   # Note: m4 eats our [], so we need to use [ and ] instead.
33596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33597   if test "x$has_forbidden_chars" != x; then
33598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33599     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33600   fi
33601 
33602 
33603   windows_path="$new_path"
33604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33605     unix_path=`$CYGPATH -u "$windows_path"`
33606     new_path="$unix_path"
33607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33609     new_path="$unix_path"
33610   fi
33611 
33612   if test "x$path" != "x$new_path"; then
33613     ipath="$new_path"
33614     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33615 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33616   fi
33617 
33618   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33619   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33620 
33621     else
33622       # We're on a unix platform. Hooray! :)
33623       path="$ipath"
33624       has_space=`$ECHO "$path" | $GREP " "`
33625       if test "x$has_space" != x; then
33626         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33627 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33628         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33629       fi
33630 
33631       # Use eval to expand a potential ~
33632       eval path="$path"
33633       if test ! -f "$path" && test ! -d "$path"; then
33634         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33635       fi
33636 
33637       if test -d "$path"; then
33638         ipath="`cd "$path"; $THEPWDCMD -L`"
33639       else
33640         dir="`$DIRNAME "$path"`"
33641         base="`$BASENAME "$path"`"
33642         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33643       fi
33644     fi
33645   fi
33646 
33647             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33648           fi
33649           IFS=";"
33650         fi
33651       done
33652       # Convert VS_LIB into SYSROOT_LDFLAGS
33653       for i in $VS_LIB; do
33654         libpath=$i
33655         # Only process non-empty elements
33656         if test "x$libpath" != x; then
33657           IFS="$OLDIFS"
33658           # Check that directory exists before calling fixup_path
33659           testpath=$libpath
33660 
33661   windows_path="$testpath"
33662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33663     unix_path=`$CYGPATH -u "$windows_path"`
33664     testpath="$unix_path"
33665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33667     testpath="$unix_path"
33668   fi
33669 
33670           if test -d "$testpath"; then
33671 
33672   # Only process if variable expands to non-empty
33673 
33674   if test "x$libpath" != x; then
33675     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33676 
33677   # Input might be given as Windows format, start by converting to
33678   # unix format.
33679   path="$libpath"
33680   new_path=`$CYGPATH -u "$path"`
33681 
33682   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33683   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33684   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33685   # "foo.exe" is OK but "foo" is an error.
33686   #
33687   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33688   # It is also a way to make sure we got the proper file name for the real test later on.
33689   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33690   if test "x$test_shortpath" = x; then
33691     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33692 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33693     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33694   fi
33695 
33696   # Call helper function which possibly converts this using DOS-style short mode.
33697   # If so, the updated path is stored in $new_path.
33698 
33699   input_path="$new_path"
33700   # Check if we need to convert this using DOS-style short mode. If the path
33701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33702   # take no chances and rewrite it.
33703   # Note: m4 eats our [], so we need to use [ and ] instead.
33704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33705   if test "x$has_forbidden_chars" != x; then
33706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33707     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33708     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33709     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33710       # Going to short mode and back again did indeed matter. Since short mode is
33711       # case insensitive, let's make it lowercase to improve readability.
33712       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33713       # Now convert it back to Unix-style (cygpath)
33714       input_path=`$CYGPATH -u "$shortmode_path"`
33715       new_path="$input_path"
33716     fi
33717   fi
33718 
33719   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33720   if test "x$test_cygdrive_prefix" = x; then
33721     # As a simple fix, exclude /usr/bin since it's not a real path.
33722     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33723       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33724       # a path prefixed by /cygdrive for fixpath to work.
33725       new_path="$CYGWIN_ROOT_PATH$input_path"
33726     fi
33727   fi
33728 
33729 
33730   if test "x$path" != "x$new_path"; then
33731     libpath="$new_path"
33732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33733 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33734   fi
33735 
33736     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33737 
33738   path="$libpath"
33739   has_colon=`$ECHO $path | $GREP ^.:`
33740   new_path="$path"
33741   if test "x$has_colon" = x; then
33742     # Not in mixed or Windows style, start by that.
33743     new_path=`cmd //c echo $path`
33744   fi
33745 
33746 
33747   input_path="$new_path"
33748   # Check if we need to convert this using DOS-style short mode. If the path
33749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33750   # take no chances and rewrite it.
33751   # Note: m4 eats our [], so we need to use [ and ] instead.
33752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33753   if test "x$has_forbidden_chars" != x; then
33754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33755     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33756   fi
33757 
33758 
33759   windows_path="$new_path"
33760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33761     unix_path=`$CYGPATH -u "$windows_path"`
33762     new_path="$unix_path"
33763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33765     new_path="$unix_path"
33766   fi
33767 
33768   if test "x$path" != "x$new_path"; then
33769     libpath="$new_path"
33770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33771 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33772   fi
33773 
33774   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33775   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33776 
33777     else
33778       # We're on a unix platform. Hooray! :)
33779       path="$libpath"
33780       has_space=`$ECHO "$path" | $GREP " "`
33781       if test "x$has_space" != x; then
33782         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33783 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33784         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33785       fi
33786 
33787       # Use eval to expand a potential ~
33788       eval path="$path"
33789       if test ! -f "$path" && test ! -d "$path"; then
33790         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33791       fi
33792 
33793       if test -d "$path"; then
33794         libpath="`cd "$path"; $THEPWDCMD -L`"
33795       else
33796         dir="`$DIRNAME "$path"`"
33797         base="`$BASENAME "$path"`"
33798         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33799       fi
33800     fi
33801   fi
33802 
33803             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33804           fi
33805           IFS=";"
33806         fi
33807       done
33808       IFS="$OLDIFS"
33809     fi
33810   else
33811     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33812 $as_echo "not found" >&6; }
33813 
33814     if test "x$VS_ENV_CMD" = x; then
33815       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33816 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33817       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33818 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33819     else
33820       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33821 $as_echo "$as_me: Running the extraction script failed." >&6;}
33822     fi
33823     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33824 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33825     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33826 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33827     as_fn_error $? "Cannot continue" "$LINENO" 5
33828   fi
33829 
33830     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33831     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33832     PATH="$VS_PATH"
33833     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33834     export INCLUDE="$VS_INCLUDE"
33835     export LIB="$VS_LIB"
33836   else
33837     if test "x$XCODE_VERSION_OUTPUT" != x; then
33838       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33839       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33840       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33841     else
33842       # Currently we do not define this for other toolchains. This might change as the need arise.
33843       TOOLCHAIN_VERSION=
33844     fi
33845   fi
33846 
33847 
33848   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33849   # override all other locations.
33850   if test "x$TOOLCHAIN_PATH" != x; then
33851     PATH=$TOOLCHAIN_PATH:$PATH
33852   fi
33853 
33854 
33855   #
33856   # Setup the compilers (CC and CXX)
33857   #
33858 
33859   COMPILER_NAME=C
33860   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33861 
33862   if test "x$CC" != x; then
33863     # User has supplied compiler name already, always let that override.
33864     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33865 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33866     if test "x`basename $CC`" = "x$CC"; then
33867       # A command without a complete path is provided, search $PATH.
33868 
33869       for ac_prog in $CC
33870 do
33871   # Extract the first word of "$ac_prog", so it can be a program name with args.
33872 set dummy $ac_prog; ac_word=$2
33873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33874 $as_echo_n "checking for $ac_word... " >&6; }
33875 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33876   $as_echo_n "(cached) " >&6
33877 else
33878   case $POTENTIAL_CC in
33879   [\\/]* | ?:[\\/]*)
33880   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33881   ;;
33882   *)
33883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33884 for as_dir in $PATH
33885 do
33886   IFS=$as_save_IFS
33887   test -z "$as_dir" && as_dir=.
33888     for ac_exec_ext in '' $ac_executable_extensions; do
33889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33890     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33892     break 2
33893   fi
33894 done
33895   done
33896 IFS=$as_save_IFS
33897 
33898   ;;
33899 esac
33900 fi
33901 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33902 if test -n "$POTENTIAL_CC"; then
33903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33904 $as_echo "$POTENTIAL_CC" >&6; }
33905 else
33906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33907 $as_echo "no" >&6; }
33908 fi
33909 
33910 
33911   test -n "$POTENTIAL_CC" && break
33912 done
33913 
33914       if test "x$POTENTIAL_CC" != x; then
33915         CC=$POTENTIAL_CC
33916       else
33917         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33918       fi
33919     else
33920       # Otherwise it might already be a complete path
33921       if test ! -x "$CC"; then
33922         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33923       fi
33924     fi
33925   else
33926     # No user supplied value. Locate compiler ourselves.
33927 
33928     # If we are cross compiling, assume cross compilation tools follows the
33929     # cross compilation standard where they are prefixed with the autoconf
33930     # standard name for the target. For example the binary
33931     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33932     # If we are not cross compiling, then the default compiler name will be
33933     # used.
33934 
33935     CC=
33936     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33937     # before checking the rest of the PATH.
33938     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33939     # step, this should not be necessary.
33940     if test -n "$TOOLCHAIN_PATH"; then
33941       PATH_save="$PATH"
33942       PATH="$TOOLCHAIN_PATH"
33943       if test -n "$ac_tool_prefix"; then
33944   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33945 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33947 $as_echo_n "checking for $ac_word... " >&6; }
33948 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33949   $as_echo_n "(cached) " >&6
33950 else
33951   case $TOOLCHAIN_PATH_CC in
33952   [\\/]* | ?:[\\/]*)
33953   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33954   ;;
33955   *)
33956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33957 for as_dir in $PATH
33958 do
33959   IFS=$as_save_IFS
33960   test -z "$as_dir" && as_dir=.
33961     for ac_exec_ext in '' $ac_executable_extensions; do
33962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33963     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33965     break 2
33966   fi
33967 done
33968   done
33969 IFS=$as_save_IFS
33970 
33971   ;;
33972 esac
33973 fi
33974 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33975 if test -n "$TOOLCHAIN_PATH_CC"; then
33976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33977 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33978 else
33979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33980 $as_echo "no" >&6; }
33981 fi
33982 
33983 
33984 fi
33985 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33986   ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33987   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33988 set dummy $SEARCH_LIST; ac_word=$2
33989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33990 $as_echo_n "checking for $ac_word... " >&6; }
33991 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33992   $as_echo_n "(cached) " >&6
33993 else
33994   case $ac_pt_TOOLCHAIN_PATH_CC in
33995   [\\/]* | ?:[\\/]*)
33996   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33997   ;;
33998   *)
33999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34000 for as_dir in $PATH
34001 do
34002   IFS=$as_save_IFS
34003   test -z "$as_dir" && as_dir=.
34004     for ac_exec_ext in '' $ac_executable_extensions; do
34005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34006     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
34007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34008     break 2
34009   fi
34010 done
34011   done
34012 IFS=$as_save_IFS
34013 
34014   ;;
34015 esac
34016 fi
34017 ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
34018 if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
34019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
34020 $as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
34021 else
34022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34023 $as_echo "no" >&6; }
34024 fi
34025 
34026   if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
34027     TOOLCHAIN_PATH_CC=""
34028   else
34029     case $cross_compiling:$ac_tool_warned in
34030 yes:)
34031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34032 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34033 ac_tool_warned=yes ;;
34034 esac
34035     TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
34036   fi
34037 else
34038   TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
34039 fi
34040 
34041       CC=$TOOLCHAIN_PATH_CC
34042       PATH="$PATH_save"
34043     fi
34044 
34045     # AC_PATH_TOOL can't be run multiple times with the same variable,
34046     # so create a new name for this run.
34047     if test "x$CC" = x; then
34048       if test -n "$ac_tool_prefix"; then
34049   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34050 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34052 $as_echo_n "checking for $ac_word... " >&6; }
34053 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
34054   $as_echo_n "(cached) " >&6
34055 else
34056   case $POTENTIAL_CC in
34057   [\\/]* | ?:[\\/]*)
34058   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
34059   ;;
34060   *)
34061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34062 for as_dir in $PATH
34063 do
34064   IFS=$as_save_IFS
34065   test -z "$as_dir" && as_dir=.
34066     for ac_exec_ext in '' $ac_executable_extensions; do
34067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34068     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34070     break 2
34071   fi
34072 done
34073   done
34074 IFS=$as_save_IFS
34075 
34076   ;;
34077 esac
34078 fi
34079 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
34080 if test -n "$POTENTIAL_CC"; then
34081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
34082 $as_echo "$POTENTIAL_CC" >&6; }
34083 else
34084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34085 $as_echo "no" >&6; }
34086 fi
34087 
34088 
34089 fi
34090 if test -z "$ac_cv_path_POTENTIAL_CC"; then
34091   ac_pt_POTENTIAL_CC=$POTENTIAL_CC
34092   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34093 set dummy $SEARCH_LIST; ac_word=$2
34094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34095 $as_echo_n "checking for $ac_word... " >&6; }
34096 if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
34097   $as_echo_n "(cached) " >&6
34098 else
34099   case $ac_pt_POTENTIAL_CC in
34100   [\\/]* | ?:[\\/]*)
34101   ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
34102   ;;
34103   *)
34104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34105 for as_dir in $PATH
34106 do
34107   IFS=$as_save_IFS
34108   test -z "$as_dir" && as_dir=.
34109     for ac_exec_ext in '' $ac_executable_extensions; do
34110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34111     ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34113     break 2
34114   fi
34115 done
34116   done
34117 IFS=$as_save_IFS
34118 
34119   ;;
34120 esac
34121 fi
34122 ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34123 if test -n "$ac_pt_POTENTIAL_CC"; then
34124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34125 $as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34126 else
34127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34128 $as_echo "no" >&6; }
34129 fi
34130 
34131   if test "x$ac_pt_POTENTIAL_CC" = x; then
34132     POTENTIAL_CC=""
34133   else
34134     case $cross_compiling:$ac_tool_warned in
34135 yes:)
34136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34137 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34138 ac_tool_warned=yes ;;
34139 esac
34140     POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34141   fi
34142 else
34143   POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34144 fi
34145 
34146       CC=$POTENTIAL_CC
34147     fi
34148 
34149     if test "x$CC" = x; then
34150 
34151   # Print a helpful message on how to acquire the necessary build dependency.
34152   # devkit is the help tag: freetype, cups, alsa etc
34153   MISSING_DEPENDENCY=devkit
34154 
34155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34156     cygwin_help $MISSING_DEPENDENCY
34157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34158     msys_help $MISSING_DEPENDENCY
34159   else
34160     PKGHANDLER_COMMAND=
34161 
34162     case $PKGHANDLER in
34163       apt-get)
34164         apt_help     $MISSING_DEPENDENCY ;;
34165       yum)
34166         yum_help     $MISSING_DEPENDENCY ;;
34167       brew)
34168         brew_help    $MISSING_DEPENDENCY ;;
34169       port)
34170         port_help    $MISSING_DEPENDENCY ;;
34171       pkgutil)
34172         pkgutil_help $MISSING_DEPENDENCY ;;
34173       pkgadd)
34174         pkgadd_help  $MISSING_DEPENDENCY ;;
34175     esac
34176 
34177     if test "x$PKGHANDLER_COMMAND" != x; then
34178       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34179     fi
34180   fi
34181 
34182       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34183     fi
34184   fi
34185 
34186   # Now we have a compiler binary in CC. Make sure it's okay.
34187 
34188   # Only process if variable expands to non-empty
34189 
34190   if test "x$CC" != x; then
34191     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192 
34193   # First separate the path from the arguments. This will split at the first
34194   # space.
34195   complete="$CC"
34196   path="${complete%% *}"
34197   tmp="$complete EOL"
34198   arguments="${tmp#* }"
34199 
34200   # Input might be given as Windows format, start by converting to
34201   # unix format.
34202   new_path=`$CYGPATH -u "$path"`
34203 
34204   # Now try to locate executable using which
34205   new_path=`$WHICH "$new_path" 2> /dev/null`
34206   # bat and cmd files are not always considered executable in cygwin causing which
34207   # to not find them
34208   if test "x$new_path" = x \
34209       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34210       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34211     new_path=`$CYGPATH -u "$path"`
34212   fi
34213   if test "x$new_path" = x; then
34214     # Oops. Which didn't find the executable.
34215     # The splitting of arguments from the executable at a space might have been incorrect,
34216     # since paths with space are more likely in Windows. Give it another try with the whole
34217     # argument.
34218     path="$complete"
34219     arguments="EOL"
34220     new_path=`$CYGPATH -u "$path"`
34221     new_path=`$WHICH "$new_path" 2> /dev/null`
34222     # bat and cmd files are not always considered executable in cygwin causing which
34223     # to not find them
34224     if test "x$new_path" = x \
34225         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34226         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34227       new_path=`$CYGPATH -u "$path"`
34228     fi
34229     if test "x$new_path" = x; then
34230       # It's still not found. Now this is an unrecoverable error.
34231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34232 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34233       has_space=`$ECHO "$complete" | $GREP " "`
34234       if test "x$has_space" != x; then
34235         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34236 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34237       fi
34238       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34239     fi
34240   fi
34241 
34242   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34243   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34244   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34245   # "foo.exe" is OK but "foo" is an error.
34246   #
34247   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34248   # It is also a way to make sure we got the proper file name for the real test later on.
34249   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34250   if test "x$test_shortpath" = x; then
34251     # Short path failed, file does not exist as specified.
34252     # Try adding .exe or .cmd
34253     if test -f "${new_path}.exe"; then
34254       input_to_shortpath="${new_path}.exe"
34255     elif test -f "${new_path}.cmd"; then
34256       input_to_shortpath="${new_path}.cmd"
34257     else
34258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34259 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34260       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34261 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34262       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34263     fi
34264   else
34265     input_to_shortpath="$new_path"
34266   fi
34267 
34268   # Call helper function which possibly converts this using DOS-style short mode.
34269   # If so, the updated path is stored in $new_path.
34270   new_path="$input_to_shortpath"
34271 
34272   input_path="$input_to_shortpath"
34273   # Check if we need to convert this using DOS-style short mode. If the path
34274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34275   # take no chances and rewrite it.
34276   # Note: m4 eats our [], so we need to use [ and ] instead.
34277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34278   if test "x$has_forbidden_chars" != x; then
34279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34283       # Going to short mode and back again did indeed matter. Since short mode is
34284       # case insensitive, let's make it lowercase to improve readability.
34285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34286       # Now convert it back to Unix-style (cygpath)
34287       input_path=`$CYGPATH -u "$shortmode_path"`
34288       new_path="$input_path"
34289     fi
34290   fi
34291 
34292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34293   if test "x$test_cygdrive_prefix" = x; then
34294     # As a simple fix, exclude /usr/bin since it's not a real path.
34295     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34297       # a path prefixed by /cygdrive for fixpath to work.
34298       new_path="$CYGWIN_ROOT_PATH$input_path"
34299     fi
34300   fi
34301 
34302   # remove trailing .exe if any
34303   new_path="${new_path/%.exe/}"
34304 
34305     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34306 
34307   # First separate the path from the arguments. This will split at the first
34308   # space.
34309   complete="$CC"
34310   path="${complete%% *}"
34311   tmp="$complete EOL"
34312   arguments="${tmp#* }"
34313 
34314   # Input might be given as Windows format, start by converting to
34315   # unix format.
34316   new_path="$path"
34317 
34318   windows_path="$new_path"
34319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34320     unix_path=`$CYGPATH -u "$windows_path"`
34321     new_path="$unix_path"
34322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34324     new_path="$unix_path"
34325   fi
34326 
34327 
34328   # Now try to locate executable using which
34329   new_path=`$WHICH "$new_path" 2> /dev/null`
34330 
34331   if test "x$new_path" = x; then
34332     # Oops. Which didn't find the executable.
34333     # The splitting of arguments from the executable at a space might have been incorrect,
34334     # since paths with space are more likely in Windows. Give it another try with the whole
34335     # argument.
34336     path="$complete"
34337     arguments="EOL"
34338     new_path="$path"
34339 
34340   windows_path="$new_path"
34341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34342     unix_path=`$CYGPATH -u "$windows_path"`
34343     new_path="$unix_path"
34344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34346     new_path="$unix_path"
34347   fi
34348 
34349 
34350     new_path=`$WHICH "$new_path" 2> /dev/null`
34351     # bat and cmd files are not always considered executable in MSYS causing which
34352     # to not find them
34353     if test "x$new_path" = x \
34354         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34355         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34356       new_path="$path"
34357 
34358   windows_path="$new_path"
34359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34360     unix_path=`$CYGPATH -u "$windows_path"`
34361     new_path="$unix_path"
34362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34364     new_path="$unix_path"
34365   fi
34366 
34367     fi
34368 
34369     if test "x$new_path" = x; then
34370       # It's still not found. Now this is an unrecoverable error.
34371       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34372 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34373       has_space=`$ECHO "$complete" | $GREP " "`
34374       if test "x$has_space" != x; then
34375         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34376 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34377       fi
34378       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34379     fi
34380   fi
34381 
34382   # Now new_path has a complete unix path to the binary
34383   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34384     # Keep paths in /bin as-is, but remove trailing .exe if any
34385     new_path="${new_path/%.exe/}"
34386     # Do not save /bin paths to all_fixpath_prefixes!
34387   else
34388     # Not in mixed or Windows style, start by that.
34389     new_path=`cmd //c echo $new_path`
34390 
34391   input_path="$new_path"
34392   # Check if we need to convert this using DOS-style short mode. If the path
34393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34394   # take no chances and rewrite it.
34395   # Note: m4 eats our [], so we need to use [ and ] instead.
34396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34397   if test "x$has_forbidden_chars" != x; then
34398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34400   fi
34401 
34402     # Output is in $new_path
34403 
34404   windows_path="$new_path"
34405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34406     unix_path=`$CYGPATH -u "$windows_path"`
34407     new_path="$unix_path"
34408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34410     new_path="$unix_path"
34411   fi
34412 
34413     # remove trailing .exe if any
34414     new_path="${new_path/%.exe/}"
34415 
34416     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34417     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34418   fi
34419 
34420     else
34421       # We're on a unix platform. Hooray! :)
34422       # First separate the path from the arguments. This will split at the first
34423       # space.
34424       complete="$CC"
34425       path="${complete%% *}"
34426       tmp="$complete EOL"
34427       arguments="${tmp#* }"
34428 
34429       # Cannot rely on the command "which" here since it doesn't always work.
34430       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34431       if test -z "$is_absolute_path"; then
34432         # Path to executable is not absolute. Find it.
34433         IFS_save="$IFS"
34434         IFS=:
34435         for p in $PATH; do
34436           if test -f "$p/$path" && test -x "$p/$path"; then
34437             new_path="$p/$path"
34438             break
34439           fi
34440         done
34441         IFS="$IFS_save"
34442       else
34443         # This is an absolute path, we can use it without further modifications.
34444         new_path="$path"
34445       fi
34446 
34447       if test "x$new_path" = x; then
34448         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34449 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34450         has_space=`$ECHO "$complete" | $GREP " "`
34451         if test "x$has_space" != x; then
34452           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34453 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34454         fi
34455         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34456       fi
34457     fi
34458 
34459     # Now join together the path and the arguments once again
34460     if test "x$arguments" != xEOL; then
34461       new_complete="$new_path ${arguments% *}"
34462     else
34463       new_complete="$new_path"
34464     fi
34465 
34466     if test "x$complete" != "x$new_complete"; then
34467       CC="$new_complete"
34468       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34469 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34470     fi
34471   fi
34472 
34473   TEST_COMPILER="$CC"
34474 
34475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34476 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
34477   SYMLINK_ORIGINAL="$TEST_COMPILER"
34478 
34479   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34480     # Follow a chain of symbolic links. Use readlink
34481     # where it exists, else fall back to horribly
34482     # complicated shell code.
34483     if test "x$READLINK_TESTED" != yes; then
34484       # On MacOSX there is a readlink tool with a different
34485       # purpose than the GNU readlink tool. Check the found readlink.
34486       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34487       if test "x$ISGNU" = x; then
34488         # A readlink that we do not know how to use.
34489         # Are there other non-GNU readlinks out there?
34490         READLINK_TESTED=yes
34491         READLINK=
34492       fi
34493     fi
34494 
34495     if test "x$READLINK" != x; then
34496       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34497     else
34498       # Save the current directory for restoring afterwards
34499       STARTDIR=$PWD
34500       COUNTER=0
34501       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34502       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34503       cd $sym_link_dir
34504       # Use -P flag to resolve symlinks in directories.
34505       cd `$THEPWDCMD -P`
34506       sym_link_dir=`$THEPWDCMD -P`
34507       # Resolve file symlinks
34508       while test $COUNTER -lt 20; do
34509         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34510         if test "x$ISLINK" == x; then
34511           # This is not a symbolic link! We are done!
34512           break
34513         fi
34514         # Again resolve directory symlinks since the target of the just found
34515         # link could be in a different directory
34516         cd `$DIRNAME $ISLINK`
34517         sym_link_dir=`$THEPWDCMD -P`
34518         sym_link_file=`$BASENAME $ISLINK`
34519         let COUNTER=COUNTER+1
34520       done
34521       cd $STARTDIR
34522       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34523     fi
34524   fi
34525 
34526   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34528 $as_echo "no symlink" >&6; }
34529   else
34530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34531 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34532 
34533     # We can't handle ccache by gcc wrappers, since we need to know if we're
34534     # using ccache. Instead ccache usage must be controlled by a configure option.
34535     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34536     if test "x$COMPILER_BASENAME" = "xccache"; then
34537       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34538 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34539       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34540     fi
34541   fi
34542 
34543 
34544   COMPILER=$CC
34545   COMPILER_NAME=$COMPILER_NAME
34546 
34547   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34548     # cc -V output typically looks like
34549     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34550     # or
34551     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34552     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34553     # Check that this is likely to be the Solaris Studio cc.
34554     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34555     if test $? -ne 0; then
34556       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34557       { $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
34558 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34559       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34560 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34561       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34562 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34563       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34564     fi
34565     # Remove usage instructions (if present), and
34566     # collapse compiler output into a single line
34567     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34568         $SED -e 's/ *[Uu]sage:.*//'`
34569     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34570         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34571   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34572     # xlc -qversion output typically looks like
34573     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34574     #     Version: 11.01.0000.0015
34575     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34576     # Check that this is likely to be the IBM XL C compiler.
34577     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34578     if test $? -ne 0; then
34579       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34580       { $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
34581 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34582       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34583 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34584       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34585 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34586       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34587     fi
34588     # Collapse compiler output into a single line
34589     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34590     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34591         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34592   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34593     # There is no specific version flag, but all output starts with a version string.
34594     # First line typically looks something like:
34595     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34596     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34597     # Check that this is likely to be Microsoft CL.EXE.
34598     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34599     if test $? -ne 0; then
34600       { $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
34601 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34602       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34603 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34604       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34605     fi
34606     # Collapse compiler output into a single line
34607     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34608     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34609         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34610   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34611     # gcc --version output typically looks like
34612     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34613     #     Copyright (C) 2013 Free Software Foundation, Inc.
34614     #     This is free software; see the source for copying conditions.  There is NO
34615     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34616     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34617     # Check that this is likely to be GCC.
34618     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34619     if test $? -ne 0; then
34620       { $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
34621 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34622       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34623 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34624       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34625     fi
34626     # Remove Copyright and legalese from version string, and
34627     # collapse into a single line
34628     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34629         $SED -e 's/ *Copyright .*//'`
34630     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34631         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34632   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34633     # clang --version output typically looks like
34634     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34635     #    clang version 3.3 (tags/RELEASE_33/final)
34636     # or
34637     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34638     #    Target: x86_64-pc-linux-gnu
34639     #    Thread model: posix
34640     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34641     # Check that this is likely to be clang
34642     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34643     if test $? -ne 0; then
34644       { $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
34645 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34646       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34647 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34648       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34649     fi
34650     # Collapse compiler output into a single line
34651     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34652     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34653         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34654   else
34655       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34656   fi
34657   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34658   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34659   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34660   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34661 
34662   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34663 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34664 
34665 
34666   # Now that we have resolved CC ourself, let autoconf have its go at it
34667   ac_ext=c
34668 ac_cpp='$CPP $CPPFLAGS'
34669 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34670 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34671 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34672 if test -n "$ac_tool_prefix"; then
34673   for ac_prog in $CC
34674   do
34675     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34676 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34678 $as_echo_n "checking for $ac_word... " >&6; }
34679 if ${ac_cv_prog_CC+:} false; then :
34680   $as_echo_n "(cached) " >&6
34681 else
34682   if test -n "$CC"; then
34683   ac_cv_prog_CC="$CC" # Let the user override the test.
34684 else
34685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34686 for as_dir in $PATH
34687 do
34688   IFS=$as_save_IFS
34689   test -z "$as_dir" && as_dir=.
34690     for ac_exec_ext in '' $ac_executable_extensions; do
34691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34692     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34694     break 2
34695   fi
34696 done
34697   done
34698 IFS=$as_save_IFS
34699 
34700 fi
34701 fi
34702 CC=$ac_cv_prog_CC
34703 if test -n "$CC"; then
34704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34705 $as_echo "$CC" >&6; }
34706 else
34707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34708 $as_echo "no" >&6; }
34709 fi
34710 
34711 
34712     test -n "$CC" && break
34713   done
34714 fi
34715 if test -z "$CC"; then
34716   ac_ct_CC=$CC
34717   for ac_prog in $CC
34718 do
34719   # Extract the first word of "$ac_prog", so it can be a program name with args.
34720 set dummy $ac_prog; ac_word=$2
34721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34722 $as_echo_n "checking for $ac_word... " >&6; }
34723 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34724   $as_echo_n "(cached) " >&6
34725 else
34726   if test -n "$ac_ct_CC"; then
34727   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34728 else
34729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34730 for as_dir in $PATH
34731 do
34732   IFS=$as_save_IFS
34733   test -z "$as_dir" && as_dir=.
34734     for ac_exec_ext in '' $ac_executable_extensions; do
34735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34736     ac_cv_prog_ac_ct_CC="$ac_prog"
34737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34738     break 2
34739   fi
34740 done
34741   done
34742 IFS=$as_save_IFS
34743 
34744 fi
34745 fi
34746 ac_ct_CC=$ac_cv_prog_ac_ct_CC
34747 if test -n "$ac_ct_CC"; then
34748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34749 $as_echo "$ac_ct_CC" >&6; }
34750 else
34751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34752 $as_echo "no" >&6; }
34753 fi
34754 
34755 
34756   test -n "$ac_ct_CC" && break
34757 done
34758 
34759   if test "x$ac_ct_CC" = x; then
34760     CC=""
34761   else
34762     case $cross_compiling:$ac_tool_warned in
34763 yes:)
34764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34765 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34766 ac_tool_warned=yes ;;
34767 esac
34768     CC=$ac_ct_CC
34769   fi
34770 fi
34771 
34772 
34773 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34774 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34775 as_fn_error $? "no acceptable C compiler found in \$PATH
34776 See \`config.log' for more details" "$LINENO" 5; }
34777 
34778 # Provide some information about the compiler.
34779 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34780 set X $ac_compile
34781 ac_compiler=$2
34782 for ac_option in --version -v -V -qversion; do
34783   { { ac_try="$ac_compiler $ac_option >&5"
34784 case "(($ac_try" in
34785   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34786   *) ac_try_echo=$ac_try;;
34787 esac
34788 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34789 $as_echo "$ac_try_echo"; } >&5
34790   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34791   ac_status=$?
34792   if test -s conftest.err; then
34793     sed '10a\
34794 ... rest of stderr output deleted ...
34795          10q' conftest.err >conftest.er1
34796     cat conftest.er1 >&5
34797   fi
34798   rm -f conftest.er1 conftest.err
34799   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34800   test $ac_status = 0; }
34801 done
34802 
34803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34804 /* end confdefs.h.  */
34805 
34806 int
34807 main ()
34808 {
34809 
34810   ;
34811   return 0;
34812 }
34813 _ACEOF
34814 ac_clean_files_save=$ac_clean_files
34815 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34816 # Try to create an executable without -o first, disregard a.out.
34817 # It will help us diagnose broken compilers, and finding out an intuition
34818 # of exeext.
34819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34820 $as_echo_n "checking whether the C compiler works... " >&6; }
34821 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34822 
34823 # The possible output files:
34824 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34825 
34826 ac_rmfiles=
34827 for ac_file in $ac_files
34828 do
34829   case $ac_file in
34830     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34831     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34832   esac
34833 done
34834 rm -f $ac_rmfiles
34835 
34836 if { { ac_try="$ac_link_default"
34837 case "(($ac_try" in
34838   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34839   *) ac_try_echo=$ac_try;;
34840 esac
34841 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34842 $as_echo "$ac_try_echo"; } >&5
34843   (eval "$ac_link_default") 2>&5
34844   ac_status=$?
34845   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34846   test $ac_status = 0; }; then :
34847   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34848 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34849 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
34850 # so that the user can short-circuit this test for compilers unknown to
34851 # Autoconf.
34852 for ac_file in $ac_files ''
34853 do
34854   test -f "$ac_file" || continue
34855   case $ac_file in
34856     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34857         ;;
34858     [ab].out )
34859         # We found the default executable, but exeext='' is most
34860         # certainly right.
34861         break;;
34862     *.* )
34863         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34864         then :; else
34865            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34866         fi
34867         # We set ac_cv_exeext here because the later test for it is not
34868         # safe: cross compilers may not add the suffix if given an `-o'
34869         # argument, so we may need to know it at that point already.
34870         # Even if this section looks crufty: it has the advantage of
34871         # actually working.
34872         break;;
34873     * )
34874         break;;
34875   esac
34876 done
34877 test "$ac_cv_exeext" = no && ac_cv_exeext=
34878 
34879 else
34880   ac_file=''
34881 fi
34882 if test -z "$ac_file"; then :
34883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34884 $as_echo "no" >&6; }
34885 $as_echo "$as_me: failed program was:" >&5
34886 sed 's/^/| /' conftest.$ac_ext >&5
34887 
34888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34889 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34890 as_fn_error 77 "C compiler cannot create executables
34891 See \`config.log' for more details" "$LINENO" 5; }
34892 else
34893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34894 $as_echo "yes" >&6; }
34895 fi
34896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34897 $as_echo_n "checking for C compiler default output file name... " >&6; }
34898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34899 $as_echo "$ac_file" >&6; }
34900 ac_exeext=$ac_cv_exeext
34901 
34902 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34903 ac_clean_files=$ac_clean_files_save
34904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34905 $as_echo_n "checking for suffix of executables... " >&6; }
34906 if { { ac_try="$ac_link"
34907 case "(($ac_try" in
34908   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34909   *) ac_try_echo=$ac_try;;
34910 esac
34911 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34912 $as_echo "$ac_try_echo"; } >&5
34913   (eval "$ac_link") 2>&5
34914   ac_status=$?
34915   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34916   test $ac_status = 0; }; then :
34917   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34918 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34919 # work properly (i.e., refer to `conftest.exe'), while it won't with
34920 # `rm'.
34921 for ac_file in conftest.exe conftest conftest.*; do
34922   test -f "$ac_file" || continue
34923   case $ac_file in
34924     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34925     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34926           break;;
34927     * ) break;;
34928   esac
34929 done
34930 else
34931   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34932 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34933 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34934 See \`config.log' for more details" "$LINENO" 5; }
34935 fi
34936 rm -f conftest conftest$ac_cv_exeext
34937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34938 $as_echo "$ac_cv_exeext" >&6; }
34939 
34940 rm -f conftest.$ac_ext
34941 EXEEXT=$ac_cv_exeext
34942 ac_exeext=$EXEEXT
34943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34944 /* end confdefs.h.  */
34945 #include <stdio.h>
34946 int
34947 main ()
34948 {
34949 FILE *f = fopen ("conftest.out", "w");
34950  return ferror (f) || fclose (f) != 0;
34951 
34952   ;
34953   return 0;
34954 }
34955 _ACEOF
34956 ac_clean_files="$ac_clean_files conftest.out"
34957 # Check that the compiler produces executables we can run.  If not, either
34958 # the compiler is broken, or we cross compile.
34959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34960 $as_echo_n "checking whether we are cross compiling... " >&6; }
34961 if test "$cross_compiling" != yes; then
34962   { { ac_try="$ac_link"
34963 case "(($ac_try" in
34964   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34965   *) ac_try_echo=$ac_try;;
34966 esac
34967 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34968 $as_echo "$ac_try_echo"; } >&5
34969   (eval "$ac_link") 2>&5
34970   ac_status=$?
34971   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34972   test $ac_status = 0; }
34973   if { ac_try='./conftest$ac_cv_exeext'
34974   { { case "(($ac_try" in
34975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34976   *) ac_try_echo=$ac_try;;
34977 esac
34978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34979 $as_echo "$ac_try_echo"; } >&5
34980   (eval "$ac_try") 2>&5
34981   ac_status=$?
34982   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34983   test $ac_status = 0; }; }; then
34984     cross_compiling=no
34985   else
34986     if test "$cross_compiling" = maybe; then
34987         cross_compiling=yes
34988     else
34989         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34990 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34991 as_fn_error $? "cannot run C compiled programs.
34992 If you meant to cross compile, use \`--host'.
34993 See \`config.log' for more details" "$LINENO" 5; }
34994     fi
34995   fi
34996 fi
34997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34998 $as_echo "$cross_compiling" >&6; }
34999 
35000 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
35001 ac_clean_files=$ac_clean_files_save
35002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
35003 $as_echo_n "checking for suffix of object files... " >&6; }
35004 if ${ac_cv_objext+:} false; then :
35005   $as_echo_n "(cached) " >&6
35006 else
35007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35008 /* end confdefs.h.  */
35009 
35010 int
35011 main ()
35012 {
35013 
35014   ;
35015   return 0;
35016 }
35017 _ACEOF
35018 rm -f conftest.o conftest.obj
35019 if { { ac_try="$ac_compile"
35020 case "(($ac_try" in
35021   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35022   *) ac_try_echo=$ac_try;;
35023 esac
35024 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35025 $as_echo "$ac_try_echo"; } >&5
35026   (eval "$ac_compile") 2>&5
35027   ac_status=$?
35028   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35029   test $ac_status = 0; }; then :
35030   for ac_file in conftest.o conftest.obj conftest.*; do
35031   test -f "$ac_file" || continue;
35032   case $ac_file in
35033     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
35034     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
35035        break;;
35036   esac
35037 done
35038 else
35039   $as_echo "$as_me: failed program was:" >&5
35040 sed 's/^/| /' conftest.$ac_ext >&5
35041 
35042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35043 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35044 as_fn_error $? "cannot compute suffix of object files: cannot compile
35045 See \`config.log' for more details" "$LINENO" 5; }
35046 fi
35047 rm -f conftest.$ac_cv_objext conftest.$ac_ext
35048 fi
35049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
35050 $as_echo "$ac_cv_objext" >&6; }
35051 OBJEXT=$ac_cv_objext
35052 ac_objext=$OBJEXT
35053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
35054 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
35055 if ${ac_cv_c_compiler_gnu+:} false; then :
35056   $as_echo_n "(cached) " >&6
35057 else
35058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35059 /* end confdefs.h.  */
35060 
35061 int
35062 main ()
35063 {
35064 #ifndef __GNUC__
35065        choke me
35066 #endif
35067 
35068   ;
35069   return 0;
35070 }
35071 _ACEOF
35072 if ac_fn_c_try_compile "$LINENO"; then :
35073   ac_compiler_gnu=yes
35074 else
35075   ac_compiler_gnu=no
35076 fi
35077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35078 ac_cv_c_compiler_gnu=$ac_compiler_gnu
35079 
35080 fi
35081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
35082 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
35083 if test $ac_compiler_gnu = yes; then
35084   GCC=yes
35085 else
35086   GCC=
35087 fi
35088 ac_test_CFLAGS=${CFLAGS+set}
35089 ac_save_CFLAGS=$CFLAGS
35090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
35091 $as_echo_n "checking whether $CC accepts -g... " >&6; }
35092 if ${ac_cv_prog_cc_g+:} false; then :
35093   $as_echo_n "(cached) " >&6
35094 else
35095   ac_save_c_werror_flag=$ac_c_werror_flag
35096    ac_c_werror_flag=yes
35097    ac_cv_prog_cc_g=no
35098    CFLAGS="-g"
35099    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35100 /* end confdefs.h.  */
35101 
35102 int
35103 main ()
35104 {
35105 
35106   ;
35107   return 0;
35108 }
35109 _ACEOF
35110 if ac_fn_c_try_compile "$LINENO"; then :
35111   ac_cv_prog_cc_g=yes
35112 else
35113   CFLAGS=""
35114       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35115 /* end confdefs.h.  */
35116 
35117 int
35118 main ()
35119 {
35120 
35121   ;
35122   return 0;
35123 }
35124 _ACEOF
35125 if ac_fn_c_try_compile "$LINENO"; then :
35126 
35127 else
35128   ac_c_werror_flag=$ac_save_c_werror_flag
35129          CFLAGS="-g"
35130          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35131 /* end confdefs.h.  */
35132 
35133 int
35134 main ()
35135 {
35136 
35137   ;
35138   return 0;
35139 }
35140 _ACEOF
35141 if ac_fn_c_try_compile "$LINENO"; then :
35142   ac_cv_prog_cc_g=yes
35143 fi
35144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35145 fi
35146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35147 fi
35148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35149    ac_c_werror_flag=$ac_save_c_werror_flag
35150 fi
35151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35152 $as_echo "$ac_cv_prog_cc_g" >&6; }
35153 if test "$ac_test_CFLAGS" = set; then
35154   CFLAGS=$ac_save_CFLAGS
35155 elif test $ac_cv_prog_cc_g = yes; then
35156   if test "$GCC" = yes; then
35157     CFLAGS="-g -O2"
35158   else
35159     CFLAGS="-g"
35160   fi
35161 else
35162   if test "$GCC" = yes; then
35163     CFLAGS="-O2"
35164   else
35165     CFLAGS=
35166   fi
35167 fi
35168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35169 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35170 if ${ac_cv_prog_cc_c89+:} false; then :
35171   $as_echo_n "(cached) " >&6
35172 else
35173   ac_cv_prog_cc_c89=no
35174 ac_save_CC=$CC
35175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35176 /* end confdefs.h.  */
35177 #include <stdarg.h>
35178 #include <stdio.h>
35179 struct stat;
35180 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35181 struct buf { int x; };
35182 FILE * (*rcsopen) (struct buf *, struct stat *, int);
35183 static char *e (p, i)
35184      char **p;
35185      int i;
35186 {
35187   return p[i];
35188 }
35189 static char *f (char * (*g) (char **, int), char **p, ...)
35190 {
35191   char *s;
35192   va_list v;
35193   va_start (v,p);
35194   s = g (p, va_arg (v,int));
35195   va_end (v);
35196   return s;
35197 }
35198 
35199 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35200    function prototypes and stuff, but not '\xHH' hex character constants.
35201    These don't provoke an error unfortunately, instead are silently treated
35202    as 'x'.  The following induces an error, until -std is added to get
35203    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35204    array size at least.  It's necessary to write '\x00'==0 to get something
35205    that's true only with -std.  */
35206 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35207 
35208 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35209    inside strings and character constants.  */
35210 #define FOO(x) 'x'
35211 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35212 
35213 int test (int i, double x);
35214 struct s1 {int (*f) (int a);};
35215 struct s2 {int (*f) (double a);};
35216 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35217 int argc;
35218 char **argv;
35219 int
35220 main ()
35221 {
35222 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35223   ;
35224   return 0;
35225 }
35226 _ACEOF
35227 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35228         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35229 do
35230   CC="$ac_save_CC $ac_arg"
35231   if ac_fn_c_try_compile "$LINENO"; then :
35232   ac_cv_prog_cc_c89=$ac_arg
35233 fi
35234 rm -f core conftest.err conftest.$ac_objext
35235   test "x$ac_cv_prog_cc_c89" != "xno" && break
35236 done
35237 rm -f conftest.$ac_ext
35238 CC=$ac_save_CC
35239 
35240 fi
35241 # AC_CACHE_VAL
35242 case "x$ac_cv_prog_cc_c89" in
35243   x)
35244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35245 $as_echo "none needed" >&6; } ;;
35246   xno)
35247     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35248 $as_echo "unsupported" >&6; } ;;
35249   *)
35250     CC="$CC $ac_cv_prog_cc_c89"
35251     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35252 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35253 esac
35254 if test "x$ac_cv_prog_cc_c89" != xno; then :
35255 
35256 fi
35257 
35258 ac_ext=cpp
35259 ac_cpp='$CXXCPP $CPPFLAGS'
35260 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35261 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35262 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35263 
35264 
35265 
35266   COMPILER_NAME=C++
35267   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35268 
35269   if test "x$CXX" != x; then
35270     # User has supplied compiler name already, always let that override.
35271     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35272 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35273     if test "x`basename $CXX`" = "x$CXX"; then
35274       # A command without a complete path is provided, search $PATH.
35275 
35276       for ac_prog in $CXX
35277 do
35278   # Extract the first word of "$ac_prog", so it can be a program name with args.
35279 set dummy $ac_prog; ac_word=$2
35280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35281 $as_echo_n "checking for $ac_word... " >&6; }
35282 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35283   $as_echo_n "(cached) " >&6
35284 else
35285   case $POTENTIAL_CXX in
35286   [\\/]* | ?:[\\/]*)
35287   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35288   ;;
35289   *)
35290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35291 for as_dir in $PATH
35292 do
35293   IFS=$as_save_IFS
35294   test -z "$as_dir" && as_dir=.
35295     for ac_exec_ext in '' $ac_executable_extensions; do
35296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35297     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35299     break 2
35300   fi
35301 done
35302   done
35303 IFS=$as_save_IFS
35304 
35305   ;;
35306 esac
35307 fi
35308 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35309 if test -n "$POTENTIAL_CXX"; then
35310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35311 $as_echo "$POTENTIAL_CXX" >&6; }
35312 else
35313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35314 $as_echo "no" >&6; }
35315 fi
35316 
35317 
35318   test -n "$POTENTIAL_CXX" && break
35319 done
35320 
35321       if test "x$POTENTIAL_CXX" != x; then
35322         CXX=$POTENTIAL_CXX
35323       else
35324         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35325       fi
35326     else
35327       # Otherwise it might already be a complete path
35328       if test ! -x "$CXX"; then
35329         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35330       fi
35331     fi
35332   else
35333     # No user supplied value. Locate compiler ourselves.
35334 
35335     # If we are cross compiling, assume cross compilation tools follows the
35336     # cross compilation standard where they are prefixed with the autoconf
35337     # standard name for the target. For example the binary
35338     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35339     # If we are not cross compiling, then the default compiler name will be
35340     # used.
35341 
35342     CXX=
35343     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35344     # before checking the rest of the PATH.
35345     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35346     # step, this should not be necessary.
35347     if test -n "$TOOLCHAIN_PATH"; then
35348       PATH_save="$PATH"
35349       PATH="$TOOLCHAIN_PATH"
35350       if test -n "$ac_tool_prefix"; then
35351   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35352 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35354 $as_echo_n "checking for $ac_word... " >&6; }
35355 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35356   $as_echo_n "(cached) " >&6
35357 else
35358   case $TOOLCHAIN_PATH_CXX in
35359   [\\/]* | ?:[\\/]*)
35360   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35361   ;;
35362   *)
35363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35364 for as_dir in $PATH
35365 do
35366   IFS=$as_save_IFS
35367   test -z "$as_dir" && as_dir=.
35368     for ac_exec_ext in '' $ac_executable_extensions; do
35369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35370     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35372     break 2
35373   fi
35374 done
35375   done
35376 IFS=$as_save_IFS
35377 
35378   ;;
35379 esac
35380 fi
35381 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35382 if test -n "$TOOLCHAIN_PATH_CXX"; then
35383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35384 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35385 else
35386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35387 $as_echo "no" >&6; }
35388 fi
35389 
35390 
35391 fi
35392 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35393   ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35394   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35395 set dummy $SEARCH_LIST; ac_word=$2
35396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35397 $as_echo_n "checking for $ac_word... " >&6; }
35398 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35399   $as_echo_n "(cached) " >&6
35400 else
35401   case $ac_pt_TOOLCHAIN_PATH_CXX in
35402   [\\/]* | ?:[\\/]*)
35403   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35404   ;;
35405   *)
35406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35407 for as_dir in $PATH
35408 do
35409   IFS=$as_save_IFS
35410   test -z "$as_dir" && as_dir=.
35411     for ac_exec_ext in '' $ac_executable_extensions; do
35412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35413     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35415     break 2
35416   fi
35417 done
35418   done
35419 IFS=$as_save_IFS
35420 
35421   ;;
35422 esac
35423 fi
35424 ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35425 if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35427 $as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35428 else
35429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35430 $as_echo "no" >&6; }
35431 fi
35432 
35433   if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35434     TOOLCHAIN_PATH_CXX=""
35435   else
35436     case $cross_compiling:$ac_tool_warned in
35437 yes:)
35438 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35439 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35440 ac_tool_warned=yes ;;
35441 esac
35442     TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35443   fi
35444 else
35445   TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35446 fi
35447 
35448       CXX=$TOOLCHAIN_PATH_CXX
35449       PATH="$PATH_save"
35450     fi
35451 
35452     # AC_PATH_TOOL can't be run multiple times with the same variable,
35453     # so create a new name for this run.
35454     if test "x$CXX" = x; then
35455       if test -n "$ac_tool_prefix"; then
35456   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35457 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35459 $as_echo_n "checking for $ac_word... " >&6; }
35460 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35461   $as_echo_n "(cached) " >&6
35462 else
35463   case $POTENTIAL_CXX in
35464   [\\/]* | ?:[\\/]*)
35465   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35466   ;;
35467   *)
35468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35469 for as_dir in $PATH
35470 do
35471   IFS=$as_save_IFS
35472   test -z "$as_dir" && as_dir=.
35473     for ac_exec_ext in '' $ac_executable_extensions; do
35474   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35475     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35477     break 2
35478   fi
35479 done
35480   done
35481 IFS=$as_save_IFS
35482 
35483   ;;
35484 esac
35485 fi
35486 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35487 if test -n "$POTENTIAL_CXX"; then
35488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35489 $as_echo "$POTENTIAL_CXX" >&6; }
35490 else
35491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35492 $as_echo "no" >&6; }
35493 fi
35494 
35495 
35496 fi
35497 if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35498   ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35499   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35500 set dummy $SEARCH_LIST; ac_word=$2
35501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35502 $as_echo_n "checking for $ac_word... " >&6; }
35503 if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35504   $as_echo_n "(cached) " >&6
35505 else
35506   case $ac_pt_POTENTIAL_CXX in
35507   [\\/]* | ?:[\\/]*)
35508   ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35509   ;;
35510   *)
35511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35512 for as_dir in $PATH
35513 do
35514   IFS=$as_save_IFS
35515   test -z "$as_dir" && as_dir=.
35516     for ac_exec_ext in '' $ac_executable_extensions; do
35517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35518     ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35520     break 2
35521   fi
35522 done
35523   done
35524 IFS=$as_save_IFS
35525 
35526   ;;
35527 esac
35528 fi
35529 ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35530 if test -n "$ac_pt_POTENTIAL_CXX"; then
35531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35532 $as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35533 else
35534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35535 $as_echo "no" >&6; }
35536 fi
35537 
35538   if test "x$ac_pt_POTENTIAL_CXX" = x; then
35539     POTENTIAL_CXX=""
35540   else
35541     case $cross_compiling:$ac_tool_warned in
35542 yes:)
35543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35544 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35545 ac_tool_warned=yes ;;
35546 esac
35547     POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35548   fi
35549 else
35550   POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35551 fi
35552 
35553       CXX=$POTENTIAL_CXX
35554     fi
35555 
35556     if test "x$CXX" = x; then
35557 
35558   # Print a helpful message on how to acquire the necessary build dependency.
35559   # devkit is the help tag: freetype, cups, alsa etc
35560   MISSING_DEPENDENCY=devkit
35561 
35562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35563     cygwin_help $MISSING_DEPENDENCY
35564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35565     msys_help $MISSING_DEPENDENCY
35566   else
35567     PKGHANDLER_COMMAND=
35568 
35569     case $PKGHANDLER in
35570       apt-get)
35571         apt_help     $MISSING_DEPENDENCY ;;
35572       yum)
35573         yum_help     $MISSING_DEPENDENCY ;;
35574       brew)
35575         brew_help    $MISSING_DEPENDENCY ;;
35576       port)
35577         port_help    $MISSING_DEPENDENCY ;;
35578       pkgutil)
35579         pkgutil_help $MISSING_DEPENDENCY ;;
35580       pkgadd)
35581         pkgadd_help  $MISSING_DEPENDENCY ;;
35582     esac
35583 
35584     if test "x$PKGHANDLER_COMMAND" != x; then
35585       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35586     fi
35587   fi
35588 
35589       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35590     fi
35591   fi
35592 
35593   # Now we have a compiler binary in CXX. Make sure it's okay.
35594 
35595   # Only process if variable expands to non-empty
35596 
35597   if test "x$CXX" != x; then
35598     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35599 
35600   # First separate the path from the arguments. This will split at the first
35601   # space.
35602   complete="$CXX"
35603   path="${complete%% *}"
35604   tmp="$complete EOL"
35605   arguments="${tmp#* }"
35606 
35607   # Input might be given as Windows format, start by converting to
35608   # unix format.
35609   new_path=`$CYGPATH -u "$path"`
35610 
35611   # Now try to locate executable using which
35612   new_path=`$WHICH "$new_path" 2> /dev/null`
35613   # bat and cmd files are not always considered executable in cygwin causing which
35614   # to not find them
35615   if test "x$new_path" = x \
35616       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35617       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35618     new_path=`$CYGPATH -u "$path"`
35619   fi
35620   if test "x$new_path" = x; then
35621     # Oops. Which didn't find the executable.
35622     # The splitting of arguments from the executable at a space might have been incorrect,
35623     # since paths with space are more likely in Windows. Give it another try with the whole
35624     # argument.
35625     path="$complete"
35626     arguments="EOL"
35627     new_path=`$CYGPATH -u "$path"`
35628     new_path=`$WHICH "$new_path" 2> /dev/null`
35629     # bat and cmd files are not always considered executable in cygwin causing which
35630     # to not find them
35631     if test "x$new_path" = x \
35632         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35633         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35634       new_path=`$CYGPATH -u "$path"`
35635     fi
35636     if test "x$new_path" = x; then
35637       # It's still not found. Now this is an unrecoverable error.
35638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35639 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35640       has_space=`$ECHO "$complete" | $GREP " "`
35641       if test "x$has_space" != x; then
35642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35644       fi
35645       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35646     fi
35647   fi
35648 
35649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35652   # "foo.exe" is OK but "foo" is an error.
35653   #
35654   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35655   # It is also a way to make sure we got the proper file name for the real test later on.
35656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35657   if test "x$test_shortpath" = x; then
35658     # Short path failed, file does not exist as specified.
35659     # Try adding .exe or .cmd
35660     if test -f "${new_path}.exe"; then
35661       input_to_shortpath="${new_path}.exe"
35662     elif test -f "${new_path}.cmd"; then
35663       input_to_shortpath="${new_path}.cmd"
35664     else
35665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35666 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35667       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35669       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35670     fi
35671   else
35672     input_to_shortpath="$new_path"
35673   fi
35674 
35675   # Call helper function which possibly converts this using DOS-style short mode.
35676   # If so, the updated path is stored in $new_path.
35677   new_path="$input_to_shortpath"
35678 
35679   input_path="$input_to_shortpath"
35680   # Check if we need to convert this using DOS-style short mode. If the path
35681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35682   # take no chances and rewrite it.
35683   # Note: m4 eats our [], so we need to use [ and ] instead.
35684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35685   if test "x$has_forbidden_chars" != x; then
35686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35690       # Going to short mode and back again did indeed matter. Since short mode is
35691       # case insensitive, let's make it lowercase to improve readability.
35692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35693       # Now convert it back to Unix-style (cygpath)
35694       input_path=`$CYGPATH -u "$shortmode_path"`
35695       new_path="$input_path"
35696     fi
35697   fi
35698 
35699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35700   if test "x$test_cygdrive_prefix" = x; then
35701     # As a simple fix, exclude /usr/bin since it's not a real path.
35702     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35704       # a path prefixed by /cygdrive for fixpath to work.
35705       new_path="$CYGWIN_ROOT_PATH$input_path"
35706     fi
35707   fi
35708 
35709   # remove trailing .exe if any
35710   new_path="${new_path/%.exe/}"
35711 
35712     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35713 
35714   # First separate the path from the arguments. This will split at the first
35715   # space.
35716   complete="$CXX"
35717   path="${complete%% *}"
35718   tmp="$complete EOL"
35719   arguments="${tmp#* }"
35720 
35721   # Input might be given as Windows format, start by converting to
35722   # unix format.
35723   new_path="$path"
35724 
35725   windows_path="$new_path"
35726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35727     unix_path=`$CYGPATH -u "$windows_path"`
35728     new_path="$unix_path"
35729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35731     new_path="$unix_path"
35732   fi
35733 
35734 
35735   # Now try to locate executable using which
35736   new_path=`$WHICH "$new_path" 2> /dev/null`
35737 
35738   if test "x$new_path" = x; then
35739     # Oops. Which didn't find the executable.
35740     # The splitting of arguments from the executable at a space might have been incorrect,
35741     # since paths with space are more likely in Windows. Give it another try with the whole
35742     # argument.
35743     path="$complete"
35744     arguments="EOL"
35745     new_path="$path"
35746 
35747   windows_path="$new_path"
35748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35749     unix_path=`$CYGPATH -u "$windows_path"`
35750     new_path="$unix_path"
35751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35753     new_path="$unix_path"
35754   fi
35755 
35756 
35757     new_path=`$WHICH "$new_path" 2> /dev/null`
35758     # bat and cmd files are not always considered executable in MSYS causing which
35759     # to not find them
35760     if test "x$new_path" = x \
35761         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35762         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35763       new_path="$path"
35764 
35765   windows_path="$new_path"
35766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35767     unix_path=`$CYGPATH -u "$windows_path"`
35768     new_path="$unix_path"
35769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35771     new_path="$unix_path"
35772   fi
35773 
35774     fi
35775 
35776     if test "x$new_path" = x; then
35777       # It's still not found. Now this is an unrecoverable error.
35778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35779 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35780       has_space=`$ECHO "$complete" | $GREP " "`
35781       if test "x$has_space" != x; then
35782         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35783 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35784       fi
35785       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35786     fi
35787   fi
35788 
35789   # Now new_path has a complete unix path to the binary
35790   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35791     # Keep paths in /bin as-is, but remove trailing .exe if any
35792     new_path="${new_path/%.exe/}"
35793     # Do not save /bin paths to all_fixpath_prefixes!
35794   else
35795     # Not in mixed or Windows style, start by that.
35796     new_path=`cmd //c echo $new_path`
35797 
35798   input_path="$new_path"
35799   # Check if we need to convert this using DOS-style short mode. If the path
35800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35801   # take no chances and rewrite it.
35802   # Note: m4 eats our [], so we need to use [ and ] instead.
35803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35804   if test "x$has_forbidden_chars" != x; then
35805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35807   fi
35808 
35809     # Output is in $new_path
35810 
35811   windows_path="$new_path"
35812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35813     unix_path=`$CYGPATH -u "$windows_path"`
35814     new_path="$unix_path"
35815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35817     new_path="$unix_path"
35818   fi
35819 
35820     # remove trailing .exe if any
35821     new_path="${new_path/%.exe/}"
35822 
35823     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35824     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35825   fi
35826 
35827     else
35828       # We're on a unix platform. Hooray! :)
35829       # First separate the path from the arguments. This will split at the first
35830       # space.
35831       complete="$CXX"
35832       path="${complete%% *}"
35833       tmp="$complete EOL"
35834       arguments="${tmp#* }"
35835 
35836       # Cannot rely on the command "which" here since it doesn't always work.
35837       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35838       if test -z "$is_absolute_path"; then
35839         # Path to executable is not absolute. Find it.
35840         IFS_save="$IFS"
35841         IFS=:
35842         for p in $PATH; do
35843           if test -f "$p/$path" && test -x "$p/$path"; then
35844             new_path="$p/$path"
35845             break
35846           fi
35847         done
35848         IFS="$IFS_save"
35849       else
35850         # This is an absolute path, we can use it without further modifications.
35851         new_path="$path"
35852       fi
35853 
35854       if test "x$new_path" = x; then
35855         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35856 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35857         has_space=`$ECHO "$complete" | $GREP " "`
35858         if test "x$has_space" != x; then
35859           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35860 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35861         fi
35862         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35863       fi
35864     fi
35865 
35866     # Now join together the path and the arguments once again
35867     if test "x$arguments" != xEOL; then
35868       new_complete="$new_path ${arguments% *}"
35869     else
35870       new_complete="$new_path"
35871     fi
35872 
35873     if test "x$complete" != "x$new_complete"; then
35874       CXX="$new_complete"
35875       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35876 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35877     fi
35878   fi
35879 
35880   TEST_COMPILER="$CXX"
35881 
35882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35883 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35884   SYMLINK_ORIGINAL="$TEST_COMPILER"
35885 
35886   if test "x$OPENJDK_BUILD_OS" != xwindows; then
35887     # Follow a chain of symbolic links. Use readlink
35888     # where it exists, else fall back to horribly
35889     # complicated shell code.
35890     if test "x$READLINK_TESTED" != yes; then
35891       # On MacOSX there is a readlink tool with a different
35892       # purpose than the GNU readlink tool. Check the found readlink.
35893       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35894       if test "x$ISGNU" = x; then
35895         # A readlink that we do not know how to use.
35896         # Are there other non-GNU readlinks out there?
35897         READLINK_TESTED=yes
35898         READLINK=
35899       fi
35900     fi
35901 
35902     if test "x$READLINK" != x; then
35903       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35904     else
35905       # Save the current directory for restoring afterwards
35906       STARTDIR=$PWD
35907       COUNTER=0
35908       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35909       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35910       cd $sym_link_dir
35911       # Use -P flag to resolve symlinks in directories.
35912       cd `$THEPWDCMD -P`
35913       sym_link_dir=`$THEPWDCMD -P`
35914       # Resolve file symlinks
35915       while test $COUNTER -lt 20; do
35916         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35917         if test "x$ISLINK" == x; then
35918           # This is not a symbolic link! We are done!
35919           break
35920         fi
35921         # Again resolve directory symlinks since the target of the just found
35922         # link could be in a different directory
35923         cd `$DIRNAME $ISLINK`
35924         sym_link_dir=`$THEPWDCMD -P`
35925         sym_link_file=`$BASENAME $ISLINK`
35926         let COUNTER=COUNTER+1
35927       done
35928       cd $STARTDIR
35929       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35930     fi
35931   fi
35932 
35933   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35934     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35935 $as_echo "no symlink" >&6; }
35936   else
35937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35938 $as_echo "$SYMLINK_ORIGINAL" >&6; }
35939 
35940     # We can't handle ccache by gcc wrappers, since we need to know if we're
35941     # using ccache. Instead ccache usage must be controlled by a configure option.
35942     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35943     if test "x$COMPILER_BASENAME" = "xccache"; then
35944       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35945 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35946       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35947     fi
35948   fi
35949 
35950 
35951   COMPILER=$CXX
35952   COMPILER_NAME=$COMPILER_NAME
35953 
35954   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35955     # cc -V output typically looks like
35956     #     cc: Sun C 5.12 Linux_i386 2011/11/16
35957     # or
35958     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35959     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35960     # Check that this is likely to be the Solaris Studio cc.
35961     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35962     if test $? -ne 0; then
35963       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35964       { $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
35965 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35966       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35967 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35968       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35969 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35970       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35971     fi
35972     # Remove usage instructions (if present), and
35973     # collapse compiler output into a single line
35974     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35975         $SED -e 's/ *[Uu]sage:.*//'`
35976     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35977         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35978   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35979     # xlc -qversion output typically looks like
35980     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35981     #     Version: 11.01.0000.0015
35982     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35983     # Check that this is likely to be the IBM XL C compiler.
35984     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35985     if test $? -ne 0; then
35986       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35987       { $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
35988 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35989       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35990 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35991       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35992 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35993       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35994     fi
35995     # Collapse compiler output into a single line
35996     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35997     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35998         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35999   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36000     # There is no specific version flag, but all output starts with a version string.
36001     # First line typically looks something like:
36002     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
36003     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
36004     # Check that this is likely to be Microsoft CL.EXE.
36005     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
36006     if test $? -ne 0; then
36007       { $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
36008 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36009       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36010 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36011       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36012     fi
36013     # Collapse compiler output into a single line
36014     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36015     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36016         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
36017   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
36018     # gcc --version output typically looks like
36019     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
36020     #     Copyright (C) 2013 Free Software Foundation, Inc.
36021     #     This is free software; see the source for copying conditions.  There is NO
36022     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36023     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36024     # Check that this is likely to be GCC.
36025     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
36026     if test $? -ne 0; then
36027       { $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
36028 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36029       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
36030 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
36031       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36032     fi
36033     # Remove Copyright and legalese from version string, and
36034     # collapse into a single line
36035     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
36036         $SED -e 's/ *Copyright .*//'`
36037     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36038         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
36039   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
36040     # clang --version output typically looks like
36041     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
36042     #    clang version 3.3 (tags/RELEASE_33/final)
36043     # or
36044     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
36045     #    Target: x86_64-pc-linux-gnu
36046     #    Thread model: posix
36047     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36048     # Check that this is likely to be clang
36049     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
36050     if test $? -ne 0; then
36051       { $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
36052 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36053       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36054 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36055       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36056     fi
36057     # Collapse compiler output into a single line
36058     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36059     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36060         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
36061   else
36062       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
36063   fi
36064   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
36065   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
36066   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
36067   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
36068 
36069   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
36070 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
36071 
36072 
36073   # Now that we have resolved CXX ourself, let autoconf have its go at it
36074   ac_ext=cpp
36075 ac_cpp='$CXXCPP $CPPFLAGS'
36076 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36077 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36078 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36079 if test -z "$CXX"; then
36080   if test -n "$CCC"; then
36081     CXX=$CCC
36082   else
36083     if test -n "$ac_tool_prefix"; then
36084   for ac_prog in $CXX
36085   do
36086     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36087 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36089 $as_echo_n "checking for $ac_word... " >&6; }
36090 if ${ac_cv_prog_CXX+:} false; then :
36091   $as_echo_n "(cached) " >&6
36092 else
36093   if test -n "$CXX"; then
36094   ac_cv_prog_CXX="$CXX" # Let the user override the test.
36095 else
36096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36097 for as_dir in $PATH
36098 do
36099   IFS=$as_save_IFS
36100   test -z "$as_dir" && as_dir=.
36101     for ac_exec_ext in '' $ac_executable_extensions; do
36102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36103     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
36104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36105     break 2
36106   fi
36107 done
36108   done
36109 IFS=$as_save_IFS
36110 
36111 fi
36112 fi
36113 CXX=$ac_cv_prog_CXX
36114 if test -n "$CXX"; then
36115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36116 $as_echo "$CXX" >&6; }
36117 else
36118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36119 $as_echo "no" >&6; }
36120 fi
36121 
36122 
36123     test -n "$CXX" && break
36124   done
36125 fi
36126 if test -z "$CXX"; then
36127   ac_ct_CXX=$CXX
36128   for ac_prog in $CXX
36129 do
36130   # Extract the first word of "$ac_prog", so it can be a program name with args.
36131 set dummy $ac_prog; ac_word=$2
36132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36133 $as_echo_n "checking for $ac_word... " >&6; }
36134 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36135   $as_echo_n "(cached) " >&6
36136 else
36137   if test -n "$ac_ct_CXX"; then
36138   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36139 else
36140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36141 for as_dir in $PATH
36142 do
36143   IFS=$as_save_IFS
36144   test -z "$as_dir" && as_dir=.
36145     for ac_exec_ext in '' $ac_executable_extensions; do
36146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36147     ac_cv_prog_ac_ct_CXX="$ac_prog"
36148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36149     break 2
36150   fi
36151 done
36152   done
36153 IFS=$as_save_IFS
36154 
36155 fi
36156 fi
36157 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36158 if test -n "$ac_ct_CXX"; then
36159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36160 $as_echo "$ac_ct_CXX" >&6; }
36161 else
36162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36163 $as_echo "no" >&6; }
36164 fi
36165 
36166 
36167   test -n "$ac_ct_CXX" && break
36168 done
36169 
36170   if test "x$ac_ct_CXX" = x; then
36171     CXX="g++"
36172   else
36173     case $cross_compiling:$ac_tool_warned in
36174 yes:)
36175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36176 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36177 ac_tool_warned=yes ;;
36178 esac
36179     CXX=$ac_ct_CXX
36180   fi
36181 fi
36182 
36183   fi
36184 fi
36185 # Provide some information about the compiler.
36186 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36187 set X $ac_compile
36188 ac_compiler=$2
36189 for ac_option in --version -v -V -qversion; do
36190   { { ac_try="$ac_compiler $ac_option >&5"
36191 case "(($ac_try" in
36192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36193   *) ac_try_echo=$ac_try;;
36194 esac
36195 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36196 $as_echo "$ac_try_echo"; } >&5
36197   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36198   ac_status=$?
36199   if test -s conftest.err; then
36200     sed '10a\
36201 ... rest of stderr output deleted ...
36202          10q' conftest.err >conftest.er1
36203     cat conftest.er1 >&5
36204   fi
36205   rm -f conftest.er1 conftest.err
36206   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36207   test $ac_status = 0; }
36208 done
36209 
36210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36211 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36212 if ${ac_cv_cxx_compiler_gnu+:} false; then :
36213   $as_echo_n "(cached) " >&6
36214 else
36215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36216 /* end confdefs.h.  */
36217 
36218 int
36219 main ()
36220 {
36221 #ifndef __GNUC__
36222        choke me
36223 #endif
36224 
36225   ;
36226   return 0;
36227 }
36228 _ACEOF
36229 if ac_fn_cxx_try_compile "$LINENO"; then :
36230   ac_compiler_gnu=yes
36231 else
36232   ac_compiler_gnu=no
36233 fi
36234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36235 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36236 
36237 fi
36238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36239 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36240 if test $ac_compiler_gnu = yes; then
36241   GXX=yes
36242 else
36243   GXX=
36244 fi
36245 ac_test_CXXFLAGS=${CXXFLAGS+set}
36246 ac_save_CXXFLAGS=$CXXFLAGS
36247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36248 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
36249 if ${ac_cv_prog_cxx_g+:} false; then :
36250   $as_echo_n "(cached) " >&6
36251 else
36252   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36253    ac_cxx_werror_flag=yes
36254    ac_cv_prog_cxx_g=no
36255    CXXFLAGS="-g"
36256    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36257 /* end confdefs.h.  */
36258 
36259 int
36260 main ()
36261 {
36262 
36263   ;
36264   return 0;
36265 }
36266 _ACEOF
36267 if ac_fn_cxx_try_compile "$LINENO"; then :
36268   ac_cv_prog_cxx_g=yes
36269 else
36270   CXXFLAGS=""
36271       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36272 /* end confdefs.h.  */
36273 
36274 int
36275 main ()
36276 {
36277 
36278   ;
36279   return 0;
36280 }
36281 _ACEOF
36282 if ac_fn_cxx_try_compile "$LINENO"; then :
36283 
36284 else
36285   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36286          CXXFLAGS="-g"
36287          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36288 /* end confdefs.h.  */
36289 
36290 int
36291 main ()
36292 {
36293 
36294   ;
36295   return 0;
36296 }
36297 _ACEOF
36298 if ac_fn_cxx_try_compile "$LINENO"; then :
36299   ac_cv_prog_cxx_g=yes
36300 fi
36301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36302 fi
36303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36304 fi
36305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36306    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36307 fi
36308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36309 $as_echo "$ac_cv_prog_cxx_g" >&6; }
36310 if test "$ac_test_CXXFLAGS" = set; then
36311   CXXFLAGS=$ac_save_CXXFLAGS
36312 elif test $ac_cv_prog_cxx_g = yes; then
36313   if test "$GXX" = yes; then
36314     CXXFLAGS="-g -O2"
36315   else
36316     CXXFLAGS="-g"
36317   fi
36318 else
36319   if test "$GXX" = yes; then
36320     CXXFLAGS="-O2"
36321   else
36322     CXXFLAGS=
36323   fi
36324 fi
36325 ac_ext=cpp
36326 ac_cpp='$CXXCPP $CPPFLAGS'
36327 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36328 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36329 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36330 
36331 
36332   # This is the compiler version number on the form X.Y[.Z]
36333 
36334 
36335 
36336 
36337   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36338     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36339 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36340     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36341 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36342   fi
36343 
36344   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36345   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36346     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36347 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36348   fi
36349 
36350   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36351     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36352 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36353   fi
36354 
36355   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36356 
36357 
36358   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36359 
36360 
36361 
36362 
36363 
36364 
36365 
36366 
36367 
36368 
36369 
36370 
36371 
36372 
36373 
36374 
36375 
36376 
36377 
36378 
36379 
36380 
36381 
36382 
36383 
36384 
36385 
36386 
36387 
36388 
36389 
36390 
36391 
36392 
36393 
36394 
36395 
36396 
36397 
36398 
36399 
36400 
36401 
36402 
36403 
36404 
36405 
36406 
36407 
36408     # Execute function body
36409 
36410   # Need to assign to a variable since m4 is blocked from modifying parts in [].
36411   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36412 
36413   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36414     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36415   fi
36416 
36417   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36418     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36419   fi
36420 
36421   # Version comparison method inspired by http://stackoverflow.com/a/24067243
36422   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36423 
36424   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36425     :
36426 
36427   else
36428     :
36429 
36430           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
36431 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36432 
36433 
36434   fi
36435 
36436 
36437 
36438 
36439 
36440 
36441 
36442 
36443 
36444 
36445 
36446 
36447 
36448 
36449   fi
36450 
36451   #
36452   # Setup the preprocessor (CPP and CXXCPP)
36453   #
36454   ac_ext=c
36455 ac_cpp='$CPP $CPPFLAGS'
36456 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36457 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36458 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36460 $as_echo_n "checking how to run the C preprocessor... " >&6; }
36461 # On Suns, sometimes $CPP names a directory.
36462 if test -n "$CPP" && test -d "$CPP"; then
36463   CPP=
36464 fi
36465 if test -z "$CPP"; then
36466   if ${ac_cv_prog_CPP+:} false; then :
36467   $as_echo_n "(cached) " >&6
36468 else
36469       # Double quotes because CPP needs to be expanded
36470     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36471     do
36472       ac_preproc_ok=false
36473 for ac_c_preproc_warn_flag in '' yes
36474 do
36475   # Use a header file that comes with gcc, so configuring glibc
36476   # with a fresh cross-compiler works.
36477   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36478   # <limits.h> exists even on freestanding compilers.
36479   # On the NeXT, cc -E runs the code through the compiler's parser,
36480   # not just through cpp. "Syntax error" is here to catch this case.
36481   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36482 /* end confdefs.h.  */
36483 #ifdef __STDC__
36484 # include <limits.h>
36485 #else
36486 # include <assert.h>
36487 #endif
36488                      Syntax error
36489 _ACEOF
36490 if ac_fn_c_try_cpp "$LINENO"; then :
36491 
36492 else
36493   # Broken: fails on valid input.
36494 continue
36495 fi
36496 rm -f conftest.err conftest.i conftest.$ac_ext
36497 
36498   # OK, works on sane cases.  Now check whether nonexistent headers
36499   # can be detected and how.
36500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36501 /* end confdefs.h.  */
36502 #include <ac_nonexistent.h>
36503 _ACEOF
36504 if ac_fn_c_try_cpp "$LINENO"; then :
36505   # Broken: success on invalid input.
36506 continue
36507 else
36508   # Passes both tests.
36509 ac_preproc_ok=:
36510 break
36511 fi
36512 rm -f conftest.err conftest.i conftest.$ac_ext
36513 
36514 done
36515 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36516 rm -f conftest.i conftest.err conftest.$ac_ext
36517 if $ac_preproc_ok; then :
36518   break
36519 fi
36520 
36521     done
36522     ac_cv_prog_CPP=$CPP
36523 
36524 fi
36525   CPP=$ac_cv_prog_CPP
36526 else
36527   ac_cv_prog_CPP=$CPP
36528 fi
36529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36530 $as_echo "$CPP" >&6; }
36531 ac_preproc_ok=false
36532 for ac_c_preproc_warn_flag in '' yes
36533 do
36534   # Use a header file that comes with gcc, so configuring glibc
36535   # with a fresh cross-compiler works.
36536   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36537   # <limits.h> exists even on freestanding compilers.
36538   # On the NeXT, cc -E runs the code through the compiler's parser,
36539   # not just through cpp. "Syntax error" is here to catch this case.
36540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36541 /* end confdefs.h.  */
36542 #ifdef __STDC__
36543 # include <limits.h>
36544 #else
36545 # include <assert.h>
36546 #endif
36547                      Syntax error
36548 _ACEOF
36549 if ac_fn_c_try_cpp "$LINENO"; then :
36550 
36551 else
36552   # Broken: fails on valid input.
36553 continue
36554 fi
36555 rm -f conftest.err conftest.i conftest.$ac_ext
36556 
36557   # OK, works on sane cases.  Now check whether nonexistent headers
36558   # can be detected and how.
36559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36560 /* end confdefs.h.  */
36561 #include <ac_nonexistent.h>
36562 _ACEOF
36563 if ac_fn_c_try_cpp "$LINENO"; then :
36564   # Broken: success on invalid input.
36565 continue
36566 else
36567   # Passes both tests.
36568 ac_preproc_ok=:
36569 break
36570 fi
36571 rm -f conftest.err conftest.i conftest.$ac_ext
36572 
36573 done
36574 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36575 rm -f conftest.i conftest.err conftest.$ac_ext
36576 if $ac_preproc_ok; then :
36577 
36578 else
36579   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36580 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36581 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36582 See \`config.log' for more details" "$LINENO" 5; }
36583 fi
36584 
36585 ac_ext=cpp
36586 ac_cpp='$CXXCPP $CPPFLAGS'
36587 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36588 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36589 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36590 
36591 
36592   # Only process if variable expands to non-empty
36593 
36594   if test "x$CPP" != x; then
36595     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36596 
36597   # First separate the path from the arguments. This will split at the first
36598   # space.
36599   complete="$CPP"
36600   path="${complete%% *}"
36601   tmp="$complete EOL"
36602   arguments="${tmp#* }"
36603 
36604   # Input might be given as Windows format, start by converting to
36605   # unix format.
36606   new_path=`$CYGPATH -u "$path"`
36607 
36608   # Now try to locate executable using which
36609   new_path=`$WHICH "$new_path" 2> /dev/null`
36610   # bat and cmd files are not always considered executable in cygwin causing which
36611   # to not find them
36612   if test "x$new_path" = x \
36613       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36614       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36615     new_path=`$CYGPATH -u "$path"`
36616   fi
36617   if test "x$new_path" = x; then
36618     # Oops. Which didn't find the executable.
36619     # The splitting of arguments from the executable at a space might have been incorrect,
36620     # since paths with space are more likely in Windows. Give it another try with the whole
36621     # argument.
36622     path="$complete"
36623     arguments="EOL"
36624     new_path=`$CYGPATH -u "$path"`
36625     new_path=`$WHICH "$new_path" 2> /dev/null`
36626     # bat and cmd files are not always considered executable in cygwin causing which
36627     # to not find them
36628     if test "x$new_path" = x \
36629         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36630         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36631       new_path=`$CYGPATH -u "$path"`
36632     fi
36633     if test "x$new_path" = x; then
36634       # It's still not found. Now this is an unrecoverable error.
36635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36636 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36637       has_space=`$ECHO "$complete" | $GREP " "`
36638       if test "x$has_space" != x; then
36639         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36640 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36641       fi
36642       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36643     fi
36644   fi
36645 
36646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36649   # "foo.exe" is OK but "foo" is an error.
36650   #
36651   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36652   # It is also a way to make sure we got the proper file name for the real test later on.
36653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36654   if test "x$test_shortpath" = x; then
36655     # Short path failed, file does not exist as specified.
36656     # Try adding .exe or .cmd
36657     if test -f "${new_path}.exe"; then
36658       input_to_shortpath="${new_path}.exe"
36659     elif test -f "${new_path}.cmd"; then
36660       input_to_shortpath="${new_path}.cmd"
36661     else
36662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36663 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36664       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36665 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36666       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36667     fi
36668   else
36669     input_to_shortpath="$new_path"
36670   fi
36671 
36672   # Call helper function which possibly converts this using DOS-style short mode.
36673   # If so, the updated path is stored in $new_path.
36674   new_path="$input_to_shortpath"
36675 
36676   input_path="$input_to_shortpath"
36677   # Check if we need to convert this using DOS-style short mode. If the path
36678   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36679   # take no chances and rewrite it.
36680   # Note: m4 eats our [], so we need to use [ and ] instead.
36681   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36682   if test "x$has_forbidden_chars" != x; then
36683     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36684     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36685     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36686     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36687       # Going to short mode and back again did indeed matter. Since short mode is
36688       # case insensitive, let's make it lowercase to improve readability.
36689       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36690       # Now convert it back to Unix-style (cygpath)
36691       input_path=`$CYGPATH -u "$shortmode_path"`
36692       new_path="$input_path"
36693     fi
36694   fi
36695 
36696   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36697   if test "x$test_cygdrive_prefix" = x; then
36698     # As a simple fix, exclude /usr/bin since it's not a real path.
36699     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36700       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36701       # a path prefixed by /cygdrive for fixpath to work.
36702       new_path="$CYGWIN_ROOT_PATH$input_path"
36703     fi
36704   fi
36705 
36706   # remove trailing .exe if any
36707   new_path="${new_path/%.exe/}"
36708 
36709     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36710 
36711   # First separate the path from the arguments. This will split at the first
36712   # space.
36713   complete="$CPP"
36714   path="${complete%% *}"
36715   tmp="$complete EOL"
36716   arguments="${tmp#* }"
36717 
36718   # Input might be given as Windows format, start by converting to
36719   # unix format.
36720   new_path="$path"
36721 
36722   windows_path="$new_path"
36723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36724     unix_path=`$CYGPATH -u "$windows_path"`
36725     new_path="$unix_path"
36726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36728     new_path="$unix_path"
36729   fi
36730 
36731 
36732   # Now try to locate executable using which
36733   new_path=`$WHICH "$new_path" 2> /dev/null`
36734 
36735   if test "x$new_path" = x; then
36736     # Oops. Which didn't find the executable.
36737     # The splitting of arguments from the executable at a space might have been incorrect,
36738     # since paths with space are more likely in Windows. Give it another try with the whole
36739     # argument.
36740     path="$complete"
36741     arguments="EOL"
36742     new_path="$path"
36743 
36744   windows_path="$new_path"
36745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36746     unix_path=`$CYGPATH -u "$windows_path"`
36747     new_path="$unix_path"
36748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36750     new_path="$unix_path"
36751   fi
36752 
36753 
36754     new_path=`$WHICH "$new_path" 2> /dev/null`
36755     # bat and cmd files are not always considered executable in MSYS causing which
36756     # to not find them
36757     if test "x$new_path" = x \
36758         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36759         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36760       new_path="$path"
36761 
36762   windows_path="$new_path"
36763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36764     unix_path=`$CYGPATH -u "$windows_path"`
36765     new_path="$unix_path"
36766   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36767     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36768     new_path="$unix_path"
36769   fi
36770 
36771     fi
36772 
36773     if test "x$new_path" = x; then
36774       # It's still not found. Now this is an unrecoverable error.
36775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36776 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36777       has_space=`$ECHO "$complete" | $GREP " "`
36778       if test "x$has_space" != x; then
36779         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36780 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36781       fi
36782       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36783     fi
36784   fi
36785 
36786   # Now new_path has a complete unix path to the binary
36787   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36788     # Keep paths in /bin as-is, but remove trailing .exe if any
36789     new_path="${new_path/%.exe/}"
36790     # Do not save /bin paths to all_fixpath_prefixes!
36791   else
36792     # Not in mixed or Windows style, start by that.
36793     new_path=`cmd //c echo $new_path`
36794 
36795   input_path="$new_path"
36796   # Check if we need to convert this using DOS-style short mode. If the path
36797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36798   # take no chances and rewrite it.
36799   # Note: m4 eats our [], so we need to use [ and ] instead.
36800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36801   if test "x$has_forbidden_chars" != x; then
36802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36803     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36804   fi
36805 
36806     # Output is in $new_path
36807 
36808   windows_path="$new_path"
36809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36810     unix_path=`$CYGPATH -u "$windows_path"`
36811     new_path="$unix_path"
36812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36813     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36814     new_path="$unix_path"
36815   fi
36816 
36817     # remove trailing .exe if any
36818     new_path="${new_path/%.exe/}"
36819 
36820     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36821     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36822   fi
36823 
36824     else
36825       # We're on a unix platform. Hooray! :)
36826       # First separate the path from the arguments. This will split at the first
36827       # space.
36828       complete="$CPP"
36829       path="${complete%% *}"
36830       tmp="$complete EOL"
36831       arguments="${tmp#* }"
36832 
36833       # Cannot rely on the command "which" here since it doesn't always work.
36834       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36835       if test -z "$is_absolute_path"; then
36836         # Path to executable is not absolute. Find it.
36837         IFS_save="$IFS"
36838         IFS=:
36839         for p in $PATH; do
36840           if test -f "$p/$path" && test -x "$p/$path"; then
36841             new_path="$p/$path"
36842             break
36843           fi
36844         done
36845         IFS="$IFS_save"
36846       else
36847         # This is an absolute path, we can use it without further modifications.
36848         new_path="$path"
36849       fi
36850 
36851       if test "x$new_path" = x; then
36852         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36853 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36854         has_space=`$ECHO "$complete" | $GREP " "`
36855         if test "x$has_space" != x; then
36856           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36857 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36858         fi
36859         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36860       fi
36861     fi
36862 
36863     # Now join together the path and the arguments once again
36864     if test "x$arguments" != xEOL; then
36865       new_complete="$new_path ${arguments% *}"
36866     else
36867       new_complete="$new_path"
36868     fi
36869 
36870     if test "x$complete" != "x$new_complete"; then
36871       CPP="$new_complete"
36872       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36873 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36874     fi
36875   fi
36876 
36877   ac_ext=cpp
36878 ac_cpp='$CXXCPP $CPPFLAGS'
36879 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36880 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36881 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36883 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36884 if test -z "$CXXCPP"; then
36885   if ${ac_cv_prog_CXXCPP+:} false; then :
36886   $as_echo_n "(cached) " >&6
36887 else
36888       # Double quotes because CXXCPP needs to be expanded
36889     for CXXCPP in "$CXX -E" "/lib/cpp"
36890     do
36891       ac_preproc_ok=false
36892 for ac_cxx_preproc_warn_flag in '' yes
36893 do
36894   # Use a header file that comes with gcc, so configuring glibc
36895   # with a fresh cross-compiler works.
36896   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36897   # <limits.h> exists even on freestanding compilers.
36898   # On the NeXT, cc -E runs the code through the compiler's parser,
36899   # not just through cpp. "Syntax error" is here to catch this case.
36900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36901 /* end confdefs.h.  */
36902 #ifdef __STDC__
36903 # include <limits.h>
36904 #else
36905 # include <assert.h>
36906 #endif
36907                      Syntax error
36908 _ACEOF
36909 if ac_fn_cxx_try_cpp "$LINENO"; then :
36910 
36911 else
36912   # Broken: fails on valid input.
36913 continue
36914 fi
36915 rm -f conftest.err conftest.i conftest.$ac_ext
36916 
36917   # OK, works on sane cases.  Now check whether nonexistent headers
36918   # can be detected and how.
36919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36920 /* end confdefs.h.  */
36921 #include <ac_nonexistent.h>
36922 _ACEOF
36923 if ac_fn_cxx_try_cpp "$LINENO"; then :
36924   # Broken: success on invalid input.
36925 continue
36926 else
36927   # Passes both tests.
36928 ac_preproc_ok=:
36929 break
36930 fi
36931 rm -f conftest.err conftest.i conftest.$ac_ext
36932 
36933 done
36934 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36935 rm -f conftest.i conftest.err conftest.$ac_ext
36936 if $ac_preproc_ok; then :
36937   break
36938 fi
36939 
36940     done
36941     ac_cv_prog_CXXCPP=$CXXCPP
36942 
36943 fi
36944   CXXCPP=$ac_cv_prog_CXXCPP
36945 else
36946   ac_cv_prog_CXXCPP=$CXXCPP
36947 fi
36948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36949 $as_echo "$CXXCPP" >&6; }
36950 ac_preproc_ok=false
36951 for ac_cxx_preproc_warn_flag in '' yes
36952 do
36953   # Use a header file that comes with gcc, so configuring glibc
36954   # with a fresh cross-compiler works.
36955   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36956   # <limits.h> exists even on freestanding compilers.
36957   # On the NeXT, cc -E runs the code through the compiler's parser,
36958   # not just through cpp. "Syntax error" is here to catch this case.
36959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36960 /* end confdefs.h.  */
36961 #ifdef __STDC__
36962 # include <limits.h>
36963 #else
36964 # include <assert.h>
36965 #endif
36966                      Syntax error
36967 _ACEOF
36968 if ac_fn_cxx_try_cpp "$LINENO"; then :
36969 
36970 else
36971   # Broken: fails on valid input.
36972 continue
36973 fi
36974 rm -f conftest.err conftest.i conftest.$ac_ext
36975 
36976   # OK, works on sane cases.  Now check whether nonexistent headers
36977   # can be detected and how.
36978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36979 /* end confdefs.h.  */
36980 #include <ac_nonexistent.h>
36981 _ACEOF
36982 if ac_fn_cxx_try_cpp "$LINENO"; then :
36983   # Broken: success on invalid input.
36984 continue
36985 else
36986   # Passes both tests.
36987 ac_preproc_ok=:
36988 break
36989 fi
36990 rm -f conftest.err conftest.i conftest.$ac_ext
36991 
36992 done
36993 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36994 rm -f conftest.i conftest.err conftest.$ac_ext
36995 if $ac_preproc_ok; then :
36996 
36997 else
36998   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36999 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
37000 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
37001 See \`config.log' for more details" "$LINENO" 5; }
37002 fi
37003 
37004 ac_ext=cpp
37005 ac_cpp='$CXXCPP $CPPFLAGS'
37006 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37007 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37008 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37009 
37010 
37011   # Only process if variable expands to non-empty
37012 
37013   if test "x$CXXCPP" != x; then
37014     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37015 
37016   # First separate the path from the arguments. This will split at the first
37017   # space.
37018   complete="$CXXCPP"
37019   path="${complete%% *}"
37020   tmp="$complete EOL"
37021   arguments="${tmp#* }"
37022 
37023   # Input might be given as Windows format, start by converting to
37024   # unix format.
37025   new_path=`$CYGPATH -u "$path"`
37026 
37027   # Now try to locate executable using which
37028   new_path=`$WHICH "$new_path" 2> /dev/null`
37029   # bat and cmd files are not always considered executable in cygwin causing which
37030   # to not find them
37031   if test "x$new_path" = x \
37032       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37033       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37034     new_path=`$CYGPATH -u "$path"`
37035   fi
37036   if test "x$new_path" = x; then
37037     # Oops. Which didn't find the executable.
37038     # The splitting of arguments from the executable at a space might have been incorrect,
37039     # since paths with space are more likely in Windows. Give it another try with the whole
37040     # argument.
37041     path="$complete"
37042     arguments="EOL"
37043     new_path=`$CYGPATH -u "$path"`
37044     new_path=`$WHICH "$new_path" 2> /dev/null`
37045     # bat and cmd files are not always considered executable in cygwin causing which
37046     # to not find them
37047     if test "x$new_path" = x \
37048         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37049         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37050       new_path=`$CYGPATH -u "$path"`
37051     fi
37052     if test "x$new_path" = x; then
37053       # It's still not found. Now this is an unrecoverable error.
37054       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37055 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37056       has_space=`$ECHO "$complete" | $GREP " "`
37057       if test "x$has_space" != x; then
37058         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37059 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37060       fi
37061       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37062     fi
37063   fi
37064 
37065   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37066   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37067   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37068   # "foo.exe" is OK but "foo" is an error.
37069   #
37070   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37071   # It is also a way to make sure we got the proper file name for the real test later on.
37072   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37073   if test "x$test_shortpath" = x; then
37074     # Short path failed, file does not exist as specified.
37075     # Try adding .exe or .cmd
37076     if test -f "${new_path}.exe"; then
37077       input_to_shortpath="${new_path}.exe"
37078     elif test -f "${new_path}.cmd"; then
37079       input_to_shortpath="${new_path}.cmd"
37080     else
37081       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
37082 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
37083       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37084 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37085       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37086     fi
37087   else
37088     input_to_shortpath="$new_path"
37089   fi
37090 
37091   # Call helper function which possibly converts this using DOS-style short mode.
37092   # If so, the updated path is stored in $new_path.
37093   new_path="$input_to_shortpath"
37094 
37095   input_path="$input_to_shortpath"
37096   # Check if we need to convert this using DOS-style short mode. If the path
37097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37098   # take no chances and rewrite it.
37099   # Note: m4 eats our [], so we need to use [ and ] instead.
37100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37101   if test "x$has_forbidden_chars" != x; then
37102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37106       # Going to short mode and back again did indeed matter. Since short mode is
37107       # case insensitive, let's make it lowercase to improve readability.
37108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37109       # Now convert it back to Unix-style (cygpath)
37110       input_path=`$CYGPATH -u "$shortmode_path"`
37111       new_path="$input_path"
37112     fi
37113   fi
37114 
37115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37116   if test "x$test_cygdrive_prefix" = x; then
37117     # As a simple fix, exclude /usr/bin since it's not a real path.
37118     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37120       # a path prefixed by /cygdrive for fixpath to work.
37121       new_path="$CYGWIN_ROOT_PATH$input_path"
37122     fi
37123   fi
37124 
37125   # remove trailing .exe if any
37126   new_path="${new_path/%.exe/}"
37127 
37128     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37129 
37130   # First separate the path from the arguments. This will split at the first
37131   # space.
37132   complete="$CXXCPP"
37133   path="${complete%% *}"
37134   tmp="$complete EOL"
37135   arguments="${tmp#* }"
37136 
37137   # Input might be given as Windows format, start by converting to
37138   # unix format.
37139   new_path="$path"
37140 
37141   windows_path="$new_path"
37142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37143     unix_path=`$CYGPATH -u "$windows_path"`
37144     new_path="$unix_path"
37145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37147     new_path="$unix_path"
37148   fi
37149 
37150 
37151   # Now try to locate executable using which
37152   new_path=`$WHICH "$new_path" 2> /dev/null`
37153 
37154   if test "x$new_path" = x; then
37155     # Oops. Which didn't find the executable.
37156     # The splitting of arguments from the executable at a space might have been incorrect,
37157     # since paths with space are more likely in Windows. Give it another try with the whole
37158     # argument.
37159     path="$complete"
37160     arguments="EOL"
37161     new_path="$path"
37162 
37163   windows_path="$new_path"
37164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37165     unix_path=`$CYGPATH -u "$windows_path"`
37166     new_path="$unix_path"
37167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37169     new_path="$unix_path"
37170   fi
37171 
37172 
37173     new_path=`$WHICH "$new_path" 2> /dev/null`
37174     # bat and cmd files are not always considered executable in MSYS causing which
37175     # to not find them
37176     if test "x$new_path" = x \
37177         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37178         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37179       new_path="$path"
37180 
37181   windows_path="$new_path"
37182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37183     unix_path=`$CYGPATH -u "$windows_path"`
37184     new_path="$unix_path"
37185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37186     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37187     new_path="$unix_path"
37188   fi
37189 
37190     fi
37191 
37192     if test "x$new_path" = x; then
37193       # It's still not found. Now this is an unrecoverable error.
37194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37195 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37196       has_space=`$ECHO "$complete" | $GREP " "`
37197       if test "x$has_space" != x; then
37198         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37199 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37200       fi
37201       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37202     fi
37203   fi
37204 
37205   # Now new_path has a complete unix path to the binary
37206   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37207     # Keep paths in /bin as-is, but remove trailing .exe if any
37208     new_path="${new_path/%.exe/}"
37209     # Do not save /bin paths to all_fixpath_prefixes!
37210   else
37211     # Not in mixed or Windows style, start by that.
37212     new_path=`cmd //c echo $new_path`
37213 
37214   input_path="$new_path"
37215   # Check if we need to convert this using DOS-style short mode. If the path
37216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37217   # take no chances and rewrite it.
37218   # Note: m4 eats our [], so we need to use [ and ] instead.
37219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37220   if test "x$has_forbidden_chars" != x; then
37221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37222     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37223   fi
37224 
37225     # Output is in $new_path
37226 
37227   windows_path="$new_path"
37228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37229     unix_path=`$CYGPATH -u "$windows_path"`
37230     new_path="$unix_path"
37231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37233     new_path="$unix_path"
37234   fi
37235 
37236     # remove trailing .exe if any
37237     new_path="${new_path/%.exe/}"
37238 
37239     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37240     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37241   fi
37242 
37243     else
37244       # We're on a unix platform. Hooray! :)
37245       # First separate the path from the arguments. This will split at the first
37246       # space.
37247       complete="$CXXCPP"
37248       path="${complete%% *}"
37249       tmp="$complete EOL"
37250       arguments="${tmp#* }"
37251 
37252       # Cannot rely on the command "which" here since it doesn't always work.
37253       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37254       if test -z "$is_absolute_path"; then
37255         # Path to executable is not absolute. Find it.
37256         IFS_save="$IFS"
37257         IFS=:
37258         for p in $PATH; do
37259           if test -f "$p/$path" && test -x "$p/$path"; then
37260             new_path="$p/$path"
37261             break
37262           fi
37263         done
37264         IFS="$IFS_save"
37265       else
37266         # This is an absolute path, we can use it without further modifications.
37267         new_path="$path"
37268       fi
37269 
37270       if test "x$new_path" = x; then
37271         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37272 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37273         has_space=`$ECHO "$complete" | $GREP " "`
37274         if test "x$has_space" != x; then
37275           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37276 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37277         fi
37278         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37279       fi
37280     fi
37281 
37282     # Now join together the path and the arguments once again
37283     if test "x$arguments" != xEOL; then
37284       new_complete="$new_path ${arguments% *}"
37285     else
37286       new_complete="$new_path"
37287     fi
37288 
37289     if test "x$complete" != "x$new_complete"; then
37290       CXXCPP="$new_complete"
37291       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37292 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37293     fi
37294   fi
37295 
37296 
37297   #
37298   # Setup the linker (LD)
37299   #
37300   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37301     # In the Microsoft toolchain we have a separate LD command "link".
37302     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37303     # a cygwin program for something completely different.
37304     # Extract the first word of "link", so it can be a program name with args.
37305 set dummy link; ac_word=$2
37306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37307 $as_echo_n "checking for $ac_word... " >&6; }
37308 if ${ac_cv_prog_LD+:} false; then :
37309   $as_echo_n "(cached) " >&6
37310 else
37311   if test -n "$LD"; then
37312   ac_cv_prog_LD="$LD" # Let the user override the test.
37313 else
37314   ac_prog_rejected=no
37315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37316 for as_dir in $PATH
37317 do
37318   IFS=$as_save_IFS
37319   test -z "$as_dir" && as_dir=.
37320     for ac_exec_ext in '' $ac_executable_extensions; do
37321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37322     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37323        ac_prog_rejected=yes
37324        continue
37325      fi
37326     ac_cv_prog_LD="link"
37327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37328     break 2
37329   fi
37330 done
37331   done
37332 IFS=$as_save_IFS
37333 
37334 if test $ac_prog_rejected = yes; then
37335   # We found a bogon in the path, so make sure we never use it.
37336   set dummy $ac_cv_prog_LD
37337   shift
37338   if test $# != 0; then
37339     # We chose a different compiler from the bogus one.
37340     # However, it has the same basename, so the bogon will be chosen
37341     # first if we set LD to just the basename; use the full file name.
37342     shift
37343     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37344   fi
37345 fi
37346 fi
37347 fi
37348 LD=$ac_cv_prog_LD
37349 if test -n "$LD"; then
37350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37351 $as_echo "$LD" >&6; }
37352 else
37353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37354 $as_echo "no" >&6; }
37355 fi
37356 
37357 
37358 
37359   # Only process if variable expands to non-empty
37360 
37361   if test "x$LD" != x; then
37362     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37363 
37364   # First separate the path from the arguments. This will split at the first
37365   # space.
37366   complete="$LD"
37367   path="${complete%% *}"
37368   tmp="$complete EOL"
37369   arguments="${tmp#* }"
37370 
37371   # Input might be given as Windows format, start by converting to
37372   # unix format.
37373   new_path=`$CYGPATH -u "$path"`
37374 
37375   # Now try to locate executable using which
37376   new_path=`$WHICH "$new_path" 2> /dev/null`
37377   # bat and cmd files are not always considered executable in cygwin causing which
37378   # to not find them
37379   if test "x$new_path" = x \
37380       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37381       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37382     new_path=`$CYGPATH -u "$path"`
37383   fi
37384   if test "x$new_path" = x; then
37385     # Oops. Which didn't find the executable.
37386     # The splitting of arguments from the executable at a space might have been incorrect,
37387     # since paths with space are more likely in Windows. Give it another try with the whole
37388     # argument.
37389     path="$complete"
37390     arguments="EOL"
37391     new_path=`$CYGPATH -u "$path"`
37392     new_path=`$WHICH "$new_path" 2> /dev/null`
37393     # bat and cmd files are not always considered executable in cygwin causing which
37394     # to not find them
37395     if test "x$new_path" = x \
37396         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37397         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37398       new_path=`$CYGPATH -u "$path"`
37399     fi
37400     if test "x$new_path" = x; then
37401       # It's still not found. Now this is an unrecoverable error.
37402       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37403 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37404       has_space=`$ECHO "$complete" | $GREP " "`
37405       if test "x$has_space" != x; then
37406         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37407 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37408       fi
37409       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37410     fi
37411   fi
37412 
37413   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37414   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37415   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37416   # "foo.exe" is OK but "foo" is an error.
37417   #
37418   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37419   # It is also a way to make sure we got the proper file name for the real test later on.
37420   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37421   if test "x$test_shortpath" = x; then
37422     # Short path failed, file does not exist as specified.
37423     # Try adding .exe or .cmd
37424     if test -f "${new_path}.exe"; then
37425       input_to_shortpath="${new_path}.exe"
37426     elif test -f "${new_path}.cmd"; then
37427       input_to_shortpath="${new_path}.cmd"
37428     else
37429       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37430 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37431       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37432 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37433       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37434     fi
37435   else
37436     input_to_shortpath="$new_path"
37437   fi
37438 
37439   # Call helper function which possibly converts this using DOS-style short mode.
37440   # If so, the updated path is stored in $new_path.
37441   new_path="$input_to_shortpath"
37442 
37443   input_path="$input_to_shortpath"
37444   # Check if we need to convert this using DOS-style short mode. If the path
37445   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37446   # take no chances and rewrite it.
37447   # Note: m4 eats our [], so we need to use [ and ] instead.
37448   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37449   if test "x$has_forbidden_chars" != x; then
37450     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37451     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37452     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37453     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37454       # Going to short mode and back again did indeed matter. Since short mode is
37455       # case insensitive, let's make it lowercase to improve readability.
37456       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37457       # Now convert it back to Unix-style (cygpath)
37458       input_path=`$CYGPATH -u "$shortmode_path"`
37459       new_path="$input_path"
37460     fi
37461   fi
37462 
37463   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37464   if test "x$test_cygdrive_prefix" = x; then
37465     # As a simple fix, exclude /usr/bin since it's not a real path.
37466     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37467       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37468       # a path prefixed by /cygdrive for fixpath to work.
37469       new_path="$CYGWIN_ROOT_PATH$input_path"
37470     fi
37471   fi
37472 
37473   # remove trailing .exe if any
37474   new_path="${new_path/%.exe/}"
37475 
37476     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37477 
37478   # First separate the path from the arguments. This will split at the first
37479   # space.
37480   complete="$LD"
37481   path="${complete%% *}"
37482   tmp="$complete EOL"
37483   arguments="${tmp#* }"
37484 
37485   # Input might be given as Windows format, start by converting to
37486   # unix format.
37487   new_path="$path"
37488 
37489   windows_path="$new_path"
37490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37491     unix_path=`$CYGPATH -u "$windows_path"`
37492     new_path="$unix_path"
37493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37495     new_path="$unix_path"
37496   fi
37497 
37498 
37499   # Now try to locate executable using which
37500   new_path=`$WHICH "$new_path" 2> /dev/null`
37501 
37502   if test "x$new_path" = x; then
37503     # Oops. Which didn't find the executable.
37504     # The splitting of arguments from the executable at a space might have been incorrect,
37505     # since paths with space are more likely in Windows. Give it another try with the whole
37506     # argument.
37507     path="$complete"
37508     arguments="EOL"
37509     new_path="$path"
37510 
37511   windows_path="$new_path"
37512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37513     unix_path=`$CYGPATH -u "$windows_path"`
37514     new_path="$unix_path"
37515   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37516     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37517     new_path="$unix_path"
37518   fi
37519 
37520 
37521     new_path=`$WHICH "$new_path" 2> /dev/null`
37522     # bat and cmd files are not always considered executable in MSYS causing which
37523     # to not find them
37524     if test "x$new_path" = x \
37525         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37526         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37527       new_path="$path"
37528 
37529   windows_path="$new_path"
37530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37531     unix_path=`$CYGPATH -u "$windows_path"`
37532     new_path="$unix_path"
37533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37534     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37535     new_path="$unix_path"
37536   fi
37537 
37538     fi
37539 
37540     if test "x$new_path" = x; then
37541       # It's still not found. Now this is an unrecoverable error.
37542       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37543 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37544       has_space=`$ECHO "$complete" | $GREP " "`
37545       if test "x$has_space" != x; then
37546         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37547 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37548       fi
37549       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37550     fi
37551   fi
37552 
37553   # Now new_path has a complete unix path to the binary
37554   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37555     # Keep paths in /bin as-is, but remove trailing .exe if any
37556     new_path="${new_path/%.exe/}"
37557     # Do not save /bin paths to all_fixpath_prefixes!
37558   else
37559     # Not in mixed or Windows style, start by that.
37560     new_path=`cmd //c echo $new_path`
37561 
37562   input_path="$new_path"
37563   # Check if we need to convert this using DOS-style short mode. If the path
37564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37565   # take no chances and rewrite it.
37566   # Note: m4 eats our [], so we need to use [ and ] instead.
37567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37568   if test "x$has_forbidden_chars" != x; then
37569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37570     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37571   fi
37572 
37573     # Output is in $new_path
37574 
37575   windows_path="$new_path"
37576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37577     unix_path=`$CYGPATH -u "$windows_path"`
37578     new_path="$unix_path"
37579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37581     new_path="$unix_path"
37582   fi
37583 
37584     # remove trailing .exe if any
37585     new_path="${new_path/%.exe/}"
37586 
37587     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37588     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37589   fi
37590 
37591     else
37592       # We're on a unix platform. Hooray! :)
37593       # First separate the path from the arguments. This will split at the first
37594       # space.
37595       complete="$LD"
37596       path="${complete%% *}"
37597       tmp="$complete EOL"
37598       arguments="${tmp#* }"
37599 
37600       # Cannot rely on the command "which" here since it doesn't always work.
37601       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37602       if test -z "$is_absolute_path"; then
37603         # Path to executable is not absolute. Find it.
37604         IFS_save="$IFS"
37605         IFS=:
37606         for p in $PATH; do
37607           if test -f "$p/$path" && test -x "$p/$path"; then
37608             new_path="$p/$path"
37609             break
37610           fi
37611         done
37612         IFS="$IFS_save"
37613       else
37614         # This is an absolute path, we can use it without further modifications.
37615         new_path="$path"
37616       fi
37617 
37618       if test "x$new_path" = x; then
37619         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37620 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37621         has_space=`$ECHO "$complete" | $GREP " "`
37622         if test "x$has_space" != x; then
37623           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37624 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37625         fi
37626         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37627       fi
37628     fi
37629 
37630     # Now join together the path and the arguments once again
37631     if test "x$arguments" != xEOL; then
37632       new_complete="$new_path ${arguments% *}"
37633     else
37634       new_complete="$new_path"
37635     fi
37636 
37637     if test "x$complete" != "x$new_complete"; then
37638       LD="$new_complete"
37639       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37640 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37641     fi
37642   fi
37643 
37644     # Verify that we indeed succeeded with this trick.
37645     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37646 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37647     "$LD" --version > /dev/null
37648     if test $? -eq 0 ; then
37649       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37650 $as_echo "no" >&6; }
37651       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37652     else
37653       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37654 $as_echo "yes" >&6; }
37655     fi
37656     LDCXX="$LD"
37657   else
37658     # All other toolchains use the compiler to link.
37659     LD="$CC"
37660     LDCXX="$CXX"
37661   fi
37662 
37663   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37664 
37665 
37666   #
37667   # Setup the assembler (AS)
37668   #
37669   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37670 
37671 
37672   # Publish this variable in the help.
37673 
37674 
37675   if [ -z "${AS+x}" ]; then
37676     # The variable is not set by user, try to locate tool using the code snippet
37677     for ac_prog in as
37678 do
37679   # Extract the first word of "$ac_prog", so it can be a program name with args.
37680 set dummy $ac_prog; ac_word=$2
37681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37682 $as_echo_n "checking for $ac_word... " >&6; }
37683 if ${ac_cv_path_AS+:} false; then :
37684   $as_echo_n "(cached) " >&6
37685 else
37686   case $AS in
37687   [\\/]* | ?:[\\/]*)
37688   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37689   ;;
37690   *)
37691   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37692 for as_dir in $PATH
37693 do
37694   IFS=$as_save_IFS
37695   test -z "$as_dir" && as_dir=.
37696     for ac_exec_ext in '' $ac_executable_extensions; do
37697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37698     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37700     break 2
37701   fi
37702 done
37703   done
37704 IFS=$as_save_IFS
37705 
37706   ;;
37707 esac
37708 fi
37709 AS=$ac_cv_path_AS
37710 if test -n "$AS"; then
37711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37712 $as_echo "$AS" >&6; }
37713 else
37714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37715 $as_echo "no" >&6; }
37716 fi
37717 
37718 
37719   test -n "$AS" && break
37720 done
37721 
37722   else
37723     # The variable is set, but is it from the command line or the environment?
37724 
37725     # Try to remove the string !AS! from our list.
37726     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37727     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37728       # If it failed, the variable was not from the command line. Ignore it,
37729       # but warn the user (except for BASH, which is always set by the calling BASH).
37730       if test "xAS" != xBASH; then
37731         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37732 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37733       fi
37734       # Try to locate tool using the code snippet
37735       for ac_prog in as
37736 do
37737   # Extract the first word of "$ac_prog", so it can be a program name with args.
37738 set dummy $ac_prog; ac_word=$2
37739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37740 $as_echo_n "checking for $ac_word... " >&6; }
37741 if ${ac_cv_path_AS+:} false; then :
37742   $as_echo_n "(cached) " >&6
37743 else
37744   case $AS in
37745   [\\/]* | ?:[\\/]*)
37746   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37747   ;;
37748   *)
37749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37750 for as_dir in $PATH
37751 do
37752   IFS=$as_save_IFS
37753   test -z "$as_dir" && as_dir=.
37754     for ac_exec_ext in '' $ac_executable_extensions; do
37755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37756     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37758     break 2
37759   fi
37760 done
37761   done
37762 IFS=$as_save_IFS
37763 
37764   ;;
37765 esac
37766 fi
37767 AS=$ac_cv_path_AS
37768 if test -n "$AS"; then
37769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37770 $as_echo "$AS" >&6; }
37771 else
37772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37773 $as_echo "no" >&6; }
37774 fi
37775 
37776 
37777   test -n "$AS" && break
37778 done
37779 
37780     else
37781       # If it succeeded, then it was overridden by the user. We will use it
37782       # for the tool.
37783 
37784       # First remove it from the list of overridden variables, so we can test
37785       # for unknown variables in the end.
37786       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37787 
37788       # Check if we try to supply an empty value
37789       if test "x$AS" = x; then
37790         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37791 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37792         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37793 $as_echo_n "checking for AS... " >&6; }
37794         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37795 $as_echo "disabled" >&6; }
37796       else
37797         # Check if the provided tool contains a complete path.
37798         tool_specified="$AS"
37799         tool_basename="${tool_specified##*/}"
37800         if test "x$tool_basename" = "x$tool_specified"; then
37801           # A command without a complete path is provided, search $PATH.
37802           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37803 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37804           # Extract the first word of "$tool_basename", so it can be a program name with args.
37805 set dummy $tool_basename; ac_word=$2
37806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37807 $as_echo_n "checking for $ac_word... " >&6; }
37808 if ${ac_cv_path_AS+:} false; then :
37809   $as_echo_n "(cached) " >&6
37810 else
37811   case $AS in
37812   [\\/]* | ?:[\\/]*)
37813   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37814   ;;
37815   *)
37816   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37817 for as_dir in $PATH
37818 do
37819   IFS=$as_save_IFS
37820   test -z "$as_dir" && as_dir=.
37821     for ac_exec_ext in '' $ac_executable_extensions; do
37822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37823     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37825     break 2
37826   fi
37827 done
37828   done
37829 IFS=$as_save_IFS
37830 
37831   ;;
37832 esac
37833 fi
37834 AS=$ac_cv_path_AS
37835 if test -n "$AS"; then
37836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37837 $as_echo "$AS" >&6; }
37838 else
37839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37840 $as_echo "no" >&6; }
37841 fi
37842 
37843 
37844           if test "x$AS" = x; then
37845             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37846           fi
37847         else
37848           # Otherwise we believe it is a complete path. Use it as it is.
37849           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37850 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37851           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37852 $as_echo_n "checking for AS... " >&6; }
37853           if test ! -x "$tool_specified"; then
37854             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37855 $as_echo "not found" >&6; }
37856             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37857           fi
37858           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37859 $as_echo "$tool_specified" >&6; }
37860         fi
37861       fi
37862     fi
37863 
37864   fi
37865 
37866 
37867 
37868   # Only process if variable expands to non-empty
37869 
37870   if test "x$AS" != x; then
37871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37872 
37873   # First separate the path from the arguments. This will split at the first
37874   # space.
37875   complete="$AS"
37876   path="${complete%% *}"
37877   tmp="$complete EOL"
37878   arguments="${tmp#* }"
37879 
37880   # Input might be given as Windows format, start by converting to
37881   # unix format.
37882   new_path=`$CYGPATH -u "$path"`
37883 
37884   # Now try to locate executable using which
37885   new_path=`$WHICH "$new_path" 2> /dev/null`
37886   # bat and cmd files are not always considered executable in cygwin causing which
37887   # to not find them
37888   if test "x$new_path" = x \
37889       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37890       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37891     new_path=`$CYGPATH -u "$path"`
37892   fi
37893   if test "x$new_path" = x; then
37894     # Oops. Which didn't find the executable.
37895     # The splitting of arguments from the executable at a space might have been incorrect,
37896     # since paths with space are more likely in Windows. Give it another try with the whole
37897     # argument.
37898     path="$complete"
37899     arguments="EOL"
37900     new_path=`$CYGPATH -u "$path"`
37901     new_path=`$WHICH "$new_path" 2> /dev/null`
37902     # bat and cmd files are not always considered executable in cygwin causing which
37903     # to not find them
37904     if test "x$new_path" = x \
37905         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37906         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37907       new_path=`$CYGPATH -u "$path"`
37908     fi
37909     if test "x$new_path" = x; then
37910       # It's still not found. Now this is an unrecoverable error.
37911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37912 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37913       has_space=`$ECHO "$complete" | $GREP " "`
37914       if test "x$has_space" != x; then
37915         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37916 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37917       fi
37918       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37919     fi
37920   fi
37921 
37922   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37923   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37924   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37925   # "foo.exe" is OK but "foo" is an error.
37926   #
37927   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37928   # It is also a way to make sure we got the proper file name for the real test later on.
37929   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37930   if test "x$test_shortpath" = x; then
37931     # Short path failed, file does not exist as specified.
37932     # Try adding .exe or .cmd
37933     if test -f "${new_path}.exe"; then
37934       input_to_shortpath="${new_path}.exe"
37935     elif test -f "${new_path}.cmd"; then
37936       input_to_shortpath="${new_path}.cmd"
37937     else
37938       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37939 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37940       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37941 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37942       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37943     fi
37944   else
37945     input_to_shortpath="$new_path"
37946   fi
37947 
37948   # Call helper function which possibly converts this using DOS-style short mode.
37949   # If so, the updated path is stored in $new_path.
37950   new_path="$input_to_shortpath"
37951 
37952   input_path="$input_to_shortpath"
37953   # Check if we need to convert this using DOS-style short mode. If the path
37954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37955   # take no chances and rewrite it.
37956   # Note: m4 eats our [], so we need to use [ and ] instead.
37957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37958   if test "x$has_forbidden_chars" != x; then
37959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37960     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37961     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37962     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37963       # Going to short mode and back again did indeed matter. Since short mode is
37964       # case insensitive, let's make it lowercase to improve readability.
37965       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37966       # Now convert it back to Unix-style (cygpath)
37967       input_path=`$CYGPATH -u "$shortmode_path"`
37968       new_path="$input_path"
37969     fi
37970   fi
37971 
37972   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37973   if test "x$test_cygdrive_prefix" = x; then
37974     # As a simple fix, exclude /usr/bin since it's not a real path.
37975     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37976       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37977       # a path prefixed by /cygdrive for fixpath to work.
37978       new_path="$CYGWIN_ROOT_PATH$input_path"
37979     fi
37980   fi
37981 
37982   # remove trailing .exe if any
37983   new_path="${new_path/%.exe/}"
37984 
37985     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37986 
37987   # First separate the path from the arguments. This will split at the first
37988   # space.
37989   complete="$AS"
37990   path="${complete%% *}"
37991   tmp="$complete EOL"
37992   arguments="${tmp#* }"
37993 
37994   # Input might be given as Windows format, start by converting to
37995   # unix format.
37996   new_path="$path"
37997 
37998   windows_path="$new_path"
37999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38000     unix_path=`$CYGPATH -u "$windows_path"`
38001     new_path="$unix_path"
38002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38004     new_path="$unix_path"
38005   fi
38006 
38007 
38008   # Now try to locate executable using which
38009   new_path=`$WHICH "$new_path" 2> /dev/null`
38010 
38011   if test "x$new_path" = x; then
38012     # Oops. Which didn't find the executable.
38013     # The splitting of arguments from the executable at a space might have been incorrect,
38014     # since paths with space are more likely in Windows. Give it another try with the whole
38015     # argument.
38016     path="$complete"
38017     arguments="EOL"
38018     new_path="$path"
38019 
38020   windows_path="$new_path"
38021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38022     unix_path=`$CYGPATH -u "$windows_path"`
38023     new_path="$unix_path"
38024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38026     new_path="$unix_path"
38027   fi
38028 
38029 
38030     new_path=`$WHICH "$new_path" 2> /dev/null`
38031     # bat and cmd files are not always considered executable in MSYS causing which
38032     # to not find them
38033     if test "x$new_path" = x \
38034         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38035         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38036       new_path="$path"
38037 
38038   windows_path="$new_path"
38039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38040     unix_path=`$CYGPATH -u "$windows_path"`
38041     new_path="$unix_path"
38042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38044     new_path="$unix_path"
38045   fi
38046 
38047     fi
38048 
38049     if test "x$new_path" = x; then
38050       # It's still not found. Now this is an unrecoverable error.
38051       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38052 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38053       has_space=`$ECHO "$complete" | $GREP " "`
38054       if test "x$has_space" != x; then
38055         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38056 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38057       fi
38058       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38059     fi
38060   fi
38061 
38062   # Now new_path has a complete unix path to the binary
38063   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38064     # Keep paths in /bin as-is, but remove trailing .exe if any
38065     new_path="${new_path/%.exe/}"
38066     # Do not save /bin paths to all_fixpath_prefixes!
38067   else
38068     # Not in mixed or Windows style, start by that.
38069     new_path=`cmd //c echo $new_path`
38070 
38071   input_path="$new_path"
38072   # Check if we need to convert this using DOS-style short mode. If the path
38073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38074   # take no chances and rewrite it.
38075   # Note: m4 eats our [], so we need to use [ and ] instead.
38076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38077   if test "x$has_forbidden_chars" != x; then
38078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38079     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38080   fi
38081 
38082     # Output is in $new_path
38083 
38084   windows_path="$new_path"
38085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38086     unix_path=`$CYGPATH -u "$windows_path"`
38087     new_path="$unix_path"
38088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38090     new_path="$unix_path"
38091   fi
38092 
38093     # remove trailing .exe if any
38094     new_path="${new_path/%.exe/}"
38095 
38096     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38097     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38098   fi
38099 
38100     else
38101       # We're on a unix platform. Hooray! :)
38102       # First separate the path from the arguments. This will split at the first
38103       # space.
38104       complete="$AS"
38105       path="${complete%% *}"
38106       tmp="$complete EOL"
38107       arguments="${tmp#* }"
38108 
38109       # Cannot rely on the command "which" here since it doesn't always work.
38110       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38111       if test -z "$is_absolute_path"; then
38112         # Path to executable is not absolute. Find it.
38113         IFS_save="$IFS"
38114         IFS=:
38115         for p in $PATH; do
38116           if test -f "$p/$path" && test -x "$p/$path"; then
38117             new_path="$p/$path"
38118             break
38119           fi
38120         done
38121         IFS="$IFS_save"
38122       else
38123         # This is an absolute path, we can use it without further modifications.
38124         new_path="$path"
38125       fi
38126 
38127       if test "x$new_path" = x; then
38128         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38129 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38130         has_space=`$ECHO "$complete" | $GREP " "`
38131         if test "x$has_space" != x; then
38132           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38133 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38134         fi
38135         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38136       fi
38137     fi
38138 
38139     # Now join together the path and the arguments once again
38140     if test "x$arguments" != xEOL; then
38141       new_complete="$new_path ${arguments% *}"
38142     else
38143       new_complete="$new_path"
38144     fi
38145 
38146     if test "x$complete" != "x$new_complete"; then
38147       AS="$new_complete"
38148       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38149 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38150     fi
38151   fi
38152 
38153     if test "x$AS" = x; then
38154       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38155     fi
38156   else
38157     # FIXME: is this correct for microsoft?
38158     AS="$CC -c"
38159   fi
38160 
38161 
38162   #
38163   # Setup the archiver (AR)
38164   #
38165   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38166     # The corresponding ar tool is lib.exe (used to create static libraries)
38167     # Extract the first word of "lib", so it can be a program name with args.
38168 set dummy lib; ac_word=$2
38169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38170 $as_echo_n "checking for $ac_word... " >&6; }
38171 if ${ac_cv_prog_AR+:} false; then :
38172   $as_echo_n "(cached) " >&6
38173 else
38174   if test -n "$AR"; then
38175   ac_cv_prog_AR="$AR" # Let the user override the test.
38176 else
38177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38178 for as_dir in $PATH
38179 do
38180   IFS=$as_save_IFS
38181   test -z "$as_dir" && as_dir=.
38182     for ac_exec_ext in '' $ac_executable_extensions; do
38183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38184     ac_cv_prog_AR="lib"
38185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38186     break 2
38187   fi
38188 done
38189   done
38190 IFS=$as_save_IFS
38191 
38192 fi
38193 fi
38194 AR=$ac_cv_prog_AR
38195 if test -n "$AR"; then
38196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38197 $as_echo "$AR" >&6; }
38198 else
38199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38200 $as_echo "no" >&6; }
38201 fi
38202 
38203 
38204   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38205 
38206 
38207   # Publish this variable in the help.
38208 
38209 
38210   if [ -z "${AR+x}" ]; then
38211     # The variable is not set by user, try to locate tool using the code snippet
38212     if test -n "$ac_tool_prefix"; then
38213   for ac_prog in ar gcc-ar
38214   do
38215     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38216 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38218 $as_echo_n "checking for $ac_word... " >&6; }
38219 if ${ac_cv_prog_AR+:} false; then :
38220   $as_echo_n "(cached) " >&6
38221 else
38222   if test -n "$AR"; then
38223   ac_cv_prog_AR="$AR" # Let the user override the test.
38224 else
38225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38226 for as_dir in $PATH
38227 do
38228   IFS=$as_save_IFS
38229   test -z "$as_dir" && as_dir=.
38230     for ac_exec_ext in '' $ac_executable_extensions; do
38231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38232     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38234     break 2
38235   fi
38236 done
38237   done
38238 IFS=$as_save_IFS
38239 
38240 fi
38241 fi
38242 AR=$ac_cv_prog_AR
38243 if test -n "$AR"; then
38244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38245 $as_echo "$AR" >&6; }
38246 else
38247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38248 $as_echo "no" >&6; }
38249 fi
38250 
38251 
38252     test -n "$AR" && break
38253   done
38254 fi
38255 if test -z "$AR"; then
38256   ac_ct_AR=$AR
38257   for ac_prog in ar gcc-ar
38258 do
38259   # Extract the first word of "$ac_prog", so it can be a program name with args.
38260 set dummy $ac_prog; ac_word=$2
38261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38262 $as_echo_n "checking for $ac_word... " >&6; }
38263 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38264   $as_echo_n "(cached) " >&6
38265 else
38266   if test -n "$ac_ct_AR"; then
38267   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38268 else
38269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38270 for as_dir in $PATH
38271 do
38272   IFS=$as_save_IFS
38273   test -z "$as_dir" && as_dir=.
38274     for ac_exec_ext in '' $ac_executable_extensions; do
38275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38276     ac_cv_prog_ac_ct_AR="$ac_prog"
38277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38278     break 2
38279   fi
38280 done
38281   done
38282 IFS=$as_save_IFS
38283 
38284 fi
38285 fi
38286 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38287 if test -n "$ac_ct_AR"; then
38288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38289 $as_echo "$ac_ct_AR" >&6; }
38290 else
38291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38292 $as_echo "no" >&6; }
38293 fi
38294 
38295 
38296   test -n "$ac_ct_AR" && break
38297 done
38298 
38299   if test "x$ac_ct_AR" = x; then
38300     AR=""
38301   else
38302     case $cross_compiling:$ac_tool_warned in
38303 yes:)
38304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38305 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38306 ac_tool_warned=yes ;;
38307 esac
38308     AR=$ac_ct_AR
38309   fi
38310 fi
38311 
38312   else
38313     # The variable is set, but is it from the command line or the environment?
38314 
38315     # Try to remove the string !AR! from our list.
38316     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38317     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38318       # If it failed, the variable was not from the command line. Ignore it,
38319       # but warn the user (except for BASH, which is always set by the calling BASH).
38320       if test "xAR" != xBASH; then
38321         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38322 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38323       fi
38324       # Try to locate tool using the code snippet
38325       if test -n "$ac_tool_prefix"; then
38326   for ac_prog in ar gcc-ar
38327   do
38328     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38329 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38331 $as_echo_n "checking for $ac_word... " >&6; }
38332 if ${ac_cv_prog_AR+:} false; then :
38333   $as_echo_n "(cached) " >&6
38334 else
38335   if test -n "$AR"; then
38336   ac_cv_prog_AR="$AR" # Let the user override the test.
38337 else
38338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38339 for as_dir in $PATH
38340 do
38341   IFS=$as_save_IFS
38342   test -z "$as_dir" && as_dir=.
38343     for ac_exec_ext in '' $ac_executable_extensions; do
38344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38345     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38347     break 2
38348   fi
38349 done
38350   done
38351 IFS=$as_save_IFS
38352 
38353 fi
38354 fi
38355 AR=$ac_cv_prog_AR
38356 if test -n "$AR"; then
38357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38358 $as_echo "$AR" >&6; }
38359 else
38360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38361 $as_echo "no" >&6; }
38362 fi
38363 
38364 
38365     test -n "$AR" && break
38366   done
38367 fi
38368 if test -z "$AR"; then
38369   ac_ct_AR=$AR
38370   for ac_prog in ar gcc-ar
38371 do
38372   # Extract the first word of "$ac_prog", so it can be a program name with args.
38373 set dummy $ac_prog; ac_word=$2
38374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38375 $as_echo_n "checking for $ac_word... " >&6; }
38376 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38377   $as_echo_n "(cached) " >&6
38378 else
38379   if test -n "$ac_ct_AR"; then
38380   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38381 else
38382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38383 for as_dir in $PATH
38384 do
38385   IFS=$as_save_IFS
38386   test -z "$as_dir" && as_dir=.
38387     for ac_exec_ext in '' $ac_executable_extensions; do
38388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38389     ac_cv_prog_ac_ct_AR="$ac_prog"
38390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38391     break 2
38392   fi
38393 done
38394   done
38395 IFS=$as_save_IFS
38396 
38397 fi
38398 fi
38399 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38400 if test -n "$ac_ct_AR"; then
38401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38402 $as_echo "$ac_ct_AR" >&6; }
38403 else
38404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38405 $as_echo "no" >&6; }
38406 fi
38407 
38408 
38409   test -n "$ac_ct_AR" && break
38410 done
38411 
38412   if test "x$ac_ct_AR" = x; then
38413     AR=""
38414   else
38415     case $cross_compiling:$ac_tool_warned in
38416 yes:)
38417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38418 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38419 ac_tool_warned=yes ;;
38420 esac
38421     AR=$ac_ct_AR
38422   fi
38423 fi
38424 
38425     else
38426       # If it succeeded, then it was overridden by the user. We will use it
38427       # for the tool.
38428 
38429       # First remove it from the list of overridden variables, so we can test
38430       # for unknown variables in the end.
38431       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38432 
38433       # Check if we try to supply an empty value
38434       if test "x$AR" = x; then
38435         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38436 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38437         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38438 $as_echo_n "checking for AR... " >&6; }
38439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38440 $as_echo "disabled" >&6; }
38441       else
38442         # Check if the provided tool contains a complete path.
38443         tool_specified="$AR"
38444         tool_basename="${tool_specified##*/}"
38445         if test "x$tool_basename" = "x$tool_specified"; then
38446           # A command without a complete path is provided, search $PATH.
38447           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38448 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38449           # Extract the first word of "$tool_basename", so it can be a program name with args.
38450 set dummy $tool_basename; ac_word=$2
38451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38452 $as_echo_n "checking for $ac_word... " >&6; }
38453 if ${ac_cv_path_AR+:} false; then :
38454   $as_echo_n "(cached) " >&6
38455 else
38456   case $AR in
38457   [\\/]* | ?:[\\/]*)
38458   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38459   ;;
38460   *)
38461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38462 for as_dir in $PATH
38463 do
38464   IFS=$as_save_IFS
38465   test -z "$as_dir" && as_dir=.
38466     for ac_exec_ext in '' $ac_executable_extensions; do
38467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38468     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38470     break 2
38471   fi
38472 done
38473   done
38474 IFS=$as_save_IFS
38475 
38476   ;;
38477 esac
38478 fi
38479 AR=$ac_cv_path_AR
38480 if test -n "$AR"; then
38481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38482 $as_echo "$AR" >&6; }
38483 else
38484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38485 $as_echo "no" >&6; }
38486 fi
38487 
38488 
38489           if test "x$AR" = x; then
38490             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38491           fi
38492         else
38493           # Otherwise we believe it is a complete path. Use it as it is.
38494           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38495 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38496           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38497 $as_echo_n "checking for AR... " >&6; }
38498           if test ! -x "$tool_specified"; then
38499             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38500 $as_echo "not found" >&6; }
38501             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38502           fi
38503           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38504 $as_echo "$tool_specified" >&6; }
38505         fi
38506       fi
38507     fi
38508 
38509   fi
38510 
38511 
38512   else
38513 
38514 
38515   # Publish this variable in the help.
38516 
38517 
38518   if [ -z "${AR+x}" ]; then
38519     # The variable is not set by user, try to locate tool using the code snippet
38520     if test -n "$ac_tool_prefix"; then
38521   for ac_prog in ar
38522   do
38523     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38524 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38526 $as_echo_n "checking for $ac_word... " >&6; }
38527 if ${ac_cv_prog_AR+:} false; then :
38528   $as_echo_n "(cached) " >&6
38529 else
38530   if test -n "$AR"; then
38531   ac_cv_prog_AR="$AR" # Let the user override the test.
38532 else
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_prog_AR="$ac_tool_prefix$ac_prog"
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 fi
38549 fi
38550 AR=$ac_cv_prog_AR
38551 if test -n "$AR"; then
38552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38553 $as_echo "$AR" >&6; }
38554 else
38555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38556 $as_echo "no" >&6; }
38557 fi
38558 
38559 
38560     test -n "$AR" && break
38561   done
38562 fi
38563 if test -z "$AR"; then
38564   ac_ct_AR=$AR
38565   for ac_prog in ar
38566 do
38567   # Extract the first word of "$ac_prog", so it can be a program name with args.
38568 set dummy $ac_prog; ac_word=$2
38569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38570 $as_echo_n "checking for $ac_word... " >&6; }
38571 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38572   $as_echo_n "(cached) " >&6
38573 else
38574   if test -n "$ac_ct_AR"; then
38575   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38576 else
38577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38578 for as_dir in $PATH
38579 do
38580   IFS=$as_save_IFS
38581   test -z "$as_dir" && as_dir=.
38582     for ac_exec_ext in '' $ac_executable_extensions; do
38583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38584     ac_cv_prog_ac_ct_AR="$ac_prog"
38585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38586     break 2
38587   fi
38588 done
38589   done
38590 IFS=$as_save_IFS
38591 
38592 fi
38593 fi
38594 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38595 if test -n "$ac_ct_AR"; then
38596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38597 $as_echo "$ac_ct_AR" >&6; }
38598 else
38599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38600 $as_echo "no" >&6; }
38601 fi
38602 
38603 
38604   test -n "$ac_ct_AR" && break
38605 done
38606 
38607   if test "x$ac_ct_AR" = x; then
38608     AR=""
38609   else
38610     case $cross_compiling:$ac_tool_warned in
38611 yes:)
38612 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38613 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38614 ac_tool_warned=yes ;;
38615 esac
38616     AR=$ac_ct_AR
38617   fi
38618 fi
38619 
38620   else
38621     # The variable is set, but is it from the command line or the environment?
38622 
38623     # Try to remove the string !AR! from our list.
38624     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38625     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38626       # If it failed, the variable was not from the command line. Ignore it,
38627       # but warn the user (except for BASH, which is always set by the calling BASH).
38628       if test "xAR" != xBASH; then
38629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38630 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38631       fi
38632       # Try to locate tool using the code snippet
38633       if test -n "$ac_tool_prefix"; then
38634   for ac_prog in ar
38635   do
38636     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38637 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38639 $as_echo_n "checking for $ac_word... " >&6; }
38640 if ${ac_cv_prog_AR+:} false; then :
38641   $as_echo_n "(cached) " >&6
38642 else
38643   if test -n "$AR"; then
38644   ac_cv_prog_AR="$AR" # Let the user override the test.
38645 else
38646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38647 for as_dir in $PATH
38648 do
38649   IFS=$as_save_IFS
38650   test -z "$as_dir" && as_dir=.
38651     for ac_exec_ext in '' $ac_executable_extensions; do
38652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38653     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38655     break 2
38656   fi
38657 done
38658   done
38659 IFS=$as_save_IFS
38660 
38661 fi
38662 fi
38663 AR=$ac_cv_prog_AR
38664 if test -n "$AR"; then
38665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38666 $as_echo "$AR" >&6; }
38667 else
38668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38669 $as_echo "no" >&6; }
38670 fi
38671 
38672 
38673     test -n "$AR" && break
38674   done
38675 fi
38676 if test -z "$AR"; then
38677   ac_ct_AR=$AR
38678   for ac_prog in ar
38679 do
38680   # Extract the first word of "$ac_prog", so it can be a program name with args.
38681 set dummy $ac_prog; ac_word=$2
38682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38683 $as_echo_n "checking for $ac_word... " >&6; }
38684 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38685   $as_echo_n "(cached) " >&6
38686 else
38687   if test -n "$ac_ct_AR"; then
38688   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38689 else
38690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38691 for as_dir in $PATH
38692 do
38693   IFS=$as_save_IFS
38694   test -z "$as_dir" && as_dir=.
38695     for ac_exec_ext in '' $ac_executable_extensions; do
38696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38697     ac_cv_prog_ac_ct_AR="$ac_prog"
38698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38699     break 2
38700   fi
38701 done
38702   done
38703 IFS=$as_save_IFS
38704 
38705 fi
38706 fi
38707 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38708 if test -n "$ac_ct_AR"; then
38709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38710 $as_echo "$ac_ct_AR" >&6; }
38711 else
38712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38713 $as_echo "no" >&6; }
38714 fi
38715 
38716 
38717   test -n "$ac_ct_AR" && break
38718 done
38719 
38720   if test "x$ac_ct_AR" = x; then
38721     AR=""
38722   else
38723     case $cross_compiling:$ac_tool_warned in
38724 yes:)
38725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38726 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38727 ac_tool_warned=yes ;;
38728 esac
38729     AR=$ac_ct_AR
38730   fi
38731 fi
38732 
38733     else
38734       # If it succeeded, then it was overridden by the user. We will use it
38735       # for the tool.
38736 
38737       # First remove it from the list of overridden variables, so we can test
38738       # for unknown variables in the end.
38739       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38740 
38741       # Check if we try to supply an empty value
38742       if test "x$AR" = x; then
38743         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38744 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38745         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38746 $as_echo_n "checking for AR... " >&6; }
38747         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38748 $as_echo "disabled" >&6; }
38749       else
38750         # Check if the provided tool contains a complete path.
38751         tool_specified="$AR"
38752         tool_basename="${tool_specified##*/}"
38753         if test "x$tool_basename" = "x$tool_specified"; then
38754           # A command without a complete path is provided, search $PATH.
38755           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38756 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38757           # Extract the first word of "$tool_basename", so it can be a program name with args.
38758 set dummy $tool_basename; ac_word=$2
38759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38760 $as_echo_n "checking for $ac_word... " >&6; }
38761 if ${ac_cv_path_AR+:} false; then :
38762   $as_echo_n "(cached) " >&6
38763 else
38764   case $AR in
38765   [\\/]* | ?:[\\/]*)
38766   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38767   ;;
38768   *)
38769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38770 for as_dir in $PATH
38771 do
38772   IFS=$as_save_IFS
38773   test -z "$as_dir" && as_dir=.
38774     for ac_exec_ext in '' $ac_executable_extensions; do
38775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38776     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38778     break 2
38779   fi
38780 done
38781   done
38782 IFS=$as_save_IFS
38783 
38784   ;;
38785 esac
38786 fi
38787 AR=$ac_cv_path_AR
38788 if test -n "$AR"; then
38789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38790 $as_echo "$AR" >&6; }
38791 else
38792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38793 $as_echo "no" >&6; }
38794 fi
38795 
38796 
38797           if test "x$AR" = x; then
38798             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38799           fi
38800         else
38801           # Otherwise we believe it is a complete path. Use it as it is.
38802           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38803 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38804           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38805 $as_echo_n "checking for AR... " >&6; }
38806           if test ! -x "$tool_specified"; then
38807             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38808 $as_echo "not found" >&6; }
38809             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38810           fi
38811           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38812 $as_echo "$tool_specified" >&6; }
38813         fi
38814       fi
38815     fi
38816 
38817   fi
38818 
38819 
38820   fi
38821 
38822   # Only process if variable expands to non-empty
38823 
38824   if test "x$AR" != x; then
38825     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38826 
38827   # First separate the path from the arguments. This will split at the first
38828   # space.
38829   complete="$AR"
38830   path="${complete%% *}"
38831   tmp="$complete EOL"
38832   arguments="${tmp#* }"
38833 
38834   # Input might be given as Windows format, start by converting to
38835   # unix format.
38836   new_path=`$CYGPATH -u "$path"`
38837 
38838   # Now try to locate executable using which
38839   new_path=`$WHICH "$new_path" 2> /dev/null`
38840   # bat and cmd files are not always considered executable in cygwin causing which
38841   # to not find them
38842   if test "x$new_path" = x \
38843       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38844       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38845     new_path=`$CYGPATH -u "$path"`
38846   fi
38847   if test "x$new_path" = x; then
38848     # Oops. Which didn't find the executable.
38849     # The splitting of arguments from the executable at a space might have been incorrect,
38850     # since paths with space are more likely in Windows. Give it another try with the whole
38851     # argument.
38852     path="$complete"
38853     arguments="EOL"
38854     new_path=`$CYGPATH -u "$path"`
38855     new_path=`$WHICH "$new_path" 2> /dev/null`
38856     # bat and cmd files are not always considered executable in cygwin causing which
38857     # to not find them
38858     if test "x$new_path" = x \
38859         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38860         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38861       new_path=`$CYGPATH -u "$path"`
38862     fi
38863     if test "x$new_path" = x; then
38864       # It's still not found. Now this is an unrecoverable error.
38865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38866 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38867       has_space=`$ECHO "$complete" | $GREP " "`
38868       if test "x$has_space" != x; then
38869         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38870 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38871       fi
38872       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38873     fi
38874   fi
38875 
38876   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38877   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38878   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38879   # "foo.exe" is OK but "foo" is an error.
38880   #
38881   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38882   # It is also a way to make sure we got the proper file name for the real test later on.
38883   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38884   if test "x$test_shortpath" = x; then
38885     # Short path failed, file does not exist as specified.
38886     # Try adding .exe or .cmd
38887     if test -f "${new_path}.exe"; then
38888       input_to_shortpath="${new_path}.exe"
38889     elif test -f "${new_path}.cmd"; then
38890       input_to_shortpath="${new_path}.cmd"
38891     else
38892       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38893 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38894       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38895 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38896       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38897     fi
38898   else
38899     input_to_shortpath="$new_path"
38900   fi
38901 
38902   # Call helper function which possibly converts this using DOS-style short mode.
38903   # If so, the updated path is stored in $new_path.
38904   new_path="$input_to_shortpath"
38905 
38906   input_path="$input_to_shortpath"
38907   # Check if we need to convert this using DOS-style short mode. If the path
38908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38909   # take no chances and rewrite it.
38910   # Note: m4 eats our [], so we need to use [ and ] instead.
38911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38912   if test "x$has_forbidden_chars" != x; then
38913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38914     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38915     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38916     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38917       # Going to short mode and back again did indeed matter. Since short mode is
38918       # case insensitive, let's make it lowercase to improve readability.
38919       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38920       # Now convert it back to Unix-style (cygpath)
38921       input_path=`$CYGPATH -u "$shortmode_path"`
38922       new_path="$input_path"
38923     fi
38924   fi
38925 
38926   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38927   if test "x$test_cygdrive_prefix" = x; then
38928     # As a simple fix, exclude /usr/bin since it's not a real path.
38929     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38930       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38931       # a path prefixed by /cygdrive for fixpath to work.
38932       new_path="$CYGWIN_ROOT_PATH$input_path"
38933     fi
38934   fi
38935 
38936   # remove trailing .exe if any
38937   new_path="${new_path/%.exe/}"
38938 
38939     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38940 
38941   # First separate the path from the arguments. This will split at the first
38942   # space.
38943   complete="$AR"
38944   path="${complete%% *}"
38945   tmp="$complete EOL"
38946   arguments="${tmp#* }"
38947 
38948   # Input might be given as Windows format, start by converting to
38949   # unix format.
38950   new_path="$path"
38951 
38952   windows_path="$new_path"
38953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38954     unix_path=`$CYGPATH -u "$windows_path"`
38955     new_path="$unix_path"
38956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38958     new_path="$unix_path"
38959   fi
38960 
38961 
38962   # Now try to locate executable using which
38963   new_path=`$WHICH "$new_path" 2> /dev/null`
38964 
38965   if test "x$new_path" = x; then
38966     # Oops. Which didn't find the executable.
38967     # The splitting of arguments from the executable at a space might have been incorrect,
38968     # since paths with space are more likely in Windows. Give it another try with the whole
38969     # argument.
38970     path="$complete"
38971     arguments="EOL"
38972     new_path="$path"
38973 
38974   windows_path="$new_path"
38975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38976     unix_path=`$CYGPATH -u "$windows_path"`
38977     new_path="$unix_path"
38978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38980     new_path="$unix_path"
38981   fi
38982 
38983 
38984     new_path=`$WHICH "$new_path" 2> /dev/null`
38985     # bat and cmd files are not always considered executable in MSYS causing which
38986     # to not find them
38987     if test "x$new_path" = x \
38988         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38989         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38990       new_path="$path"
38991 
38992   windows_path="$new_path"
38993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38994     unix_path=`$CYGPATH -u "$windows_path"`
38995     new_path="$unix_path"
38996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38998     new_path="$unix_path"
38999   fi
39000 
39001     fi
39002 
39003     if test "x$new_path" = x; then
39004       # It's still not found. Now this is an unrecoverable error.
39005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
39006 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
39007       has_space=`$ECHO "$complete" | $GREP " "`
39008       if test "x$has_space" != x; then
39009         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39010 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39011       fi
39012       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39013     fi
39014   fi
39015 
39016   # Now new_path has a complete unix path to the binary
39017   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39018     # Keep paths in /bin as-is, but remove trailing .exe if any
39019     new_path="${new_path/%.exe/}"
39020     # Do not save /bin paths to all_fixpath_prefixes!
39021   else
39022     # Not in mixed or Windows style, start by that.
39023     new_path=`cmd //c echo $new_path`
39024 
39025   input_path="$new_path"
39026   # Check if we need to convert this using DOS-style short mode. If the path
39027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39028   # take no chances and rewrite it.
39029   # Note: m4 eats our [], so we need to use [ and ] instead.
39030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39031   if test "x$has_forbidden_chars" != x; then
39032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39034   fi
39035 
39036     # Output is in $new_path
39037 
39038   windows_path="$new_path"
39039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39040     unix_path=`$CYGPATH -u "$windows_path"`
39041     new_path="$unix_path"
39042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39044     new_path="$unix_path"
39045   fi
39046 
39047     # remove trailing .exe if any
39048     new_path="${new_path/%.exe/}"
39049 
39050     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39051     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39052   fi
39053 
39054     else
39055       # We're on a unix platform. Hooray! :)
39056       # First separate the path from the arguments. This will split at the first
39057       # space.
39058       complete="$AR"
39059       path="${complete%% *}"
39060       tmp="$complete EOL"
39061       arguments="${tmp#* }"
39062 
39063       # Cannot rely on the command "which" here since it doesn't always work.
39064       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39065       if test -z "$is_absolute_path"; then
39066         # Path to executable is not absolute. Find it.
39067         IFS_save="$IFS"
39068         IFS=:
39069         for p in $PATH; do
39070           if test -f "$p/$path" && test -x "$p/$path"; then
39071             new_path="$p/$path"
39072             break
39073           fi
39074         done
39075         IFS="$IFS_save"
39076       else
39077         # This is an absolute path, we can use it without further modifications.
39078         new_path="$path"
39079       fi
39080 
39081       if test "x$new_path" = x; then
39082         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
39083 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
39084         has_space=`$ECHO "$complete" | $GREP " "`
39085         if test "x$has_space" != x; then
39086           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39087 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39088         fi
39089         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39090       fi
39091     fi
39092 
39093     # Now join together the path and the arguments once again
39094     if test "x$arguments" != xEOL; then
39095       new_complete="$new_path ${arguments% *}"
39096     else
39097       new_complete="$new_path"
39098     fi
39099 
39100     if test "x$complete" != "x$new_complete"; then
39101       AR="$new_complete"
39102       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
39103 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
39104     fi
39105   fi
39106 
39107 
39108 
39109   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
39110 
39111 
39112   # Publish this variable in the help.
39113 
39114 
39115   if [ -z "${LIPO+x}" ]; then
39116     # The variable is not set by user, try to locate tool using the code snippet
39117     for ac_prog in lipo
39118 do
39119   # Extract the first word of "$ac_prog", so it can be a program name with args.
39120 set dummy $ac_prog; ac_word=$2
39121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39122 $as_echo_n "checking for $ac_word... " >&6; }
39123 if ${ac_cv_path_LIPO+:} false; then :
39124   $as_echo_n "(cached) " >&6
39125 else
39126   case $LIPO in
39127   [\\/]* | ?:[\\/]*)
39128   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39129   ;;
39130   *)
39131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39132 for as_dir in $PATH
39133 do
39134   IFS=$as_save_IFS
39135   test -z "$as_dir" && as_dir=.
39136     for ac_exec_ext in '' $ac_executable_extensions; do
39137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39138     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39140     break 2
39141   fi
39142 done
39143   done
39144 IFS=$as_save_IFS
39145 
39146   ;;
39147 esac
39148 fi
39149 LIPO=$ac_cv_path_LIPO
39150 if test -n "$LIPO"; then
39151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39152 $as_echo "$LIPO" >&6; }
39153 else
39154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39155 $as_echo "no" >&6; }
39156 fi
39157 
39158 
39159   test -n "$LIPO" && break
39160 done
39161 
39162   else
39163     # The variable is set, but is it from the command line or the environment?
39164 
39165     # Try to remove the string !LIPO! from our list.
39166     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39167     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39168       # If it failed, the variable was not from the command line. Ignore it,
39169       # but warn the user (except for BASH, which is always set by the calling BASH).
39170       if test "xLIPO" != xBASH; then
39171         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39172 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39173       fi
39174       # Try to locate tool using the code snippet
39175       for ac_prog in lipo
39176 do
39177   # Extract the first word of "$ac_prog", so it can be a program name with args.
39178 set dummy $ac_prog; ac_word=$2
39179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39180 $as_echo_n "checking for $ac_word... " >&6; }
39181 if ${ac_cv_path_LIPO+:} false; then :
39182   $as_echo_n "(cached) " >&6
39183 else
39184   case $LIPO in
39185   [\\/]* | ?:[\\/]*)
39186   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39187   ;;
39188   *)
39189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39190 for as_dir in $PATH
39191 do
39192   IFS=$as_save_IFS
39193   test -z "$as_dir" && as_dir=.
39194     for ac_exec_ext in '' $ac_executable_extensions; do
39195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39196     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39198     break 2
39199   fi
39200 done
39201   done
39202 IFS=$as_save_IFS
39203 
39204   ;;
39205 esac
39206 fi
39207 LIPO=$ac_cv_path_LIPO
39208 if test -n "$LIPO"; then
39209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39210 $as_echo "$LIPO" >&6; }
39211 else
39212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39213 $as_echo "no" >&6; }
39214 fi
39215 
39216 
39217   test -n "$LIPO" && break
39218 done
39219 
39220     else
39221       # If it succeeded, then it was overridden by the user. We will use it
39222       # for the tool.
39223 
39224       # First remove it from the list of overridden variables, so we can test
39225       # for unknown variables in the end.
39226       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39227 
39228       # Check if we try to supply an empty value
39229       if test "x$LIPO" = x; then
39230         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39231 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39233 $as_echo_n "checking for LIPO... " >&6; }
39234         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39235 $as_echo "disabled" >&6; }
39236       else
39237         # Check if the provided tool contains a complete path.
39238         tool_specified="$LIPO"
39239         tool_basename="${tool_specified##*/}"
39240         if test "x$tool_basename" = "x$tool_specified"; then
39241           # A command without a complete path is provided, search $PATH.
39242           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39243 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39244           # Extract the first word of "$tool_basename", so it can be a program name with args.
39245 set dummy $tool_basename; ac_word=$2
39246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39247 $as_echo_n "checking for $ac_word... " >&6; }
39248 if ${ac_cv_path_LIPO+:} false; then :
39249   $as_echo_n "(cached) " >&6
39250 else
39251   case $LIPO in
39252   [\\/]* | ?:[\\/]*)
39253   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39254   ;;
39255   *)
39256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39257 for as_dir in $PATH
39258 do
39259   IFS=$as_save_IFS
39260   test -z "$as_dir" && as_dir=.
39261     for ac_exec_ext in '' $ac_executable_extensions; do
39262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39263     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39265     break 2
39266   fi
39267 done
39268   done
39269 IFS=$as_save_IFS
39270 
39271   ;;
39272 esac
39273 fi
39274 LIPO=$ac_cv_path_LIPO
39275 if test -n "$LIPO"; then
39276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39277 $as_echo "$LIPO" >&6; }
39278 else
39279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39280 $as_echo "no" >&6; }
39281 fi
39282 
39283 
39284           if test "x$LIPO" = x; then
39285             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39286           fi
39287         else
39288           # Otherwise we believe it is a complete path. Use it as it is.
39289           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39290 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39291           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39292 $as_echo_n "checking for LIPO... " >&6; }
39293           if test ! -x "$tool_specified"; then
39294             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39295 $as_echo "not found" >&6; }
39296             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39297           fi
39298           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39299 $as_echo "$tool_specified" >&6; }
39300         fi
39301       fi
39302     fi
39303 
39304   fi
39305 
39306 
39307 
39308   # Only process if variable expands to non-empty
39309 
39310   if test "x$LIPO" != x; then
39311     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39312 
39313   # First separate the path from the arguments. This will split at the first
39314   # space.
39315   complete="$LIPO"
39316   path="${complete%% *}"
39317   tmp="$complete EOL"
39318   arguments="${tmp#* }"
39319 
39320   # Input might be given as Windows format, start by converting to
39321   # unix format.
39322   new_path=`$CYGPATH -u "$path"`
39323 
39324   # Now try to locate executable using which
39325   new_path=`$WHICH "$new_path" 2> /dev/null`
39326   # bat and cmd files are not always considered executable in cygwin causing which
39327   # to not find them
39328   if test "x$new_path" = x \
39329       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39330       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39331     new_path=`$CYGPATH -u "$path"`
39332   fi
39333   if test "x$new_path" = x; then
39334     # Oops. Which didn't find the executable.
39335     # The splitting of arguments from the executable at a space might have been incorrect,
39336     # since paths with space are more likely in Windows. Give it another try with the whole
39337     # argument.
39338     path="$complete"
39339     arguments="EOL"
39340     new_path=`$CYGPATH -u "$path"`
39341     new_path=`$WHICH "$new_path" 2> /dev/null`
39342     # bat and cmd files are not always considered executable in cygwin causing which
39343     # to not find them
39344     if test "x$new_path" = x \
39345         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39346         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39347       new_path=`$CYGPATH -u "$path"`
39348     fi
39349     if test "x$new_path" = x; then
39350       # It's still not found. Now this is an unrecoverable error.
39351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39352 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39353       has_space=`$ECHO "$complete" | $GREP " "`
39354       if test "x$has_space" != x; then
39355         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39356 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39357       fi
39358       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39359     fi
39360   fi
39361 
39362   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39363   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39364   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39365   # "foo.exe" is OK but "foo" is an error.
39366   #
39367   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39368   # It is also a way to make sure we got the proper file name for the real test later on.
39369   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39370   if test "x$test_shortpath" = x; then
39371     # Short path failed, file does not exist as specified.
39372     # Try adding .exe or .cmd
39373     if test -f "${new_path}.exe"; then
39374       input_to_shortpath="${new_path}.exe"
39375     elif test -f "${new_path}.cmd"; then
39376       input_to_shortpath="${new_path}.cmd"
39377     else
39378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39379 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39380       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39381 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39382       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39383     fi
39384   else
39385     input_to_shortpath="$new_path"
39386   fi
39387 
39388   # Call helper function which possibly converts this using DOS-style short mode.
39389   # If so, the updated path is stored in $new_path.
39390   new_path="$input_to_shortpath"
39391 
39392   input_path="$input_to_shortpath"
39393   # Check if we need to convert this using DOS-style short mode. If the path
39394   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39395   # take no chances and rewrite it.
39396   # Note: m4 eats our [], so we need to use [ and ] instead.
39397   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39398   if test "x$has_forbidden_chars" != x; then
39399     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39400     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39401     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39402     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39403       # Going to short mode and back again did indeed matter. Since short mode is
39404       # case insensitive, let's make it lowercase to improve readability.
39405       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39406       # Now convert it back to Unix-style (cygpath)
39407       input_path=`$CYGPATH -u "$shortmode_path"`
39408       new_path="$input_path"
39409     fi
39410   fi
39411 
39412   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39413   if test "x$test_cygdrive_prefix" = x; then
39414     # As a simple fix, exclude /usr/bin since it's not a real path.
39415     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39416       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39417       # a path prefixed by /cygdrive for fixpath to work.
39418       new_path="$CYGWIN_ROOT_PATH$input_path"
39419     fi
39420   fi
39421 
39422   # remove trailing .exe if any
39423   new_path="${new_path/%.exe/}"
39424 
39425     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39426 
39427   # First separate the path from the arguments. This will split at the first
39428   # space.
39429   complete="$LIPO"
39430   path="${complete%% *}"
39431   tmp="$complete EOL"
39432   arguments="${tmp#* }"
39433 
39434   # Input might be given as Windows format, start by converting to
39435   # unix format.
39436   new_path="$path"
39437 
39438   windows_path="$new_path"
39439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39440     unix_path=`$CYGPATH -u "$windows_path"`
39441     new_path="$unix_path"
39442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39444     new_path="$unix_path"
39445   fi
39446 
39447 
39448   # Now try to locate executable using which
39449   new_path=`$WHICH "$new_path" 2> /dev/null`
39450 
39451   if test "x$new_path" = x; then
39452     # Oops. Which didn't find the executable.
39453     # The splitting of arguments from the executable at a space might have been incorrect,
39454     # since paths with space are more likely in Windows. Give it another try with the whole
39455     # argument.
39456     path="$complete"
39457     arguments="EOL"
39458     new_path="$path"
39459 
39460   windows_path="$new_path"
39461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39462     unix_path=`$CYGPATH -u "$windows_path"`
39463     new_path="$unix_path"
39464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39466     new_path="$unix_path"
39467   fi
39468 
39469 
39470     new_path=`$WHICH "$new_path" 2> /dev/null`
39471     # bat and cmd files are not always considered executable in MSYS causing which
39472     # to not find them
39473     if test "x$new_path" = x \
39474         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39475         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39476       new_path="$path"
39477 
39478   windows_path="$new_path"
39479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39480     unix_path=`$CYGPATH -u "$windows_path"`
39481     new_path="$unix_path"
39482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39484     new_path="$unix_path"
39485   fi
39486 
39487     fi
39488 
39489     if test "x$new_path" = x; then
39490       # It's still not found. Now this is an unrecoverable error.
39491       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39492 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39493       has_space=`$ECHO "$complete" | $GREP " "`
39494       if test "x$has_space" != x; then
39495         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39496 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39497       fi
39498       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39499     fi
39500   fi
39501 
39502   # Now new_path has a complete unix path to the binary
39503   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39504     # Keep paths in /bin as-is, but remove trailing .exe if any
39505     new_path="${new_path/%.exe/}"
39506     # Do not save /bin paths to all_fixpath_prefixes!
39507   else
39508     # Not in mixed or Windows style, start by that.
39509     new_path=`cmd //c echo $new_path`
39510 
39511   input_path="$new_path"
39512   # Check if we need to convert this using DOS-style short mode. If the path
39513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39514   # take no chances and rewrite it.
39515   # Note: m4 eats our [], so we need to use [ and ] instead.
39516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39517   if test "x$has_forbidden_chars" != x; then
39518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39519     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39520   fi
39521 
39522     # Output is in $new_path
39523 
39524   windows_path="$new_path"
39525   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39526     unix_path=`$CYGPATH -u "$windows_path"`
39527     new_path="$unix_path"
39528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39529     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39530     new_path="$unix_path"
39531   fi
39532 
39533     # remove trailing .exe if any
39534     new_path="${new_path/%.exe/}"
39535 
39536     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39537     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39538   fi
39539 
39540     else
39541       # We're on a unix platform. Hooray! :)
39542       # First separate the path from the arguments. This will split at the first
39543       # space.
39544       complete="$LIPO"
39545       path="${complete%% *}"
39546       tmp="$complete EOL"
39547       arguments="${tmp#* }"
39548 
39549       # Cannot rely on the command "which" here since it doesn't always work.
39550       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39551       if test -z "$is_absolute_path"; then
39552         # Path to executable is not absolute. Find it.
39553         IFS_save="$IFS"
39554         IFS=:
39555         for p in $PATH; do
39556           if test -f "$p/$path" && test -x "$p/$path"; then
39557             new_path="$p/$path"
39558             break
39559           fi
39560         done
39561         IFS="$IFS_save"
39562       else
39563         # This is an absolute path, we can use it without further modifications.
39564         new_path="$path"
39565       fi
39566 
39567       if test "x$new_path" = x; then
39568         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39569 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39570         has_space=`$ECHO "$complete" | $GREP " "`
39571         if test "x$has_space" != x; then
39572           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39573 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39574         fi
39575         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39576       fi
39577     fi
39578 
39579     # Now join together the path and the arguments once again
39580     if test "x$arguments" != xEOL; then
39581       new_complete="$new_path ${arguments% *}"
39582     else
39583       new_complete="$new_path"
39584     fi
39585 
39586     if test "x$complete" != "x$new_complete"; then
39587       LIPO="$new_complete"
39588       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39589 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39590     fi
39591   fi
39592 
39593   fi
39594 
39595   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39596     # Extract the first word of "mt", so it can be a program name with args.
39597 set dummy mt; ac_word=$2
39598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39599 $as_echo_n "checking for $ac_word... " >&6; }
39600 if ${ac_cv_prog_MT+:} false; then :
39601   $as_echo_n "(cached) " >&6
39602 else
39603   if test -n "$MT"; then
39604   ac_cv_prog_MT="$MT" # Let the user override the test.
39605 else
39606   ac_prog_rejected=no
39607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39608 for as_dir in $PATH
39609 do
39610   IFS=$as_save_IFS
39611   test -z "$as_dir" && as_dir=.
39612     for ac_exec_ext in '' $ac_executable_extensions; do
39613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39614     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39615        ac_prog_rejected=yes
39616        continue
39617      fi
39618     ac_cv_prog_MT="mt"
39619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39620     break 2
39621   fi
39622 done
39623   done
39624 IFS=$as_save_IFS
39625 
39626 if test $ac_prog_rejected = yes; then
39627   # We found a bogon in the path, so make sure we never use it.
39628   set dummy $ac_cv_prog_MT
39629   shift
39630   if test $# != 0; then
39631     # We chose a different compiler from the bogus one.
39632     # However, it has the same basename, so the bogon will be chosen
39633     # first if we set MT to just the basename; use the full file name.
39634     shift
39635     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39636   fi
39637 fi
39638 fi
39639 fi
39640 MT=$ac_cv_prog_MT
39641 if test -n "$MT"; then
39642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39643 $as_echo "$MT" >&6; }
39644 else
39645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39646 $as_echo "no" >&6; }
39647 fi
39648 
39649 
39650 
39651   # Only process if variable expands to non-empty
39652 
39653   if test "x$MT" != x; then
39654     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39655 
39656   # First separate the path from the arguments. This will split at the first
39657   # space.
39658   complete="$MT"
39659   path="${complete%% *}"
39660   tmp="$complete EOL"
39661   arguments="${tmp#* }"
39662 
39663   # Input might be given as Windows format, start by converting to
39664   # unix format.
39665   new_path=`$CYGPATH -u "$path"`
39666 
39667   # Now try to locate executable using which
39668   new_path=`$WHICH "$new_path" 2> /dev/null`
39669   # bat and cmd files are not always considered executable in cygwin causing which
39670   # to not find them
39671   if test "x$new_path" = x \
39672       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39673       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39674     new_path=`$CYGPATH -u "$path"`
39675   fi
39676   if test "x$new_path" = x; then
39677     # Oops. Which didn't find the executable.
39678     # The splitting of arguments from the executable at a space might have been incorrect,
39679     # since paths with space are more likely in Windows. Give it another try with the whole
39680     # argument.
39681     path="$complete"
39682     arguments="EOL"
39683     new_path=`$CYGPATH -u "$path"`
39684     new_path=`$WHICH "$new_path" 2> /dev/null`
39685     # bat and cmd files are not always considered executable in cygwin causing which
39686     # to not find them
39687     if test "x$new_path" = x \
39688         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39689         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39690       new_path=`$CYGPATH -u "$path"`
39691     fi
39692     if test "x$new_path" = x; then
39693       # It's still not found. Now this is an unrecoverable error.
39694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39695 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39696       has_space=`$ECHO "$complete" | $GREP " "`
39697       if test "x$has_space" != x; then
39698         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39699 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39700       fi
39701       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39702     fi
39703   fi
39704 
39705   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39706   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39707   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39708   # "foo.exe" is OK but "foo" is an error.
39709   #
39710   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39711   # It is also a way to make sure we got the proper file name for the real test later on.
39712   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39713   if test "x$test_shortpath" = x; then
39714     # Short path failed, file does not exist as specified.
39715     # Try adding .exe or .cmd
39716     if test -f "${new_path}.exe"; then
39717       input_to_shortpath="${new_path}.exe"
39718     elif test -f "${new_path}.cmd"; then
39719       input_to_shortpath="${new_path}.cmd"
39720     else
39721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39722 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39723       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39724 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39725       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39726     fi
39727   else
39728     input_to_shortpath="$new_path"
39729   fi
39730 
39731   # Call helper function which possibly converts this using DOS-style short mode.
39732   # If so, the updated path is stored in $new_path.
39733   new_path="$input_to_shortpath"
39734 
39735   input_path="$input_to_shortpath"
39736   # Check if we need to convert this using DOS-style short mode. If the path
39737   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39738   # take no chances and rewrite it.
39739   # Note: m4 eats our [], so we need to use [ and ] instead.
39740   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39741   if test "x$has_forbidden_chars" != x; then
39742     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39743     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39744     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39745     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39746       # Going to short mode and back again did indeed matter. Since short mode is
39747       # case insensitive, let's make it lowercase to improve readability.
39748       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39749       # Now convert it back to Unix-style (cygpath)
39750       input_path=`$CYGPATH -u "$shortmode_path"`
39751       new_path="$input_path"
39752     fi
39753   fi
39754 
39755   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39756   if test "x$test_cygdrive_prefix" = x; then
39757     # As a simple fix, exclude /usr/bin since it's not a real path.
39758     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39759       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39760       # a path prefixed by /cygdrive for fixpath to work.
39761       new_path="$CYGWIN_ROOT_PATH$input_path"
39762     fi
39763   fi
39764 
39765   # remove trailing .exe if any
39766   new_path="${new_path/%.exe/}"
39767 
39768     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39769 
39770   # First separate the path from the arguments. This will split at the first
39771   # space.
39772   complete="$MT"
39773   path="${complete%% *}"
39774   tmp="$complete EOL"
39775   arguments="${tmp#* }"
39776 
39777   # Input might be given as Windows format, start by converting to
39778   # unix format.
39779   new_path="$path"
39780 
39781   windows_path="$new_path"
39782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39783     unix_path=`$CYGPATH -u "$windows_path"`
39784     new_path="$unix_path"
39785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39787     new_path="$unix_path"
39788   fi
39789 
39790 
39791   # Now try to locate executable using which
39792   new_path=`$WHICH "$new_path" 2> /dev/null`
39793 
39794   if test "x$new_path" = x; then
39795     # Oops. Which didn't find the executable.
39796     # The splitting of arguments from the executable at a space might have been incorrect,
39797     # since paths with space are more likely in Windows. Give it another try with the whole
39798     # argument.
39799     path="$complete"
39800     arguments="EOL"
39801     new_path="$path"
39802 
39803   windows_path="$new_path"
39804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39805     unix_path=`$CYGPATH -u "$windows_path"`
39806     new_path="$unix_path"
39807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39809     new_path="$unix_path"
39810   fi
39811 
39812 
39813     new_path=`$WHICH "$new_path" 2> /dev/null`
39814     # bat and cmd files are not always considered executable in MSYS causing which
39815     # to not find them
39816     if test "x$new_path" = x \
39817         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39818         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39819       new_path="$path"
39820 
39821   windows_path="$new_path"
39822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39823     unix_path=`$CYGPATH -u "$windows_path"`
39824     new_path="$unix_path"
39825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39827     new_path="$unix_path"
39828   fi
39829 
39830     fi
39831 
39832     if test "x$new_path" = x; then
39833       # It's still not found. Now this is an unrecoverable error.
39834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39835 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39836       has_space=`$ECHO "$complete" | $GREP " "`
39837       if test "x$has_space" != x; then
39838         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39840       fi
39841       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39842     fi
39843   fi
39844 
39845   # Now new_path has a complete unix path to the binary
39846   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39847     # Keep paths in /bin as-is, but remove trailing .exe if any
39848     new_path="${new_path/%.exe/}"
39849     # Do not save /bin paths to all_fixpath_prefixes!
39850   else
39851     # Not in mixed or Windows style, start by that.
39852     new_path=`cmd //c echo $new_path`
39853 
39854   input_path="$new_path"
39855   # Check if we need to convert this using DOS-style short mode. If the path
39856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39857   # take no chances and rewrite it.
39858   # Note: m4 eats our [], so we need to use [ and ] instead.
39859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39860   if test "x$has_forbidden_chars" != x; then
39861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39863   fi
39864 
39865     # Output is in $new_path
39866 
39867   windows_path="$new_path"
39868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39869     unix_path=`$CYGPATH -u "$windows_path"`
39870     new_path="$unix_path"
39871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39873     new_path="$unix_path"
39874   fi
39875 
39876     # remove trailing .exe if any
39877     new_path="${new_path/%.exe/}"
39878 
39879     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39880     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39881   fi
39882 
39883     else
39884       # We're on a unix platform. Hooray! :)
39885       # First separate the path from the arguments. This will split at the first
39886       # space.
39887       complete="$MT"
39888       path="${complete%% *}"
39889       tmp="$complete EOL"
39890       arguments="${tmp#* }"
39891 
39892       # Cannot rely on the command "which" here since it doesn't always work.
39893       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39894       if test -z "$is_absolute_path"; then
39895         # Path to executable is not absolute. Find it.
39896         IFS_save="$IFS"
39897         IFS=:
39898         for p in $PATH; do
39899           if test -f "$p/$path" && test -x "$p/$path"; then
39900             new_path="$p/$path"
39901             break
39902           fi
39903         done
39904         IFS="$IFS_save"
39905       else
39906         # This is an absolute path, we can use it without further modifications.
39907         new_path="$path"
39908       fi
39909 
39910       if test "x$new_path" = x; then
39911         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39912 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39913         has_space=`$ECHO "$complete" | $GREP " "`
39914         if test "x$has_space" != x; then
39915           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39916 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39917         fi
39918         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39919       fi
39920     fi
39921 
39922     # Now join together the path and the arguments once again
39923     if test "x$arguments" != xEOL; then
39924       new_complete="$new_path ${arguments% *}"
39925     else
39926       new_complete="$new_path"
39927     fi
39928 
39929     if test "x$complete" != "x$new_complete"; then
39930       MT="$new_complete"
39931       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39932 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39933     fi
39934   fi
39935 
39936     # Setup the resource compiler (RC)
39937     # Extract the first word of "rc", so it can be a program name with args.
39938 set dummy rc; ac_word=$2
39939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39940 $as_echo_n "checking for $ac_word... " >&6; }
39941 if ${ac_cv_prog_RC+:} false; then :
39942   $as_echo_n "(cached) " >&6
39943 else
39944   if test -n "$RC"; then
39945   ac_cv_prog_RC="$RC" # Let the user override the test.
39946 else
39947   ac_prog_rejected=no
39948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39949 for as_dir in $PATH
39950 do
39951   IFS=$as_save_IFS
39952   test -z "$as_dir" && as_dir=.
39953     for ac_exec_ext in '' $ac_executable_extensions; do
39954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39955     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39956        ac_prog_rejected=yes
39957        continue
39958      fi
39959     ac_cv_prog_RC="rc"
39960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39961     break 2
39962   fi
39963 done
39964   done
39965 IFS=$as_save_IFS
39966 
39967 if test $ac_prog_rejected = yes; then
39968   # We found a bogon in the path, so make sure we never use it.
39969   set dummy $ac_cv_prog_RC
39970   shift
39971   if test $# != 0; then
39972     # We chose a different compiler from the bogus one.
39973     # However, it has the same basename, so the bogon will be chosen
39974     # first if we set RC to just the basename; use the full file name.
39975     shift
39976     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39977   fi
39978 fi
39979 fi
39980 fi
39981 RC=$ac_cv_prog_RC
39982 if test -n "$RC"; then
39983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39984 $as_echo "$RC" >&6; }
39985 else
39986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39987 $as_echo "no" >&6; }
39988 fi
39989 
39990 
39991 
39992   # Only process if variable expands to non-empty
39993 
39994   if test "x$RC" != x; then
39995     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39996 
39997   # First separate the path from the arguments. This will split at the first
39998   # space.
39999   complete="$RC"
40000   path="${complete%% *}"
40001   tmp="$complete EOL"
40002   arguments="${tmp#* }"
40003 
40004   # Input might be given as Windows format, start by converting to
40005   # unix format.
40006   new_path=`$CYGPATH -u "$path"`
40007 
40008   # Now try to locate executable using which
40009   new_path=`$WHICH "$new_path" 2> /dev/null`
40010   # bat and cmd files are not always considered executable in cygwin causing which
40011   # to not find them
40012   if test "x$new_path" = x \
40013       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40014       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40015     new_path=`$CYGPATH -u "$path"`
40016   fi
40017   if test "x$new_path" = x; then
40018     # Oops. Which didn't find the executable.
40019     # The splitting of arguments from the executable at a space might have been incorrect,
40020     # since paths with space are more likely in Windows. Give it another try with the whole
40021     # argument.
40022     path="$complete"
40023     arguments="EOL"
40024     new_path=`$CYGPATH -u "$path"`
40025     new_path=`$WHICH "$new_path" 2> /dev/null`
40026     # bat and cmd files are not always considered executable in cygwin causing which
40027     # to not find them
40028     if test "x$new_path" = x \
40029         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40030         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40031       new_path=`$CYGPATH -u "$path"`
40032     fi
40033     if test "x$new_path" = x; then
40034       # It's still not found. Now this is an unrecoverable error.
40035       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40036 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40037       has_space=`$ECHO "$complete" | $GREP " "`
40038       if test "x$has_space" != x; then
40039         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40040 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40041       fi
40042       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40043     fi
40044   fi
40045 
40046   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40047   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40048   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40049   # "foo.exe" is OK but "foo" is an error.
40050   #
40051   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40052   # It is also a way to make sure we got the proper file name for the real test later on.
40053   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40054   if test "x$test_shortpath" = x; then
40055     # Short path failed, file does not exist as specified.
40056     # Try adding .exe or .cmd
40057     if test -f "${new_path}.exe"; then
40058       input_to_shortpath="${new_path}.exe"
40059     elif test -f "${new_path}.cmd"; then
40060       input_to_shortpath="${new_path}.cmd"
40061     else
40062       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
40063 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
40064       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40065 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40066       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40067     fi
40068   else
40069     input_to_shortpath="$new_path"
40070   fi
40071 
40072   # Call helper function which possibly converts this using DOS-style short mode.
40073   # If so, the updated path is stored in $new_path.
40074   new_path="$input_to_shortpath"
40075 
40076   input_path="$input_to_shortpath"
40077   # Check if we need to convert this using DOS-style short mode. If the path
40078   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40079   # take no chances and rewrite it.
40080   # Note: m4 eats our [], so we need to use [ and ] instead.
40081   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40082   if test "x$has_forbidden_chars" != x; then
40083     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40084     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40085     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40086     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40087       # Going to short mode and back again did indeed matter. Since short mode is
40088       # case insensitive, let's make it lowercase to improve readability.
40089       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40090       # Now convert it back to Unix-style (cygpath)
40091       input_path=`$CYGPATH -u "$shortmode_path"`
40092       new_path="$input_path"
40093     fi
40094   fi
40095 
40096   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40097   if test "x$test_cygdrive_prefix" = x; then
40098     # As a simple fix, exclude /usr/bin since it's not a real path.
40099     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40100       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40101       # a path prefixed by /cygdrive for fixpath to work.
40102       new_path="$CYGWIN_ROOT_PATH$input_path"
40103     fi
40104   fi
40105 
40106   # remove trailing .exe if any
40107   new_path="${new_path/%.exe/}"
40108 
40109     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40110 
40111   # First separate the path from the arguments. This will split at the first
40112   # space.
40113   complete="$RC"
40114   path="${complete%% *}"
40115   tmp="$complete EOL"
40116   arguments="${tmp#* }"
40117 
40118   # Input might be given as Windows format, start by converting to
40119   # unix format.
40120   new_path="$path"
40121 
40122   windows_path="$new_path"
40123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40124     unix_path=`$CYGPATH -u "$windows_path"`
40125     new_path="$unix_path"
40126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40128     new_path="$unix_path"
40129   fi
40130 
40131 
40132   # Now try to locate executable using which
40133   new_path=`$WHICH "$new_path" 2> /dev/null`
40134 
40135   if test "x$new_path" = x; then
40136     # Oops. Which didn't find the executable.
40137     # The splitting of arguments from the executable at a space might have been incorrect,
40138     # since paths with space are more likely in Windows. Give it another try with the whole
40139     # argument.
40140     path="$complete"
40141     arguments="EOL"
40142     new_path="$path"
40143 
40144   windows_path="$new_path"
40145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40146     unix_path=`$CYGPATH -u "$windows_path"`
40147     new_path="$unix_path"
40148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40150     new_path="$unix_path"
40151   fi
40152 
40153 
40154     new_path=`$WHICH "$new_path" 2> /dev/null`
40155     # bat and cmd files are not always considered executable in MSYS causing which
40156     # to not find them
40157     if test "x$new_path" = x \
40158         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40159         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40160       new_path="$path"
40161 
40162   windows_path="$new_path"
40163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40164     unix_path=`$CYGPATH -u "$windows_path"`
40165     new_path="$unix_path"
40166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40168     new_path="$unix_path"
40169   fi
40170 
40171     fi
40172 
40173     if test "x$new_path" = x; then
40174       # It's still not found. Now this is an unrecoverable error.
40175       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40176 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40177       has_space=`$ECHO "$complete" | $GREP " "`
40178       if test "x$has_space" != x; then
40179         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40180 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40181       fi
40182       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40183     fi
40184   fi
40185 
40186   # Now new_path has a complete unix path to the binary
40187   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40188     # Keep paths in /bin as-is, but remove trailing .exe if any
40189     new_path="${new_path/%.exe/}"
40190     # Do not save /bin paths to all_fixpath_prefixes!
40191   else
40192     # Not in mixed or Windows style, start by that.
40193     new_path=`cmd //c echo $new_path`
40194 
40195   input_path="$new_path"
40196   # Check if we need to convert this using DOS-style short mode. If the path
40197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40198   # take no chances and rewrite it.
40199   # Note: m4 eats our [], so we need to use [ and ] instead.
40200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40201   if test "x$has_forbidden_chars" != x; then
40202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40203     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40204   fi
40205 
40206     # Output is in $new_path
40207 
40208   windows_path="$new_path"
40209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40210     unix_path=`$CYGPATH -u "$windows_path"`
40211     new_path="$unix_path"
40212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40214     new_path="$unix_path"
40215   fi
40216 
40217     # remove trailing .exe if any
40218     new_path="${new_path/%.exe/}"
40219 
40220     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40221     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40222   fi
40223 
40224     else
40225       # We're on a unix platform. Hooray! :)
40226       # First separate the path from the arguments. This will split at the first
40227       # space.
40228       complete="$RC"
40229       path="${complete%% *}"
40230       tmp="$complete EOL"
40231       arguments="${tmp#* }"
40232 
40233       # Cannot rely on the command "which" here since it doesn't always work.
40234       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40235       if test -z "$is_absolute_path"; then
40236         # Path to executable is not absolute. Find it.
40237         IFS_save="$IFS"
40238         IFS=:
40239         for p in $PATH; do
40240           if test -f "$p/$path" && test -x "$p/$path"; then
40241             new_path="$p/$path"
40242             break
40243           fi
40244         done
40245         IFS="$IFS_save"
40246       else
40247         # This is an absolute path, we can use it without further modifications.
40248         new_path="$path"
40249       fi
40250 
40251       if test "x$new_path" = x; then
40252         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40253 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40254         has_space=`$ECHO "$complete" | $GREP " "`
40255         if test "x$has_space" != x; then
40256           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40257 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40258         fi
40259         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40260       fi
40261     fi
40262 
40263     # Now join together the path and the arguments once again
40264     if test "x$arguments" != xEOL; then
40265       new_complete="$new_path ${arguments% *}"
40266     else
40267       new_complete="$new_path"
40268     fi
40269 
40270     if test "x$complete" != "x$new_complete"; then
40271       RC="$new_complete"
40272       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40273 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40274     fi
40275   fi
40276 
40277     # Extract the first word of "dumpbin", so it can be a program name with args.
40278 set dummy dumpbin; ac_word=$2
40279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40280 $as_echo_n "checking for $ac_word... " >&6; }
40281 if ${ac_cv_prog_DUMPBIN+:} false; then :
40282   $as_echo_n "(cached) " >&6
40283 else
40284   if test -n "$DUMPBIN"; then
40285   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40286 else
40287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40288 for as_dir in $PATH
40289 do
40290   IFS=$as_save_IFS
40291   test -z "$as_dir" && as_dir=.
40292     for ac_exec_ext in '' $ac_executable_extensions; do
40293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40294     ac_cv_prog_DUMPBIN="dumpbin"
40295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40296     break 2
40297   fi
40298 done
40299   done
40300 IFS=$as_save_IFS
40301 
40302 fi
40303 fi
40304 DUMPBIN=$ac_cv_prog_DUMPBIN
40305 if test -n "$DUMPBIN"; then
40306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40307 $as_echo "$DUMPBIN" >&6; }
40308 else
40309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40310 $as_echo "no" >&6; }
40311 fi
40312 
40313 
40314 
40315   # Only process if variable expands to non-empty
40316 
40317   if test "x$DUMPBIN" != x; then
40318     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40319 
40320   # First separate the path from the arguments. This will split at the first
40321   # space.
40322   complete="$DUMPBIN"
40323   path="${complete%% *}"
40324   tmp="$complete EOL"
40325   arguments="${tmp#* }"
40326 
40327   # Input might be given as Windows format, start by converting to
40328   # unix format.
40329   new_path=`$CYGPATH -u "$path"`
40330 
40331   # Now try to locate executable using which
40332   new_path=`$WHICH "$new_path" 2> /dev/null`
40333   # bat and cmd files are not always considered executable in cygwin causing which
40334   # to not find them
40335   if test "x$new_path" = x \
40336       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40337       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40338     new_path=`$CYGPATH -u "$path"`
40339   fi
40340   if test "x$new_path" = x; then
40341     # Oops. Which didn't find the executable.
40342     # The splitting of arguments from the executable at a space might have been incorrect,
40343     # since paths with space are more likely in Windows. Give it another try with the whole
40344     # argument.
40345     path="$complete"
40346     arguments="EOL"
40347     new_path=`$CYGPATH -u "$path"`
40348     new_path=`$WHICH "$new_path" 2> /dev/null`
40349     # bat and cmd files are not always considered executable in cygwin causing which
40350     # to not find them
40351     if test "x$new_path" = x \
40352         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40353         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40354       new_path=`$CYGPATH -u "$path"`
40355     fi
40356     if test "x$new_path" = x; then
40357       # It's still not found. Now this is an unrecoverable error.
40358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40359 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40360       has_space=`$ECHO "$complete" | $GREP " "`
40361       if test "x$has_space" != x; then
40362         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40363 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40364       fi
40365       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40366     fi
40367   fi
40368 
40369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40372   # "foo.exe" is OK but "foo" is an error.
40373   #
40374   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40375   # It is also a way to make sure we got the proper file name for the real test later on.
40376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40377   if test "x$test_shortpath" = x; then
40378     # Short path failed, file does not exist as specified.
40379     # Try adding .exe or .cmd
40380     if test -f "${new_path}.exe"; then
40381       input_to_shortpath="${new_path}.exe"
40382     elif test -f "${new_path}.cmd"; then
40383       input_to_shortpath="${new_path}.cmd"
40384     else
40385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40386 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40387       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40388 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40389       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40390     fi
40391   else
40392     input_to_shortpath="$new_path"
40393   fi
40394 
40395   # Call helper function which possibly converts this using DOS-style short mode.
40396   # If so, the updated path is stored in $new_path.
40397   new_path="$input_to_shortpath"
40398 
40399   input_path="$input_to_shortpath"
40400   # Check if we need to convert this using DOS-style short mode. If the path
40401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40402   # take no chances and rewrite it.
40403   # Note: m4 eats our [], so we need to use [ and ] instead.
40404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40405   if test "x$has_forbidden_chars" != x; then
40406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40407     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40408     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40409     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40410       # Going to short mode and back again did indeed matter. Since short mode is
40411       # case insensitive, let's make it lowercase to improve readability.
40412       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40413       # Now convert it back to Unix-style (cygpath)
40414       input_path=`$CYGPATH -u "$shortmode_path"`
40415       new_path="$input_path"
40416     fi
40417   fi
40418 
40419   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40420   if test "x$test_cygdrive_prefix" = x; then
40421     # As a simple fix, exclude /usr/bin since it's not a real path.
40422     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40423       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40424       # a path prefixed by /cygdrive for fixpath to work.
40425       new_path="$CYGWIN_ROOT_PATH$input_path"
40426     fi
40427   fi
40428 
40429   # remove trailing .exe if any
40430   new_path="${new_path/%.exe/}"
40431 
40432     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40433 
40434   # First separate the path from the arguments. This will split at the first
40435   # space.
40436   complete="$DUMPBIN"
40437   path="${complete%% *}"
40438   tmp="$complete EOL"
40439   arguments="${tmp#* }"
40440 
40441   # Input might be given as Windows format, start by converting to
40442   # unix format.
40443   new_path="$path"
40444 
40445   windows_path="$new_path"
40446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40447     unix_path=`$CYGPATH -u "$windows_path"`
40448     new_path="$unix_path"
40449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40451     new_path="$unix_path"
40452   fi
40453 
40454 
40455   # Now try to locate executable using which
40456   new_path=`$WHICH "$new_path" 2> /dev/null`
40457 
40458   if test "x$new_path" = x; then
40459     # Oops. Which didn't find the executable.
40460     # The splitting of arguments from the executable at a space might have been incorrect,
40461     # since paths with space are more likely in Windows. Give it another try with the whole
40462     # argument.
40463     path="$complete"
40464     arguments="EOL"
40465     new_path="$path"
40466 
40467   windows_path="$new_path"
40468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40469     unix_path=`$CYGPATH -u "$windows_path"`
40470     new_path="$unix_path"
40471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40473     new_path="$unix_path"
40474   fi
40475 
40476 
40477     new_path=`$WHICH "$new_path" 2> /dev/null`
40478     # bat and cmd files are not always considered executable in MSYS causing which
40479     # to not find them
40480     if test "x$new_path" = x \
40481         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40482         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40483       new_path="$path"
40484 
40485   windows_path="$new_path"
40486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40487     unix_path=`$CYGPATH -u "$windows_path"`
40488     new_path="$unix_path"
40489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40491     new_path="$unix_path"
40492   fi
40493 
40494     fi
40495 
40496     if test "x$new_path" = x; then
40497       # It's still not found. Now this is an unrecoverable error.
40498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40499 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40500       has_space=`$ECHO "$complete" | $GREP " "`
40501       if test "x$has_space" != x; then
40502         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40503 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40504       fi
40505       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40506     fi
40507   fi
40508 
40509   # Now new_path has a complete unix path to the binary
40510   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40511     # Keep paths in /bin as-is, but remove trailing .exe if any
40512     new_path="${new_path/%.exe/}"
40513     # Do not save /bin paths to all_fixpath_prefixes!
40514   else
40515     # Not in mixed or Windows style, start by that.
40516     new_path=`cmd //c echo $new_path`
40517 
40518   input_path="$new_path"
40519   # Check if we need to convert this using DOS-style short mode. If the path
40520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40521   # take no chances and rewrite it.
40522   # Note: m4 eats our [], so we need to use [ and ] instead.
40523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40524   if test "x$has_forbidden_chars" != x; then
40525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40527   fi
40528 
40529     # Output is in $new_path
40530 
40531   windows_path="$new_path"
40532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40533     unix_path=`$CYGPATH -u "$windows_path"`
40534     new_path="$unix_path"
40535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40537     new_path="$unix_path"
40538   fi
40539 
40540     # remove trailing .exe if any
40541     new_path="${new_path/%.exe/}"
40542 
40543     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40544     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40545   fi
40546 
40547     else
40548       # We're on a unix platform. Hooray! :)
40549       # First separate the path from the arguments. This will split at the first
40550       # space.
40551       complete="$DUMPBIN"
40552       path="${complete%% *}"
40553       tmp="$complete EOL"
40554       arguments="${tmp#* }"
40555 
40556       # Cannot rely on the command "which" here since it doesn't always work.
40557       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40558       if test -z "$is_absolute_path"; then
40559         # Path to executable is not absolute. Find it.
40560         IFS_save="$IFS"
40561         IFS=:
40562         for p in $PATH; do
40563           if test -f "$p/$path" && test -x "$p/$path"; then
40564             new_path="$p/$path"
40565             break
40566           fi
40567         done
40568         IFS="$IFS_save"
40569       else
40570         # This is an absolute path, we can use it without further modifications.
40571         new_path="$path"
40572       fi
40573 
40574       if test "x$new_path" = x; then
40575         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40576 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40577         has_space=`$ECHO "$complete" | $GREP " "`
40578         if test "x$has_space" != x; then
40579           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40580 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40581         fi
40582         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40583       fi
40584     fi
40585 
40586     # Now join together the path and the arguments once again
40587     if test "x$arguments" != xEOL; then
40588       new_complete="$new_path ${arguments% *}"
40589     else
40590       new_complete="$new_path"
40591     fi
40592 
40593     if test "x$complete" != "x$new_complete"; then
40594       DUMPBIN="$new_complete"
40595       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40596 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40597     fi
40598   fi
40599 
40600     # We need to check for 'msbuild.exe' because at the place where we expect to
40601     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40602     # won't find the 'msbuild.exe' executable in that case (and the
40603     # 'ac_executable_extensions' is unusable due to performance reasons).
40604     # Notice that we intentionally don't fix up the path to MSBUILD because we
40605     # will call it in a DOS shell during freetype detection on Windows (see
40606     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40607     # Extract the first word of "msbuild.exe", so it can be a program name with args.
40608 set dummy msbuild.exe; ac_word=$2
40609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40610 $as_echo_n "checking for $ac_word... " >&6; }
40611 if ${ac_cv_prog_MSBUILD+:} false; then :
40612   $as_echo_n "(cached) " >&6
40613 else
40614   if test -n "$MSBUILD"; then
40615   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40616 else
40617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40618 for as_dir in $PATH
40619 do
40620   IFS=$as_save_IFS
40621   test -z "$as_dir" && as_dir=.
40622     for ac_exec_ext in '' $ac_executable_extensions; do
40623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40624     ac_cv_prog_MSBUILD="msbuild.exe"
40625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40626     break 2
40627   fi
40628 done
40629   done
40630 IFS=$as_save_IFS
40631 
40632 fi
40633 fi
40634 MSBUILD=$ac_cv_prog_MSBUILD
40635 if test -n "$MSBUILD"; then
40636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40637 $as_echo "$MSBUILD" >&6; }
40638 else
40639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40640 $as_echo "no" >&6; }
40641 fi
40642 
40643 
40644   fi
40645 
40646   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40647 
40648 
40649   # Publish this variable in the help.
40650 
40651 
40652   if [ -z "${STRIP+x}" ]; then
40653     # The variable is not set by user, try to locate tool using the code snippet
40654     for ac_prog in strip
40655 do
40656   # Extract the first word of "$ac_prog", so it can be a program name with args.
40657 set dummy $ac_prog; ac_word=$2
40658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40659 $as_echo_n "checking for $ac_word... " >&6; }
40660 if ${ac_cv_path_STRIP+:} false; then :
40661   $as_echo_n "(cached) " >&6
40662 else
40663   case $STRIP in
40664   [\\/]* | ?:[\\/]*)
40665   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40666   ;;
40667   *)
40668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40669 for as_dir in $PATH
40670 do
40671   IFS=$as_save_IFS
40672   test -z "$as_dir" && as_dir=.
40673     for ac_exec_ext in '' $ac_executable_extensions; do
40674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40675     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40677     break 2
40678   fi
40679 done
40680   done
40681 IFS=$as_save_IFS
40682 
40683   ;;
40684 esac
40685 fi
40686 STRIP=$ac_cv_path_STRIP
40687 if test -n "$STRIP"; then
40688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40689 $as_echo "$STRIP" >&6; }
40690 else
40691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40692 $as_echo "no" >&6; }
40693 fi
40694 
40695 
40696   test -n "$STRIP" && break
40697 done
40698 
40699   else
40700     # The variable is set, but is it from the command line or the environment?
40701 
40702     # Try to remove the string !STRIP! from our list.
40703     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40704     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40705       # If it failed, the variable was not from the command line. Ignore it,
40706       # but warn the user (except for BASH, which is always set by the calling BASH).
40707       if test "xSTRIP" != xBASH; then
40708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40709 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40710       fi
40711       # Try to locate tool using the code snippet
40712       for ac_prog in strip
40713 do
40714   # Extract the first word of "$ac_prog", so it can be a program name with args.
40715 set dummy $ac_prog; ac_word=$2
40716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40717 $as_echo_n "checking for $ac_word... " >&6; }
40718 if ${ac_cv_path_STRIP+:} false; then :
40719   $as_echo_n "(cached) " >&6
40720 else
40721   case $STRIP in
40722   [\\/]* | ?:[\\/]*)
40723   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40724   ;;
40725   *)
40726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40727 for as_dir in $PATH
40728 do
40729   IFS=$as_save_IFS
40730   test -z "$as_dir" && as_dir=.
40731     for ac_exec_ext in '' $ac_executable_extensions; do
40732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40733     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40735     break 2
40736   fi
40737 done
40738   done
40739 IFS=$as_save_IFS
40740 
40741   ;;
40742 esac
40743 fi
40744 STRIP=$ac_cv_path_STRIP
40745 if test -n "$STRIP"; then
40746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40747 $as_echo "$STRIP" >&6; }
40748 else
40749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40750 $as_echo "no" >&6; }
40751 fi
40752 
40753 
40754   test -n "$STRIP" && break
40755 done
40756 
40757     else
40758       # If it succeeded, then it was overridden by the user. We will use it
40759       # for the tool.
40760 
40761       # First remove it from the list of overridden variables, so we can test
40762       # for unknown variables in the end.
40763       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40764 
40765       # Check if we try to supply an empty value
40766       if test "x$STRIP" = x; then
40767         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40768 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40769         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40770 $as_echo_n "checking for STRIP... " >&6; }
40771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40772 $as_echo "disabled" >&6; }
40773       else
40774         # Check if the provided tool contains a complete path.
40775         tool_specified="$STRIP"
40776         tool_basename="${tool_specified##*/}"
40777         if test "x$tool_basename" = "x$tool_specified"; then
40778           # A command without a complete path is provided, search $PATH.
40779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40780 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40781           # Extract the first word of "$tool_basename", so it can be a program name with args.
40782 set dummy $tool_basename; ac_word=$2
40783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40784 $as_echo_n "checking for $ac_word... " >&6; }
40785 if ${ac_cv_path_STRIP+:} false; then :
40786   $as_echo_n "(cached) " >&6
40787 else
40788   case $STRIP in
40789   [\\/]* | ?:[\\/]*)
40790   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40791   ;;
40792   *)
40793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40794 for as_dir in $PATH
40795 do
40796   IFS=$as_save_IFS
40797   test -z "$as_dir" && as_dir=.
40798     for ac_exec_ext in '' $ac_executable_extensions; do
40799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40800     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40802     break 2
40803   fi
40804 done
40805   done
40806 IFS=$as_save_IFS
40807 
40808   ;;
40809 esac
40810 fi
40811 STRIP=$ac_cv_path_STRIP
40812 if test -n "$STRIP"; then
40813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40814 $as_echo "$STRIP" >&6; }
40815 else
40816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40817 $as_echo "no" >&6; }
40818 fi
40819 
40820 
40821           if test "x$STRIP" = x; then
40822             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40823           fi
40824         else
40825           # Otherwise we believe it is a complete path. Use it as it is.
40826           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40827 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40828           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40829 $as_echo_n "checking for STRIP... " >&6; }
40830           if test ! -x "$tool_specified"; then
40831             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40832 $as_echo "not found" >&6; }
40833             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40834           fi
40835           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40836 $as_echo "$tool_specified" >&6; }
40837         fi
40838       fi
40839     fi
40840 
40841   fi
40842 
40843 
40844 
40845   # Only process if variable expands to non-empty
40846 
40847   if test "x$STRIP" != x; then
40848     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849 
40850   # First separate the path from the arguments. This will split at the first
40851   # space.
40852   complete="$STRIP"
40853   path="${complete%% *}"
40854   tmp="$complete EOL"
40855   arguments="${tmp#* }"
40856 
40857   # Input might be given as Windows format, start by converting to
40858   # unix format.
40859   new_path=`$CYGPATH -u "$path"`
40860 
40861   # Now try to locate executable using which
40862   new_path=`$WHICH "$new_path" 2> /dev/null`
40863   # bat and cmd files are not always considered executable in cygwin causing which
40864   # to not find them
40865   if test "x$new_path" = x \
40866       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40867       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40868     new_path=`$CYGPATH -u "$path"`
40869   fi
40870   if test "x$new_path" = x; then
40871     # Oops. Which didn't find the executable.
40872     # The splitting of arguments from the executable at a space might have been incorrect,
40873     # since paths with space are more likely in Windows. Give it another try with the whole
40874     # argument.
40875     path="$complete"
40876     arguments="EOL"
40877     new_path=`$CYGPATH -u "$path"`
40878     new_path=`$WHICH "$new_path" 2> /dev/null`
40879     # bat and cmd files are not always considered executable in cygwin causing which
40880     # to not find them
40881     if test "x$new_path" = x \
40882         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40883         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40884       new_path=`$CYGPATH -u "$path"`
40885     fi
40886     if test "x$new_path" = x; then
40887       # It's still not found. Now this is an unrecoverable error.
40888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40889 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40890       has_space=`$ECHO "$complete" | $GREP " "`
40891       if test "x$has_space" != x; then
40892         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40893 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40894       fi
40895       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40896     fi
40897   fi
40898 
40899   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40900   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40901   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40902   # "foo.exe" is OK but "foo" is an error.
40903   #
40904   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40905   # It is also a way to make sure we got the proper file name for the real test later on.
40906   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40907   if test "x$test_shortpath" = x; then
40908     # Short path failed, file does not exist as specified.
40909     # Try adding .exe or .cmd
40910     if test -f "${new_path}.exe"; then
40911       input_to_shortpath="${new_path}.exe"
40912     elif test -f "${new_path}.cmd"; then
40913       input_to_shortpath="${new_path}.cmd"
40914     else
40915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40916 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40917       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40918 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40919       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40920     fi
40921   else
40922     input_to_shortpath="$new_path"
40923   fi
40924 
40925   # Call helper function which possibly converts this using DOS-style short mode.
40926   # If so, the updated path is stored in $new_path.
40927   new_path="$input_to_shortpath"
40928 
40929   input_path="$input_to_shortpath"
40930   # Check if we need to convert this using DOS-style short mode. If the path
40931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40932   # take no chances and rewrite it.
40933   # Note: m4 eats our [], so we need to use [ and ] instead.
40934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40935   if test "x$has_forbidden_chars" != x; then
40936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40940       # Going to short mode and back again did indeed matter. Since short mode is
40941       # case insensitive, let's make it lowercase to improve readability.
40942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40943       # Now convert it back to Unix-style (cygpath)
40944       input_path=`$CYGPATH -u "$shortmode_path"`
40945       new_path="$input_path"
40946     fi
40947   fi
40948 
40949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40950   if test "x$test_cygdrive_prefix" = x; then
40951     # As a simple fix, exclude /usr/bin since it's not a real path.
40952     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40954       # a path prefixed by /cygdrive for fixpath to work.
40955       new_path="$CYGWIN_ROOT_PATH$input_path"
40956     fi
40957   fi
40958 
40959   # remove trailing .exe if any
40960   new_path="${new_path/%.exe/}"
40961 
40962     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40963 
40964   # First separate the path from the arguments. This will split at the first
40965   # space.
40966   complete="$STRIP"
40967   path="${complete%% *}"
40968   tmp="$complete EOL"
40969   arguments="${tmp#* }"
40970 
40971   # Input might be given as Windows format, start by converting to
40972   # unix format.
40973   new_path="$path"
40974 
40975   windows_path="$new_path"
40976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40977     unix_path=`$CYGPATH -u "$windows_path"`
40978     new_path="$unix_path"
40979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40981     new_path="$unix_path"
40982   fi
40983 
40984 
40985   # Now try to locate executable using which
40986   new_path=`$WHICH "$new_path" 2> /dev/null`
40987 
40988   if test "x$new_path" = x; then
40989     # Oops. Which didn't find the executable.
40990     # The splitting of arguments from the executable at a space might have been incorrect,
40991     # since paths with space are more likely in Windows. Give it another try with the whole
40992     # argument.
40993     path="$complete"
40994     arguments="EOL"
40995     new_path="$path"
40996 
40997   windows_path="$new_path"
40998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40999     unix_path=`$CYGPATH -u "$windows_path"`
41000     new_path="$unix_path"
41001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41003     new_path="$unix_path"
41004   fi
41005 
41006 
41007     new_path=`$WHICH "$new_path" 2> /dev/null`
41008     # bat and cmd files are not always considered executable in MSYS causing which
41009     # to not find them
41010     if test "x$new_path" = x \
41011         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41012         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41013       new_path="$path"
41014 
41015   windows_path="$new_path"
41016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41017     unix_path=`$CYGPATH -u "$windows_path"`
41018     new_path="$unix_path"
41019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41021     new_path="$unix_path"
41022   fi
41023 
41024     fi
41025 
41026     if test "x$new_path" = x; then
41027       # It's still not found. Now this is an unrecoverable error.
41028       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41029 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41030       has_space=`$ECHO "$complete" | $GREP " "`
41031       if test "x$has_space" != x; then
41032         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41033 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41034       fi
41035       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41036     fi
41037   fi
41038 
41039   # Now new_path has a complete unix path to the binary
41040   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41041     # Keep paths in /bin as-is, but remove trailing .exe if any
41042     new_path="${new_path/%.exe/}"
41043     # Do not save /bin paths to all_fixpath_prefixes!
41044   else
41045     # Not in mixed or Windows style, start by that.
41046     new_path=`cmd //c echo $new_path`
41047 
41048   input_path="$new_path"
41049   # Check if we need to convert this using DOS-style short mode. If the path
41050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41051   # take no chances and rewrite it.
41052   # Note: m4 eats our [], so we need to use [ and ] instead.
41053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41054   if test "x$has_forbidden_chars" != x; then
41055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41056     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41057   fi
41058 
41059     # Output is in $new_path
41060 
41061   windows_path="$new_path"
41062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41063     unix_path=`$CYGPATH -u "$windows_path"`
41064     new_path="$unix_path"
41065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41067     new_path="$unix_path"
41068   fi
41069 
41070     # remove trailing .exe if any
41071     new_path="${new_path/%.exe/}"
41072 
41073     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41074     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41075   fi
41076 
41077     else
41078       # We're on a unix platform. Hooray! :)
41079       # First separate the path from the arguments. This will split at the first
41080       # space.
41081       complete="$STRIP"
41082       path="${complete%% *}"
41083       tmp="$complete EOL"
41084       arguments="${tmp#* }"
41085 
41086       # Cannot rely on the command "which" here since it doesn't always work.
41087       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41088       if test -z "$is_absolute_path"; then
41089         # Path to executable is not absolute. Find it.
41090         IFS_save="$IFS"
41091         IFS=:
41092         for p in $PATH; do
41093           if test -f "$p/$path" && test -x "$p/$path"; then
41094             new_path="$p/$path"
41095             break
41096           fi
41097         done
41098         IFS="$IFS_save"
41099       else
41100         # This is an absolute path, we can use it without further modifications.
41101         new_path="$path"
41102       fi
41103 
41104       if test "x$new_path" = x; then
41105         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41106 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41107         has_space=`$ECHO "$complete" | $GREP " "`
41108         if test "x$has_space" != x; then
41109           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41110 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41111         fi
41112         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41113       fi
41114     fi
41115 
41116     # Now join together the path and the arguments once again
41117     if test "x$arguments" != xEOL; then
41118       new_complete="$new_path ${arguments% *}"
41119     else
41120       new_complete="$new_path"
41121     fi
41122 
41123     if test "x$complete" != "x$new_complete"; then
41124       STRIP="$new_complete"
41125       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41126 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41127     fi
41128   fi
41129 
41130 
41131 
41132   # Publish this variable in the help.
41133 
41134 
41135   if [ -z "${NM+x}" ]; then
41136     # The variable is not set by user, try to locate tool using the code snippet
41137     for ac_prog in nm
41138 do
41139   # Extract the first word of "$ac_prog", so it can be a program name with args.
41140 set dummy $ac_prog; ac_word=$2
41141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41142 $as_echo_n "checking for $ac_word... " >&6; }
41143 if ${ac_cv_path_NM+:} false; then :
41144   $as_echo_n "(cached) " >&6
41145 else
41146   case $NM in
41147   [\\/]* | ?:[\\/]*)
41148   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41149   ;;
41150   *)
41151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41152 for as_dir in $PATH
41153 do
41154   IFS=$as_save_IFS
41155   test -z "$as_dir" && as_dir=.
41156     for ac_exec_ext in '' $ac_executable_extensions; do
41157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41158     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41160     break 2
41161   fi
41162 done
41163   done
41164 IFS=$as_save_IFS
41165 
41166   ;;
41167 esac
41168 fi
41169 NM=$ac_cv_path_NM
41170 if test -n "$NM"; then
41171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41172 $as_echo "$NM" >&6; }
41173 else
41174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41175 $as_echo "no" >&6; }
41176 fi
41177 
41178 
41179   test -n "$NM" && break
41180 done
41181 
41182   else
41183     # The variable is set, but is it from the command line or the environment?
41184 
41185     # Try to remove the string !NM! from our list.
41186     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41187     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41188       # If it failed, the variable was not from the command line. Ignore it,
41189       # but warn the user (except for BASH, which is always set by the calling BASH).
41190       if test "xNM" != xBASH; then
41191         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41192 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41193       fi
41194       # Try to locate tool using the code snippet
41195       for ac_prog in nm
41196 do
41197   # Extract the first word of "$ac_prog", so it can be a program name with args.
41198 set dummy $ac_prog; ac_word=$2
41199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41200 $as_echo_n "checking for $ac_word... " >&6; }
41201 if ${ac_cv_path_NM+:} false; then :
41202   $as_echo_n "(cached) " >&6
41203 else
41204   case $NM in
41205   [\\/]* | ?:[\\/]*)
41206   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41207   ;;
41208   *)
41209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41210 for as_dir in $PATH
41211 do
41212   IFS=$as_save_IFS
41213   test -z "$as_dir" && as_dir=.
41214     for ac_exec_ext in '' $ac_executable_extensions; do
41215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41216     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41218     break 2
41219   fi
41220 done
41221   done
41222 IFS=$as_save_IFS
41223 
41224   ;;
41225 esac
41226 fi
41227 NM=$ac_cv_path_NM
41228 if test -n "$NM"; then
41229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41230 $as_echo "$NM" >&6; }
41231 else
41232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41233 $as_echo "no" >&6; }
41234 fi
41235 
41236 
41237   test -n "$NM" && break
41238 done
41239 
41240     else
41241       # If it succeeded, then it was overridden by the user. We will use it
41242       # for the tool.
41243 
41244       # First remove it from the list of overridden variables, so we can test
41245       # for unknown variables in the end.
41246       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41247 
41248       # Check if we try to supply an empty value
41249       if test "x$NM" = x; then
41250         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41251 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41253 $as_echo_n "checking for NM... " >&6; }
41254         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41255 $as_echo "disabled" >&6; }
41256       else
41257         # Check if the provided tool contains a complete path.
41258         tool_specified="$NM"
41259         tool_basename="${tool_specified##*/}"
41260         if test "x$tool_basename" = "x$tool_specified"; then
41261           # A command without a complete path is provided, search $PATH.
41262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41263 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41264           # Extract the first word of "$tool_basename", so it can be a program name with args.
41265 set dummy $tool_basename; ac_word=$2
41266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41267 $as_echo_n "checking for $ac_word... " >&6; }
41268 if ${ac_cv_path_NM+:} false; then :
41269   $as_echo_n "(cached) " >&6
41270 else
41271   case $NM in
41272   [\\/]* | ?:[\\/]*)
41273   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41274   ;;
41275   *)
41276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41277 for as_dir in $PATH
41278 do
41279   IFS=$as_save_IFS
41280   test -z "$as_dir" && as_dir=.
41281     for ac_exec_ext in '' $ac_executable_extensions; do
41282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41283     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41285     break 2
41286   fi
41287 done
41288   done
41289 IFS=$as_save_IFS
41290 
41291   ;;
41292 esac
41293 fi
41294 NM=$ac_cv_path_NM
41295 if test -n "$NM"; then
41296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41297 $as_echo "$NM" >&6; }
41298 else
41299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41300 $as_echo "no" >&6; }
41301 fi
41302 
41303 
41304           if test "x$NM" = x; then
41305             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41306           fi
41307         else
41308           # Otherwise we believe it is a complete path. Use it as it is.
41309           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41310 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41311           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41312 $as_echo_n "checking for NM... " >&6; }
41313           if test ! -x "$tool_specified"; then
41314             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41315 $as_echo "not found" >&6; }
41316             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41317           fi
41318           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41319 $as_echo "$tool_specified" >&6; }
41320         fi
41321       fi
41322     fi
41323 
41324   fi
41325 
41326 
41327 
41328   # Only process if variable expands to non-empty
41329 
41330   if test "x$NM" != x; then
41331     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41332 
41333   # First separate the path from the arguments. This will split at the first
41334   # space.
41335   complete="$NM"
41336   path="${complete%% *}"
41337   tmp="$complete EOL"
41338   arguments="${tmp#* }"
41339 
41340   # Input might be given as Windows format, start by converting to
41341   # unix format.
41342   new_path=`$CYGPATH -u "$path"`
41343 
41344   # Now try to locate executable using which
41345   new_path=`$WHICH "$new_path" 2> /dev/null`
41346   # bat and cmd files are not always considered executable in cygwin causing which
41347   # to not find them
41348   if test "x$new_path" = x \
41349       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41350       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41351     new_path=`$CYGPATH -u "$path"`
41352   fi
41353   if test "x$new_path" = x; then
41354     # Oops. Which didn't find the executable.
41355     # The splitting of arguments from the executable at a space might have been incorrect,
41356     # since paths with space are more likely in Windows. Give it another try with the whole
41357     # argument.
41358     path="$complete"
41359     arguments="EOL"
41360     new_path=`$CYGPATH -u "$path"`
41361     new_path=`$WHICH "$new_path" 2> /dev/null`
41362     # bat and cmd files are not always considered executable in cygwin causing which
41363     # to not find them
41364     if test "x$new_path" = x \
41365         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41366         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41367       new_path=`$CYGPATH -u "$path"`
41368     fi
41369     if test "x$new_path" = x; then
41370       # It's still not found. Now this is an unrecoverable error.
41371       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41372 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41373       has_space=`$ECHO "$complete" | $GREP " "`
41374       if test "x$has_space" != x; then
41375         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41376 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41377       fi
41378       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41379     fi
41380   fi
41381 
41382   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41383   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41384   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41385   # "foo.exe" is OK but "foo" is an error.
41386   #
41387   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41388   # It is also a way to make sure we got the proper file name for the real test later on.
41389   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41390   if test "x$test_shortpath" = x; then
41391     # Short path failed, file does not exist as specified.
41392     # Try adding .exe or .cmd
41393     if test -f "${new_path}.exe"; then
41394       input_to_shortpath="${new_path}.exe"
41395     elif test -f "${new_path}.cmd"; then
41396       input_to_shortpath="${new_path}.cmd"
41397     else
41398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41399 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41400       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41401 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41402       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41403     fi
41404   else
41405     input_to_shortpath="$new_path"
41406   fi
41407 
41408   # Call helper function which possibly converts this using DOS-style short mode.
41409   # If so, the updated path is stored in $new_path.
41410   new_path="$input_to_shortpath"
41411 
41412   input_path="$input_to_shortpath"
41413   # Check if we need to convert this using DOS-style short mode. If the path
41414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41415   # take no chances and rewrite it.
41416   # Note: m4 eats our [], so we need to use [ and ] instead.
41417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41418   if test "x$has_forbidden_chars" != x; then
41419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41420     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41421     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41422     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41423       # Going to short mode and back again did indeed matter. Since short mode is
41424       # case insensitive, let's make it lowercase to improve readability.
41425       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41426       # Now convert it back to Unix-style (cygpath)
41427       input_path=`$CYGPATH -u "$shortmode_path"`
41428       new_path="$input_path"
41429     fi
41430   fi
41431 
41432   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41433   if test "x$test_cygdrive_prefix" = x; then
41434     # As a simple fix, exclude /usr/bin since it's not a real path.
41435     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41436       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41437       # a path prefixed by /cygdrive for fixpath to work.
41438       new_path="$CYGWIN_ROOT_PATH$input_path"
41439     fi
41440   fi
41441 
41442   # remove trailing .exe if any
41443   new_path="${new_path/%.exe/}"
41444 
41445     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41446 
41447   # First separate the path from the arguments. This will split at the first
41448   # space.
41449   complete="$NM"
41450   path="${complete%% *}"
41451   tmp="$complete EOL"
41452   arguments="${tmp#* }"
41453 
41454   # Input might be given as Windows format, start by converting to
41455   # unix format.
41456   new_path="$path"
41457 
41458   windows_path="$new_path"
41459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41460     unix_path=`$CYGPATH -u "$windows_path"`
41461     new_path="$unix_path"
41462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41464     new_path="$unix_path"
41465   fi
41466 
41467 
41468   # Now try to locate executable using which
41469   new_path=`$WHICH "$new_path" 2> /dev/null`
41470 
41471   if test "x$new_path" = x; then
41472     # Oops. Which didn't find the executable.
41473     # The splitting of arguments from the executable at a space might have been incorrect,
41474     # since paths with space are more likely in Windows. Give it another try with the whole
41475     # argument.
41476     path="$complete"
41477     arguments="EOL"
41478     new_path="$path"
41479 
41480   windows_path="$new_path"
41481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41482     unix_path=`$CYGPATH -u "$windows_path"`
41483     new_path="$unix_path"
41484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41485     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41486     new_path="$unix_path"
41487   fi
41488 
41489 
41490     new_path=`$WHICH "$new_path" 2> /dev/null`
41491     # bat and cmd files are not always considered executable in MSYS causing which
41492     # to not find them
41493     if test "x$new_path" = x \
41494         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41495         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41496       new_path="$path"
41497 
41498   windows_path="$new_path"
41499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41500     unix_path=`$CYGPATH -u "$windows_path"`
41501     new_path="$unix_path"
41502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41504     new_path="$unix_path"
41505   fi
41506 
41507     fi
41508 
41509     if test "x$new_path" = x; then
41510       # It's still not found. Now this is an unrecoverable error.
41511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41512 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41513       has_space=`$ECHO "$complete" | $GREP " "`
41514       if test "x$has_space" != x; then
41515         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41516 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41517       fi
41518       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41519     fi
41520   fi
41521 
41522   # Now new_path has a complete unix path to the binary
41523   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41524     # Keep paths in /bin as-is, but remove trailing .exe if any
41525     new_path="${new_path/%.exe/}"
41526     # Do not save /bin paths to all_fixpath_prefixes!
41527   else
41528     # Not in mixed or Windows style, start by that.
41529     new_path=`cmd //c echo $new_path`
41530 
41531   input_path="$new_path"
41532   # Check if we need to convert this using DOS-style short mode. If the path
41533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41534   # take no chances and rewrite it.
41535   # Note: m4 eats our [], so we need to use [ and ] instead.
41536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41537   if test "x$has_forbidden_chars" != x; then
41538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41539     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41540   fi
41541 
41542     # Output is in $new_path
41543 
41544   windows_path="$new_path"
41545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41546     unix_path=`$CYGPATH -u "$windows_path"`
41547     new_path="$unix_path"
41548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41550     new_path="$unix_path"
41551   fi
41552 
41553     # remove trailing .exe if any
41554     new_path="${new_path/%.exe/}"
41555 
41556     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41557     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41558   fi
41559 
41560     else
41561       # We're on a unix platform. Hooray! :)
41562       # First separate the path from the arguments. This will split at the first
41563       # space.
41564       complete="$NM"
41565       path="${complete%% *}"
41566       tmp="$complete EOL"
41567       arguments="${tmp#* }"
41568 
41569       # Cannot rely on the command "which" here since it doesn't always work.
41570       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41571       if test -z "$is_absolute_path"; then
41572         # Path to executable is not absolute. Find it.
41573         IFS_save="$IFS"
41574         IFS=:
41575         for p in $PATH; do
41576           if test -f "$p/$path" && test -x "$p/$path"; then
41577             new_path="$p/$path"
41578             break
41579           fi
41580         done
41581         IFS="$IFS_save"
41582       else
41583         # This is an absolute path, we can use it without further modifications.
41584         new_path="$path"
41585       fi
41586 
41587       if test "x$new_path" = x; then
41588         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41589 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41590         has_space=`$ECHO "$complete" | $GREP " "`
41591         if test "x$has_space" != x; then
41592           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41593 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41594         fi
41595         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41596       fi
41597     fi
41598 
41599     # Now join together the path and the arguments once again
41600     if test "x$arguments" != xEOL; then
41601       new_complete="$new_path ${arguments% *}"
41602     else
41603       new_complete="$new_path"
41604     fi
41605 
41606     if test "x$complete" != "x$new_complete"; then
41607       NM="$new_complete"
41608       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41609 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41610     fi
41611   fi
41612 
41613 
41614 
41615   # Publish this variable in the help.
41616 
41617 
41618   if [ -z "${GNM+x}" ]; then
41619     # The variable is not set by user, try to locate tool using the code snippet
41620     for ac_prog in gnm
41621 do
41622   # Extract the first word of "$ac_prog", so it can be a program name with args.
41623 set dummy $ac_prog; ac_word=$2
41624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41625 $as_echo_n "checking for $ac_word... " >&6; }
41626 if ${ac_cv_path_GNM+:} false; then :
41627   $as_echo_n "(cached) " >&6
41628 else
41629   case $GNM in
41630   [\\/]* | ?:[\\/]*)
41631   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41632   ;;
41633   *)
41634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41635 for as_dir in $PATH
41636 do
41637   IFS=$as_save_IFS
41638   test -z "$as_dir" && as_dir=.
41639     for ac_exec_ext in '' $ac_executable_extensions; do
41640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41641     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41643     break 2
41644   fi
41645 done
41646   done
41647 IFS=$as_save_IFS
41648 
41649   ;;
41650 esac
41651 fi
41652 GNM=$ac_cv_path_GNM
41653 if test -n "$GNM"; then
41654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41655 $as_echo "$GNM" >&6; }
41656 else
41657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41658 $as_echo "no" >&6; }
41659 fi
41660 
41661 
41662   test -n "$GNM" && break
41663 done
41664 
41665   else
41666     # The variable is set, but is it from the command line or the environment?
41667 
41668     # Try to remove the string !GNM! from our list.
41669     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41670     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41671       # If it failed, the variable was not from the command line. Ignore it,
41672       # but warn the user (except for BASH, which is always set by the calling BASH).
41673       if test "xGNM" != xBASH; then
41674         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41675 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41676       fi
41677       # Try to locate tool using the code snippet
41678       for ac_prog in gnm
41679 do
41680   # Extract the first word of "$ac_prog", so it can be a program name with args.
41681 set dummy $ac_prog; ac_word=$2
41682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41683 $as_echo_n "checking for $ac_word... " >&6; }
41684 if ${ac_cv_path_GNM+:} false; then :
41685   $as_echo_n "(cached) " >&6
41686 else
41687   case $GNM in
41688   [\\/]* | ?:[\\/]*)
41689   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41690   ;;
41691   *)
41692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41693 for as_dir in $PATH
41694 do
41695   IFS=$as_save_IFS
41696   test -z "$as_dir" && as_dir=.
41697     for ac_exec_ext in '' $ac_executable_extensions; do
41698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41699     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41701     break 2
41702   fi
41703 done
41704   done
41705 IFS=$as_save_IFS
41706 
41707   ;;
41708 esac
41709 fi
41710 GNM=$ac_cv_path_GNM
41711 if test -n "$GNM"; then
41712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41713 $as_echo "$GNM" >&6; }
41714 else
41715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41716 $as_echo "no" >&6; }
41717 fi
41718 
41719 
41720   test -n "$GNM" && break
41721 done
41722 
41723     else
41724       # If it succeeded, then it was overridden by the user. We will use it
41725       # for the tool.
41726 
41727       # First remove it from the list of overridden variables, so we can test
41728       # for unknown variables in the end.
41729       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41730 
41731       # Check if we try to supply an empty value
41732       if test "x$GNM" = x; then
41733         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41734 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41736 $as_echo_n "checking for GNM... " >&6; }
41737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41738 $as_echo "disabled" >&6; }
41739       else
41740         # Check if the provided tool contains a complete path.
41741         tool_specified="$GNM"
41742         tool_basename="${tool_specified##*/}"
41743         if test "x$tool_basename" = "x$tool_specified"; then
41744           # A command without a complete path is provided, search $PATH.
41745           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41746 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41747           # Extract the first word of "$tool_basename", so it can be a program name with args.
41748 set dummy $tool_basename; ac_word=$2
41749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41750 $as_echo_n "checking for $ac_word... " >&6; }
41751 if ${ac_cv_path_GNM+:} false; then :
41752   $as_echo_n "(cached) " >&6
41753 else
41754   case $GNM in
41755   [\\/]* | ?:[\\/]*)
41756   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41757   ;;
41758   *)
41759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41760 for as_dir in $PATH
41761 do
41762   IFS=$as_save_IFS
41763   test -z "$as_dir" && as_dir=.
41764     for ac_exec_ext in '' $ac_executable_extensions; do
41765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41766     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41768     break 2
41769   fi
41770 done
41771   done
41772 IFS=$as_save_IFS
41773 
41774   ;;
41775 esac
41776 fi
41777 GNM=$ac_cv_path_GNM
41778 if test -n "$GNM"; then
41779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41780 $as_echo "$GNM" >&6; }
41781 else
41782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41783 $as_echo "no" >&6; }
41784 fi
41785 
41786 
41787           if test "x$GNM" = x; then
41788             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41789           fi
41790         else
41791           # Otherwise we believe it is a complete path. Use it as it is.
41792           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41793 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41794           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41795 $as_echo_n "checking for GNM... " >&6; }
41796           if test ! -x "$tool_specified"; then
41797             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41798 $as_echo "not found" >&6; }
41799             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41800           fi
41801           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41802 $as_echo "$tool_specified" >&6; }
41803         fi
41804       fi
41805     fi
41806 
41807   fi
41808 
41809 
41810 
41811   # Only process if variable expands to non-empty
41812 
41813   if test "x$GNM" != x; then
41814     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41815 
41816   # First separate the path from the arguments. This will split at the first
41817   # space.
41818   complete="$GNM"
41819   path="${complete%% *}"
41820   tmp="$complete EOL"
41821   arguments="${tmp#* }"
41822 
41823   # Input might be given as Windows format, start by converting to
41824   # unix format.
41825   new_path=`$CYGPATH -u "$path"`
41826 
41827   # Now try to locate executable using which
41828   new_path=`$WHICH "$new_path" 2> /dev/null`
41829   # bat and cmd files are not always considered executable in cygwin causing which
41830   # to not find them
41831   if test "x$new_path" = x \
41832       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41833       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41834     new_path=`$CYGPATH -u "$path"`
41835   fi
41836   if test "x$new_path" = x; then
41837     # Oops. Which didn't find the executable.
41838     # The splitting of arguments from the executable at a space might have been incorrect,
41839     # since paths with space are more likely in Windows. Give it another try with the whole
41840     # argument.
41841     path="$complete"
41842     arguments="EOL"
41843     new_path=`$CYGPATH -u "$path"`
41844     new_path=`$WHICH "$new_path" 2> /dev/null`
41845     # bat and cmd files are not always considered executable in cygwin causing which
41846     # to not find them
41847     if test "x$new_path" = x \
41848         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41849         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41850       new_path=`$CYGPATH -u "$path"`
41851     fi
41852     if test "x$new_path" = x; then
41853       # It's still not found. Now this is an unrecoverable error.
41854       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41855 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41856       has_space=`$ECHO "$complete" | $GREP " "`
41857       if test "x$has_space" != x; then
41858         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41859 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41860       fi
41861       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41862     fi
41863   fi
41864 
41865   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41866   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41867   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41868   # "foo.exe" is OK but "foo" is an error.
41869   #
41870   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41871   # It is also a way to make sure we got the proper file name for the real test later on.
41872   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41873   if test "x$test_shortpath" = x; then
41874     # Short path failed, file does not exist as specified.
41875     # Try adding .exe or .cmd
41876     if test -f "${new_path}.exe"; then
41877       input_to_shortpath="${new_path}.exe"
41878     elif test -f "${new_path}.cmd"; then
41879       input_to_shortpath="${new_path}.cmd"
41880     else
41881       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41882 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41883       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41884 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41885       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41886     fi
41887   else
41888     input_to_shortpath="$new_path"
41889   fi
41890 
41891   # Call helper function which possibly converts this using DOS-style short mode.
41892   # If so, the updated path is stored in $new_path.
41893   new_path="$input_to_shortpath"
41894 
41895   input_path="$input_to_shortpath"
41896   # Check if we need to convert this using DOS-style short mode. If the path
41897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41898   # take no chances and rewrite it.
41899   # Note: m4 eats our [], so we need to use [ and ] instead.
41900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41901   if test "x$has_forbidden_chars" != x; then
41902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41906       # Going to short mode and back again did indeed matter. Since short mode is
41907       # case insensitive, let's make it lowercase to improve readability.
41908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41909       # Now convert it back to Unix-style (cygpath)
41910       input_path=`$CYGPATH -u "$shortmode_path"`
41911       new_path="$input_path"
41912     fi
41913   fi
41914 
41915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41916   if test "x$test_cygdrive_prefix" = x; then
41917     # As a simple fix, exclude /usr/bin since it's not a real path.
41918     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41920       # a path prefixed by /cygdrive for fixpath to work.
41921       new_path="$CYGWIN_ROOT_PATH$input_path"
41922     fi
41923   fi
41924 
41925   # remove trailing .exe if any
41926   new_path="${new_path/%.exe/}"
41927 
41928     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41929 
41930   # First separate the path from the arguments. This will split at the first
41931   # space.
41932   complete="$GNM"
41933   path="${complete%% *}"
41934   tmp="$complete EOL"
41935   arguments="${tmp#* }"
41936 
41937   # Input might be given as Windows format, start by converting to
41938   # unix format.
41939   new_path="$path"
41940 
41941   windows_path="$new_path"
41942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41943     unix_path=`$CYGPATH -u "$windows_path"`
41944     new_path="$unix_path"
41945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41947     new_path="$unix_path"
41948   fi
41949 
41950 
41951   # Now try to locate executable using which
41952   new_path=`$WHICH "$new_path" 2> /dev/null`
41953 
41954   if test "x$new_path" = x; then
41955     # Oops. Which didn't find the executable.
41956     # The splitting of arguments from the executable at a space might have been incorrect,
41957     # since paths with space are more likely in Windows. Give it another try with the whole
41958     # argument.
41959     path="$complete"
41960     arguments="EOL"
41961     new_path="$path"
41962 
41963   windows_path="$new_path"
41964   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41965     unix_path=`$CYGPATH -u "$windows_path"`
41966     new_path="$unix_path"
41967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41968     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41969     new_path="$unix_path"
41970   fi
41971 
41972 
41973     new_path=`$WHICH "$new_path" 2> /dev/null`
41974     # bat and cmd files are not always considered executable in MSYS causing which
41975     # to not find them
41976     if test "x$new_path" = x \
41977         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41978         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41979       new_path="$path"
41980 
41981   windows_path="$new_path"
41982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41983     unix_path=`$CYGPATH -u "$windows_path"`
41984     new_path="$unix_path"
41985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41987     new_path="$unix_path"
41988   fi
41989 
41990     fi
41991 
41992     if test "x$new_path" = x; then
41993       # It's still not found. Now this is an unrecoverable error.
41994       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41995 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41996       has_space=`$ECHO "$complete" | $GREP " "`
41997       if test "x$has_space" != x; then
41998         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41999 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42000       fi
42001       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42002     fi
42003   fi
42004 
42005   # Now new_path has a complete unix path to the binary
42006   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42007     # Keep paths in /bin as-is, but remove trailing .exe if any
42008     new_path="${new_path/%.exe/}"
42009     # Do not save /bin paths to all_fixpath_prefixes!
42010   else
42011     # Not in mixed or Windows style, start by that.
42012     new_path=`cmd //c echo $new_path`
42013 
42014   input_path="$new_path"
42015   # Check if we need to convert this using DOS-style short mode. If the path
42016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42017   # take no chances and rewrite it.
42018   # Note: m4 eats our [], so we need to use [ and ] instead.
42019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42020   if test "x$has_forbidden_chars" != x; then
42021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42022     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42023   fi
42024 
42025     # Output is in $new_path
42026 
42027   windows_path="$new_path"
42028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42029     unix_path=`$CYGPATH -u "$windows_path"`
42030     new_path="$unix_path"
42031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42033     new_path="$unix_path"
42034   fi
42035 
42036     # remove trailing .exe if any
42037     new_path="${new_path/%.exe/}"
42038 
42039     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42040     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42041   fi
42042 
42043     else
42044       # We're on a unix platform. Hooray! :)
42045       # First separate the path from the arguments. This will split at the first
42046       # space.
42047       complete="$GNM"
42048       path="${complete%% *}"
42049       tmp="$complete EOL"
42050       arguments="${tmp#* }"
42051 
42052       # Cannot rely on the command "which" here since it doesn't always work.
42053       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42054       if test -z "$is_absolute_path"; then
42055         # Path to executable is not absolute. Find it.
42056         IFS_save="$IFS"
42057         IFS=:
42058         for p in $PATH; do
42059           if test -f "$p/$path" && test -x "$p/$path"; then
42060             new_path="$p/$path"
42061             break
42062           fi
42063         done
42064         IFS="$IFS_save"
42065       else
42066         # This is an absolute path, we can use it without further modifications.
42067         new_path="$path"
42068       fi
42069 
42070       if test "x$new_path" = x; then
42071         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42072 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42073         has_space=`$ECHO "$complete" | $GREP " "`
42074         if test "x$has_space" != x; then
42075           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42076 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42077         fi
42078         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42079       fi
42080     fi
42081 
42082     # Now join together the path and the arguments once again
42083     if test "x$arguments" != xEOL; then
42084       new_complete="$new_path ${arguments% *}"
42085     else
42086       new_complete="$new_path"
42087     fi
42088 
42089     if test "x$complete" != "x$new_complete"; then
42090       GNM="$new_complete"
42091       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
42092 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
42093     fi
42094   fi
42095 
42096   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
42097     # FIXME: we should unify this with the solaris case above.
42098 
42099 
42100   # Publish this variable in the help.
42101 
42102 
42103   if [ -z "${STRIP+x}" ]; then
42104     # The variable is not set by user, try to locate tool using the code snippet
42105     if test -n "$ac_tool_prefix"; then
42106   for ac_prog in strip
42107   do
42108     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42109 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42111 $as_echo_n "checking for $ac_word... " >&6; }
42112 if ${ac_cv_prog_STRIP+:} false; then :
42113   $as_echo_n "(cached) " >&6
42114 else
42115   if test -n "$STRIP"; then
42116   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42117 else
42118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42119 for as_dir in $PATH
42120 do
42121   IFS=$as_save_IFS
42122   test -z "$as_dir" && as_dir=.
42123     for ac_exec_ext in '' $ac_executable_extensions; do
42124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42125     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42127     break 2
42128   fi
42129 done
42130   done
42131 IFS=$as_save_IFS
42132 
42133 fi
42134 fi
42135 STRIP=$ac_cv_prog_STRIP
42136 if test -n "$STRIP"; then
42137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42138 $as_echo "$STRIP" >&6; }
42139 else
42140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42141 $as_echo "no" >&6; }
42142 fi
42143 
42144 
42145     test -n "$STRIP" && break
42146   done
42147 fi
42148 if test -z "$STRIP"; then
42149   ac_ct_STRIP=$STRIP
42150   for ac_prog in strip
42151 do
42152   # Extract the first word of "$ac_prog", so it can be a program name with args.
42153 set dummy $ac_prog; ac_word=$2
42154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42155 $as_echo_n "checking for $ac_word... " >&6; }
42156 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42157   $as_echo_n "(cached) " >&6
42158 else
42159   if test -n "$ac_ct_STRIP"; then
42160   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42161 else
42162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42163 for as_dir in $PATH
42164 do
42165   IFS=$as_save_IFS
42166   test -z "$as_dir" && as_dir=.
42167     for ac_exec_ext in '' $ac_executable_extensions; do
42168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42169     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42171     break 2
42172   fi
42173 done
42174   done
42175 IFS=$as_save_IFS
42176 
42177 fi
42178 fi
42179 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42180 if test -n "$ac_ct_STRIP"; then
42181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42182 $as_echo "$ac_ct_STRIP" >&6; }
42183 else
42184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42185 $as_echo "no" >&6; }
42186 fi
42187 
42188 
42189   test -n "$ac_ct_STRIP" && break
42190 done
42191 
42192   if test "x$ac_ct_STRIP" = x; then
42193     STRIP=""
42194   else
42195     case $cross_compiling:$ac_tool_warned in
42196 yes:)
42197 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42198 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42199 ac_tool_warned=yes ;;
42200 esac
42201     STRIP=$ac_ct_STRIP
42202   fi
42203 fi
42204 
42205   else
42206     # The variable is set, but is it from the command line or the environment?
42207 
42208     # Try to remove the string !STRIP! from our list.
42209     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42210     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42211       # If it failed, the variable was not from the command line. Ignore it,
42212       # but warn the user (except for BASH, which is always set by the calling BASH).
42213       if test "xSTRIP" != xBASH; then
42214         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42215 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42216       fi
42217       # Try to locate tool using the code snippet
42218       if test -n "$ac_tool_prefix"; then
42219   for ac_prog in strip
42220   do
42221     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42222 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42224 $as_echo_n "checking for $ac_word... " >&6; }
42225 if ${ac_cv_prog_STRIP+:} false; then :
42226   $as_echo_n "(cached) " >&6
42227 else
42228   if test -n "$STRIP"; then
42229   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42230 else
42231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42232 for as_dir in $PATH
42233 do
42234   IFS=$as_save_IFS
42235   test -z "$as_dir" && as_dir=.
42236     for ac_exec_ext in '' $ac_executable_extensions; do
42237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42238     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42240     break 2
42241   fi
42242 done
42243   done
42244 IFS=$as_save_IFS
42245 
42246 fi
42247 fi
42248 STRIP=$ac_cv_prog_STRIP
42249 if test -n "$STRIP"; then
42250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42251 $as_echo "$STRIP" >&6; }
42252 else
42253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42254 $as_echo "no" >&6; }
42255 fi
42256 
42257 
42258     test -n "$STRIP" && break
42259   done
42260 fi
42261 if test -z "$STRIP"; then
42262   ac_ct_STRIP=$STRIP
42263   for ac_prog in strip
42264 do
42265   # Extract the first word of "$ac_prog", so it can be a program name with args.
42266 set dummy $ac_prog; ac_word=$2
42267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42268 $as_echo_n "checking for $ac_word... " >&6; }
42269 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42270   $as_echo_n "(cached) " >&6
42271 else
42272   if test -n "$ac_ct_STRIP"; then
42273   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42274 else
42275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42276 for as_dir in $PATH
42277 do
42278   IFS=$as_save_IFS
42279   test -z "$as_dir" && as_dir=.
42280     for ac_exec_ext in '' $ac_executable_extensions; do
42281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42282     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42284     break 2
42285   fi
42286 done
42287   done
42288 IFS=$as_save_IFS
42289 
42290 fi
42291 fi
42292 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42293 if test -n "$ac_ct_STRIP"; then
42294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42295 $as_echo "$ac_ct_STRIP" >&6; }
42296 else
42297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42298 $as_echo "no" >&6; }
42299 fi
42300 
42301 
42302   test -n "$ac_ct_STRIP" && break
42303 done
42304 
42305   if test "x$ac_ct_STRIP" = x; then
42306     STRIP=""
42307   else
42308     case $cross_compiling:$ac_tool_warned in
42309 yes:)
42310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42311 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42312 ac_tool_warned=yes ;;
42313 esac
42314     STRIP=$ac_ct_STRIP
42315   fi
42316 fi
42317 
42318     else
42319       # If it succeeded, then it was overridden by the user. We will use it
42320       # for the tool.
42321 
42322       # First remove it from the list of overridden variables, so we can test
42323       # for unknown variables in the end.
42324       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42325 
42326       # Check if we try to supply an empty value
42327       if test "x$STRIP" = x; then
42328         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42329 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42330         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42331 $as_echo_n "checking for STRIP... " >&6; }
42332         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42333 $as_echo "disabled" >&6; }
42334       else
42335         # Check if the provided tool contains a complete path.
42336         tool_specified="$STRIP"
42337         tool_basename="${tool_specified##*/}"
42338         if test "x$tool_basename" = "x$tool_specified"; then
42339           # A command without a complete path is provided, search $PATH.
42340           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42341 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42342           # Extract the first word of "$tool_basename", so it can be a program name with args.
42343 set dummy $tool_basename; ac_word=$2
42344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42345 $as_echo_n "checking for $ac_word... " >&6; }
42346 if ${ac_cv_path_STRIP+:} false; then :
42347   $as_echo_n "(cached) " >&6
42348 else
42349   case $STRIP in
42350   [\\/]* | ?:[\\/]*)
42351   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42352   ;;
42353   *)
42354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42355 for as_dir in $PATH
42356 do
42357   IFS=$as_save_IFS
42358   test -z "$as_dir" && as_dir=.
42359     for ac_exec_ext in '' $ac_executable_extensions; do
42360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42361     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42363     break 2
42364   fi
42365 done
42366   done
42367 IFS=$as_save_IFS
42368 
42369   ;;
42370 esac
42371 fi
42372 STRIP=$ac_cv_path_STRIP
42373 if test -n "$STRIP"; then
42374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42375 $as_echo "$STRIP" >&6; }
42376 else
42377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42378 $as_echo "no" >&6; }
42379 fi
42380 
42381 
42382           if test "x$STRIP" = x; then
42383             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42384           fi
42385         else
42386           # Otherwise we believe it is a complete path. Use it as it is.
42387           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42388 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42389           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42390 $as_echo_n "checking for STRIP... " >&6; }
42391           if test ! -x "$tool_specified"; then
42392             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42393 $as_echo "not found" >&6; }
42394             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42395           fi
42396           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42397 $as_echo "$tool_specified" >&6; }
42398         fi
42399       fi
42400     fi
42401 
42402   fi
42403 
42404 
42405 
42406   # Only process if variable expands to non-empty
42407 
42408   if test "x$STRIP" != x; then
42409     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42410 
42411   # First separate the path from the arguments. This will split at the first
42412   # space.
42413   complete="$STRIP"
42414   path="${complete%% *}"
42415   tmp="$complete EOL"
42416   arguments="${tmp#* }"
42417 
42418   # Input might be given as Windows format, start by converting to
42419   # unix format.
42420   new_path=`$CYGPATH -u "$path"`
42421 
42422   # Now try to locate executable using which
42423   new_path=`$WHICH "$new_path" 2> /dev/null`
42424   # bat and cmd files are not always considered executable in cygwin causing which
42425   # to not find them
42426   if test "x$new_path" = x \
42427       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42428       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42429     new_path=`$CYGPATH -u "$path"`
42430   fi
42431   if test "x$new_path" = x; then
42432     # Oops. Which didn't find the executable.
42433     # The splitting of arguments from the executable at a space might have been incorrect,
42434     # since paths with space are more likely in Windows. Give it another try with the whole
42435     # argument.
42436     path="$complete"
42437     arguments="EOL"
42438     new_path=`$CYGPATH -u "$path"`
42439     new_path=`$WHICH "$new_path" 2> /dev/null`
42440     # bat and cmd files are not always considered executable in cygwin causing which
42441     # to not find them
42442     if test "x$new_path" = x \
42443         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42444         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42445       new_path=`$CYGPATH -u "$path"`
42446     fi
42447     if test "x$new_path" = x; then
42448       # It's still not found. Now this is an unrecoverable error.
42449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42450 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42451       has_space=`$ECHO "$complete" | $GREP " "`
42452       if test "x$has_space" != x; then
42453         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42454 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42455       fi
42456       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42457     fi
42458   fi
42459 
42460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42463   # "foo.exe" is OK but "foo" is an error.
42464   #
42465   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42466   # It is also a way to make sure we got the proper file name for the real test later on.
42467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42468   if test "x$test_shortpath" = x; then
42469     # Short path failed, file does not exist as specified.
42470     # Try adding .exe or .cmd
42471     if test -f "${new_path}.exe"; then
42472       input_to_shortpath="${new_path}.exe"
42473     elif test -f "${new_path}.cmd"; then
42474       input_to_shortpath="${new_path}.cmd"
42475     else
42476       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42477 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42478       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42479 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42480       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42481     fi
42482   else
42483     input_to_shortpath="$new_path"
42484   fi
42485 
42486   # Call helper function which possibly converts this using DOS-style short mode.
42487   # If so, the updated path is stored in $new_path.
42488   new_path="$input_to_shortpath"
42489 
42490   input_path="$input_to_shortpath"
42491   # Check if we need to convert this using DOS-style short mode. If the path
42492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42493   # take no chances and rewrite it.
42494   # Note: m4 eats our [], so we need to use [ and ] instead.
42495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42496   if test "x$has_forbidden_chars" != x; then
42497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42498     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42499     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42500     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42501       # Going to short mode and back again did indeed matter. Since short mode is
42502       # case insensitive, let's make it lowercase to improve readability.
42503       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42504       # Now convert it back to Unix-style (cygpath)
42505       input_path=`$CYGPATH -u "$shortmode_path"`
42506       new_path="$input_path"
42507     fi
42508   fi
42509 
42510   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42511   if test "x$test_cygdrive_prefix" = x; then
42512     # As a simple fix, exclude /usr/bin since it's not a real path.
42513     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42514       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42515       # a path prefixed by /cygdrive for fixpath to work.
42516       new_path="$CYGWIN_ROOT_PATH$input_path"
42517     fi
42518   fi
42519 
42520   # remove trailing .exe if any
42521   new_path="${new_path/%.exe/}"
42522 
42523     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42524 
42525   # First separate the path from the arguments. This will split at the first
42526   # space.
42527   complete="$STRIP"
42528   path="${complete%% *}"
42529   tmp="$complete EOL"
42530   arguments="${tmp#* }"
42531 
42532   # Input might be given as Windows format, start by converting to
42533   # unix format.
42534   new_path="$path"
42535 
42536   windows_path="$new_path"
42537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42538     unix_path=`$CYGPATH -u "$windows_path"`
42539     new_path="$unix_path"
42540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42542     new_path="$unix_path"
42543   fi
42544 
42545 
42546   # Now try to locate executable using which
42547   new_path=`$WHICH "$new_path" 2> /dev/null`
42548 
42549   if test "x$new_path" = x; then
42550     # Oops. Which didn't find the executable.
42551     # The splitting of arguments from the executable at a space might have been incorrect,
42552     # since paths with space are more likely in Windows. Give it another try with the whole
42553     # argument.
42554     path="$complete"
42555     arguments="EOL"
42556     new_path="$path"
42557 
42558   windows_path="$new_path"
42559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42560     unix_path=`$CYGPATH -u "$windows_path"`
42561     new_path="$unix_path"
42562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42564     new_path="$unix_path"
42565   fi
42566 
42567 
42568     new_path=`$WHICH "$new_path" 2> /dev/null`
42569     # bat and cmd files are not always considered executable in MSYS causing which
42570     # to not find them
42571     if test "x$new_path" = x \
42572         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42573         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42574       new_path="$path"
42575 
42576   windows_path="$new_path"
42577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42578     unix_path=`$CYGPATH -u "$windows_path"`
42579     new_path="$unix_path"
42580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42582     new_path="$unix_path"
42583   fi
42584 
42585     fi
42586 
42587     if test "x$new_path" = x; then
42588       # It's still not found. Now this is an unrecoverable error.
42589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42590 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42591       has_space=`$ECHO "$complete" | $GREP " "`
42592       if test "x$has_space" != x; then
42593         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42594 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42595       fi
42596       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42597     fi
42598   fi
42599 
42600   # Now new_path has a complete unix path to the binary
42601   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42602     # Keep paths in /bin as-is, but remove trailing .exe if any
42603     new_path="${new_path/%.exe/}"
42604     # Do not save /bin paths to all_fixpath_prefixes!
42605   else
42606     # Not in mixed or Windows style, start by that.
42607     new_path=`cmd //c echo $new_path`
42608 
42609   input_path="$new_path"
42610   # Check if we need to convert this using DOS-style short mode. If the path
42611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42612   # take no chances and rewrite it.
42613   # Note: m4 eats our [], so we need to use [ and ] instead.
42614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42615   if test "x$has_forbidden_chars" != x; then
42616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42617     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42618   fi
42619 
42620     # Output is in $new_path
42621 
42622   windows_path="$new_path"
42623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42624     unix_path=`$CYGPATH -u "$windows_path"`
42625     new_path="$unix_path"
42626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42627     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42628     new_path="$unix_path"
42629   fi
42630 
42631     # remove trailing .exe if any
42632     new_path="${new_path/%.exe/}"
42633 
42634     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42635     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42636   fi
42637 
42638     else
42639       # We're on a unix platform. Hooray! :)
42640       # First separate the path from the arguments. This will split at the first
42641       # space.
42642       complete="$STRIP"
42643       path="${complete%% *}"
42644       tmp="$complete EOL"
42645       arguments="${tmp#* }"
42646 
42647       # Cannot rely on the command "which" here since it doesn't always work.
42648       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42649       if test -z "$is_absolute_path"; then
42650         # Path to executable is not absolute. Find it.
42651         IFS_save="$IFS"
42652         IFS=:
42653         for p in $PATH; do
42654           if test -f "$p/$path" && test -x "$p/$path"; then
42655             new_path="$p/$path"
42656             break
42657           fi
42658         done
42659         IFS="$IFS_save"
42660       else
42661         # This is an absolute path, we can use it without further modifications.
42662         new_path="$path"
42663       fi
42664 
42665       if test "x$new_path" = x; then
42666         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42667 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42668         has_space=`$ECHO "$complete" | $GREP " "`
42669         if test "x$has_space" != x; then
42670           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42671 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42672         fi
42673         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42674       fi
42675     fi
42676 
42677     # Now join together the path and the arguments once again
42678     if test "x$arguments" != xEOL; then
42679       new_complete="$new_path ${arguments% *}"
42680     else
42681       new_complete="$new_path"
42682     fi
42683 
42684     if test "x$complete" != "x$new_complete"; then
42685       STRIP="$new_complete"
42686       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42687 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42688     fi
42689   fi
42690 
42691     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42692 
42693 
42694   # Publish this variable in the help.
42695 
42696 
42697   if [ -z "${NM+x}" ]; then
42698     # The variable is not set by user, try to locate tool using the code snippet
42699     if test -n "$ac_tool_prefix"; then
42700   for ac_prog in nm gcc-nm
42701   do
42702     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42703 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42705 $as_echo_n "checking for $ac_word... " >&6; }
42706 if ${ac_cv_prog_NM+:} false; then :
42707   $as_echo_n "(cached) " >&6
42708 else
42709   if test -n "$NM"; then
42710   ac_cv_prog_NM="$NM" # Let the user override the test.
42711 else
42712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42713 for as_dir in $PATH
42714 do
42715   IFS=$as_save_IFS
42716   test -z "$as_dir" && as_dir=.
42717     for ac_exec_ext in '' $ac_executable_extensions; do
42718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42719     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42721     break 2
42722   fi
42723 done
42724   done
42725 IFS=$as_save_IFS
42726 
42727 fi
42728 fi
42729 NM=$ac_cv_prog_NM
42730 if test -n "$NM"; then
42731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42732 $as_echo "$NM" >&6; }
42733 else
42734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42735 $as_echo "no" >&6; }
42736 fi
42737 
42738 
42739     test -n "$NM" && break
42740   done
42741 fi
42742 if test -z "$NM"; then
42743   ac_ct_NM=$NM
42744   for ac_prog in nm gcc-nm
42745 do
42746   # Extract the first word of "$ac_prog", so it can be a program name with args.
42747 set dummy $ac_prog; ac_word=$2
42748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42749 $as_echo_n "checking for $ac_word... " >&6; }
42750 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42751   $as_echo_n "(cached) " >&6
42752 else
42753   if test -n "$ac_ct_NM"; then
42754   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42755 else
42756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42757 for as_dir in $PATH
42758 do
42759   IFS=$as_save_IFS
42760   test -z "$as_dir" && as_dir=.
42761     for ac_exec_ext in '' $ac_executable_extensions; do
42762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42763     ac_cv_prog_ac_ct_NM="$ac_prog"
42764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42765     break 2
42766   fi
42767 done
42768   done
42769 IFS=$as_save_IFS
42770 
42771 fi
42772 fi
42773 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42774 if test -n "$ac_ct_NM"; then
42775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42776 $as_echo "$ac_ct_NM" >&6; }
42777 else
42778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42779 $as_echo "no" >&6; }
42780 fi
42781 
42782 
42783   test -n "$ac_ct_NM" && break
42784 done
42785 
42786   if test "x$ac_ct_NM" = x; then
42787     NM=""
42788   else
42789     case $cross_compiling:$ac_tool_warned in
42790 yes:)
42791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42792 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42793 ac_tool_warned=yes ;;
42794 esac
42795     NM=$ac_ct_NM
42796   fi
42797 fi
42798 
42799   else
42800     # The variable is set, but is it from the command line or the environment?
42801 
42802     # Try to remove the string !NM! from our list.
42803     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42804     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42805       # If it failed, the variable was not from the command line. Ignore it,
42806       # but warn the user (except for BASH, which is always set by the calling BASH).
42807       if test "xNM" != xBASH; then
42808         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42809 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42810       fi
42811       # Try to locate tool using the code snippet
42812       if test -n "$ac_tool_prefix"; then
42813   for ac_prog in nm gcc-nm
42814   do
42815     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42816 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42818 $as_echo_n "checking for $ac_word... " >&6; }
42819 if ${ac_cv_prog_NM+:} false; then :
42820   $as_echo_n "(cached) " >&6
42821 else
42822   if test -n "$NM"; then
42823   ac_cv_prog_NM="$NM" # Let the user override the test.
42824 else
42825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42826 for as_dir in $PATH
42827 do
42828   IFS=$as_save_IFS
42829   test -z "$as_dir" && as_dir=.
42830     for ac_exec_ext in '' $ac_executable_extensions; do
42831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42832     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42834     break 2
42835   fi
42836 done
42837   done
42838 IFS=$as_save_IFS
42839 
42840 fi
42841 fi
42842 NM=$ac_cv_prog_NM
42843 if test -n "$NM"; then
42844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42845 $as_echo "$NM" >&6; }
42846 else
42847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42848 $as_echo "no" >&6; }
42849 fi
42850 
42851 
42852     test -n "$NM" && break
42853   done
42854 fi
42855 if test -z "$NM"; then
42856   ac_ct_NM=$NM
42857   for ac_prog in nm gcc-nm
42858 do
42859   # Extract the first word of "$ac_prog", so it can be a program name with args.
42860 set dummy $ac_prog; ac_word=$2
42861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42862 $as_echo_n "checking for $ac_word... " >&6; }
42863 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42864   $as_echo_n "(cached) " >&6
42865 else
42866   if test -n "$ac_ct_NM"; then
42867   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42868 else
42869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42870 for as_dir in $PATH
42871 do
42872   IFS=$as_save_IFS
42873   test -z "$as_dir" && as_dir=.
42874     for ac_exec_ext in '' $ac_executable_extensions; do
42875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42876     ac_cv_prog_ac_ct_NM="$ac_prog"
42877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42878     break 2
42879   fi
42880 done
42881   done
42882 IFS=$as_save_IFS
42883 
42884 fi
42885 fi
42886 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42887 if test -n "$ac_ct_NM"; then
42888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42889 $as_echo "$ac_ct_NM" >&6; }
42890 else
42891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42892 $as_echo "no" >&6; }
42893 fi
42894 
42895 
42896   test -n "$ac_ct_NM" && break
42897 done
42898 
42899   if test "x$ac_ct_NM" = x; then
42900     NM=""
42901   else
42902     case $cross_compiling:$ac_tool_warned in
42903 yes:)
42904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42905 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42906 ac_tool_warned=yes ;;
42907 esac
42908     NM=$ac_ct_NM
42909   fi
42910 fi
42911 
42912     else
42913       # If it succeeded, then it was overridden by the user. We will use it
42914       # for the tool.
42915 
42916       # First remove it from the list of overridden variables, so we can test
42917       # for unknown variables in the end.
42918       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42919 
42920       # Check if we try to supply an empty value
42921       if test "x$NM" = x; then
42922         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42923 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42924         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42925 $as_echo_n "checking for NM... " >&6; }
42926         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42927 $as_echo "disabled" >&6; }
42928       else
42929         # Check if the provided tool contains a complete path.
42930         tool_specified="$NM"
42931         tool_basename="${tool_specified##*/}"
42932         if test "x$tool_basename" = "x$tool_specified"; then
42933           # A command without a complete path is provided, search $PATH.
42934           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42935 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42936           # Extract the first word of "$tool_basename", so it can be a program name with args.
42937 set dummy $tool_basename; ac_word=$2
42938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42939 $as_echo_n "checking for $ac_word... " >&6; }
42940 if ${ac_cv_path_NM+:} false; then :
42941   $as_echo_n "(cached) " >&6
42942 else
42943   case $NM in
42944   [\\/]* | ?:[\\/]*)
42945   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42946   ;;
42947   *)
42948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42949 for as_dir in $PATH
42950 do
42951   IFS=$as_save_IFS
42952   test -z "$as_dir" && as_dir=.
42953     for ac_exec_ext in '' $ac_executable_extensions; do
42954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42955     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42957     break 2
42958   fi
42959 done
42960   done
42961 IFS=$as_save_IFS
42962 
42963   ;;
42964 esac
42965 fi
42966 NM=$ac_cv_path_NM
42967 if test -n "$NM"; then
42968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42969 $as_echo "$NM" >&6; }
42970 else
42971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42972 $as_echo "no" >&6; }
42973 fi
42974 
42975 
42976           if test "x$NM" = x; then
42977             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42978           fi
42979         else
42980           # Otherwise we believe it is a complete path. Use it as it is.
42981           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42982 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42983           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42984 $as_echo_n "checking for NM... " >&6; }
42985           if test ! -x "$tool_specified"; then
42986             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42987 $as_echo "not found" >&6; }
42988             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42989           fi
42990           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42991 $as_echo "$tool_specified" >&6; }
42992         fi
42993       fi
42994     fi
42995 
42996   fi
42997 
42998 
42999     else
43000 
43001 
43002   # Publish this variable in the help.
43003 
43004 
43005   if [ -z "${NM+x}" ]; then
43006     # The variable is not set by user, try to locate tool using the code snippet
43007     if test -n "$ac_tool_prefix"; then
43008   for ac_prog in nm
43009   do
43010     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43011 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43013 $as_echo_n "checking for $ac_word... " >&6; }
43014 if ${ac_cv_prog_NM+:} false; then :
43015   $as_echo_n "(cached) " >&6
43016 else
43017   if test -n "$NM"; then
43018   ac_cv_prog_NM="$NM" # Let the user override the test.
43019 else
43020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43021 for as_dir in $PATH
43022 do
43023   IFS=$as_save_IFS
43024   test -z "$as_dir" && as_dir=.
43025     for ac_exec_ext in '' $ac_executable_extensions; do
43026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43027     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43029     break 2
43030   fi
43031 done
43032   done
43033 IFS=$as_save_IFS
43034 
43035 fi
43036 fi
43037 NM=$ac_cv_prog_NM
43038 if test -n "$NM"; then
43039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43040 $as_echo "$NM" >&6; }
43041 else
43042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43043 $as_echo "no" >&6; }
43044 fi
43045 
43046 
43047     test -n "$NM" && break
43048   done
43049 fi
43050 if test -z "$NM"; then
43051   ac_ct_NM=$NM
43052   for ac_prog in nm
43053 do
43054   # Extract the first word of "$ac_prog", so it can be a program name with args.
43055 set dummy $ac_prog; ac_word=$2
43056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43057 $as_echo_n "checking for $ac_word... " >&6; }
43058 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43059   $as_echo_n "(cached) " >&6
43060 else
43061   if test -n "$ac_ct_NM"; then
43062   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43063 else
43064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43065 for as_dir in $PATH
43066 do
43067   IFS=$as_save_IFS
43068   test -z "$as_dir" && as_dir=.
43069     for ac_exec_ext in '' $ac_executable_extensions; do
43070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43071     ac_cv_prog_ac_ct_NM="$ac_prog"
43072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43073     break 2
43074   fi
43075 done
43076   done
43077 IFS=$as_save_IFS
43078 
43079 fi
43080 fi
43081 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43082 if test -n "$ac_ct_NM"; then
43083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43084 $as_echo "$ac_ct_NM" >&6; }
43085 else
43086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43087 $as_echo "no" >&6; }
43088 fi
43089 
43090 
43091   test -n "$ac_ct_NM" && break
43092 done
43093 
43094   if test "x$ac_ct_NM" = x; then
43095     NM=""
43096   else
43097     case $cross_compiling:$ac_tool_warned in
43098 yes:)
43099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43100 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43101 ac_tool_warned=yes ;;
43102 esac
43103     NM=$ac_ct_NM
43104   fi
43105 fi
43106 
43107   else
43108     # The variable is set, but is it from the command line or the environment?
43109 
43110     # Try to remove the string !NM! from our list.
43111     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43112     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43113       # If it failed, the variable was not from the command line. Ignore it,
43114       # but warn the user (except for BASH, which is always set by the calling BASH).
43115       if test "xNM" != xBASH; then
43116         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43117 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43118       fi
43119       # Try to locate tool using the code snippet
43120       if test -n "$ac_tool_prefix"; then
43121   for ac_prog in nm
43122   do
43123     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43124 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43126 $as_echo_n "checking for $ac_word... " >&6; }
43127 if ${ac_cv_prog_NM+:} false; then :
43128   $as_echo_n "(cached) " >&6
43129 else
43130   if test -n "$NM"; then
43131   ac_cv_prog_NM="$NM" # Let the user override the test.
43132 else
43133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43134 for as_dir in $PATH
43135 do
43136   IFS=$as_save_IFS
43137   test -z "$as_dir" && as_dir=.
43138     for ac_exec_ext in '' $ac_executable_extensions; do
43139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43140     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43142     break 2
43143   fi
43144 done
43145   done
43146 IFS=$as_save_IFS
43147 
43148 fi
43149 fi
43150 NM=$ac_cv_prog_NM
43151 if test -n "$NM"; then
43152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43153 $as_echo "$NM" >&6; }
43154 else
43155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43156 $as_echo "no" >&6; }
43157 fi
43158 
43159 
43160     test -n "$NM" && break
43161   done
43162 fi
43163 if test -z "$NM"; then
43164   ac_ct_NM=$NM
43165   for ac_prog in nm
43166 do
43167   # Extract the first word of "$ac_prog", so it can be a program name with args.
43168 set dummy $ac_prog; ac_word=$2
43169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43170 $as_echo_n "checking for $ac_word... " >&6; }
43171 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43172   $as_echo_n "(cached) " >&6
43173 else
43174   if test -n "$ac_ct_NM"; then
43175   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43176 else
43177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43178 for as_dir in $PATH
43179 do
43180   IFS=$as_save_IFS
43181   test -z "$as_dir" && as_dir=.
43182     for ac_exec_ext in '' $ac_executable_extensions; do
43183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43184     ac_cv_prog_ac_ct_NM="$ac_prog"
43185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43186     break 2
43187   fi
43188 done
43189   done
43190 IFS=$as_save_IFS
43191 
43192 fi
43193 fi
43194 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43195 if test -n "$ac_ct_NM"; then
43196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43197 $as_echo "$ac_ct_NM" >&6; }
43198 else
43199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43200 $as_echo "no" >&6; }
43201 fi
43202 
43203 
43204   test -n "$ac_ct_NM" && break
43205 done
43206 
43207   if test "x$ac_ct_NM" = x; then
43208     NM=""
43209   else
43210     case $cross_compiling:$ac_tool_warned in
43211 yes:)
43212 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43213 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43214 ac_tool_warned=yes ;;
43215 esac
43216     NM=$ac_ct_NM
43217   fi
43218 fi
43219 
43220     else
43221       # If it succeeded, then it was overridden by the user. We will use it
43222       # for the tool.
43223 
43224       # First remove it from the list of overridden variables, so we can test
43225       # for unknown variables in the end.
43226       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43227 
43228       # Check if we try to supply an empty value
43229       if test "x$NM" = x; then
43230         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43231 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43233 $as_echo_n "checking for NM... " >&6; }
43234         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43235 $as_echo "disabled" >&6; }
43236       else
43237         # Check if the provided tool contains a complete path.
43238         tool_specified="$NM"
43239         tool_basename="${tool_specified##*/}"
43240         if test "x$tool_basename" = "x$tool_specified"; then
43241           # A command without a complete path is provided, search $PATH.
43242           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43243 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43244           # Extract the first word of "$tool_basename", so it can be a program name with args.
43245 set dummy $tool_basename; ac_word=$2
43246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43247 $as_echo_n "checking for $ac_word... " >&6; }
43248 if ${ac_cv_path_NM+:} false; then :
43249   $as_echo_n "(cached) " >&6
43250 else
43251   case $NM in
43252   [\\/]* | ?:[\\/]*)
43253   ac_cv_path_NM="$NM" # Let the user override the test with a path.
43254   ;;
43255   *)
43256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43257 for as_dir in $PATH
43258 do
43259   IFS=$as_save_IFS
43260   test -z "$as_dir" && as_dir=.
43261     for ac_exec_ext in '' $ac_executable_extensions; do
43262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43263     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43265     break 2
43266   fi
43267 done
43268   done
43269 IFS=$as_save_IFS
43270 
43271   ;;
43272 esac
43273 fi
43274 NM=$ac_cv_path_NM
43275 if test -n "$NM"; then
43276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43277 $as_echo "$NM" >&6; }
43278 else
43279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43280 $as_echo "no" >&6; }
43281 fi
43282 
43283 
43284           if test "x$NM" = x; then
43285             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43286           fi
43287         else
43288           # Otherwise we believe it is a complete path. Use it as it is.
43289           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43290 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43291           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43292 $as_echo_n "checking for NM... " >&6; }
43293           if test ! -x "$tool_specified"; then
43294             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43295 $as_echo "not found" >&6; }
43296             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43297           fi
43298           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43299 $as_echo "$tool_specified" >&6; }
43300         fi
43301       fi
43302     fi
43303 
43304   fi
43305 
43306 
43307     fi
43308 
43309   # Only process if variable expands to non-empty
43310 
43311   if test "x$NM" != x; then
43312     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43313 
43314   # First separate the path from the arguments. This will split at the first
43315   # space.
43316   complete="$NM"
43317   path="${complete%% *}"
43318   tmp="$complete EOL"
43319   arguments="${tmp#* }"
43320 
43321   # Input might be given as Windows format, start by converting to
43322   # unix format.
43323   new_path=`$CYGPATH -u "$path"`
43324 
43325   # Now try to locate executable using which
43326   new_path=`$WHICH "$new_path" 2> /dev/null`
43327   # bat and cmd files are not always considered executable in cygwin causing which
43328   # to not find them
43329   if test "x$new_path" = x \
43330       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43331       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43332     new_path=`$CYGPATH -u "$path"`
43333   fi
43334   if test "x$new_path" = x; then
43335     # Oops. Which didn't find the executable.
43336     # The splitting of arguments from the executable at a space might have been incorrect,
43337     # since paths with space are more likely in Windows. Give it another try with the whole
43338     # argument.
43339     path="$complete"
43340     arguments="EOL"
43341     new_path=`$CYGPATH -u "$path"`
43342     new_path=`$WHICH "$new_path" 2> /dev/null`
43343     # bat and cmd files are not always considered executable in cygwin causing which
43344     # to not find them
43345     if test "x$new_path" = x \
43346         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43347         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43348       new_path=`$CYGPATH -u "$path"`
43349     fi
43350     if test "x$new_path" = x; then
43351       # It's still not found. Now this is an unrecoverable error.
43352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43353 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43354       has_space=`$ECHO "$complete" | $GREP " "`
43355       if test "x$has_space" != x; then
43356         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43357 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43358       fi
43359       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43360     fi
43361   fi
43362 
43363   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43364   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43365   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43366   # "foo.exe" is OK but "foo" is an error.
43367   #
43368   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43369   # It is also a way to make sure we got the proper file name for the real test later on.
43370   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43371   if test "x$test_shortpath" = x; then
43372     # Short path failed, file does not exist as specified.
43373     # Try adding .exe or .cmd
43374     if test -f "${new_path}.exe"; then
43375       input_to_shortpath="${new_path}.exe"
43376     elif test -f "${new_path}.cmd"; then
43377       input_to_shortpath="${new_path}.cmd"
43378     else
43379       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43380 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43381       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43382 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43383       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43384     fi
43385   else
43386     input_to_shortpath="$new_path"
43387   fi
43388 
43389   # Call helper function which possibly converts this using DOS-style short mode.
43390   # If so, the updated path is stored in $new_path.
43391   new_path="$input_to_shortpath"
43392 
43393   input_path="$input_to_shortpath"
43394   # Check if we need to convert this using DOS-style short mode. If the path
43395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43396   # take no chances and rewrite it.
43397   # Note: m4 eats our [], so we need to use [ and ] instead.
43398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43399   if test "x$has_forbidden_chars" != x; then
43400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43401     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43402     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43403     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43404       # Going to short mode and back again did indeed matter. Since short mode is
43405       # case insensitive, let's make it lowercase to improve readability.
43406       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43407       # Now convert it back to Unix-style (cygpath)
43408       input_path=`$CYGPATH -u "$shortmode_path"`
43409       new_path="$input_path"
43410     fi
43411   fi
43412 
43413   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43414   if test "x$test_cygdrive_prefix" = x; then
43415     # As a simple fix, exclude /usr/bin since it's not a real path.
43416     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43417       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43418       # a path prefixed by /cygdrive for fixpath to work.
43419       new_path="$CYGWIN_ROOT_PATH$input_path"
43420     fi
43421   fi
43422 
43423   # remove trailing .exe if any
43424   new_path="${new_path/%.exe/}"
43425 
43426     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43427 
43428   # First separate the path from the arguments. This will split at the first
43429   # space.
43430   complete="$NM"
43431   path="${complete%% *}"
43432   tmp="$complete EOL"
43433   arguments="${tmp#* }"
43434 
43435   # Input might be given as Windows format, start by converting to
43436   # unix format.
43437   new_path="$path"
43438 
43439   windows_path="$new_path"
43440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43441     unix_path=`$CYGPATH -u "$windows_path"`
43442     new_path="$unix_path"
43443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43445     new_path="$unix_path"
43446   fi
43447 
43448 
43449   # Now try to locate executable using which
43450   new_path=`$WHICH "$new_path" 2> /dev/null`
43451 
43452   if test "x$new_path" = x; then
43453     # Oops. Which didn't find the executable.
43454     # The splitting of arguments from the executable at a space might have been incorrect,
43455     # since paths with space are more likely in Windows. Give it another try with the whole
43456     # argument.
43457     path="$complete"
43458     arguments="EOL"
43459     new_path="$path"
43460 
43461   windows_path="$new_path"
43462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43463     unix_path=`$CYGPATH -u "$windows_path"`
43464     new_path="$unix_path"
43465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43467     new_path="$unix_path"
43468   fi
43469 
43470 
43471     new_path=`$WHICH "$new_path" 2> /dev/null`
43472     # bat and cmd files are not always considered executable in MSYS causing which
43473     # to not find them
43474     if test "x$new_path" = x \
43475         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43476         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43477       new_path="$path"
43478 
43479   windows_path="$new_path"
43480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43481     unix_path=`$CYGPATH -u "$windows_path"`
43482     new_path="$unix_path"
43483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43485     new_path="$unix_path"
43486   fi
43487 
43488     fi
43489 
43490     if test "x$new_path" = x; then
43491       # It's still not found. Now this is an unrecoverable error.
43492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43493 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43494       has_space=`$ECHO "$complete" | $GREP " "`
43495       if test "x$has_space" != x; then
43496         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43497 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43498       fi
43499       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43500     fi
43501   fi
43502 
43503   # Now new_path has a complete unix path to the binary
43504   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43505     # Keep paths in /bin as-is, but remove trailing .exe if any
43506     new_path="${new_path/%.exe/}"
43507     # Do not save /bin paths to all_fixpath_prefixes!
43508   else
43509     # Not in mixed or Windows style, start by that.
43510     new_path=`cmd //c echo $new_path`
43511 
43512   input_path="$new_path"
43513   # Check if we need to convert this using DOS-style short mode. If the path
43514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43515   # take no chances and rewrite it.
43516   # Note: m4 eats our [], so we need to use [ and ] instead.
43517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43518   if test "x$has_forbidden_chars" != x; then
43519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43520     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43521   fi
43522 
43523     # Output is in $new_path
43524 
43525   windows_path="$new_path"
43526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43527     unix_path=`$CYGPATH -u "$windows_path"`
43528     new_path="$unix_path"
43529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43530     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43531     new_path="$unix_path"
43532   fi
43533 
43534     # remove trailing .exe if any
43535     new_path="${new_path/%.exe/}"
43536 
43537     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43538     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43539   fi
43540 
43541     else
43542       # We're on a unix platform. Hooray! :)
43543       # First separate the path from the arguments. This will split at the first
43544       # space.
43545       complete="$NM"
43546       path="${complete%% *}"
43547       tmp="$complete EOL"
43548       arguments="${tmp#* }"
43549 
43550       # Cannot rely on the command "which" here since it doesn't always work.
43551       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43552       if test -z "$is_absolute_path"; then
43553         # Path to executable is not absolute. Find it.
43554         IFS_save="$IFS"
43555         IFS=:
43556         for p in $PATH; do
43557           if test -f "$p/$path" && test -x "$p/$path"; then
43558             new_path="$p/$path"
43559             break
43560           fi
43561         done
43562         IFS="$IFS_save"
43563       else
43564         # This is an absolute path, we can use it without further modifications.
43565         new_path="$path"
43566       fi
43567 
43568       if test "x$new_path" = x; then
43569         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43570 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43571         has_space=`$ECHO "$complete" | $GREP " "`
43572         if test "x$has_space" != x; then
43573           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43574 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43575         fi
43576         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43577       fi
43578     fi
43579 
43580     # Now join together the path and the arguments once again
43581     if test "x$arguments" != xEOL; then
43582       new_complete="$new_path ${arguments% *}"
43583     else
43584       new_complete="$new_path"
43585     fi
43586 
43587     if test "x$complete" != "x$new_complete"; then
43588       NM="$new_complete"
43589       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43590 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43591     fi
43592   fi
43593 
43594     GNM="$NM"
43595 
43596   fi
43597 
43598   # objcopy is used for moving debug symbols to separate files when
43599   # full debug symbols are enabled.
43600   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43601 
43602 
43603   # Publish this variable in the help.
43604 
43605 
43606   if [ -z "${OBJCOPY+x}" ]; then
43607     # The variable is not set by user, try to locate tool using the code snippet
43608     if test -n "$ac_tool_prefix"; then
43609   for ac_prog in gobjcopy objcopy
43610   do
43611     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43612 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43614 $as_echo_n "checking for $ac_word... " >&6; }
43615 if ${ac_cv_prog_OBJCOPY+:} false; then :
43616   $as_echo_n "(cached) " >&6
43617 else
43618   if test -n "$OBJCOPY"; then
43619   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43620 else
43621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43622 for as_dir in $PATH
43623 do
43624   IFS=$as_save_IFS
43625   test -z "$as_dir" && as_dir=.
43626     for ac_exec_ext in '' $ac_executable_extensions; do
43627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43628     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43630     break 2
43631   fi
43632 done
43633   done
43634 IFS=$as_save_IFS
43635 
43636 fi
43637 fi
43638 OBJCOPY=$ac_cv_prog_OBJCOPY
43639 if test -n "$OBJCOPY"; then
43640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43641 $as_echo "$OBJCOPY" >&6; }
43642 else
43643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43644 $as_echo "no" >&6; }
43645 fi
43646 
43647 
43648     test -n "$OBJCOPY" && break
43649   done
43650 fi
43651 if test -z "$OBJCOPY"; then
43652   ac_ct_OBJCOPY=$OBJCOPY
43653   for ac_prog in gobjcopy objcopy
43654 do
43655   # Extract the first word of "$ac_prog", so it can be a program name with args.
43656 set dummy $ac_prog; ac_word=$2
43657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43658 $as_echo_n "checking for $ac_word... " >&6; }
43659 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43660   $as_echo_n "(cached) " >&6
43661 else
43662   if test -n "$ac_ct_OBJCOPY"; then
43663   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43664 else
43665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43666 for as_dir in $PATH
43667 do
43668   IFS=$as_save_IFS
43669   test -z "$as_dir" && as_dir=.
43670     for ac_exec_ext in '' $ac_executable_extensions; do
43671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43672     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43674     break 2
43675   fi
43676 done
43677   done
43678 IFS=$as_save_IFS
43679 
43680 fi
43681 fi
43682 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43683 if test -n "$ac_ct_OBJCOPY"; then
43684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43685 $as_echo "$ac_ct_OBJCOPY" >&6; }
43686 else
43687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43688 $as_echo "no" >&6; }
43689 fi
43690 
43691 
43692   test -n "$ac_ct_OBJCOPY" && break
43693 done
43694 
43695   if test "x$ac_ct_OBJCOPY" = x; then
43696     OBJCOPY=""
43697   else
43698     case $cross_compiling:$ac_tool_warned in
43699 yes:)
43700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43701 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43702 ac_tool_warned=yes ;;
43703 esac
43704     OBJCOPY=$ac_ct_OBJCOPY
43705   fi
43706 fi
43707 
43708   else
43709     # The variable is set, but is it from the command line or the environment?
43710 
43711     # Try to remove the string !OBJCOPY! from our list.
43712     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43713     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43714       # If it failed, the variable was not from the command line. Ignore it,
43715       # but warn the user (except for BASH, which is always set by the calling BASH).
43716       if test "xOBJCOPY" != xBASH; then
43717         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43718 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43719       fi
43720       # Try to locate tool using the code snippet
43721       if test -n "$ac_tool_prefix"; then
43722   for ac_prog in gobjcopy objcopy
43723   do
43724     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43725 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43727 $as_echo_n "checking for $ac_word... " >&6; }
43728 if ${ac_cv_prog_OBJCOPY+:} false; then :
43729   $as_echo_n "(cached) " >&6
43730 else
43731   if test -n "$OBJCOPY"; then
43732   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43733 else
43734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43735 for as_dir in $PATH
43736 do
43737   IFS=$as_save_IFS
43738   test -z "$as_dir" && as_dir=.
43739     for ac_exec_ext in '' $ac_executable_extensions; do
43740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43741     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43743     break 2
43744   fi
43745 done
43746   done
43747 IFS=$as_save_IFS
43748 
43749 fi
43750 fi
43751 OBJCOPY=$ac_cv_prog_OBJCOPY
43752 if test -n "$OBJCOPY"; then
43753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43754 $as_echo "$OBJCOPY" >&6; }
43755 else
43756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43757 $as_echo "no" >&6; }
43758 fi
43759 
43760 
43761     test -n "$OBJCOPY" && break
43762   done
43763 fi
43764 if test -z "$OBJCOPY"; then
43765   ac_ct_OBJCOPY=$OBJCOPY
43766   for ac_prog in gobjcopy objcopy
43767 do
43768   # Extract the first word of "$ac_prog", so it can be a program name with args.
43769 set dummy $ac_prog; ac_word=$2
43770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43771 $as_echo_n "checking for $ac_word... " >&6; }
43772 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43773   $as_echo_n "(cached) " >&6
43774 else
43775   if test -n "$ac_ct_OBJCOPY"; then
43776   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43777 else
43778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43779 for as_dir in $PATH
43780 do
43781   IFS=$as_save_IFS
43782   test -z "$as_dir" && as_dir=.
43783     for ac_exec_ext in '' $ac_executable_extensions; do
43784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43785     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43787     break 2
43788   fi
43789 done
43790   done
43791 IFS=$as_save_IFS
43792 
43793 fi
43794 fi
43795 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43796 if test -n "$ac_ct_OBJCOPY"; then
43797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43798 $as_echo "$ac_ct_OBJCOPY" >&6; }
43799 else
43800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43801 $as_echo "no" >&6; }
43802 fi
43803 
43804 
43805   test -n "$ac_ct_OBJCOPY" && break
43806 done
43807 
43808   if test "x$ac_ct_OBJCOPY" = x; then
43809     OBJCOPY=""
43810   else
43811     case $cross_compiling:$ac_tool_warned in
43812 yes:)
43813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43814 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43815 ac_tool_warned=yes ;;
43816 esac
43817     OBJCOPY=$ac_ct_OBJCOPY
43818   fi
43819 fi
43820 
43821     else
43822       # If it succeeded, then it was overridden by the user. We will use it
43823       # for the tool.
43824 
43825       # First remove it from the list of overridden variables, so we can test
43826       # for unknown variables in the end.
43827       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43828 
43829       # Check if we try to supply an empty value
43830       if test "x$OBJCOPY" = x; then
43831         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43832 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43833         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43834 $as_echo_n "checking for OBJCOPY... " >&6; }
43835         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43836 $as_echo "disabled" >&6; }
43837       else
43838         # Check if the provided tool contains a complete path.
43839         tool_specified="$OBJCOPY"
43840         tool_basename="${tool_specified##*/}"
43841         if test "x$tool_basename" = "x$tool_specified"; then
43842           # A command without a complete path is provided, search $PATH.
43843           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43844 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43845           # Extract the first word of "$tool_basename", so it can be a program name with args.
43846 set dummy $tool_basename; ac_word=$2
43847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43848 $as_echo_n "checking for $ac_word... " >&6; }
43849 if ${ac_cv_path_OBJCOPY+:} false; then :
43850   $as_echo_n "(cached) " >&6
43851 else
43852   case $OBJCOPY in
43853   [\\/]* | ?:[\\/]*)
43854   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43855   ;;
43856   *)
43857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43858 for as_dir in $PATH
43859 do
43860   IFS=$as_save_IFS
43861   test -z "$as_dir" && as_dir=.
43862     for ac_exec_ext in '' $ac_executable_extensions; do
43863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43864     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43866     break 2
43867   fi
43868 done
43869   done
43870 IFS=$as_save_IFS
43871 
43872   ;;
43873 esac
43874 fi
43875 OBJCOPY=$ac_cv_path_OBJCOPY
43876 if test -n "$OBJCOPY"; then
43877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43878 $as_echo "$OBJCOPY" >&6; }
43879 else
43880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43881 $as_echo "no" >&6; }
43882 fi
43883 
43884 
43885           if test "x$OBJCOPY" = x; then
43886             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43887           fi
43888         else
43889           # Otherwise we believe it is a complete path. Use it as it is.
43890           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43891 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43892           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43893 $as_echo_n "checking for OBJCOPY... " >&6; }
43894           if test ! -x "$tool_specified"; then
43895             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43896 $as_echo "not found" >&6; }
43897             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43898           fi
43899           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43900 $as_echo "$tool_specified" >&6; }
43901         fi
43902       fi
43903     fi
43904 
43905   fi
43906 
43907 
43908     # Only call fixup if objcopy was found.
43909     if test -n "$OBJCOPY"; then
43910 
43911   # Only process if variable expands to non-empty
43912 
43913   if test "x$OBJCOPY" != x; then
43914     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43915 
43916   # First separate the path from the arguments. This will split at the first
43917   # space.
43918   complete="$OBJCOPY"
43919   path="${complete%% *}"
43920   tmp="$complete EOL"
43921   arguments="${tmp#* }"
43922 
43923   # Input might be given as Windows format, start by converting to
43924   # unix format.
43925   new_path=`$CYGPATH -u "$path"`
43926 
43927   # Now try to locate executable using which
43928   new_path=`$WHICH "$new_path" 2> /dev/null`
43929   # bat and cmd files are not always considered executable in cygwin causing which
43930   # to not find them
43931   if test "x$new_path" = x \
43932       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43933       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43934     new_path=`$CYGPATH -u "$path"`
43935   fi
43936   if test "x$new_path" = x; then
43937     # Oops. Which didn't find the executable.
43938     # The splitting of arguments from the executable at a space might have been incorrect,
43939     # since paths with space are more likely in Windows. Give it another try with the whole
43940     # argument.
43941     path="$complete"
43942     arguments="EOL"
43943     new_path=`$CYGPATH -u "$path"`
43944     new_path=`$WHICH "$new_path" 2> /dev/null`
43945     # bat and cmd files are not always considered executable in cygwin causing which
43946     # to not find them
43947     if test "x$new_path" = x \
43948         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43949         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43950       new_path=`$CYGPATH -u "$path"`
43951     fi
43952     if test "x$new_path" = x; then
43953       # It's still not found. Now this is an unrecoverable error.
43954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43955 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43956       has_space=`$ECHO "$complete" | $GREP " "`
43957       if test "x$has_space" != x; then
43958         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43959 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43960       fi
43961       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43962     fi
43963   fi
43964 
43965   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43966   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43967   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43968   # "foo.exe" is OK but "foo" is an error.
43969   #
43970   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43971   # It is also a way to make sure we got the proper file name for the real test later on.
43972   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43973   if test "x$test_shortpath" = x; then
43974     # Short path failed, file does not exist as specified.
43975     # Try adding .exe or .cmd
43976     if test -f "${new_path}.exe"; then
43977       input_to_shortpath="${new_path}.exe"
43978     elif test -f "${new_path}.cmd"; then
43979       input_to_shortpath="${new_path}.cmd"
43980     else
43981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43982 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43983       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43984 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43985       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43986     fi
43987   else
43988     input_to_shortpath="$new_path"
43989   fi
43990 
43991   # Call helper function which possibly converts this using DOS-style short mode.
43992   # If so, the updated path is stored in $new_path.
43993   new_path="$input_to_shortpath"
43994 
43995   input_path="$input_to_shortpath"
43996   # Check if we need to convert this using DOS-style short mode. If the path
43997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43998   # take no chances and rewrite it.
43999   # Note: m4 eats our [], so we need to use [ and ] instead.
44000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44001   if test "x$has_forbidden_chars" != x; then
44002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44003     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44004     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44005     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44006       # Going to short mode and back again did indeed matter. Since short mode is
44007       # case insensitive, let's make it lowercase to improve readability.
44008       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44009       # Now convert it back to Unix-style (cygpath)
44010       input_path=`$CYGPATH -u "$shortmode_path"`
44011       new_path="$input_path"
44012     fi
44013   fi
44014 
44015   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44016   if test "x$test_cygdrive_prefix" = x; then
44017     # As a simple fix, exclude /usr/bin since it's not a real path.
44018     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44019       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44020       # a path prefixed by /cygdrive for fixpath to work.
44021       new_path="$CYGWIN_ROOT_PATH$input_path"
44022     fi
44023   fi
44024 
44025   # remove trailing .exe if any
44026   new_path="${new_path/%.exe/}"
44027 
44028     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44029 
44030   # First separate the path from the arguments. This will split at the first
44031   # space.
44032   complete="$OBJCOPY"
44033   path="${complete%% *}"
44034   tmp="$complete EOL"
44035   arguments="${tmp#* }"
44036 
44037   # Input might be given as Windows format, start by converting to
44038   # unix format.
44039   new_path="$path"
44040 
44041   windows_path="$new_path"
44042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44043     unix_path=`$CYGPATH -u "$windows_path"`
44044     new_path="$unix_path"
44045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44047     new_path="$unix_path"
44048   fi
44049 
44050 
44051   # Now try to locate executable using which
44052   new_path=`$WHICH "$new_path" 2> /dev/null`
44053 
44054   if test "x$new_path" = x; then
44055     # Oops. Which didn't find the executable.
44056     # The splitting of arguments from the executable at a space might have been incorrect,
44057     # since paths with space are more likely in Windows. Give it another try with the whole
44058     # argument.
44059     path="$complete"
44060     arguments="EOL"
44061     new_path="$path"
44062 
44063   windows_path="$new_path"
44064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44065     unix_path=`$CYGPATH -u "$windows_path"`
44066     new_path="$unix_path"
44067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44069     new_path="$unix_path"
44070   fi
44071 
44072 
44073     new_path=`$WHICH "$new_path" 2> /dev/null`
44074     # bat and cmd files are not always considered executable in MSYS causing which
44075     # to not find them
44076     if test "x$new_path" = x \
44077         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44078         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44079       new_path="$path"
44080 
44081   windows_path="$new_path"
44082   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44083     unix_path=`$CYGPATH -u "$windows_path"`
44084     new_path="$unix_path"
44085   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44086     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44087     new_path="$unix_path"
44088   fi
44089 
44090     fi
44091 
44092     if test "x$new_path" = x; then
44093       # It's still not found. Now this is an unrecoverable error.
44094       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44095 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44096       has_space=`$ECHO "$complete" | $GREP " "`
44097       if test "x$has_space" != x; then
44098         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44099 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44100       fi
44101       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44102     fi
44103   fi
44104 
44105   # Now new_path has a complete unix path to the binary
44106   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44107     # Keep paths in /bin as-is, but remove trailing .exe if any
44108     new_path="${new_path/%.exe/}"
44109     # Do not save /bin paths to all_fixpath_prefixes!
44110   else
44111     # Not in mixed or Windows style, start by that.
44112     new_path=`cmd //c echo $new_path`
44113 
44114   input_path="$new_path"
44115   # Check if we need to convert this using DOS-style short mode. If the path
44116   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44117   # take no chances and rewrite it.
44118   # Note: m4 eats our [], so we need to use [ and ] instead.
44119   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44120   if test "x$has_forbidden_chars" != x; then
44121     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44122     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44123   fi
44124 
44125     # Output is in $new_path
44126 
44127   windows_path="$new_path"
44128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44129     unix_path=`$CYGPATH -u "$windows_path"`
44130     new_path="$unix_path"
44131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44133     new_path="$unix_path"
44134   fi
44135 
44136     # remove trailing .exe if any
44137     new_path="${new_path/%.exe/}"
44138 
44139     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44140     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44141   fi
44142 
44143     else
44144       # We're on a unix platform. Hooray! :)
44145       # First separate the path from the arguments. This will split at the first
44146       # space.
44147       complete="$OBJCOPY"
44148       path="${complete%% *}"
44149       tmp="$complete EOL"
44150       arguments="${tmp#* }"
44151 
44152       # Cannot rely on the command "which" here since it doesn't always work.
44153       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44154       if test -z "$is_absolute_path"; then
44155         # Path to executable is not absolute. Find it.
44156         IFS_save="$IFS"
44157         IFS=:
44158         for p in $PATH; do
44159           if test -f "$p/$path" && test -x "$p/$path"; then
44160             new_path="$p/$path"
44161             break
44162           fi
44163         done
44164         IFS="$IFS_save"
44165       else
44166         # This is an absolute path, we can use it without further modifications.
44167         new_path="$path"
44168       fi
44169 
44170       if test "x$new_path" = x; then
44171         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44172 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44173         has_space=`$ECHO "$complete" | $GREP " "`
44174         if test "x$has_space" != x; then
44175           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44176 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44177         fi
44178         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44179       fi
44180     fi
44181 
44182     # Now join together the path and the arguments once again
44183     if test "x$arguments" != xEOL; then
44184       new_complete="$new_path ${arguments% *}"
44185     else
44186       new_complete="$new_path"
44187     fi
44188 
44189     if test "x$complete" != "x$new_complete"; then
44190       OBJCOPY="$new_complete"
44191       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44192 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44193     fi
44194   fi
44195 
44196       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44197         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44198         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44199         # - version number is last blank separate word on first line
44200         # - version number formats that have been seen:
44201         #   - <major>.<minor>
44202         #   - <major>.<minor>.<micro>
44203         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44204         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44205          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44206               -e 's/.* //' \
44207               -e '/^[01]\./b bad' \
44208               -e '/^2\./{' \
44209               -e '  s/^2\.//' \
44210               -e '  /^[0-9]$/b bad' \
44211               -e '  /^[0-9]\./b bad' \
44212               -e '  /^1[0-9]$/b bad' \
44213               -e '  /^1[0-9]\./b bad' \
44214               -e '  /^20\./b bad' \
44215               -e '  /^21\.0$/b bad' \
44216               -e '  /^21\.0\./b bad' \
44217               -e '}' \
44218               -e ':good' \
44219               -e 's/.*/VALID_VERSION/p' \
44220               -e 'q' \
44221               -e ':bad' \
44222               -e 's/.*/BAD_VERSION/p' \
44223               -e 'q'`
44224         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44225           OBJCOPY=
44226           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
44227 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44228           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44229 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44230           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44231 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44232           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44233 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44234           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44235 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44236         fi
44237       fi
44238     fi
44239   fi
44240 
44241 
44242 
44243   # Publish this variable in the help.
44244 
44245 
44246   if [ -z "${OBJDUMP+x}" ]; then
44247     # The variable is not set by user, try to locate tool using the code snippet
44248     if test -n "$ac_tool_prefix"; then
44249   for ac_prog in gobjdump objdump
44250   do
44251     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44252 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44254 $as_echo_n "checking for $ac_word... " >&6; }
44255 if ${ac_cv_prog_OBJDUMP+:} false; then :
44256   $as_echo_n "(cached) " >&6
44257 else
44258   if test -n "$OBJDUMP"; then
44259   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44260 else
44261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44262 for as_dir in $PATH
44263 do
44264   IFS=$as_save_IFS
44265   test -z "$as_dir" && as_dir=.
44266     for ac_exec_ext in '' $ac_executable_extensions; do
44267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44268     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44270     break 2
44271   fi
44272 done
44273   done
44274 IFS=$as_save_IFS
44275 
44276 fi
44277 fi
44278 OBJDUMP=$ac_cv_prog_OBJDUMP
44279 if test -n "$OBJDUMP"; then
44280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44281 $as_echo "$OBJDUMP" >&6; }
44282 else
44283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44284 $as_echo "no" >&6; }
44285 fi
44286 
44287 
44288     test -n "$OBJDUMP" && break
44289   done
44290 fi
44291 if test -z "$OBJDUMP"; then
44292   ac_ct_OBJDUMP=$OBJDUMP
44293   for ac_prog in gobjdump objdump
44294 do
44295   # Extract the first word of "$ac_prog", so it can be a program name with args.
44296 set dummy $ac_prog; ac_word=$2
44297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44298 $as_echo_n "checking for $ac_word... " >&6; }
44299 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44300   $as_echo_n "(cached) " >&6
44301 else
44302   if test -n "$ac_ct_OBJDUMP"; then
44303   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44304 else
44305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44306 for as_dir in $PATH
44307 do
44308   IFS=$as_save_IFS
44309   test -z "$as_dir" && as_dir=.
44310     for ac_exec_ext in '' $ac_executable_extensions; do
44311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44312     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44314     break 2
44315   fi
44316 done
44317   done
44318 IFS=$as_save_IFS
44319 
44320 fi
44321 fi
44322 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44323 if test -n "$ac_ct_OBJDUMP"; then
44324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44325 $as_echo "$ac_ct_OBJDUMP" >&6; }
44326 else
44327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44328 $as_echo "no" >&6; }
44329 fi
44330 
44331 
44332   test -n "$ac_ct_OBJDUMP" && break
44333 done
44334 
44335   if test "x$ac_ct_OBJDUMP" = x; then
44336     OBJDUMP=""
44337   else
44338     case $cross_compiling:$ac_tool_warned in
44339 yes:)
44340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44341 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44342 ac_tool_warned=yes ;;
44343 esac
44344     OBJDUMP=$ac_ct_OBJDUMP
44345   fi
44346 fi
44347 
44348   else
44349     # The variable is set, but is it from the command line or the environment?
44350 
44351     # Try to remove the string !OBJDUMP! from our list.
44352     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44353     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44354       # If it failed, the variable was not from the command line. Ignore it,
44355       # but warn the user (except for BASH, which is always set by the calling BASH).
44356       if test "xOBJDUMP" != xBASH; then
44357         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44358 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44359       fi
44360       # Try to locate tool using the code snippet
44361       if test -n "$ac_tool_prefix"; then
44362   for ac_prog in gobjdump objdump
44363   do
44364     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44365 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44367 $as_echo_n "checking for $ac_word... " >&6; }
44368 if ${ac_cv_prog_OBJDUMP+:} false; then :
44369   $as_echo_n "(cached) " >&6
44370 else
44371   if test -n "$OBJDUMP"; then
44372   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44373 else
44374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44375 for as_dir in $PATH
44376 do
44377   IFS=$as_save_IFS
44378   test -z "$as_dir" && as_dir=.
44379     for ac_exec_ext in '' $ac_executable_extensions; do
44380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44381     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44383     break 2
44384   fi
44385 done
44386   done
44387 IFS=$as_save_IFS
44388 
44389 fi
44390 fi
44391 OBJDUMP=$ac_cv_prog_OBJDUMP
44392 if test -n "$OBJDUMP"; then
44393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44394 $as_echo "$OBJDUMP" >&6; }
44395 else
44396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44397 $as_echo "no" >&6; }
44398 fi
44399 
44400 
44401     test -n "$OBJDUMP" && break
44402   done
44403 fi
44404 if test -z "$OBJDUMP"; then
44405   ac_ct_OBJDUMP=$OBJDUMP
44406   for ac_prog in gobjdump objdump
44407 do
44408   # Extract the first word of "$ac_prog", so it can be a program name with args.
44409 set dummy $ac_prog; ac_word=$2
44410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44411 $as_echo_n "checking for $ac_word... " >&6; }
44412 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44413   $as_echo_n "(cached) " >&6
44414 else
44415   if test -n "$ac_ct_OBJDUMP"; then
44416   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44417 else
44418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44419 for as_dir in $PATH
44420 do
44421   IFS=$as_save_IFS
44422   test -z "$as_dir" && as_dir=.
44423     for ac_exec_ext in '' $ac_executable_extensions; do
44424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44425     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44427     break 2
44428   fi
44429 done
44430   done
44431 IFS=$as_save_IFS
44432 
44433 fi
44434 fi
44435 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44436 if test -n "$ac_ct_OBJDUMP"; then
44437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44438 $as_echo "$ac_ct_OBJDUMP" >&6; }
44439 else
44440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44441 $as_echo "no" >&6; }
44442 fi
44443 
44444 
44445   test -n "$ac_ct_OBJDUMP" && break
44446 done
44447 
44448   if test "x$ac_ct_OBJDUMP" = x; then
44449     OBJDUMP=""
44450   else
44451     case $cross_compiling:$ac_tool_warned in
44452 yes:)
44453 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44454 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44455 ac_tool_warned=yes ;;
44456 esac
44457     OBJDUMP=$ac_ct_OBJDUMP
44458   fi
44459 fi
44460 
44461     else
44462       # If it succeeded, then it was overridden by the user. We will use it
44463       # for the tool.
44464 
44465       # First remove it from the list of overridden variables, so we can test
44466       # for unknown variables in the end.
44467       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44468 
44469       # Check if we try to supply an empty value
44470       if test "x$OBJDUMP" = x; then
44471         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44472 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44473         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44474 $as_echo_n "checking for OBJDUMP... " >&6; }
44475         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44476 $as_echo "disabled" >&6; }
44477       else
44478         # Check if the provided tool contains a complete path.
44479         tool_specified="$OBJDUMP"
44480         tool_basename="${tool_specified##*/}"
44481         if test "x$tool_basename" = "x$tool_specified"; then
44482           # A command without a complete path is provided, search $PATH.
44483           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44484 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44485           # Extract the first word of "$tool_basename", so it can be a program name with args.
44486 set dummy $tool_basename; ac_word=$2
44487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44488 $as_echo_n "checking for $ac_word... " >&6; }
44489 if ${ac_cv_path_OBJDUMP+:} false; then :
44490   $as_echo_n "(cached) " >&6
44491 else
44492   case $OBJDUMP in
44493   [\\/]* | ?:[\\/]*)
44494   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44495   ;;
44496   *)
44497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44498 for as_dir in $PATH
44499 do
44500   IFS=$as_save_IFS
44501   test -z "$as_dir" && as_dir=.
44502     for ac_exec_ext in '' $ac_executable_extensions; do
44503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44504     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44506     break 2
44507   fi
44508 done
44509   done
44510 IFS=$as_save_IFS
44511 
44512   ;;
44513 esac
44514 fi
44515 OBJDUMP=$ac_cv_path_OBJDUMP
44516 if test -n "$OBJDUMP"; then
44517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44518 $as_echo "$OBJDUMP" >&6; }
44519 else
44520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44521 $as_echo "no" >&6; }
44522 fi
44523 
44524 
44525           if test "x$OBJDUMP" = x; then
44526             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44527           fi
44528         else
44529           # Otherwise we believe it is a complete path. Use it as it is.
44530           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44531 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44532           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44533 $as_echo_n "checking for OBJDUMP... " >&6; }
44534           if test ! -x "$tool_specified"; then
44535             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44536 $as_echo "not found" >&6; }
44537             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44538           fi
44539           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44540 $as_echo "$tool_specified" >&6; }
44541         fi
44542       fi
44543     fi
44544 
44545   fi
44546 
44547 
44548   if test "x$OBJDUMP" != x; then
44549     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44550     # bails if argument is missing.
44551 
44552   # Only process if variable expands to non-empty
44553 
44554   if test "x$OBJDUMP" != x; then
44555     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44556 
44557   # First separate the path from the arguments. This will split at the first
44558   # space.
44559   complete="$OBJDUMP"
44560   path="${complete%% *}"
44561   tmp="$complete EOL"
44562   arguments="${tmp#* }"
44563 
44564   # Input might be given as Windows format, start by converting to
44565   # unix format.
44566   new_path=`$CYGPATH -u "$path"`
44567 
44568   # Now try to locate executable using which
44569   new_path=`$WHICH "$new_path" 2> /dev/null`
44570   # bat and cmd files are not always considered executable in cygwin causing which
44571   # to not find them
44572   if test "x$new_path" = x \
44573       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44574       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44575     new_path=`$CYGPATH -u "$path"`
44576   fi
44577   if test "x$new_path" = x; then
44578     # Oops. Which didn't find the executable.
44579     # The splitting of arguments from the executable at a space might have been incorrect,
44580     # since paths with space are more likely in Windows. Give it another try with the whole
44581     # argument.
44582     path="$complete"
44583     arguments="EOL"
44584     new_path=`$CYGPATH -u "$path"`
44585     new_path=`$WHICH "$new_path" 2> /dev/null`
44586     # bat and cmd files are not always considered executable in cygwin causing which
44587     # to not find them
44588     if test "x$new_path" = x \
44589         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44590         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44591       new_path=`$CYGPATH -u "$path"`
44592     fi
44593     if test "x$new_path" = x; then
44594       # It's still not found. Now this is an unrecoverable error.
44595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44596 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44597       has_space=`$ECHO "$complete" | $GREP " "`
44598       if test "x$has_space" != x; then
44599         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44600 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44601       fi
44602       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44603     fi
44604   fi
44605 
44606   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44607   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44608   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44609   # "foo.exe" is OK but "foo" is an error.
44610   #
44611   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44612   # It is also a way to make sure we got the proper file name for the real test later on.
44613   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44614   if test "x$test_shortpath" = x; then
44615     # Short path failed, file does not exist as specified.
44616     # Try adding .exe or .cmd
44617     if test -f "${new_path}.exe"; then
44618       input_to_shortpath="${new_path}.exe"
44619     elif test -f "${new_path}.cmd"; then
44620       input_to_shortpath="${new_path}.cmd"
44621     else
44622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44623 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44624       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44625 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44626       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44627     fi
44628   else
44629     input_to_shortpath="$new_path"
44630   fi
44631 
44632   # Call helper function which possibly converts this using DOS-style short mode.
44633   # If so, the updated path is stored in $new_path.
44634   new_path="$input_to_shortpath"
44635 
44636   input_path="$input_to_shortpath"
44637   # Check if we need to convert this using DOS-style short mode. If the path
44638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44639   # take no chances and rewrite it.
44640   # Note: m4 eats our [], so we need to use [ and ] instead.
44641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44642   if test "x$has_forbidden_chars" != x; then
44643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44644     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44645     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44646     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44647       # Going to short mode and back again did indeed matter. Since short mode is
44648       # case insensitive, let's make it lowercase to improve readability.
44649       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44650       # Now convert it back to Unix-style (cygpath)
44651       input_path=`$CYGPATH -u "$shortmode_path"`
44652       new_path="$input_path"
44653     fi
44654   fi
44655 
44656   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44657   if test "x$test_cygdrive_prefix" = x; then
44658     # As a simple fix, exclude /usr/bin since it's not a real path.
44659     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44660       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44661       # a path prefixed by /cygdrive for fixpath to work.
44662       new_path="$CYGWIN_ROOT_PATH$input_path"
44663     fi
44664   fi
44665 
44666   # remove trailing .exe if any
44667   new_path="${new_path/%.exe/}"
44668 
44669     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44670 
44671   # First separate the path from the arguments. This will split at the first
44672   # space.
44673   complete="$OBJDUMP"
44674   path="${complete%% *}"
44675   tmp="$complete EOL"
44676   arguments="${tmp#* }"
44677 
44678   # Input might be given as Windows format, start by converting to
44679   # unix format.
44680   new_path="$path"
44681 
44682   windows_path="$new_path"
44683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44684     unix_path=`$CYGPATH -u "$windows_path"`
44685     new_path="$unix_path"
44686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44688     new_path="$unix_path"
44689   fi
44690 
44691 
44692   # Now try to locate executable using which
44693   new_path=`$WHICH "$new_path" 2> /dev/null`
44694 
44695   if test "x$new_path" = x; then
44696     # Oops. Which didn't find the executable.
44697     # The splitting of arguments from the executable at a space might have been incorrect,
44698     # since paths with space are more likely in Windows. Give it another try with the whole
44699     # argument.
44700     path="$complete"
44701     arguments="EOL"
44702     new_path="$path"
44703 
44704   windows_path="$new_path"
44705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44706     unix_path=`$CYGPATH -u "$windows_path"`
44707     new_path="$unix_path"
44708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44710     new_path="$unix_path"
44711   fi
44712 
44713 
44714     new_path=`$WHICH "$new_path" 2> /dev/null`
44715     # bat and cmd files are not always considered executable in MSYS causing which
44716     # to not find them
44717     if test "x$new_path" = x \
44718         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44719         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44720       new_path="$path"
44721 
44722   windows_path="$new_path"
44723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44724     unix_path=`$CYGPATH -u "$windows_path"`
44725     new_path="$unix_path"
44726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44728     new_path="$unix_path"
44729   fi
44730 
44731     fi
44732 
44733     if test "x$new_path" = x; then
44734       # It's still not found. Now this is an unrecoverable error.
44735       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44736 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44737       has_space=`$ECHO "$complete" | $GREP " "`
44738       if test "x$has_space" != x; then
44739         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44740 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44741       fi
44742       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44743     fi
44744   fi
44745 
44746   # Now new_path has a complete unix path to the binary
44747   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44748     # Keep paths in /bin as-is, but remove trailing .exe if any
44749     new_path="${new_path/%.exe/}"
44750     # Do not save /bin paths to all_fixpath_prefixes!
44751   else
44752     # Not in mixed or Windows style, start by that.
44753     new_path=`cmd //c echo $new_path`
44754 
44755   input_path="$new_path"
44756   # Check if we need to convert this using DOS-style short mode. If the path
44757   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44758   # take no chances and rewrite it.
44759   # Note: m4 eats our [], so we need to use [ and ] instead.
44760   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44761   if test "x$has_forbidden_chars" != x; then
44762     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44763     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44764   fi
44765 
44766     # Output is in $new_path
44767 
44768   windows_path="$new_path"
44769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44770     unix_path=`$CYGPATH -u "$windows_path"`
44771     new_path="$unix_path"
44772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44774     new_path="$unix_path"
44775   fi
44776 
44777     # remove trailing .exe if any
44778     new_path="${new_path/%.exe/}"
44779 
44780     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44781     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44782   fi
44783 
44784     else
44785       # We're on a unix platform. Hooray! :)
44786       # First separate the path from the arguments. This will split at the first
44787       # space.
44788       complete="$OBJDUMP"
44789       path="${complete%% *}"
44790       tmp="$complete EOL"
44791       arguments="${tmp#* }"
44792 
44793       # Cannot rely on the command "which" here since it doesn't always work.
44794       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44795       if test -z "$is_absolute_path"; then
44796         # Path to executable is not absolute. Find it.
44797         IFS_save="$IFS"
44798         IFS=:
44799         for p in $PATH; do
44800           if test -f "$p/$path" && test -x "$p/$path"; then
44801             new_path="$p/$path"
44802             break
44803           fi
44804         done
44805         IFS="$IFS_save"
44806       else
44807         # This is an absolute path, we can use it without further modifications.
44808         new_path="$path"
44809       fi
44810 
44811       if test "x$new_path" = x; then
44812         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44813 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44814         has_space=`$ECHO "$complete" | $GREP " "`
44815         if test "x$has_space" != x; then
44816           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44817 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44818         fi
44819         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44820       fi
44821     fi
44822 
44823     # Now join together the path and the arguments once again
44824     if test "x$arguments" != xEOL; then
44825       new_complete="$new_path ${arguments% *}"
44826     else
44827       new_complete="$new_path"
44828     fi
44829 
44830     if test "x$complete" != "x$new_complete"; then
44831       OBJDUMP="$new_complete"
44832       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44833 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44834     fi
44835   fi
44836 
44837   fi
44838 
44839 
44840   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44841   # to remain in place. Otherwise the compiler will not work in some siutations
44842   # in later configure checks.
44843   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44844     PATH="$OLD_PATH"
44845   fi
44846 
44847   # Restore the flags to the user specified values.
44848   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44849   CFLAGS="$ORG_CFLAGS"
44850   CXXFLAGS="$ORG_CXXFLAGS"
44851 
44852 
44853 # Finally do some processing after the detection phase
44854 
44855   if test "x$COMPILE_TYPE" = "xcross"; then
44856     # Now we need to find a C/C++ compiler that can build executables for the
44857     # build platform. We can't use the AC_PROG_CC macro, since it can only be
44858     # used once. Also, we need to do this without adding a tools dir to the
44859     # path, otherwise we might pick up cross-compilers which don't use standard
44860     # naming.
44861 
44862     OLDPATH="$PATH"
44863 
44864 
44865 # Check whether --with-build-devkit was given.
44866 if test "${with_build_devkit+set}" = set; then :
44867   withval=$with_build_devkit;
44868 fi
44869 
44870     if test "x$with_build_devkit" = "xyes"; then
44871       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44872     elif test -n "$with_build_devkit"; then
44873       if test ! -d "$with_build_devkit"; then
44874         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44875       else
44876 
44877   # Only process if variable expands to non-empty
44878 
44879   if test "x$with_build_devkit" != x; then
44880     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44881 
44882   # Input might be given as Windows format, start by converting to
44883   # unix format.
44884   path="$with_build_devkit"
44885   new_path=`$CYGPATH -u "$path"`
44886 
44887   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44888   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44889   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44890   # "foo.exe" is OK but "foo" is an error.
44891   #
44892   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44893   # It is also a way to make sure we got the proper file name for the real test later on.
44894   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44895   if test "x$test_shortpath" = x; then
44896     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44897 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44898     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44899   fi
44900 
44901   # Call helper function which possibly converts this using DOS-style short mode.
44902   # If so, the updated path is stored in $new_path.
44903 
44904   input_path="$new_path"
44905   # Check if we need to convert this using DOS-style short mode. If the path
44906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44907   # take no chances and rewrite it.
44908   # Note: m4 eats our [], so we need to use [ and ] instead.
44909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44910   if test "x$has_forbidden_chars" != x; then
44911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44912     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44913     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44914     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44915       # Going to short mode and back again did indeed matter. Since short mode is
44916       # case insensitive, let's make it lowercase to improve readability.
44917       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44918       # Now convert it back to Unix-style (cygpath)
44919       input_path=`$CYGPATH -u "$shortmode_path"`
44920       new_path="$input_path"
44921     fi
44922   fi
44923 
44924   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44925   if test "x$test_cygdrive_prefix" = x; then
44926     # As a simple fix, exclude /usr/bin since it's not a real path.
44927     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44928       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44929       # a path prefixed by /cygdrive for fixpath to work.
44930       new_path="$CYGWIN_ROOT_PATH$input_path"
44931     fi
44932   fi
44933 
44934 
44935   if test "x$path" != "x$new_path"; then
44936     with_build_devkit="$new_path"
44937     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44938 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44939   fi
44940 
44941     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44942 
44943   path="$with_build_devkit"
44944   has_colon=`$ECHO $path | $GREP ^.:`
44945   new_path="$path"
44946   if test "x$has_colon" = x; then
44947     # Not in mixed or Windows style, start by that.
44948     new_path=`cmd //c echo $path`
44949   fi
44950 
44951 
44952   input_path="$new_path"
44953   # Check if we need to convert this using DOS-style short mode. If the path
44954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44955   # take no chances and rewrite it.
44956   # Note: m4 eats our [], so we need to use [ and ] instead.
44957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44958   if test "x$has_forbidden_chars" != x; then
44959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44960     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44961   fi
44962 
44963 
44964   windows_path="$new_path"
44965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44966     unix_path=`$CYGPATH -u "$windows_path"`
44967     new_path="$unix_path"
44968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44970     new_path="$unix_path"
44971   fi
44972 
44973   if test "x$path" != "x$new_path"; then
44974     with_build_devkit="$new_path"
44975     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44976 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44977   fi
44978 
44979   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44980   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44981 
44982     else
44983       # We're on a unix platform. Hooray! :)
44984       path="$with_build_devkit"
44985       has_space=`$ECHO "$path" | $GREP " "`
44986       if test "x$has_space" != x; then
44987         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44988 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44989         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44990       fi
44991 
44992       # Use eval to expand a potential ~
44993       eval path="$path"
44994       if test ! -f "$path" && test ! -d "$path"; then
44995         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44996       fi
44997 
44998       if test -d "$path"; then
44999         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
45000       else
45001         dir="`$DIRNAME "$path"`"
45002         base="`$BASENAME "$path"`"
45003         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
45004       fi
45005     fi
45006   fi
45007 
45008         BUILD_DEVKIT_ROOT="$with_build_devkit"
45009         # Check for a meta data info file in the root of the devkit
45010         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
45011           # Process devkit.info so that existing devkit variables are not
45012           # modified by this
45013           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
45014               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
45015               -e "s/\$host/\$build/g" \
45016               $BUILD_DEVKIT_ROOT/devkit.info \
45017               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45018           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45019           # This potentially sets the following:
45020           # A descriptive name of the devkit
45021 
45022   if test "x$BUILD_DEVKIT_NAME" = x; then
45023     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
45024   fi
45025 
45026           # Corresponds to --with-extra-path
45027 
45028   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
45029     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
45030   fi
45031 
45032           # Corresponds to --with-toolchain-path
45033 
45034   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45035     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
45036   fi
45037 
45038           # Corresponds to --with-sysroot
45039 
45040   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
45041     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
45042   fi
45043 
45044           # Skip the Window specific parts
45045         fi
45046 
45047         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
45048 $as_echo_n "checking for build platform devkit... " >&6; }
45049         if test "x$BUILD_DEVKIT_NAME" != x; then
45050           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
45051 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
45052         else
45053           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
45054 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
45055         fi
45056 
45057         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
45058 
45059   if test "x$BUILD_SYSROOT" != "x"; then
45060     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45061       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45062         # Solaris Studio does not have a concept of sysroot. Instead we must
45063         # make sure the default include and lib dirs are appended to each
45064         # compile and link command line. Must also add -I-xbuiltin to enable
45065         # inlining of system functions and intrinsics.
45066         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
45067         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
45068             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
45069       fi
45070     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45071       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
45072       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
45073     elif test "x$TOOLCHAIN_TYPE" = xclang; then
45074       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
45075       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
45076     fi
45077     # The global CFLAGS and LDFLAGS variables need these for configure to function
45078     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
45079     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
45080     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
45081     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
45082   fi
45083 
45084   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45085     # We also need -iframework<path>/System/Library/Frameworks
45086     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45087     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45088     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
45089     # set this here so it doesn't have to be peppered throughout the forest
45090     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45091     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45092   fi
45093 
45094 
45095 
45096 
45097 
45098          # Fallback default of just /bin if DEVKIT_PATH is not defined
45099         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45100           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
45101         fi
45102         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
45103       fi
45104     fi
45105 
45106     # FIXME: we should list the discovered compilers as an exclude pattern!
45107     # If we do that, we can do this detection before POST_DETECTION, and still
45108     # find the build compilers in the tools dir, if needed.
45109 
45110 
45111 
45112   # Publish this variable in the help.
45113 
45114 
45115   if [ -z "${BUILD_CC+x}" ]; then
45116     # The variable is not set by user, try to locate tool using the code snippet
45117     for ac_prog in cl cc gcc
45118 do
45119   # Extract the first word of "$ac_prog", so it can be a program name with args.
45120 set dummy $ac_prog; ac_word=$2
45121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45122 $as_echo_n "checking for $ac_word... " >&6; }
45123 if ${ac_cv_path_BUILD_CC+:} false; then :
45124   $as_echo_n "(cached) " >&6
45125 else
45126   case $BUILD_CC in
45127   [\\/]* | ?:[\\/]*)
45128   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45129   ;;
45130   *)
45131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45132 for as_dir in $PATH
45133 do
45134   IFS=$as_save_IFS
45135   test -z "$as_dir" && as_dir=.
45136     for ac_exec_ext in '' $ac_executable_extensions; do
45137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45138     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45140     break 2
45141   fi
45142 done
45143   done
45144 IFS=$as_save_IFS
45145 
45146   ;;
45147 esac
45148 fi
45149 BUILD_CC=$ac_cv_path_BUILD_CC
45150 if test -n "$BUILD_CC"; then
45151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45152 $as_echo "$BUILD_CC" >&6; }
45153 else
45154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45155 $as_echo "no" >&6; }
45156 fi
45157 
45158 
45159   test -n "$BUILD_CC" && break
45160 done
45161 
45162   else
45163     # The variable is set, but is it from the command line or the environment?
45164 
45165     # Try to remove the string !BUILD_CC! from our list.
45166     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45167     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45168       # If it failed, the variable was not from the command line. Ignore it,
45169       # but warn the user (except for BASH, which is always set by the calling BASH).
45170       if test "xBUILD_CC" != xBASH; then
45171         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45172 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45173       fi
45174       # Try to locate tool using the code snippet
45175       for ac_prog in cl cc gcc
45176 do
45177   # Extract the first word of "$ac_prog", so it can be a program name with args.
45178 set dummy $ac_prog; ac_word=$2
45179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45180 $as_echo_n "checking for $ac_word... " >&6; }
45181 if ${ac_cv_path_BUILD_CC+:} false; then :
45182   $as_echo_n "(cached) " >&6
45183 else
45184   case $BUILD_CC in
45185   [\\/]* | ?:[\\/]*)
45186   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45187   ;;
45188   *)
45189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45190 for as_dir in $PATH
45191 do
45192   IFS=$as_save_IFS
45193   test -z "$as_dir" && as_dir=.
45194     for ac_exec_ext in '' $ac_executable_extensions; do
45195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45196     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45198     break 2
45199   fi
45200 done
45201   done
45202 IFS=$as_save_IFS
45203 
45204   ;;
45205 esac
45206 fi
45207 BUILD_CC=$ac_cv_path_BUILD_CC
45208 if test -n "$BUILD_CC"; then
45209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45210 $as_echo "$BUILD_CC" >&6; }
45211 else
45212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45213 $as_echo "no" >&6; }
45214 fi
45215 
45216 
45217   test -n "$BUILD_CC" && break
45218 done
45219 
45220     else
45221       # If it succeeded, then it was overridden by the user. We will use it
45222       # for the tool.
45223 
45224       # First remove it from the list of overridden variables, so we can test
45225       # for unknown variables in the end.
45226       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45227 
45228       # Check if we try to supply an empty value
45229       if test "x$BUILD_CC" = x; then
45230         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45231 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45233 $as_echo_n "checking for BUILD_CC... " >&6; }
45234         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45235 $as_echo "disabled" >&6; }
45236       else
45237         # Check if the provided tool contains a complete path.
45238         tool_specified="$BUILD_CC"
45239         tool_basename="${tool_specified##*/}"
45240         if test "x$tool_basename" = "x$tool_specified"; then
45241           # A command without a complete path is provided, search $PATH.
45242           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45243 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45244           # Extract the first word of "$tool_basename", so it can be a program name with args.
45245 set dummy $tool_basename; ac_word=$2
45246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45247 $as_echo_n "checking for $ac_word... " >&6; }
45248 if ${ac_cv_path_BUILD_CC+:} false; then :
45249   $as_echo_n "(cached) " >&6
45250 else
45251   case $BUILD_CC in
45252   [\\/]* | ?:[\\/]*)
45253   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45254   ;;
45255   *)
45256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45257 for as_dir in $PATH
45258 do
45259   IFS=$as_save_IFS
45260   test -z "$as_dir" && as_dir=.
45261     for ac_exec_ext in '' $ac_executable_extensions; do
45262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45263     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45265     break 2
45266   fi
45267 done
45268   done
45269 IFS=$as_save_IFS
45270 
45271   ;;
45272 esac
45273 fi
45274 BUILD_CC=$ac_cv_path_BUILD_CC
45275 if test -n "$BUILD_CC"; then
45276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45277 $as_echo "$BUILD_CC" >&6; }
45278 else
45279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45280 $as_echo "no" >&6; }
45281 fi
45282 
45283 
45284           if test "x$BUILD_CC" = x; then
45285             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45286           fi
45287         else
45288           # Otherwise we believe it is a complete path. Use it as it is.
45289           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45290 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45291           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45292 $as_echo_n "checking for BUILD_CC... " >&6; }
45293           if test ! -x "$tool_specified"; then
45294             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45295 $as_echo "not found" >&6; }
45296             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45297           fi
45298           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45299 $as_echo "$tool_specified" >&6; }
45300         fi
45301       fi
45302     fi
45303 
45304   fi
45305 
45306 
45307 
45308   if test "x$BUILD_CC" = x; then
45309     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45310   fi
45311 
45312 
45313 
45314   # Only process if variable expands to non-empty
45315 
45316   if test "x$BUILD_CC" != x; then
45317     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45318 
45319   # First separate the path from the arguments. This will split at the first
45320   # space.
45321   complete="$BUILD_CC"
45322   path="${complete%% *}"
45323   tmp="$complete EOL"
45324   arguments="${tmp#* }"
45325 
45326   # Input might be given as Windows format, start by converting to
45327   # unix format.
45328   new_path=`$CYGPATH -u "$path"`
45329 
45330   # Now try to locate executable using which
45331   new_path=`$WHICH "$new_path" 2> /dev/null`
45332   # bat and cmd files are not always considered executable in cygwin causing which
45333   # to not find them
45334   if test "x$new_path" = x \
45335       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45336       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45337     new_path=`$CYGPATH -u "$path"`
45338   fi
45339   if test "x$new_path" = x; then
45340     # Oops. Which didn't find the executable.
45341     # The splitting of arguments from the executable at a space might have been incorrect,
45342     # since paths with space are more likely in Windows. Give it another try with the whole
45343     # argument.
45344     path="$complete"
45345     arguments="EOL"
45346     new_path=`$CYGPATH -u "$path"`
45347     new_path=`$WHICH "$new_path" 2> /dev/null`
45348     # bat and cmd files are not always considered executable in cygwin causing which
45349     # to not find them
45350     if test "x$new_path" = x \
45351         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45352         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45353       new_path=`$CYGPATH -u "$path"`
45354     fi
45355     if test "x$new_path" = x; then
45356       # It's still not found. Now this is an unrecoverable error.
45357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45358 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45359       has_space=`$ECHO "$complete" | $GREP " "`
45360       if test "x$has_space" != x; then
45361         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45363       fi
45364       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45365     fi
45366   fi
45367 
45368   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45369   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45370   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45371   # "foo.exe" is OK but "foo" is an error.
45372   #
45373   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45374   # It is also a way to make sure we got the proper file name for the real test later on.
45375   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45376   if test "x$test_shortpath" = x; then
45377     # Short path failed, file does not exist as specified.
45378     # Try adding .exe or .cmd
45379     if test -f "${new_path}.exe"; then
45380       input_to_shortpath="${new_path}.exe"
45381     elif test -f "${new_path}.cmd"; then
45382       input_to_shortpath="${new_path}.cmd"
45383     else
45384       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45385 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45386       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45387 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45388       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45389     fi
45390   else
45391     input_to_shortpath="$new_path"
45392   fi
45393 
45394   # Call helper function which possibly converts this using DOS-style short mode.
45395   # If so, the updated path is stored in $new_path.
45396   new_path="$input_to_shortpath"
45397 
45398   input_path="$input_to_shortpath"
45399   # Check if we need to convert this using DOS-style short mode. If the path
45400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45401   # take no chances and rewrite it.
45402   # Note: m4 eats our [], so we need to use [ and ] instead.
45403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45404   if test "x$has_forbidden_chars" != x; then
45405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45406     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45407     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45408     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45409       # Going to short mode and back again did indeed matter. Since short mode is
45410       # case insensitive, let's make it lowercase to improve readability.
45411       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45412       # Now convert it back to Unix-style (cygpath)
45413       input_path=`$CYGPATH -u "$shortmode_path"`
45414       new_path="$input_path"
45415     fi
45416   fi
45417 
45418   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45419   if test "x$test_cygdrive_prefix" = x; then
45420     # As a simple fix, exclude /usr/bin since it's not a real path.
45421     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45422       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45423       # a path prefixed by /cygdrive for fixpath to work.
45424       new_path="$CYGWIN_ROOT_PATH$input_path"
45425     fi
45426   fi
45427 
45428   # remove trailing .exe if any
45429   new_path="${new_path/%.exe/}"
45430 
45431     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45432 
45433   # First separate the path from the arguments. This will split at the first
45434   # space.
45435   complete="$BUILD_CC"
45436   path="${complete%% *}"
45437   tmp="$complete EOL"
45438   arguments="${tmp#* }"
45439 
45440   # Input might be given as Windows format, start by converting to
45441   # unix format.
45442   new_path="$path"
45443 
45444   windows_path="$new_path"
45445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45446     unix_path=`$CYGPATH -u "$windows_path"`
45447     new_path="$unix_path"
45448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45450     new_path="$unix_path"
45451   fi
45452 
45453 
45454   # Now try to locate executable using which
45455   new_path=`$WHICH "$new_path" 2> /dev/null`
45456 
45457   if test "x$new_path" = x; then
45458     # Oops. Which didn't find the executable.
45459     # The splitting of arguments from the executable at a space might have been incorrect,
45460     # since paths with space are more likely in Windows. Give it another try with the whole
45461     # argument.
45462     path="$complete"
45463     arguments="EOL"
45464     new_path="$path"
45465 
45466   windows_path="$new_path"
45467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45468     unix_path=`$CYGPATH -u "$windows_path"`
45469     new_path="$unix_path"
45470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45472     new_path="$unix_path"
45473   fi
45474 
45475 
45476     new_path=`$WHICH "$new_path" 2> /dev/null`
45477     # bat and cmd files are not always considered executable in MSYS causing which
45478     # to not find them
45479     if test "x$new_path" = x \
45480         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45481         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45482       new_path="$path"
45483 
45484   windows_path="$new_path"
45485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45486     unix_path=`$CYGPATH -u "$windows_path"`
45487     new_path="$unix_path"
45488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45490     new_path="$unix_path"
45491   fi
45492 
45493     fi
45494 
45495     if test "x$new_path" = x; then
45496       # It's still not found. Now this is an unrecoverable error.
45497       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45498 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45499       has_space=`$ECHO "$complete" | $GREP " "`
45500       if test "x$has_space" != x; then
45501         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45502 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45503       fi
45504       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45505     fi
45506   fi
45507 
45508   # Now new_path has a complete unix path to the binary
45509   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45510     # Keep paths in /bin as-is, but remove trailing .exe if any
45511     new_path="${new_path/%.exe/}"
45512     # Do not save /bin paths to all_fixpath_prefixes!
45513   else
45514     # Not in mixed or Windows style, start by that.
45515     new_path=`cmd //c echo $new_path`
45516 
45517   input_path="$new_path"
45518   # Check if we need to convert this using DOS-style short mode. If the path
45519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45520   # take no chances and rewrite it.
45521   # Note: m4 eats our [], so we need to use [ and ] instead.
45522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45523   if test "x$has_forbidden_chars" != x; then
45524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45525     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45526   fi
45527 
45528     # Output is in $new_path
45529 
45530   windows_path="$new_path"
45531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45532     unix_path=`$CYGPATH -u "$windows_path"`
45533     new_path="$unix_path"
45534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45536     new_path="$unix_path"
45537   fi
45538 
45539     # remove trailing .exe if any
45540     new_path="${new_path/%.exe/}"
45541 
45542     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45543     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45544   fi
45545 
45546     else
45547       # We're on a unix platform. Hooray! :)
45548       # First separate the path from the arguments. This will split at the first
45549       # space.
45550       complete="$BUILD_CC"
45551       path="${complete%% *}"
45552       tmp="$complete EOL"
45553       arguments="${tmp#* }"
45554 
45555       # Cannot rely on the command "which" here since it doesn't always work.
45556       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45557       if test -z "$is_absolute_path"; then
45558         # Path to executable is not absolute. Find it.
45559         IFS_save="$IFS"
45560         IFS=:
45561         for p in $PATH; do
45562           if test -f "$p/$path" && test -x "$p/$path"; then
45563             new_path="$p/$path"
45564             break
45565           fi
45566         done
45567         IFS="$IFS_save"
45568       else
45569         # This is an absolute path, we can use it without further modifications.
45570         new_path="$path"
45571       fi
45572 
45573       if test "x$new_path" = x; then
45574         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45575 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45576         has_space=`$ECHO "$complete" | $GREP " "`
45577         if test "x$has_space" != x; then
45578           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45579 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45580         fi
45581         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45582       fi
45583     fi
45584 
45585     # Now join together the path and the arguments once again
45586     if test "x$arguments" != xEOL; then
45587       new_complete="$new_path ${arguments% *}"
45588     else
45589       new_complete="$new_path"
45590     fi
45591 
45592     if test "x$complete" != "x$new_complete"; then
45593       BUILD_CC="$new_complete"
45594       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45595 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45596     fi
45597   fi
45598 
45599 
45600 
45601 
45602   # Publish this variable in the help.
45603 
45604 
45605   if [ -z "${BUILD_CXX+x}" ]; then
45606     # The variable is not set by user, try to locate tool using the code snippet
45607     for ac_prog in cl CC g++
45608 do
45609   # Extract the first word of "$ac_prog", so it can be a program name with args.
45610 set dummy $ac_prog; ac_word=$2
45611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45612 $as_echo_n "checking for $ac_word... " >&6; }
45613 if ${ac_cv_path_BUILD_CXX+:} false; then :
45614   $as_echo_n "(cached) " >&6
45615 else
45616   case $BUILD_CXX in
45617   [\\/]* | ?:[\\/]*)
45618   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45619   ;;
45620   *)
45621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45622 for as_dir in $PATH
45623 do
45624   IFS=$as_save_IFS
45625   test -z "$as_dir" && as_dir=.
45626     for ac_exec_ext in '' $ac_executable_extensions; do
45627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45628     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45630     break 2
45631   fi
45632 done
45633   done
45634 IFS=$as_save_IFS
45635 
45636   ;;
45637 esac
45638 fi
45639 BUILD_CXX=$ac_cv_path_BUILD_CXX
45640 if test -n "$BUILD_CXX"; then
45641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45642 $as_echo "$BUILD_CXX" >&6; }
45643 else
45644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45645 $as_echo "no" >&6; }
45646 fi
45647 
45648 
45649   test -n "$BUILD_CXX" && break
45650 done
45651 
45652   else
45653     # The variable is set, but is it from the command line or the environment?
45654 
45655     # Try to remove the string !BUILD_CXX! from our list.
45656     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45657     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45658       # If it failed, the variable was not from the command line. Ignore it,
45659       # but warn the user (except for BASH, which is always set by the calling BASH).
45660       if test "xBUILD_CXX" != xBASH; then
45661         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45662 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45663       fi
45664       # Try to locate tool using the code snippet
45665       for ac_prog in cl CC g++
45666 do
45667   # Extract the first word of "$ac_prog", so it can be a program name with args.
45668 set dummy $ac_prog; ac_word=$2
45669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45670 $as_echo_n "checking for $ac_word... " >&6; }
45671 if ${ac_cv_path_BUILD_CXX+:} false; then :
45672   $as_echo_n "(cached) " >&6
45673 else
45674   case $BUILD_CXX in
45675   [\\/]* | ?:[\\/]*)
45676   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45677   ;;
45678   *)
45679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45680 for as_dir in $PATH
45681 do
45682   IFS=$as_save_IFS
45683   test -z "$as_dir" && as_dir=.
45684     for ac_exec_ext in '' $ac_executable_extensions; do
45685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45686     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45688     break 2
45689   fi
45690 done
45691   done
45692 IFS=$as_save_IFS
45693 
45694   ;;
45695 esac
45696 fi
45697 BUILD_CXX=$ac_cv_path_BUILD_CXX
45698 if test -n "$BUILD_CXX"; then
45699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45700 $as_echo "$BUILD_CXX" >&6; }
45701 else
45702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45703 $as_echo "no" >&6; }
45704 fi
45705 
45706 
45707   test -n "$BUILD_CXX" && break
45708 done
45709 
45710     else
45711       # If it succeeded, then it was overridden by the user. We will use it
45712       # for the tool.
45713 
45714       # First remove it from the list of overridden variables, so we can test
45715       # for unknown variables in the end.
45716       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45717 
45718       # Check if we try to supply an empty value
45719       if test "x$BUILD_CXX" = x; then
45720         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45721 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45722         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45723 $as_echo_n "checking for BUILD_CXX... " >&6; }
45724         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45725 $as_echo "disabled" >&6; }
45726       else
45727         # Check if the provided tool contains a complete path.
45728         tool_specified="$BUILD_CXX"
45729         tool_basename="${tool_specified##*/}"
45730         if test "x$tool_basename" = "x$tool_specified"; then
45731           # A command without a complete path is provided, search $PATH.
45732           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45733 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45734           # Extract the first word of "$tool_basename", so it can be a program name with args.
45735 set dummy $tool_basename; ac_word=$2
45736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45737 $as_echo_n "checking for $ac_word... " >&6; }
45738 if ${ac_cv_path_BUILD_CXX+:} false; then :
45739   $as_echo_n "(cached) " >&6
45740 else
45741   case $BUILD_CXX in
45742   [\\/]* | ?:[\\/]*)
45743   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45744   ;;
45745   *)
45746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45747 for as_dir in $PATH
45748 do
45749   IFS=$as_save_IFS
45750   test -z "$as_dir" && as_dir=.
45751     for ac_exec_ext in '' $ac_executable_extensions; do
45752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45753     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45755     break 2
45756   fi
45757 done
45758   done
45759 IFS=$as_save_IFS
45760 
45761   ;;
45762 esac
45763 fi
45764 BUILD_CXX=$ac_cv_path_BUILD_CXX
45765 if test -n "$BUILD_CXX"; then
45766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45767 $as_echo "$BUILD_CXX" >&6; }
45768 else
45769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45770 $as_echo "no" >&6; }
45771 fi
45772 
45773 
45774           if test "x$BUILD_CXX" = x; then
45775             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45776           fi
45777         else
45778           # Otherwise we believe it is a complete path. Use it as it is.
45779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45780 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45781           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45782 $as_echo_n "checking for BUILD_CXX... " >&6; }
45783           if test ! -x "$tool_specified"; then
45784             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45785 $as_echo "not found" >&6; }
45786             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45787           fi
45788           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45789 $as_echo "$tool_specified" >&6; }
45790         fi
45791       fi
45792     fi
45793 
45794   fi
45795 
45796 
45797 
45798   if test "x$BUILD_CXX" = x; then
45799     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45800   fi
45801 
45802 
45803 
45804   # Only process if variable expands to non-empty
45805 
45806   if test "x$BUILD_CXX" != x; then
45807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45808 
45809   # First separate the path from the arguments. This will split at the first
45810   # space.
45811   complete="$BUILD_CXX"
45812   path="${complete%% *}"
45813   tmp="$complete EOL"
45814   arguments="${tmp#* }"
45815 
45816   # Input might be given as Windows format, start by converting to
45817   # unix format.
45818   new_path=`$CYGPATH -u "$path"`
45819 
45820   # Now try to locate executable using which
45821   new_path=`$WHICH "$new_path" 2> /dev/null`
45822   # bat and cmd files are not always considered executable in cygwin causing which
45823   # to not find them
45824   if test "x$new_path" = x \
45825       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45826       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45827     new_path=`$CYGPATH -u "$path"`
45828   fi
45829   if test "x$new_path" = x; then
45830     # Oops. Which didn't find the executable.
45831     # The splitting of arguments from the executable at a space might have been incorrect,
45832     # since paths with space are more likely in Windows. Give it another try with the whole
45833     # argument.
45834     path="$complete"
45835     arguments="EOL"
45836     new_path=`$CYGPATH -u "$path"`
45837     new_path=`$WHICH "$new_path" 2> /dev/null`
45838     # bat and cmd files are not always considered executable in cygwin causing which
45839     # to not find them
45840     if test "x$new_path" = x \
45841         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45842         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45843       new_path=`$CYGPATH -u "$path"`
45844     fi
45845     if test "x$new_path" = x; then
45846       # It's still not found. Now this is an unrecoverable error.
45847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45848 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45849       has_space=`$ECHO "$complete" | $GREP " "`
45850       if test "x$has_space" != x; then
45851         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45852 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45853       fi
45854       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45855     fi
45856   fi
45857 
45858   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45859   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45860   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45861   # "foo.exe" is OK but "foo" is an error.
45862   #
45863   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45864   # It is also a way to make sure we got the proper file name for the real test later on.
45865   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45866   if test "x$test_shortpath" = x; then
45867     # Short path failed, file does not exist as specified.
45868     # Try adding .exe or .cmd
45869     if test -f "${new_path}.exe"; then
45870       input_to_shortpath="${new_path}.exe"
45871     elif test -f "${new_path}.cmd"; then
45872       input_to_shortpath="${new_path}.cmd"
45873     else
45874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45875 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45876       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45877 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45878       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45879     fi
45880   else
45881     input_to_shortpath="$new_path"
45882   fi
45883 
45884   # Call helper function which possibly converts this using DOS-style short mode.
45885   # If so, the updated path is stored in $new_path.
45886   new_path="$input_to_shortpath"
45887 
45888   input_path="$input_to_shortpath"
45889   # Check if we need to convert this using DOS-style short mode. If the path
45890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45891   # take no chances and rewrite it.
45892   # Note: m4 eats our [], so we need to use [ and ] instead.
45893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45894   if test "x$has_forbidden_chars" != x; then
45895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45896     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45897     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45898     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45899       # Going to short mode and back again did indeed matter. Since short mode is
45900       # case insensitive, let's make it lowercase to improve readability.
45901       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45902       # Now convert it back to Unix-style (cygpath)
45903       input_path=`$CYGPATH -u "$shortmode_path"`
45904       new_path="$input_path"
45905     fi
45906   fi
45907 
45908   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45909   if test "x$test_cygdrive_prefix" = x; then
45910     # As a simple fix, exclude /usr/bin since it's not a real path.
45911     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45912       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45913       # a path prefixed by /cygdrive for fixpath to work.
45914       new_path="$CYGWIN_ROOT_PATH$input_path"
45915     fi
45916   fi
45917 
45918   # remove trailing .exe if any
45919   new_path="${new_path/%.exe/}"
45920 
45921     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45922 
45923   # First separate the path from the arguments. This will split at the first
45924   # space.
45925   complete="$BUILD_CXX"
45926   path="${complete%% *}"
45927   tmp="$complete EOL"
45928   arguments="${tmp#* }"
45929 
45930   # Input might be given as Windows format, start by converting to
45931   # unix format.
45932   new_path="$path"
45933 
45934   windows_path="$new_path"
45935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45936     unix_path=`$CYGPATH -u "$windows_path"`
45937     new_path="$unix_path"
45938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45940     new_path="$unix_path"
45941   fi
45942 
45943 
45944   # Now try to locate executable using which
45945   new_path=`$WHICH "$new_path" 2> /dev/null`
45946 
45947   if test "x$new_path" = x; then
45948     # Oops. Which didn't find the executable.
45949     # The splitting of arguments from the executable at a space might have been incorrect,
45950     # since paths with space are more likely in Windows. Give it another try with the whole
45951     # argument.
45952     path="$complete"
45953     arguments="EOL"
45954     new_path="$path"
45955 
45956   windows_path="$new_path"
45957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45958     unix_path=`$CYGPATH -u "$windows_path"`
45959     new_path="$unix_path"
45960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45962     new_path="$unix_path"
45963   fi
45964 
45965 
45966     new_path=`$WHICH "$new_path" 2> /dev/null`
45967     # bat and cmd files are not always considered executable in MSYS causing which
45968     # to not find them
45969     if test "x$new_path" = x \
45970         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45971         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45972       new_path="$path"
45973 
45974   windows_path="$new_path"
45975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45976     unix_path=`$CYGPATH -u "$windows_path"`
45977     new_path="$unix_path"
45978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45980     new_path="$unix_path"
45981   fi
45982 
45983     fi
45984 
45985     if test "x$new_path" = x; then
45986       # It's still not found. Now this is an unrecoverable error.
45987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45988 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45989       has_space=`$ECHO "$complete" | $GREP " "`
45990       if test "x$has_space" != x; then
45991         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45992 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45993       fi
45994       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45995     fi
45996   fi
45997 
45998   # Now new_path has a complete unix path to the binary
45999   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46000     # Keep paths in /bin as-is, but remove trailing .exe if any
46001     new_path="${new_path/%.exe/}"
46002     # Do not save /bin paths to all_fixpath_prefixes!
46003   else
46004     # Not in mixed or Windows style, start by that.
46005     new_path=`cmd //c echo $new_path`
46006 
46007   input_path="$new_path"
46008   # Check if we need to convert this using DOS-style short mode. If the path
46009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46010   # take no chances and rewrite it.
46011   # Note: m4 eats our [], so we need to use [ and ] instead.
46012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46013   if test "x$has_forbidden_chars" != x; then
46014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46016   fi
46017 
46018     # Output is in $new_path
46019 
46020   windows_path="$new_path"
46021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46022     unix_path=`$CYGPATH -u "$windows_path"`
46023     new_path="$unix_path"
46024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46026     new_path="$unix_path"
46027   fi
46028 
46029     # remove trailing .exe if any
46030     new_path="${new_path/%.exe/}"
46031 
46032     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46033     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46034   fi
46035 
46036     else
46037       # We're on a unix platform. Hooray! :)
46038       # First separate the path from the arguments. This will split at the first
46039       # space.
46040       complete="$BUILD_CXX"
46041       path="${complete%% *}"
46042       tmp="$complete EOL"
46043       arguments="${tmp#* }"
46044 
46045       # Cannot rely on the command "which" here since it doesn't always work.
46046       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46047       if test -z "$is_absolute_path"; then
46048         # Path to executable is not absolute. Find it.
46049         IFS_save="$IFS"
46050         IFS=:
46051         for p in $PATH; do
46052           if test -f "$p/$path" && test -x "$p/$path"; then
46053             new_path="$p/$path"
46054             break
46055           fi
46056         done
46057         IFS="$IFS_save"
46058       else
46059         # This is an absolute path, we can use it without further modifications.
46060         new_path="$path"
46061       fi
46062 
46063       if test "x$new_path" = x; then
46064         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46065 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46066         has_space=`$ECHO "$complete" | $GREP " "`
46067         if test "x$has_space" != x; then
46068           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46069 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46070         fi
46071         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46072       fi
46073     fi
46074 
46075     # Now join together the path and the arguments once again
46076     if test "x$arguments" != xEOL; then
46077       new_complete="$new_path ${arguments% *}"
46078     else
46079       new_complete="$new_path"
46080     fi
46081 
46082     if test "x$complete" != "x$new_complete"; then
46083       BUILD_CXX="$new_complete"
46084       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
46085 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
46086     fi
46087   fi
46088 
46089 
46090 
46091   # Publish this variable in the help.
46092 
46093 
46094   if [ -z "${BUILD_NM+x}" ]; then
46095     # The variable is not set by user, try to locate tool using the code snippet
46096     for ac_prog in nm gcc-nm
46097 do
46098   # Extract the first word of "$ac_prog", so it can be a program name with args.
46099 set dummy $ac_prog; ac_word=$2
46100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46101 $as_echo_n "checking for $ac_word... " >&6; }
46102 if ${ac_cv_path_BUILD_NM+:} false; then :
46103   $as_echo_n "(cached) " >&6
46104 else
46105   case $BUILD_NM in
46106   [\\/]* | ?:[\\/]*)
46107   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46108   ;;
46109   *)
46110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46111 for as_dir in $PATH
46112 do
46113   IFS=$as_save_IFS
46114   test -z "$as_dir" && as_dir=.
46115     for ac_exec_ext in '' $ac_executable_extensions; do
46116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46117     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46119     break 2
46120   fi
46121 done
46122   done
46123 IFS=$as_save_IFS
46124 
46125   ;;
46126 esac
46127 fi
46128 BUILD_NM=$ac_cv_path_BUILD_NM
46129 if test -n "$BUILD_NM"; then
46130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46131 $as_echo "$BUILD_NM" >&6; }
46132 else
46133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46134 $as_echo "no" >&6; }
46135 fi
46136 
46137 
46138   test -n "$BUILD_NM" && break
46139 done
46140 
46141   else
46142     # The variable is set, but is it from the command line or the environment?
46143 
46144     # Try to remove the string !BUILD_NM! from our list.
46145     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46146     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46147       # If it failed, the variable was not from the command line. Ignore it,
46148       # but warn the user (except for BASH, which is always set by the calling BASH).
46149       if test "xBUILD_NM" != xBASH; then
46150         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46151 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46152       fi
46153       # Try to locate tool using the code snippet
46154       for ac_prog in nm gcc-nm
46155 do
46156   # Extract the first word of "$ac_prog", so it can be a program name with args.
46157 set dummy $ac_prog; ac_word=$2
46158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46159 $as_echo_n "checking for $ac_word... " >&6; }
46160 if ${ac_cv_path_BUILD_NM+:} false; then :
46161   $as_echo_n "(cached) " >&6
46162 else
46163   case $BUILD_NM in
46164   [\\/]* | ?:[\\/]*)
46165   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46166   ;;
46167   *)
46168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46169 for as_dir in $PATH
46170 do
46171   IFS=$as_save_IFS
46172   test -z "$as_dir" && as_dir=.
46173     for ac_exec_ext in '' $ac_executable_extensions; do
46174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46175     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46177     break 2
46178   fi
46179 done
46180   done
46181 IFS=$as_save_IFS
46182 
46183   ;;
46184 esac
46185 fi
46186 BUILD_NM=$ac_cv_path_BUILD_NM
46187 if test -n "$BUILD_NM"; then
46188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46189 $as_echo "$BUILD_NM" >&6; }
46190 else
46191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46192 $as_echo "no" >&6; }
46193 fi
46194 
46195 
46196   test -n "$BUILD_NM" && break
46197 done
46198 
46199     else
46200       # If it succeeded, then it was overridden by the user. We will use it
46201       # for the tool.
46202 
46203       # First remove it from the list of overridden variables, so we can test
46204       # for unknown variables in the end.
46205       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46206 
46207       # Check if we try to supply an empty value
46208       if test "x$BUILD_NM" = x; then
46209         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46210 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46211         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46212 $as_echo_n "checking for BUILD_NM... " >&6; }
46213         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46214 $as_echo "disabled" >&6; }
46215       else
46216         # Check if the provided tool contains a complete path.
46217         tool_specified="$BUILD_NM"
46218         tool_basename="${tool_specified##*/}"
46219         if test "x$tool_basename" = "x$tool_specified"; then
46220           # A command without a complete path is provided, search $PATH.
46221           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46222 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46223           # Extract the first word of "$tool_basename", so it can be a program name with args.
46224 set dummy $tool_basename; ac_word=$2
46225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46226 $as_echo_n "checking for $ac_word... " >&6; }
46227 if ${ac_cv_path_BUILD_NM+:} false; then :
46228   $as_echo_n "(cached) " >&6
46229 else
46230   case $BUILD_NM in
46231   [\\/]* | ?:[\\/]*)
46232   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46233   ;;
46234   *)
46235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46236 for as_dir in $PATH
46237 do
46238   IFS=$as_save_IFS
46239   test -z "$as_dir" && as_dir=.
46240     for ac_exec_ext in '' $ac_executable_extensions; do
46241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46242     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46244     break 2
46245   fi
46246 done
46247   done
46248 IFS=$as_save_IFS
46249 
46250   ;;
46251 esac
46252 fi
46253 BUILD_NM=$ac_cv_path_BUILD_NM
46254 if test -n "$BUILD_NM"; then
46255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46256 $as_echo "$BUILD_NM" >&6; }
46257 else
46258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46259 $as_echo "no" >&6; }
46260 fi
46261 
46262 
46263           if test "x$BUILD_NM" = x; then
46264             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46265           fi
46266         else
46267           # Otherwise we believe it is a complete path. Use it as it is.
46268           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46269 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46270           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46271 $as_echo_n "checking for BUILD_NM... " >&6; }
46272           if test ! -x "$tool_specified"; then
46273             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46274 $as_echo "not found" >&6; }
46275             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46276           fi
46277           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46278 $as_echo "$tool_specified" >&6; }
46279         fi
46280       fi
46281     fi
46282 
46283   fi
46284 
46285 
46286 
46287   # Only process if variable expands to non-empty
46288 
46289   if test "x$BUILD_NM" != x; then
46290     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46291 
46292   # First separate the path from the arguments. This will split at the first
46293   # space.
46294   complete="$BUILD_NM"
46295   path="${complete%% *}"
46296   tmp="$complete EOL"
46297   arguments="${tmp#* }"
46298 
46299   # Input might be given as Windows format, start by converting to
46300   # unix format.
46301   new_path=`$CYGPATH -u "$path"`
46302 
46303   # Now try to locate executable using which
46304   new_path=`$WHICH "$new_path" 2> /dev/null`
46305   # bat and cmd files are not always considered executable in cygwin causing which
46306   # to not find them
46307   if test "x$new_path" = x \
46308       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46309       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46310     new_path=`$CYGPATH -u "$path"`
46311   fi
46312   if test "x$new_path" = x; then
46313     # Oops. Which didn't find the executable.
46314     # The splitting of arguments from the executable at a space might have been incorrect,
46315     # since paths with space are more likely in Windows. Give it another try with the whole
46316     # argument.
46317     path="$complete"
46318     arguments="EOL"
46319     new_path=`$CYGPATH -u "$path"`
46320     new_path=`$WHICH "$new_path" 2> /dev/null`
46321     # bat and cmd files are not always considered executable in cygwin causing which
46322     # to not find them
46323     if test "x$new_path" = x \
46324         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46325         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46326       new_path=`$CYGPATH -u "$path"`
46327     fi
46328     if test "x$new_path" = x; then
46329       # It's still not found. Now this is an unrecoverable error.
46330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46331 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46332       has_space=`$ECHO "$complete" | $GREP " "`
46333       if test "x$has_space" != x; then
46334         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46335 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46336       fi
46337       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46338     fi
46339   fi
46340 
46341   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46342   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46343   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46344   # "foo.exe" is OK but "foo" is an error.
46345   #
46346   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46347   # It is also a way to make sure we got the proper file name for the real test later on.
46348   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46349   if test "x$test_shortpath" = x; then
46350     # Short path failed, file does not exist as specified.
46351     # Try adding .exe or .cmd
46352     if test -f "${new_path}.exe"; then
46353       input_to_shortpath="${new_path}.exe"
46354     elif test -f "${new_path}.cmd"; then
46355       input_to_shortpath="${new_path}.cmd"
46356     else
46357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46358 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46359       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46360 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46361       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46362     fi
46363   else
46364     input_to_shortpath="$new_path"
46365   fi
46366 
46367   # Call helper function which possibly converts this using DOS-style short mode.
46368   # If so, the updated path is stored in $new_path.
46369   new_path="$input_to_shortpath"
46370 
46371   input_path="$input_to_shortpath"
46372   # Check if we need to convert this using DOS-style short mode. If the path
46373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46374   # take no chances and rewrite it.
46375   # Note: m4 eats our [], so we need to use [ and ] instead.
46376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46377   if test "x$has_forbidden_chars" != x; then
46378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46379     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46380     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46381     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46382       # Going to short mode and back again did indeed matter. Since short mode is
46383       # case insensitive, let's make it lowercase to improve readability.
46384       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46385       # Now convert it back to Unix-style (cygpath)
46386       input_path=`$CYGPATH -u "$shortmode_path"`
46387       new_path="$input_path"
46388     fi
46389   fi
46390 
46391   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46392   if test "x$test_cygdrive_prefix" = x; then
46393     # As a simple fix, exclude /usr/bin since it's not a real path.
46394     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46395       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46396       # a path prefixed by /cygdrive for fixpath to work.
46397       new_path="$CYGWIN_ROOT_PATH$input_path"
46398     fi
46399   fi
46400 
46401   # remove trailing .exe if any
46402   new_path="${new_path/%.exe/}"
46403 
46404     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46405 
46406   # First separate the path from the arguments. This will split at the first
46407   # space.
46408   complete="$BUILD_NM"
46409   path="${complete%% *}"
46410   tmp="$complete EOL"
46411   arguments="${tmp#* }"
46412 
46413   # Input might be given as Windows format, start by converting to
46414   # unix format.
46415   new_path="$path"
46416 
46417   windows_path="$new_path"
46418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46419     unix_path=`$CYGPATH -u "$windows_path"`
46420     new_path="$unix_path"
46421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46423     new_path="$unix_path"
46424   fi
46425 
46426 
46427   # Now try to locate executable using which
46428   new_path=`$WHICH "$new_path" 2> /dev/null`
46429 
46430   if test "x$new_path" = x; then
46431     # Oops. Which didn't find the executable.
46432     # The splitting of arguments from the executable at a space might have been incorrect,
46433     # since paths with space are more likely in Windows. Give it another try with the whole
46434     # argument.
46435     path="$complete"
46436     arguments="EOL"
46437     new_path="$path"
46438 
46439   windows_path="$new_path"
46440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46441     unix_path=`$CYGPATH -u "$windows_path"`
46442     new_path="$unix_path"
46443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46445     new_path="$unix_path"
46446   fi
46447 
46448 
46449     new_path=`$WHICH "$new_path" 2> /dev/null`
46450     # bat and cmd files are not always considered executable in MSYS causing which
46451     # to not find them
46452     if test "x$new_path" = x \
46453         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46454         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46455       new_path="$path"
46456 
46457   windows_path="$new_path"
46458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46459     unix_path=`$CYGPATH -u "$windows_path"`
46460     new_path="$unix_path"
46461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46462     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46463     new_path="$unix_path"
46464   fi
46465 
46466     fi
46467 
46468     if test "x$new_path" = x; then
46469       # It's still not found. Now this is an unrecoverable error.
46470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46471 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46472       has_space=`$ECHO "$complete" | $GREP " "`
46473       if test "x$has_space" != x; then
46474         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46475 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46476       fi
46477       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46478     fi
46479   fi
46480 
46481   # Now new_path has a complete unix path to the binary
46482   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46483     # Keep paths in /bin as-is, but remove trailing .exe if any
46484     new_path="${new_path/%.exe/}"
46485     # Do not save /bin paths to all_fixpath_prefixes!
46486   else
46487     # Not in mixed or Windows style, start by that.
46488     new_path=`cmd //c echo $new_path`
46489 
46490   input_path="$new_path"
46491   # Check if we need to convert this using DOS-style short mode. If the path
46492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46493   # take no chances and rewrite it.
46494   # Note: m4 eats our [], so we need to use [ and ] instead.
46495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46496   if test "x$has_forbidden_chars" != x; then
46497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46498     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46499   fi
46500 
46501     # Output is in $new_path
46502 
46503   windows_path="$new_path"
46504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46505     unix_path=`$CYGPATH -u "$windows_path"`
46506     new_path="$unix_path"
46507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46508     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46509     new_path="$unix_path"
46510   fi
46511 
46512     # remove trailing .exe if any
46513     new_path="${new_path/%.exe/}"
46514 
46515     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46516     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46517   fi
46518 
46519     else
46520       # We're on a unix platform. Hooray! :)
46521       # First separate the path from the arguments. This will split at the first
46522       # space.
46523       complete="$BUILD_NM"
46524       path="${complete%% *}"
46525       tmp="$complete EOL"
46526       arguments="${tmp#* }"
46527 
46528       # Cannot rely on the command "which" here since it doesn't always work.
46529       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46530       if test -z "$is_absolute_path"; then
46531         # Path to executable is not absolute. Find it.
46532         IFS_save="$IFS"
46533         IFS=:
46534         for p in $PATH; do
46535           if test -f "$p/$path" && test -x "$p/$path"; then
46536             new_path="$p/$path"
46537             break
46538           fi
46539         done
46540         IFS="$IFS_save"
46541       else
46542         # This is an absolute path, we can use it without further modifications.
46543         new_path="$path"
46544       fi
46545 
46546       if test "x$new_path" = x; then
46547         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46548 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46549         has_space=`$ECHO "$complete" | $GREP " "`
46550         if test "x$has_space" != x; then
46551           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46552 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46553         fi
46554         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46555       fi
46556     fi
46557 
46558     # Now join together the path and the arguments once again
46559     if test "x$arguments" != xEOL; then
46560       new_complete="$new_path ${arguments% *}"
46561     else
46562       new_complete="$new_path"
46563     fi
46564 
46565     if test "x$complete" != "x$new_complete"; then
46566       BUILD_NM="$new_complete"
46567       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46568 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46569     fi
46570   fi
46571 
46572 
46573 
46574   # Publish this variable in the help.
46575 
46576 
46577   if [ -z "${BUILD_AR+x}" ]; then
46578     # The variable is not set by user, try to locate tool using the code snippet
46579     for ac_prog in ar gcc-ar
46580 do
46581   # Extract the first word of "$ac_prog", so it can be a program name with args.
46582 set dummy $ac_prog; ac_word=$2
46583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46584 $as_echo_n "checking for $ac_word... " >&6; }
46585 if ${ac_cv_path_BUILD_AR+:} false; then :
46586   $as_echo_n "(cached) " >&6
46587 else
46588   case $BUILD_AR in
46589   [\\/]* | ?:[\\/]*)
46590   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46591   ;;
46592   *)
46593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46594 for as_dir in $PATH
46595 do
46596   IFS=$as_save_IFS
46597   test -z "$as_dir" && as_dir=.
46598     for ac_exec_ext in '' $ac_executable_extensions; do
46599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46600     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46602     break 2
46603   fi
46604 done
46605   done
46606 IFS=$as_save_IFS
46607 
46608   ;;
46609 esac
46610 fi
46611 BUILD_AR=$ac_cv_path_BUILD_AR
46612 if test -n "$BUILD_AR"; then
46613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46614 $as_echo "$BUILD_AR" >&6; }
46615 else
46616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46617 $as_echo "no" >&6; }
46618 fi
46619 
46620 
46621   test -n "$BUILD_AR" && break
46622 done
46623 
46624   else
46625     # The variable is set, but is it from the command line or the environment?
46626 
46627     # Try to remove the string !BUILD_AR! from our list.
46628     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46629     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46630       # If it failed, the variable was not from the command line. Ignore it,
46631       # but warn the user (except for BASH, which is always set by the calling BASH).
46632       if test "xBUILD_AR" != xBASH; then
46633         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46634 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46635       fi
46636       # Try to locate tool using the code snippet
46637       for ac_prog in ar gcc-ar
46638 do
46639   # Extract the first word of "$ac_prog", so it can be a program name with args.
46640 set dummy $ac_prog; ac_word=$2
46641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46642 $as_echo_n "checking for $ac_word... " >&6; }
46643 if ${ac_cv_path_BUILD_AR+:} false; then :
46644   $as_echo_n "(cached) " >&6
46645 else
46646   case $BUILD_AR in
46647   [\\/]* | ?:[\\/]*)
46648   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46649   ;;
46650   *)
46651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46652 for as_dir in $PATH
46653 do
46654   IFS=$as_save_IFS
46655   test -z "$as_dir" && as_dir=.
46656     for ac_exec_ext in '' $ac_executable_extensions; do
46657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46658     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46660     break 2
46661   fi
46662 done
46663   done
46664 IFS=$as_save_IFS
46665 
46666   ;;
46667 esac
46668 fi
46669 BUILD_AR=$ac_cv_path_BUILD_AR
46670 if test -n "$BUILD_AR"; then
46671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46672 $as_echo "$BUILD_AR" >&6; }
46673 else
46674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46675 $as_echo "no" >&6; }
46676 fi
46677 
46678 
46679   test -n "$BUILD_AR" && break
46680 done
46681 
46682     else
46683       # If it succeeded, then it was overridden by the user. We will use it
46684       # for the tool.
46685 
46686       # First remove it from the list of overridden variables, so we can test
46687       # for unknown variables in the end.
46688       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46689 
46690       # Check if we try to supply an empty value
46691       if test "x$BUILD_AR" = x; then
46692         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46693 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46694         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46695 $as_echo_n "checking for BUILD_AR... " >&6; }
46696         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46697 $as_echo "disabled" >&6; }
46698       else
46699         # Check if the provided tool contains a complete path.
46700         tool_specified="$BUILD_AR"
46701         tool_basename="${tool_specified##*/}"
46702         if test "x$tool_basename" = "x$tool_specified"; then
46703           # A command without a complete path is provided, search $PATH.
46704           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46705 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46706           # Extract the first word of "$tool_basename", so it can be a program name with args.
46707 set dummy $tool_basename; ac_word=$2
46708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46709 $as_echo_n "checking for $ac_word... " >&6; }
46710 if ${ac_cv_path_BUILD_AR+:} false; then :
46711   $as_echo_n "(cached) " >&6
46712 else
46713   case $BUILD_AR in
46714   [\\/]* | ?:[\\/]*)
46715   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46716   ;;
46717   *)
46718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46719 for as_dir in $PATH
46720 do
46721   IFS=$as_save_IFS
46722   test -z "$as_dir" && as_dir=.
46723     for ac_exec_ext in '' $ac_executable_extensions; do
46724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46725     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46727     break 2
46728   fi
46729 done
46730   done
46731 IFS=$as_save_IFS
46732 
46733   ;;
46734 esac
46735 fi
46736 BUILD_AR=$ac_cv_path_BUILD_AR
46737 if test -n "$BUILD_AR"; then
46738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46739 $as_echo "$BUILD_AR" >&6; }
46740 else
46741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46742 $as_echo "no" >&6; }
46743 fi
46744 
46745 
46746           if test "x$BUILD_AR" = x; then
46747             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46748           fi
46749         else
46750           # Otherwise we believe it is a complete path. Use it as it is.
46751           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46752 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46753           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46754 $as_echo_n "checking for BUILD_AR... " >&6; }
46755           if test ! -x "$tool_specified"; then
46756             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46757 $as_echo "not found" >&6; }
46758             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46759           fi
46760           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46761 $as_echo "$tool_specified" >&6; }
46762         fi
46763       fi
46764     fi
46765 
46766   fi
46767 
46768 
46769 
46770   # Only process if variable expands to non-empty
46771 
46772   if test "x$BUILD_AR" != x; then
46773     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46774 
46775   # First separate the path from the arguments. This will split at the first
46776   # space.
46777   complete="$BUILD_AR"
46778   path="${complete%% *}"
46779   tmp="$complete EOL"
46780   arguments="${tmp#* }"
46781 
46782   # Input might be given as Windows format, start by converting to
46783   # unix format.
46784   new_path=`$CYGPATH -u "$path"`
46785 
46786   # Now try to locate executable using which
46787   new_path=`$WHICH "$new_path" 2> /dev/null`
46788   # bat and cmd files are not always considered executable in cygwin causing which
46789   # to not find them
46790   if test "x$new_path" = x \
46791       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46792       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46793     new_path=`$CYGPATH -u "$path"`
46794   fi
46795   if test "x$new_path" = x; then
46796     # Oops. Which didn't find the executable.
46797     # The splitting of arguments from the executable at a space might have been incorrect,
46798     # since paths with space are more likely in Windows. Give it another try with the whole
46799     # argument.
46800     path="$complete"
46801     arguments="EOL"
46802     new_path=`$CYGPATH -u "$path"`
46803     new_path=`$WHICH "$new_path" 2> /dev/null`
46804     # bat and cmd files are not always considered executable in cygwin causing which
46805     # to not find them
46806     if test "x$new_path" = x \
46807         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46808         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46809       new_path=`$CYGPATH -u "$path"`
46810     fi
46811     if test "x$new_path" = x; then
46812       # It's still not found. Now this is an unrecoverable error.
46813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46814 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46815       has_space=`$ECHO "$complete" | $GREP " "`
46816       if test "x$has_space" != x; then
46817         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46818 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46819       fi
46820       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46821     fi
46822   fi
46823 
46824   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46825   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46826   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46827   # "foo.exe" is OK but "foo" is an error.
46828   #
46829   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46830   # It is also a way to make sure we got the proper file name for the real test later on.
46831   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46832   if test "x$test_shortpath" = x; then
46833     # Short path failed, file does not exist as specified.
46834     # Try adding .exe or .cmd
46835     if test -f "${new_path}.exe"; then
46836       input_to_shortpath="${new_path}.exe"
46837     elif test -f "${new_path}.cmd"; then
46838       input_to_shortpath="${new_path}.cmd"
46839     else
46840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46841 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46842       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46843 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46844       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46845     fi
46846   else
46847     input_to_shortpath="$new_path"
46848   fi
46849 
46850   # Call helper function which possibly converts this using DOS-style short mode.
46851   # If so, the updated path is stored in $new_path.
46852   new_path="$input_to_shortpath"
46853 
46854   input_path="$input_to_shortpath"
46855   # Check if we need to convert this using DOS-style short mode. If the path
46856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46857   # take no chances and rewrite it.
46858   # Note: m4 eats our [], so we need to use [ and ] instead.
46859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46860   if test "x$has_forbidden_chars" != x; then
46861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46865       # Going to short mode and back again did indeed matter. Since short mode is
46866       # case insensitive, let's make it lowercase to improve readability.
46867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46868       # Now convert it back to Unix-style (cygpath)
46869       input_path=`$CYGPATH -u "$shortmode_path"`
46870       new_path="$input_path"
46871     fi
46872   fi
46873 
46874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46875   if test "x$test_cygdrive_prefix" = x; then
46876     # As a simple fix, exclude /usr/bin since it's not a real path.
46877     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46879       # a path prefixed by /cygdrive for fixpath to work.
46880       new_path="$CYGWIN_ROOT_PATH$input_path"
46881     fi
46882   fi
46883 
46884   # remove trailing .exe if any
46885   new_path="${new_path/%.exe/}"
46886 
46887     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46888 
46889   # First separate the path from the arguments. This will split at the first
46890   # space.
46891   complete="$BUILD_AR"
46892   path="${complete%% *}"
46893   tmp="$complete EOL"
46894   arguments="${tmp#* }"
46895 
46896   # Input might be given as Windows format, start by converting to
46897   # unix format.
46898   new_path="$path"
46899 
46900   windows_path="$new_path"
46901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46902     unix_path=`$CYGPATH -u "$windows_path"`
46903     new_path="$unix_path"
46904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46906     new_path="$unix_path"
46907   fi
46908 
46909 
46910   # Now try to locate executable using which
46911   new_path=`$WHICH "$new_path" 2> /dev/null`
46912 
46913   if test "x$new_path" = x; then
46914     # Oops. Which didn't find the executable.
46915     # The splitting of arguments from the executable at a space might have been incorrect,
46916     # since paths with space are more likely in Windows. Give it another try with the whole
46917     # argument.
46918     path="$complete"
46919     arguments="EOL"
46920     new_path="$path"
46921 
46922   windows_path="$new_path"
46923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46924     unix_path=`$CYGPATH -u "$windows_path"`
46925     new_path="$unix_path"
46926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46928     new_path="$unix_path"
46929   fi
46930 
46931 
46932     new_path=`$WHICH "$new_path" 2> /dev/null`
46933     # bat and cmd files are not always considered executable in MSYS causing which
46934     # to not find them
46935     if test "x$new_path" = x \
46936         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46937         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46938       new_path="$path"
46939 
46940   windows_path="$new_path"
46941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46942     unix_path=`$CYGPATH -u "$windows_path"`
46943     new_path="$unix_path"
46944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46946     new_path="$unix_path"
46947   fi
46948 
46949     fi
46950 
46951     if test "x$new_path" = x; then
46952       # It's still not found. Now this is an unrecoverable error.
46953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46954 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46955       has_space=`$ECHO "$complete" | $GREP " "`
46956       if test "x$has_space" != x; then
46957         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46959       fi
46960       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46961     fi
46962   fi
46963 
46964   # Now new_path has a complete unix path to the binary
46965   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46966     # Keep paths in /bin as-is, but remove trailing .exe if any
46967     new_path="${new_path/%.exe/}"
46968     # Do not save /bin paths to all_fixpath_prefixes!
46969   else
46970     # Not in mixed or Windows style, start by that.
46971     new_path=`cmd //c echo $new_path`
46972 
46973   input_path="$new_path"
46974   # Check if we need to convert this using DOS-style short mode. If the path
46975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46976   # take no chances and rewrite it.
46977   # Note: m4 eats our [], so we need to use [ and ] instead.
46978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46979   if test "x$has_forbidden_chars" != x; then
46980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46981     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46982   fi
46983 
46984     # Output is in $new_path
46985 
46986   windows_path="$new_path"
46987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46988     unix_path=`$CYGPATH -u "$windows_path"`
46989     new_path="$unix_path"
46990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46992     new_path="$unix_path"
46993   fi
46994 
46995     # remove trailing .exe if any
46996     new_path="${new_path/%.exe/}"
46997 
46998     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46999     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47000   fi
47001 
47002     else
47003       # We're on a unix platform. Hooray! :)
47004       # First separate the path from the arguments. This will split at the first
47005       # space.
47006       complete="$BUILD_AR"
47007       path="${complete%% *}"
47008       tmp="$complete EOL"
47009       arguments="${tmp#* }"
47010 
47011       # Cannot rely on the command "which" here since it doesn't always work.
47012       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47013       if test -z "$is_absolute_path"; then
47014         # Path to executable is not absolute. Find it.
47015         IFS_save="$IFS"
47016         IFS=:
47017         for p in $PATH; do
47018           if test -f "$p/$path" && test -x "$p/$path"; then
47019             new_path="$p/$path"
47020             break
47021           fi
47022         done
47023         IFS="$IFS_save"
47024       else
47025         # This is an absolute path, we can use it without further modifications.
47026         new_path="$path"
47027       fi
47028 
47029       if test "x$new_path" = x; then
47030         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47031 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47032         has_space=`$ECHO "$complete" | $GREP " "`
47033         if test "x$has_space" != x; then
47034           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47035 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47036         fi
47037         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47038       fi
47039     fi
47040 
47041     # Now join together the path and the arguments once again
47042     if test "x$arguments" != xEOL; then
47043       new_complete="$new_path ${arguments% *}"
47044     else
47045       new_complete="$new_path"
47046     fi
47047 
47048     if test "x$complete" != "x$new_complete"; then
47049       BUILD_AR="$new_complete"
47050       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
47051 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
47052     fi
47053   fi
47054 
47055 
47056 
47057   # Publish this variable in the help.
47058 
47059 
47060   if [ -z "${BUILD_OBJCOPY+x}" ]; then
47061     # The variable is not set by user, try to locate tool using the code snippet
47062     for ac_prog in objcopy
47063 do
47064   # Extract the first word of "$ac_prog", so it can be a program name with args.
47065 set dummy $ac_prog; ac_word=$2
47066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47067 $as_echo_n "checking for $ac_word... " >&6; }
47068 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47069   $as_echo_n "(cached) " >&6
47070 else
47071   case $BUILD_OBJCOPY in
47072   [\\/]* | ?:[\\/]*)
47073   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47074   ;;
47075   *)
47076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47077 for as_dir in $PATH
47078 do
47079   IFS=$as_save_IFS
47080   test -z "$as_dir" && as_dir=.
47081     for ac_exec_ext in '' $ac_executable_extensions; do
47082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47083     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47085     break 2
47086   fi
47087 done
47088   done
47089 IFS=$as_save_IFS
47090 
47091   ;;
47092 esac
47093 fi
47094 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47095 if test -n "$BUILD_OBJCOPY"; then
47096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47097 $as_echo "$BUILD_OBJCOPY" >&6; }
47098 else
47099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47100 $as_echo "no" >&6; }
47101 fi
47102 
47103 
47104   test -n "$BUILD_OBJCOPY" && break
47105 done
47106 
47107   else
47108     # The variable is set, but is it from the command line or the environment?
47109 
47110     # Try to remove the string !BUILD_OBJCOPY! from our list.
47111     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
47112     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47113       # If it failed, the variable was not from the command line. Ignore it,
47114       # but warn the user (except for BASH, which is always set by the calling BASH).
47115       if test "xBUILD_OBJCOPY" != xBASH; then
47116         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47117 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47118       fi
47119       # Try to locate tool using the code snippet
47120       for ac_prog in objcopy
47121 do
47122   # Extract the first word of "$ac_prog", so it can be a program name with args.
47123 set dummy $ac_prog; ac_word=$2
47124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47125 $as_echo_n "checking for $ac_word... " >&6; }
47126 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47127   $as_echo_n "(cached) " >&6
47128 else
47129   case $BUILD_OBJCOPY in
47130   [\\/]* | ?:[\\/]*)
47131   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47132   ;;
47133   *)
47134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47135 for as_dir in $PATH
47136 do
47137   IFS=$as_save_IFS
47138   test -z "$as_dir" && as_dir=.
47139     for ac_exec_ext in '' $ac_executable_extensions; do
47140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47141     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47143     break 2
47144   fi
47145 done
47146   done
47147 IFS=$as_save_IFS
47148 
47149   ;;
47150 esac
47151 fi
47152 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47153 if test -n "$BUILD_OBJCOPY"; then
47154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47155 $as_echo "$BUILD_OBJCOPY" >&6; }
47156 else
47157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47158 $as_echo "no" >&6; }
47159 fi
47160 
47161 
47162   test -n "$BUILD_OBJCOPY" && break
47163 done
47164 
47165     else
47166       # If it succeeded, then it was overridden by the user. We will use it
47167       # for the tool.
47168 
47169       # First remove it from the list of overridden variables, so we can test
47170       # for unknown variables in the end.
47171       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47172 
47173       # Check if we try to supply an empty value
47174       if test "x$BUILD_OBJCOPY" = x; then
47175         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47176 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47178 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47180 $as_echo "disabled" >&6; }
47181       else
47182         # Check if the provided tool contains a complete path.
47183         tool_specified="$BUILD_OBJCOPY"
47184         tool_basename="${tool_specified##*/}"
47185         if test "x$tool_basename" = "x$tool_specified"; then
47186           # A command without a complete path is provided, search $PATH.
47187           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47188 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47189           # Extract the first word of "$tool_basename", so it can be a program name with args.
47190 set dummy $tool_basename; ac_word=$2
47191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47192 $as_echo_n "checking for $ac_word... " >&6; }
47193 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47194   $as_echo_n "(cached) " >&6
47195 else
47196   case $BUILD_OBJCOPY in
47197   [\\/]* | ?:[\\/]*)
47198   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47199   ;;
47200   *)
47201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47202 for as_dir in $PATH
47203 do
47204   IFS=$as_save_IFS
47205   test -z "$as_dir" && as_dir=.
47206     for ac_exec_ext in '' $ac_executable_extensions; do
47207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47208     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47210     break 2
47211   fi
47212 done
47213   done
47214 IFS=$as_save_IFS
47215 
47216   ;;
47217 esac
47218 fi
47219 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47220 if test -n "$BUILD_OBJCOPY"; then
47221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47222 $as_echo "$BUILD_OBJCOPY" >&6; }
47223 else
47224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47225 $as_echo "no" >&6; }
47226 fi
47227 
47228 
47229           if test "x$BUILD_OBJCOPY" = x; then
47230             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47231           fi
47232         else
47233           # Otherwise we believe it is a complete path. Use it as it is.
47234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47235 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47236           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47237 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47238           if test ! -x "$tool_specified"; then
47239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47240 $as_echo "not found" >&6; }
47241             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47242           fi
47243           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47244 $as_echo "$tool_specified" >&6; }
47245         fi
47246       fi
47247     fi
47248 
47249   fi
47250 
47251 
47252 
47253   # Only process if variable expands to non-empty
47254 
47255   if test "x$BUILD_OBJCOPY" != x; then
47256     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47257 
47258   # First separate the path from the arguments. This will split at the first
47259   # space.
47260   complete="$BUILD_OBJCOPY"
47261   path="${complete%% *}"
47262   tmp="$complete EOL"
47263   arguments="${tmp#* }"
47264 
47265   # Input might be given as Windows format, start by converting to
47266   # unix format.
47267   new_path=`$CYGPATH -u "$path"`
47268 
47269   # Now try to locate executable using which
47270   new_path=`$WHICH "$new_path" 2> /dev/null`
47271   # bat and cmd files are not always considered executable in cygwin causing which
47272   # to not find them
47273   if test "x$new_path" = x \
47274       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47275       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47276     new_path=`$CYGPATH -u "$path"`
47277   fi
47278   if test "x$new_path" = x; then
47279     # Oops. Which didn't find the executable.
47280     # The splitting of arguments from the executable at a space might have been incorrect,
47281     # since paths with space are more likely in Windows. Give it another try with the whole
47282     # argument.
47283     path="$complete"
47284     arguments="EOL"
47285     new_path=`$CYGPATH -u "$path"`
47286     new_path=`$WHICH "$new_path" 2> /dev/null`
47287     # bat and cmd files are not always considered executable in cygwin causing which
47288     # to not find them
47289     if test "x$new_path" = x \
47290         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47291         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47292       new_path=`$CYGPATH -u "$path"`
47293     fi
47294     if test "x$new_path" = x; then
47295       # It's still not found. Now this is an unrecoverable error.
47296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47297 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47298       has_space=`$ECHO "$complete" | $GREP " "`
47299       if test "x$has_space" != x; then
47300         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47301 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47302       fi
47303       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47304     fi
47305   fi
47306 
47307   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47308   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47309   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47310   # "foo.exe" is OK but "foo" is an error.
47311   #
47312   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47313   # It is also a way to make sure we got the proper file name for the real test later on.
47314   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47315   if test "x$test_shortpath" = x; then
47316     # Short path failed, file does not exist as specified.
47317     # Try adding .exe or .cmd
47318     if test -f "${new_path}.exe"; then
47319       input_to_shortpath="${new_path}.exe"
47320     elif test -f "${new_path}.cmd"; then
47321       input_to_shortpath="${new_path}.cmd"
47322     else
47323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47324 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47325       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47326 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47327       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47328     fi
47329   else
47330     input_to_shortpath="$new_path"
47331   fi
47332 
47333   # Call helper function which possibly converts this using DOS-style short mode.
47334   # If so, the updated path is stored in $new_path.
47335   new_path="$input_to_shortpath"
47336 
47337   input_path="$input_to_shortpath"
47338   # Check if we need to convert this using DOS-style short mode. If the path
47339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47340   # take no chances and rewrite it.
47341   # Note: m4 eats our [], so we need to use [ and ] instead.
47342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47343   if test "x$has_forbidden_chars" != x; then
47344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47345     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47346     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47347     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47348       # Going to short mode and back again did indeed matter. Since short mode is
47349       # case insensitive, let's make it lowercase to improve readability.
47350       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47351       # Now convert it back to Unix-style (cygpath)
47352       input_path=`$CYGPATH -u "$shortmode_path"`
47353       new_path="$input_path"
47354     fi
47355   fi
47356 
47357   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47358   if test "x$test_cygdrive_prefix" = x; then
47359     # As a simple fix, exclude /usr/bin since it's not a real path.
47360     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47361       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47362       # a path prefixed by /cygdrive for fixpath to work.
47363       new_path="$CYGWIN_ROOT_PATH$input_path"
47364     fi
47365   fi
47366 
47367   # remove trailing .exe if any
47368   new_path="${new_path/%.exe/}"
47369 
47370     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47371 
47372   # First separate the path from the arguments. This will split at the first
47373   # space.
47374   complete="$BUILD_OBJCOPY"
47375   path="${complete%% *}"
47376   tmp="$complete EOL"
47377   arguments="${tmp#* }"
47378 
47379   # Input might be given as Windows format, start by converting to
47380   # unix format.
47381   new_path="$path"
47382 
47383   windows_path="$new_path"
47384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47385     unix_path=`$CYGPATH -u "$windows_path"`
47386     new_path="$unix_path"
47387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47389     new_path="$unix_path"
47390   fi
47391 
47392 
47393   # Now try to locate executable using which
47394   new_path=`$WHICH "$new_path" 2> /dev/null`
47395 
47396   if test "x$new_path" = x; then
47397     # Oops. Which didn't find the executable.
47398     # The splitting of arguments from the executable at a space might have been incorrect,
47399     # since paths with space are more likely in Windows. Give it another try with the whole
47400     # argument.
47401     path="$complete"
47402     arguments="EOL"
47403     new_path="$path"
47404 
47405   windows_path="$new_path"
47406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47407     unix_path=`$CYGPATH -u "$windows_path"`
47408     new_path="$unix_path"
47409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47411     new_path="$unix_path"
47412   fi
47413 
47414 
47415     new_path=`$WHICH "$new_path" 2> /dev/null`
47416     # bat and cmd files are not always considered executable in MSYS causing which
47417     # to not find them
47418     if test "x$new_path" = x \
47419         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47420         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47421       new_path="$path"
47422 
47423   windows_path="$new_path"
47424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47425     unix_path=`$CYGPATH -u "$windows_path"`
47426     new_path="$unix_path"
47427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47429     new_path="$unix_path"
47430   fi
47431 
47432     fi
47433 
47434     if test "x$new_path" = x; then
47435       # It's still not found. Now this is an unrecoverable error.
47436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47437 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47438       has_space=`$ECHO "$complete" | $GREP " "`
47439       if test "x$has_space" != x; then
47440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47442       fi
47443       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47444     fi
47445   fi
47446 
47447   # Now new_path has a complete unix path to the binary
47448   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47449     # Keep paths in /bin as-is, but remove trailing .exe if any
47450     new_path="${new_path/%.exe/}"
47451     # Do not save /bin paths to all_fixpath_prefixes!
47452   else
47453     # Not in mixed or Windows style, start by that.
47454     new_path=`cmd //c echo $new_path`
47455 
47456   input_path="$new_path"
47457   # Check if we need to convert this using DOS-style short mode. If the path
47458   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47459   # take no chances and rewrite it.
47460   # Note: m4 eats our [], so we need to use [ and ] instead.
47461   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47462   if test "x$has_forbidden_chars" != x; then
47463     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47464     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47465   fi
47466 
47467     # Output is in $new_path
47468 
47469   windows_path="$new_path"
47470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47471     unix_path=`$CYGPATH -u "$windows_path"`
47472     new_path="$unix_path"
47473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47475     new_path="$unix_path"
47476   fi
47477 
47478     # remove trailing .exe if any
47479     new_path="${new_path/%.exe/}"
47480 
47481     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47482     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47483   fi
47484 
47485     else
47486       # We're on a unix platform. Hooray! :)
47487       # First separate the path from the arguments. This will split at the first
47488       # space.
47489       complete="$BUILD_OBJCOPY"
47490       path="${complete%% *}"
47491       tmp="$complete EOL"
47492       arguments="${tmp#* }"
47493 
47494       # Cannot rely on the command "which" here since it doesn't always work.
47495       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47496       if test -z "$is_absolute_path"; then
47497         # Path to executable is not absolute. Find it.
47498         IFS_save="$IFS"
47499         IFS=:
47500         for p in $PATH; do
47501           if test -f "$p/$path" && test -x "$p/$path"; then
47502             new_path="$p/$path"
47503             break
47504           fi
47505         done
47506         IFS="$IFS_save"
47507       else
47508         # This is an absolute path, we can use it without further modifications.
47509         new_path="$path"
47510       fi
47511 
47512       if test "x$new_path" = x; then
47513         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47514 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47515         has_space=`$ECHO "$complete" | $GREP " "`
47516         if test "x$has_space" != x; then
47517           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47518 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47519         fi
47520         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47521       fi
47522     fi
47523 
47524     # Now join together the path and the arguments once again
47525     if test "x$arguments" != xEOL; then
47526       new_complete="$new_path ${arguments% *}"
47527     else
47528       new_complete="$new_path"
47529     fi
47530 
47531     if test "x$complete" != "x$new_complete"; then
47532       BUILD_OBJCOPY="$new_complete"
47533       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47534 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47535     fi
47536   fi
47537 
47538 
47539 
47540   # Publish this variable in the help.
47541 
47542 
47543   if [ -z "${BUILD_STRIP+x}" ]; then
47544     # The variable is not set by user, try to locate tool using the code snippet
47545     for ac_prog in strip
47546 do
47547   # Extract the first word of "$ac_prog", so it can be a program name with args.
47548 set dummy $ac_prog; ac_word=$2
47549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47550 $as_echo_n "checking for $ac_word... " >&6; }
47551 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47552   $as_echo_n "(cached) " >&6
47553 else
47554   case $BUILD_STRIP in
47555   [\\/]* | ?:[\\/]*)
47556   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47557   ;;
47558   *)
47559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47560 for as_dir in $PATH
47561 do
47562   IFS=$as_save_IFS
47563   test -z "$as_dir" && as_dir=.
47564     for ac_exec_ext in '' $ac_executable_extensions; do
47565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47566     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47568     break 2
47569   fi
47570 done
47571   done
47572 IFS=$as_save_IFS
47573 
47574   ;;
47575 esac
47576 fi
47577 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47578 if test -n "$BUILD_STRIP"; then
47579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47580 $as_echo "$BUILD_STRIP" >&6; }
47581 else
47582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47583 $as_echo "no" >&6; }
47584 fi
47585 
47586 
47587   test -n "$BUILD_STRIP" && break
47588 done
47589 
47590   else
47591     # The variable is set, but is it from the command line or the environment?
47592 
47593     # Try to remove the string !BUILD_STRIP! from our list.
47594     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47595     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47596       # If it failed, the variable was not from the command line. Ignore it,
47597       # but warn the user (except for BASH, which is always set by the calling BASH).
47598       if test "xBUILD_STRIP" != xBASH; then
47599         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47600 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47601       fi
47602       # Try to locate tool using the code snippet
47603       for ac_prog in strip
47604 do
47605   # Extract the first word of "$ac_prog", so it can be a program name with args.
47606 set dummy $ac_prog; ac_word=$2
47607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47608 $as_echo_n "checking for $ac_word... " >&6; }
47609 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47610   $as_echo_n "(cached) " >&6
47611 else
47612   case $BUILD_STRIP in
47613   [\\/]* | ?:[\\/]*)
47614   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47615   ;;
47616   *)
47617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47618 for as_dir in $PATH
47619 do
47620   IFS=$as_save_IFS
47621   test -z "$as_dir" && as_dir=.
47622     for ac_exec_ext in '' $ac_executable_extensions; do
47623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47624     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47626     break 2
47627   fi
47628 done
47629   done
47630 IFS=$as_save_IFS
47631 
47632   ;;
47633 esac
47634 fi
47635 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47636 if test -n "$BUILD_STRIP"; then
47637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47638 $as_echo "$BUILD_STRIP" >&6; }
47639 else
47640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47641 $as_echo "no" >&6; }
47642 fi
47643 
47644 
47645   test -n "$BUILD_STRIP" && break
47646 done
47647 
47648     else
47649       # If it succeeded, then it was overridden by the user. We will use it
47650       # for the tool.
47651 
47652       # First remove it from the list of overridden variables, so we can test
47653       # for unknown variables in the end.
47654       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47655 
47656       # Check if we try to supply an empty value
47657       if test "x$BUILD_STRIP" = x; then
47658         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47659 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47660         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47661 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47662         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47663 $as_echo "disabled" >&6; }
47664       else
47665         # Check if the provided tool contains a complete path.
47666         tool_specified="$BUILD_STRIP"
47667         tool_basename="${tool_specified##*/}"
47668         if test "x$tool_basename" = "x$tool_specified"; then
47669           # A command without a complete path is provided, search $PATH.
47670           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47671 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47672           # Extract the first word of "$tool_basename", so it can be a program name with args.
47673 set dummy $tool_basename; ac_word=$2
47674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47675 $as_echo_n "checking for $ac_word... " >&6; }
47676 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47677   $as_echo_n "(cached) " >&6
47678 else
47679   case $BUILD_STRIP in
47680   [\\/]* | ?:[\\/]*)
47681   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47682   ;;
47683   *)
47684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47685 for as_dir in $PATH
47686 do
47687   IFS=$as_save_IFS
47688   test -z "$as_dir" && as_dir=.
47689     for ac_exec_ext in '' $ac_executable_extensions; do
47690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47691     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47693     break 2
47694   fi
47695 done
47696   done
47697 IFS=$as_save_IFS
47698 
47699   ;;
47700 esac
47701 fi
47702 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47703 if test -n "$BUILD_STRIP"; then
47704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47705 $as_echo "$BUILD_STRIP" >&6; }
47706 else
47707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47708 $as_echo "no" >&6; }
47709 fi
47710 
47711 
47712           if test "x$BUILD_STRIP" = x; then
47713             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47714           fi
47715         else
47716           # Otherwise we believe it is a complete path. Use it as it is.
47717           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47718 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47719           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47720 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47721           if test ! -x "$tool_specified"; then
47722             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47723 $as_echo "not found" >&6; }
47724             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47725           fi
47726           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47727 $as_echo "$tool_specified" >&6; }
47728         fi
47729       fi
47730     fi
47731 
47732   fi
47733 
47734 
47735 
47736   # Only process if variable expands to non-empty
47737 
47738   if test "x$BUILD_STRIP" != x; then
47739     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47740 
47741   # First separate the path from the arguments. This will split at the first
47742   # space.
47743   complete="$BUILD_STRIP"
47744   path="${complete%% *}"
47745   tmp="$complete EOL"
47746   arguments="${tmp#* }"
47747 
47748   # Input might be given as Windows format, start by converting to
47749   # unix format.
47750   new_path=`$CYGPATH -u "$path"`
47751 
47752   # Now try to locate executable using which
47753   new_path=`$WHICH "$new_path" 2> /dev/null`
47754   # bat and cmd files are not always considered executable in cygwin causing which
47755   # to not find them
47756   if test "x$new_path" = x \
47757       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47758       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47759     new_path=`$CYGPATH -u "$path"`
47760   fi
47761   if test "x$new_path" = x; then
47762     # Oops. Which didn't find the executable.
47763     # The splitting of arguments from the executable at a space might have been incorrect,
47764     # since paths with space are more likely in Windows. Give it another try with the whole
47765     # argument.
47766     path="$complete"
47767     arguments="EOL"
47768     new_path=`$CYGPATH -u "$path"`
47769     new_path=`$WHICH "$new_path" 2> /dev/null`
47770     # bat and cmd files are not always considered executable in cygwin causing which
47771     # to not find them
47772     if test "x$new_path" = x \
47773         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47774         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47775       new_path=`$CYGPATH -u "$path"`
47776     fi
47777     if test "x$new_path" = x; then
47778       # It's still not found. Now this is an unrecoverable error.
47779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47780 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47781       has_space=`$ECHO "$complete" | $GREP " "`
47782       if test "x$has_space" != x; then
47783         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47784 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47785       fi
47786       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47787     fi
47788   fi
47789 
47790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47793   # "foo.exe" is OK but "foo" is an error.
47794   #
47795   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47796   # It is also a way to make sure we got the proper file name for the real test later on.
47797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47798   if test "x$test_shortpath" = x; then
47799     # Short path failed, file does not exist as specified.
47800     # Try adding .exe or .cmd
47801     if test -f "${new_path}.exe"; then
47802       input_to_shortpath="${new_path}.exe"
47803     elif test -f "${new_path}.cmd"; then
47804       input_to_shortpath="${new_path}.cmd"
47805     else
47806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47807 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47808       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47809 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47810       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47811     fi
47812   else
47813     input_to_shortpath="$new_path"
47814   fi
47815 
47816   # Call helper function which possibly converts this using DOS-style short mode.
47817   # If so, the updated path is stored in $new_path.
47818   new_path="$input_to_shortpath"
47819 
47820   input_path="$input_to_shortpath"
47821   # Check if we need to convert this using DOS-style short mode. If the path
47822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47823   # take no chances and rewrite it.
47824   # Note: m4 eats our [], so we need to use [ and ] instead.
47825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47826   if test "x$has_forbidden_chars" != x; then
47827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47828     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47829     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47830     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47831       # Going to short mode and back again did indeed matter. Since short mode is
47832       # case insensitive, let's make it lowercase to improve readability.
47833       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47834       # Now convert it back to Unix-style (cygpath)
47835       input_path=`$CYGPATH -u "$shortmode_path"`
47836       new_path="$input_path"
47837     fi
47838   fi
47839 
47840   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47841   if test "x$test_cygdrive_prefix" = x; then
47842     # As a simple fix, exclude /usr/bin since it's not a real path.
47843     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47844       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47845       # a path prefixed by /cygdrive for fixpath to work.
47846       new_path="$CYGWIN_ROOT_PATH$input_path"
47847     fi
47848   fi
47849 
47850   # remove trailing .exe if any
47851   new_path="${new_path/%.exe/}"
47852 
47853     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47854 
47855   # First separate the path from the arguments. This will split at the first
47856   # space.
47857   complete="$BUILD_STRIP"
47858   path="${complete%% *}"
47859   tmp="$complete EOL"
47860   arguments="${tmp#* }"
47861 
47862   # Input might be given as Windows format, start by converting to
47863   # unix format.
47864   new_path="$path"
47865 
47866   windows_path="$new_path"
47867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47868     unix_path=`$CYGPATH -u "$windows_path"`
47869     new_path="$unix_path"
47870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47872     new_path="$unix_path"
47873   fi
47874 
47875 
47876   # Now try to locate executable using which
47877   new_path=`$WHICH "$new_path" 2> /dev/null`
47878 
47879   if test "x$new_path" = x; then
47880     # Oops. Which didn't find the executable.
47881     # The splitting of arguments from the executable at a space might have been incorrect,
47882     # since paths with space are more likely in Windows. Give it another try with the whole
47883     # argument.
47884     path="$complete"
47885     arguments="EOL"
47886     new_path="$path"
47887 
47888   windows_path="$new_path"
47889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47890     unix_path=`$CYGPATH -u "$windows_path"`
47891     new_path="$unix_path"
47892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47894     new_path="$unix_path"
47895   fi
47896 
47897 
47898     new_path=`$WHICH "$new_path" 2> /dev/null`
47899     # bat and cmd files are not always considered executable in MSYS causing which
47900     # to not find them
47901     if test "x$new_path" = x \
47902         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47903         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47904       new_path="$path"
47905 
47906   windows_path="$new_path"
47907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47908     unix_path=`$CYGPATH -u "$windows_path"`
47909     new_path="$unix_path"
47910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47912     new_path="$unix_path"
47913   fi
47914 
47915     fi
47916 
47917     if test "x$new_path" = x; then
47918       # It's still not found. Now this is an unrecoverable error.
47919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47920 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47921       has_space=`$ECHO "$complete" | $GREP " "`
47922       if test "x$has_space" != x; then
47923         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47924 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47925       fi
47926       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47927     fi
47928   fi
47929 
47930   # Now new_path has a complete unix path to the binary
47931   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47932     # Keep paths in /bin as-is, but remove trailing .exe if any
47933     new_path="${new_path/%.exe/}"
47934     # Do not save /bin paths to all_fixpath_prefixes!
47935   else
47936     # Not in mixed or Windows style, start by that.
47937     new_path=`cmd //c echo $new_path`
47938 
47939   input_path="$new_path"
47940   # Check if we need to convert this using DOS-style short mode. If the path
47941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47942   # take no chances and rewrite it.
47943   # Note: m4 eats our [], so we need to use [ and ] instead.
47944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47945   if test "x$has_forbidden_chars" != x; then
47946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47948   fi
47949 
47950     # Output is in $new_path
47951 
47952   windows_path="$new_path"
47953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47954     unix_path=`$CYGPATH -u "$windows_path"`
47955     new_path="$unix_path"
47956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47958     new_path="$unix_path"
47959   fi
47960 
47961     # remove trailing .exe if any
47962     new_path="${new_path/%.exe/}"
47963 
47964     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47965     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47966   fi
47967 
47968     else
47969       # We're on a unix platform. Hooray! :)
47970       # First separate the path from the arguments. This will split at the first
47971       # space.
47972       complete="$BUILD_STRIP"
47973       path="${complete%% *}"
47974       tmp="$complete EOL"
47975       arguments="${tmp#* }"
47976 
47977       # Cannot rely on the command "which" here since it doesn't always work.
47978       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47979       if test -z "$is_absolute_path"; then
47980         # Path to executable is not absolute. Find it.
47981         IFS_save="$IFS"
47982         IFS=:
47983         for p in $PATH; do
47984           if test -f "$p/$path" && test -x "$p/$path"; then
47985             new_path="$p/$path"
47986             break
47987           fi
47988         done
47989         IFS="$IFS_save"
47990       else
47991         # This is an absolute path, we can use it without further modifications.
47992         new_path="$path"
47993       fi
47994 
47995       if test "x$new_path" = x; then
47996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47997 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47998         has_space=`$ECHO "$complete" | $GREP " "`
47999         if test "x$has_space" != x; then
48000           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
48001 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
48002         fi
48003         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48004       fi
48005     fi
48006 
48007     # Now join together the path and the arguments once again
48008     if test "x$arguments" != xEOL; then
48009       new_complete="$new_path ${arguments% *}"
48010     else
48011       new_complete="$new_path"
48012     fi
48013 
48014     if test "x$complete" != "x$new_complete"; then
48015       BUILD_STRIP="$new_complete"
48016       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
48017 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
48018     fi
48019   fi
48020 
48021     # Assume the C compiler is the assembler
48022     BUILD_AS="$BUILD_CC -c"
48023     # Just like for the target compiler, use the compiler as linker
48024     BUILD_LD="$BUILD_CC"
48025     BUILD_LDCXX="$BUILD_CXX"
48026 
48027     PATH="$OLDPATH"
48028 
48029 
48030   COMPILER=$BUILD_CC
48031   COMPILER_NAME=BuildC
48032 
48033   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48034     # cc -V output typically looks like
48035     #     cc: Sun C 5.12 Linux_i386 2011/11/16
48036     # or
48037     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48038     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48039     # Check that this is likely to be the Solaris Studio cc.
48040     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48041     if test $? -ne 0; then
48042       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48043       { $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
48044 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48045       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48046 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48047       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48048 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48049       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48050     fi
48051     # Remove usage instructions (if present), and
48052     # collapse compiler output into a single line
48053     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48054         $SED -e 's/ *[Uu]sage:.*//'`
48055     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48056         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48057   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48058     # xlc -qversion output typically looks like
48059     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48060     #     Version: 11.01.0000.0015
48061     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48062     # Check that this is likely to be the IBM XL C compiler.
48063     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48064     if test $? -ne 0; then
48065       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48066       { $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
48067 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48068       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48069 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48070       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48071 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48072       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48073     fi
48074     # Collapse compiler output into a single line
48075     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48076     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48077         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48078   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48079     # There is no specific version flag, but all output starts with a version string.
48080     # First line typically looks something like:
48081     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48082     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48083     # Check that this is likely to be Microsoft CL.EXE.
48084     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48085     if test $? -ne 0; then
48086       { $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
48087 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48088       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48089 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48090       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48091     fi
48092     # Collapse compiler output into a single line
48093     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48094     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48095         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48096   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48097     # gcc --version output typically looks like
48098     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48099     #     Copyright (C) 2013 Free Software Foundation, Inc.
48100     #     This is free software; see the source for copying conditions.  There is NO
48101     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48102     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48103     # Check that this is likely to be GCC.
48104     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48105     if test $? -ne 0; then
48106       { $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
48107 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48108       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48109 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48110       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48111     fi
48112     # Remove Copyright and legalese from version string, and
48113     # collapse into a single line
48114     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48115         $SED -e 's/ *Copyright .*//'`
48116     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48117         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48118   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48119     # clang --version output typically looks like
48120     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48121     #    clang version 3.3 (tags/RELEASE_33/final)
48122     # or
48123     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48124     #    Target: x86_64-pc-linux-gnu
48125     #    Thread model: posix
48126     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48127     # Check that this is likely to be clang
48128     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48129     if test $? -ne 0; then
48130       { $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
48131 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48132       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48133 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48134       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48135     fi
48136     # Collapse compiler output into a single line
48137     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48138     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48139         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48140   else
48141       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48142   fi
48143   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48144   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48145   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48146   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48147 
48148   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48149 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48150 
48151 
48152   COMPILER=$BUILD_CXX
48153   COMPILER_NAME=BuildC++
48154 
48155   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48156     # cc -V output typically looks like
48157     #     cc: Sun C 5.12 Linux_i386 2011/11/16
48158     # or
48159     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48160     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48161     # Check that this is likely to be the Solaris Studio cc.
48162     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48163     if test $? -ne 0; then
48164       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48165       { $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
48166 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48167       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48168 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48169       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48170 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48171       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48172     fi
48173     # Remove usage instructions (if present), and
48174     # collapse compiler output into a single line
48175     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48176         $SED -e 's/ *[Uu]sage:.*//'`
48177     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48178         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48179   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48180     # xlc -qversion output typically looks like
48181     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48182     #     Version: 11.01.0000.0015
48183     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48184     # Check that this is likely to be the IBM XL C compiler.
48185     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48186     if test $? -ne 0; then
48187       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48188       { $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
48189 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48190       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48191 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48192       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48193 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48194       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48195     fi
48196     # Collapse compiler output into a single line
48197     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48198     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48199         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48200   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48201     # There is no specific version flag, but all output starts with a version string.
48202     # First line typically looks something like:
48203     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48204     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48205     # Check that this is likely to be Microsoft CL.EXE.
48206     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48207     if test $? -ne 0; then
48208       { $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
48209 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48210       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48211 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48212       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48213     fi
48214     # Collapse compiler output into a single line
48215     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48216     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48217         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48218   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48219     # gcc --version output typically looks like
48220     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48221     #     Copyright (C) 2013 Free Software Foundation, Inc.
48222     #     This is free software; see the source for copying conditions.  There is NO
48223     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48224     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48225     # Check that this is likely to be GCC.
48226     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48227     if test $? -ne 0; then
48228       { $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
48229 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48230       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48231 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48232       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48233     fi
48234     # Remove Copyright and legalese from version string, and
48235     # collapse into a single line
48236     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48237         $SED -e 's/ *Copyright .*//'`
48238     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48239         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48240   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48241     # clang --version output typically looks like
48242     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48243     #    clang version 3.3 (tags/RELEASE_33/final)
48244     # or
48245     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48246     #    Target: x86_64-pc-linux-gnu
48247     #    Thread model: posix
48248     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48249     # Check that this is likely to be clang
48250     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48251     if test $? -ne 0; then
48252       { $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
48253 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48254       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48255 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48256       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48257     fi
48258     # Collapse compiler output into a single line
48259     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48260     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48261         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48262   else
48263       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48264   fi
48265   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48266   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48267   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48268   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48269 
48270   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48271 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48272 
48273 
48274   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48275     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
48276 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48277     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48278 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48279   fi
48280 
48281   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48282   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48283     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48284 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48285   fi
48286 
48287   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48288     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48289 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48290   fi
48291 
48292   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48293 
48294   else
48295     # If we are not cross compiling, use the normal target compilers for
48296     # building the build platform executables.
48297     BUILD_CC="$CC"
48298     BUILD_CXX="$CXX"
48299     BUILD_LD="$LD"
48300     BUILD_LDCXX="$LDCXX"
48301     BUILD_NM="$NM"
48302     BUILD_AS="$AS"
48303     BUILD_OBJCOPY="$OBJCOPY"
48304     BUILD_STRIP="$STRIP"
48305     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48306     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48307     BUILD_AR="$AR"
48308 
48309 
48310   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48311     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48312 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48313     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48314 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48315   fi
48316 
48317   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48318   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48319     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48320 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48321   fi
48322 
48323   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48324     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48325 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48326   fi
48327 
48328   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48329 
48330   fi
48331 
48332 
48333 
48334 
48335 
48336 
48337 
48338 
48339 
48340 
48341 
48342 
48343 
48344 
48345   # The package path is used only on macosx?
48346   # FIXME: clean this up, and/or move it elsewhere.
48347   PACKAGE_PATH=/opt/local
48348 
48349 
48350   # Check for extra potential brokenness.
48351   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48352     # On Windows, double-check that we got the right compiler.
48353     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48354     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48355     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48356       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48357         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
48358       fi
48359     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48360       if test "x$COMPILER_CPU_TEST" != "xx64"; then
48361         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48362       fi
48363     fi
48364   fi
48365 
48366   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48367     # If this is a --hash-style=gnu system, use --hash-style=both, why?
48368     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48369     # This is later checked when setting flags.
48370 
48371     # "-Og" suppported for GCC 4.8 and later
48372     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48373 
48374 
48375 
48376 
48377 
48378 
48379 
48380 
48381 
48382 
48383 
48384 
48385 
48386 
48387 
48388 
48389 
48390 
48391 
48392 
48393 
48394 
48395 
48396 
48397 
48398 
48399 
48400 
48401 
48402 
48403 
48404 
48405 
48406 
48407 
48408 
48409 
48410 
48411 
48412 
48413 
48414 
48415 
48416 
48417 
48418 
48419 
48420     # Execute function body
48421 
48422 
48423 
48424 
48425 
48426 
48427 
48428 
48429 
48430 
48431 
48432 
48433 
48434 
48435 
48436 
48437 
48438 
48439 
48440 
48441 
48442 
48443 
48444 
48445 
48446 
48447 
48448 
48449 
48450 
48451 
48452 
48453 
48454 
48455 
48456 
48457 
48458 
48459 
48460 
48461 
48462 
48463 
48464 
48465 
48466 
48467 
48468 
48469     # Execute function body
48470 
48471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48472 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48473   supports=yes
48474 
48475   saved_cflags="$CFLAGS"
48476   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48477   ac_ext=c
48478 ac_cpp='$CPP $CPPFLAGS'
48479 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48480 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48481 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48482 
48483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48484 /* end confdefs.h.  */
48485 int i;
48486 _ACEOF
48487 if ac_fn_c_try_compile "$LINENO"; then :
48488 
48489 else
48490   supports=no
48491 fi
48492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48493   ac_ext=cpp
48494 ac_cpp='$CXXCPP $CPPFLAGS'
48495 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48496 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48497 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48498 
48499   CFLAGS="$saved_cflags"
48500 
48501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48502 $as_echo "$supports" >&6; }
48503   if test "x$supports" = "xyes" ; then
48504     :
48505     C_COMP_SUPPORTS="yes"
48506   else
48507     :
48508     C_COMP_SUPPORTS="no"
48509   fi
48510 
48511 
48512 
48513 
48514 
48515 
48516 
48517 
48518 
48519 
48520 
48521 
48522 
48523 
48524 
48525 
48526 
48527 
48528 
48529 
48530 
48531 
48532 
48533 
48534 
48535 
48536 
48537 
48538 
48539 
48540 
48541 
48542 
48543 
48544 
48545 
48546 
48547 
48548 
48549 
48550 
48551 
48552 
48553 
48554 
48555 
48556 
48557 
48558 
48559 
48560 
48561 
48562 
48563 
48564 
48565 
48566 
48567 
48568 
48569     # Execute function body
48570 
48571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48572 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48573   supports=yes
48574 
48575   saved_cxxflags="$CXXFLAGS"
48576   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48577   ac_ext=cpp
48578 ac_cpp='$CXXCPP $CPPFLAGS'
48579 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48580 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48581 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48582 
48583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48584 /* end confdefs.h.  */
48585 int i;
48586 _ACEOF
48587 if ac_fn_cxx_try_compile "$LINENO"; then :
48588 
48589 else
48590   supports=no
48591 fi
48592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48593   ac_ext=cpp
48594 ac_cpp='$CXXCPP $CPPFLAGS'
48595 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48596 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48597 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48598 
48599   CXXFLAGS="$saved_cxxflags"
48600 
48601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48602 $as_echo "$supports" >&6; }
48603   if test "x$supports" = "xyes" ; then
48604     :
48605     CXX_COMP_SUPPORTS="yes"
48606   else
48607     :
48608     CXX_COMP_SUPPORTS="no"
48609   fi
48610 
48611 
48612 
48613 
48614 
48615 
48616 
48617 
48618 
48619 
48620 
48621 
48622 
48623   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48624 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48625   supports=no
48626   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48627 
48628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48629 $as_echo "$supports" >&6; }
48630   if test "x$supports" = "xyes" ; then
48631     :
48632     HAS_CFLAG_OPTIMIZE_DEBUG=true
48633   else
48634     :
48635     HAS_CFLAG_OPTIMIZE_DEBUG=false
48636   fi
48637 
48638 
48639 
48640 
48641 
48642 
48643 
48644     # "-z relro" supported in GNU binutils 2.17 and later
48645     LINKER_RELRO_FLAG="-Wl,-z,relro"
48646 
48647 
48648 
48649 
48650 
48651 
48652 
48653 
48654 
48655 
48656 
48657 
48658 
48659 
48660 
48661 
48662 
48663 
48664 
48665 
48666 
48667 
48668 
48669 
48670 
48671 
48672 
48673 
48674 
48675 
48676 
48677 
48678 
48679 
48680 
48681 
48682 
48683 
48684 
48685 
48686 
48687 
48688 
48689 
48690 
48691 
48692 
48693     # Execute function body
48694 
48695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48696 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48697   supports=yes
48698 
48699   saved_ldflags="$LDFLAGS"
48700   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48701   ac_ext=c
48702 ac_cpp='$CPP $CPPFLAGS'
48703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48706 
48707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48708 /* end confdefs.h.  */
48709 
48710 int
48711 main ()
48712 {
48713 
48714   ;
48715   return 0;
48716 }
48717 _ACEOF
48718 if ac_fn_c_try_link "$LINENO"; then :
48719 
48720 else
48721   supports=no
48722 fi
48723 rm -f core conftest.err conftest.$ac_objext \
48724     conftest$ac_exeext conftest.$ac_ext
48725   ac_ext=cpp
48726 ac_cpp='$CXXCPP $CPPFLAGS'
48727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48730 
48731   LDFLAGS="$saved_ldflags"
48732 
48733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48734 $as_echo "$supports" >&6; }
48735   if test "x$supports" = "xyes" ; then
48736     :
48737     HAS_LINKER_RELRO=true
48738   else
48739     :
48740     HAS_LINKER_RELRO=false
48741   fi
48742 
48743 
48744 
48745 
48746 
48747 
48748 
48749 
48750 
48751 
48752 
48753 
48754 
48755     # "-z now" supported in GNU binutils 2.11 and later
48756     LINKER_NOW_FLAG="-Wl,-z,now"
48757 
48758 
48759 
48760 
48761 
48762 
48763 
48764 
48765 
48766 
48767 
48768 
48769 
48770 
48771 
48772 
48773 
48774 
48775 
48776 
48777 
48778 
48779 
48780 
48781 
48782 
48783 
48784 
48785 
48786 
48787 
48788 
48789 
48790 
48791 
48792 
48793 
48794 
48795 
48796 
48797 
48798 
48799 
48800 
48801 
48802 
48803 
48804     # Execute function body
48805 
48806   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48807 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48808   supports=yes
48809 
48810   saved_ldflags="$LDFLAGS"
48811   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48812   ac_ext=c
48813 ac_cpp='$CPP $CPPFLAGS'
48814 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48815 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48816 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48817 
48818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48819 /* end confdefs.h.  */
48820 
48821 int
48822 main ()
48823 {
48824 
48825   ;
48826   return 0;
48827 }
48828 _ACEOF
48829 if ac_fn_c_try_link "$LINENO"; then :
48830 
48831 else
48832   supports=no
48833 fi
48834 rm -f core conftest.err conftest.$ac_objext \
48835     conftest$ac_exeext conftest.$ac_ext
48836   ac_ext=cpp
48837 ac_cpp='$CXXCPP $CPPFLAGS'
48838 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48839 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48840 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48841 
48842   LDFLAGS="$saved_ldflags"
48843 
48844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48845 $as_echo "$supports" >&6; }
48846   if test "x$supports" = "xyes" ; then
48847     :
48848     HAS_LINKER_NOW=true
48849   else
48850     :
48851     HAS_LINKER_NOW=false
48852   fi
48853 
48854 
48855 
48856 
48857 
48858 
48859 
48860 
48861 
48862 
48863 
48864 
48865   fi
48866 
48867   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48868   # in executable.'
48869   USING_BROKEN_SUSE_LD=no
48870   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48871     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48872 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48873     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48874     $ECHO "int main() { }" > main.c
48875     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48876       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48877 $as_echo "no" >&6; }
48878       USING_BROKEN_SUSE_LD=no
48879     else
48880       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48881 $as_echo "yes" >&6; }
48882       USING_BROKEN_SUSE_LD=yes
48883     fi
48884     $RM version-script.map main.c a.out
48885   fi
48886 
48887 
48888   # Setup hotspot lecagy names for toolchains
48889   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48890   if test "x$TOOLCHAIN_TYPE" = xclang; then
48891     HOTSPOT_TOOLCHAIN_TYPE=gcc
48892   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48893     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48894   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48895     HOTSPOT_TOOLCHAIN_TYPE=visCPP
48896   fi
48897 
48898 
48899 
48900 # Setup the JTReg Regression Test Harness.
48901 
48902 
48903 # Check whether --with-jtreg was given.
48904 if test "${with_jtreg+set}" = set; then :
48905   withval=$with_jtreg;
48906 fi
48907 
48908 
48909   if test "x$with_jtreg" = xno; then
48910     # jtreg disabled
48911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48912 $as_echo_n "checking for jtreg test harness... " >&6; }
48913     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48914 $as_echo "no, disabled" >&6; }
48915   elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48916     # An explicit path is specified, use it.
48917     JT_HOME="$with_jtreg"
48918     if test ! -d "$JT_HOME"; then
48919       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48920     fi
48921 
48922     if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48923       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48924     fi
48925 
48926     JTREGEXE="$JT_HOME/bin/jtreg"
48927     if test ! -x "$JTREGEXE"; then
48928       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48929     fi
48930 
48931     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48932 $as_echo_n "checking for jtreg test harness... " >&6; }
48933     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48934 $as_echo "$JT_HOME" >&6; }
48935   else
48936     # Try to locate jtreg
48937     if test "x$JT_HOME" != x; then
48938       # JT_HOME set in environment, use it
48939       if test ! -d "$JT_HOME"; then
48940         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48941 $as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48942         JT_HOME=
48943       else
48944         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48945           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48946 $as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48947           JT_HOME=
48948         elif test ! -x "$JT_HOME/bin/jtreg"; then
48949           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48950 $as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48951           JT_HOME=
48952         else
48953           JTREGEXE="$JT_HOME/bin/jtreg"
48954           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48955 $as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48956         fi
48957       fi
48958     fi
48959 
48960     if test "x$JT_HOME" = x; then
48961       # JT_HOME is not set in environment, or was deemed invalid.
48962       # Try to find jtreg on path
48963 
48964 
48965   # Publish this variable in the help.
48966 
48967 
48968   if [ -z "${JTREGEXE+x}" ]; then
48969     # The variable is not set by user, try to locate tool using the code snippet
48970     for ac_prog in jtreg
48971 do
48972   # Extract the first word of "$ac_prog", so it can be a program name with args.
48973 set dummy $ac_prog; ac_word=$2
48974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48975 $as_echo_n "checking for $ac_word... " >&6; }
48976 if ${ac_cv_path_JTREGEXE+:} false; then :
48977   $as_echo_n "(cached) " >&6
48978 else
48979   case $JTREGEXE in
48980   [\\/]* | ?:[\\/]*)
48981   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48982   ;;
48983   *)
48984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48985 for as_dir in $PATH
48986 do
48987   IFS=$as_save_IFS
48988   test -z "$as_dir" && as_dir=.
48989     for ac_exec_ext in '' $ac_executable_extensions; do
48990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48991     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48993     break 2
48994   fi
48995 done
48996   done
48997 IFS=$as_save_IFS
48998 
48999   ;;
49000 esac
49001 fi
49002 JTREGEXE=$ac_cv_path_JTREGEXE
49003 if test -n "$JTREGEXE"; then
49004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49005 $as_echo "$JTREGEXE" >&6; }
49006 else
49007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49008 $as_echo "no" >&6; }
49009 fi
49010 
49011 
49012   test -n "$JTREGEXE" && break
49013 done
49014 
49015   else
49016     # The variable is set, but is it from the command line or the environment?
49017 
49018     # Try to remove the string !JTREGEXE! from our list.
49019     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
49020     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49021       # If it failed, the variable was not from the command line. Ignore it,
49022       # but warn the user (except for BASH, which is always set by the calling BASH).
49023       if test "xJTREGEXE" != xBASH; then
49024         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49025 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49026       fi
49027       # Try to locate tool using the code snippet
49028       for ac_prog in jtreg
49029 do
49030   # Extract the first word of "$ac_prog", so it can be a program name with args.
49031 set dummy $ac_prog; ac_word=$2
49032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49033 $as_echo_n "checking for $ac_word... " >&6; }
49034 if ${ac_cv_path_JTREGEXE+:} false; then :
49035   $as_echo_n "(cached) " >&6
49036 else
49037   case $JTREGEXE in
49038   [\\/]* | ?:[\\/]*)
49039   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49040   ;;
49041   *)
49042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49043 for as_dir in $PATH
49044 do
49045   IFS=$as_save_IFS
49046   test -z "$as_dir" && as_dir=.
49047     for ac_exec_ext in '' $ac_executable_extensions; do
49048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49049     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49051     break 2
49052   fi
49053 done
49054   done
49055 IFS=$as_save_IFS
49056 
49057   ;;
49058 esac
49059 fi
49060 JTREGEXE=$ac_cv_path_JTREGEXE
49061 if test -n "$JTREGEXE"; then
49062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49063 $as_echo "$JTREGEXE" >&6; }
49064 else
49065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49066 $as_echo "no" >&6; }
49067 fi
49068 
49069 
49070   test -n "$JTREGEXE" && break
49071 done
49072 
49073     else
49074       # If it succeeded, then it was overridden by the user. We will use it
49075       # for the tool.
49076 
49077       # First remove it from the list of overridden variables, so we can test
49078       # for unknown variables in the end.
49079       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49080 
49081       # Check if we try to supply an empty value
49082       if test "x$JTREGEXE" = x; then
49083         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49084 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49086 $as_echo_n "checking for JTREGEXE... " >&6; }
49087         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49088 $as_echo "disabled" >&6; }
49089       else
49090         # Check if the provided tool contains a complete path.
49091         tool_specified="$JTREGEXE"
49092         tool_basename="${tool_specified##*/}"
49093         if test "x$tool_basename" = "x$tool_specified"; then
49094           # A command without a complete path is provided, search $PATH.
49095           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49096 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49097           # Extract the first word of "$tool_basename", so it can be a program name with args.
49098 set dummy $tool_basename; ac_word=$2
49099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49100 $as_echo_n "checking for $ac_word... " >&6; }
49101 if ${ac_cv_path_JTREGEXE+:} false; then :
49102   $as_echo_n "(cached) " >&6
49103 else
49104   case $JTREGEXE in
49105   [\\/]* | ?:[\\/]*)
49106   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49107   ;;
49108   *)
49109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49110 for as_dir in $PATH
49111 do
49112   IFS=$as_save_IFS
49113   test -z "$as_dir" && as_dir=.
49114     for ac_exec_ext in '' $ac_executable_extensions; do
49115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49116     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49118     break 2
49119   fi
49120 done
49121   done
49122 IFS=$as_save_IFS
49123 
49124   ;;
49125 esac
49126 fi
49127 JTREGEXE=$ac_cv_path_JTREGEXE
49128 if test -n "$JTREGEXE"; then
49129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49130 $as_echo "$JTREGEXE" >&6; }
49131 else
49132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49133 $as_echo "no" >&6; }
49134 fi
49135 
49136 
49137           if test "x$JTREGEXE" = x; then
49138             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49139           fi
49140         else
49141           # Otherwise we believe it is a complete path. Use it as it is.
49142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49143 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49144           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49145 $as_echo_n "checking for JTREGEXE... " >&6; }
49146           if test ! -x "$tool_specified"; then
49147             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49148 $as_echo "not found" >&6; }
49149             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49150           fi
49151           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49152 $as_echo "$tool_specified" >&6; }
49153         fi
49154       fi
49155     fi
49156 
49157   fi
49158 
49159 
49160       if test "x$JTREGEXE" != x; then
49161         # That's good, now try to derive JT_HOME
49162         JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49163         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49164           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49165 $as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49166           JT_HOME=
49167           JTREGEXE=
49168         else
49169           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49170 $as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49171         fi
49172       fi
49173     fi
49174 
49175     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49176 $as_echo_n "checking for jtreg test harness... " >&6; }
49177     if test "x$JT_HOME" != x; then
49178       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49179 $as_echo "$JT_HOME" >&6; }
49180     else
49181       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49182 $as_echo "no, not found" >&6; }
49183 
49184       if test "x$with_jtreg" = xyes; then
49185         as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49186       fi
49187     fi
49188   fi
49189 
49190 
49191   # Only process if variable expands to non-empty
49192 
49193   if test "x$JTREGEXE" != x; then
49194     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49195 
49196   # First separate the path from the arguments. This will split at the first
49197   # space.
49198   complete="$JTREGEXE"
49199   path="${complete%% *}"
49200   tmp="$complete EOL"
49201   arguments="${tmp#* }"
49202 
49203   # Input might be given as Windows format, start by converting to
49204   # unix format.
49205   new_path=`$CYGPATH -u "$path"`
49206 
49207   # Now try to locate executable using which
49208   new_path=`$WHICH "$new_path" 2> /dev/null`
49209   # bat and cmd files are not always considered executable in cygwin causing which
49210   # to not find them
49211   if test "x$new_path" = x \
49212       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49213       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49214     new_path=`$CYGPATH -u "$path"`
49215   fi
49216   if test "x$new_path" = x; then
49217     # Oops. Which didn't find the executable.
49218     # The splitting of arguments from the executable at a space might have been incorrect,
49219     # since paths with space are more likely in Windows. Give it another try with the whole
49220     # argument.
49221     path="$complete"
49222     arguments="EOL"
49223     new_path=`$CYGPATH -u "$path"`
49224     new_path=`$WHICH "$new_path" 2> /dev/null`
49225     # bat and cmd files are not always considered executable in cygwin causing which
49226     # to not find them
49227     if test "x$new_path" = x \
49228         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49229         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49230       new_path=`$CYGPATH -u "$path"`
49231     fi
49232     if test "x$new_path" = x; then
49233       # It's still not found. Now this is an unrecoverable error.
49234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49235 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49236       has_space=`$ECHO "$complete" | $GREP " "`
49237       if test "x$has_space" != x; then
49238         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49239 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49240       fi
49241       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49242     fi
49243   fi
49244 
49245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49248   # "foo.exe" is OK but "foo" is an error.
49249   #
49250   # This test is therefore slightly more accurate than "test -f" to check for file presence.
49251   # It is also a way to make sure we got the proper file name for the real test later on.
49252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49253   if test "x$test_shortpath" = x; then
49254     # Short path failed, file does not exist as specified.
49255     # Try adding .exe or .cmd
49256     if test -f "${new_path}.exe"; then
49257       input_to_shortpath="${new_path}.exe"
49258     elif test -f "${new_path}.cmd"; then
49259       input_to_shortpath="${new_path}.cmd"
49260     else
49261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49262 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49263       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49264 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49265       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49266     fi
49267   else
49268     input_to_shortpath="$new_path"
49269   fi
49270 
49271   # Call helper function which possibly converts this using DOS-style short mode.
49272   # If so, the updated path is stored in $new_path.
49273   new_path="$input_to_shortpath"
49274 
49275   input_path="$input_to_shortpath"
49276   # Check if we need to convert this using DOS-style short mode. If the path
49277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49278   # take no chances and rewrite it.
49279   # Note: m4 eats our [], so we need to use [ and ] instead.
49280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49281   if test "x$has_forbidden_chars" != x; then
49282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49286       # Going to short mode and back again did indeed matter. Since short mode is
49287       # case insensitive, let's make it lowercase to improve readability.
49288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49289       # Now convert it back to Unix-style (cygpath)
49290       input_path=`$CYGPATH -u "$shortmode_path"`
49291       new_path="$input_path"
49292     fi
49293   fi
49294 
49295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49296   if test "x$test_cygdrive_prefix" = x; then
49297     # As a simple fix, exclude /usr/bin since it's not a real path.
49298     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49300       # a path prefixed by /cygdrive for fixpath to work.
49301       new_path="$CYGWIN_ROOT_PATH$input_path"
49302     fi
49303   fi
49304 
49305   # remove trailing .exe if any
49306   new_path="${new_path/%.exe/}"
49307 
49308     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49309 
49310   # First separate the path from the arguments. This will split at the first
49311   # space.
49312   complete="$JTREGEXE"
49313   path="${complete%% *}"
49314   tmp="$complete EOL"
49315   arguments="${tmp#* }"
49316 
49317   # Input might be given as Windows format, start by converting to
49318   # unix format.
49319   new_path="$path"
49320 
49321   windows_path="$new_path"
49322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49323     unix_path=`$CYGPATH -u "$windows_path"`
49324     new_path="$unix_path"
49325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49327     new_path="$unix_path"
49328   fi
49329 
49330 
49331   # Now try to locate executable using which
49332   new_path=`$WHICH "$new_path" 2> /dev/null`
49333 
49334   if test "x$new_path" = x; then
49335     # Oops. Which didn't find the executable.
49336     # The splitting of arguments from the executable at a space might have been incorrect,
49337     # since paths with space are more likely in Windows. Give it another try with the whole
49338     # argument.
49339     path="$complete"
49340     arguments="EOL"
49341     new_path="$path"
49342 
49343   windows_path="$new_path"
49344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49345     unix_path=`$CYGPATH -u "$windows_path"`
49346     new_path="$unix_path"
49347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49349     new_path="$unix_path"
49350   fi
49351 
49352 
49353     new_path=`$WHICH "$new_path" 2> /dev/null`
49354     # bat and cmd files are not always considered executable in MSYS causing which
49355     # to not find them
49356     if test "x$new_path" = x \
49357         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49358         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49359       new_path="$path"
49360 
49361   windows_path="$new_path"
49362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49363     unix_path=`$CYGPATH -u "$windows_path"`
49364     new_path="$unix_path"
49365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49367     new_path="$unix_path"
49368   fi
49369 
49370     fi
49371 
49372     if test "x$new_path" = x; then
49373       # It's still not found. Now this is an unrecoverable error.
49374       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49375 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49376       has_space=`$ECHO "$complete" | $GREP " "`
49377       if test "x$has_space" != x; then
49378         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49379 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49380       fi
49381       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49382     fi
49383   fi
49384 
49385   # Now new_path has a complete unix path to the binary
49386   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49387     # Keep paths in /bin as-is, but remove trailing .exe if any
49388     new_path="${new_path/%.exe/}"
49389     # Do not save /bin paths to all_fixpath_prefixes!
49390   else
49391     # Not in mixed or Windows style, start by that.
49392     new_path=`cmd //c echo $new_path`
49393 
49394   input_path="$new_path"
49395   # Check if we need to convert this using DOS-style short mode. If the path
49396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49397   # take no chances and rewrite it.
49398   # Note: m4 eats our [], so we need to use [ and ] instead.
49399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49400   if test "x$has_forbidden_chars" != x; then
49401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49402     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49403   fi
49404 
49405     # Output is in $new_path
49406 
49407   windows_path="$new_path"
49408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49409     unix_path=`$CYGPATH -u "$windows_path"`
49410     new_path="$unix_path"
49411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49413     new_path="$unix_path"
49414   fi
49415 
49416     # remove trailing .exe if any
49417     new_path="${new_path/%.exe/}"
49418 
49419     # Save the first 10 bytes of this path to the storage, so fixpath can work.
49420     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49421   fi
49422 
49423     else
49424       # We're on a unix platform. Hooray! :)
49425       # First separate the path from the arguments. This will split at the first
49426       # space.
49427       complete="$JTREGEXE"
49428       path="${complete%% *}"
49429       tmp="$complete EOL"
49430       arguments="${tmp#* }"
49431 
49432       # Cannot rely on the command "which" here since it doesn't always work.
49433       is_absolute_path=`$ECHO "$path" | $GREP ^/`
49434       if test -z "$is_absolute_path"; then
49435         # Path to executable is not absolute. Find it.
49436         IFS_save="$IFS"
49437         IFS=:
49438         for p in $PATH; do
49439           if test -f "$p/$path" && test -x "$p/$path"; then
49440             new_path="$p/$path"
49441             break
49442           fi
49443         done
49444         IFS="$IFS_save"
49445       else
49446         # This is an absolute path, we can use it without further modifications.
49447         new_path="$path"
49448       fi
49449 
49450       if test "x$new_path" = x; then
49451         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49452 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49453         has_space=`$ECHO "$complete" | $GREP " "`
49454         if test "x$has_space" != x; then
49455           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49456 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49457         fi
49458         as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49459       fi
49460     fi
49461 
49462     # Now join together the path and the arguments once again
49463     if test "x$arguments" != xEOL; then
49464       new_complete="$new_path ${arguments% *}"
49465     else
49466       new_complete="$new_path"
49467     fi
49468 
49469     if test "x$complete" != "x$new_complete"; then
49470       JTREGEXE="$new_complete"
49471       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49472 $as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49473     fi
49474   fi
49475 
49476 
49477   # Only process if variable expands to non-empty
49478 
49479   if test "x$JT_HOME" != x; then
49480     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49481 
49482   # Input might be given as Windows format, start by converting to
49483   # unix format.
49484   path="$JT_HOME"
49485   new_path=`$CYGPATH -u "$path"`
49486 
49487   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49488   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49489   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49490   # "foo.exe" is OK but "foo" is an error.
49491   #
49492   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49493   # It is also a way to make sure we got the proper file name for the real test later on.
49494   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49495   if test "x$test_shortpath" = x; then
49496     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49497 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49498     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49499   fi
49500 
49501   # Call helper function which possibly converts this using DOS-style short mode.
49502   # If so, the updated path is stored in $new_path.
49503 
49504   input_path="$new_path"
49505   # Check if we need to convert this using DOS-style short mode. If the path
49506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49507   # take no chances and rewrite it.
49508   # Note: m4 eats our [], so we need to use [ and ] instead.
49509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49510   if test "x$has_forbidden_chars" != x; then
49511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49515       # Going to short mode and back again did indeed matter. Since short mode is
49516       # case insensitive, let's make it lowercase to improve readability.
49517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49518       # Now convert it back to Unix-style (cygpath)
49519       input_path=`$CYGPATH -u "$shortmode_path"`
49520       new_path="$input_path"
49521     fi
49522   fi
49523 
49524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49525   if test "x$test_cygdrive_prefix" = x; then
49526     # As a simple fix, exclude /usr/bin since it's not a real path.
49527     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49529       # a path prefixed by /cygdrive for fixpath to work.
49530       new_path="$CYGWIN_ROOT_PATH$input_path"
49531     fi
49532   fi
49533 
49534 
49535   if test "x$path" != "x$new_path"; then
49536     JT_HOME="$new_path"
49537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49538 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49539   fi
49540 
49541     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49542 
49543   path="$JT_HOME"
49544   has_colon=`$ECHO $path | $GREP ^.:`
49545   new_path="$path"
49546   if test "x$has_colon" = x; then
49547     # Not in mixed or Windows style, start by that.
49548     new_path=`cmd //c echo $path`
49549   fi
49550 
49551 
49552   input_path="$new_path"
49553   # Check if we need to convert this using DOS-style short mode. If the path
49554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49555   # take no chances and rewrite it.
49556   # Note: m4 eats our [], so we need to use [ and ] instead.
49557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49558   if test "x$has_forbidden_chars" != x; then
49559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49560     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49561   fi
49562 
49563 
49564   windows_path="$new_path"
49565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49566     unix_path=`$CYGPATH -u "$windows_path"`
49567     new_path="$unix_path"
49568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49570     new_path="$unix_path"
49571   fi
49572 
49573   if test "x$path" != "x$new_path"; then
49574     JT_HOME="$new_path"
49575     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49576 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49577   fi
49578 
49579   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49580   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49581 
49582     else
49583       # We're on a unix platform. Hooray! :)
49584       path="$JT_HOME"
49585       has_space=`$ECHO "$path" | $GREP " "`
49586       if test "x$has_space" != x; then
49587         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49588 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49589         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49590       fi
49591 
49592       # Use eval to expand a potential ~
49593       eval path="$path"
49594       if test ! -f "$path" && test ! -d "$path"; then
49595         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49596       fi
49597 
49598       if test -d "$path"; then
49599         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49600       else
49601         dir="`$DIRNAME "$path"`"
49602         base="`$BASENAME "$path"`"
49603         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49604       fi
49605     fi
49606   fi
49607 
49608 
49609 
49610 
49611 
49612 # Setup Jib dependency tool
49613 
49614 
49615 # Check whether --with-jib was given.
49616 if test "${with_jib+set}" = set; then :
49617   withval=$with_jib;
49618 fi
49619 
49620 
49621   if test "x$with_jib" = xno || test "x$with_jib" = x; then
49622     # jib disabled
49623     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49624 $as_echo_n "checking for jib... " >&6; }
49625     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49626 $as_echo "no" >&6; }
49627   elif test "x$with_jib" = xyes; then
49628     as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49629   else
49630     JIB_HOME="${with_jib}"
49631     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49632 $as_echo_n "checking for jib... " >&6; }
49633     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49634 $as_echo "${JIB_HOME}" >&6; }
49635     if test ! -d "${JIB_HOME}"; then
49636       as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49637     fi
49638     JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49639     if test ! -f "${JIB_JAR}"; then
49640       as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49641     fi
49642   fi
49643 
49644 
49645 
49646 
49647 
49648   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49649   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49650   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49651   #                              commands produced by the link step (currently AIX only)
49652   if test "x$TOOLCHAIN_TYPE" = xxlc; then
49653     COMPILER_TARGET_BITS_FLAG="-q"
49654     COMPILER_COMMAND_FILE_FLAG="-f"
49655     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49656   else
49657     COMPILER_TARGET_BITS_FLAG="-m"
49658     COMPILER_COMMAND_FILE_FLAG="@"
49659     COMPILER_BINDCMD_FILE_FLAG=""
49660 
49661     # The solstudio linker does not support @-files.
49662     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49663       COMPILER_COMMAND_FILE_FLAG=
49664     fi
49665 
49666     # Check if @file is supported by gcc
49667     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49668       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49669 $as_echo_n "checking if @file is supported by gcc... " >&6; }
49670       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49671       $ECHO "" "--version" > command.file
49672       if $CXX @command.file 2>&5 >&5; then
49673         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49674 $as_echo "yes" >&6; }
49675         COMPILER_COMMAND_FILE_FLAG="@"
49676       else
49677         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49678 $as_echo "no" >&6; }
49679         COMPILER_COMMAND_FILE_FLAG=
49680       fi
49681       $RM command.file
49682     fi
49683   fi
49684 
49685 
49686 
49687 
49688   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49689   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49690     ARFLAGS="-r"
49691   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49692     ARFLAGS="-X64"
49693   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49694     # lib.exe is used as AR to create static libraries.
49695     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49696   else
49697     ARFLAGS=""
49698   fi
49699 
49700 
49701   ## Setup strip.
49702   # FIXME: should this really be per platform, or should it be per toolchain type?
49703   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49704   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49705   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49706     STRIPFLAGS="-g"
49707   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49708     STRIPFLAGS="-x"
49709   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49710     STRIPFLAGS="-S"
49711   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49712     STRIPFLAGS="-X32_64"
49713   fi
49714 
49715 
49716 
49717   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49718     CC_OUT_OPTION=-Fo
49719     EXE_OUT_OPTION=-out:
49720     LD_OUT_OPTION=-out:
49721     AR_OUT_OPTION=-out:
49722   else
49723     # The option used to specify the target .o,.a or .so file.
49724     # When compiling, how to specify the to be created object file.
49725     CC_OUT_OPTION='-o$(SPACE)'
49726     # When linking, how to specify the to be created executable.
49727     EXE_OUT_OPTION='-o$(SPACE)'
49728     # When linking, how to specify the to be created dynamically linkable library.
49729     LD_OUT_OPTION='-o$(SPACE)'
49730     # When archiving, how to specify the to be create static archive for object files.
49731     AR_OUT_OPTION='rcs$(SPACE)'
49732   fi
49733 
49734 
49735 
49736 
49737 
49738   # On Windows, we need to set RC flags.
49739   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49740     RC_FLAGS="-nologo -l0x409"
49741     JVM_RCFLAGS="-nologo"
49742     if test "x$DEBUG_LEVEL" = xrelease; then
49743       RC_FLAGS="$RC_FLAGS -DNDEBUG"
49744       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49745     fi
49746 
49747     # The version variables used to create RC_FLAGS may be overridden
49748     # in a custom configure script, or possibly the command line.
49749     # Let those variables be expanded at make time in spec.gmk.
49750     # The \$ are escaped to the shell, and the $(...) variables
49751     # are evaluated by make.
49752     RC_FLAGS="$RC_FLAGS \
49753         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49754         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49755         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49756         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49757         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49758         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49759         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49760 
49761     JVM_RCFLAGS="$JVM_RCFLAGS \
49762         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49763         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49764         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49765         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49766         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49767         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49768         -D\"HS_FNAME=jvm.dll\" \
49769         -D\"HS_INTERNAL_NAME=jvm\""
49770   fi
49771 
49772 
49773 
49774   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49775     # silence copyright notice and other headers.
49776     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49777   fi
49778 
49779 
49780 # Now we can test some aspects on the target using configure macros.
49781 
49782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49783 $as_echo_n "checking for ANSI C header files... " >&6; }
49784 if ${ac_cv_header_stdc+:} false; then :
49785   $as_echo_n "(cached) " >&6
49786 else
49787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49788 /* end confdefs.h.  */
49789 #include <stdlib.h>
49790 #include <stdarg.h>
49791 #include <string.h>
49792 #include <float.h>
49793 
49794 int
49795 main ()
49796 {
49797 
49798   ;
49799   return 0;
49800 }
49801 _ACEOF
49802 if ac_fn_cxx_try_compile "$LINENO"; then :
49803   ac_cv_header_stdc=yes
49804 else
49805   ac_cv_header_stdc=no
49806 fi
49807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49808 
49809 if test $ac_cv_header_stdc = yes; then
49810   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49812 /* end confdefs.h.  */
49813 #include <string.h>
49814 
49815 _ACEOF
49816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49817   $EGREP "memchr" >/dev/null 2>&1; then :
49818 
49819 else
49820   ac_cv_header_stdc=no
49821 fi
49822 rm -f conftest*
49823 
49824 fi
49825 
49826 if test $ac_cv_header_stdc = yes; then
49827   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49829 /* end confdefs.h.  */
49830 #include <stdlib.h>
49831 
49832 _ACEOF
49833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49834   $EGREP "free" >/dev/null 2>&1; then :
49835 
49836 else
49837   ac_cv_header_stdc=no
49838 fi
49839 rm -f conftest*
49840 
49841 fi
49842 
49843 if test $ac_cv_header_stdc = yes; then
49844   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49845   if test "$cross_compiling" = yes; then :
49846   :
49847 else
49848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49849 /* end confdefs.h.  */
49850 #include <ctype.h>
49851 #include <stdlib.h>
49852 #if ((' ' & 0x0FF) == 0x020)
49853 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49854 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49855 #else
49856 # define ISLOWER(c) \
49857                    (('a' <= (c) && (c) <= 'i') \
49858                      || ('j' <= (c) && (c) <= 'r') \
49859                      || ('s' <= (c) && (c) <= 'z'))
49860 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49861 #endif
49862 
49863 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49864 int
49865 main ()
49866 {
49867   int i;
49868   for (i = 0; i < 256; i++)
49869     if (XOR (islower (i), ISLOWER (i))
49870         || toupper (i) != TOUPPER (i))
49871       return 2;
49872   return 0;
49873 }
49874 _ACEOF
49875 if ac_fn_cxx_try_run "$LINENO"; then :
49876 
49877 else
49878   ac_cv_header_stdc=no
49879 fi
49880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49881   conftest.$ac_objext conftest.beam conftest.$ac_ext
49882 fi
49883 
49884 fi
49885 fi
49886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49887 $as_echo "$ac_cv_header_stdc" >&6; }
49888 if test $ac_cv_header_stdc = yes; then
49889 
49890 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
49891 
49892 fi
49893 
49894 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
49895 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49896                   inttypes.h stdint.h unistd.h
49897 do :
49898   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49899 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49900 "
49901 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49902   cat >>confdefs.h <<_ACEOF
49903 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49904 _ACEOF
49905 
49906 fi
49907 
49908 done
49909 
49910 
49911 
49912   ###############################################################################
49913   #
49914   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49915   # (The JVM can use 32 or 64 bit Java pointers but that decision
49916   # is made at runtime.)
49917   #
49918 
49919   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49920     # Always specify -m flag on Solaris
49921     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49922 
49923   # When we add flags to the "official" CFLAGS etc, we need to
49924   # keep track of these additions in ADDED_CFLAGS etc. These
49925   # will later be checked to make sure only controlled additions
49926   # have been made to CFLAGS etc.
49927   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49928   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49929   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49930 
49931   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49932   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49933   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49934 
49935   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49936   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49937   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49938 
49939   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49940   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49941   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49942 
49943   elif test "x$COMPILE_TYPE" = xreduced; then
49944     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49945       # Specify -m if running reduced on unix platforms
49946 
49947   # When we add flags to the "official" CFLAGS etc, we need to
49948   # keep track of these additions in ADDED_CFLAGS etc. These
49949   # will later be checked to make sure only controlled additions
49950   # have been made to CFLAGS etc.
49951   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49952   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49953   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49954 
49955   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49956   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49957   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49958 
49959   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49960   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49961   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49962 
49963   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49964   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49965   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49966 
49967     fi
49968   fi
49969   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49970     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49971     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49972     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49973   fi
49974 
49975   # Make compilation sanity check
49976   for ac_header in stdio.h
49977 do :
49978   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49979 if test "x$ac_cv_header_stdio_h" = xyes; then :
49980   cat >>confdefs.h <<_ACEOF
49981 #define HAVE_STDIO_H 1
49982 _ACEOF
49983 
49984 else
49985 
49986     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49987 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49988     if test "x$COMPILE_TYPE" = xreduced; then
49989 
49990   # Print a helpful message on how to acquire the necessary build dependency.
49991   # reduced is the help tag: freetype, cups, alsa etc
49992   MISSING_DEPENDENCY=reduced
49993 
49994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49995     cygwin_help $MISSING_DEPENDENCY
49996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49997     msys_help $MISSING_DEPENDENCY
49998   else
49999     PKGHANDLER_COMMAND=
50000 
50001     case $PKGHANDLER in
50002       apt-get)
50003         apt_help     $MISSING_DEPENDENCY ;;
50004       yum)
50005         yum_help     $MISSING_DEPENDENCY ;;
50006       brew)
50007         brew_help    $MISSING_DEPENDENCY ;;
50008       port)
50009         port_help    $MISSING_DEPENDENCY ;;
50010       pkgutil)
50011         pkgutil_help $MISSING_DEPENDENCY ;;
50012       pkgadd)
50013         pkgadd_help  $MISSING_DEPENDENCY ;;
50014     esac
50015 
50016     if test "x$PKGHANDLER_COMMAND" != x; then
50017       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50018     fi
50019   fi
50020 
50021       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50022 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50023     elif test "x$COMPILE_TYPE" = xcross; then
50024       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50025 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50026     fi
50027     as_fn_error $? "Cannot continue." "$LINENO" 5
50028 
50029 fi
50030 
50031 done
50032 
50033 
50034   # The cast to long int works around a bug in the HP C Compiler
50035 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50036 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50037 # This bug is HP SR number 8606223364.
50038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50039 $as_echo_n "checking size of int *... " >&6; }
50040 if ${ac_cv_sizeof_int_p+:} false; then :
50041   $as_echo_n "(cached) " >&6
50042 else
50043   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50044 
50045 else
50046   if test "$ac_cv_type_int_p" = yes; then
50047      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50048 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50049 as_fn_error 77 "cannot compute sizeof (int *)
50050 See \`config.log' for more details" "$LINENO" 5; }
50051    else
50052      ac_cv_sizeof_int_p=0
50053    fi
50054 fi
50055 
50056 fi
50057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50058 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50059 
50060 
50061 
50062 cat >>confdefs.h <<_ACEOF
50063 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50064 _ACEOF
50065 
50066 
50067 
50068   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
50069   if test "x$ac_cv_sizeof_int_p" = x; then
50070     # The test failed, lets stick to the assumed value.
50071     { $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
50072 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
50073   else
50074     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50075 
50076     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50077       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
50078       # Let's try to implicitely set the compilers target architecture and retry the test
50079       { $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
50080 $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;}
50081       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
50082 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
50083 
50084   # When we add flags to the "official" CFLAGS etc, we need to
50085   # keep track of these additions in ADDED_CFLAGS etc. These
50086   # will later be checked to make sure only controlled additions
50087   # have been made to CFLAGS etc.
50088   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50089   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50090   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50091 
50092   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50093   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50094   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50095 
50096   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50097   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50098   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50099 
50100   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50101   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50102   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50103 
50104 
50105       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
50106       unset ac_cv_sizeof_int_p
50107       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
50108       cat >>confdefs.h <<_ACEOF
50109 #undef SIZEOF_INT_P
50110 _ACEOF
50111 
50112       # The cast to long int works around a bug in the HP C Compiler
50113 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50114 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50115 # This bug is HP SR number 8606223364.
50116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50117 $as_echo_n "checking size of int *... " >&6; }
50118 if ${ac_cv_sizeof_int_p+:} false; then :
50119   $as_echo_n "(cached) " >&6
50120 else
50121   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50122 
50123 else
50124   if test "$ac_cv_type_int_p" = yes; then
50125      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50126 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50127 as_fn_error 77 "cannot compute sizeof (int *)
50128 See \`config.log' for more details" "$LINENO" 5; }
50129    else
50130      ac_cv_sizeof_int_p=0
50131    fi
50132 fi
50133 
50134 fi
50135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50136 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50137 
50138 
50139 
50140 cat >>confdefs.h <<_ACEOF
50141 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50142 _ACEOF
50143 
50144 
50145 
50146       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50147 
50148       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50149         { $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
50150 $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;}
50151         if test "x$COMPILE_TYPE" = xreduced; then
50152 
50153   # Print a helpful message on how to acquire the necessary build dependency.
50154   # reduced is the help tag: freetype, cups, alsa etc
50155   MISSING_DEPENDENCY=reduced
50156 
50157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50158     cygwin_help $MISSING_DEPENDENCY
50159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50160     msys_help $MISSING_DEPENDENCY
50161   else
50162     PKGHANDLER_COMMAND=
50163 
50164     case $PKGHANDLER in
50165       apt-get)
50166         apt_help     $MISSING_DEPENDENCY ;;
50167       yum)
50168         yum_help     $MISSING_DEPENDENCY ;;
50169       brew)
50170         brew_help    $MISSING_DEPENDENCY ;;
50171       port)
50172         port_help    $MISSING_DEPENDENCY ;;
50173       pkgutil)
50174         pkgutil_help $MISSING_DEPENDENCY ;;
50175       pkgadd)
50176         pkgadd_help  $MISSING_DEPENDENCY ;;
50177     esac
50178 
50179     if test "x$PKGHANDLER_COMMAND" != x; then
50180       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50181     fi
50182   fi
50183 
50184           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50185 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50186         elif test "x$COMPILE_TYPE" = xcross; then
50187           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50188 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50189         fi
50190         as_fn_error $? "Cannot continue." "$LINENO" 5
50191       fi
50192     fi
50193   fi
50194 
50195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50196 $as_echo_n "checking for target address size... " >&6; }
50197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50198 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50199 
50200 
50201   ###############################################################################
50202   #
50203   # Is the target little of big endian?
50204   #
50205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50206 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50207 if ${ac_cv_c_bigendian+:} false; then :
50208   $as_echo_n "(cached) " >&6
50209 else
50210   ac_cv_c_bigendian=unknown
50211     # See if we're dealing with a universal compiler.
50212     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50213 /* end confdefs.h.  */
50214 #ifndef __APPLE_CC__
50215                not a universal capable compiler
50216              #endif
50217              typedef int dummy;
50218 
50219 _ACEOF
50220 if ac_fn_cxx_try_compile "$LINENO"; then :
50221 
50222         # Check for potential -arch flags.  It is not universal unless
50223         # there are at least two -arch flags with different values.
50224         ac_arch=
50225         ac_prev=
50226         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50227          if test -n "$ac_prev"; then
50228            case $ac_word in
50229              i?86 | x86_64 | ppc | ppc64)
50230                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50231                  ac_arch=$ac_word
50232                else
50233                  ac_cv_c_bigendian=universal
50234                  break
50235                fi
50236                ;;
50237            esac
50238            ac_prev=
50239          elif test "x$ac_word" = "x-arch"; then
50240            ac_prev=arch
50241          fi
50242        done
50243 fi
50244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50245     if test $ac_cv_c_bigendian = unknown; then
50246       # See if sys/param.h defines the BYTE_ORDER macro.
50247       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50248 /* end confdefs.h.  */
50249 #include <sys/types.h>
50250              #include <sys/param.h>
50251 
50252 int
50253 main ()
50254 {
50255 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50256                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50257                      && LITTLE_ENDIAN)
50258               bogus endian macros
50259              #endif
50260 
50261   ;
50262   return 0;
50263 }
50264 _ACEOF
50265 if ac_fn_cxx_try_compile "$LINENO"; then :
50266   # It does; now see whether it defined to BIG_ENDIAN or not.
50267          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50268 /* end confdefs.h.  */
50269 #include <sys/types.h>
50270                 #include <sys/param.h>
50271 
50272 int
50273 main ()
50274 {
50275 #if BYTE_ORDER != BIG_ENDIAN
50276                  not big endian
50277                 #endif
50278 
50279   ;
50280   return 0;
50281 }
50282 _ACEOF
50283 if ac_fn_cxx_try_compile "$LINENO"; then :
50284   ac_cv_c_bigendian=yes
50285 else
50286   ac_cv_c_bigendian=no
50287 fi
50288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50289 fi
50290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50291     fi
50292     if test $ac_cv_c_bigendian = unknown; then
50293       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50294       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50295 /* end confdefs.h.  */
50296 #include <limits.h>
50297 
50298 int
50299 main ()
50300 {
50301 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50302               bogus endian macros
50303              #endif
50304 
50305   ;
50306   return 0;
50307 }
50308 _ACEOF
50309 if ac_fn_cxx_try_compile "$LINENO"; then :
50310   # It does; now see whether it defined to _BIG_ENDIAN or not.
50311          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50312 /* end confdefs.h.  */
50313 #include <limits.h>
50314 
50315 int
50316 main ()
50317 {
50318 #ifndef _BIG_ENDIAN
50319                  not big endian
50320                 #endif
50321 
50322   ;
50323   return 0;
50324 }
50325 _ACEOF
50326 if ac_fn_cxx_try_compile "$LINENO"; then :
50327   ac_cv_c_bigendian=yes
50328 else
50329   ac_cv_c_bigendian=no
50330 fi
50331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50332 fi
50333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50334     fi
50335     if test $ac_cv_c_bigendian = unknown; then
50336       # Compile a test program.
50337       if test "$cross_compiling" = yes; then :
50338   # Try to guess by grepping values from an object file.
50339          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50340 /* end confdefs.h.  */
50341 short int ascii_mm[] =
50342                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50343                 short int ascii_ii[] =
50344                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50345                 int use_ascii (int i) {
50346                   return ascii_mm[i] + ascii_ii[i];
50347                 }
50348                 short int ebcdic_ii[] =
50349                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50350                 short int ebcdic_mm[] =
50351                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50352                 int use_ebcdic (int i) {
50353                   return ebcdic_mm[i] + ebcdic_ii[i];
50354                 }
50355                 extern int foo;
50356 
50357 int
50358 main ()
50359 {
50360 return use_ascii (foo) == use_ebcdic (foo);
50361   ;
50362   return 0;
50363 }
50364 _ACEOF
50365 if ac_fn_cxx_try_compile "$LINENO"; then :
50366   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50367               ac_cv_c_bigendian=yes
50368             fi
50369             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50370               if test "$ac_cv_c_bigendian" = unknown; then
50371                 ac_cv_c_bigendian=no
50372               else
50373                 # finding both strings is unlikely to happen, but who knows?
50374                 ac_cv_c_bigendian=unknown
50375               fi
50376             fi
50377 fi
50378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50379 else
50380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50381 /* end confdefs.h.  */
50382 $ac_includes_default
50383 int
50384 main ()
50385 {
50386 
50387              /* Are we little or big endian?  From Harbison&Steele.  */
50388              union
50389              {
50390                long int l;
50391                char c[sizeof (long int)];
50392              } u;
50393              u.l = 1;
50394              return u.c[sizeof (long int) - 1] == 1;
50395 
50396   ;
50397   return 0;
50398 }
50399 _ACEOF
50400 if ac_fn_cxx_try_run "$LINENO"; then :
50401   ac_cv_c_bigendian=no
50402 else
50403   ac_cv_c_bigendian=yes
50404 fi
50405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50406   conftest.$ac_objext conftest.beam conftest.$ac_ext
50407 fi
50408 
50409     fi
50410 fi
50411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50412 $as_echo "$ac_cv_c_bigendian" >&6; }
50413  case $ac_cv_c_bigendian in #(
50414    yes)
50415      ENDIAN="big";; #(
50416    no)
50417      ENDIAN="little" ;; #(
50418    universal)
50419      ENDIAN="universal_endianness"
50420      ;; #(
50421    *)
50422      ENDIAN="unknown" ;;
50423  esac
50424 
50425 
50426   if test "x$ENDIAN" = xuniversal_endianness; then
50427     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50428   fi
50429   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50430     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
50431   fi
50432 
50433 
50434 # Configure flags for the tools
50435 
50436   ###############################################################################
50437   #
50438   # How to compile shared libraries.
50439   #
50440 
50441   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50442     PICFLAG="-fPIC"
50443     C_FLAG_REORDER=''
50444     CXX_FLAG_REORDER=''
50445 
50446     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50447       # Linking is different on MacOSX
50448       if test "x$STATIC_BUILD" = xtrue; then
50449         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50450       else
50451         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50452         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50453       fi
50454       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50455       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50456       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50457       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50458     else
50459       # Default works for linux, might work on other platforms as well.
50460       SHARED_LIBRARY_FLAGS='-shared'
50461       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50462       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50463       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50464       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50465     fi
50466   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50467     C_FLAG_REORDER=''
50468     CXX_FLAG_REORDER=''
50469 
50470     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50471       # Linking is different on MacOSX
50472       PICFLAG=''
50473       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50474       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50475       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50476       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50477       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50478 
50479       if test "x$STATIC_BUILD" = xfalse; then
50480         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50481       fi
50482     else
50483       # Default works for linux, might work on other platforms as well.
50484       PICFLAG='-fPIC'
50485       SHARED_LIBRARY_FLAGS='-shared'
50486       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50487       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50488       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50489 
50490       # arm specific settings
50491       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50492         # '-Wl,-z,origin' isn't used on arm.
50493         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50494       else
50495         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50496       fi
50497 
50498     fi
50499   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50500     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50501       PICFLAG="-xcode=pic32"
50502     else
50503       PICFLAG="-KPIC"
50504     fi
50505     C_FLAG_REORDER='-xF'
50506     CXX_FLAG_REORDER='-xF'
50507     SHARED_LIBRARY_FLAGS="-G"
50508     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50509     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50510     SET_SHARED_LIBRARY_NAME='-h $1'
50511     SET_SHARED_LIBRARY_MAPFILE='-M$1'
50512   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50513     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50514     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50515     # will have to patch this single instruction with a call to some out-of-order code which
50516     # does the load from the TOC. This is of course slow. But in that case we also would have
50517     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50518     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50519     # can be patched directly by the linker and does not require a jump to out-of-order code.
50520     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50521     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50522     # loads for accessing a global variable). But there are rumors that this may be seen as a
50523     # 'performance feature' because of improved code locality of the symbols used in a
50524     # compilation unit.
50525     PICFLAG="-qpic"
50526     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50527     C_FLAG_REORDER=''
50528     CXX_FLAG_REORDER=''
50529     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50530     SET_EXECUTABLE_ORIGIN=""
50531     SET_SHARED_LIBRARY_ORIGIN=''
50532     SET_SHARED_LIBRARY_NAME=''
50533     SET_SHARED_LIBRARY_MAPFILE=''
50534   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50535     PICFLAG=""
50536     C_FLAG_REORDER=''
50537     CXX_FLAG_REORDER=''
50538     SHARED_LIBRARY_FLAGS="-dll"
50539     SET_EXECUTABLE_ORIGIN=''
50540     SET_SHARED_LIBRARY_ORIGIN=''
50541     SET_SHARED_LIBRARY_NAME=''
50542     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50543   fi
50544 
50545 
50546 
50547 
50548 
50549 
50550 
50551 
50552 
50553   # The (cross) compiler is now configured, we can now test capabilities
50554   # of the target platform.
50555 
50556 
50557 
50558   ###############################################################################
50559   #
50560   # Setup the opt flags for different compilers
50561   # and different operating systems.
50562   #
50563 
50564   # FIXME: this was indirectly the old default, but just inherited.
50565   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50566   #   C_FLAG_DEPS="-MMD -MF"
50567   # fi
50568 
50569   # Generate make dependency files
50570   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50571     C_FLAG_DEPS="-MMD -MF"
50572   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50573     C_FLAG_DEPS="-MMD -MF"
50574   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50575     C_FLAG_DEPS="-xMMD -xMF"
50576   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50577     C_FLAG_DEPS="-qmakedep=gcc -MF"
50578   fi
50579   CXX_FLAG_DEPS="$C_FLAG_DEPS"
50580 
50581 
50582 
50583   # Debug symbols
50584   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50585     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50586       # reduce from default "-g2" option to save space
50587       CFLAGS_DEBUG_SYMBOLS="-g1"
50588       CXXFLAGS_DEBUG_SYMBOLS="-g1"
50589     else
50590       CFLAGS_DEBUG_SYMBOLS="-g"
50591       CXXFLAGS_DEBUG_SYMBOLS="-g"
50592     fi
50593   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50594     CFLAGS_DEBUG_SYMBOLS="-g"
50595     CXXFLAGS_DEBUG_SYMBOLS="-g"
50596   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50597     CFLAGS_DEBUG_SYMBOLS="-g -xs"
50598     # -g0 enables debug symbols without disabling inlining.
50599     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50600   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50601     CFLAGS_DEBUG_SYMBOLS="-g"
50602     CXXFLAGS_DEBUG_SYMBOLS="-g"
50603   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50604     CFLAGS_DEBUG_SYMBOLS="-Zi"
50605     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50606   fi
50607 
50608 
50609 
50610   # Debug symbols for JVM_CFLAGS
50611   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50612     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50613     if test "x$DEBUG_LEVEL" = xslowdebug; then
50614       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50615     else
50616       # -g0 does not disable inlining, which -g does.
50617       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50618     fi
50619   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50620     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50621   else
50622     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50623   fi
50624 
50625 
50626   # bounds, memory and behavior checking options
50627   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50628     case $DEBUG_LEVEL in
50629     release )
50630       # no adjustment
50631       ;;
50632     fastdebug )
50633       # no adjustment
50634       ;;
50635     slowdebug )
50636       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50637       # get's added conditionally on whether we produce debug symbols or not.
50638       # This is most likely not really correct.
50639 
50640       # Add runtime stack smashing and undefined behavior checks.
50641       # Not all versions of gcc support -fstack-protector
50642       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50643 
50644 
50645 
50646 
50647 
50648 
50649 
50650 
50651 
50652 
50653 
50654 
50655 
50656 
50657 
50658 
50659 
50660 
50661 
50662 
50663 
50664 
50665 
50666 
50667 
50668 
50669 
50670 
50671 
50672 
50673 
50674 
50675 
50676 
50677 
50678 
50679 
50680 
50681 
50682 
50683 
50684 
50685     # Execute function body
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695 
50696 
50697 
50698 
50699 
50700 
50701 
50702 
50703 
50704 
50705 
50706 
50707 
50708 
50709 
50710 
50711 
50712 
50713 
50714 
50715 
50716 
50717 
50718 
50719 
50720 
50721 
50722 
50723 
50724 
50725 
50726 
50727 
50728 
50729 
50730 
50731 
50732 
50733 
50734     # Execute function body
50735 
50736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50737 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50738   supports=yes
50739 
50740   saved_cflags="$CFLAGS"
50741   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50742   ac_ext=c
50743 ac_cpp='$CPP $CPPFLAGS'
50744 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50745 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50746 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50747 
50748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50749 /* end confdefs.h.  */
50750 int i;
50751 _ACEOF
50752 if ac_fn_c_try_compile "$LINENO"; then :
50753 
50754 else
50755   supports=no
50756 fi
50757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50758   ac_ext=cpp
50759 ac_cpp='$CXXCPP $CPPFLAGS'
50760 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50761 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50762 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50763 
50764   CFLAGS="$saved_cflags"
50765 
50766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50767 $as_echo "$supports" >&6; }
50768   if test "x$supports" = "xyes" ; then
50769     :
50770     C_COMP_SUPPORTS="yes"
50771   else
50772     :
50773     C_COMP_SUPPORTS="no"
50774   fi
50775 
50776 
50777 
50778 
50779 
50780 
50781 
50782 
50783 
50784 
50785 
50786 
50787 
50788 
50789 
50790 
50791 
50792 
50793 
50794 
50795 
50796 
50797 
50798 
50799 
50800 
50801 
50802 
50803 
50804 
50805 
50806 
50807 
50808 
50809 
50810 
50811 
50812 
50813 
50814 
50815 
50816 
50817 
50818 
50819 
50820 
50821 
50822 
50823 
50824 
50825 
50826 
50827 
50828 
50829 
50830 
50831 
50832 
50833 
50834     # Execute function body
50835 
50836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50837 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50838   supports=yes
50839 
50840   saved_cxxflags="$CXXFLAGS"
50841   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50842   ac_ext=cpp
50843 ac_cpp='$CXXCPP $CPPFLAGS'
50844 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50845 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50846 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50847 
50848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50849 /* end confdefs.h.  */
50850 int i;
50851 _ACEOF
50852 if ac_fn_cxx_try_compile "$LINENO"; then :
50853 
50854 else
50855   supports=no
50856 fi
50857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50858   ac_ext=cpp
50859 ac_cpp='$CXXCPP $CPPFLAGS'
50860 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50861 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50862 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50863 
50864   CXXFLAGS="$saved_cxxflags"
50865 
50866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50867 $as_echo "$supports" >&6; }
50868   if test "x$supports" = "xyes" ; then
50869     :
50870     CXX_COMP_SUPPORTS="yes"
50871   else
50872     :
50873     CXX_COMP_SUPPORTS="no"
50874   fi
50875 
50876 
50877 
50878 
50879 
50880 
50881 
50882 
50883 
50884 
50885 
50886 
50887 
50888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50889 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50890   supports=no
50891   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50892 
50893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50894 $as_echo "$supports" >&6; }
50895   if test "x$supports" = "xyes" ; then
50896     :
50897 
50898   else
50899     :
50900     STACK_PROTECTOR_CFLAG=""
50901   fi
50902 
50903 
50904 
50905 
50906 
50907 
50908 
50909       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50910       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50911       if test "x$STACK_PROTECTOR_CFLAG" != x; then
50912         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50913       fi
50914       ;;
50915     esac
50916   fi
50917 
50918   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50919     if test "x$DEBUG_LEVEL" != xrelease; then
50920       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50921         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50922       fi
50923     fi
50924   fi
50925 
50926   # Optimization levels
50927   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50928     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50929 
50930     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50931       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50932       C_O_FLAG_HIGHEST_JVM="-xO4"
50933       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50934       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50935       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50936       C_O_FLAG_DEBUG="-xregs=no%frameptr"
50937       C_O_FLAG_DEBUG_JVM=""
50938       C_O_FLAG_NONE="-xregs=no%frameptr"
50939       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50940       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50941       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50942       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50943       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50944       CXX_O_FLAG_DEBUG_JVM=""
50945       CXX_O_FLAG_NONE="-xregs=no%frameptr"
50946       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50947         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50948         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50949       fi
50950     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50951       C_O_FLAG_HIGHEST_JVM="-xO4"
50952       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50953       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50954       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50955       C_O_FLAG_DEBUG=""
50956       C_O_FLAG_DEBUG_JVM=""
50957       C_O_FLAG_NONE=""
50958       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50959       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50960       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50961       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50962       CXX_O_FLAG_DEBUG=""
50963       CXX_O_FLAG_DEBUG_JVM=""
50964       CXX_O_FLAG_NONE=""
50965     fi
50966   else
50967     # The remaining toolchains share opt flags between CC and CXX;
50968     # setup for C and duplicate afterwards.
50969     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50970       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50971         # On MacOSX we optimize for size, something
50972         # we should do for all platforms?
50973         C_O_FLAG_HIGHEST_JVM="-Os"
50974         C_O_FLAG_HIGHEST="-Os"
50975         C_O_FLAG_HI="-Os"
50976         C_O_FLAG_NORM="-Os"
50977         C_O_FLAG_SIZE="-Os"
50978       else
50979         C_O_FLAG_HIGHEST_JVM="-O3"
50980         C_O_FLAG_HIGHEST="-O3"
50981         C_O_FLAG_HI="-O3"
50982         C_O_FLAG_NORM="-O2"
50983         C_O_FLAG_SIZE="-Os"
50984       fi
50985       C_O_FLAG_DEBUG="-O0"
50986       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50987         C_O_FLAG_DEBUG_JVM=""
50988       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50989         C_O_FLAG_DEBUG_JVM="-O0"
50990       fi
50991       C_O_FLAG_NONE="-O0"
50992     elif test "x$TOOLCHAIN_TYPE" = xclang; then
50993       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50994         # On MacOSX we optimize for size, something
50995         # we should do for all platforms?
50996         C_O_FLAG_HIGHEST_JVM="-Os"
50997         C_O_FLAG_HIGHEST="-Os"
50998         C_O_FLAG_HI="-Os"
50999         C_O_FLAG_NORM="-Os"
51000         C_O_FLAG_SIZE="-Os"
51001       else
51002         C_O_FLAG_HIGHEST_JVM="-O3"
51003         C_O_FLAG_HIGHEST="-O3"
51004         C_O_FLAG_HI="-O3"
51005         C_O_FLAG_NORM="-O2"
51006         C_O_FLAG_SIZE="-Os"
51007       fi
51008       C_O_FLAG_DEBUG="-O0"
51009       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51010         C_O_FLAG_DEBUG_JVM=""
51011       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51012         C_O_FLAG_DEBUG_JVM="-O0"
51013       fi
51014       C_O_FLAG_NONE="-O0"
51015     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51016       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
51017       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
51018       C_O_FLAG_HI="-O3 -qinline -qinlglue"
51019       C_O_FLAG_NORM="-O2"
51020       C_O_FLAG_DEBUG="-qnoopt"
51021       # FIXME: Value below not verified.
51022       C_O_FLAG_DEBUG_JVM=""
51023       C_O_FLAG_NONE="-qnoopt"
51024     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51025       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
51026       C_O_FLAG_HIGHEST="-O2"
51027       C_O_FLAG_HI="-O1"
51028       C_O_FLAG_NORM="-O1"
51029       C_O_FLAG_DEBUG="-Od"
51030       C_O_FLAG_DEBUG_JVM=""
51031       C_O_FLAG_NONE="-Od"
51032       C_O_FLAG_SIZE="-Os"
51033     fi
51034     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
51035     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
51036     CXX_O_FLAG_HI="$C_O_FLAG_HI"
51037     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
51038     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
51039     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
51040     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
51041     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
51042   fi
51043 
51044   # Adjust optimization flags according to debug level.
51045   case $DEBUG_LEVEL in
51046     release )
51047       # no adjustment
51048       ;;
51049     fastdebug )
51050       # Not quite so much optimization
51051       C_O_FLAG_HI="$C_O_FLAG_NORM"
51052       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
51053       ;;
51054     slowdebug )
51055       # Disable optimization
51056       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
51057       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
51058       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
51059       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
51060       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
51061       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
51062       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
51063       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
51064       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
51065       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
51066       ;;
51067   esac
51068 
51069 
51070 
51071 
51072 
51073 
51074 
51075 
51076 
51077 
51078 
51079 
51080 
51081 
51082 
51083 
51084 
51085 
51086 
51087 
51088 # Check whether --with-abi-profile was given.
51089 if test "${with_abi_profile+set}" = set; then :
51090   withval=$with_abi_profile;
51091 fi
51092 
51093 
51094   if test "x$with_abi_profile" != x; then
51095     if test "x$OPENJDK_TARGET_CPU" != xarm && \
51096         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
51097       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
51098     fi
51099 
51100     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
51101     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
51102 $as_echo_n "checking for ABI profle... " >&6; }
51103     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
51104 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
51105 
51106     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
51107       ARM_FLOAT_TYPE=vfp-sflt
51108       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51109     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
51110       ARM_FLOAT_TYPE=vfp-hflt
51111       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51112     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
51113       ARM_FLOAT_TYPE=sflt
51114       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51115     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
51116       ARM_FLOAT_TYPE=vfp-sflt
51117       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51118     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
51119       ARM_FLOAT_TYPE=vfp-hflt
51120       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
51121     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
51122       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51123       ARM_FLOAT_TYPE=
51124       ARM_ARCH_TYPE_FLAGS=
51125     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51126       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51127       ARM_FLOAT_TYPE=
51128       ARM_ARCH_TYPE_FLAGS=
51129     else
51130       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51131     fi
51132 
51133     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51134       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51135     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51136       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51137     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51138       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51139     fi
51140     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51141 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51142     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51143 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51144 
51145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51146 $as_echo_n "checking for arch type flags... " >&6; }
51147     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51148 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51149 
51150     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51151     # autoconf target triplet.
51152      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51153     # Sanity check that it is a known ABI.
51154     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51155         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51156         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51157           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51158 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51159     fi
51160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51161 $as_echo_n "checking for ABI property name... " >&6; }
51162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51163 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51164 
51165 
51166     # Pass these on to the open part of configure as if they were set using
51167     # --with-extra-c[xx]flags.
51168     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51169     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51170     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51171     # FIXME: This should not really be set using extra_cflags.
51172     if test "x$OPENJDK_TARGET_CPU" = xarm; then
51173         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51174         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51175     fi
51176     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51177     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51178     # And pass the architecture flags to the linker as well
51179     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51180   fi
51181 
51182   # When building with an abi profile, the name of that profile is appended on the
51183   # bundle platform, which is used in bundle names.
51184   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51185     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51186   fi
51187 
51188 
51189   # Optional POSIX functionality needed by the JVM
51190   #
51191   # Check if clock_gettime is available and in which library. This indicates
51192   # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51193   # don't let it update LIBS.
51194   save_LIBS="$LIBS"
51195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51196 $as_echo_n "checking for library containing clock_gettime... " >&6; }
51197 if ${ac_cv_search_clock_gettime+:} false; then :
51198   $as_echo_n "(cached) " >&6
51199 else
51200   ac_func_search_save_LIBS=$LIBS
51201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51202 /* end confdefs.h.  */
51203 
51204 /* Override any GCC internal prototype to avoid an error.
51205    Use char because int might match the return type of a GCC
51206    builtin and then its argument prototype would still apply.  */
51207 #ifdef __cplusplus
51208 extern "C"
51209 #endif
51210 char clock_gettime ();
51211 int
51212 main ()
51213 {
51214 return clock_gettime ();
51215   ;
51216   return 0;
51217 }
51218 _ACEOF
51219 for ac_lib in '' rt; do
51220   if test -z "$ac_lib"; then
51221     ac_res="none required"
51222   else
51223     ac_res=-l$ac_lib
51224     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51225   fi
51226   if ac_fn_cxx_try_link "$LINENO"; then :
51227   ac_cv_search_clock_gettime=$ac_res
51228 fi
51229 rm -f core conftest.err conftest.$ac_objext \
51230     conftest$ac_exeext
51231   if ${ac_cv_search_clock_gettime+:} false; then :
51232   break
51233 fi
51234 done
51235 if ${ac_cv_search_clock_gettime+:} false; then :
51236 
51237 else
51238   ac_cv_search_clock_gettime=no
51239 fi
51240 rm conftest.$ac_ext
51241 LIBS=$ac_func_search_save_LIBS
51242 fi
51243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51244 $as_echo "$ac_cv_search_clock_gettime" >&6; }
51245 ac_res=$ac_cv_search_clock_gettime
51246 if test "$ac_res" != no; then :
51247   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51248   HAS_CLOCK_GETTIME=true
51249 fi
51250 
51251   if test "x$LIBS" = "x-lrt "; then
51252     CLOCK_GETTIME_IN_LIBRT=true
51253   fi
51254   LIBS="$save_LIBS"
51255 
51256 
51257   # Special extras...
51258   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51259     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51260       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51261       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51262     fi
51263     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51264     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51265   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51266     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51267     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51268   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51269     CXXSTD_CXXFLAG="-std=gnu++98"
51270 
51271 
51272 
51273 
51274 
51275 
51276 
51277 
51278 
51279 
51280 
51281 
51282 
51283 
51284 
51285 
51286 
51287 
51288 
51289 
51290 
51291 
51292 
51293 
51294 
51295 
51296 
51297 
51298 
51299 
51300 
51301 
51302 
51303 
51304 
51305 
51306 
51307 
51308 
51309 
51310 
51311 
51312     # Execute function body
51313 
51314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51315 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51316   supports=yes
51317 
51318   saved_cxxflags="$CXXFLAGS"
51319   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51320   ac_ext=cpp
51321 ac_cpp='$CXXCPP $CPPFLAGS'
51322 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51323 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51324 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51325 
51326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51327 /* end confdefs.h.  */
51328 int i;
51329 _ACEOF
51330 if ac_fn_cxx_try_compile "$LINENO"; then :
51331 
51332 else
51333   supports=no
51334 fi
51335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51336   ac_ext=cpp
51337 ac_cpp='$CXXCPP $CPPFLAGS'
51338 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51339 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51340 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51341 
51342   CXXFLAGS="$saved_cxxflags"
51343 
51344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51345 $as_echo "$supports" >&6; }
51346   if test "x$supports" = "xyes" ; then
51347     :
51348 
51349   else
51350     :
51351     CXXSTD_CXXFLAG=""
51352   fi
51353 
51354 
51355 
51356 
51357 
51358 
51359 
51360 
51361 
51362 
51363 
51364 
51365     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51366     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51367 
51368   fi
51369   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51370     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51371     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51372   fi
51373 
51374   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51375   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51376   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51377 
51378   ###############################################################################
51379   #
51380   # Now setup the CFLAGS and LDFLAGS for the JDK build.
51381   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51382   #
51383 
51384   # Setup compiler/platform specific flags into
51385   #    CFLAGS_JDK    - C Compiler flags
51386   #    CXXFLAGS_JDK  - C++ Compiler flags
51387   #    COMMON_CCXXFLAGS_JDK - common to C and C++
51388   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51389     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51390     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51391     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51392     if test "x$OPENJDK_TARGET_CPU" = xx86; then
51393       # Force compatibility with i586 on 32 bit intel platforms.
51394       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51395       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51396     fi
51397     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51398         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51399     case $OPENJDK_TARGET_CPU_ARCH in
51400       arm )
51401         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51402         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51403         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51404         ;;
51405       ppc )
51406         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51407         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51408         ;;
51409       s390 )
51410         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51411         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51412         ;;
51413       * )
51414         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51415         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51416         ;;
51417     esac
51418 
51419 
51420 
51421 
51422 
51423 
51424 
51425 
51426 
51427 
51428 
51429 
51430 
51431 
51432 
51433 
51434 
51435 
51436 
51437 
51438 
51439 
51440 
51441 
51442 
51443 
51444 
51445 
51446 
51447 
51448 
51449 
51450 
51451 
51452 
51453 
51454 
51455 
51456 
51457 
51458 
51459 
51460 
51461 
51462 
51463 
51464 
51465 
51466 
51467 
51468 
51469 
51470 
51471 
51472     # Execute function body
51473 
51474   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51475   REFERENCE_VERSION=6
51476 
51477   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51478     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51479   fi
51480 
51481   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51482     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51483   fi
51484 
51485   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51486   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51487 
51488   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51489     :
51490 
51491   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51492   # runs afoul of the more aggressive versions of these optimisations.
51493   # Notably, value range propagation now assumes that the this pointer of C++
51494   # member functions is non-null.
51495   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51496         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51497         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51498 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51499   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51500   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51501 
51502   else
51503     :
51504 
51505   fi
51506 
51507 
51508 
51509 
51510 
51511 
51512 
51513 
51514 
51515 
51516 
51517 
51518 
51519 
51520   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51521     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51522 
51523     # Restrict the debug information created by Clang to avoid
51524     # too big object files and speed the build up a little bit
51525     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51526     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51527     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51528       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51529         # Force compatibility with i586 on 32 bit intel platforms.
51530         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51531         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51532       fi
51533       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51534       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51535           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51536       case $OPENJDK_TARGET_CPU_ARCH in
51537         ppc )
51538           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51539           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51540           ;;
51541         * )
51542           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51543           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51544           ;;
51545       esac
51546     fi
51547   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51548     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51549     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51550     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51551       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51552     fi
51553 
51554     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51555     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51556   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51557     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51558     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51559     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51560   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51561     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51562         -MD -Zc:wchar_t- -W3 -wd4800 \
51563         -DWIN32_LEAN_AND_MEAN \
51564         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51565         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51566         -DWIN32 -DIAL"
51567     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51568       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51569     else
51570       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51571     fi
51572     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51573     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51574     # studio.
51575     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51576       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51577       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51578       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51579     fi
51580   fi
51581 
51582   ###############################################################################
51583 
51584   # Adjust flags according to debug level.
51585   case $DEBUG_LEVEL in
51586     fastdebug | slowdebug )
51587       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51588       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51589       ;;
51590     release )
51591       ;;
51592     * )
51593       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51594       ;;
51595   esac
51596 
51597   # Set some common defines. These works for all compilers, but assume
51598   # -D is universally accepted.
51599 
51600   # Setup endianness
51601   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51602     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51603     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51604     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51605     #   Note: -Dmacro         is the same as    #define macro 1
51606     #         -Dmacro=        is the same as    #define macro
51607     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51608       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51609     else
51610       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51611     fi
51612   else
51613     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51614     # are defined in the system?
51615     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51616       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51617     else
51618       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51619     fi
51620   fi
51621 
51622   # Always enable optional macros for VM.
51623   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51624   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51625   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51626 
51627   # Setup target OS define. Use OS target name but in upper case.
51628   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51629   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51630 
51631   # Setup target CPU
51632   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51633       $OPENJDK_TARGET_ADD_LP64 \
51634       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51635 
51636   # Setup debug/release defines
51637   if test "x$DEBUG_LEVEL" = xrelease; then
51638     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51639     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51640       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51641     fi
51642   else
51643     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51644   fi
51645 
51646   # Optional POSIX functionality needed by the VM
51647 
51648   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51649     JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51650     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51651       JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51652     fi
51653   fi
51654 
51655 
51656   # Set some additional per-OS defines.
51657   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51658     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51659     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51660         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51661   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51662     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51663     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51664         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51665   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51666     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51667     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51668     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51669     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51670         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51671         -fno-omit-frame-pointer"
51672   elif test "x$OPENJDK_TARGET_OS" = xaix; then
51673     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51674     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51675         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51676         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51677     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51678     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51679     # so for slowdebug we build with '-qpic=large -bbigtoc'.
51680     if test "x$DEBUG_LEVEL" = xslowdebug; then
51681       JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51682     fi
51683   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51684     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51685   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51686     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51687     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51688   fi
51689 
51690   # Set some additional per-CPU defines.
51691   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51692     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51693   elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
51694     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51695   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51696     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51697       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51698       # fixes `relocation truncated to fit' error for gcc 4.1.
51699       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51700       # Use ppc64 instructions, but schedule for power5
51701       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51702     elif test "x$OPENJDK_TARGET_OS" = xaix; then
51703       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51704     fi
51705   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51706     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51707       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51708       # Little endian machine uses ELFv2 ABI.
51709       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51710       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51711       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51712     fi
51713   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51714     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51715       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51716     fi
51717   fi
51718 
51719   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51720     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51721   fi
51722 
51723   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51724     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51725       # Solaris does not have _LP64=1 in the old build.
51726       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51727       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51728     fi
51729   fi
51730 
51731   # Set JVM_CFLAGS warning handling
51732   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51733     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51734         -Wunused-value -Woverloaded-virtual"
51735 
51736     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51737 
51738 
51739 
51740 
51741 
51742 
51743 
51744 
51745 
51746 
51747 
51748 
51749 
51750 
51751 
51752 
51753 
51754 
51755 
51756 
51757 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766 
51767 
51768 
51769 
51770 
51771 
51772 
51773 
51774 
51775 
51776 
51777 
51778 
51779 
51780 
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791     # Execute function body
51792 
51793   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51794   REFERENCE_VERSION=4.8
51795 
51796   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51797     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51798   fi
51799 
51800   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51801     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51802   fi
51803 
51804   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51805   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51806 
51807   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51808     :
51809 
51810             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51811             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51812 
51813 
51814   else
51815     :
51816 
51817   fi
51818 
51819 
51820 
51821 
51822 
51823 
51824 
51825 
51826 
51827 
51828 
51829 
51830 
51831 
51832     fi
51833     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51834       # Non-zero builds have stricter warnings
51835       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51836     else
51837       if test "x$TOOLCHAIN_TYPE" = xclang; then
51838         # Some versions of llvm do not like -Wundef
51839         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51840       fi
51841     fi
51842   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51843     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51844         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51845   fi
51846 
51847   # Additional macosx handling
51848   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51849     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51850     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51851     # JDK can be built and makes the linked binaries compatible even if built on
51852     # a newer version of the OS.
51853     MACOSX_VERSION_MIN=10.7.0
51854 
51855 
51856     # Setting --with-macosx-version-max=<version> makes it an error to build or
51857     # link to macosx APIs that are newer than the given OS version. The expected
51858     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51859 
51860 # Check whether --with-macosx-version-max was given.
51861 if test "${with_macosx_version_max+set}" = set; then :
51862   withval=$with_macosx_version_max;
51863           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51864               MACOSX_VERSION_MAX=$with_macosx_version_max
51865           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51866               MACOSX_VERSION_MAX=$with_macosx_version_max
51867           elif test "x$with_macosx_version_max" = "xno"; then
51868               # Use build system default
51869               MACOSX_VERSION_MAX=
51870           else
51871               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51872           fi
51873 
51874 else
51875   MACOSX_VERSION_MAX=
51876 
51877 fi
51878 
51879 
51880 
51881     # Let the flags variables get resolved in make for easier override on make
51882     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51883     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51884         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51885         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51886     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51887     JVM_CFLAGS="$JVM_CFLAGS \
51888         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51889         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51890 
51891     if test -n "$MACOSX_VERSION_MAX"; then
51892         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51893             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51894         JVM_CFLAGS="$JVM_CFLAGS \
51895             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51896     fi
51897   fi
51898 
51899   # Setup some hard coded includes
51900   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51901       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51902       -I${TOPDIR}/src/java.base/share/native/include \
51903       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51904       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51905       -I${TOPDIR}/src/java.base/share/native/libjava \
51906       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51907 
51908   # The shared libraries are compiled using the picflag.
51909   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51910       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51911   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51912       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51913 
51914   # Executable flags
51915   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51916   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51917 
51918 
51919 
51920 
51921 
51922 
51923   # Setup LDFLAGS et al.
51924   #
51925 
51926   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51927     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51928     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51929     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51930     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51931       LDFLAGS_SAFESH="-safeseh"
51932       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51933       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51934       # NOTE: Old build added -machine. Probably not needed.
51935       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51936     else
51937       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51938     fi
51939   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51940       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51941       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51942         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51943         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51944     fi
51945   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51946     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51947     # We have previously set HAS_GNU_HASH if this is the case
51948     if test -n "$HAS_GNU_HASH"; then
51949       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51950       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51951       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51952     fi
51953       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51954         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51955     fi
51956     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51957       # And since we now know that the linker is gnu, then add -z defs, to forbid
51958       # undefined symbols in object files.
51959       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51960       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51961       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51962       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51963       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51964       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51965         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51966       fi
51967       case $DEBUG_LEVEL in
51968         release )
51969           # tell linker to optimize libraries.
51970           # Should this be supplied to the OSS linker as well?
51971           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51972           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51973           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51974           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51975             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51976           fi
51977           ;;
51978         slowdebug )
51979           # Hotspot always let the linker optimize
51980           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51981           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51982             # do relocations at load
51983             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51984             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51985             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51986           fi
51987           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51988             # mark relocations read only
51989             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51990             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51991             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51992           fi
51993           ;;
51994         fastdebug )
51995           # Hotspot always let the linker optimize
51996           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51997           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51998             # mark relocations read only
51999             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
52000             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52001             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
52002           fi
52003           ;;
52004         * )
52005           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52006           ;;
52007         esac
52008     fi
52009   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52010     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52011     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52012     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52013     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52014     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52015     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
52016       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
52017     fi
52018   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52019     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52020     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
52021     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
52022     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52023     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52024     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52025     if test "x$DEBUG_LEVEL" = xslowdebug; then
52026       JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
52027     fi
52028   fi
52029 
52030   # Customize LDFLAGS for executables
52031 
52032   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
52033 
52034   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52035     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
52036       LDFLAGS_STACK_SIZE=1048576
52037     else
52038       LDFLAGS_STACK_SIZE=327680
52039     fi
52040     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52041   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52042     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52043   fi
52044 
52045   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
52046 
52047   # Customize LDFLAGS for libs
52048   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
52049 
52050   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52051   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52052     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52053         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52054     JDKLIB_LIBS=""
52055   else
52056     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52057         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52058 
52059     if test "xTARGET" = "xTARGET"; then
52060       # On some platforms (mac) the linker warns about non existing -L dirs.
52061       # For any of the variants server, client or minimal, the dir matches the
52062       # variant name. The "main" variant should be used for linking. For the
52063       # rest, the dir is just server.
52064       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52065           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52066         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52067             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52068       else
52069         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52070             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52071       fi
52072     elif test "xTARGET" = "xBUILD"; then
52073       # When building a buildjdk, it's always only the server variant
52074       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52075           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52076     fi
52077 
52078     JDKLIB_LIBS="-ljava -ljvm"
52079     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52080       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
52081     fi
52082 
52083   fi
52084 
52085 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
52086 
52087   # Set JVM_LIBS (per os)
52088   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52089     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
52090   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52091     # FIXME: This hard-coded path is not really proper.
52092     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52093       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52094     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
52095       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52096     fi
52097     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52098         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52099   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52100     JVM_LIBS="$JVM_LIBS -lm"
52101   elif test "x$OPENJDK_TARGET_OS" = xaix; then
52102     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52103   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52104     JVM_LIBS="$JVM_LIBS -lm"
52105   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52106     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52107         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52108         wsock32.lib winmm.lib version.lib psapi.lib"
52109     fi
52110 
52111   # Set JVM_ASFLAGS
52112   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52113     if test "x$OPENJDK_TARGET_CPU" = xx86; then
52114       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
52115     fi
52116   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52117     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52118   fi
52119 
52120   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
52121 
52122 
52123 
52124 
52125 
52126 
52127 
52128 
52129 
52130 
52131 
52132 
52133 
52134 
52135 
52136   # Special extras...
52137   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52138     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52139       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52140       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52141     fi
52142     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52143     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52144   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52145     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52146     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52147   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52148     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52149 
52150 
52151 
52152 
52153 
52154 
52155 
52156 
52157 
52158 
52159 
52160 
52161 
52162 
52163 
52164 
52165 
52166 
52167 
52168 
52169 
52170 
52171 
52172 
52173 
52174 
52175 
52176 
52177 
52178 
52179 
52180 
52181 
52182 
52183 
52184 
52185 
52186 
52187 
52188 
52189 
52190 
52191     # Execute function body
52192 
52193   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52194 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52195   supports=yes
52196 
52197   saved_cxxflags="$CXXFLAGS"
52198   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52199   ac_ext=cpp
52200 ac_cpp='$CXXCPP $CPPFLAGS'
52201 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52202 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52203 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52204 
52205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52206 /* end confdefs.h.  */
52207 int i;
52208 _ACEOF
52209 if ac_fn_cxx_try_compile "$LINENO"; then :
52210 
52211 else
52212   supports=no
52213 fi
52214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52215   ac_ext=cpp
52216 ac_cpp='$CXXCPP $CPPFLAGS'
52217 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52218 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52219 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52220 
52221   CXXFLAGS="$saved_cxxflags"
52222 
52223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52224 $as_echo "$supports" >&6; }
52225   if test "x$supports" = "xyes" ; then
52226     :
52227 
52228   else
52229     :
52230     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52231   fi
52232 
52233 
52234 
52235 
52236 
52237 
52238 
52239 
52240 
52241 
52242 
52243 
52244     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52245     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52246 
52247   fi
52248   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52249     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52250     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52251   fi
52252 
52253   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52254   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52255   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52256 
52257   ###############################################################################
52258   #
52259   # Now setup the CFLAGS and LDFLAGS for the JDK build.
52260   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52261   #
52262 
52263   # Setup compiler/platform specific flags into
52264   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52265   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52266   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52267   if test "x$TOOLCHAIN_TYPE" = xgcc; then
52268     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52269     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52270     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52271     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52272       # Force compatibility with i586 on 32 bit intel platforms.
52273       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52274       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52275     fi
52276     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52277         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52278     case $OPENJDK_BUILD_CPU_ARCH in
52279       arm )
52280         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52281         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52282         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52283         ;;
52284       ppc )
52285         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52286         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52287         ;;
52288       s390 )
52289         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52290         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52291         ;;
52292       * )
52293         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52294         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52295         ;;
52296     esac
52297 
52298 
52299 
52300 
52301 
52302 
52303 
52304 
52305 
52306 
52307 
52308 
52309 
52310 
52311 
52312 
52313 
52314 
52315 
52316 
52317 
52318 
52319 
52320 
52321 
52322 
52323 
52324 
52325 
52326 
52327 
52328 
52329 
52330 
52331 
52332 
52333 
52334 
52335 
52336 
52337 
52338 
52339 
52340 
52341 
52342 
52343 
52344 
52345 
52346 
52347 
52348 
52349 
52350 
52351     # Execute function body
52352 
52353   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52354   REFERENCE_VERSION=6
52355 
52356   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52357     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52358   fi
52359 
52360   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52361     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52362   fi
52363 
52364   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52365   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52366 
52367   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52368     :
52369 
52370   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52371   # runs afoul of the more aggressive versions of these optimisations.
52372   # Notably, value range propagation now assumes that the this pointer of C++
52373   # member functions is non-null.
52374   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52375         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52376         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52377 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52378   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52379   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52380 
52381   else
52382     :
52383 
52384   fi
52385 
52386 
52387 
52388 
52389 
52390 
52391 
52392 
52393 
52394 
52395 
52396 
52397 
52398 
52399   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52400     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52401 
52402     # Restrict the debug information created by Clang to avoid
52403     # too big object files and speed the build up a little bit
52404     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52405     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52406     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52407       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52408         # Force compatibility with i586 on 32 bit intel platforms.
52409         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52410         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52411       fi
52412       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52413       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52414           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52415       case $OPENJDK_BUILD_CPU_ARCH in
52416         ppc )
52417           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52418           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52419           ;;
52420         * )
52421           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52422           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52423           ;;
52424       esac
52425     fi
52426   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52427     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52428     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52429     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52430       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52431     fi
52432 
52433     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52434     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52435   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52436     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52437     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52438     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52439   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52440     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52441         -MD -Zc:wchar_t- -W3 -wd4800 \
52442         -DWIN32_LEAN_AND_MEAN \
52443         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52444         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52445         -DWIN32 -DIAL"
52446     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52447       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52448     else
52449       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52450     fi
52451     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52452     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52453     # studio.
52454     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52455       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52456       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52457       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52458     fi
52459   fi
52460 
52461   ###############################################################################
52462 
52463   # Adjust flags according to debug level.
52464   case $DEBUG_LEVEL in
52465     fastdebug | slowdebug )
52466       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52467       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52468       ;;
52469     release )
52470       ;;
52471     * )
52472       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52473       ;;
52474   esac
52475 
52476   # Set some common defines. These works for all compilers, but assume
52477   # -D is universally accepted.
52478 
52479   # Setup endianness
52480   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52481     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52482     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52483     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52484     #   Note: -Dmacro         is the same as    #define macro 1
52485     #         -Dmacro=        is the same as    #define macro
52486     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52487       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52488     else
52489       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52490     fi
52491   else
52492     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52493     # are defined in the system?
52494     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52495       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52496     else
52497       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52498     fi
52499   fi
52500 
52501   # Always enable optional macros for VM.
52502   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52503   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52504   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52505 
52506   # Setup target OS define. Use OS target name but in upper case.
52507   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52508   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52509 
52510   # Setup target CPU
52511   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52512       $OPENJDK_BUILD_ADD_LP64 \
52513       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52514 
52515   # Setup debug/release defines
52516   if test "x$DEBUG_LEVEL" = xrelease; then
52517     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52518     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52519       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52520     fi
52521   else
52522     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52523   fi
52524 
52525   # Optional POSIX functionality needed by the VM
52526 
52527   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52528     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52529     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52530       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52531     fi
52532   fi
52533 
52534 
52535   # Set some additional per-OS defines.
52536   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52537     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52538     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52539         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52540   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52541     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52542     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52543         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52544   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52545     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52546     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52547     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52548     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52549         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52550         -fno-omit-frame-pointer"
52551   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52552     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52553     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52554         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52555         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52556     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52557     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52558     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52559     if test "x$DEBUG_LEVEL" = xslowdebug; then
52560       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52561     fi
52562   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52563     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52564   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52565     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52566     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52567   fi
52568 
52569   # Set some additional per-CPU defines.
52570   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52571     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52572   elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
52573     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52574   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52575     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52576       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52577       # fixes `relocation truncated to fit' error for gcc 4.1.
52578       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52579       # Use ppc64 instructions, but schedule for power5
52580       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52581     elif test "x$OPENJDK_BUILD_OS" = xaix; then
52582       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52583     fi
52584   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52585     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52586       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52587       # Little endian machine uses ELFv2 ABI.
52588       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52589       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52590       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52591     fi
52592   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52593     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52594       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52595     fi
52596   fi
52597 
52598   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52599     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52600   fi
52601 
52602   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52603     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52604       # Solaris does not have _LP64=1 in the old build.
52605       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52606       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52607     fi
52608   fi
52609 
52610   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52611   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52612     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52613         -Wunused-value -Woverloaded-virtual"
52614 
52615     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52616 
52617 
52618 
52619 
52620 
52621 
52622 
52623 
52624 
52625 
52626 
52627 
52628 
52629 
52630 
52631 
52632 
52633 
52634 
52635 
52636 
52637 
52638 
52639 
52640 
52641 
52642 
52643 
52644 
52645 
52646 
52647 
52648 
52649 
52650 
52651 
52652 
52653 
52654 
52655 
52656 
52657 
52658 
52659 
52660 
52661 
52662 
52663 
52664 
52665 
52666 
52667 
52668 
52669 
52670     # Execute function body
52671 
52672   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52673   REFERENCE_VERSION=4.8
52674 
52675   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52676     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52677   fi
52678 
52679   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52680     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52681   fi
52682 
52683   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52684   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52685 
52686   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52687     :
52688 
52689             # These flags either do not work or give spurious warnings prior to gcc 4.8.
52690             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52691 
52692 
52693   else
52694     :
52695 
52696   fi
52697 
52698 
52699 
52700 
52701 
52702 
52703 
52704 
52705 
52706 
52707 
52708 
52709 
52710 
52711     fi
52712     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52713       # Non-zero builds have stricter warnings
52714       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52715     else
52716       if test "x$TOOLCHAIN_TYPE" = xclang; then
52717         # Some versions of llvm do not like -Wundef
52718         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52719       fi
52720     fi
52721   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52722     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52723         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52724   fi
52725 
52726   # Additional macosx handling
52727   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52728     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52729     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52730     # JDK can be built and makes the linked binaries compatible even if built on
52731     # a newer version of the OS.
52732     MACOSX_VERSION_MIN=10.7.0
52733 
52734 
52735     # Setting --with-macosx-version-max=<version> makes it an error to build or
52736     # link to macosx APIs that are newer than the given OS version. The expected
52737     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52738 
52739 # Check whether --with-macosx-version-max was given.
52740 if test "${with_macosx_version_max+set}" = set; then :
52741   withval=$with_macosx_version_max;
52742           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52743               MACOSX_VERSION_MAX=$with_macosx_version_max
52744           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52745               MACOSX_VERSION_MAX=$with_macosx_version_max
52746           elif test "x$with_macosx_version_max" = "xno"; then
52747               # Use build system default
52748               MACOSX_VERSION_MAX=
52749           else
52750               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52751           fi
52752 
52753 else
52754   MACOSX_VERSION_MAX=
52755 
52756 fi
52757 
52758 
52759 
52760     # Let the flags variables get resolved in make for easier override on make
52761     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52762     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52763         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52764         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52765     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52766     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52767         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52768         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52769 
52770     if test -n "$MACOSX_VERSION_MAX"; then
52771         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52772             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52773         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52774             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52775     fi
52776   fi
52777 
52778   # Setup some hard coded includes
52779   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52780       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52781       -I${TOPDIR}/src/java.base/share/native/include \
52782       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52783       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52784       -I${TOPDIR}/src/java.base/share/native/libjava \
52785       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52786 
52787   # The shared libraries are compiled using the picflag.
52788   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52789       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52790   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52791       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52792 
52793   # Executable flags
52794   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52795   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52796 
52797 
52798 
52799 
52800 
52801 
52802   # Setup LDFLAGS et al.
52803   #
52804 
52805   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52806     LDFLAGS_MICROSOFT="-nologo -opt:ref"
52807     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52808     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52809     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52810       LDFLAGS_SAFESH="-safeseh"
52811       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52812       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52813       # NOTE: Old build added -machine. Probably not needed.
52814       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52815     else
52816       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52817     fi
52818   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52819       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52820       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52821         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52822         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52823     fi
52824   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52825     # If this is a --hash-style=gnu system, use --hash-style=both, why?
52826     # We have previously set HAS_GNU_HASH if this is the case
52827     if test -n "$HAS_GNU_HASH"; then
52828       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52829       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52830       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52831     fi
52832       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52833         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52834     fi
52835     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52836       # And since we now know that the linker is gnu, then add -z defs, to forbid
52837       # undefined symbols in object files.
52838       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52839       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52840       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52841       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52842       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52843       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52844         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52845       fi
52846       case $DEBUG_LEVEL in
52847         release )
52848           # tell linker to optimize libraries.
52849           # Should this be supplied to the OSS linker as well?
52850           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52851           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52852           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52853           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52854             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52855           fi
52856           ;;
52857         slowdebug )
52858           # Hotspot always let the linker optimize
52859           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52860           if test "x$HAS_LINKER_NOW" = "xtrue"; then
52861             # do relocations at load
52862             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52863             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52864             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52865           fi
52866           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52867             # mark relocations read only
52868             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52869             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52870             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52871           fi
52872           ;;
52873         fastdebug )
52874           # Hotspot always let the linker optimize
52875           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52876           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52877             # mark relocations read only
52878             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52879             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52880             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52881           fi
52882           ;;
52883         * )
52884           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52885           ;;
52886         esac
52887     fi
52888   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52889     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52890     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52891     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52892     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52893     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52894     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52895       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52896     fi
52897   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52898     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52899     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52900     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52901     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52902     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52903     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52904     if test "x$DEBUG_LEVEL" = xslowdebug; then
52905       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52906     fi
52907   fi
52908 
52909   # Customize LDFLAGS for executables
52910 
52911   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52912 
52913   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52914     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52915       LDFLAGS_STACK_SIZE=1048576
52916     else
52917       LDFLAGS_STACK_SIZE=327680
52918     fi
52919     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52920   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52921     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52922   fi
52923 
52924   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52925 
52926   # Customize LDFLAGS for libs
52927   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52928 
52929   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52930   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52931     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52932         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52933     OPENJDK_BUILD_JDKLIB_LIBS=""
52934   else
52935     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52936         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52937 
52938     if test "xBUILD" = "xTARGET"; then
52939       # On some platforms (mac) the linker warns about non existing -L dirs.
52940       # For any of the variants server, client or minimal, the dir matches the
52941       # variant name. The "main" variant should be used for linking. For the
52942       # rest, the dir is just server.
52943       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52944           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52945         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52946             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52947       else
52948         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52949             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52950       fi
52951     elif test "xBUILD" = "xBUILD"; then
52952       # When building a buildjdk, it's always only the server variant
52953       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52954           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52955     fi
52956 
52957     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52958     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52959       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52960     fi
52961 
52962   fi
52963 
52964 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52965 
52966   # Set OPENJDK_BUILD_JVM_LIBS (per os)
52967   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52968     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52969   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52970     # FIXME: This hard-coded path is not really proper.
52971     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52972       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52973     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52974       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52975     fi
52976     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52977         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52978   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52979     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52980   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52981     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52982   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52983     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52984   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52985     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52986         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52987         wsock32.lib winmm.lib version.lib psapi.lib"
52988     fi
52989 
52990   # Set OPENJDK_BUILD_JVM_ASFLAGS
52991   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52992     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52993       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52994     fi
52995   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52996     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52997   fi
52998 
52999   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
53000 
53001 
53002 
53003 
53004 
53005 
53006 
53007 
53008 
53009 
53010 
53011 
53012 
53013 
53014 
53015   # Tests are only ever compiled for TARGET
53016   # Flags for compiling test libraries
53017   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
53018   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
53019 
53020   # Flags for compiling test executables
53021   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
53022   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
53023 
53024 
53025 
53026 
53027 
53028 
53029   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
53030   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
53031 
53032 
53033 
53034 
53035 
53036 
53037   # Check that the compiler supports -mX (or -qX on AIX) flags
53038   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
53039 
53040 
53041 
53042 
53043 
53044 
53045 
53046 
53047 
53048 
53049 
53050 
53051 
53052 
53053 
53054 
53055 
53056 
53057 
53058 
53059 
53060 
53061 
53062 
53063 
53064 
53065 
53066 
53067 
53068 
53069 
53070 
53071 
53072 
53073 
53074 
53075 
53076 
53077 
53078 
53079 
53080 
53081 
53082 
53083 
53084 
53085 
53086     # Execute function body
53087 
53088 
53089 
53090 
53091 
53092 
53093 
53094 
53095 
53096 
53097 
53098 
53099 
53100 
53101 
53102 
53103 
53104 
53105 
53106 
53107 
53108 
53109 
53110 
53111 
53112 
53113 
53114 
53115 
53116 
53117 
53118 
53119 
53120 
53121 
53122 
53123 
53124 
53125 
53126 
53127 
53128 
53129 
53130 
53131 
53132 
53133 
53134 
53135     # Execute function body
53136 
53137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53138 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53139   supports=yes
53140 
53141   saved_cflags="$CFLAGS"
53142   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53143   ac_ext=c
53144 ac_cpp='$CPP $CPPFLAGS'
53145 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53146 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53147 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53148 
53149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53150 /* end confdefs.h.  */
53151 int i;
53152 _ACEOF
53153 if ac_fn_c_try_compile "$LINENO"; then :
53154 
53155 else
53156   supports=no
53157 fi
53158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53159   ac_ext=cpp
53160 ac_cpp='$CXXCPP $CPPFLAGS'
53161 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53162 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53163 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53164 
53165   CFLAGS="$saved_cflags"
53166 
53167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53168 $as_echo "$supports" >&6; }
53169   if test "x$supports" = "xyes" ; then
53170     :
53171     C_COMP_SUPPORTS="yes"
53172   else
53173     :
53174     C_COMP_SUPPORTS="no"
53175   fi
53176 
53177 
53178 
53179 
53180 
53181 
53182 
53183 
53184 
53185 
53186 
53187 
53188 
53189 
53190 
53191 
53192 
53193 
53194 
53195 
53196 
53197 
53198 
53199 
53200 
53201 
53202 
53203 
53204 
53205 
53206 
53207 
53208 
53209 
53210 
53211 
53212 
53213 
53214 
53215 
53216 
53217 
53218 
53219 
53220 
53221 
53222 
53223 
53224 
53225 
53226 
53227 
53228 
53229 
53230 
53231 
53232 
53233 
53234 
53235     # Execute function body
53236 
53237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53238 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53239   supports=yes
53240 
53241   saved_cxxflags="$CXXFLAGS"
53242   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53243   ac_ext=cpp
53244 ac_cpp='$CXXCPP $CPPFLAGS'
53245 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53246 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53247 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53248 
53249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53250 /* end confdefs.h.  */
53251 int i;
53252 _ACEOF
53253 if ac_fn_cxx_try_compile "$LINENO"; then :
53254 
53255 else
53256   supports=no
53257 fi
53258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53259   ac_ext=cpp
53260 ac_cpp='$CXXCPP $CPPFLAGS'
53261 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53262 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53263 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53264 
53265   CXXFLAGS="$saved_cxxflags"
53266 
53267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53268 $as_echo "$supports" >&6; }
53269   if test "x$supports" = "xyes" ; then
53270     :
53271     CXX_COMP_SUPPORTS="yes"
53272   else
53273     :
53274     CXX_COMP_SUPPORTS="no"
53275   fi
53276 
53277 
53278 
53279 
53280 
53281 
53282 
53283 
53284 
53285 
53286 
53287 
53288 
53289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53290 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53291   supports=no
53292   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53293 
53294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53295 $as_echo "$supports" >&6; }
53296   if test "x$supports" = "xyes" ; then
53297     :
53298     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53299   else
53300     :
53301     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53302   fi
53303 
53304 
53305 
53306 
53307 
53308 
53309 
53310 
53311   # Check whether --enable-warnings-as-errors was given.
53312 if test "${enable_warnings_as_errors+set}" = set; then :
53313   enableval=$enable_warnings_as_errors;
53314 fi
53315 
53316 
53317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53318 $as_echo_n "checking if native warnings are errors... " >&6; }
53319   if test "x$enable_warnings_as_errors" = "xyes"; then
53320     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53321 $as_echo "yes (explicitly set)" >&6; }
53322     WARNINGS_AS_ERRORS=true
53323   elif test "x$enable_warnings_as_errors" = "xno"; then
53324     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53325 $as_echo "no" >&6; }
53326     WARNINGS_AS_ERRORS=false
53327   elif test "x$enable_warnings_as_errors" = "x"; then
53328     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53329 $as_echo "yes (default)" >&6; }
53330     WARNINGS_AS_ERRORS=true
53331   else
53332     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53333   fi
53334 
53335 
53336 
53337   case "${TOOLCHAIN_TYPE}" in
53338     microsoft)
53339       DISABLE_WARNING_PREFIX="-wd"
53340       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53341       ;;
53342     solstudio)
53343       DISABLE_WARNING_PREFIX="-erroff="
53344       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53345       ;;
53346     gcc)
53347       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53348 
53349 
53350 
53351 
53352 
53353 
53354 
53355 
53356 
53357 
53358 
53359 
53360 
53361 
53362 
53363 
53364 
53365 
53366 
53367 
53368 
53369 
53370 
53371 
53372 
53373 
53374 
53375 
53376 
53377 
53378 
53379 
53380 
53381 
53382 
53383 
53384 
53385 
53386 
53387 
53388 
53389 
53390 
53391 
53392 
53393 
53394 
53395     # Execute function body
53396 
53397 
53398 
53399 
53400 
53401 
53402 
53403 
53404 
53405 
53406 
53407 
53408 
53409 
53410 
53411 
53412 
53413 
53414 
53415 
53416 
53417 
53418 
53419 
53420 
53421 
53422 
53423 
53424 
53425 
53426 
53427 
53428 
53429 
53430 
53431 
53432 
53433 
53434 
53435 
53436 
53437 
53438 
53439 
53440 
53441 
53442 
53443 
53444     # Execute function body
53445 
53446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53447 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53448   supports=yes
53449 
53450   saved_cflags="$CFLAGS"
53451   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53452   ac_ext=c
53453 ac_cpp='$CPP $CPPFLAGS'
53454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53457 
53458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53459 /* end confdefs.h.  */
53460 int i;
53461 _ACEOF
53462 if ac_fn_c_try_compile "$LINENO"; then :
53463 
53464 else
53465   supports=no
53466 fi
53467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53468   ac_ext=cpp
53469 ac_cpp='$CXXCPP $CPPFLAGS'
53470 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53471 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53472 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53473 
53474   CFLAGS="$saved_cflags"
53475 
53476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53477 $as_echo "$supports" >&6; }
53478   if test "x$supports" = "xyes" ; then
53479     :
53480     C_COMP_SUPPORTS="yes"
53481   else
53482     :
53483     C_COMP_SUPPORTS="no"
53484   fi
53485 
53486 
53487 
53488 
53489 
53490 
53491 
53492 
53493 
53494 
53495 
53496 
53497 
53498 
53499 
53500 
53501 
53502 
53503 
53504 
53505 
53506 
53507 
53508 
53509 
53510 
53511 
53512 
53513 
53514 
53515 
53516 
53517 
53518 
53519 
53520 
53521 
53522 
53523 
53524 
53525 
53526 
53527 
53528 
53529 
53530 
53531 
53532 
53533 
53534 
53535 
53536 
53537 
53538 
53539 
53540 
53541 
53542 
53543 
53544     # Execute function body
53545 
53546   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53547 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53548   supports=yes
53549 
53550   saved_cxxflags="$CXXFLAGS"
53551   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53552   ac_ext=cpp
53553 ac_cpp='$CXXCPP $CPPFLAGS'
53554 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53555 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53556 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53557 
53558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53559 /* end confdefs.h.  */
53560 int i;
53561 _ACEOF
53562 if ac_fn_cxx_try_compile "$LINENO"; then :
53563 
53564 else
53565   supports=no
53566 fi
53567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53568   ac_ext=cpp
53569 ac_cpp='$CXXCPP $CPPFLAGS'
53570 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53571 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53572 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53573 
53574   CXXFLAGS="$saved_cxxflags"
53575 
53576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53577 $as_echo "$supports" >&6; }
53578   if test "x$supports" = "xyes" ; then
53579     :
53580     CXX_COMP_SUPPORTS="yes"
53581   else
53582     :
53583     CXX_COMP_SUPPORTS="no"
53584   fi
53585 
53586 
53587 
53588 
53589 
53590 
53591 
53592 
53593 
53594 
53595 
53596 
53597 
53598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53599 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53600   supports=no
53601   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53602 
53603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53604 $as_echo "$supports" >&6; }
53605   if test "x$supports" = "xyes" ; then
53606     :
53607     GCC_CAN_DISABLE_WARNINGS=true
53608   else
53609     :
53610     GCC_CAN_DISABLE_WARNINGS=false
53611 
53612   fi
53613 
53614 
53615 
53616 
53617 
53618 
53619       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53620         DISABLE_WARNING_PREFIX="-Wno-"
53621       else
53622         DISABLE_WARNING_PREFIX=
53623       fi
53624       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53625       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53626       # CFLAGS since any target specific flags will likely not work with the
53627       # build compiler
53628       CC_OLD="$CC"
53629       CXX_OLD="$CXX"
53630       CC="$BUILD_CC"
53631       CXX="$BUILD_CXX"
53632       CFLAGS_OLD="$CFLAGS"
53633       CFLAGS=""
53634 
53635 
53636 
53637 
53638 
53639 
53640 
53641 
53642 
53643 
53644 
53645 
53646 
53647 
53648 
53649 
53650 
53651 
53652 
53653 
53654 
53655 
53656 
53657 
53658 
53659 
53660 
53661 
53662 
53663 
53664 
53665 
53666 
53667 
53668 
53669 
53670 
53671 
53672 
53673 
53674 
53675 
53676 
53677 
53678 
53679 
53680 
53681     # Execute function body
53682 
53683 
53684 
53685 
53686 
53687 
53688 
53689 
53690 
53691 
53692 
53693 
53694 
53695 
53696 
53697 
53698 
53699 
53700 
53701 
53702 
53703 
53704 
53705 
53706 
53707 
53708 
53709 
53710 
53711 
53712 
53713 
53714 
53715 
53716 
53717 
53718 
53719 
53720 
53721 
53722 
53723 
53724 
53725 
53726 
53727 
53728 
53729 
53730     # Execute function body
53731 
53732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53733 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53734   supports=yes
53735 
53736   saved_cflags="$CFLAGS"
53737   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53738   ac_ext=c
53739 ac_cpp='$CPP $CPPFLAGS'
53740 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53741 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53742 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53743 
53744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53745 /* end confdefs.h.  */
53746 int i;
53747 _ACEOF
53748 if ac_fn_c_try_compile "$LINENO"; then :
53749 
53750 else
53751   supports=no
53752 fi
53753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53754   ac_ext=cpp
53755 ac_cpp='$CXXCPP $CPPFLAGS'
53756 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53757 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53758 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53759 
53760   CFLAGS="$saved_cflags"
53761 
53762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53763 $as_echo "$supports" >&6; }
53764   if test "x$supports" = "xyes" ; then
53765     :
53766     C_COMP_SUPPORTS="yes"
53767   else
53768     :
53769     C_COMP_SUPPORTS="no"
53770   fi
53771 
53772 
53773 
53774 
53775 
53776 
53777 
53778 
53779 
53780 
53781 
53782 
53783 
53784 
53785 
53786 
53787 
53788 
53789 
53790 
53791 
53792 
53793 
53794 
53795 
53796 
53797 
53798 
53799 
53800 
53801 
53802 
53803 
53804 
53805 
53806 
53807 
53808 
53809 
53810 
53811 
53812 
53813 
53814 
53815 
53816 
53817 
53818 
53819 
53820 
53821 
53822 
53823 
53824 
53825 
53826 
53827 
53828 
53829 
53830     # Execute function body
53831 
53832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53833 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53834   supports=yes
53835 
53836   saved_cxxflags="$CXXFLAGS"
53837   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53838   ac_ext=cpp
53839 ac_cpp='$CXXCPP $CPPFLAGS'
53840 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53841 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53842 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53843 
53844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53845 /* end confdefs.h.  */
53846 int i;
53847 _ACEOF
53848 if ac_fn_cxx_try_compile "$LINENO"; then :
53849 
53850 else
53851   supports=no
53852 fi
53853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53854   ac_ext=cpp
53855 ac_cpp='$CXXCPP $CPPFLAGS'
53856 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53857 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53858 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53859 
53860   CXXFLAGS="$saved_cxxflags"
53861 
53862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53863 $as_echo "$supports" >&6; }
53864   if test "x$supports" = "xyes" ; then
53865     :
53866     CXX_COMP_SUPPORTS="yes"
53867   else
53868     :
53869     CXX_COMP_SUPPORTS="no"
53870   fi
53871 
53872 
53873 
53874 
53875 
53876 
53877 
53878 
53879 
53880 
53881 
53882 
53883 
53884   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53885 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53886   supports=no
53887   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53888 
53889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53890 $as_echo "$supports" >&6; }
53891   if test "x$supports" = "xyes" ; then
53892     :
53893     BUILD_CC_CAN_DISABLE_WARNINGS=true
53894   else
53895     :
53896     BUILD_CC_CAN_DISABLE_WARNINGS=false
53897 
53898   fi
53899 
53900 
53901 
53902 
53903 
53904 
53905       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53906         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53907       else
53908         BUILD_CC_DISABLE_WARNING_PREFIX=
53909       fi
53910       CC="$CC_OLD"
53911       CXX="$CXX_OLD"
53912       CFLAGS="$CFLAGS_OLD"
53913       ;;
53914     clang)
53915       DISABLE_WARNING_PREFIX="-Wno-"
53916       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53917       ;;
53918     xlc)
53919       DISABLE_WARNING_PREFIX="-qsuppress="
53920       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53921       ;;
53922   esac
53923 
53924 
53925 
53926 
53927 
53928 # Setup debug symbols (need objcopy from the toolchain for that)
53929 
53930   #
53931   # NATIVE_DEBUG_SYMBOLS
53932   # This must be done after the toolchain is setup, since we're looking at objcopy.
53933   #
53934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53935 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
53936 
53937 # Check whether --with-native-debug-symbols was given.
53938 if test "${with_native_debug_symbols+set}" = set; then :
53939   withval=$with_native_debug_symbols;
53940         if test "x$OPENJDK_TARGET_OS" = xaix; then
53941           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53942             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53943           fi
53944         fi
53945 
53946 else
53947 
53948         if test "x$OPENJDK_TARGET_OS" = xaix; then
53949           # AIX doesn't support 'zipped' so use 'internal' as default
53950           with_native_debug_symbols="internal"
53951         else
53952           if test "x$STATIC_BUILD" = xtrue; then
53953             with_native_debug_symbols="none"
53954           else
53955             with_native_debug_symbols="zipped"
53956           fi
53957         fi
53958 
53959 fi
53960 
53961   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53963 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53964 
53965   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53966 
53967     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53968       if test "x$OBJCOPY" = x; then
53969         # enabling of enable-debug-symbols and can't find objcopy
53970         # this is an error
53971         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53972       fi
53973     fi
53974 
53975     COMPILE_WITH_DEBUG_SYMBOLS=true
53976     COPY_DEBUG_SYMBOLS=true
53977     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53978   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53979     COMPILE_WITH_DEBUG_SYMBOLS=false
53980     COPY_DEBUG_SYMBOLS=false
53981     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53982   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53983     COMPILE_WITH_DEBUG_SYMBOLS=true
53984     COPY_DEBUG_SYMBOLS=false
53985     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53986   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53987 
53988     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53989       if test "x$OBJCOPY" = x; then
53990         # enabling of enable-debug-symbols and can't find objcopy
53991         # this is an error
53992         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53993       fi
53994     fi
53995 
53996     COMPILE_WITH_DEBUG_SYMBOLS=true
53997     COPY_DEBUG_SYMBOLS=true
53998     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53999   else
54000     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
54001   fi
54002 
54003   # --enable-debug-symbols is deprecated.
54004   # Please use --with-native-debug-symbols=[internal,external,zipped] .
54005 
54006   # Check whether --enable-debug-symbols was given.
54007 if test "${enable_debug_symbols+set}" = set; then :
54008   enableval=$enable_debug_symbols;
54009 fi
54010 
54011   if test "x$enable_debug_symbols" != x; then
54012     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
54013 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
54014 
54015     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
54016       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
54017 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
54018     fi
54019 
54020   fi
54021 
54022 
54023   # --enable-zip-debug-info is deprecated.
54024   # Please use --with-native-debug-symbols=zipped .
54025 
54026   # Check whether --enable-zip-debug-info was given.
54027 if test "${enable_zip_debug_info+set}" = set; then :
54028   enableval=$enable_zip_debug_info;
54029 fi
54030 
54031   if test "x$enable_zip_debug_info" != x; then
54032     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
54033 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
54034 
54035     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
54036       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
54037 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
54038     fi
54039 
54040   fi
54041 
54042 
54043 
54044 
54045 
54046 
54047 
54048   # Check whether --enable-native-coverage was given.
54049 if test "${enable_native_coverage+set}" = set; then :
54050   enableval=$enable_native_coverage;
54051 fi
54052 
54053   GCOV_ENABLED="false"
54054   if test "x$enable_native_coverage" = "xyes"; then
54055     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
54056       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54057 $as_echo_n "checking if native coverage is enabled... " >&6; }
54058       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54059 $as_echo "yes" >&6; }
54060       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
54061       GCOV_LDFLAGS="-fprofile-arcs"
54062       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
54063       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
54064       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
54065       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
54066       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
54067       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
54068       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
54069       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
54070       GCOV_ENABLED="true"
54071     else
54072       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
54073     fi
54074   elif test "x$enable_native_coverage" = "xno"; then
54075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54076 $as_echo_n "checking if native coverage is enabled... " >&6; }
54077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54078 $as_echo "no" >&6; }
54079   elif test "x$enable_native_coverage" != "x"; then
54080     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
54081   fi
54082 
54083 
54084 
54085 
54086 # Need toolchain to setup dtrace
54087 
54088   # Test for dtrace dependencies
54089   # Check whether --enable-dtrace was given.
54090 if test "${enable_dtrace+set}" = set; then :
54091   enableval=$enable_dtrace;
54092 fi
54093 
54094 
54095   DTRACE_DEP_MISSING=false
54096 
54097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
54098 $as_echo_n "checking for dtrace tool... " >&6; }
54099   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
54100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
54101 $as_echo "$DTRACE" >&6; }
54102   else
54103     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
54104 $as_echo "not found, cannot build dtrace" >&6; }
54105     DTRACE_DEP_MISSING=true
54106   fi
54107 
54108   for ac_header in sys/sdt.h
54109 do :
54110   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
54111 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
54112   cat >>confdefs.h <<_ACEOF
54113 #define HAVE_SYS_SDT_H 1
54114 _ACEOF
54115  DTRACE_HEADERS_OK=yes
54116 else
54117   DTRACE_HEADERS_OK=no
54118 fi
54119 
54120 done
54121 
54122   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
54123     DTRACE_DEP_MISSING=true
54124   fi
54125 
54126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54127 $as_echo_n "checking if dtrace should be built... " >&6; }
54128   if test "x$enable_dtrace" = "xyes"; then
54129     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54130       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54131 $as_echo "no, missing dependencies" >&6; }
54132 
54133   # Print a helpful message on how to acquire the necessary build dependency.
54134   # dtrace is the help tag: freetype, cups, alsa etc
54135   MISSING_DEPENDENCY=dtrace
54136 
54137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54138     cygwin_help $MISSING_DEPENDENCY
54139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54140     msys_help $MISSING_DEPENDENCY
54141   else
54142     PKGHANDLER_COMMAND=
54143 
54144     case $PKGHANDLER in
54145       apt-get)
54146         apt_help     $MISSING_DEPENDENCY ;;
54147       yum)
54148         yum_help     $MISSING_DEPENDENCY ;;
54149       brew)
54150         brew_help    $MISSING_DEPENDENCY ;;
54151       port)
54152         port_help    $MISSING_DEPENDENCY ;;
54153       pkgutil)
54154         pkgutil_help $MISSING_DEPENDENCY ;;
54155       pkgadd)
54156         pkgadd_help  $MISSING_DEPENDENCY ;;
54157     esac
54158 
54159     if test "x$PKGHANDLER_COMMAND" != x; then
54160       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54161     fi
54162   fi
54163 
54164       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54165     else
54166       INCLUDE_DTRACE=true
54167       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54168 $as_echo "yes, forced" >&6; }
54169     fi
54170   elif test "x$enable_dtrace" = "xno"; then
54171     INCLUDE_DTRACE=false
54172     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54173 $as_echo "no, forced" >&6; }
54174   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54175     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54176       INCLUDE_DTRACE=false
54177       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54178 $as_echo "no, missing dependencies" >&6; }
54179     else
54180       INCLUDE_DTRACE=true
54181       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54182 $as_echo "yes, dependencies present" >&6; }
54183     fi
54184   else
54185     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54186   fi
54187 
54188 
54189   # Check whether --enable-aot was given.
54190 if test "${enable_aot+set}" = set; then :
54191   enableval=$enable_aot;
54192 fi
54193 
54194 
54195   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54196     ENABLE_AOT="true"
54197   elif test "x$enable_aot" = "xyes"; then
54198     ENABLE_AOT="true"
54199   elif test "x$enable_aot" = "xno"; then
54200     ENABLE_AOT="false"
54201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54202 $as_echo_n "checking if aot should be enabled... " >&6; }
54203     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54204 $as_echo "no, forced" >&6; }
54205   else
54206     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54207   fi
54208 
54209   if test "x$ENABLE_AOT" = "xtrue"; then
54210     # Only enable AOT on X64 platforms.
54211     if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54212       if test -e "${TOPDIR}/src/jdk.aot"; then
54213         if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
54214           ENABLE_AOT="true"
54215         else
54216           ENABLE_AOT="false"
54217           if test "x$enable_aot" = "xyes"; then
54218             as_fn_error $? "Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54219           fi
54220         fi
54221       else
54222         ENABLE_AOT="false"
54223         if test "x$enable_aot" = "xyes"; then
54224           as_fn_error $? "Cannot build AOT without src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54225         fi
54226       fi
54227     else
54228       ENABLE_AOT="false"
54229       if test "x$enable_aot" = "xyes"; then
54230         as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54231       fi
54232     fi
54233   fi
54234 
54235 
54236 
54237 
54238   # Check whether --enable-cds was given.
54239 if test "${enable_cds+set}" = set; then :
54240   enableval=$enable_cds;
54241 fi
54242 
54243 
54244   if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
54245     ENABLE_CDS="true"
54246   elif test "x$enable_cds" = "xno"; then
54247     ENABLE_CDS="false"
54248   else
54249     as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
54250   fi
54251 
54252 
54253 
54254 
54255   # Check whether --enable-hotspot-gtest was given.
54256 if test "${enable_hotspot_gtest+set}" = set; then :
54257   enableval=$enable_hotspot_gtest;
54258 fi
54259 
54260 
54261   if test -e "${TOPDIR}/test/hotspot/gtest"; then
54262     GTEST_DIR_EXISTS="true"
54263   else
54264     GTEST_DIR_EXISTS="false"
54265   fi
54266 
54267   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54268 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54269   if test "x$enable_hotspot_gtest" = "xyes"; then
54270     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54271       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54272 $as_echo "yes, forced" >&6; }
54273       BUILD_GTEST="true"
54274     else
54275       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54276     fi
54277   elif test "x$enable_hotspot_gtest" = "xno"; then
54278     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54279 $as_echo "no, forced" >&6; }
54280     BUILD_GTEST="false"
54281   elif test "x$enable_hotspot_gtest" = "x"; then
54282     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54283       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54284 $as_echo "yes" >&6; }
54285       BUILD_GTEST="true"
54286     else
54287       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54288 $as_echo "no" >&6; }
54289       BUILD_GTEST="false"
54290     fi
54291   else
54292     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54293   fi
54294 
54295 
54296 
54297 
54298 ###############################################################################
54299 #
54300 # Check dependencies for external and internal libraries.
54301 #
54302 ###############################################################################
54303 
54304 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54305 
54306   # When using cygwin or msys, we need a wrapper binary that renames
54307   # /cygdrive/c/ arguments into c:/ arguments and peeks into
54308   # @files and rewrites these too! This wrapper binary is
54309   # called fixpath.
54310   FIXPATH=
54311   if test "x$OPENJDK_BUILD_OS" = xwindows; then
54312     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54313 $as_echo_n "checking if fixpath can be created... " >&6; }
54314     FIXPATH_SRC="$SRC_ROOT/make/src/native/fixpath.c"
54315     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54316     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54317     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54318       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54319       FIXPATH="$FIXPATH_BIN -c"
54320     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54321       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54322       # @ was chosen as separator to minimize risk of other tools messing around with it
54323       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54324           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54325       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54326       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54327     fi
54328     FIXPATH_SRC_W="$FIXPATH_SRC"
54329     FIXPATH_BIN_W="$FIXPATH_BIN"
54330 
54331   unix_path="$FIXPATH_SRC_W"
54332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54333     windows_path=`$CYGPATH -m "$unix_path"`
54334     FIXPATH_SRC_W="$windows_path"
54335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54336     windows_path=`cmd //c echo $unix_path`
54337     FIXPATH_SRC_W="$windows_path"
54338   fi
54339 
54340 
54341   unix_path="$FIXPATH_BIN_W"
54342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54343     windows_path=`$CYGPATH -m "$unix_path"`
54344     FIXPATH_BIN_W="$windows_path"
54345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54346     windows_path=`cmd //c echo $unix_path`
54347     FIXPATH_BIN_W="$windows_path"
54348   fi
54349 
54350     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54351     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54352     cd $FIXPATH_DIR
54353     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54354     cd $CURDIR
54355 
54356     if test ! -x $FIXPATH_BIN; then
54357       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54358 $as_echo "no" >&6; }
54359       cat $FIXPATH_DIR/fixpath1.log
54360       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54361     fi
54362     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54363 $as_echo "yes" >&6; }
54364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54365 $as_echo_n "checking if fixpath.exe works... " >&6; }
54366     cd $FIXPATH_DIR
54367     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54368         > $FIXPATH_DIR/fixpath2.log 2>&1
54369     cd $CURDIR
54370     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54371       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54372 $as_echo "no" >&6; }
54373       cat $FIXPATH_DIR/fixpath2.log
54374       as_fn_error $? "fixpath did not work!" "$LINENO" 5
54375     fi
54376     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54377 $as_echo "yes" >&6; }
54378 
54379     FIXPATH_DETACH_FLAG="--detach"
54380   fi
54381 
54382 
54383 
54384 
54385 
54386 
54387   # Check if X11 is needed
54388   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54389     # No X11 support on windows or macosx
54390     NEEDS_LIB_X11=false
54391   else
54392     # All other instances need X11, even if building headless only, libawt still
54393     # needs X11 headers.
54394     NEEDS_LIB_X11=true
54395   fi
54396 
54397   # Check if cups is needed
54398   if test "x$OPENJDK_TARGET_OS" = xwindows; then
54399     # Windows have a separate print system
54400     NEEDS_LIB_CUPS=false
54401   else
54402     NEEDS_LIB_CUPS=true
54403   fi
54404 
54405   # A custom hook may have set this already
54406   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54407     NEEDS_LIB_FREETYPE=true
54408   fi
54409 
54410   # Check if alsa is needed
54411   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54412     NEEDS_LIB_ALSA=true
54413   else
54414     NEEDS_LIB_ALSA=false
54415   fi
54416 
54417   # Check if ffi is needed
54418   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54419     NEEDS_LIB_FFI=true
54420   else
54421     NEEDS_LIB_FFI=false
54422   fi
54423 
54424 
54425   # statically link libstdc++ before C++ ABI is stablized on Linux unless
54426   # dynamic build is configured on command line.
54427 
54428 # Check whether --with-stdc++lib was given.
54429 if test "${with_stdc__lib+set}" = set; then :
54430   withval=$with_stdc__lib;
54431         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54432                 && test "x$with_stdc__lib" != xdefault; then
54433           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54434         fi
54435 
54436 else
54437   with_stdc__lib=default
54438 
54439 fi
54440 
54441 
54442   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54443     # Test if stdc++ can be linked statically.
54444     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54445 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54446     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54447     ac_ext=cpp
54448 ac_cpp='$CXXCPP $CPPFLAGS'
54449 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54450 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54451 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54452 
54453     OLD_LIBS="$LIBS"
54454     LIBS="$STATIC_STDCXX_FLAGS"
54455     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54456 /* end confdefs.h.  */
54457 
54458 int
54459 main ()
54460 {
54461 return 0;
54462   ;
54463   return 0;
54464 }
54465 _ACEOF
54466 if ac_fn_cxx_try_link "$LINENO"; then :
54467   has_static_libstdcxx=yes
54468 else
54469   has_static_libstdcxx=no
54470 fi
54471 rm -f core conftest.err conftest.$ac_objext \
54472     conftest$ac_exeext conftest.$ac_ext
54473     LIBS="$OLD_LIBS"
54474     ac_ext=cpp
54475 ac_cpp='$CXXCPP $CPPFLAGS'
54476 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54477 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54478 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54479 
54480     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54481 $as_echo "$has_static_libstdcxx" >&6; }
54482 
54483     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54484       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54485     fi
54486 
54487     # If dynamic was requested, it's available since it would fail above otherwise.
54488     # If dynamic wasn't requested, go with static unless it isn't available.
54489     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54490 $as_echo_n "checking how to link with libstdc++... " >&6; }
54491     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54492         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54493       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54494 $as_echo "dynamic" >&6; }
54495     else
54496       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54497       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54498       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54499       # just use the same setting as for the TARGET toolchain.
54500       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54501       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54502 $as_echo "static" >&6; }
54503     fi
54504   fi
54505 
54506   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54507   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54508     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54509   fi
54510 
54511 
54512 
54513   # Setup Windows runtime dlls
54514   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54515 
54516 
54517 # Check whether --with-msvcr-dll was given.
54518 if test "${with_msvcr_dll+set}" = set; then :
54519   withval=$with_msvcr_dll;
54520 fi
54521 
54522 
54523   if test "x$with_msvcr_dll" != x; then
54524     # If given explicitly by user, do not probe. If not present, fail directly.
54525 
54526   DLL_NAME="$MSVCR_NAME"
54527   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54528   METHOD="--with-msvcr-dll"
54529   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54530     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54531 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54532 
54533     # Need to check if the found msvcr is correct architecture
54534     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54535 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54536     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54537     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54538       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54539       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54540       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54541         CORRECT_MSVCR_ARCH="PE32 executable"
54542       else
54543         CORRECT_MSVCR_ARCH="PE32+ executable"
54544       fi
54545     else
54546       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54547         CORRECT_MSVCR_ARCH=386
54548       else
54549         CORRECT_MSVCR_ARCH=x86-64
54550       fi
54551     fi
54552     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54553       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54554 $as_echo "ok" >&6; }
54555       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54556 
54557   # Only process if variable expands to non-empty
54558 
54559   if test "x$MSVC_DLL" != x; then
54560     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54561 
54562   # Input might be given as Windows format, start by converting to
54563   # unix format.
54564   path="$MSVC_DLL"
54565   new_path=`$CYGPATH -u "$path"`
54566 
54567   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54568   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54569   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54570   # "foo.exe" is OK but "foo" is an error.
54571   #
54572   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54573   # It is also a way to make sure we got the proper file name for the real test later on.
54574   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54575   if test "x$test_shortpath" = x; then
54576     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54577 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54578     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54579   fi
54580 
54581   # Call helper function which possibly converts this using DOS-style short mode.
54582   # If so, the updated path is stored in $new_path.
54583 
54584   input_path="$new_path"
54585   # Check if we need to convert this using DOS-style short mode. If the path
54586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54587   # take no chances and rewrite it.
54588   # Note: m4 eats our [], so we need to use [ and ] instead.
54589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54590   if test "x$has_forbidden_chars" != x; then
54591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54592     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54593     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54594     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54595       # Going to short mode and back again did indeed matter. Since short mode is
54596       # case insensitive, let's make it lowercase to improve readability.
54597       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54598       # Now convert it back to Unix-style (cygpath)
54599       input_path=`$CYGPATH -u "$shortmode_path"`
54600       new_path="$input_path"
54601     fi
54602   fi
54603 
54604   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54605   if test "x$test_cygdrive_prefix" = x; then
54606     # As a simple fix, exclude /usr/bin since it's not a real path.
54607     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54608       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54609       # a path prefixed by /cygdrive for fixpath to work.
54610       new_path="$CYGWIN_ROOT_PATH$input_path"
54611     fi
54612   fi
54613 
54614 
54615   if test "x$path" != "x$new_path"; then
54616     MSVC_DLL="$new_path"
54617     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54618 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54619   fi
54620 
54621     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54622 
54623   path="$MSVC_DLL"
54624   has_colon=`$ECHO $path | $GREP ^.:`
54625   new_path="$path"
54626   if test "x$has_colon" = x; then
54627     # Not in mixed or Windows style, start by that.
54628     new_path=`cmd //c echo $path`
54629   fi
54630 
54631 
54632   input_path="$new_path"
54633   # Check if we need to convert this using DOS-style short mode. If the path
54634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54635   # take no chances and rewrite it.
54636   # Note: m4 eats our [], so we need to use [ and ] instead.
54637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54638   if test "x$has_forbidden_chars" != x; then
54639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54640     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54641   fi
54642 
54643 
54644   windows_path="$new_path"
54645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54646     unix_path=`$CYGPATH -u "$windows_path"`
54647     new_path="$unix_path"
54648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54650     new_path="$unix_path"
54651   fi
54652 
54653   if test "x$path" != "x$new_path"; then
54654     MSVC_DLL="$new_path"
54655     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54656 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54657   fi
54658 
54659   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54660   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54661 
54662     else
54663       # We're on a unix platform. Hooray! :)
54664       path="$MSVC_DLL"
54665       has_space=`$ECHO "$path" | $GREP " "`
54666       if test "x$has_space" != x; then
54667         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54668 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54669         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54670       fi
54671 
54672       # Use eval to expand a potential ~
54673       eval path="$path"
54674       if test ! -f "$path" && test ! -d "$path"; then
54675         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54676       fi
54677 
54678       if test -d "$path"; then
54679         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54680       else
54681         dir="`$DIRNAME "$path"`"
54682         base="`$BASENAME "$path"`"
54683         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54684       fi
54685     fi
54686   fi
54687 
54688       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54689 $as_echo_n "checking for $DLL_NAME... " >&6; }
54690       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54691 $as_echo "$MSVC_DLL" >&6; }
54692     else
54693       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54694 $as_echo "incorrect, ignoring" >&6; }
54695       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54696 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54697     fi
54698   fi
54699 
54700     if test "x$MSVC_DLL" = x; then
54701       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54702     fi
54703     MSVCR_DLL="$MSVC_DLL"
54704   elif test "x$DEVKIT_MSVCR_DLL" != x; then
54705 
54706   DLL_NAME="$MSVCR_NAME"
54707   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54708   METHOD="devkit"
54709   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54710     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54711 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54712 
54713     # Need to check if the found msvcr is correct architecture
54714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54715 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54716     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54717     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54718       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54719       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54720       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54721         CORRECT_MSVCR_ARCH="PE32 executable"
54722       else
54723         CORRECT_MSVCR_ARCH="PE32+ executable"
54724       fi
54725     else
54726       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54727         CORRECT_MSVCR_ARCH=386
54728       else
54729         CORRECT_MSVCR_ARCH=x86-64
54730       fi
54731     fi
54732     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54734 $as_echo "ok" >&6; }
54735       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54736 
54737   # Only process if variable expands to non-empty
54738 
54739   if test "x$MSVC_DLL" != x; then
54740     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54741 
54742   # Input might be given as Windows format, start by converting to
54743   # unix format.
54744   path="$MSVC_DLL"
54745   new_path=`$CYGPATH -u "$path"`
54746 
54747   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54748   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54749   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54750   # "foo.exe" is OK but "foo" is an error.
54751   #
54752   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54753   # It is also a way to make sure we got the proper file name for the real test later on.
54754   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54755   if test "x$test_shortpath" = x; then
54756     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54757 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54758     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54759   fi
54760 
54761   # Call helper function which possibly converts this using DOS-style short mode.
54762   # If so, the updated path is stored in $new_path.
54763 
54764   input_path="$new_path"
54765   # Check if we need to convert this using DOS-style short mode. If the path
54766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54767   # take no chances and rewrite it.
54768   # Note: m4 eats our [], so we need to use [ and ] instead.
54769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54770   if test "x$has_forbidden_chars" != x; then
54771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54772     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54773     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54774     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54775       # Going to short mode and back again did indeed matter. Since short mode is
54776       # case insensitive, let's make it lowercase to improve readability.
54777       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54778       # Now convert it back to Unix-style (cygpath)
54779       input_path=`$CYGPATH -u "$shortmode_path"`
54780       new_path="$input_path"
54781     fi
54782   fi
54783 
54784   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54785   if test "x$test_cygdrive_prefix" = x; then
54786     # As a simple fix, exclude /usr/bin since it's not a real path.
54787     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54788       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54789       # a path prefixed by /cygdrive for fixpath to work.
54790       new_path="$CYGWIN_ROOT_PATH$input_path"
54791     fi
54792   fi
54793 
54794 
54795   if test "x$path" != "x$new_path"; then
54796     MSVC_DLL="$new_path"
54797     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54798 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54799   fi
54800 
54801     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54802 
54803   path="$MSVC_DLL"
54804   has_colon=`$ECHO $path | $GREP ^.:`
54805   new_path="$path"
54806   if test "x$has_colon" = x; then
54807     # Not in mixed or Windows style, start by that.
54808     new_path=`cmd //c echo $path`
54809   fi
54810 
54811 
54812   input_path="$new_path"
54813   # Check if we need to convert this using DOS-style short mode. If the path
54814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54815   # take no chances and rewrite it.
54816   # Note: m4 eats our [], so we need to use [ and ] instead.
54817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54818   if test "x$has_forbidden_chars" != x; then
54819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54820     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54821   fi
54822 
54823 
54824   windows_path="$new_path"
54825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54826     unix_path=`$CYGPATH -u "$windows_path"`
54827     new_path="$unix_path"
54828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54830     new_path="$unix_path"
54831   fi
54832 
54833   if test "x$path" != "x$new_path"; then
54834     MSVC_DLL="$new_path"
54835     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54836 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54837   fi
54838 
54839   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54840   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54841 
54842     else
54843       # We're on a unix platform. Hooray! :)
54844       path="$MSVC_DLL"
54845       has_space=`$ECHO "$path" | $GREP " "`
54846       if test "x$has_space" != x; then
54847         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54848 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54849         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54850       fi
54851 
54852       # Use eval to expand a potential ~
54853       eval path="$path"
54854       if test ! -f "$path" && test ! -d "$path"; then
54855         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54856       fi
54857 
54858       if test -d "$path"; then
54859         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54860       else
54861         dir="`$DIRNAME "$path"`"
54862         base="`$BASENAME "$path"`"
54863         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54864       fi
54865     fi
54866   fi
54867 
54868       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54869 $as_echo_n "checking for $DLL_NAME... " >&6; }
54870       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54871 $as_echo "$MSVC_DLL" >&6; }
54872     else
54873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54874 $as_echo "incorrect, ignoring" >&6; }
54875       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54876 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54877     fi
54878   fi
54879 
54880     if test "x$MSVC_DLL" = x; then
54881       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54882     fi
54883     MSVCR_DLL="$MSVC_DLL"
54884   else
54885 
54886   DLL_NAME="${MSVCR_NAME}"
54887   MSVC_DLL=
54888 
54889   if test "x$MSVC_DLL" = x; then
54890     # Probe: Using well-known location from Visual Studio 10.0
54891     if test "x$VCINSTALLDIR" != x; then
54892       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54893 
54894   windows_path="$CYGWIN_VC_INSTALL_DIR"
54895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54896     unix_path=`$CYGPATH -u "$windows_path"`
54897     CYGWIN_VC_INSTALL_DIR="$unix_path"
54898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54900     CYGWIN_VC_INSTALL_DIR="$unix_path"
54901   fi
54902 
54903       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54904         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54905       else
54906         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54907       fi
54908       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54909 
54910   DLL_NAME="$DLL_NAME"
54911   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54912   METHOD="well-known location in VCINSTALLDIR"
54913   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54914     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54915 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54916 
54917     # Need to check if the found msvcr is correct architecture
54918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54919 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54920     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54921     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54922       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54923       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54924       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54925         CORRECT_MSVCR_ARCH="PE32 executable"
54926       else
54927         CORRECT_MSVCR_ARCH="PE32+ executable"
54928       fi
54929     else
54930       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54931         CORRECT_MSVCR_ARCH=386
54932       else
54933         CORRECT_MSVCR_ARCH=x86-64
54934       fi
54935     fi
54936     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54937       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54938 $as_echo "ok" >&6; }
54939       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54940 
54941   # Only process if variable expands to non-empty
54942 
54943   if test "x$MSVC_DLL" != x; then
54944     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54945 
54946   # Input might be given as Windows format, start by converting to
54947   # unix format.
54948   path="$MSVC_DLL"
54949   new_path=`$CYGPATH -u "$path"`
54950 
54951   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54952   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54953   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54954   # "foo.exe" is OK but "foo" is an error.
54955   #
54956   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54957   # It is also a way to make sure we got the proper file name for the real test later on.
54958   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54959   if test "x$test_shortpath" = x; then
54960     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54961 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54962     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54963   fi
54964 
54965   # Call helper function which possibly converts this using DOS-style short mode.
54966   # If so, the updated path is stored in $new_path.
54967 
54968   input_path="$new_path"
54969   # Check if we need to convert this using DOS-style short mode. If the path
54970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54971   # take no chances and rewrite it.
54972   # Note: m4 eats our [], so we need to use [ and ] instead.
54973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54974   if test "x$has_forbidden_chars" != x; then
54975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54976     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54977     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54978     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54979       # Going to short mode and back again did indeed matter. Since short mode is
54980       # case insensitive, let's make it lowercase to improve readability.
54981       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54982       # Now convert it back to Unix-style (cygpath)
54983       input_path=`$CYGPATH -u "$shortmode_path"`
54984       new_path="$input_path"
54985     fi
54986   fi
54987 
54988   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54989   if test "x$test_cygdrive_prefix" = x; then
54990     # As a simple fix, exclude /usr/bin since it's not a real path.
54991     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54992       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54993       # a path prefixed by /cygdrive for fixpath to work.
54994       new_path="$CYGWIN_ROOT_PATH$input_path"
54995     fi
54996   fi
54997 
54998 
54999   if test "x$path" != "x$new_path"; then
55000     MSVC_DLL="$new_path"
55001     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55002 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55003   fi
55004 
55005     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55006 
55007   path="$MSVC_DLL"
55008   has_colon=`$ECHO $path | $GREP ^.:`
55009   new_path="$path"
55010   if test "x$has_colon" = x; then
55011     # Not in mixed or Windows style, start by that.
55012     new_path=`cmd //c echo $path`
55013   fi
55014 
55015 
55016   input_path="$new_path"
55017   # Check if we need to convert this using DOS-style short mode. If the path
55018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55019   # take no chances and rewrite it.
55020   # Note: m4 eats our [], so we need to use [ and ] instead.
55021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55022   if test "x$has_forbidden_chars" != x; then
55023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55024     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55025   fi
55026 
55027 
55028   windows_path="$new_path"
55029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55030     unix_path=`$CYGPATH -u "$windows_path"`
55031     new_path="$unix_path"
55032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55034     new_path="$unix_path"
55035   fi
55036 
55037   if test "x$path" != "x$new_path"; then
55038     MSVC_DLL="$new_path"
55039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55040 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55041   fi
55042 
55043   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55044   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55045 
55046     else
55047       # We're on a unix platform. Hooray! :)
55048       path="$MSVC_DLL"
55049       has_space=`$ECHO "$path" | $GREP " "`
55050       if test "x$has_space" != x; then
55051         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55052 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55053         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55054       fi
55055 
55056       # Use eval to expand a potential ~
55057       eval path="$path"
55058       if test ! -f "$path" && test ! -d "$path"; then
55059         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55060       fi
55061 
55062       if test -d "$path"; then
55063         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55064       else
55065         dir="`$DIRNAME "$path"`"
55066         base="`$BASENAME "$path"`"
55067         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55068       fi
55069     fi
55070   fi
55071 
55072       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55073 $as_echo_n "checking for $DLL_NAME... " >&6; }
55074       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55075 $as_echo "$MSVC_DLL" >&6; }
55076     else
55077       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55078 $as_echo "incorrect, ignoring" >&6; }
55079       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55080 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55081     fi
55082   fi
55083 
55084     fi
55085   fi
55086 
55087   if test "x$MSVC_DLL" = x; then
55088     # Probe: Check in the Boot JDK directory.
55089     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55090 
55091   DLL_NAME="$DLL_NAME"
55092   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55093   METHOD="well-known location in Boot JDK"
55094   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55095     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55096 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55097 
55098     # Need to check if the found msvcr is correct architecture
55099     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55100 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55101     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55102     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55103       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55104       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55105       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55106         CORRECT_MSVCR_ARCH="PE32 executable"
55107       else
55108         CORRECT_MSVCR_ARCH="PE32+ executable"
55109       fi
55110     else
55111       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55112         CORRECT_MSVCR_ARCH=386
55113       else
55114         CORRECT_MSVCR_ARCH=x86-64
55115       fi
55116     fi
55117     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55118       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55119 $as_echo "ok" >&6; }
55120       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55121 
55122   # Only process if variable expands to non-empty
55123 
55124   if test "x$MSVC_DLL" != x; then
55125     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55126 
55127   # Input might be given as Windows format, start by converting to
55128   # unix format.
55129   path="$MSVC_DLL"
55130   new_path=`$CYGPATH -u "$path"`
55131 
55132   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55133   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55134   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55135   # "foo.exe" is OK but "foo" is an error.
55136   #
55137   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55138   # It is also a way to make sure we got the proper file name for the real test later on.
55139   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55140   if test "x$test_shortpath" = x; then
55141     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55142 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55143     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55144   fi
55145 
55146   # Call helper function which possibly converts this using DOS-style short mode.
55147   # If so, the updated path is stored in $new_path.
55148 
55149   input_path="$new_path"
55150   # Check if we need to convert this using DOS-style short mode. If the path
55151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55152   # take no chances and rewrite it.
55153   # Note: m4 eats our [], so we need to use [ and ] instead.
55154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55155   if test "x$has_forbidden_chars" != x; then
55156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55157     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55158     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55159     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55160       # Going to short mode and back again did indeed matter. Since short mode is
55161       # case insensitive, let's make it lowercase to improve readability.
55162       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55163       # Now convert it back to Unix-style (cygpath)
55164       input_path=`$CYGPATH -u "$shortmode_path"`
55165       new_path="$input_path"
55166     fi
55167   fi
55168 
55169   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55170   if test "x$test_cygdrive_prefix" = x; then
55171     # As a simple fix, exclude /usr/bin since it's not a real path.
55172     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55173       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55174       # a path prefixed by /cygdrive for fixpath to work.
55175       new_path="$CYGWIN_ROOT_PATH$input_path"
55176     fi
55177   fi
55178 
55179 
55180   if test "x$path" != "x$new_path"; then
55181     MSVC_DLL="$new_path"
55182     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55183 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55184   fi
55185 
55186     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55187 
55188   path="$MSVC_DLL"
55189   has_colon=`$ECHO $path | $GREP ^.:`
55190   new_path="$path"
55191   if test "x$has_colon" = x; then
55192     # Not in mixed or Windows style, start by that.
55193     new_path=`cmd //c echo $path`
55194   fi
55195 
55196 
55197   input_path="$new_path"
55198   # Check if we need to convert this using DOS-style short mode. If the path
55199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55200   # take no chances and rewrite it.
55201   # Note: m4 eats our [], so we need to use [ and ] instead.
55202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55203   if test "x$has_forbidden_chars" != x; then
55204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55205     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55206   fi
55207 
55208 
55209   windows_path="$new_path"
55210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55211     unix_path=`$CYGPATH -u "$windows_path"`
55212     new_path="$unix_path"
55213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55214     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55215     new_path="$unix_path"
55216   fi
55217 
55218   if test "x$path" != "x$new_path"; then
55219     MSVC_DLL="$new_path"
55220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55221 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55222   fi
55223 
55224   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55225   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55226 
55227     else
55228       # We're on a unix platform. Hooray! :)
55229       path="$MSVC_DLL"
55230       has_space=`$ECHO "$path" | $GREP " "`
55231       if test "x$has_space" != x; then
55232         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55233 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55234         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55235       fi
55236 
55237       # Use eval to expand a potential ~
55238       eval path="$path"
55239       if test ! -f "$path" && test ! -d "$path"; then
55240         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55241       fi
55242 
55243       if test -d "$path"; then
55244         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55245       else
55246         dir="`$DIRNAME "$path"`"
55247         base="`$BASENAME "$path"`"
55248         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55249       fi
55250     fi
55251   fi
55252 
55253       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55254 $as_echo_n "checking for $DLL_NAME... " >&6; }
55255       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55256 $as_echo "$MSVC_DLL" >&6; }
55257     else
55258       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55259 $as_echo "incorrect, ignoring" >&6; }
55260       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55261 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55262     fi
55263   fi
55264 
55265   fi
55266 
55267   if test "x$MSVC_DLL" = x; then
55268     # Probe: Look in the Windows system32 directory
55269     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55270 
55271   windows_path="$CYGWIN_SYSTEMROOT"
55272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55273     unix_path=`$CYGPATH -u "$windows_path"`
55274     CYGWIN_SYSTEMROOT="$unix_path"
55275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55277     CYGWIN_SYSTEMROOT="$unix_path"
55278   fi
55279 
55280     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55281 
55282   DLL_NAME="$DLL_NAME"
55283   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55284   METHOD="well-known location in SYSTEMROOT"
55285   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55286     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55287 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55288 
55289     # Need to check if the found msvcr is correct architecture
55290     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55291 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55292     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55293     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55294       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55295       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55296       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55297         CORRECT_MSVCR_ARCH="PE32 executable"
55298       else
55299         CORRECT_MSVCR_ARCH="PE32+ executable"
55300       fi
55301     else
55302       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55303         CORRECT_MSVCR_ARCH=386
55304       else
55305         CORRECT_MSVCR_ARCH=x86-64
55306       fi
55307     fi
55308     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55309       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55310 $as_echo "ok" >&6; }
55311       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55312 
55313   # Only process if variable expands to non-empty
55314 
55315   if test "x$MSVC_DLL" != x; then
55316     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55317 
55318   # Input might be given as Windows format, start by converting to
55319   # unix format.
55320   path="$MSVC_DLL"
55321   new_path=`$CYGPATH -u "$path"`
55322 
55323   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55324   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55325   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55326   # "foo.exe" is OK but "foo" is an error.
55327   #
55328   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55329   # It is also a way to make sure we got the proper file name for the real test later on.
55330   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55331   if test "x$test_shortpath" = x; then
55332     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55333 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55334     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55335   fi
55336 
55337   # Call helper function which possibly converts this using DOS-style short mode.
55338   # If so, the updated path is stored in $new_path.
55339 
55340   input_path="$new_path"
55341   # Check if we need to convert this using DOS-style short mode. If the path
55342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55343   # take no chances and rewrite it.
55344   # Note: m4 eats our [], so we need to use [ and ] instead.
55345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55346   if test "x$has_forbidden_chars" != x; then
55347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55348     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55349     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55350     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55351       # Going to short mode and back again did indeed matter. Since short mode is
55352       # case insensitive, let's make it lowercase to improve readability.
55353       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55354       # Now convert it back to Unix-style (cygpath)
55355       input_path=`$CYGPATH -u "$shortmode_path"`
55356       new_path="$input_path"
55357     fi
55358   fi
55359 
55360   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55361   if test "x$test_cygdrive_prefix" = x; then
55362     # As a simple fix, exclude /usr/bin since it's not a real path.
55363     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55364       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55365       # a path prefixed by /cygdrive for fixpath to work.
55366       new_path="$CYGWIN_ROOT_PATH$input_path"
55367     fi
55368   fi
55369 
55370 
55371   if test "x$path" != "x$new_path"; then
55372     MSVC_DLL="$new_path"
55373     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55374 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55375   fi
55376 
55377     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55378 
55379   path="$MSVC_DLL"
55380   has_colon=`$ECHO $path | $GREP ^.:`
55381   new_path="$path"
55382   if test "x$has_colon" = x; then
55383     # Not in mixed or Windows style, start by that.
55384     new_path=`cmd //c echo $path`
55385   fi
55386 
55387 
55388   input_path="$new_path"
55389   # Check if we need to convert this using DOS-style short mode. If the path
55390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55391   # take no chances and rewrite it.
55392   # Note: m4 eats our [], so we need to use [ and ] instead.
55393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55394   if test "x$has_forbidden_chars" != x; then
55395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55396     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55397   fi
55398 
55399 
55400   windows_path="$new_path"
55401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55402     unix_path=`$CYGPATH -u "$windows_path"`
55403     new_path="$unix_path"
55404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55406     new_path="$unix_path"
55407   fi
55408 
55409   if test "x$path" != "x$new_path"; then
55410     MSVC_DLL="$new_path"
55411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55412 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55413   fi
55414 
55415   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55416   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55417 
55418     else
55419       # We're on a unix platform. Hooray! :)
55420       path="$MSVC_DLL"
55421       has_space=`$ECHO "$path" | $GREP " "`
55422       if test "x$has_space" != x; then
55423         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55424 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55425         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55426       fi
55427 
55428       # Use eval to expand a potential ~
55429       eval path="$path"
55430       if test ! -f "$path" && test ! -d "$path"; then
55431         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55432       fi
55433 
55434       if test -d "$path"; then
55435         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55436       else
55437         dir="`$DIRNAME "$path"`"
55438         base="`$BASENAME "$path"`"
55439         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55440       fi
55441     fi
55442   fi
55443 
55444       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55445 $as_echo_n "checking for $DLL_NAME... " >&6; }
55446       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55447 $as_echo "$MSVC_DLL" >&6; }
55448     else
55449       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55450 $as_echo "incorrect, ignoring" >&6; }
55451       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55452 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55453     fi
55454   fi
55455 
55456   fi
55457 
55458   if test "x$MSVC_DLL" = x; then
55459     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55460     if test "x$VS100COMNTOOLS" != x; then
55461       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55462 
55463   windows_path="$CYGWIN_VS_TOOLS_DIR"
55464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55465     unix_path=`$CYGPATH -u "$windows_path"`
55466     CYGWIN_VS_TOOLS_DIR="$unix_path"
55467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55469     CYGWIN_VS_TOOLS_DIR="$unix_path"
55470   fi
55471 
55472       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55473         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55474             | $GREP -i /x64/ | $HEAD --lines 1`
55475       else
55476         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55477             | $GREP -i /x86/ | $HEAD --lines 1`
55478       fi
55479 
55480   DLL_NAME="$DLL_NAME"
55481   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55482   METHOD="search of VS100COMNTOOLS"
55483   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55484     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55485 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55486 
55487     # Need to check if the found msvcr is correct architecture
55488     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55489 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55490     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55491     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55492       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55493       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55494       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55495         CORRECT_MSVCR_ARCH="PE32 executable"
55496       else
55497         CORRECT_MSVCR_ARCH="PE32+ executable"
55498       fi
55499     else
55500       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55501         CORRECT_MSVCR_ARCH=386
55502       else
55503         CORRECT_MSVCR_ARCH=x86-64
55504       fi
55505     fi
55506     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55508 $as_echo "ok" >&6; }
55509       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55510 
55511   # Only process if variable expands to non-empty
55512 
55513   if test "x$MSVC_DLL" != x; then
55514     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55515 
55516   # Input might be given as Windows format, start by converting to
55517   # unix format.
55518   path="$MSVC_DLL"
55519   new_path=`$CYGPATH -u "$path"`
55520 
55521   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55522   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55523   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55524   # "foo.exe" is OK but "foo" is an error.
55525   #
55526   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55527   # It is also a way to make sure we got the proper file name for the real test later on.
55528   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55529   if test "x$test_shortpath" = x; then
55530     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55531 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55532     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55533   fi
55534 
55535   # Call helper function which possibly converts this using DOS-style short mode.
55536   # If so, the updated path is stored in $new_path.
55537 
55538   input_path="$new_path"
55539   # Check if we need to convert this using DOS-style short mode. If the path
55540   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55541   # take no chances and rewrite it.
55542   # Note: m4 eats our [], so we need to use [ and ] instead.
55543   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55544   if test "x$has_forbidden_chars" != x; then
55545     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55546     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55547     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55548     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55549       # Going to short mode and back again did indeed matter. Since short mode is
55550       # case insensitive, let's make it lowercase to improve readability.
55551       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55552       # Now convert it back to Unix-style (cygpath)
55553       input_path=`$CYGPATH -u "$shortmode_path"`
55554       new_path="$input_path"
55555     fi
55556   fi
55557 
55558   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55559   if test "x$test_cygdrive_prefix" = x; then
55560     # As a simple fix, exclude /usr/bin since it's not a real path.
55561     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55562       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55563       # a path prefixed by /cygdrive for fixpath to work.
55564       new_path="$CYGWIN_ROOT_PATH$input_path"
55565     fi
55566   fi
55567 
55568 
55569   if test "x$path" != "x$new_path"; then
55570     MSVC_DLL="$new_path"
55571     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55572 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55573   fi
55574 
55575     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55576 
55577   path="$MSVC_DLL"
55578   has_colon=`$ECHO $path | $GREP ^.:`
55579   new_path="$path"
55580   if test "x$has_colon" = x; then
55581     # Not in mixed or Windows style, start by that.
55582     new_path=`cmd //c echo $path`
55583   fi
55584 
55585 
55586   input_path="$new_path"
55587   # Check if we need to convert this using DOS-style short mode. If the path
55588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55589   # take no chances and rewrite it.
55590   # Note: m4 eats our [], so we need to use [ and ] instead.
55591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55592   if test "x$has_forbidden_chars" != x; then
55593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55594     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55595   fi
55596 
55597 
55598   windows_path="$new_path"
55599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55600     unix_path=`$CYGPATH -u "$windows_path"`
55601     new_path="$unix_path"
55602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55604     new_path="$unix_path"
55605   fi
55606 
55607   if test "x$path" != "x$new_path"; then
55608     MSVC_DLL="$new_path"
55609     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55610 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55611   fi
55612 
55613   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55614   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55615 
55616     else
55617       # We're on a unix platform. Hooray! :)
55618       path="$MSVC_DLL"
55619       has_space=`$ECHO "$path" | $GREP " "`
55620       if test "x$has_space" != x; then
55621         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55622 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55623         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55624       fi
55625 
55626       # Use eval to expand a potential ~
55627       eval path="$path"
55628       if test ! -f "$path" && test ! -d "$path"; then
55629         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55630       fi
55631 
55632       if test -d "$path"; then
55633         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55634       else
55635         dir="`$DIRNAME "$path"`"
55636         base="`$BASENAME "$path"`"
55637         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55638       fi
55639     fi
55640   fi
55641 
55642       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55643 $as_echo_n "checking for $DLL_NAME... " >&6; }
55644       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55645 $as_echo "$MSVC_DLL" >&6; }
55646     else
55647       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55648 $as_echo "incorrect, ignoring" >&6; }
55649       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55650 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55651     fi
55652   fi
55653 
55654     fi
55655   fi
55656 
55657   if test "x$MSVC_DLL" = x; then
55658     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55659     # (This was the original behaviour; kept since it might turn something up)
55660     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55661       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55662         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55663             | $GREP x64 | $HEAD --lines 1`
55664       else
55665         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55666             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55667         if test "x$POSSIBLE_MSVC_DLL" = x; then
55668           # We're grasping at straws now...
55669           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55670               | $HEAD --lines 1`
55671         fi
55672       fi
55673 
55674 
55675   DLL_NAME="$DLL_NAME"
55676   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55677   METHOD="search of VCINSTALLDIR"
55678   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55679     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55680 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55681 
55682     # Need to check if the found msvcr is correct architecture
55683     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55684 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55685     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55686     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55687       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55688       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55689       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55690         CORRECT_MSVCR_ARCH="PE32 executable"
55691       else
55692         CORRECT_MSVCR_ARCH="PE32+ executable"
55693       fi
55694     else
55695       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55696         CORRECT_MSVCR_ARCH=386
55697       else
55698         CORRECT_MSVCR_ARCH=x86-64
55699       fi
55700     fi
55701     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55702       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55703 $as_echo "ok" >&6; }
55704       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55705 
55706   # Only process if variable expands to non-empty
55707 
55708   if test "x$MSVC_DLL" != x; then
55709     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55710 
55711   # Input might be given as Windows format, start by converting to
55712   # unix format.
55713   path="$MSVC_DLL"
55714   new_path=`$CYGPATH -u "$path"`
55715 
55716   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55717   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55718   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55719   # "foo.exe" is OK but "foo" is an error.
55720   #
55721   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55722   # It is also a way to make sure we got the proper file name for the real test later on.
55723   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55724   if test "x$test_shortpath" = x; then
55725     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55726 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55727     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55728   fi
55729 
55730   # Call helper function which possibly converts this using DOS-style short mode.
55731   # If so, the updated path is stored in $new_path.
55732 
55733   input_path="$new_path"
55734   # Check if we need to convert this using DOS-style short mode. If the path
55735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55736   # take no chances and rewrite it.
55737   # Note: m4 eats our [], so we need to use [ and ] instead.
55738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55739   if test "x$has_forbidden_chars" != x; then
55740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55741     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55742     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55743     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55744       # Going to short mode and back again did indeed matter. Since short mode is
55745       # case insensitive, let's make it lowercase to improve readability.
55746       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55747       # Now convert it back to Unix-style (cygpath)
55748       input_path=`$CYGPATH -u "$shortmode_path"`
55749       new_path="$input_path"
55750     fi
55751   fi
55752 
55753   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55754   if test "x$test_cygdrive_prefix" = x; then
55755     # As a simple fix, exclude /usr/bin since it's not a real path.
55756     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55757       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55758       # a path prefixed by /cygdrive for fixpath to work.
55759       new_path="$CYGWIN_ROOT_PATH$input_path"
55760     fi
55761   fi
55762 
55763 
55764   if test "x$path" != "x$new_path"; then
55765     MSVC_DLL="$new_path"
55766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55767 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55768   fi
55769 
55770     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55771 
55772   path="$MSVC_DLL"
55773   has_colon=`$ECHO $path | $GREP ^.:`
55774   new_path="$path"
55775   if test "x$has_colon" = x; then
55776     # Not in mixed or Windows style, start by that.
55777     new_path=`cmd //c echo $path`
55778   fi
55779 
55780 
55781   input_path="$new_path"
55782   # Check if we need to convert this using DOS-style short mode. If the path
55783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55784   # take no chances and rewrite it.
55785   # Note: m4 eats our [], so we need to use [ and ] instead.
55786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55787   if test "x$has_forbidden_chars" != x; then
55788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55789     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55790   fi
55791 
55792 
55793   windows_path="$new_path"
55794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55795     unix_path=`$CYGPATH -u "$windows_path"`
55796     new_path="$unix_path"
55797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55799     new_path="$unix_path"
55800   fi
55801 
55802   if test "x$path" != "x$new_path"; then
55803     MSVC_DLL="$new_path"
55804     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55805 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55806   fi
55807 
55808   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55809   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55810 
55811     else
55812       # We're on a unix platform. Hooray! :)
55813       path="$MSVC_DLL"
55814       has_space=`$ECHO "$path" | $GREP " "`
55815       if test "x$has_space" != x; then
55816         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55817 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55818         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55819       fi
55820 
55821       # Use eval to expand a potential ~
55822       eval path="$path"
55823       if test ! -f "$path" && test ! -d "$path"; then
55824         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55825       fi
55826 
55827       if test -d "$path"; then
55828         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55829       else
55830         dir="`$DIRNAME "$path"`"
55831         base="`$BASENAME "$path"`"
55832         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55833       fi
55834     fi
55835   fi
55836 
55837       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55838 $as_echo_n "checking for $DLL_NAME... " >&6; }
55839       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55840 $as_echo "$MSVC_DLL" >&6; }
55841     else
55842       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55843 $as_echo "incorrect, ignoring" >&6; }
55844       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55845 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55846     fi
55847   fi
55848 
55849     fi
55850   fi
55851 
55852   if test "x$MSVC_DLL" = x; then
55853     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55854 $as_echo_n "checking for $DLL_NAME... " >&6; }
55855     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55856 $as_echo "no" >&6; }
55857     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55858   fi
55859 
55860     MSVCR_DLL="$MSVC_DLL"
55861   fi
55862 
55863 
55864 
55865 # Check whether --with-msvcp-dll was given.
55866 if test "${with_msvcp_dll+set}" = set; then :
55867   withval=$with_msvcp_dll;
55868 fi
55869 
55870 
55871   if test "x$MSVCP_NAME" != "x"; then
55872     if test "x$with_msvcp_dll" != x; then
55873       # If given explicitly by user, do not probe. If not present, fail directly.
55874 
55875   DLL_NAME="$MSVCP_NAME"
55876   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55877   METHOD="--with-msvcp-dll"
55878   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55879     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55880 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55881 
55882     # Need to check if the found msvcr is correct architecture
55883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55884 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55885     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55886     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55887       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55888       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55889       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55890         CORRECT_MSVCR_ARCH="PE32 executable"
55891       else
55892         CORRECT_MSVCR_ARCH="PE32+ executable"
55893       fi
55894     else
55895       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55896         CORRECT_MSVCR_ARCH=386
55897       else
55898         CORRECT_MSVCR_ARCH=x86-64
55899       fi
55900     fi
55901     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55902       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55903 $as_echo "ok" >&6; }
55904       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55905 
55906   # Only process if variable expands to non-empty
55907 
55908   if test "x$MSVC_DLL" != x; then
55909     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55910 
55911   # Input might be given as Windows format, start by converting to
55912   # unix format.
55913   path="$MSVC_DLL"
55914   new_path=`$CYGPATH -u "$path"`
55915 
55916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55919   # "foo.exe" is OK but "foo" is an error.
55920   #
55921   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55922   # It is also a way to make sure we got the proper file name for the real test later on.
55923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55924   if test "x$test_shortpath" = x; then
55925     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55926 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55927     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55928   fi
55929 
55930   # Call helper function which possibly converts this using DOS-style short mode.
55931   # If so, the updated path is stored in $new_path.
55932 
55933   input_path="$new_path"
55934   # Check if we need to convert this using DOS-style short mode. If the path
55935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55936   # take no chances and rewrite it.
55937   # Note: m4 eats our [], so we need to use [ and ] instead.
55938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55939   if test "x$has_forbidden_chars" != x; then
55940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55944       # Going to short mode and back again did indeed matter. Since short mode is
55945       # case insensitive, let's make it lowercase to improve readability.
55946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55947       # Now convert it back to Unix-style (cygpath)
55948       input_path=`$CYGPATH -u "$shortmode_path"`
55949       new_path="$input_path"
55950     fi
55951   fi
55952 
55953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55954   if test "x$test_cygdrive_prefix" = x; then
55955     # As a simple fix, exclude /usr/bin since it's not a real path.
55956     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55958       # a path prefixed by /cygdrive for fixpath to work.
55959       new_path="$CYGWIN_ROOT_PATH$input_path"
55960     fi
55961   fi
55962 
55963 
55964   if test "x$path" != "x$new_path"; then
55965     MSVC_DLL="$new_path"
55966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55967 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55968   fi
55969 
55970     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55971 
55972   path="$MSVC_DLL"
55973   has_colon=`$ECHO $path | $GREP ^.:`
55974   new_path="$path"
55975   if test "x$has_colon" = x; then
55976     # Not in mixed or Windows style, start by that.
55977     new_path=`cmd //c echo $path`
55978   fi
55979 
55980 
55981   input_path="$new_path"
55982   # Check if we need to convert this using DOS-style short mode. If the path
55983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55984   # take no chances and rewrite it.
55985   # Note: m4 eats our [], so we need to use [ and ] instead.
55986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55987   if test "x$has_forbidden_chars" != x; then
55988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55989     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55990   fi
55991 
55992 
55993   windows_path="$new_path"
55994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55995     unix_path=`$CYGPATH -u "$windows_path"`
55996     new_path="$unix_path"
55997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55999     new_path="$unix_path"
56000   fi
56001 
56002   if test "x$path" != "x$new_path"; then
56003     MSVC_DLL="$new_path"
56004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56005 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56006   fi
56007 
56008   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56009   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56010 
56011     else
56012       # We're on a unix platform. Hooray! :)
56013       path="$MSVC_DLL"
56014       has_space=`$ECHO "$path" | $GREP " "`
56015       if test "x$has_space" != x; then
56016         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56017 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56018         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56019       fi
56020 
56021       # Use eval to expand a potential ~
56022       eval path="$path"
56023       if test ! -f "$path" && test ! -d "$path"; then
56024         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56025       fi
56026 
56027       if test -d "$path"; then
56028         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56029       else
56030         dir="`$DIRNAME "$path"`"
56031         base="`$BASENAME "$path"`"
56032         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56033       fi
56034     fi
56035   fi
56036 
56037       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56038 $as_echo_n "checking for $DLL_NAME... " >&6; }
56039       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56040 $as_echo "$MSVC_DLL" >&6; }
56041     else
56042       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56043 $as_echo "incorrect, ignoring" >&6; }
56044       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56045 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56046     fi
56047   fi
56048 
56049       if test "x$MSVC_DLL" = x; then
56050         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
56051       fi
56052       MSVCP_DLL="$MSVC_DLL"
56053     elif test "x$DEVKIT_MSVCP_DLL" != x; then
56054 
56055   DLL_NAME="$MSVCP_NAME"
56056   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
56057   METHOD="devkit"
56058   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56059     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56060 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56061 
56062     # Need to check if the found msvcr is correct architecture
56063     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56064 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56065     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56066     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56067       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56068       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56069       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56070         CORRECT_MSVCR_ARCH="PE32 executable"
56071       else
56072         CORRECT_MSVCR_ARCH="PE32+ executable"
56073       fi
56074     else
56075       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56076         CORRECT_MSVCR_ARCH=386
56077       else
56078         CORRECT_MSVCR_ARCH=x86-64
56079       fi
56080     fi
56081     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56082       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56083 $as_echo "ok" >&6; }
56084       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56085 
56086   # Only process if variable expands to non-empty
56087 
56088   if test "x$MSVC_DLL" != x; then
56089     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56090 
56091   # Input might be given as Windows format, start by converting to
56092   # unix format.
56093   path="$MSVC_DLL"
56094   new_path=`$CYGPATH -u "$path"`
56095 
56096   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56097   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56098   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56099   # "foo.exe" is OK but "foo" is an error.
56100   #
56101   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56102   # It is also a way to make sure we got the proper file name for the real test later on.
56103   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56104   if test "x$test_shortpath" = x; then
56105     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56106 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56107     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56108   fi
56109 
56110   # Call helper function which possibly converts this using DOS-style short mode.
56111   # If so, the updated path is stored in $new_path.
56112 
56113   input_path="$new_path"
56114   # Check if we need to convert this using DOS-style short mode. If the path
56115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56116   # take no chances and rewrite it.
56117   # Note: m4 eats our [], so we need to use [ and ] instead.
56118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56119   if test "x$has_forbidden_chars" != x; then
56120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56121     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56122     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56123     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56124       # Going to short mode and back again did indeed matter. Since short mode is
56125       # case insensitive, let's make it lowercase to improve readability.
56126       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56127       # Now convert it back to Unix-style (cygpath)
56128       input_path=`$CYGPATH -u "$shortmode_path"`
56129       new_path="$input_path"
56130     fi
56131   fi
56132 
56133   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56134   if test "x$test_cygdrive_prefix" = x; then
56135     # As a simple fix, exclude /usr/bin since it's not a real path.
56136     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56137       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56138       # a path prefixed by /cygdrive for fixpath to work.
56139       new_path="$CYGWIN_ROOT_PATH$input_path"
56140     fi
56141   fi
56142 
56143 
56144   if test "x$path" != "x$new_path"; then
56145     MSVC_DLL="$new_path"
56146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56147 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56148   fi
56149 
56150     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56151 
56152   path="$MSVC_DLL"
56153   has_colon=`$ECHO $path | $GREP ^.:`
56154   new_path="$path"
56155   if test "x$has_colon" = x; then
56156     # Not in mixed or Windows style, start by that.
56157     new_path=`cmd //c echo $path`
56158   fi
56159 
56160 
56161   input_path="$new_path"
56162   # Check if we need to convert this using DOS-style short mode. If the path
56163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56164   # take no chances and rewrite it.
56165   # Note: m4 eats our [], so we need to use [ and ] instead.
56166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56167   if test "x$has_forbidden_chars" != x; then
56168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56169     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56170   fi
56171 
56172 
56173   windows_path="$new_path"
56174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56175     unix_path=`$CYGPATH -u "$windows_path"`
56176     new_path="$unix_path"
56177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56179     new_path="$unix_path"
56180   fi
56181 
56182   if test "x$path" != "x$new_path"; then
56183     MSVC_DLL="$new_path"
56184     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56185 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56186   fi
56187 
56188   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56189   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56190 
56191     else
56192       # We're on a unix platform. Hooray! :)
56193       path="$MSVC_DLL"
56194       has_space=`$ECHO "$path" | $GREP " "`
56195       if test "x$has_space" != x; then
56196         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56197 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56198         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56199       fi
56200 
56201       # Use eval to expand a potential ~
56202       eval path="$path"
56203       if test ! -f "$path" && test ! -d "$path"; then
56204         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56205       fi
56206 
56207       if test -d "$path"; then
56208         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56209       else
56210         dir="`$DIRNAME "$path"`"
56211         base="`$BASENAME "$path"`"
56212         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56213       fi
56214     fi
56215   fi
56216 
56217       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56218 $as_echo_n "checking for $DLL_NAME... " >&6; }
56219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56220 $as_echo "$MSVC_DLL" >&6; }
56221     else
56222       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56223 $as_echo "incorrect, ignoring" >&6; }
56224       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56225 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56226     fi
56227   fi
56228 
56229       if test "x$MSVC_DLL" = x; then
56230         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56231       fi
56232       MSVCP_DLL="$MSVC_DLL"
56233     else
56234 
56235   DLL_NAME="${MSVCP_NAME}"
56236   MSVC_DLL=
56237 
56238   if test "x$MSVC_DLL" = x; then
56239     # Probe: Using well-known location from Visual Studio 10.0
56240     if test "x$VCINSTALLDIR" != x; then
56241       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56242 
56243   windows_path="$CYGWIN_VC_INSTALL_DIR"
56244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56245     unix_path=`$CYGPATH -u "$windows_path"`
56246     CYGWIN_VC_INSTALL_DIR="$unix_path"
56247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56249     CYGWIN_VC_INSTALL_DIR="$unix_path"
56250   fi
56251 
56252       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56253         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56254       else
56255         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56256       fi
56257       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56258 
56259   DLL_NAME="$DLL_NAME"
56260   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56261   METHOD="well-known location in VCINSTALLDIR"
56262   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56263     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56264 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56265 
56266     # Need to check if the found msvcr is correct architecture
56267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56268 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56269     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56270     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56271       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56272       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56273       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56274         CORRECT_MSVCR_ARCH="PE32 executable"
56275       else
56276         CORRECT_MSVCR_ARCH="PE32+ executable"
56277       fi
56278     else
56279       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56280         CORRECT_MSVCR_ARCH=386
56281       else
56282         CORRECT_MSVCR_ARCH=x86-64
56283       fi
56284     fi
56285     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56287 $as_echo "ok" >&6; }
56288       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56289 
56290   # Only process if variable expands to non-empty
56291 
56292   if test "x$MSVC_DLL" != x; then
56293     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56294 
56295   # Input might be given as Windows format, start by converting to
56296   # unix format.
56297   path="$MSVC_DLL"
56298   new_path=`$CYGPATH -u "$path"`
56299 
56300   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56301   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56302   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56303   # "foo.exe" is OK but "foo" is an error.
56304   #
56305   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56306   # It is also a way to make sure we got the proper file name for the real test later on.
56307   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56308   if test "x$test_shortpath" = x; then
56309     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56310 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56311     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56312   fi
56313 
56314   # Call helper function which possibly converts this using DOS-style short mode.
56315   # If so, the updated path is stored in $new_path.
56316 
56317   input_path="$new_path"
56318   # Check if we need to convert this using DOS-style short mode. If the path
56319   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56320   # take no chances and rewrite it.
56321   # Note: m4 eats our [], so we need to use [ and ] instead.
56322   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56323   if test "x$has_forbidden_chars" != x; then
56324     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56325     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56326     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56327     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56328       # Going to short mode and back again did indeed matter. Since short mode is
56329       # case insensitive, let's make it lowercase to improve readability.
56330       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56331       # Now convert it back to Unix-style (cygpath)
56332       input_path=`$CYGPATH -u "$shortmode_path"`
56333       new_path="$input_path"
56334     fi
56335   fi
56336 
56337   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56338   if test "x$test_cygdrive_prefix" = x; then
56339     # As a simple fix, exclude /usr/bin since it's not a real path.
56340     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56341       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56342       # a path prefixed by /cygdrive for fixpath to work.
56343       new_path="$CYGWIN_ROOT_PATH$input_path"
56344     fi
56345   fi
56346 
56347 
56348   if test "x$path" != "x$new_path"; then
56349     MSVC_DLL="$new_path"
56350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56351 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56352   fi
56353 
56354     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56355 
56356   path="$MSVC_DLL"
56357   has_colon=`$ECHO $path | $GREP ^.:`
56358   new_path="$path"
56359   if test "x$has_colon" = x; then
56360     # Not in mixed or Windows style, start by that.
56361     new_path=`cmd //c echo $path`
56362   fi
56363 
56364 
56365   input_path="$new_path"
56366   # Check if we need to convert this using DOS-style short mode. If the path
56367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56368   # take no chances and rewrite it.
56369   # Note: m4 eats our [], so we need to use [ and ] instead.
56370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56371   if test "x$has_forbidden_chars" != x; then
56372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56373     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56374   fi
56375 
56376 
56377   windows_path="$new_path"
56378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56379     unix_path=`$CYGPATH -u "$windows_path"`
56380     new_path="$unix_path"
56381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56383     new_path="$unix_path"
56384   fi
56385 
56386   if test "x$path" != "x$new_path"; then
56387     MSVC_DLL="$new_path"
56388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56389 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56390   fi
56391 
56392   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56393   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56394 
56395     else
56396       # We're on a unix platform. Hooray! :)
56397       path="$MSVC_DLL"
56398       has_space=`$ECHO "$path" | $GREP " "`
56399       if test "x$has_space" != x; then
56400         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56401 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56402         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56403       fi
56404 
56405       # Use eval to expand a potential ~
56406       eval path="$path"
56407       if test ! -f "$path" && test ! -d "$path"; then
56408         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56409       fi
56410 
56411       if test -d "$path"; then
56412         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56413       else
56414         dir="`$DIRNAME "$path"`"
56415         base="`$BASENAME "$path"`"
56416         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56417       fi
56418     fi
56419   fi
56420 
56421       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56422 $as_echo_n "checking for $DLL_NAME... " >&6; }
56423       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56424 $as_echo "$MSVC_DLL" >&6; }
56425     else
56426       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56427 $as_echo "incorrect, ignoring" >&6; }
56428       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56429 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56430     fi
56431   fi
56432 
56433     fi
56434   fi
56435 
56436   if test "x$MSVC_DLL" = x; then
56437     # Probe: Check in the Boot JDK directory.
56438     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56439 
56440   DLL_NAME="$DLL_NAME"
56441   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56442   METHOD="well-known location in Boot JDK"
56443   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56444     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56445 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56446 
56447     # Need to check if the found msvcr is correct architecture
56448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56449 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56450     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56452       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56453       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56454       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56455         CORRECT_MSVCR_ARCH="PE32 executable"
56456       else
56457         CORRECT_MSVCR_ARCH="PE32+ executable"
56458       fi
56459     else
56460       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56461         CORRECT_MSVCR_ARCH=386
56462       else
56463         CORRECT_MSVCR_ARCH=x86-64
56464       fi
56465     fi
56466     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56467       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56468 $as_echo "ok" >&6; }
56469       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56470 
56471   # Only process if variable expands to non-empty
56472 
56473   if test "x$MSVC_DLL" != x; then
56474     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56475 
56476   # Input might be given as Windows format, start by converting to
56477   # unix format.
56478   path="$MSVC_DLL"
56479   new_path=`$CYGPATH -u "$path"`
56480 
56481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56484   # "foo.exe" is OK but "foo" is an error.
56485   #
56486   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56487   # It is also a way to make sure we got the proper file name for the real test later on.
56488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56489   if test "x$test_shortpath" = x; then
56490     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56491 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56492     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56493   fi
56494 
56495   # Call helper function which possibly converts this using DOS-style short mode.
56496   # If so, the updated path is stored in $new_path.
56497 
56498   input_path="$new_path"
56499   # Check if we need to convert this using DOS-style short mode. If the path
56500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56501   # take no chances and rewrite it.
56502   # Note: m4 eats our [], so we need to use [ and ] instead.
56503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56504   if test "x$has_forbidden_chars" != x; then
56505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56506     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56507     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56508     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56509       # Going to short mode and back again did indeed matter. Since short mode is
56510       # case insensitive, let's make it lowercase to improve readability.
56511       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56512       # Now convert it back to Unix-style (cygpath)
56513       input_path=`$CYGPATH -u "$shortmode_path"`
56514       new_path="$input_path"
56515     fi
56516   fi
56517 
56518   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56519   if test "x$test_cygdrive_prefix" = x; then
56520     # As a simple fix, exclude /usr/bin since it's not a real path.
56521     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56522       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56523       # a path prefixed by /cygdrive for fixpath to work.
56524       new_path="$CYGWIN_ROOT_PATH$input_path"
56525     fi
56526   fi
56527 
56528 
56529   if test "x$path" != "x$new_path"; then
56530     MSVC_DLL="$new_path"
56531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56532 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56533   fi
56534 
56535     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56536 
56537   path="$MSVC_DLL"
56538   has_colon=`$ECHO $path | $GREP ^.:`
56539   new_path="$path"
56540   if test "x$has_colon" = x; then
56541     # Not in mixed or Windows style, start by that.
56542     new_path=`cmd //c echo $path`
56543   fi
56544 
56545 
56546   input_path="$new_path"
56547   # Check if we need to convert this using DOS-style short mode. If the path
56548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56549   # take no chances and rewrite it.
56550   # Note: m4 eats our [], so we need to use [ and ] instead.
56551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56552   if test "x$has_forbidden_chars" != x; then
56553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56555   fi
56556 
56557 
56558   windows_path="$new_path"
56559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56560     unix_path=`$CYGPATH -u "$windows_path"`
56561     new_path="$unix_path"
56562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56564     new_path="$unix_path"
56565   fi
56566 
56567   if test "x$path" != "x$new_path"; then
56568     MSVC_DLL="$new_path"
56569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56570 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56571   fi
56572 
56573   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56574   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56575 
56576     else
56577       # We're on a unix platform. Hooray! :)
56578       path="$MSVC_DLL"
56579       has_space=`$ECHO "$path" | $GREP " "`
56580       if test "x$has_space" != x; then
56581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56582 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56583         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56584       fi
56585 
56586       # Use eval to expand a potential ~
56587       eval path="$path"
56588       if test ! -f "$path" && test ! -d "$path"; then
56589         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56590       fi
56591 
56592       if test -d "$path"; then
56593         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56594       else
56595         dir="`$DIRNAME "$path"`"
56596         base="`$BASENAME "$path"`"
56597         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56598       fi
56599     fi
56600   fi
56601 
56602       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56603 $as_echo_n "checking for $DLL_NAME... " >&6; }
56604       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56605 $as_echo "$MSVC_DLL" >&6; }
56606     else
56607       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56608 $as_echo "incorrect, ignoring" >&6; }
56609       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56610 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56611     fi
56612   fi
56613 
56614   fi
56615 
56616   if test "x$MSVC_DLL" = x; then
56617     # Probe: Look in the Windows system32 directory
56618     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56619 
56620   windows_path="$CYGWIN_SYSTEMROOT"
56621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56622     unix_path=`$CYGPATH -u "$windows_path"`
56623     CYGWIN_SYSTEMROOT="$unix_path"
56624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56626     CYGWIN_SYSTEMROOT="$unix_path"
56627   fi
56628 
56629     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56630 
56631   DLL_NAME="$DLL_NAME"
56632   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56633   METHOD="well-known location in SYSTEMROOT"
56634   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56635     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56636 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56637 
56638     # Need to check if the found msvcr is correct architecture
56639     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56640 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56641     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56642     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56643       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56644       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56645       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56646         CORRECT_MSVCR_ARCH="PE32 executable"
56647       else
56648         CORRECT_MSVCR_ARCH="PE32+ executable"
56649       fi
56650     else
56651       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56652         CORRECT_MSVCR_ARCH=386
56653       else
56654         CORRECT_MSVCR_ARCH=x86-64
56655       fi
56656     fi
56657     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56658       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56659 $as_echo "ok" >&6; }
56660       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56661 
56662   # Only process if variable expands to non-empty
56663 
56664   if test "x$MSVC_DLL" != x; then
56665     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56666 
56667   # Input might be given as Windows format, start by converting to
56668   # unix format.
56669   path="$MSVC_DLL"
56670   new_path=`$CYGPATH -u "$path"`
56671 
56672   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56673   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56674   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56675   # "foo.exe" is OK but "foo" is an error.
56676   #
56677   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56678   # It is also a way to make sure we got the proper file name for the real test later on.
56679   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56680   if test "x$test_shortpath" = x; then
56681     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56682 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56683     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56684   fi
56685 
56686   # Call helper function which possibly converts this using DOS-style short mode.
56687   # If so, the updated path is stored in $new_path.
56688 
56689   input_path="$new_path"
56690   # Check if we need to convert this using DOS-style short mode. If the path
56691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56692   # take no chances and rewrite it.
56693   # Note: m4 eats our [], so we need to use [ and ] instead.
56694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56695   if test "x$has_forbidden_chars" != x; then
56696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56697     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56698     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56699     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56700       # Going to short mode and back again did indeed matter. Since short mode is
56701       # case insensitive, let's make it lowercase to improve readability.
56702       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56703       # Now convert it back to Unix-style (cygpath)
56704       input_path=`$CYGPATH -u "$shortmode_path"`
56705       new_path="$input_path"
56706     fi
56707   fi
56708 
56709   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56710   if test "x$test_cygdrive_prefix" = x; then
56711     # As a simple fix, exclude /usr/bin since it's not a real path.
56712     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56713       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56714       # a path prefixed by /cygdrive for fixpath to work.
56715       new_path="$CYGWIN_ROOT_PATH$input_path"
56716     fi
56717   fi
56718 
56719 
56720   if test "x$path" != "x$new_path"; then
56721     MSVC_DLL="$new_path"
56722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56723 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56724   fi
56725 
56726     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56727 
56728   path="$MSVC_DLL"
56729   has_colon=`$ECHO $path | $GREP ^.:`
56730   new_path="$path"
56731   if test "x$has_colon" = x; then
56732     # Not in mixed or Windows style, start by that.
56733     new_path=`cmd //c echo $path`
56734   fi
56735 
56736 
56737   input_path="$new_path"
56738   # Check if we need to convert this using DOS-style short mode. If the path
56739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56740   # take no chances and rewrite it.
56741   # Note: m4 eats our [], so we need to use [ and ] instead.
56742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56743   if test "x$has_forbidden_chars" != x; then
56744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56745     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56746   fi
56747 
56748 
56749   windows_path="$new_path"
56750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56751     unix_path=`$CYGPATH -u "$windows_path"`
56752     new_path="$unix_path"
56753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56755     new_path="$unix_path"
56756   fi
56757 
56758   if test "x$path" != "x$new_path"; then
56759     MSVC_DLL="$new_path"
56760     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56761 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56762   fi
56763 
56764   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56765   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56766 
56767     else
56768       # We're on a unix platform. Hooray! :)
56769       path="$MSVC_DLL"
56770       has_space=`$ECHO "$path" | $GREP " "`
56771       if test "x$has_space" != x; then
56772         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56773 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56774         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56775       fi
56776 
56777       # Use eval to expand a potential ~
56778       eval path="$path"
56779       if test ! -f "$path" && test ! -d "$path"; then
56780         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56781       fi
56782 
56783       if test -d "$path"; then
56784         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56785       else
56786         dir="`$DIRNAME "$path"`"
56787         base="`$BASENAME "$path"`"
56788         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56789       fi
56790     fi
56791   fi
56792 
56793       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56794 $as_echo_n "checking for $DLL_NAME... " >&6; }
56795       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56796 $as_echo "$MSVC_DLL" >&6; }
56797     else
56798       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56799 $as_echo "incorrect, ignoring" >&6; }
56800       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56801 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56802     fi
56803   fi
56804 
56805   fi
56806 
56807   if test "x$MSVC_DLL" = x; then
56808     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56809     if test "x$VS100COMNTOOLS" != x; then
56810       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56811 
56812   windows_path="$CYGWIN_VS_TOOLS_DIR"
56813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56814     unix_path=`$CYGPATH -u "$windows_path"`
56815     CYGWIN_VS_TOOLS_DIR="$unix_path"
56816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56818     CYGWIN_VS_TOOLS_DIR="$unix_path"
56819   fi
56820 
56821       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56822         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56823             | $GREP -i /x64/ | $HEAD --lines 1`
56824       else
56825         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56826             | $GREP -i /x86/ | $HEAD --lines 1`
56827       fi
56828 
56829   DLL_NAME="$DLL_NAME"
56830   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56831   METHOD="search of VS100COMNTOOLS"
56832   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56833     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56834 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56835 
56836     # Need to check if the found msvcr is correct architecture
56837     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56838 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56839     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56840     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56841       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56842       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56843       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56844         CORRECT_MSVCR_ARCH="PE32 executable"
56845       else
56846         CORRECT_MSVCR_ARCH="PE32+ executable"
56847       fi
56848     else
56849       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56850         CORRECT_MSVCR_ARCH=386
56851       else
56852         CORRECT_MSVCR_ARCH=x86-64
56853       fi
56854     fi
56855     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56856       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56857 $as_echo "ok" >&6; }
56858       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56859 
56860   # Only process if variable expands to non-empty
56861 
56862   if test "x$MSVC_DLL" != x; then
56863     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56864 
56865   # Input might be given as Windows format, start by converting to
56866   # unix format.
56867   path="$MSVC_DLL"
56868   new_path=`$CYGPATH -u "$path"`
56869 
56870   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56871   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56872   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56873   # "foo.exe" is OK but "foo" is an error.
56874   #
56875   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56876   # It is also a way to make sure we got the proper file name for the real test later on.
56877   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56878   if test "x$test_shortpath" = x; then
56879     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56880 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56881     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56882   fi
56883 
56884   # Call helper function which possibly converts this using DOS-style short mode.
56885   # If so, the updated path is stored in $new_path.
56886 
56887   input_path="$new_path"
56888   # Check if we need to convert this using DOS-style short mode. If the path
56889   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56890   # take no chances and rewrite it.
56891   # Note: m4 eats our [], so we need to use [ and ] instead.
56892   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56893   if test "x$has_forbidden_chars" != x; then
56894     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56895     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56896     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56897     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56898       # Going to short mode and back again did indeed matter. Since short mode is
56899       # case insensitive, let's make it lowercase to improve readability.
56900       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56901       # Now convert it back to Unix-style (cygpath)
56902       input_path=`$CYGPATH -u "$shortmode_path"`
56903       new_path="$input_path"
56904     fi
56905   fi
56906 
56907   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56908   if test "x$test_cygdrive_prefix" = x; then
56909     # As a simple fix, exclude /usr/bin since it's not a real path.
56910     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56911       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56912       # a path prefixed by /cygdrive for fixpath to work.
56913       new_path="$CYGWIN_ROOT_PATH$input_path"
56914     fi
56915   fi
56916 
56917 
56918   if test "x$path" != "x$new_path"; then
56919     MSVC_DLL="$new_path"
56920     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56921 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56922   fi
56923 
56924     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56925 
56926   path="$MSVC_DLL"
56927   has_colon=`$ECHO $path | $GREP ^.:`
56928   new_path="$path"
56929   if test "x$has_colon" = x; then
56930     # Not in mixed or Windows style, start by that.
56931     new_path=`cmd //c echo $path`
56932   fi
56933 
56934 
56935   input_path="$new_path"
56936   # Check if we need to convert this using DOS-style short mode. If the path
56937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56938   # take no chances and rewrite it.
56939   # Note: m4 eats our [], so we need to use [ and ] instead.
56940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56941   if test "x$has_forbidden_chars" != x; then
56942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56943     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56944   fi
56945 
56946 
56947   windows_path="$new_path"
56948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56949     unix_path=`$CYGPATH -u "$windows_path"`
56950     new_path="$unix_path"
56951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56953     new_path="$unix_path"
56954   fi
56955 
56956   if test "x$path" != "x$new_path"; then
56957     MSVC_DLL="$new_path"
56958     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56959 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56960   fi
56961 
56962   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56963   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56964 
56965     else
56966       # We're on a unix platform. Hooray! :)
56967       path="$MSVC_DLL"
56968       has_space=`$ECHO "$path" | $GREP " "`
56969       if test "x$has_space" != x; then
56970         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56971 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56972         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56973       fi
56974 
56975       # Use eval to expand a potential ~
56976       eval path="$path"
56977       if test ! -f "$path" && test ! -d "$path"; then
56978         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56979       fi
56980 
56981       if test -d "$path"; then
56982         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56983       else
56984         dir="`$DIRNAME "$path"`"
56985         base="`$BASENAME "$path"`"
56986         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56987       fi
56988     fi
56989   fi
56990 
56991       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56992 $as_echo_n "checking for $DLL_NAME... " >&6; }
56993       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56994 $as_echo "$MSVC_DLL" >&6; }
56995     else
56996       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56997 $as_echo "incorrect, ignoring" >&6; }
56998       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56999 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57000     fi
57001   fi
57002 
57003     fi
57004   fi
57005 
57006   if test "x$MSVC_DLL" = x; then
57007     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
57008     # (This was the original behaviour; kept since it might turn something up)
57009     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
57010       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57011         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57012             | $GREP x64 | $HEAD --lines 1`
57013       else
57014         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57015             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
57016         if test "x$POSSIBLE_MSVC_DLL" = x; then
57017           # We're grasping at straws now...
57018           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57019               | $HEAD --lines 1`
57020         fi
57021       fi
57022 
57023 
57024   DLL_NAME="$DLL_NAME"
57025   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57026   METHOD="search of VCINSTALLDIR"
57027   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57028     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57029 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57030 
57031     # Need to check if the found msvcr is correct architecture
57032     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57033 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57034     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57035     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57036       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57037       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57038       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57039         CORRECT_MSVCR_ARCH="PE32 executable"
57040       else
57041         CORRECT_MSVCR_ARCH="PE32+ executable"
57042       fi
57043     else
57044       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57045         CORRECT_MSVCR_ARCH=386
57046       else
57047         CORRECT_MSVCR_ARCH=x86-64
57048       fi
57049     fi
57050     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57051       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57052 $as_echo "ok" >&6; }
57053       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57054 
57055   # Only process if variable expands to non-empty
57056 
57057   if test "x$MSVC_DLL" != x; then
57058     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57059 
57060   # Input might be given as Windows format, start by converting to
57061   # unix format.
57062   path="$MSVC_DLL"
57063   new_path=`$CYGPATH -u "$path"`
57064 
57065   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57066   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57067   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57068   # "foo.exe" is OK but "foo" is an error.
57069   #
57070   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57071   # It is also a way to make sure we got the proper file name for the real test later on.
57072   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57073   if test "x$test_shortpath" = x; then
57074     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57075 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57076     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57077   fi
57078 
57079   # Call helper function which possibly converts this using DOS-style short mode.
57080   # If so, the updated path is stored in $new_path.
57081 
57082   input_path="$new_path"
57083   # Check if we need to convert this using DOS-style short mode. If the path
57084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57085   # take no chances and rewrite it.
57086   # Note: m4 eats our [], so we need to use [ and ] instead.
57087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57088   if test "x$has_forbidden_chars" != x; then
57089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57090     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57091     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57092     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57093       # Going to short mode and back again did indeed matter. Since short mode is
57094       # case insensitive, let's make it lowercase to improve readability.
57095       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57096       # Now convert it back to Unix-style (cygpath)
57097       input_path=`$CYGPATH -u "$shortmode_path"`
57098       new_path="$input_path"
57099     fi
57100   fi
57101 
57102   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57103   if test "x$test_cygdrive_prefix" = x; then
57104     # As a simple fix, exclude /usr/bin since it's not a real path.
57105     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57106       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57107       # a path prefixed by /cygdrive for fixpath to work.
57108       new_path="$CYGWIN_ROOT_PATH$input_path"
57109     fi
57110   fi
57111 
57112 
57113   if test "x$path" != "x$new_path"; then
57114     MSVC_DLL="$new_path"
57115     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57116 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57117   fi
57118 
57119     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57120 
57121   path="$MSVC_DLL"
57122   has_colon=`$ECHO $path | $GREP ^.:`
57123   new_path="$path"
57124   if test "x$has_colon" = x; then
57125     # Not in mixed or Windows style, start by that.
57126     new_path=`cmd //c echo $path`
57127   fi
57128 
57129 
57130   input_path="$new_path"
57131   # Check if we need to convert this using DOS-style short mode. If the path
57132   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57133   # take no chances and rewrite it.
57134   # Note: m4 eats our [], so we need to use [ and ] instead.
57135   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57136   if test "x$has_forbidden_chars" != x; then
57137     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57138     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57139   fi
57140 
57141 
57142   windows_path="$new_path"
57143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57144     unix_path=`$CYGPATH -u "$windows_path"`
57145     new_path="$unix_path"
57146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57148     new_path="$unix_path"
57149   fi
57150 
57151   if test "x$path" != "x$new_path"; then
57152     MSVC_DLL="$new_path"
57153     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57154 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57155   fi
57156 
57157   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57158   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57159 
57160     else
57161       # We're on a unix platform. Hooray! :)
57162       path="$MSVC_DLL"
57163       has_space=`$ECHO "$path" | $GREP " "`
57164       if test "x$has_space" != x; then
57165         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57166 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57167         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57168       fi
57169 
57170       # Use eval to expand a potential ~
57171       eval path="$path"
57172       if test ! -f "$path" && test ! -d "$path"; then
57173         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57174       fi
57175 
57176       if test -d "$path"; then
57177         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57178       else
57179         dir="`$DIRNAME "$path"`"
57180         base="`$BASENAME "$path"`"
57181         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57182       fi
57183     fi
57184   fi
57185 
57186       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57187 $as_echo_n "checking for $DLL_NAME... " >&6; }
57188       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57189 $as_echo "$MSVC_DLL" >&6; }
57190     else
57191       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57192 $as_echo "incorrect, ignoring" >&6; }
57193       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57194 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57195     fi
57196   fi
57197 
57198     fi
57199   fi
57200 
57201   if test "x$MSVC_DLL" = x; then
57202     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57203 $as_echo_n "checking for $DLL_NAME... " >&6; }
57204     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57205 $as_echo "no" >&6; }
57206     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57207   fi
57208 
57209       MSVCP_DLL="$MSVC_DLL"
57210     fi
57211 
57212   fi
57213 
57214   fi
57215 
57216 
57217   if test "x$NEEDS_LIB_X11" = xfalse; then
57218     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57219       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57220 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57221     fi
57222     X_CFLAGS=
57223     X_LIBS=
57224   else
57225 
57226     if test "x${with_x}" = xno; then
57227       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57228     fi
57229 
57230     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57231       # The user has specified a X11 base directory. Use it for includes and
57232       # libraries, unless explicitly overridden.
57233       if test "x$x_includes" = xNONE; then
57234         x_includes="${with_x}/include"
57235       fi
57236       if test "x$x_libraries" = xNONE; then
57237         x_libraries="${with_x}/lib"
57238       fi
57239     else
57240       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57241       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57242       # --x-libraries for the sysroot, if that seems to be correct.
57243       if test "x$SYSROOT" != "x"; then
57244         if test "x$x_includes" = xNONE; then
57245           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57246             x_includes="$SYSROOT/usr/X11R6/include"
57247           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57248             x_includes="$SYSROOT/usr/include"
57249           fi
57250         fi
57251         if test "x$x_libraries" = xNONE; then
57252           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57253             x_libraries="$SYSROOT/usr/X11R6/lib"
57254           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57255             x_libraries="$SYSROOT/usr/lib64"
57256           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57257             x_libraries="$SYSROOT/usr/lib"
57258           fi
57259         fi
57260       fi
57261     fi
57262 
57263     # Now let autoconf do it's magic
57264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57265 $as_echo_n "checking for X... " >&6; }
57266 
57267 
57268 # Check whether --with-x was given.
57269 if test "${with_x+set}" = set; then :
57270   withval=$with_x;
57271 fi
57272 
57273 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57274 if test "x$with_x" = xno; then
57275   # The user explicitly disabled X.
57276   have_x=disabled
57277 else
57278   case $x_includes,$x_libraries in #(
57279     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57280     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57281   $as_echo_n "(cached) " >&6
57282 else
57283   # One or both of the vars are not set, and there is no cached value.
57284 ac_x_includes=no ac_x_libraries=no
57285 rm -f -r conftest.dir
57286 if mkdir conftest.dir; then
57287   cd conftest.dir
57288   cat >Imakefile <<'_ACEOF'
57289 incroot:
57290         @echo incroot='${INCROOT}'
57291 usrlibdir:
57292         @echo usrlibdir='${USRLIBDIR}'
57293 libdir:
57294         @echo libdir='${LIBDIR}'
57295 _ACEOF
57296   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57297     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57298     for ac_var in incroot usrlibdir libdir; do
57299       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57300     done
57301     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57302     for ac_extension in a so sl dylib la dll; do
57303       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57304          test -f "$ac_im_libdir/libX11.$ac_extension"; then
57305         ac_im_usrlibdir=$ac_im_libdir; break
57306       fi
57307     done
57308     # Screen out bogus values from the imake configuration.  They are
57309     # bogus both because they are the default anyway, and because
57310     # using them would break gcc on systems where it needs fixed includes.
57311     case $ac_im_incroot in
57312         /usr/include) ac_x_includes= ;;
57313         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57314     esac
57315     case $ac_im_usrlibdir in
57316         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
57317         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57318     esac
57319   fi
57320   cd ..
57321   rm -f -r conftest.dir
57322 fi
57323 
57324 # Standard set of common directories for X headers.
57325 # Check X11 before X11Rn because it is often a symlink to the current release.
57326 ac_x_header_dirs='
57327 /usr/X11/include
57328 /usr/X11R7/include
57329 /usr/X11R6/include
57330 /usr/X11R5/include
57331 /usr/X11R4/include
57332 
57333 /usr/include/X11
57334 /usr/include/X11R7
57335 /usr/include/X11R6
57336 /usr/include/X11R5
57337 /usr/include/X11R4
57338 
57339 /usr/local/X11/include
57340 /usr/local/X11R7/include
57341 /usr/local/X11R6/include
57342 /usr/local/X11R5/include
57343 /usr/local/X11R4/include
57344 
57345 /usr/local/include/X11
57346 /usr/local/include/X11R7
57347 /usr/local/include/X11R6
57348 /usr/local/include/X11R5
57349 /usr/local/include/X11R4
57350 
57351 /usr/X386/include
57352 /usr/x386/include
57353 /usr/XFree86/include/X11
57354 
57355 /usr/include
57356 /usr/local/include
57357 /usr/unsupported/include
57358 /usr/athena/include
57359 /usr/local/x11r5/include
57360 /usr/lpp/Xamples/include
57361 
57362 /usr/openwin/include
57363 /usr/openwin/share/include'
57364 
57365 if test "$ac_x_includes" = no; then
57366   # Guess where to find include files, by looking for Xlib.h.
57367   # First, try using that file with no special directory specified.
57368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57369 /* end confdefs.h.  */
57370 #include <X11/Xlib.h>
57371 _ACEOF
57372 if ac_fn_cxx_try_cpp "$LINENO"; then :
57373   # We can compile using X headers with no special include directory.
57374 ac_x_includes=
57375 else
57376   for ac_dir in $ac_x_header_dirs; do
57377   if test -r "$ac_dir/X11/Xlib.h"; then
57378     ac_x_includes=$ac_dir
57379     break
57380   fi
57381 done
57382 fi
57383 rm -f conftest.err conftest.i conftest.$ac_ext
57384 fi # $ac_x_includes = no
57385 
57386 if test "$ac_x_libraries" = no; then
57387   # Check for the libraries.
57388   # See if we find them without any special options.
57389   # Don't add to $LIBS permanently.
57390   ac_save_LIBS=$LIBS
57391   LIBS="-lX11 $LIBS"
57392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57393 /* end confdefs.h.  */
57394 #include <X11/Xlib.h>
57395 int
57396 main ()
57397 {
57398 XrmInitialize ()
57399   ;
57400   return 0;
57401 }
57402 _ACEOF
57403 if ac_fn_cxx_try_link "$LINENO"; then :
57404   LIBS=$ac_save_LIBS
57405 # We can link X programs with no special library path.
57406 ac_x_libraries=
57407 else
57408   LIBS=$ac_save_LIBS
57409 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57410 do
57411   # Don't even attempt the hair of trying to link an X program!
57412   for ac_extension in a so sl dylib la dll; do
57413     if test -r "$ac_dir/libX11.$ac_extension"; then
57414       ac_x_libraries=$ac_dir
57415       break 2
57416     fi
57417   done
57418 done
57419 fi
57420 rm -f core conftest.err conftest.$ac_objext \
57421     conftest$ac_exeext conftest.$ac_ext
57422 fi # $ac_x_libraries = no
57423 
57424 case $ac_x_includes,$ac_x_libraries in #(
57425   no,* | *,no | *\'*)
57426     # Didn't find X, or a directory has "'" in its name.
57427     ac_cv_have_x="have_x=no";; #(
57428   *)
57429     # Record where we found X for the cache.
57430     ac_cv_have_x="have_x=yes\
57431         ac_x_includes='$ac_x_includes'\
57432         ac_x_libraries='$ac_x_libraries'"
57433 esac
57434 fi
57435 ;; #(
57436     *) have_x=yes;;
57437   esac
57438   eval "$ac_cv_have_x"
57439 fi # $with_x != no
57440 
57441 if test "$have_x" != yes; then
57442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57443 $as_echo "$have_x" >&6; }
57444   no_x=yes
57445 else
57446   # If each of the values was on the command line, it overrides each guess.
57447   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57448   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57449   # Update the cache value to reflect the command line values.
57450   ac_cv_have_x="have_x=yes\
57451         ac_x_includes='$x_includes'\
57452         ac_x_libraries='$x_libraries'"
57453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57454 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57455 fi
57456 
57457     if test "$no_x" = yes; then
57458   # Not all programs may use this symbol, but it does not hurt to define it.
57459 
57460 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57461 
57462   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57463 else
57464   if test -n "$x_includes"; then
57465     X_CFLAGS="$X_CFLAGS -I$x_includes"
57466   fi
57467 
57468   # It would also be nice to do this for all -L options, not just this one.
57469   if test -n "$x_libraries"; then
57470     X_LIBS="$X_LIBS -L$x_libraries"
57471     # For Solaris; some versions of Sun CC require a space after -R and
57472     # others require no space.  Words are not sufficient . . . .
57473     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57474 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
57475     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57476     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57477     ac_cxx_werror_flag=yes
57478     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57479 /* end confdefs.h.  */
57480 
57481 int
57482 main ()
57483 {
57484 
57485   ;
57486   return 0;
57487 }
57488 _ACEOF
57489 if ac_fn_cxx_try_link "$LINENO"; then :
57490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57491 $as_echo "no" >&6; }
57492        X_LIBS="$X_LIBS -R$x_libraries"
57493 else
57494   LIBS="$ac_xsave_LIBS -R $x_libraries"
57495        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57496 /* end confdefs.h.  */
57497 
57498 int
57499 main ()
57500 {
57501 
57502   ;
57503   return 0;
57504 }
57505 _ACEOF
57506 if ac_fn_cxx_try_link "$LINENO"; then :
57507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57508 $as_echo "yes" >&6; }
57509           X_LIBS="$X_LIBS -R $x_libraries"
57510 else
57511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57512 $as_echo "neither works" >&6; }
57513 fi
57514 rm -f core conftest.err conftest.$ac_objext \
57515     conftest$ac_exeext conftest.$ac_ext
57516 fi
57517 rm -f core conftest.err conftest.$ac_objext \
57518     conftest$ac_exeext conftest.$ac_ext
57519     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57520     LIBS=$ac_xsave_LIBS
57521   fi
57522 
57523   # Check for system-dependent libraries X programs must link with.
57524   # Do this before checking for the system-independent R6 libraries
57525   # (-lICE), since we may need -lsocket or whatever for X linking.
57526 
57527   if test "$ISC" = yes; then
57528     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57529   else
57530     # Martyn Johnson says this is needed for Ultrix, if the X
57531     # libraries were built with DECnet support.  And Karl Berry says
57532     # the Alpha needs dnet_stub (dnet does not exist).
57533     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57534     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57535 /* end confdefs.h.  */
57536 
57537 /* Override any GCC internal prototype to avoid an error.
57538    Use char because int might match the return type of a GCC
57539    builtin and then its argument prototype would still apply.  */
57540 #ifdef __cplusplus
57541 extern "C"
57542 #endif
57543 char XOpenDisplay ();
57544 int
57545 main ()
57546 {
57547 return XOpenDisplay ();
57548   ;
57549   return 0;
57550 }
57551 _ACEOF
57552 if ac_fn_cxx_try_link "$LINENO"; then :
57553 
57554 else
57555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57556 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57557 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57558   $as_echo_n "(cached) " >&6
57559 else
57560   ac_check_lib_save_LIBS=$LIBS
57561 LIBS="-ldnet  $LIBS"
57562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57563 /* end confdefs.h.  */
57564 
57565 /* Override any GCC internal prototype to avoid an error.
57566    Use char because int might match the return type of a GCC
57567    builtin and then its argument prototype would still apply.  */
57568 #ifdef __cplusplus
57569 extern "C"
57570 #endif
57571 char dnet_ntoa ();
57572 int
57573 main ()
57574 {
57575 return dnet_ntoa ();
57576   ;
57577   return 0;
57578 }
57579 _ACEOF
57580 if ac_fn_cxx_try_link "$LINENO"; then :
57581   ac_cv_lib_dnet_dnet_ntoa=yes
57582 else
57583   ac_cv_lib_dnet_dnet_ntoa=no
57584 fi
57585 rm -f core conftest.err conftest.$ac_objext \
57586     conftest$ac_exeext conftest.$ac_ext
57587 LIBS=$ac_check_lib_save_LIBS
57588 fi
57589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57590 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57591 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57592   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57593 fi
57594 
57595     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57596       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57597 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57598 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57599   $as_echo_n "(cached) " >&6
57600 else
57601   ac_check_lib_save_LIBS=$LIBS
57602 LIBS="-ldnet_stub  $LIBS"
57603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57604 /* end confdefs.h.  */
57605 
57606 /* Override any GCC internal prototype to avoid an error.
57607    Use char because int might match the return type of a GCC
57608    builtin and then its argument prototype would still apply.  */
57609 #ifdef __cplusplus
57610 extern "C"
57611 #endif
57612 char dnet_ntoa ();
57613 int
57614 main ()
57615 {
57616 return dnet_ntoa ();
57617   ;
57618   return 0;
57619 }
57620 _ACEOF
57621 if ac_fn_cxx_try_link "$LINENO"; then :
57622   ac_cv_lib_dnet_stub_dnet_ntoa=yes
57623 else
57624   ac_cv_lib_dnet_stub_dnet_ntoa=no
57625 fi
57626 rm -f core conftest.err conftest.$ac_objext \
57627     conftest$ac_exeext conftest.$ac_ext
57628 LIBS=$ac_check_lib_save_LIBS
57629 fi
57630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57631 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57632 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57633   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57634 fi
57635 
57636     fi
57637 fi
57638 rm -f core conftest.err conftest.$ac_objext \
57639     conftest$ac_exeext conftest.$ac_ext
57640     LIBS="$ac_xsave_LIBS"
57641 
57642     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57643     # to get the SysV transport functions.
57644     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57645     # needs -lnsl.
57646     # The nsl library prevents programs from opening the X display
57647     # on Irix 5.2, according to T.E. Dickey.
57648     # The functions gethostbyname, getservbyname, and inet_addr are
57649     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57650     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57651 if test "x$ac_cv_func_gethostbyname" = xyes; then :
57652 
57653 fi
57654 
57655     if test $ac_cv_func_gethostbyname = no; then
57656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57657 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57658 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57659   $as_echo_n "(cached) " >&6
57660 else
57661   ac_check_lib_save_LIBS=$LIBS
57662 LIBS="-lnsl  $LIBS"
57663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57664 /* end confdefs.h.  */
57665 
57666 /* Override any GCC internal prototype to avoid an error.
57667    Use char because int might match the return type of a GCC
57668    builtin and then its argument prototype would still apply.  */
57669 #ifdef __cplusplus
57670 extern "C"
57671 #endif
57672 char gethostbyname ();
57673 int
57674 main ()
57675 {
57676 return gethostbyname ();
57677   ;
57678   return 0;
57679 }
57680 _ACEOF
57681 if ac_fn_cxx_try_link "$LINENO"; then :
57682   ac_cv_lib_nsl_gethostbyname=yes
57683 else
57684   ac_cv_lib_nsl_gethostbyname=no
57685 fi
57686 rm -f core conftest.err conftest.$ac_objext \
57687     conftest$ac_exeext conftest.$ac_ext
57688 LIBS=$ac_check_lib_save_LIBS
57689 fi
57690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57691 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57692 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57693   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57694 fi
57695 
57696       if test $ac_cv_lib_nsl_gethostbyname = no; then
57697         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57698 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57699 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57700   $as_echo_n "(cached) " >&6
57701 else
57702   ac_check_lib_save_LIBS=$LIBS
57703 LIBS="-lbsd  $LIBS"
57704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57705 /* end confdefs.h.  */
57706 
57707 /* Override any GCC internal prototype to avoid an error.
57708    Use char because int might match the return type of a GCC
57709    builtin and then its argument prototype would still apply.  */
57710 #ifdef __cplusplus
57711 extern "C"
57712 #endif
57713 char gethostbyname ();
57714 int
57715 main ()
57716 {
57717 return gethostbyname ();
57718   ;
57719   return 0;
57720 }
57721 _ACEOF
57722 if ac_fn_cxx_try_link "$LINENO"; then :
57723   ac_cv_lib_bsd_gethostbyname=yes
57724 else
57725   ac_cv_lib_bsd_gethostbyname=no
57726 fi
57727 rm -f core conftest.err conftest.$ac_objext \
57728     conftest$ac_exeext conftest.$ac_ext
57729 LIBS=$ac_check_lib_save_LIBS
57730 fi
57731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57732 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57733 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57734   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57735 fi
57736 
57737       fi
57738     fi
57739 
57740     # lieder@skyler.mavd.honeywell.com says without -lsocket,
57741     # socket/setsockopt and other routines are undefined under SCO ODT
57742     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57743     # on later versions), says Simon Leinen: it contains gethostby*
57744     # variants that don't use the name server (or something).  -lsocket
57745     # must be given before -lnsl if both are needed.  We assume that
57746     # if connect needs -lnsl, so does gethostbyname.
57747     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57748 if test "x$ac_cv_func_connect" = xyes; then :
57749 
57750 fi
57751 
57752     if test $ac_cv_func_connect = no; then
57753       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57754 $as_echo_n "checking for connect in -lsocket... " >&6; }
57755 if ${ac_cv_lib_socket_connect+:} false; then :
57756   $as_echo_n "(cached) " >&6
57757 else
57758   ac_check_lib_save_LIBS=$LIBS
57759 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57761 /* end confdefs.h.  */
57762 
57763 /* Override any GCC internal prototype to avoid an error.
57764    Use char because int might match the return type of a GCC
57765    builtin and then its argument prototype would still apply.  */
57766 #ifdef __cplusplus
57767 extern "C"
57768 #endif
57769 char connect ();
57770 int
57771 main ()
57772 {
57773 return connect ();
57774   ;
57775   return 0;
57776 }
57777 _ACEOF
57778 if ac_fn_cxx_try_link "$LINENO"; then :
57779   ac_cv_lib_socket_connect=yes
57780 else
57781   ac_cv_lib_socket_connect=no
57782 fi
57783 rm -f core conftest.err conftest.$ac_objext \
57784     conftest$ac_exeext conftest.$ac_ext
57785 LIBS=$ac_check_lib_save_LIBS
57786 fi
57787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57788 $as_echo "$ac_cv_lib_socket_connect" >&6; }
57789 if test "x$ac_cv_lib_socket_connect" = xyes; then :
57790   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57791 fi
57792 
57793     fi
57794 
57795     # Guillermo Gomez says -lposix is necessary on A/UX.
57796     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57797 if test "x$ac_cv_func_remove" = xyes; then :
57798 
57799 fi
57800 
57801     if test $ac_cv_func_remove = no; then
57802       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57803 $as_echo_n "checking for remove in -lposix... " >&6; }
57804 if ${ac_cv_lib_posix_remove+:} false; then :
57805   $as_echo_n "(cached) " >&6
57806 else
57807   ac_check_lib_save_LIBS=$LIBS
57808 LIBS="-lposix  $LIBS"
57809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57810 /* end confdefs.h.  */
57811 
57812 /* Override any GCC internal prototype to avoid an error.
57813    Use char because int might match the return type of a GCC
57814    builtin and then its argument prototype would still apply.  */
57815 #ifdef __cplusplus
57816 extern "C"
57817 #endif
57818 char remove ();
57819 int
57820 main ()
57821 {
57822 return remove ();
57823   ;
57824   return 0;
57825 }
57826 _ACEOF
57827 if ac_fn_cxx_try_link "$LINENO"; then :
57828   ac_cv_lib_posix_remove=yes
57829 else
57830   ac_cv_lib_posix_remove=no
57831 fi
57832 rm -f core conftest.err conftest.$ac_objext \
57833     conftest$ac_exeext conftest.$ac_ext
57834 LIBS=$ac_check_lib_save_LIBS
57835 fi
57836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57837 $as_echo "$ac_cv_lib_posix_remove" >&6; }
57838 if test "x$ac_cv_lib_posix_remove" = xyes; then :
57839   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57840 fi
57841 
57842     fi
57843 
57844     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57845     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57846 if test "x$ac_cv_func_shmat" = xyes; then :
57847 
57848 fi
57849 
57850     if test $ac_cv_func_shmat = no; then
57851       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57852 $as_echo_n "checking for shmat in -lipc... " >&6; }
57853 if ${ac_cv_lib_ipc_shmat+:} false; then :
57854   $as_echo_n "(cached) " >&6
57855 else
57856   ac_check_lib_save_LIBS=$LIBS
57857 LIBS="-lipc  $LIBS"
57858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57859 /* end confdefs.h.  */
57860 
57861 /* Override any GCC internal prototype to avoid an error.
57862    Use char because int might match the return type of a GCC
57863    builtin and then its argument prototype would still apply.  */
57864 #ifdef __cplusplus
57865 extern "C"
57866 #endif
57867 char shmat ();
57868 int
57869 main ()
57870 {
57871 return shmat ();
57872   ;
57873   return 0;
57874 }
57875 _ACEOF
57876 if ac_fn_cxx_try_link "$LINENO"; then :
57877   ac_cv_lib_ipc_shmat=yes
57878 else
57879   ac_cv_lib_ipc_shmat=no
57880 fi
57881 rm -f core conftest.err conftest.$ac_objext \
57882     conftest$ac_exeext conftest.$ac_ext
57883 LIBS=$ac_check_lib_save_LIBS
57884 fi
57885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57886 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57887 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57888   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57889 fi
57890 
57891     fi
57892   fi
57893 
57894   # Check for libraries that X11R6 Xt/Xaw programs need.
57895   ac_save_LDFLAGS=$LDFLAGS
57896   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57897   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57898   # check for ICE first), but we must link in the order -lSM -lICE or
57899   # we get undefined symbols.  So assume we have SM if we have ICE.
57900   # These have to be linked with before -lX11, unlike the other
57901   # libraries we check for below, so use a different variable.
57902   # John Interrante, Karl Berry
57903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57904 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57905 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57906   $as_echo_n "(cached) " >&6
57907 else
57908   ac_check_lib_save_LIBS=$LIBS
57909 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57911 /* end confdefs.h.  */
57912 
57913 /* Override any GCC internal prototype to avoid an error.
57914    Use char because int might match the return type of a GCC
57915    builtin and then its argument prototype would still apply.  */
57916 #ifdef __cplusplus
57917 extern "C"
57918 #endif
57919 char IceConnectionNumber ();
57920 int
57921 main ()
57922 {
57923 return IceConnectionNumber ();
57924   ;
57925   return 0;
57926 }
57927 _ACEOF
57928 if ac_fn_cxx_try_link "$LINENO"; then :
57929   ac_cv_lib_ICE_IceConnectionNumber=yes
57930 else
57931   ac_cv_lib_ICE_IceConnectionNumber=no
57932 fi
57933 rm -f core conftest.err conftest.$ac_objext \
57934     conftest$ac_exeext conftest.$ac_ext
57935 LIBS=$ac_check_lib_save_LIBS
57936 fi
57937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57938 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57939 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57940   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57941 fi
57942 
57943   LDFLAGS=$ac_save_LDFLAGS
57944 
57945 fi
57946 
57947 
57948     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57949     # this doesn't make sense so we remove it.
57950     if test "x$COMPILE_TYPE" = xcross; then
57951       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57952     fi
57953 
57954     if test "x$no_x" = xyes; then
57955 
57956   # Print a helpful message on how to acquire the necessary build dependency.
57957   # x11 is the help tag: freetype, cups, alsa etc
57958   MISSING_DEPENDENCY=x11
57959 
57960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57961     cygwin_help $MISSING_DEPENDENCY
57962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57963     msys_help $MISSING_DEPENDENCY
57964   else
57965     PKGHANDLER_COMMAND=
57966 
57967     case $PKGHANDLER in
57968       apt-get)
57969         apt_help     $MISSING_DEPENDENCY ;;
57970       yum)
57971         yum_help     $MISSING_DEPENDENCY ;;
57972       brew)
57973         brew_help    $MISSING_DEPENDENCY ;;
57974       port)
57975         port_help    $MISSING_DEPENDENCY ;;
57976       pkgutil)
57977         pkgutil_help $MISSING_DEPENDENCY ;;
57978       pkgadd)
57979         pkgadd_help  $MISSING_DEPENDENCY ;;
57980     esac
57981 
57982     if test "x$PKGHANDLER_COMMAND" != x; then
57983       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57984     fi
57985   fi
57986 
57987       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57988     fi
57989 
57990     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57991       OPENWIN_HOME="/usr/openwin"
57992       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57993       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57994           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57995     fi
57996 
57997     ac_ext=c
57998 ac_cpp='$CPP $CPPFLAGS'
57999 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58000 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
58002 
58003     OLD_CFLAGS="$CFLAGS"
58004     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
58005 
58006     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
58007     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
58008 do :
58009   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58010 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
58011           # include <X11/Xlib.h>
58012           # include <X11/Xutil.h>
58013 
58014 
58015 "
58016 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58017   cat >>confdefs.h <<_ACEOF
58018 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58019 _ACEOF
58020  X11_HEADERS_OK=yes
58021 else
58022   X11_HEADERS_OK=no; break
58023 fi
58024 
58025 done
58026 
58027 
58028     if test "x$X11_HEADERS_OK" = xno; then
58029 
58030   # Print a helpful message on how to acquire the necessary build dependency.
58031   # x11 is the help tag: freetype, cups, alsa etc
58032   MISSING_DEPENDENCY=x11
58033 
58034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58035     cygwin_help $MISSING_DEPENDENCY
58036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58037     msys_help $MISSING_DEPENDENCY
58038   else
58039     PKGHANDLER_COMMAND=
58040 
58041     case $PKGHANDLER in
58042       apt-get)
58043         apt_help     $MISSING_DEPENDENCY ;;
58044       yum)
58045         yum_help     $MISSING_DEPENDENCY ;;
58046       brew)
58047         brew_help    $MISSING_DEPENDENCY ;;
58048       port)
58049         port_help    $MISSING_DEPENDENCY ;;
58050       pkgutil)
58051         pkgutil_help $MISSING_DEPENDENCY ;;
58052       pkgadd)
58053         pkgadd_help  $MISSING_DEPENDENCY ;;
58054     esac
58055 
58056     if test "x$PKGHANDLER_COMMAND" != x; then
58057       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58058     fi
58059   fi
58060 
58061       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
58062     fi
58063 
58064     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
58065     # defined in libawt_xawt.
58066     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
58067 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
58068     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58069 /* end confdefs.h.  */
58070 #include <X11/extensions/Xrender.h>
58071 int
58072 main ()
58073 {
58074 XLinearGradient x;
58075   ;
58076   return 0;
58077 }
58078 _ACEOF
58079 if ac_fn_c_try_compile "$LINENO"; then :
58080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58081 $as_echo "yes" >&6; }
58082 else
58083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58084 $as_echo "no" >&6; }
58085          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
58086 fi
58087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58088 
58089     CFLAGS="$OLD_CFLAGS"
58090     ac_ext=cpp
58091 ac_cpp='$CXXCPP $CPPFLAGS'
58092 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58093 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58094 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58095 
58096   fi # NEEDS_LIB_X11
58097 
58098 
58099 
58100 
58101 
58102 
58103 # Check whether --with-cups was given.
58104 if test "${with_cups+set}" = set; then :
58105   withval=$with_cups;
58106 fi
58107 
58108 
58109 # Check whether --with-cups-include was given.
58110 if test "${with_cups_include+set}" = set; then :
58111   withval=$with_cups_include;
58112 fi
58113 
58114 
58115   if test "x$NEEDS_LIB_CUPS" = xfalse; then
58116     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
58117         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
58118       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
58119 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
58120     fi
58121     CUPS_CFLAGS=
58122   else
58123     CUPS_FOUND=no
58124 
58125     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
58126       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
58127     fi
58128 
58129     if test "x${with_cups}" != x; then
58130       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58131 $as_echo_n "checking for cups headers... " >&6; }
58132       if test -s "${with_cups}/include/cups/cups.h"; then
58133         CUPS_CFLAGS="-I${with_cups}/include"
58134         CUPS_FOUND=yes
58135         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58136 $as_echo "$CUPS_FOUND" >&6; }
58137       else
58138         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
58139       fi
58140     fi
58141     if test "x${with_cups_include}" != x; then
58142       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
58143 $as_echo_n "checking for cups headers... " >&6; }
58144       if test -s "${with_cups_include}/cups/cups.h"; then
58145         CUPS_CFLAGS="-I${with_cups_include}"
58146         CUPS_FOUND=yes
58147         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58148 $as_echo "$CUPS_FOUND" >&6; }
58149       else
58150         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58151       fi
58152     fi
58153     if test "x$CUPS_FOUND" = xno; then
58154       # Are the cups headers installed in the default /usr/include location?
58155       for ac_header in cups/cups.h cups/ppd.h
58156 do :
58157   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58158 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58159 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58160   cat >>confdefs.h <<_ACEOF
58161 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58162 _ACEOF
58163 
58164           CUPS_FOUND=yes
58165           CUPS_CFLAGS=
58166           DEFAULT_CUPS=yes
58167 
58168 fi
58169 
58170 done
58171 
58172     fi
58173     if test "x$CUPS_FOUND" = xno; then
58174 
58175   # Print a helpful message on how to acquire the necessary build dependency.
58176   # cups is the help tag: freetype, cups, alsa etc
58177   MISSING_DEPENDENCY=cups
58178 
58179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58180     cygwin_help $MISSING_DEPENDENCY
58181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58182     msys_help $MISSING_DEPENDENCY
58183   else
58184     PKGHANDLER_COMMAND=
58185 
58186     case $PKGHANDLER in
58187       apt-get)
58188         apt_help     $MISSING_DEPENDENCY ;;
58189       yum)
58190         yum_help     $MISSING_DEPENDENCY ;;
58191       brew)
58192         brew_help    $MISSING_DEPENDENCY ;;
58193       port)
58194         port_help    $MISSING_DEPENDENCY ;;
58195       pkgutil)
58196         pkgutil_help $MISSING_DEPENDENCY ;;
58197       pkgadd)
58198         pkgadd_help  $MISSING_DEPENDENCY ;;
58199     esac
58200 
58201     if test "x$PKGHANDLER_COMMAND" != x; then
58202       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58203     fi
58204   fi
58205 
58206       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58207     fi
58208   fi
58209 
58210 
58211 
58212 
58213 
58214 # Check whether --with-freetype was given.
58215 if test "${with_freetype+set}" = set; then :
58216   withval=$with_freetype;
58217 fi
58218 
58219 
58220 # Check whether --with-freetype-include was given.
58221 if test "${with_freetype_include+set}" = set; then :
58222   withval=$with_freetype_include;
58223 fi
58224 
58225 
58226 # Check whether --with-freetype-lib was given.
58227 if test "${with_freetype_lib+set}" = set; then :
58228   withval=$with_freetype_lib;
58229 fi
58230 
58231 
58232 # Check whether --with-freetype-src was given.
58233 if test "${with_freetype_src+set}" = set; then :
58234   withval=$with_freetype_src;
58235 fi
58236 
58237   # Check whether --enable-freetype-bundling was given.
58238 if test "${enable_freetype_bundling+set}" = set; then :
58239   enableval=$enable_freetype_bundling;
58240 fi
58241 
58242 
58243 # Check whether --with-freetype-license was given.
58244 if test "${with_freetype_license+set}" = set; then :
58245   withval=$with_freetype_license;
58246 fi
58247 
58248 
58249   # Need to specify explicitly since it needs to be overridden on some versions of macosx
58250   FREETYPE_BASE_NAME=freetype
58251   FREETYPE_CFLAGS=
58252   FREETYPE_LIBS=
58253   FREETYPE_BUNDLE_LIB_PATH=
58254 
58255   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58256     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58257         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58258         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58259         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58260       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58261 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58262     fi
58263     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58264       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58265 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58266     fi
58267   else
58268     # freetype is needed to build; go get it!
58269 
58270     BUNDLE_FREETYPE="$enable_freetype_bundling"
58271 
58272     if  test "x$with_freetype_src" != x; then
58273       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58274         # Try to build freetype if --with-freetype-src was given on Windows
58275 
58276   FREETYPE_SRC_PATH="$with_freetype_src"
58277   BUILD_FREETYPE=yes
58278 
58279   # Check if the freetype sources are acessible..
58280   if ! test -d $FREETYPE_SRC_PATH; then
58281     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
58282 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58283     BUILD_FREETYPE=no
58284   fi
58285   # ..and contain a vc2010 project file
58286   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58287   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58288     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
58289 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58290     BUILD_FREETYPE=no
58291   fi
58292   # Now check if configure found a version of 'msbuild.exe'
58293   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58294     { $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
58295 $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;}
58296     BUILD_FREETYPE=no
58297   fi
58298 
58299   # Ready to go..
58300   if test "x$BUILD_FREETYPE" = xyes; then
58301     # msbuild requires trailing slashes for output directories
58302     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58303     freetype_lib_path_unix="$freetype_lib_path"
58304     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58305 
58306   unix_path="$vcxproj_path"
58307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58308     windows_path=`$CYGPATH -m "$unix_path"`
58309     vcxproj_path="$windows_path"
58310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58311     windows_path=`cmd //c echo $unix_path`
58312     vcxproj_path="$windows_path"
58313   fi
58314 
58315 
58316   unix_path="$freetype_lib_path"
58317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58318     windows_path=`$CYGPATH -m "$unix_path"`
58319     freetype_lib_path="$windows_path"
58320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58321     windows_path=`cmd //c echo $unix_path`
58322     freetype_lib_path="$windows_path"
58323   fi
58324 
58325 
58326   unix_path="$freetype_obj_path"
58327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58328     windows_path=`$CYGPATH -m "$unix_path"`
58329     freetype_obj_path="$windows_path"
58330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58331     windows_path=`cmd //c echo $unix_path`
58332     freetype_obj_path="$windows_path"
58333   fi
58334 
58335     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58336       freetype_platform=x64
58337     else
58338       freetype_platform=win32
58339     fi
58340 
58341     # The original freetype project file is for VS 2010 (i.e. 'v100'),
58342     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58343     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58344     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58345     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58346 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58347 
58348     # First we try to build the freetype.dll
58349     $ECHO -e "@echo off\n"\
58350         "$MSBUILD $vcxproj_path "\
58351         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58352         "/p:Configuration=\"Release Multithreaded\" "\
58353         "/p:Platform=$freetype_platform "\
58354         "/p:ConfigurationType=DynamicLibrary "\
58355         "/p:TargetName=freetype "\
58356         "/p:OutDir=\"$freetype_lib_path\" "\
58357         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58358     cmd /c freetype.bat
58359 
58360     if test -s "$freetype_lib_path_unix/freetype.dll"; then
58361       # If that succeeds we also build freetype.lib
58362       $ECHO -e "@echo off\n"\
58363           "$MSBUILD $vcxproj_path "\
58364           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58365           "/p:Configuration=\"Release Multithreaded\" "\
58366           "/p:Platform=$freetype_platform "\
58367           "/p:ConfigurationType=StaticLibrary "\
58368           "/p:TargetName=freetype "\
58369           "/p:OutDir=\"$freetype_lib_path\" "\
58370           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58371       cmd /c freetype.bat
58372 
58373       if test -s "$freetype_lib_path_unix/freetype.lib"; then
58374         # Once we build both, lib and dll, set freetype lib and include path appropriately
58375         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58376         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58377         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58378 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58379       else
58380         BUILD_FREETYPE=no
58381       fi
58382     else
58383       BUILD_FREETYPE=no
58384     fi
58385   fi
58386 
58387         if test "x$BUILD_FREETYPE" = xyes; then
58388           # Okay, we built it. Check that it works.
58389 
58390   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58391   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58392   METHOD="--with-freetype-src"
58393 
58394   # Let's start with an optimistic view of the world :-)
58395   FOUND_FREETYPE=yes
58396 
58397   # First look for the canonical freetype main include file ft2build.h.
58398   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58399     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58400     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58401     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58402       # Fail.
58403       FOUND_FREETYPE=no
58404     fi
58405   fi
58406 
58407   if test "x$FOUND_FREETYPE" = xyes; then
58408     # Include file found, let's continue the sanity check.
58409     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58410 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58411 
58412     # Reset to default value
58413     FREETYPE_BASE_NAME=freetype
58414     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58415     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58416       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58417           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58418         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58419         # for the .6 version explicitly.
58420         FREETYPE_BASE_NAME=freetype.6
58421         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58422         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58423 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58424       else
58425         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58426 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58427         FOUND_FREETYPE=no
58428       fi
58429     else
58430       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58431         # On Windows, we will need both .lib and .dll file.
58432         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58433           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58434 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58435           FOUND_FREETYPE=no
58436         fi
58437       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58438           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58439         # Found lib in isa dir, use that instead.
58440         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58441         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58442 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58443       fi
58444     fi
58445   fi
58446 
58447   if test "x$FOUND_FREETYPE" = xyes; then
58448 
58449   # Only process if variable expands to non-empty
58450 
58451   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58452     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58453 
58454   # Input might be given as Windows format, start by converting to
58455   # unix format.
58456   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58457   new_path=`$CYGPATH -u "$path"`
58458 
58459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58462   # "foo.exe" is OK but "foo" is an error.
58463   #
58464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58465   # It is also a way to make sure we got the proper file name for the real test later on.
58466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58467   if test "x$test_shortpath" = x; then
58468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58469 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58470     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58471   fi
58472 
58473   # Call helper function which possibly converts this using DOS-style short mode.
58474   # If so, the updated path is stored in $new_path.
58475 
58476   input_path="$new_path"
58477   # Check if we need to convert this using DOS-style short mode. If the path
58478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58479   # take no chances and rewrite it.
58480   # Note: m4 eats our [], so we need to use [ and ] instead.
58481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58482   if test "x$has_forbidden_chars" != x; then
58483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58487       # Going to short mode and back again did indeed matter. Since short mode is
58488       # case insensitive, let's make it lowercase to improve readability.
58489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58490       # Now convert it back to Unix-style (cygpath)
58491       input_path=`$CYGPATH -u "$shortmode_path"`
58492       new_path="$input_path"
58493     fi
58494   fi
58495 
58496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58497   if test "x$test_cygdrive_prefix" = x; then
58498     # As a simple fix, exclude /usr/bin since it's not a real path.
58499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58501       # a path prefixed by /cygdrive for fixpath to work.
58502       new_path="$CYGWIN_ROOT_PATH$input_path"
58503     fi
58504   fi
58505 
58506 
58507   if test "x$path" != "x$new_path"; then
58508     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58510 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58511   fi
58512 
58513     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58514 
58515   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58516   has_colon=`$ECHO $path | $GREP ^.:`
58517   new_path="$path"
58518   if test "x$has_colon" = x; then
58519     # Not in mixed or Windows style, start by that.
58520     new_path=`cmd //c echo $path`
58521   fi
58522 
58523 
58524   input_path="$new_path"
58525   # Check if we need to convert this using DOS-style short mode. If the path
58526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58527   # take no chances and rewrite it.
58528   # Note: m4 eats our [], so we need to use [ and ] instead.
58529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58530   if test "x$has_forbidden_chars" != x; then
58531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58533   fi
58534 
58535 
58536   windows_path="$new_path"
58537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58538     unix_path=`$CYGPATH -u "$windows_path"`
58539     new_path="$unix_path"
58540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58542     new_path="$unix_path"
58543   fi
58544 
58545   if test "x$path" != "x$new_path"; then
58546     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58548 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58549   fi
58550 
58551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58553 
58554     else
58555       # We're on a unix platform. Hooray! :)
58556       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58557       has_space=`$ECHO "$path" | $GREP " "`
58558       if test "x$has_space" != x; then
58559         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58560 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58561         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58562       fi
58563 
58564       # Use eval to expand a potential ~
58565       eval path="$path"
58566       if test ! -f "$path" && test ! -d "$path"; then
58567         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58568       fi
58569 
58570       if test -d "$path"; then
58571         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58572       else
58573         dir="`$DIRNAME "$path"`"
58574         base="`$BASENAME "$path"`"
58575         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58576       fi
58577     fi
58578   fi
58579 
58580 
58581   # Only process if variable expands to non-empty
58582 
58583   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58584     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58585 
58586   # Input might be given as Windows format, start by converting to
58587   # unix format.
58588   path="$POTENTIAL_FREETYPE_LIB_PATH"
58589   new_path=`$CYGPATH -u "$path"`
58590 
58591   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58592   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58593   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58594   # "foo.exe" is OK but "foo" is an error.
58595   #
58596   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58597   # It is also a way to make sure we got the proper file name for the real test later on.
58598   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58599   if test "x$test_shortpath" = x; then
58600     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58601 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58602     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58603   fi
58604 
58605   # Call helper function which possibly converts this using DOS-style short mode.
58606   # If so, the updated path is stored in $new_path.
58607 
58608   input_path="$new_path"
58609   # Check if we need to convert this using DOS-style short mode. If the path
58610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58611   # take no chances and rewrite it.
58612   # Note: m4 eats our [], so we need to use [ and ] instead.
58613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58614   if test "x$has_forbidden_chars" != x; then
58615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58616     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58617     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58618     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58619       # Going to short mode and back again did indeed matter. Since short mode is
58620       # case insensitive, let's make it lowercase to improve readability.
58621       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58622       # Now convert it back to Unix-style (cygpath)
58623       input_path=`$CYGPATH -u "$shortmode_path"`
58624       new_path="$input_path"
58625     fi
58626   fi
58627 
58628   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58629   if test "x$test_cygdrive_prefix" = x; then
58630     # As a simple fix, exclude /usr/bin since it's not a real path.
58631     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58632       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58633       # a path prefixed by /cygdrive for fixpath to work.
58634       new_path="$CYGWIN_ROOT_PATH$input_path"
58635     fi
58636   fi
58637 
58638 
58639   if test "x$path" != "x$new_path"; then
58640     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58641     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58642 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58643   fi
58644 
58645     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58646 
58647   path="$POTENTIAL_FREETYPE_LIB_PATH"
58648   has_colon=`$ECHO $path | $GREP ^.:`
58649   new_path="$path"
58650   if test "x$has_colon" = x; then
58651     # Not in mixed or Windows style, start by that.
58652     new_path=`cmd //c echo $path`
58653   fi
58654 
58655 
58656   input_path="$new_path"
58657   # Check if we need to convert this using DOS-style short mode. If the path
58658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58659   # take no chances and rewrite it.
58660   # Note: m4 eats our [], so we need to use [ and ] instead.
58661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58662   if test "x$has_forbidden_chars" != x; then
58663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58664     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58665   fi
58666 
58667 
58668   windows_path="$new_path"
58669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58670     unix_path=`$CYGPATH -u "$windows_path"`
58671     new_path="$unix_path"
58672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58673     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58674     new_path="$unix_path"
58675   fi
58676 
58677   if test "x$path" != "x$new_path"; then
58678     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58679     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58680 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58681   fi
58682 
58683   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58684   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58685 
58686     else
58687       # We're on a unix platform. Hooray! :)
58688       path="$POTENTIAL_FREETYPE_LIB_PATH"
58689       has_space=`$ECHO "$path" | $GREP " "`
58690       if test "x$has_space" != x; then
58691         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58692 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58693         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58694       fi
58695 
58696       # Use eval to expand a potential ~
58697       eval path="$path"
58698       if test ! -f "$path" && test ! -d "$path"; then
58699         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58700       fi
58701 
58702       if test -d "$path"; then
58703         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58704       else
58705         dir="`$DIRNAME "$path"`"
58706         base="`$BASENAME "$path"`"
58707         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58708       fi
58709     fi
58710   fi
58711 
58712 
58713     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58715 $as_echo_n "checking for freetype includes... " >&6; }
58716     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58717 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58718     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58719     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58720 $as_echo_n "checking for freetype libraries... " >&6; }
58721     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58722 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58723   fi
58724 
58725           if test "x$FOUND_FREETYPE" != xyes; then
58726             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58727           fi
58728         else
58729           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58730 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58731           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58732         fi
58733       else
58734         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58735 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58736       fi
58737     fi
58738 
58739     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58740       # User has specified settings
58741 
58742       if test "x$BUNDLE_FREETYPE" = x; then
58743         # If not specified, default is to bundle freetype
58744         BUNDLE_FREETYPE=yes
58745       fi
58746 
58747       if test "x$with_freetype" != x; then
58748         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58749         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58750       fi
58751 
58752       # Allow --with-freetype-lib and --with-freetype-include to override
58753       if test "x$with_freetype_include" != x; then
58754         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58755       fi
58756       if test "x$with_freetype_lib" != x; then
58757         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58758       fi
58759 
58760       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58761         # Okay, we got it. Check that it works.
58762 
58763   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58764   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58765   METHOD="--with-freetype"
58766 
58767   # Let's start with an optimistic view of the world :-)
58768   FOUND_FREETYPE=yes
58769 
58770   # First look for the canonical freetype main include file ft2build.h.
58771   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58772     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58773     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58774     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58775       # Fail.
58776       FOUND_FREETYPE=no
58777     fi
58778   fi
58779 
58780   if test "x$FOUND_FREETYPE" = xyes; then
58781     # Include file found, let's continue the sanity check.
58782     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58783 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58784 
58785     # Reset to default value
58786     FREETYPE_BASE_NAME=freetype
58787     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58788     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58789       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58790           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58791         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58792         # for the .6 version explicitly.
58793         FREETYPE_BASE_NAME=freetype.6
58794         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58795         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58796 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58797       else
58798         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58799 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58800         FOUND_FREETYPE=no
58801       fi
58802     else
58803       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58804         # On Windows, we will need both .lib and .dll file.
58805         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58806           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58807 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58808           FOUND_FREETYPE=no
58809         fi
58810       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58811           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58812         # Found lib in isa dir, use that instead.
58813         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58814         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58815 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58816       fi
58817     fi
58818   fi
58819 
58820   if test "x$FOUND_FREETYPE" = xyes; then
58821 
58822   # Only process if variable expands to non-empty
58823 
58824   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58825     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58826 
58827   # Input might be given as Windows format, start by converting to
58828   # unix format.
58829   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58830   new_path=`$CYGPATH -u "$path"`
58831 
58832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58835   # "foo.exe" is OK but "foo" is an error.
58836   #
58837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58838   # It is also a way to make sure we got the proper file name for the real test later on.
58839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58840   if test "x$test_shortpath" = x; then
58841     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58842 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58843     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58844   fi
58845 
58846   # Call helper function which possibly converts this using DOS-style short mode.
58847   # If so, the updated path is stored in $new_path.
58848 
58849   input_path="$new_path"
58850   # Check if we need to convert this using DOS-style short mode. If the path
58851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58852   # take no chances and rewrite it.
58853   # Note: m4 eats our [], so we need to use [ and ] instead.
58854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58855   if test "x$has_forbidden_chars" != x; then
58856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58860       # Going to short mode and back again did indeed matter. Since short mode is
58861       # case insensitive, let's make it lowercase to improve readability.
58862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58863       # Now convert it back to Unix-style (cygpath)
58864       input_path=`$CYGPATH -u "$shortmode_path"`
58865       new_path="$input_path"
58866     fi
58867   fi
58868 
58869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58870   if test "x$test_cygdrive_prefix" = x; then
58871     # As a simple fix, exclude /usr/bin since it's not a real path.
58872     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58874       # a path prefixed by /cygdrive for fixpath to work.
58875       new_path="$CYGWIN_ROOT_PATH$input_path"
58876     fi
58877   fi
58878 
58879 
58880   if test "x$path" != "x$new_path"; then
58881     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58883 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58884   fi
58885 
58886     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58887 
58888   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58889   has_colon=`$ECHO $path | $GREP ^.:`
58890   new_path="$path"
58891   if test "x$has_colon" = x; then
58892     # Not in mixed or Windows style, start by that.
58893     new_path=`cmd //c echo $path`
58894   fi
58895 
58896 
58897   input_path="$new_path"
58898   # Check if we need to convert this using DOS-style short mode. If the path
58899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58900   # take no chances and rewrite it.
58901   # Note: m4 eats our [], so we need to use [ and ] instead.
58902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58903   if test "x$has_forbidden_chars" != x; then
58904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58906   fi
58907 
58908 
58909   windows_path="$new_path"
58910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58911     unix_path=`$CYGPATH -u "$windows_path"`
58912     new_path="$unix_path"
58913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58915     new_path="$unix_path"
58916   fi
58917 
58918   if test "x$path" != "x$new_path"; then
58919     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58920     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58921 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58922   fi
58923 
58924   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58925   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58926 
58927     else
58928       # We're on a unix platform. Hooray! :)
58929       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58930       has_space=`$ECHO "$path" | $GREP " "`
58931       if test "x$has_space" != x; then
58932         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58933 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58934         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58935       fi
58936 
58937       # Use eval to expand a potential ~
58938       eval path="$path"
58939       if test ! -f "$path" && test ! -d "$path"; then
58940         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58941       fi
58942 
58943       if test -d "$path"; then
58944         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58945       else
58946         dir="`$DIRNAME "$path"`"
58947         base="`$BASENAME "$path"`"
58948         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58949       fi
58950     fi
58951   fi
58952 
58953 
58954   # Only process if variable expands to non-empty
58955 
58956   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58957     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58958 
58959   # Input might be given as Windows format, start by converting to
58960   # unix format.
58961   path="$POTENTIAL_FREETYPE_LIB_PATH"
58962   new_path=`$CYGPATH -u "$path"`
58963 
58964   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58965   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58966   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58967   # "foo.exe" is OK but "foo" is an error.
58968   #
58969   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58970   # It is also a way to make sure we got the proper file name for the real test later on.
58971   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58972   if test "x$test_shortpath" = x; then
58973     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58974 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58975     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58976   fi
58977 
58978   # Call helper function which possibly converts this using DOS-style short mode.
58979   # If so, the updated path is stored in $new_path.
58980 
58981   input_path="$new_path"
58982   # Check if we need to convert this using DOS-style short mode. If the path
58983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58984   # take no chances and rewrite it.
58985   # Note: m4 eats our [], so we need to use [ and ] instead.
58986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58987   if test "x$has_forbidden_chars" != x; then
58988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58992       # Going to short mode and back again did indeed matter. Since short mode is
58993       # case insensitive, let's make it lowercase to improve readability.
58994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58995       # Now convert it back to Unix-style (cygpath)
58996       input_path=`$CYGPATH -u "$shortmode_path"`
58997       new_path="$input_path"
58998     fi
58999   fi
59000 
59001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59002   if test "x$test_cygdrive_prefix" = x; then
59003     # As a simple fix, exclude /usr/bin since it's not a real path.
59004     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59006       # a path prefixed by /cygdrive for fixpath to work.
59007       new_path="$CYGWIN_ROOT_PATH$input_path"
59008     fi
59009   fi
59010 
59011 
59012   if test "x$path" != "x$new_path"; then
59013     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59014     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59015 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59016   fi
59017 
59018     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59019 
59020   path="$POTENTIAL_FREETYPE_LIB_PATH"
59021   has_colon=`$ECHO $path | $GREP ^.:`
59022   new_path="$path"
59023   if test "x$has_colon" = x; then
59024     # Not in mixed or Windows style, start by that.
59025     new_path=`cmd //c echo $path`
59026   fi
59027 
59028 
59029   input_path="$new_path"
59030   # Check if we need to convert this using DOS-style short mode. If the path
59031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59032   # take no chances and rewrite it.
59033   # Note: m4 eats our [], so we need to use [ and ] instead.
59034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59035   if test "x$has_forbidden_chars" != x; then
59036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59037     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59038   fi
59039 
59040 
59041   windows_path="$new_path"
59042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59043     unix_path=`$CYGPATH -u "$windows_path"`
59044     new_path="$unix_path"
59045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59047     new_path="$unix_path"
59048   fi
59049 
59050   if test "x$path" != "x$new_path"; then
59051     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59053 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59054   fi
59055 
59056   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59057   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59058 
59059     else
59060       # We're on a unix platform. Hooray! :)
59061       path="$POTENTIAL_FREETYPE_LIB_PATH"
59062       has_space=`$ECHO "$path" | $GREP " "`
59063       if test "x$has_space" != x; then
59064         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59065 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59066         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59067       fi
59068 
59069       # Use eval to expand a potential ~
59070       eval path="$path"
59071       if test ! -f "$path" && test ! -d "$path"; then
59072         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59073       fi
59074 
59075       if test -d "$path"; then
59076         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59077       else
59078         dir="`$DIRNAME "$path"`"
59079         base="`$BASENAME "$path"`"
59080         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59081       fi
59082     fi
59083   fi
59084 
59085 
59086     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59087     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59088 $as_echo_n "checking for freetype includes... " >&6; }
59089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59090 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59091     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59093 $as_echo_n "checking for freetype libraries... " >&6; }
59094     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59095 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59096   fi
59097 
59098         if test "x$FOUND_FREETYPE" != xyes; then
59099           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
59100         fi
59101       else
59102         # User specified only one of lib or include. This is an error.
59103         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
59104           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
59105 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
59106           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59107         else
59108           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
59109 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
59110           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
59111         fi
59112       fi
59113     else
59114       # User did not specify settings, but we need freetype. Try to locate it.
59115 
59116       if test "x$BUNDLE_FREETYPE" = x; then
59117         # If not specified, default is to bundle freetype only on windows
59118         if test "x$OPENJDK_TARGET_OS" = xwindows; then
59119           BUNDLE_FREETYPE=yes
59120         else
59121           BUNDLE_FREETYPE=no
59122         fi
59123       fi
59124 
59125       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
59126       if test "x$SYSROOT" = x; then
59127         if test "x$FOUND_FREETYPE" != xyes; then
59128           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
59129           if test "x$PKG_CONFIG" != x; then
59130 
59131 pkg_failed=no
59132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
59133 $as_echo_n "checking for FREETYPE... " >&6; }
59134 
59135 if test -n "$FREETYPE_CFLAGS"; then
59136     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
59137  elif test -n "$PKG_CONFIG"; then
59138     if test -n "$PKG_CONFIG" && \
59139     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59140   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59141   ac_status=$?
59142   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59143   test $ac_status = 0; }; then
59144   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59145 else
59146   pkg_failed=yes
59147 fi
59148  else
59149     pkg_failed=untried
59150 fi
59151 if test -n "$FREETYPE_LIBS"; then
59152     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59153  elif test -n "$PKG_CONFIG"; then
59154     if test -n "$PKG_CONFIG" && \
59155     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59156   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59157   ac_status=$?
59158   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59159   test $ac_status = 0; }; then
59160   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59161 else
59162   pkg_failed=yes
59163 fi
59164  else
59165     pkg_failed=untried
59166 fi
59167 
59168 
59169 
59170 if test $pkg_failed = yes; then
59171 
59172 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59173         _pkg_short_errors_supported=yes
59174 else
59175         _pkg_short_errors_supported=no
59176 fi
59177         if test $_pkg_short_errors_supported = yes; then
59178                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59179         else
59180                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59181         fi
59182         # Put the nasty error message in config.log where it belongs
59183         echo "$FREETYPE_PKG_ERRORS" >&5
59184 
59185         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59186 $as_echo "no" >&6; }
59187                 FOUND_FREETYPE=no
59188 elif test $pkg_failed = untried; then
59189         FOUND_FREETYPE=no
59190 else
59191         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59192         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59193         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59194 $as_echo "yes" >&6; }
59195         FOUND_FREETYPE=yes
59196 fi
59197             if test "x$FOUND_FREETYPE" = xyes; then
59198               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59199               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59200               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59201               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59202                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59203               fi
59204               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59205               if test "x$BUNDLE_FREETYPE" = xyes; then
59206                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59207 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59208                 FOUND_FREETYPE=no
59209               else
59210                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59211 $as_echo_n "checking for freetype... " >&6; }
59212                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59213 $as_echo "yes (using pkg-config)" >&6; }
59214               fi
59215             fi
59216           fi
59217         fi
59218       fi
59219 
59220       if test "x$FOUND_FREETYPE" != xyes; then
59221         # Check in well-known locations
59222         if test "x$OPENJDK_TARGET_OS" = xwindows; then
59223           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59224 
59225   windows_path="$FREETYPE_BASE_DIR"
59226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59227     unix_path=`$CYGPATH -u "$windows_path"`
59228     FREETYPE_BASE_DIR="$unix_path"
59229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59231     FREETYPE_BASE_DIR="$unix_path"
59232   fi
59233 
59234 
59235   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59236   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59237   METHOD="well-known location"
59238 
59239   # Let's start with an optimistic view of the world :-)
59240   FOUND_FREETYPE=yes
59241 
59242   # First look for the canonical freetype main include file ft2build.h.
59243   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59244     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59245     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59246     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59247       # Fail.
59248       FOUND_FREETYPE=no
59249     fi
59250   fi
59251 
59252   if test "x$FOUND_FREETYPE" = xyes; then
59253     # Include file found, let's continue the sanity check.
59254     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59255 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59256 
59257     # Reset to default value
59258     FREETYPE_BASE_NAME=freetype
59259     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59260     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59261       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59262           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59263         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59264         # for the .6 version explicitly.
59265         FREETYPE_BASE_NAME=freetype.6
59266         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59267         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59268 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59269       else
59270         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59271 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59272         FOUND_FREETYPE=no
59273       fi
59274     else
59275       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59276         # On Windows, we will need both .lib and .dll file.
59277         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59278           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59279 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59280           FOUND_FREETYPE=no
59281         fi
59282       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59283           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59284         # Found lib in isa dir, use that instead.
59285         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59286         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59287 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59288       fi
59289     fi
59290   fi
59291 
59292   if test "x$FOUND_FREETYPE" = xyes; then
59293 
59294   # Only process if variable expands to non-empty
59295 
59296   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59297     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59298 
59299   # Input might be given as Windows format, start by converting to
59300   # unix format.
59301   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59302   new_path=`$CYGPATH -u "$path"`
59303 
59304   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59305   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59306   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59307   # "foo.exe" is OK but "foo" is an error.
59308   #
59309   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59310   # It is also a way to make sure we got the proper file name for the real test later on.
59311   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59312   if test "x$test_shortpath" = x; then
59313     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59314 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59315     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59316   fi
59317 
59318   # Call helper function which possibly converts this using DOS-style short mode.
59319   # If so, the updated path is stored in $new_path.
59320 
59321   input_path="$new_path"
59322   # Check if we need to convert this using DOS-style short mode. If the path
59323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59324   # take no chances and rewrite it.
59325   # Note: m4 eats our [], so we need to use [ and ] instead.
59326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59327   if test "x$has_forbidden_chars" != x; then
59328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59329     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59330     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59331     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59332       # Going to short mode and back again did indeed matter. Since short mode is
59333       # case insensitive, let's make it lowercase to improve readability.
59334       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59335       # Now convert it back to Unix-style (cygpath)
59336       input_path=`$CYGPATH -u "$shortmode_path"`
59337       new_path="$input_path"
59338     fi
59339   fi
59340 
59341   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59342   if test "x$test_cygdrive_prefix" = x; then
59343     # As a simple fix, exclude /usr/bin since it's not a real path.
59344     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59345       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59346       # a path prefixed by /cygdrive for fixpath to work.
59347       new_path="$CYGWIN_ROOT_PATH$input_path"
59348     fi
59349   fi
59350 
59351 
59352   if test "x$path" != "x$new_path"; then
59353     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59355 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59356   fi
59357 
59358     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59359 
59360   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59361   has_colon=`$ECHO $path | $GREP ^.:`
59362   new_path="$path"
59363   if test "x$has_colon" = x; then
59364     # Not in mixed or Windows style, start by that.
59365     new_path=`cmd //c echo $path`
59366   fi
59367 
59368 
59369   input_path="$new_path"
59370   # Check if we need to convert this using DOS-style short mode. If the path
59371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59372   # take no chances and rewrite it.
59373   # Note: m4 eats our [], so we need to use [ and ] instead.
59374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59375   if test "x$has_forbidden_chars" != x; then
59376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59377     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59378   fi
59379 
59380 
59381   windows_path="$new_path"
59382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59383     unix_path=`$CYGPATH -u "$windows_path"`
59384     new_path="$unix_path"
59385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59387     new_path="$unix_path"
59388   fi
59389 
59390   if test "x$path" != "x$new_path"; then
59391     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59393 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59394   fi
59395 
59396   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59397   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59398 
59399     else
59400       # We're on a unix platform. Hooray! :)
59401       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59402       has_space=`$ECHO "$path" | $GREP " "`
59403       if test "x$has_space" != x; then
59404         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59405 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59406         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59407       fi
59408 
59409       # Use eval to expand a potential ~
59410       eval path="$path"
59411       if test ! -f "$path" && test ! -d "$path"; then
59412         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59413       fi
59414 
59415       if test -d "$path"; then
59416         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59417       else
59418         dir="`$DIRNAME "$path"`"
59419         base="`$BASENAME "$path"`"
59420         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59421       fi
59422     fi
59423   fi
59424 
59425 
59426   # Only process if variable expands to non-empty
59427 
59428   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59429     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59430 
59431   # Input might be given as Windows format, start by converting to
59432   # unix format.
59433   path="$POTENTIAL_FREETYPE_LIB_PATH"
59434   new_path=`$CYGPATH -u "$path"`
59435 
59436   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59437   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59438   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59439   # "foo.exe" is OK but "foo" is an error.
59440   #
59441   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59442   # It is also a way to make sure we got the proper file name for the real test later on.
59443   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59444   if test "x$test_shortpath" = x; then
59445     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59446 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59447     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59448   fi
59449 
59450   # Call helper function which possibly converts this using DOS-style short mode.
59451   # If so, the updated path is stored in $new_path.
59452 
59453   input_path="$new_path"
59454   # Check if we need to convert this using DOS-style short mode. If the path
59455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59456   # take no chances and rewrite it.
59457   # Note: m4 eats our [], so we need to use [ and ] instead.
59458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59459   if test "x$has_forbidden_chars" != x; then
59460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59461     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59462     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59463     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59464       # Going to short mode and back again did indeed matter. Since short mode is
59465       # case insensitive, let's make it lowercase to improve readability.
59466       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59467       # Now convert it back to Unix-style (cygpath)
59468       input_path=`$CYGPATH -u "$shortmode_path"`
59469       new_path="$input_path"
59470     fi
59471   fi
59472 
59473   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59474   if test "x$test_cygdrive_prefix" = x; then
59475     # As a simple fix, exclude /usr/bin since it's not a real path.
59476     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59477       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59478       # a path prefixed by /cygdrive for fixpath to work.
59479       new_path="$CYGWIN_ROOT_PATH$input_path"
59480     fi
59481   fi
59482 
59483 
59484   if test "x$path" != "x$new_path"; then
59485     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59487 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59488   fi
59489 
59490     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59491 
59492   path="$POTENTIAL_FREETYPE_LIB_PATH"
59493   has_colon=`$ECHO $path | $GREP ^.:`
59494   new_path="$path"
59495   if test "x$has_colon" = x; then
59496     # Not in mixed or Windows style, start by that.
59497     new_path=`cmd //c echo $path`
59498   fi
59499 
59500 
59501   input_path="$new_path"
59502   # Check if we need to convert this using DOS-style short mode. If the path
59503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59504   # take no chances and rewrite it.
59505   # Note: m4 eats our [], so we need to use [ and ] instead.
59506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59507   if test "x$has_forbidden_chars" != x; then
59508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59510   fi
59511 
59512 
59513   windows_path="$new_path"
59514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59515     unix_path=`$CYGPATH -u "$windows_path"`
59516     new_path="$unix_path"
59517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59519     new_path="$unix_path"
59520   fi
59521 
59522   if test "x$path" != "x$new_path"; then
59523     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59525 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59526   fi
59527 
59528   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59529   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59530 
59531     else
59532       # We're on a unix platform. Hooray! :)
59533       path="$POTENTIAL_FREETYPE_LIB_PATH"
59534       has_space=`$ECHO "$path" | $GREP " "`
59535       if test "x$has_space" != x; then
59536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59537 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59538         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59539       fi
59540 
59541       # Use eval to expand a potential ~
59542       eval path="$path"
59543       if test ! -f "$path" && test ! -d "$path"; then
59544         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59545       fi
59546 
59547       if test -d "$path"; then
59548         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59549       else
59550         dir="`$DIRNAME "$path"`"
59551         base="`$BASENAME "$path"`"
59552         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59553       fi
59554     fi
59555   fi
59556 
59557 
59558     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59560 $as_echo_n "checking for freetype includes... " >&6; }
59561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59562 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59563     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59564     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59565 $as_echo_n "checking for freetype libraries... " >&6; }
59566     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59567 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59568   fi
59569 
59570           if test "x$FOUND_FREETYPE" != xyes; then
59571             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59572 
59573   windows_path="$FREETYPE_BASE_DIR"
59574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59575     unix_path=`$CYGPATH -u "$windows_path"`
59576     FREETYPE_BASE_DIR="$unix_path"
59577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59578     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59579     FREETYPE_BASE_DIR="$unix_path"
59580   fi
59581 
59582 
59583   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59584   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59585   METHOD="well-known location"
59586 
59587   # Let's start with an optimistic view of the world :-)
59588   FOUND_FREETYPE=yes
59589 
59590   # First look for the canonical freetype main include file ft2build.h.
59591   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59592     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59593     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59594     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59595       # Fail.
59596       FOUND_FREETYPE=no
59597     fi
59598   fi
59599 
59600   if test "x$FOUND_FREETYPE" = xyes; then
59601     # Include file found, let's continue the sanity check.
59602     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59603 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59604 
59605     # Reset to default value
59606     FREETYPE_BASE_NAME=freetype
59607     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59608     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59609       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59610           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59611         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59612         # for the .6 version explicitly.
59613         FREETYPE_BASE_NAME=freetype.6
59614         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59615         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59616 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59617       else
59618         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59619 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59620         FOUND_FREETYPE=no
59621       fi
59622     else
59623       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59624         # On Windows, we will need both .lib and .dll file.
59625         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59626           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59627 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59628           FOUND_FREETYPE=no
59629         fi
59630       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59631           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59632         # Found lib in isa dir, use that instead.
59633         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59634         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59635 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59636       fi
59637     fi
59638   fi
59639 
59640   if test "x$FOUND_FREETYPE" = xyes; then
59641 
59642   # Only process if variable expands to non-empty
59643 
59644   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59645     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59646 
59647   # Input might be given as Windows format, start by converting to
59648   # unix format.
59649   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59650   new_path=`$CYGPATH -u "$path"`
59651 
59652   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59653   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59654   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59655   # "foo.exe" is OK but "foo" is an error.
59656   #
59657   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59658   # It is also a way to make sure we got the proper file name for the real test later on.
59659   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59660   if test "x$test_shortpath" = x; then
59661     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59662 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59663     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59664   fi
59665 
59666   # Call helper function which possibly converts this using DOS-style short mode.
59667   # If so, the updated path is stored in $new_path.
59668 
59669   input_path="$new_path"
59670   # Check if we need to convert this using DOS-style short mode. If the path
59671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59672   # take no chances and rewrite it.
59673   # Note: m4 eats our [], so we need to use [ and ] instead.
59674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59675   if test "x$has_forbidden_chars" != x; then
59676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59677     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59678     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59679     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59680       # Going to short mode and back again did indeed matter. Since short mode is
59681       # case insensitive, let's make it lowercase to improve readability.
59682       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59683       # Now convert it back to Unix-style (cygpath)
59684       input_path=`$CYGPATH -u "$shortmode_path"`
59685       new_path="$input_path"
59686     fi
59687   fi
59688 
59689   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59690   if test "x$test_cygdrive_prefix" = x; then
59691     # As a simple fix, exclude /usr/bin since it's not a real path.
59692     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59693       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59694       # a path prefixed by /cygdrive for fixpath to work.
59695       new_path="$CYGWIN_ROOT_PATH$input_path"
59696     fi
59697   fi
59698 
59699 
59700   if test "x$path" != "x$new_path"; then
59701     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59702     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59703 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59704   fi
59705 
59706     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59707 
59708   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59709   has_colon=`$ECHO $path | $GREP ^.:`
59710   new_path="$path"
59711   if test "x$has_colon" = x; then
59712     # Not in mixed or Windows style, start by that.
59713     new_path=`cmd //c echo $path`
59714   fi
59715 
59716 
59717   input_path="$new_path"
59718   # Check if we need to convert this using DOS-style short mode. If the path
59719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59720   # take no chances and rewrite it.
59721   # Note: m4 eats our [], so we need to use [ and ] instead.
59722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59723   if test "x$has_forbidden_chars" != x; then
59724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59725     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59726   fi
59727 
59728 
59729   windows_path="$new_path"
59730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59731     unix_path=`$CYGPATH -u "$windows_path"`
59732     new_path="$unix_path"
59733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59735     new_path="$unix_path"
59736   fi
59737 
59738   if test "x$path" != "x$new_path"; then
59739     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59740     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59741 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59742   fi
59743 
59744   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59745   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59746 
59747     else
59748       # We're on a unix platform. Hooray! :)
59749       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59750       has_space=`$ECHO "$path" | $GREP " "`
59751       if test "x$has_space" != x; then
59752         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59753 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59754         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59755       fi
59756 
59757       # Use eval to expand a potential ~
59758       eval path="$path"
59759       if test ! -f "$path" && test ! -d "$path"; then
59760         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59761       fi
59762 
59763       if test -d "$path"; then
59764         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59765       else
59766         dir="`$DIRNAME "$path"`"
59767         base="`$BASENAME "$path"`"
59768         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59769       fi
59770     fi
59771   fi
59772 
59773 
59774   # Only process if variable expands to non-empty
59775 
59776   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59777     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59778 
59779   # Input might be given as Windows format, start by converting to
59780   # unix format.
59781   path="$POTENTIAL_FREETYPE_LIB_PATH"
59782   new_path=`$CYGPATH -u "$path"`
59783 
59784   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59785   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59786   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59787   # "foo.exe" is OK but "foo" is an error.
59788   #
59789   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59790   # It is also a way to make sure we got the proper file name for the real test later on.
59791   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59792   if test "x$test_shortpath" = x; then
59793     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59794 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59795     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59796   fi
59797 
59798   # Call helper function which possibly converts this using DOS-style short mode.
59799   # If so, the updated path is stored in $new_path.
59800 
59801   input_path="$new_path"
59802   # Check if we need to convert this using DOS-style short mode. If the path
59803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59804   # take no chances and rewrite it.
59805   # Note: m4 eats our [], so we need to use [ and ] instead.
59806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59807   if test "x$has_forbidden_chars" != x; then
59808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59809     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59810     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59811     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59812       # Going to short mode and back again did indeed matter. Since short mode is
59813       # case insensitive, let's make it lowercase to improve readability.
59814       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59815       # Now convert it back to Unix-style (cygpath)
59816       input_path=`$CYGPATH -u "$shortmode_path"`
59817       new_path="$input_path"
59818     fi
59819   fi
59820 
59821   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59822   if test "x$test_cygdrive_prefix" = x; then
59823     # As a simple fix, exclude /usr/bin since it's not a real path.
59824     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59825       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59826       # a path prefixed by /cygdrive for fixpath to work.
59827       new_path="$CYGWIN_ROOT_PATH$input_path"
59828     fi
59829   fi
59830 
59831 
59832   if test "x$path" != "x$new_path"; then
59833     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59834     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59835 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59836   fi
59837 
59838     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59839 
59840   path="$POTENTIAL_FREETYPE_LIB_PATH"
59841   has_colon=`$ECHO $path | $GREP ^.:`
59842   new_path="$path"
59843   if test "x$has_colon" = x; then
59844     # Not in mixed or Windows style, start by that.
59845     new_path=`cmd //c echo $path`
59846   fi
59847 
59848 
59849   input_path="$new_path"
59850   # Check if we need to convert this using DOS-style short mode. If the path
59851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59852   # take no chances and rewrite it.
59853   # Note: m4 eats our [], so we need to use [ and ] instead.
59854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59855   if test "x$has_forbidden_chars" != x; then
59856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59857     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59858   fi
59859 
59860 
59861   windows_path="$new_path"
59862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59863     unix_path=`$CYGPATH -u "$windows_path"`
59864     new_path="$unix_path"
59865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59867     new_path="$unix_path"
59868   fi
59869 
59870   if test "x$path" != "x$new_path"; then
59871     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59872     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59873 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59874   fi
59875 
59876   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59877   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59878 
59879     else
59880       # We're on a unix platform. Hooray! :)
59881       path="$POTENTIAL_FREETYPE_LIB_PATH"
59882       has_space=`$ECHO "$path" | $GREP " "`
59883       if test "x$has_space" != x; then
59884         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59885 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59886         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59887       fi
59888 
59889       # Use eval to expand a potential ~
59890       eval path="$path"
59891       if test ! -f "$path" && test ! -d "$path"; then
59892         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59893       fi
59894 
59895       if test -d "$path"; then
59896         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59897       else
59898         dir="`$DIRNAME "$path"`"
59899         base="`$BASENAME "$path"`"
59900         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59901       fi
59902     fi
59903   fi
59904 
59905 
59906     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59907     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59908 $as_echo_n "checking for freetype includes... " >&6; }
59909     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59910 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59911     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59912     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59913 $as_echo_n "checking for freetype libraries... " >&6; }
59914     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59915 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59916   fi
59917 
59918           fi
59919           if test "x$FOUND_FREETYPE" != xyes; then
59920             FREETYPE_BASE_DIR="$HOME/freetype"
59921 
59922   windows_path="$FREETYPE_BASE_DIR"
59923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59924     unix_path=`$CYGPATH -u "$windows_path"`
59925     FREETYPE_BASE_DIR="$unix_path"
59926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59928     FREETYPE_BASE_DIR="$unix_path"
59929   fi
59930 
59931             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59932 
59933   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59934   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59935   METHOD="well-known location"
59936 
59937   # Let's start with an optimistic view of the world :-)
59938   FOUND_FREETYPE=yes
59939 
59940   # First look for the canonical freetype main include file ft2build.h.
59941   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59942     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59943     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59944     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59945       # Fail.
59946       FOUND_FREETYPE=no
59947     fi
59948   fi
59949 
59950   if test "x$FOUND_FREETYPE" = xyes; then
59951     # Include file found, let's continue the sanity check.
59952     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59953 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59954 
59955     # Reset to default value
59956     FREETYPE_BASE_NAME=freetype
59957     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59958     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59959       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59960           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59961         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59962         # for the .6 version explicitly.
59963         FREETYPE_BASE_NAME=freetype.6
59964         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59965         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59966 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59967       else
59968         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59969 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59970         FOUND_FREETYPE=no
59971       fi
59972     else
59973       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59974         # On Windows, we will need both .lib and .dll file.
59975         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59976           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59977 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59978           FOUND_FREETYPE=no
59979         fi
59980       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59981           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59982         # Found lib in isa dir, use that instead.
59983         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59984         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59985 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59986       fi
59987     fi
59988   fi
59989 
59990   if test "x$FOUND_FREETYPE" = xyes; then
59991 
59992   # Only process if variable expands to non-empty
59993 
59994   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59995     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59996 
59997   # Input might be given as Windows format, start by converting to
59998   # unix format.
59999   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60000   new_path=`$CYGPATH -u "$path"`
60001 
60002   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60003   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60004   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60005   # "foo.exe" is OK but "foo" is an error.
60006   #
60007   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60008   # It is also a way to make sure we got the proper file name for the real test later on.
60009   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60010   if test "x$test_shortpath" = x; then
60011     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60012 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60013     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60014   fi
60015 
60016   # Call helper function which possibly converts this using DOS-style short mode.
60017   # If so, the updated path is stored in $new_path.
60018 
60019   input_path="$new_path"
60020   # Check if we need to convert this using DOS-style short mode. If the path
60021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60022   # take no chances and rewrite it.
60023   # Note: m4 eats our [], so we need to use [ and ] instead.
60024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60025   if test "x$has_forbidden_chars" != x; then
60026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60027     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60028     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60029     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60030       # Going to short mode and back again did indeed matter. Since short mode is
60031       # case insensitive, let's make it lowercase to improve readability.
60032       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60033       # Now convert it back to Unix-style (cygpath)
60034       input_path=`$CYGPATH -u "$shortmode_path"`
60035       new_path="$input_path"
60036     fi
60037   fi
60038 
60039   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60040   if test "x$test_cygdrive_prefix" = x; then
60041     # As a simple fix, exclude /usr/bin since it's not a real path.
60042     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60043       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60044       # a path prefixed by /cygdrive for fixpath to work.
60045       new_path="$CYGWIN_ROOT_PATH$input_path"
60046     fi
60047   fi
60048 
60049 
60050   if test "x$path" != "x$new_path"; then
60051     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60053 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60054   fi
60055 
60056     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60057 
60058   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60059   has_colon=`$ECHO $path | $GREP ^.:`
60060   new_path="$path"
60061   if test "x$has_colon" = x; then
60062     # Not in mixed or Windows style, start by that.
60063     new_path=`cmd //c echo $path`
60064   fi
60065 
60066 
60067   input_path="$new_path"
60068   # Check if we need to convert this using DOS-style short mode. If the path
60069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60070   # take no chances and rewrite it.
60071   # Note: m4 eats our [], so we need to use [ and ] instead.
60072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60073   if test "x$has_forbidden_chars" != x; then
60074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60075     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60076   fi
60077 
60078 
60079   windows_path="$new_path"
60080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60081     unix_path=`$CYGPATH -u "$windows_path"`
60082     new_path="$unix_path"
60083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60085     new_path="$unix_path"
60086   fi
60087 
60088   if test "x$path" != "x$new_path"; then
60089     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60091 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60092   fi
60093 
60094   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60095   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60096 
60097     else
60098       # We're on a unix platform. Hooray! :)
60099       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60100       has_space=`$ECHO "$path" | $GREP " "`
60101       if test "x$has_space" != x; then
60102         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60103 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60104         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60105       fi
60106 
60107       # Use eval to expand a potential ~
60108       eval path="$path"
60109       if test ! -f "$path" && test ! -d "$path"; then
60110         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60111       fi
60112 
60113       if test -d "$path"; then
60114         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60115       else
60116         dir="`$DIRNAME "$path"`"
60117         base="`$BASENAME "$path"`"
60118         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60119       fi
60120     fi
60121   fi
60122 
60123 
60124   # Only process if variable expands to non-empty
60125 
60126   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60127     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60128 
60129   # Input might be given as Windows format, start by converting to
60130   # unix format.
60131   path="$POTENTIAL_FREETYPE_LIB_PATH"
60132   new_path=`$CYGPATH -u "$path"`
60133 
60134   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60135   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60136   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60137   # "foo.exe" is OK but "foo" is an error.
60138   #
60139   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60140   # It is also a way to make sure we got the proper file name for the real test later on.
60141   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60142   if test "x$test_shortpath" = x; then
60143     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60144 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60145     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60146   fi
60147 
60148   # Call helper function which possibly converts this using DOS-style short mode.
60149   # If so, the updated path is stored in $new_path.
60150 
60151   input_path="$new_path"
60152   # Check if we need to convert this using DOS-style short mode. If the path
60153   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60154   # take no chances and rewrite it.
60155   # Note: m4 eats our [], so we need to use [ and ] instead.
60156   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60157   if test "x$has_forbidden_chars" != x; then
60158     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60159     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60160     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60161     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60162       # Going to short mode and back again did indeed matter. Since short mode is
60163       # case insensitive, let's make it lowercase to improve readability.
60164       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60165       # Now convert it back to Unix-style (cygpath)
60166       input_path=`$CYGPATH -u "$shortmode_path"`
60167       new_path="$input_path"
60168     fi
60169   fi
60170 
60171   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60172   if test "x$test_cygdrive_prefix" = x; then
60173     # As a simple fix, exclude /usr/bin since it's not a real path.
60174     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60175       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60176       # a path prefixed by /cygdrive for fixpath to work.
60177       new_path="$CYGWIN_ROOT_PATH$input_path"
60178     fi
60179   fi
60180 
60181 
60182   if test "x$path" != "x$new_path"; then
60183     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60184     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60185 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60186   fi
60187 
60188     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60189 
60190   path="$POTENTIAL_FREETYPE_LIB_PATH"
60191   has_colon=`$ECHO $path | $GREP ^.:`
60192   new_path="$path"
60193   if test "x$has_colon" = x; then
60194     # Not in mixed or Windows style, start by that.
60195     new_path=`cmd //c echo $path`
60196   fi
60197 
60198 
60199   input_path="$new_path"
60200   # Check if we need to convert this using DOS-style short mode. If the path
60201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60202   # take no chances and rewrite it.
60203   # Note: m4 eats our [], so we need to use [ and ] instead.
60204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60205   if test "x$has_forbidden_chars" != x; then
60206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60207     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60208   fi
60209 
60210 
60211   windows_path="$new_path"
60212   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60213     unix_path=`$CYGPATH -u "$windows_path"`
60214     new_path="$unix_path"
60215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60216     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60217     new_path="$unix_path"
60218   fi
60219 
60220   if test "x$path" != "x$new_path"; then
60221     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60222     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60223 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60224   fi
60225 
60226   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60227   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60228 
60229     else
60230       # We're on a unix platform. Hooray! :)
60231       path="$POTENTIAL_FREETYPE_LIB_PATH"
60232       has_space=`$ECHO "$path" | $GREP " "`
60233       if test "x$has_space" != x; then
60234         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60235 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60236         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60237       fi
60238 
60239       # Use eval to expand a potential ~
60240       eval path="$path"
60241       if test ! -f "$path" && test ! -d "$path"; then
60242         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60243       fi
60244 
60245       if test -d "$path"; then
60246         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60247       else
60248         dir="`$DIRNAME "$path"`"
60249         base="`$BASENAME "$path"`"
60250         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60251       fi
60252     fi
60253   fi
60254 
60255 
60256     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60257     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60258 $as_echo_n "checking for freetype includes... " >&6; }
60259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60260 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60261     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60262     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60263 $as_echo_n "checking for freetype libraries... " >&6; }
60264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60265 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60266   fi
60267 
60268             else
60269 
60270   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60271   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60272   METHOD="well-known location"
60273 
60274   # Let's start with an optimistic view of the world :-)
60275   FOUND_FREETYPE=yes
60276 
60277   # First look for the canonical freetype main include file ft2build.h.
60278   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60279     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60280     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60281     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60282       # Fail.
60283       FOUND_FREETYPE=no
60284     fi
60285   fi
60286 
60287   if test "x$FOUND_FREETYPE" = xyes; then
60288     # Include file found, let's continue the sanity check.
60289     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60290 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60291 
60292     # Reset to default value
60293     FREETYPE_BASE_NAME=freetype
60294     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60295     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60296       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60297           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60298         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60299         # for the .6 version explicitly.
60300         FREETYPE_BASE_NAME=freetype.6
60301         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60302         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60303 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60304       else
60305         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60306 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60307         FOUND_FREETYPE=no
60308       fi
60309     else
60310       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60311         # On Windows, we will need both .lib and .dll file.
60312         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60313           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60314 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60315           FOUND_FREETYPE=no
60316         fi
60317       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60318           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60319         # Found lib in isa dir, use that instead.
60320         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60321         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60322 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60323       fi
60324     fi
60325   fi
60326 
60327   if test "x$FOUND_FREETYPE" = xyes; then
60328 
60329   # Only process if variable expands to non-empty
60330 
60331   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60332     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60333 
60334   # Input might be given as Windows format, start by converting to
60335   # unix format.
60336   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60337   new_path=`$CYGPATH -u "$path"`
60338 
60339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60342   # "foo.exe" is OK but "foo" is an error.
60343   #
60344   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60345   # It is also a way to make sure we got the proper file name for the real test later on.
60346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60347   if test "x$test_shortpath" = x; then
60348     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60349 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60350     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60351   fi
60352 
60353   # Call helper function which possibly converts this using DOS-style short mode.
60354   # If so, the updated path is stored in $new_path.
60355 
60356   input_path="$new_path"
60357   # Check if we need to convert this using DOS-style short mode. If the path
60358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60359   # take no chances and rewrite it.
60360   # Note: m4 eats our [], so we need to use [ and ] instead.
60361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60362   if test "x$has_forbidden_chars" != x; then
60363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60364     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60365     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60366     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60367       # Going to short mode and back again did indeed matter. Since short mode is
60368       # case insensitive, let's make it lowercase to improve readability.
60369       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60370       # Now convert it back to Unix-style (cygpath)
60371       input_path=`$CYGPATH -u "$shortmode_path"`
60372       new_path="$input_path"
60373     fi
60374   fi
60375 
60376   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60377   if test "x$test_cygdrive_prefix" = x; then
60378     # As a simple fix, exclude /usr/bin since it's not a real path.
60379     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60380       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60381       # a path prefixed by /cygdrive for fixpath to work.
60382       new_path="$CYGWIN_ROOT_PATH$input_path"
60383     fi
60384   fi
60385 
60386 
60387   if test "x$path" != "x$new_path"; then
60388     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60390 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60391   fi
60392 
60393     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60394 
60395   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60396   has_colon=`$ECHO $path | $GREP ^.:`
60397   new_path="$path"
60398   if test "x$has_colon" = x; then
60399     # Not in mixed or Windows style, start by that.
60400     new_path=`cmd //c echo $path`
60401   fi
60402 
60403 
60404   input_path="$new_path"
60405   # Check if we need to convert this using DOS-style short mode. If the path
60406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60407   # take no chances and rewrite it.
60408   # Note: m4 eats our [], so we need to use [ and ] instead.
60409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60410   if test "x$has_forbidden_chars" != x; then
60411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60412     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60413   fi
60414 
60415 
60416   windows_path="$new_path"
60417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60418     unix_path=`$CYGPATH -u "$windows_path"`
60419     new_path="$unix_path"
60420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60422     new_path="$unix_path"
60423   fi
60424 
60425   if test "x$path" != "x$new_path"; then
60426     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60428 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60429   fi
60430 
60431   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60432   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60433 
60434     else
60435       # We're on a unix platform. Hooray! :)
60436       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60437       has_space=`$ECHO "$path" | $GREP " "`
60438       if test "x$has_space" != x; then
60439         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60440 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60441         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60442       fi
60443 
60444       # Use eval to expand a potential ~
60445       eval path="$path"
60446       if test ! -f "$path" && test ! -d "$path"; then
60447         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60448       fi
60449 
60450       if test -d "$path"; then
60451         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60452       else
60453         dir="`$DIRNAME "$path"`"
60454         base="`$BASENAME "$path"`"
60455         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60456       fi
60457     fi
60458   fi
60459 
60460 
60461   # Only process if variable expands to non-empty
60462 
60463   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60464     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60465 
60466   # Input might be given as Windows format, start by converting to
60467   # unix format.
60468   path="$POTENTIAL_FREETYPE_LIB_PATH"
60469   new_path=`$CYGPATH -u "$path"`
60470 
60471   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60472   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60473   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60474   # "foo.exe" is OK but "foo" is an error.
60475   #
60476   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60477   # It is also a way to make sure we got the proper file name for the real test later on.
60478   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60479   if test "x$test_shortpath" = x; then
60480     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60481 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60482     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60483   fi
60484 
60485   # Call helper function which possibly converts this using DOS-style short mode.
60486   # If so, the updated path is stored in $new_path.
60487 
60488   input_path="$new_path"
60489   # Check if we need to convert this using DOS-style short mode. If the path
60490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60491   # take no chances and rewrite it.
60492   # Note: m4 eats our [], so we need to use [ and ] instead.
60493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60494   if test "x$has_forbidden_chars" != x; then
60495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60496     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60497     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60498     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60499       # Going to short mode and back again did indeed matter. Since short mode is
60500       # case insensitive, let's make it lowercase to improve readability.
60501       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60502       # Now convert it back to Unix-style (cygpath)
60503       input_path=`$CYGPATH -u "$shortmode_path"`
60504       new_path="$input_path"
60505     fi
60506   fi
60507 
60508   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60509   if test "x$test_cygdrive_prefix" = x; then
60510     # As a simple fix, exclude /usr/bin since it's not a real path.
60511     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60512       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60513       # a path prefixed by /cygdrive for fixpath to work.
60514       new_path="$CYGWIN_ROOT_PATH$input_path"
60515     fi
60516   fi
60517 
60518 
60519   if test "x$path" != "x$new_path"; then
60520     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60521     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60522 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60523   fi
60524 
60525     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60526 
60527   path="$POTENTIAL_FREETYPE_LIB_PATH"
60528   has_colon=`$ECHO $path | $GREP ^.:`
60529   new_path="$path"
60530   if test "x$has_colon" = x; then
60531     # Not in mixed or Windows style, start by that.
60532     new_path=`cmd //c echo $path`
60533   fi
60534 
60535 
60536   input_path="$new_path"
60537   # Check if we need to convert this using DOS-style short mode. If the path
60538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60539   # take no chances and rewrite it.
60540   # Note: m4 eats our [], so we need to use [ and ] instead.
60541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60542   if test "x$has_forbidden_chars" != x; then
60543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60544     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60545   fi
60546 
60547 
60548   windows_path="$new_path"
60549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60550     unix_path=`$CYGPATH -u "$windows_path"`
60551     new_path="$unix_path"
60552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60554     new_path="$unix_path"
60555   fi
60556 
60557   if test "x$path" != "x$new_path"; then
60558     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60559     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60560 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60561   fi
60562 
60563   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60564   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60565 
60566     else
60567       # We're on a unix platform. Hooray! :)
60568       path="$POTENTIAL_FREETYPE_LIB_PATH"
60569       has_space=`$ECHO "$path" | $GREP " "`
60570       if test "x$has_space" != x; then
60571         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60572 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60573         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60574       fi
60575 
60576       # Use eval to expand a potential ~
60577       eval path="$path"
60578       if test ! -f "$path" && test ! -d "$path"; then
60579         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60580       fi
60581 
60582       if test -d "$path"; then
60583         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60584       else
60585         dir="`$DIRNAME "$path"`"
60586         base="`$BASENAME "$path"`"
60587         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60588       fi
60589     fi
60590   fi
60591 
60592 
60593     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60594     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60595 $as_echo_n "checking for freetype includes... " >&6; }
60596     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60597 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60598     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60599     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60600 $as_echo_n "checking for freetype libraries... " >&6; }
60601     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60602 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60603   fi
60604 
60605             fi
60606             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60607                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60608               # Source is available, as a last resort try to build freetype in default location
60609 
60610   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60611   BUILD_FREETYPE=yes
60612 
60613   # Check if the freetype sources are acessible..
60614   if ! test -d $FREETYPE_SRC_PATH; then
60615     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
60616 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60617     BUILD_FREETYPE=no
60618   fi
60619   # ..and contain a vc2010 project file
60620   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60621   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60622     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
60623 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60624     BUILD_FREETYPE=no
60625   fi
60626   # Now check if configure found a version of 'msbuild.exe'
60627   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60628     { $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
60629 $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;}
60630     BUILD_FREETYPE=no
60631   fi
60632 
60633   # Ready to go..
60634   if test "x$BUILD_FREETYPE" = xyes; then
60635     # msbuild requires trailing slashes for output directories
60636     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60637     freetype_lib_path_unix="$freetype_lib_path"
60638     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60639 
60640   unix_path="$vcxproj_path"
60641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60642     windows_path=`$CYGPATH -m "$unix_path"`
60643     vcxproj_path="$windows_path"
60644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60645     windows_path=`cmd //c echo $unix_path`
60646     vcxproj_path="$windows_path"
60647   fi
60648 
60649 
60650   unix_path="$freetype_lib_path"
60651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60652     windows_path=`$CYGPATH -m "$unix_path"`
60653     freetype_lib_path="$windows_path"
60654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60655     windows_path=`cmd //c echo $unix_path`
60656     freetype_lib_path="$windows_path"
60657   fi
60658 
60659 
60660   unix_path="$freetype_obj_path"
60661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60662     windows_path=`$CYGPATH -m "$unix_path"`
60663     freetype_obj_path="$windows_path"
60664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60665     windows_path=`cmd //c echo $unix_path`
60666     freetype_obj_path="$windows_path"
60667   fi
60668 
60669     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60670       freetype_platform=x64
60671     else
60672       freetype_platform=win32
60673     fi
60674 
60675     # The original freetype project file is for VS 2010 (i.e. 'v100'),
60676     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60677     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60678     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60679     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60680 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60681 
60682     # First we try to build the freetype.dll
60683     $ECHO -e "@echo off\n"\
60684         "$MSBUILD $vcxproj_path "\
60685         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60686         "/p:Configuration=\"Release Multithreaded\" "\
60687         "/p:Platform=$freetype_platform "\
60688         "/p:ConfigurationType=DynamicLibrary "\
60689         "/p:TargetName=freetype "\
60690         "/p:OutDir=\"$freetype_lib_path\" "\
60691         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60692     cmd /c freetype.bat
60693 
60694     if test -s "$freetype_lib_path_unix/freetype.dll"; then
60695       # If that succeeds we also build freetype.lib
60696       $ECHO -e "@echo off\n"\
60697           "$MSBUILD $vcxproj_path "\
60698           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60699           "/p:Configuration=\"Release Multithreaded\" "\
60700           "/p:Platform=$freetype_platform "\
60701           "/p:ConfigurationType=StaticLibrary "\
60702           "/p:TargetName=freetype "\
60703           "/p:OutDir=\"$freetype_lib_path\" "\
60704           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60705       cmd /c freetype.bat
60706 
60707       if test -s "$freetype_lib_path_unix/freetype.lib"; then
60708         # Once we build both, lib and dll, set freetype lib and include path appropriately
60709         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60710         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60711         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60712 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60713       else
60714         BUILD_FREETYPE=no
60715       fi
60716     else
60717       BUILD_FREETYPE=no
60718     fi
60719   fi
60720 
60721               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60722 
60723   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60724   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60725   METHOD="well-known location"
60726 
60727   # Let's start with an optimistic view of the world :-)
60728   FOUND_FREETYPE=yes
60729 
60730   # First look for the canonical freetype main include file ft2build.h.
60731   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60732     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60733     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60734     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60735       # Fail.
60736       FOUND_FREETYPE=no
60737     fi
60738   fi
60739 
60740   if test "x$FOUND_FREETYPE" = xyes; then
60741     # Include file found, let's continue the sanity check.
60742     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60743 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60744 
60745     # Reset to default value
60746     FREETYPE_BASE_NAME=freetype
60747     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60748     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60749       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60750           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60751         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60752         # for the .6 version explicitly.
60753         FREETYPE_BASE_NAME=freetype.6
60754         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60755         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60756 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60757       else
60758         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60759 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60760         FOUND_FREETYPE=no
60761       fi
60762     else
60763       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60764         # On Windows, we will need both .lib and .dll file.
60765         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60766           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60767 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60768           FOUND_FREETYPE=no
60769         fi
60770       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60771           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60772         # Found lib in isa dir, use that instead.
60773         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60774         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60775 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60776       fi
60777     fi
60778   fi
60779 
60780   if test "x$FOUND_FREETYPE" = xyes; then
60781 
60782   # Only process if variable expands to non-empty
60783 
60784   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60785     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60786 
60787   # Input might be given as Windows format, start by converting to
60788   # unix format.
60789   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60790   new_path=`$CYGPATH -u "$path"`
60791 
60792   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60793   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60794   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60795   # "foo.exe" is OK but "foo" is an error.
60796   #
60797   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60798   # It is also a way to make sure we got the proper file name for the real test later on.
60799   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60800   if test "x$test_shortpath" = x; then
60801     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60802 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60803     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60804   fi
60805 
60806   # Call helper function which possibly converts this using DOS-style short mode.
60807   # If so, the updated path is stored in $new_path.
60808 
60809   input_path="$new_path"
60810   # Check if we need to convert this using DOS-style short mode. If the path
60811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60812   # take no chances and rewrite it.
60813   # Note: m4 eats our [], so we need to use [ and ] instead.
60814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60815   if test "x$has_forbidden_chars" != x; then
60816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60817     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60818     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60819     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60820       # Going to short mode and back again did indeed matter. Since short mode is
60821       # case insensitive, let's make it lowercase to improve readability.
60822       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60823       # Now convert it back to Unix-style (cygpath)
60824       input_path=`$CYGPATH -u "$shortmode_path"`
60825       new_path="$input_path"
60826     fi
60827   fi
60828 
60829   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60830   if test "x$test_cygdrive_prefix" = x; then
60831     # As a simple fix, exclude /usr/bin since it's not a real path.
60832     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60833       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60834       # a path prefixed by /cygdrive for fixpath to work.
60835       new_path="$CYGWIN_ROOT_PATH$input_path"
60836     fi
60837   fi
60838 
60839 
60840   if test "x$path" != "x$new_path"; then
60841     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60842     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60843 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60844   fi
60845 
60846     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60847 
60848   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60849   has_colon=`$ECHO $path | $GREP ^.:`
60850   new_path="$path"
60851   if test "x$has_colon" = x; then
60852     # Not in mixed or Windows style, start by that.
60853     new_path=`cmd //c echo $path`
60854   fi
60855 
60856 
60857   input_path="$new_path"
60858   # Check if we need to convert this using DOS-style short mode. If the path
60859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60860   # take no chances and rewrite it.
60861   # Note: m4 eats our [], so we need to use [ and ] instead.
60862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60863   if test "x$has_forbidden_chars" != x; then
60864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60865     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60866   fi
60867 
60868 
60869   windows_path="$new_path"
60870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60871     unix_path=`$CYGPATH -u "$windows_path"`
60872     new_path="$unix_path"
60873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60875     new_path="$unix_path"
60876   fi
60877 
60878   if test "x$path" != "x$new_path"; then
60879     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60881 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60882   fi
60883 
60884   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60885   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60886 
60887     else
60888       # We're on a unix platform. Hooray! :)
60889       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60890       has_space=`$ECHO "$path" | $GREP " "`
60891       if test "x$has_space" != x; then
60892         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60893 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60894         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60895       fi
60896 
60897       # Use eval to expand a potential ~
60898       eval path="$path"
60899       if test ! -f "$path" && test ! -d "$path"; then
60900         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60901       fi
60902 
60903       if test -d "$path"; then
60904         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60905       else
60906         dir="`$DIRNAME "$path"`"
60907         base="`$BASENAME "$path"`"
60908         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60909       fi
60910     fi
60911   fi
60912 
60913 
60914   # Only process if variable expands to non-empty
60915 
60916   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60917     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60918 
60919   # Input might be given as Windows format, start by converting to
60920   # unix format.
60921   path="$POTENTIAL_FREETYPE_LIB_PATH"
60922   new_path=`$CYGPATH -u "$path"`
60923 
60924   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60925   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60926   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60927   # "foo.exe" is OK but "foo" is an error.
60928   #
60929   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60930   # It is also a way to make sure we got the proper file name for the real test later on.
60931   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60932   if test "x$test_shortpath" = x; then
60933     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60934 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60935     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60936   fi
60937 
60938   # Call helper function which possibly converts this using DOS-style short mode.
60939   # If so, the updated path is stored in $new_path.
60940 
60941   input_path="$new_path"
60942   # Check if we need to convert this using DOS-style short mode. If the path
60943   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60944   # take no chances and rewrite it.
60945   # Note: m4 eats our [], so we need to use [ and ] instead.
60946   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60947   if test "x$has_forbidden_chars" != x; then
60948     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60949     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60950     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60951     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60952       # Going to short mode and back again did indeed matter. Since short mode is
60953       # case insensitive, let's make it lowercase to improve readability.
60954       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60955       # Now convert it back to Unix-style (cygpath)
60956       input_path=`$CYGPATH -u "$shortmode_path"`
60957       new_path="$input_path"
60958     fi
60959   fi
60960 
60961   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60962   if test "x$test_cygdrive_prefix" = x; then
60963     # As a simple fix, exclude /usr/bin since it's not a real path.
60964     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60965       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60966       # a path prefixed by /cygdrive for fixpath to work.
60967       new_path="$CYGWIN_ROOT_PATH$input_path"
60968     fi
60969   fi
60970 
60971 
60972   if test "x$path" != "x$new_path"; then
60973     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60974     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60975 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60976   fi
60977 
60978     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60979 
60980   path="$POTENTIAL_FREETYPE_LIB_PATH"
60981   has_colon=`$ECHO $path | $GREP ^.:`
60982   new_path="$path"
60983   if test "x$has_colon" = x; then
60984     # Not in mixed or Windows style, start by that.
60985     new_path=`cmd //c echo $path`
60986   fi
60987 
60988 
60989   input_path="$new_path"
60990   # Check if we need to convert this using DOS-style short mode. If the path
60991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60992   # take no chances and rewrite it.
60993   # Note: m4 eats our [], so we need to use [ and ] instead.
60994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60995   if test "x$has_forbidden_chars" != x; then
60996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60997     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60998   fi
60999 
61000 
61001   windows_path="$new_path"
61002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61003     unix_path=`$CYGPATH -u "$windows_path"`
61004     new_path="$unix_path"
61005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61007     new_path="$unix_path"
61008   fi
61009 
61010   if test "x$path" != "x$new_path"; then
61011     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61012     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61013 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61014   fi
61015 
61016   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61017   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61018 
61019     else
61020       # We're on a unix platform. Hooray! :)
61021       path="$POTENTIAL_FREETYPE_LIB_PATH"
61022       has_space=`$ECHO "$path" | $GREP " "`
61023       if test "x$has_space" != x; then
61024         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61025 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61026         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61027       fi
61028 
61029       # Use eval to expand a potential ~
61030       eval path="$path"
61031       if test ! -f "$path" && test ! -d "$path"; then
61032         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61033       fi
61034 
61035       if test -d "$path"; then
61036         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61037       else
61038         dir="`$DIRNAME "$path"`"
61039         base="`$BASENAME "$path"`"
61040         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61041       fi
61042     fi
61043   fi
61044 
61045 
61046     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61048 $as_echo_n "checking for freetype includes... " >&6; }
61049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61050 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61051     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61053 $as_echo_n "checking for freetype libraries... " >&6; }
61054     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61055 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61056   fi
61057 
61058               else
61059 
61060   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61061   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61062   METHOD="well-known location"
61063 
61064   # Let's start with an optimistic view of the world :-)
61065   FOUND_FREETYPE=yes
61066 
61067   # First look for the canonical freetype main include file ft2build.h.
61068   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61069     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61070     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61071     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61072       # Fail.
61073       FOUND_FREETYPE=no
61074     fi
61075   fi
61076 
61077   if test "x$FOUND_FREETYPE" = xyes; then
61078     # Include file found, let's continue the sanity check.
61079     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61080 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61081 
61082     # Reset to default value
61083     FREETYPE_BASE_NAME=freetype
61084     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61085     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61086       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61087           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61088         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61089         # for the .6 version explicitly.
61090         FREETYPE_BASE_NAME=freetype.6
61091         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61092         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61093 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61094       else
61095         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61096 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61097         FOUND_FREETYPE=no
61098       fi
61099     else
61100       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61101         # On Windows, we will need both .lib and .dll file.
61102         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61103           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61104 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61105           FOUND_FREETYPE=no
61106         fi
61107       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61108           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61109         # Found lib in isa dir, use that instead.
61110         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61111         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61112 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61113       fi
61114     fi
61115   fi
61116 
61117   if test "x$FOUND_FREETYPE" = xyes; then
61118 
61119   # Only process if variable expands to non-empty
61120 
61121   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61122     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61123 
61124   # Input might be given as Windows format, start by converting to
61125   # unix format.
61126   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61127   new_path=`$CYGPATH -u "$path"`
61128 
61129   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61130   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61131   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61132   # "foo.exe" is OK but "foo" is an error.
61133   #
61134   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61135   # It is also a way to make sure we got the proper file name for the real test later on.
61136   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61137   if test "x$test_shortpath" = x; then
61138     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61139 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61140     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61141   fi
61142 
61143   # Call helper function which possibly converts this using DOS-style short mode.
61144   # If so, the updated path is stored in $new_path.
61145 
61146   input_path="$new_path"
61147   # Check if we need to convert this using DOS-style short mode. If the path
61148   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61149   # take no chances and rewrite it.
61150   # Note: m4 eats our [], so we need to use [ and ] instead.
61151   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61152   if test "x$has_forbidden_chars" != x; then
61153     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61154     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61155     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61156     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61157       # Going to short mode and back again did indeed matter. Since short mode is
61158       # case insensitive, let's make it lowercase to improve readability.
61159       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61160       # Now convert it back to Unix-style (cygpath)
61161       input_path=`$CYGPATH -u "$shortmode_path"`
61162       new_path="$input_path"
61163     fi
61164   fi
61165 
61166   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61167   if test "x$test_cygdrive_prefix" = x; then
61168     # As a simple fix, exclude /usr/bin since it's not a real path.
61169     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61170       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61171       # a path prefixed by /cygdrive for fixpath to work.
61172       new_path="$CYGWIN_ROOT_PATH$input_path"
61173     fi
61174   fi
61175 
61176 
61177   if test "x$path" != "x$new_path"; then
61178     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61179     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61180 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61181   fi
61182 
61183     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61184 
61185   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61186   has_colon=`$ECHO $path | $GREP ^.:`
61187   new_path="$path"
61188   if test "x$has_colon" = x; then
61189     # Not in mixed or Windows style, start by that.
61190     new_path=`cmd //c echo $path`
61191   fi
61192 
61193 
61194   input_path="$new_path"
61195   # Check if we need to convert this using DOS-style short mode. If the path
61196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61197   # take no chances and rewrite it.
61198   # Note: m4 eats our [], so we need to use [ and ] instead.
61199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61200   if test "x$has_forbidden_chars" != x; then
61201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61202     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61203   fi
61204 
61205 
61206   windows_path="$new_path"
61207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61208     unix_path=`$CYGPATH -u "$windows_path"`
61209     new_path="$unix_path"
61210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61212     new_path="$unix_path"
61213   fi
61214 
61215   if test "x$path" != "x$new_path"; then
61216     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61217     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61218 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61219   fi
61220 
61221   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61222   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61223 
61224     else
61225       # We're on a unix platform. Hooray! :)
61226       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61227       has_space=`$ECHO "$path" | $GREP " "`
61228       if test "x$has_space" != x; then
61229         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61230 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61231         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61232       fi
61233 
61234       # Use eval to expand a potential ~
61235       eval path="$path"
61236       if test ! -f "$path" && test ! -d "$path"; then
61237         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61238       fi
61239 
61240       if test -d "$path"; then
61241         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61242       else
61243         dir="`$DIRNAME "$path"`"
61244         base="`$BASENAME "$path"`"
61245         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61246       fi
61247     fi
61248   fi
61249 
61250 
61251   # Only process if variable expands to non-empty
61252 
61253   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61254     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61255 
61256   # Input might be given as Windows format, start by converting to
61257   # unix format.
61258   path="$POTENTIAL_FREETYPE_LIB_PATH"
61259   new_path=`$CYGPATH -u "$path"`
61260 
61261   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61262   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61263   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61264   # "foo.exe" is OK but "foo" is an error.
61265   #
61266   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61267   # It is also a way to make sure we got the proper file name for the real test later on.
61268   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61269   if test "x$test_shortpath" = x; then
61270     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61271 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61272     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61273   fi
61274 
61275   # Call helper function which possibly converts this using DOS-style short mode.
61276   # If so, the updated path is stored in $new_path.
61277 
61278   input_path="$new_path"
61279   # Check if we need to convert this using DOS-style short mode. If the path
61280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61281   # take no chances and rewrite it.
61282   # Note: m4 eats our [], so we need to use [ and ] instead.
61283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61284   if test "x$has_forbidden_chars" != x; then
61285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61286     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61287     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61288     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61289       # Going to short mode and back again did indeed matter. Since short mode is
61290       # case insensitive, let's make it lowercase to improve readability.
61291       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61292       # Now convert it back to Unix-style (cygpath)
61293       input_path=`$CYGPATH -u "$shortmode_path"`
61294       new_path="$input_path"
61295     fi
61296   fi
61297 
61298   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61299   if test "x$test_cygdrive_prefix" = x; then
61300     # As a simple fix, exclude /usr/bin since it's not a real path.
61301     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61302       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61303       # a path prefixed by /cygdrive for fixpath to work.
61304       new_path="$CYGWIN_ROOT_PATH$input_path"
61305     fi
61306   fi
61307 
61308 
61309   if test "x$path" != "x$new_path"; then
61310     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61311     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61312 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61313   fi
61314 
61315     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61316 
61317   path="$POTENTIAL_FREETYPE_LIB_PATH"
61318   has_colon=`$ECHO $path | $GREP ^.:`
61319   new_path="$path"
61320   if test "x$has_colon" = x; then
61321     # Not in mixed or Windows style, start by that.
61322     new_path=`cmd //c echo $path`
61323   fi
61324 
61325 
61326   input_path="$new_path"
61327   # Check if we need to convert this using DOS-style short mode. If the path
61328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61329   # take no chances and rewrite it.
61330   # Note: m4 eats our [], so we need to use [ and ] instead.
61331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61332   if test "x$has_forbidden_chars" != x; then
61333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61334     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61335   fi
61336 
61337 
61338   windows_path="$new_path"
61339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61340     unix_path=`$CYGPATH -u "$windows_path"`
61341     new_path="$unix_path"
61342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61343     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61344     new_path="$unix_path"
61345   fi
61346 
61347   if test "x$path" != "x$new_path"; then
61348     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61349     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61350 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61351   fi
61352 
61353   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61354   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61355 
61356     else
61357       # We're on a unix platform. Hooray! :)
61358       path="$POTENTIAL_FREETYPE_LIB_PATH"
61359       has_space=`$ECHO "$path" | $GREP " "`
61360       if test "x$has_space" != x; then
61361         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61362 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61363         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61364       fi
61365 
61366       # Use eval to expand a potential ~
61367       eval path="$path"
61368       if test ! -f "$path" && test ! -d "$path"; then
61369         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61370       fi
61371 
61372       if test -d "$path"; then
61373         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61374       else
61375         dir="`$DIRNAME "$path"`"
61376         base="`$BASENAME "$path"`"
61377         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61378       fi
61379     fi
61380   fi
61381 
61382 
61383     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61385 $as_echo_n "checking for freetype includes... " >&6; }
61386     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61387 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61388     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61389     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61390 $as_echo_n "checking for freetype libraries... " >&6; }
61391     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61392 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61393   fi
61394 
61395               fi
61396             fi
61397           fi
61398         else
61399           FREETYPE_BASE_DIR="$SYSROOT/usr"
61400 
61401   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61402   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61403   METHOD="well-known location"
61404 
61405   # Let's start with an optimistic view of the world :-)
61406   FOUND_FREETYPE=yes
61407 
61408   # First look for the canonical freetype main include file ft2build.h.
61409   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61410     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61411     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61412     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61413       # Fail.
61414       FOUND_FREETYPE=no
61415     fi
61416   fi
61417 
61418   if test "x$FOUND_FREETYPE" = xyes; then
61419     # Include file found, let's continue the sanity check.
61420     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61421 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61422 
61423     # Reset to default value
61424     FREETYPE_BASE_NAME=freetype
61425     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61426     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61427       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61428           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61429         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61430         # for the .6 version explicitly.
61431         FREETYPE_BASE_NAME=freetype.6
61432         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61433         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61434 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61435       else
61436         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61437 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61438         FOUND_FREETYPE=no
61439       fi
61440     else
61441       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61442         # On Windows, we will need both .lib and .dll file.
61443         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61444           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61445 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61446           FOUND_FREETYPE=no
61447         fi
61448       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61449           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61450         # Found lib in isa dir, use that instead.
61451         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61452         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61453 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61454       fi
61455     fi
61456   fi
61457 
61458   if test "x$FOUND_FREETYPE" = xyes; then
61459 
61460   # Only process if variable expands to non-empty
61461 
61462   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61463     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61464 
61465   # Input might be given as Windows format, start by converting to
61466   # unix format.
61467   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61468   new_path=`$CYGPATH -u "$path"`
61469 
61470   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61471   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61472   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61473   # "foo.exe" is OK but "foo" is an error.
61474   #
61475   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61476   # It is also a way to make sure we got the proper file name for the real test later on.
61477   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61478   if test "x$test_shortpath" = x; then
61479     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61480 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61481     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61482   fi
61483 
61484   # Call helper function which possibly converts this using DOS-style short mode.
61485   # If so, the updated path is stored in $new_path.
61486 
61487   input_path="$new_path"
61488   # Check if we need to convert this using DOS-style short mode. If the path
61489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61490   # take no chances and rewrite it.
61491   # Note: m4 eats our [], so we need to use [ and ] instead.
61492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61493   if test "x$has_forbidden_chars" != x; then
61494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61495     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61496     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61497     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61498       # Going to short mode and back again did indeed matter. Since short mode is
61499       # case insensitive, let's make it lowercase to improve readability.
61500       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61501       # Now convert it back to Unix-style (cygpath)
61502       input_path=`$CYGPATH -u "$shortmode_path"`
61503       new_path="$input_path"
61504     fi
61505   fi
61506 
61507   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61508   if test "x$test_cygdrive_prefix" = x; then
61509     # As a simple fix, exclude /usr/bin since it's not a real path.
61510     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61511       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61512       # a path prefixed by /cygdrive for fixpath to work.
61513       new_path="$CYGWIN_ROOT_PATH$input_path"
61514     fi
61515   fi
61516 
61517 
61518   if test "x$path" != "x$new_path"; then
61519     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61520     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61521 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61522   fi
61523 
61524     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61525 
61526   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61527   has_colon=`$ECHO $path | $GREP ^.:`
61528   new_path="$path"
61529   if test "x$has_colon" = x; then
61530     # Not in mixed or Windows style, start by that.
61531     new_path=`cmd //c echo $path`
61532   fi
61533 
61534 
61535   input_path="$new_path"
61536   # Check if we need to convert this using DOS-style short mode. If the path
61537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61538   # take no chances and rewrite it.
61539   # Note: m4 eats our [], so we need to use [ and ] instead.
61540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61541   if test "x$has_forbidden_chars" != x; then
61542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61543     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61544   fi
61545 
61546 
61547   windows_path="$new_path"
61548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61549     unix_path=`$CYGPATH -u "$windows_path"`
61550     new_path="$unix_path"
61551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61553     new_path="$unix_path"
61554   fi
61555 
61556   if test "x$path" != "x$new_path"; then
61557     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61558     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61559 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61560   fi
61561 
61562   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61563   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61564 
61565     else
61566       # We're on a unix platform. Hooray! :)
61567       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61568       has_space=`$ECHO "$path" | $GREP " "`
61569       if test "x$has_space" != x; then
61570         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61571 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61572         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61573       fi
61574 
61575       # Use eval to expand a potential ~
61576       eval path="$path"
61577       if test ! -f "$path" && test ! -d "$path"; then
61578         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61579       fi
61580 
61581       if test -d "$path"; then
61582         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61583       else
61584         dir="`$DIRNAME "$path"`"
61585         base="`$BASENAME "$path"`"
61586         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61587       fi
61588     fi
61589   fi
61590 
61591 
61592   # Only process if variable expands to non-empty
61593 
61594   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61595     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61596 
61597   # Input might be given as Windows format, start by converting to
61598   # unix format.
61599   path="$POTENTIAL_FREETYPE_LIB_PATH"
61600   new_path=`$CYGPATH -u "$path"`
61601 
61602   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61603   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61604   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61605   # "foo.exe" is OK but "foo" is an error.
61606   #
61607   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61608   # It is also a way to make sure we got the proper file name for the real test later on.
61609   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61610   if test "x$test_shortpath" = x; then
61611     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61612 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61613     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61614   fi
61615 
61616   # Call helper function which possibly converts this using DOS-style short mode.
61617   # If so, the updated path is stored in $new_path.
61618 
61619   input_path="$new_path"
61620   # Check if we need to convert this using DOS-style short mode. If the path
61621   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61622   # take no chances and rewrite it.
61623   # Note: m4 eats our [], so we need to use [ and ] instead.
61624   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61625   if test "x$has_forbidden_chars" != x; then
61626     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61627     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61628     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61629     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61630       # Going to short mode and back again did indeed matter. Since short mode is
61631       # case insensitive, let's make it lowercase to improve readability.
61632       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61633       # Now convert it back to Unix-style (cygpath)
61634       input_path=`$CYGPATH -u "$shortmode_path"`
61635       new_path="$input_path"
61636     fi
61637   fi
61638 
61639   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61640   if test "x$test_cygdrive_prefix" = x; then
61641     # As a simple fix, exclude /usr/bin since it's not a real path.
61642     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61643       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61644       # a path prefixed by /cygdrive for fixpath to work.
61645       new_path="$CYGWIN_ROOT_PATH$input_path"
61646     fi
61647   fi
61648 
61649 
61650   if test "x$path" != "x$new_path"; then
61651     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61652     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61653 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61654   fi
61655 
61656     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61657 
61658   path="$POTENTIAL_FREETYPE_LIB_PATH"
61659   has_colon=`$ECHO $path | $GREP ^.:`
61660   new_path="$path"
61661   if test "x$has_colon" = x; then
61662     # Not in mixed or Windows style, start by that.
61663     new_path=`cmd //c echo $path`
61664   fi
61665 
61666 
61667   input_path="$new_path"
61668   # Check if we need to convert this using DOS-style short mode. If the path
61669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61670   # take no chances and rewrite it.
61671   # Note: m4 eats our [], so we need to use [ and ] instead.
61672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61673   if test "x$has_forbidden_chars" != x; then
61674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61675     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61676   fi
61677 
61678 
61679   windows_path="$new_path"
61680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61681     unix_path=`$CYGPATH -u "$windows_path"`
61682     new_path="$unix_path"
61683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61685     new_path="$unix_path"
61686   fi
61687 
61688   if test "x$path" != "x$new_path"; then
61689     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61690     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61691 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61692   fi
61693 
61694   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61695   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61696 
61697     else
61698       # We're on a unix platform. Hooray! :)
61699       path="$POTENTIAL_FREETYPE_LIB_PATH"
61700       has_space=`$ECHO "$path" | $GREP " "`
61701       if test "x$has_space" != x; then
61702         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61703 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61704         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61705       fi
61706 
61707       # Use eval to expand a potential ~
61708       eval path="$path"
61709       if test ! -f "$path" && test ! -d "$path"; then
61710         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61711       fi
61712 
61713       if test -d "$path"; then
61714         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61715       else
61716         dir="`$DIRNAME "$path"`"
61717         base="`$BASENAME "$path"`"
61718         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61719       fi
61720     fi
61721   fi
61722 
61723 
61724     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61726 $as_echo_n "checking for freetype includes... " >&6; }
61727     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61728 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61729     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61731 $as_echo_n "checking for freetype libraries... " >&6; }
61732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61733 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61734   fi
61735 
61736 
61737           if test "x$FOUND_FREETYPE" != xyes; then
61738             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61739 
61740   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61741   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61742   METHOD="well-known location"
61743 
61744   # Let's start with an optimistic view of the world :-)
61745   FOUND_FREETYPE=yes
61746 
61747   # First look for the canonical freetype main include file ft2build.h.
61748   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61749     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61750     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61751     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61752       # Fail.
61753       FOUND_FREETYPE=no
61754     fi
61755   fi
61756 
61757   if test "x$FOUND_FREETYPE" = xyes; then
61758     # Include file found, let's continue the sanity check.
61759     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61760 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61761 
61762     # Reset to default value
61763     FREETYPE_BASE_NAME=freetype
61764     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61765     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61766       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61767           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61768         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61769         # for the .6 version explicitly.
61770         FREETYPE_BASE_NAME=freetype.6
61771         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61772         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61773 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61774       else
61775         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61776 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61777         FOUND_FREETYPE=no
61778       fi
61779     else
61780       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61781         # On Windows, we will need both .lib and .dll file.
61782         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61783           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61784 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61785           FOUND_FREETYPE=no
61786         fi
61787       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61788           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61789         # Found lib in isa dir, use that instead.
61790         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61791         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61792 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61793       fi
61794     fi
61795   fi
61796 
61797   if test "x$FOUND_FREETYPE" = xyes; then
61798 
61799   # Only process if variable expands to non-empty
61800 
61801   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61802     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61803 
61804   # Input might be given as Windows format, start by converting to
61805   # unix format.
61806   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61807   new_path=`$CYGPATH -u "$path"`
61808 
61809   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61810   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61811   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61812   # "foo.exe" is OK but "foo" is an error.
61813   #
61814   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61815   # It is also a way to make sure we got the proper file name for the real test later on.
61816   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61817   if test "x$test_shortpath" = x; then
61818     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61819 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61820     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61821   fi
61822 
61823   # Call helper function which possibly converts this using DOS-style short mode.
61824   # If so, the updated path is stored in $new_path.
61825 
61826   input_path="$new_path"
61827   # Check if we need to convert this using DOS-style short mode. If the path
61828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61829   # take no chances and rewrite it.
61830   # Note: m4 eats our [], so we need to use [ and ] instead.
61831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61832   if test "x$has_forbidden_chars" != x; then
61833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61834     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61835     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61836     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61837       # Going to short mode and back again did indeed matter. Since short mode is
61838       # case insensitive, let's make it lowercase to improve readability.
61839       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61840       # Now convert it back to Unix-style (cygpath)
61841       input_path=`$CYGPATH -u "$shortmode_path"`
61842       new_path="$input_path"
61843     fi
61844   fi
61845 
61846   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61847   if test "x$test_cygdrive_prefix" = x; then
61848     # As a simple fix, exclude /usr/bin since it's not a real path.
61849     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61850       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61851       # a path prefixed by /cygdrive for fixpath to work.
61852       new_path="$CYGWIN_ROOT_PATH$input_path"
61853     fi
61854   fi
61855 
61856 
61857   if test "x$path" != "x$new_path"; then
61858     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61859     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61860 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61861   fi
61862 
61863     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61864 
61865   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61866   has_colon=`$ECHO $path | $GREP ^.:`
61867   new_path="$path"
61868   if test "x$has_colon" = x; then
61869     # Not in mixed or Windows style, start by that.
61870     new_path=`cmd //c echo $path`
61871   fi
61872 
61873 
61874   input_path="$new_path"
61875   # Check if we need to convert this using DOS-style short mode. If the path
61876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61877   # take no chances and rewrite it.
61878   # Note: m4 eats our [], so we need to use [ and ] instead.
61879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61880   if test "x$has_forbidden_chars" != x; then
61881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61882     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61883   fi
61884 
61885 
61886   windows_path="$new_path"
61887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61888     unix_path=`$CYGPATH -u "$windows_path"`
61889     new_path="$unix_path"
61890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61892     new_path="$unix_path"
61893   fi
61894 
61895   if test "x$path" != "x$new_path"; then
61896     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61897     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61898 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61899   fi
61900 
61901   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61902   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61903 
61904     else
61905       # We're on a unix platform. Hooray! :)
61906       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61907       has_space=`$ECHO "$path" | $GREP " "`
61908       if test "x$has_space" != x; then
61909         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61910 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61911         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61912       fi
61913 
61914       # Use eval to expand a potential ~
61915       eval path="$path"
61916       if test ! -f "$path" && test ! -d "$path"; then
61917         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61918       fi
61919 
61920       if test -d "$path"; then
61921         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61922       else
61923         dir="`$DIRNAME "$path"`"
61924         base="`$BASENAME "$path"`"
61925         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61926       fi
61927     fi
61928   fi
61929 
61930 
61931   # Only process if variable expands to non-empty
61932 
61933   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61934     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61935 
61936   # Input might be given as Windows format, start by converting to
61937   # unix format.
61938   path="$POTENTIAL_FREETYPE_LIB_PATH"
61939   new_path=`$CYGPATH -u "$path"`
61940 
61941   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61942   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61943   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61944   # "foo.exe" is OK but "foo" is an error.
61945   #
61946   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61947   # It is also a way to make sure we got the proper file name for the real test later on.
61948   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61949   if test "x$test_shortpath" = x; then
61950     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61951 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61952     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61953   fi
61954 
61955   # Call helper function which possibly converts this using DOS-style short mode.
61956   # If so, the updated path is stored in $new_path.
61957 
61958   input_path="$new_path"
61959   # Check if we need to convert this using DOS-style short mode. If the path
61960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61961   # take no chances and rewrite it.
61962   # Note: m4 eats our [], so we need to use [ and ] instead.
61963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61964   if test "x$has_forbidden_chars" != x; then
61965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61966     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61967     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61968     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61969       # Going to short mode and back again did indeed matter. Since short mode is
61970       # case insensitive, let's make it lowercase to improve readability.
61971       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61972       # Now convert it back to Unix-style (cygpath)
61973       input_path=`$CYGPATH -u "$shortmode_path"`
61974       new_path="$input_path"
61975     fi
61976   fi
61977 
61978   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61979   if test "x$test_cygdrive_prefix" = x; then
61980     # As a simple fix, exclude /usr/bin since it's not a real path.
61981     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61982       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61983       # a path prefixed by /cygdrive for fixpath to work.
61984       new_path="$CYGWIN_ROOT_PATH$input_path"
61985     fi
61986   fi
61987 
61988 
61989   if test "x$path" != "x$new_path"; then
61990     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61992 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61993   fi
61994 
61995     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61996 
61997   path="$POTENTIAL_FREETYPE_LIB_PATH"
61998   has_colon=`$ECHO $path | $GREP ^.:`
61999   new_path="$path"
62000   if test "x$has_colon" = x; then
62001     # Not in mixed or Windows style, start by that.
62002     new_path=`cmd //c echo $path`
62003   fi
62004 
62005 
62006   input_path="$new_path"
62007   # Check if we need to convert this using DOS-style short mode. If the path
62008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62009   # take no chances and rewrite it.
62010   # Note: m4 eats our [], so we need to use [ and ] instead.
62011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62012   if test "x$has_forbidden_chars" != x; then
62013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62015   fi
62016 
62017 
62018   windows_path="$new_path"
62019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62020     unix_path=`$CYGPATH -u "$windows_path"`
62021     new_path="$unix_path"
62022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62024     new_path="$unix_path"
62025   fi
62026 
62027   if test "x$path" != "x$new_path"; then
62028     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62030 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62031   fi
62032 
62033   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62034   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62035 
62036     else
62037       # We're on a unix platform. Hooray! :)
62038       path="$POTENTIAL_FREETYPE_LIB_PATH"
62039       has_space=`$ECHO "$path" | $GREP " "`
62040       if test "x$has_space" != x; then
62041         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62042 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62043         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62044       fi
62045 
62046       # Use eval to expand a potential ~
62047       eval path="$path"
62048       if test ! -f "$path" && test ! -d "$path"; then
62049         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62050       fi
62051 
62052       if test -d "$path"; then
62053         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62054       else
62055         dir="`$DIRNAME "$path"`"
62056         base="`$BASENAME "$path"`"
62057         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62058       fi
62059     fi
62060   fi
62061 
62062 
62063     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62064     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62065 $as_echo_n "checking for freetype includes... " >&6; }
62066     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62067 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62068     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62070 $as_echo_n "checking for freetype libraries... " >&6; }
62071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62072 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62073   fi
62074 
62075           fi
62076           if test "x$FOUND_FREETYPE" != xyes; then
62077             FREETYPE_BASE_DIR="$SYSROOT/usr/local"
62078 
62079   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62080   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62081   METHOD="well-known location"
62082 
62083   # Let's start with an optimistic view of the world :-)
62084   FOUND_FREETYPE=yes
62085 
62086   # First look for the canonical freetype main include file ft2build.h.
62087   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62088     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62089     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62090     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62091       # Fail.
62092       FOUND_FREETYPE=no
62093     fi
62094   fi
62095 
62096   if test "x$FOUND_FREETYPE" = xyes; then
62097     # Include file found, let's continue the sanity check.
62098     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62099 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62100 
62101     # Reset to default value
62102     FREETYPE_BASE_NAME=freetype
62103     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62104     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62105       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62106           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62107         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62108         # for the .6 version explicitly.
62109         FREETYPE_BASE_NAME=freetype.6
62110         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62111         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62112 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62113       else
62114         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62115 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62116         FOUND_FREETYPE=no
62117       fi
62118     else
62119       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62120         # On Windows, we will need both .lib and .dll file.
62121         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62122           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62123 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62124           FOUND_FREETYPE=no
62125         fi
62126       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62127           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62128         # Found lib in isa dir, use that instead.
62129         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62130         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62131 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62132       fi
62133     fi
62134   fi
62135 
62136   if test "x$FOUND_FREETYPE" = xyes; then
62137 
62138   # Only process if variable expands to non-empty
62139 
62140   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62141     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62142 
62143   # Input might be given as Windows format, start by converting to
62144   # unix format.
62145   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62146   new_path=`$CYGPATH -u "$path"`
62147 
62148   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62149   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62150   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62151   # "foo.exe" is OK but "foo" is an error.
62152   #
62153   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62154   # It is also a way to make sure we got the proper file name for the real test later on.
62155   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62156   if test "x$test_shortpath" = x; then
62157     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62158 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62159     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62160   fi
62161 
62162   # Call helper function which possibly converts this using DOS-style short mode.
62163   # If so, the updated path is stored in $new_path.
62164 
62165   input_path="$new_path"
62166   # Check if we need to convert this using DOS-style short mode. If the path
62167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62168   # take no chances and rewrite it.
62169   # Note: m4 eats our [], so we need to use [ and ] instead.
62170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62171   if test "x$has_forbidden_chars" != x; then
62172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62173     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62174     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62175     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62176       # Going to short mode and back again did indeed matter. Since short mode is
62177       # case insensitive, let's make it lowercase to improve readability.
62178       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62179       # Now convert it back to Unix-style (cygpath)
62180       input_path=`$CYGPATH -u "$shortmode_path"`
62181       new_path="$input_path"
62182     fi
62183   fi
62184 
62185   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62186   if test "x$test_cygdrive_prefix" = x; then
62187     # As a simple fix, exclude /usr/bin since it's not a real path.
62188     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62189       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62190       # a path prefixed by /cygdrive for fixpath to work.
62191       new_path="$CYGWIN_ROOT_PATH$input_path"
62192     fi
62193   fi
62194 
62195 
62196   if test "x$path" != "x$new_path"; then
62197     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62198     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62199 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62200   fi
62201 
62202     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62203 
62204   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62205   has_colon=`$ECHO $path | $GREP ^.:`
62206   new_path="$path"
62207   if test "x$has_colon" = x; then
62208     # Not in mixed or Windows style, start by that.
62209     new_path=`cmd //c echo $path`
62210   fi
62211 
62212 
62213   input_path="$new_path"
62214   # Check if we need to convert this using DOS-style short mode. If the path
62215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62216   # take no chances and rewrite it.
62217   # Note: m4 eats our [], so we need to use [ and ] instead.
62218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62219   if test "x$has_forbidden_chars" != x; then
62220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62221     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62222   fi
62223 
62224 
62225   windows_path="$new_path"
62226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62227     unix_path=`$CYGPATH -u "$windows_path"`
62228     new_path="$unix_path"
62229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62231     new_path="$unix_path"
62232   fi
62233 
62234   if test "x$path" != "x$new_path"; then
62235     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62236     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62237 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62238   fi
62239 
62240   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62241   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62242 
62243     else
62244       # We're on a unix platform. Hooray! :)
62245       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62246       has_space=`$ECHO "$path" | $GREP " "`
62247       if test "x$has_space" != x; then
62248         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62249 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62250         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62251       fi
62252 
62253       # Use eval to expand a potential ~
62254       eval path="$path"
62255       if test ! -f "$path" && test ! -d "$path"; then
62256         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62257       fi
62258 
62259       if test -d "$path"; then
62260         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62261       else
62262         dir="`$DIRNAME "$path"`"
62263         base="`$BASENAME "$path"`"
62264         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62265       fi
62266     fi
62267   fi
62268 
62269 
62270   # Only process if variable expands to non-empty
62271 
62272   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62274 
62275   # Input might be given as Windows format, start by converting to
62276   # unix format.
62277   path="$POTENTIAL_FREETYPE_LIB_PATH"
62278   new_path=`$CYGPATH -u "$path"`
62279 
62280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62283   # "foo.exe" is OK but "foo" is an error.
62284   #
62285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62286   # It is also a way to make sure we got the proper file name for the real test later on.
62287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62288   if test "x$test_shortpath" = x; then
62289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62290 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62291     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62292   fi
62293 
62294   # Call helper function which possibly converts this using DOS-style short mode.
62295   # If so, the updated path is stored in $new_path.
62296 
62297   input_path="$new_path"
62298   # Check if we need to convert this using DOS-style short mode. If the path
62299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62300   # take no chances and rewrite it.
62301   # Note: m4 eats our [], so we need to use [ and ] instead.
62302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62303   if test "x$has_forbidden_chars" != x; then
62304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62308       # Going to short mode and back again did indeed matter. Since short mode is
62309       # case insensitive, let's make it lowercase to improve readability.
62310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62311       # Now convert it back to Unix-style (cygpath)
62312       input_path=`$CYGPATH -u "$shortmode_path"`
62313       new_path="$input_path"
62314     fi
62315   fi
62316 
62317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62318   if test "x$test_cygdrive_prefix" = x; then
62319     # As a simple fix, exclude /usr/bin since it's not a real path.
62320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62322       # a path prefixed by /cygdrive for fixpath to work.
62323       new_path="$CYGWIN_ROOT_PATH$input_path"
62324     fi
62325   fi
62326 
62327 
62328   if test "x$path" != "x$new_path"; then
62329     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62331 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62332   fi
62333 
62334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62335 
62336   path="$POTENTIAL_FREETYPE_LIB_PATH"
62337   has_colon=`$ECHO $path | $GREP ^.:`
62338   new_path="$path"
62339   if test "x$has_colon" = x; then
62340     # Not in mixed or Windows style, start by that.
62341     new_path=`cmd //c echo $path`
62342   fi
62343 
62344 
62345   input_path="$new_path"
62346   # Check if we need to convert this using DOS-style short mode. If the path
62347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62348   # take no chances and rewrite it.
62349   # Note: m4 eats our [], so we need to use [ and ] instead.
62350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62351   if test "x$has_forbidden_chars" != x; then
62352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62354   fi
62355 
62356 
62357   windows_path="$new_path"
62358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62359     unix_path=`$CYGPATH -u "$windows_path"`
62360     new_path="$unix_path"
62361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62363     new_path="$unix_path"
62364   fi
62365 
62366   if test "x$path" != "x$new_path"; then
62367     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62369 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62370   fi
62371 
62372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62374 
62375     else
62376       # We're on a unix platform. Hooray! :)
62377       path="$POTENTIAL_FREETYPE_LIB_PATH"
62378       has_space=`$ECHO "$path" | $GREP " "`
62379       if test "x$has_space" != x; then
62380         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62381 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62382         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62383       fi
62384 
62385       # Use eval to expand a potential ~
62386       eval path="$path"
62387       if test ! -f "$path" && test ! -d "$path"; then
62388         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62389       fi
62390 
62391       if test -d "$path"; then
62392         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62393       else
62394         dir="`$DIRNAME "$path"`"
62395         base="`$BASENAME "$path"`"
62396         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62397       fi
62398     fi
62399   fi
62400 
62401 
62402     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62403     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62404 $as_echo_n "checking for freetype includes... " >&6; }
62405     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62406 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62407     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62409 $as_echo_n "checking for freetype libraries... " >&6; }
62410     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62411 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62412   fi
62413 
62414           fi
62415 
62416           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62417             if test "x$FOUND_FREETYPE" != xyes; then
62418               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62419               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62420 
62421   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62422   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62423   METHOD="well-known location"
62424 
62425   # Let's start with an optimistic view of the world :-)
62426   FOUND_FREETYPE=yes
62427 
62428   # First look for the canonical freetype main include file ft2build.h.
62429   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62430     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62431     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62432     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62433       # Fail.
62434       FOUND_FREETYPE=no
62435     fi
62436   fi
62437 
62438   if test "x$FOUND_FREETYPE" = xyes; then
62439     # Include file found, let's continue the sanity check.
62440     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62441 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62442 
62443     # Reset to default value
62444     FREETYPE_BASE_NAME=freetype
62445     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62446     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62447       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62448           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62449         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62450         # for the .6 version explicitly.
62451         FREETYPE_BASE_NAME=freetype.6
62452         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62453         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62454 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62455       else
62456         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62457 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62458         FOUND_FREETYPE=no
62459       fi
62460     else
62461       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62462         # On Windows, we will need both .lib and .dll file.
62463         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62464           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62465 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62466           FOUND_FREETYPE=no
62467         fi
62468       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62469           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62470         # Found lib in isa dir, use that instead.
62471         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62472         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62473 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62474       fi
62475     fi
62476   fi
62477 
62478   if test "x$FOUND_FREETYPE" = xyes; then
62479 
62480   # Only process if variable expands to non-empty
62481 
62482   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62483     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62484 
62485   # Input might be given as Windows format, start by converting to
62486   # unix format.
62487   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62488   new_path=`$CYGPATH -u "$path"`
62489 
62490   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62491   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62492   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62493   # "foo.exe" is OK but "foo" is an error.
62494   #
62495   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62496   # It is also a way to make sure we got the proper file name for the real test later on.
62497   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62498   if test "x$test_shortpath" = x; then
62499     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62500 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62501     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62502   fi
62503 
62504   # Call helper function which possibly converts this using DOS-style short mode.
62505   # If so, the updated path is stored in $new_path.
62506 
62507   input_path="$new_path"
62508   # Check if we need to convert this using DOS-style short mode. If the path
62509   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62510   # take no chances and rewrite it.
62511   # Note: m4 eats our [], so we need to use [ and ] instead.
62512   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62513   if test "x$has_forbidden_chars" != x; then
62514     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62515     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62516     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62517     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62518       # Going to short mode and back again did indeed matter. Since short mode is
62519       # case insensitive, let's make it lowercase to improve readability.
62520       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62521       # Now convert it back to Unix-style (cygpath)
62522       input_path=`$CYGPATH -u "$shortmode_path"`
62523       new_path="$input_path"
62524     fi
62525   fi
62526 
62527   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62528   if test "x$test_cygdrive_prefix" = x; then
62529     # As a simple fix, exclude /usr/bin since it's not a real path.
62530     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62531       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62532       # a path prefixed by /cygdrive for fixpath to work.
62533       new_path="$CYGWIN_ROOT_PATH$input_path"
62534     fi
62535   fi
62536 
62537 
62538   if test "x$path" != "x$new_path"; then
62539     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62541 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62542   fi
62543 
62544     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62545 
62546   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62547   has_colon=`$ECHO $path | $GREP ^.:`
62548   new_path="$path"
62549   if test "x$has_colon" = x; then
62550     # Not in mixed or Windows style, start by that.
62551     new_path=`cmd //c echo $path`
62552   fi
62553 
62554 
62555   input_path="$new_path"
62556   # Check if we need to convert this using DOS-style short mode. If the path
62557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62558   # take no chances and rewrite it.
62559   # Note: m4 eats our [], so we need to use [ and ] instead.
62560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62561   if test "x$has_forbidden_chars" != x; then
62562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62563     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62564   fi
62565 
62566 
62567   windows_path="$new_path"
62568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62569     unix_path=`$CYGPATH -u "$windows_path"`
62570     new_path="$unix_path"
62571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62573     new_path="$unix_path"
62574   fi
62575 
62576   if test "x$path" != "x$new_path"; then
62577     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62579 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62580   fi
62581 
62582   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62583   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62584 
62585     else
62586       # We're on a unix platform. Hooray! :)
62587       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62588       has_space=`$ECHO "$path" | $GREP " "`
62589       if test "x$has_space" != x; then
62590         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62591 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62592         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62593       fi
62594 
62595       # Use eval to expand a potential ~
62596       eval path="$path"
62597       if test ! -f "$path" && test ! -d "$path"; then
62598         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62599       fi
62600 
62601       if test -d "$path"; then
62602         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62603       else
62604         dir="`$DIRNAME "$path"`"
62605         base="`$BASENAME "$path"`"
62606         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62607       fi
62608     fi
62609   fi
62610 
62611 
62612   # Only process if variable expands to non-empty
62613 
62614   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62615     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62616 
62617   # Input might be given as Windows format, start by converting to
62618   # unix format.
62619   path="$POTENTIAL_FREETYPE_LIB_PATH"
62620   new_path=`$CYGPATH -u "$path"`
62621 
62622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62625   # "foo.exe" is OK but "foo" is an error.
62626   #
62627   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62628   # It is also a way to make sure we got the proper file name for the real test later on.
62629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62630   if test "x$test_shortpath" = x; then
62631     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62632 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62633     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62634   fi
62635 
62636   # Call helper function which possibly converts this using DOS-style short mode.
62637   # If so, the updated path is stored in $new_path.
62638 
62639   input_path="$new_path"
62640   # Check if we need to convert this using DOS-style short mode. If the path
62641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62642   # take no chances and rewrite it.
62643   # Note: m4 eats our [], so we need to use [ and ] instead.
62644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62645   if test "x$has_forbidden_chars" != x; then
62646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62647     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62648     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62649     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62650       # Going to short mode and back again did indeed matter. Since short mode is
62651       # case insensitive, let's make it lowercase to improve readability.
62652       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62653       # Now convert it back to Unix-style (cygpath)
62654       input_path=`$CYGPATH -u "$shortmode_path"`
62655       new_path="$input_path"
62656     fi
62657   fi
62658 
62659   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62660   if test "x$test_cygdrive_prefix" = x; then
62661     # As a simple fix, exclude /usr/bin since it's not a real path.
62662     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62663       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62664       # a path prefixed by /cygdrive for fixpath to work.
62665       new_path="$CYGWIN_ROOT_PATH$input_path"
62666     fi
62667   fi
62668 
62669 
62670   if test "x$path" != "x$new_path"; then
62671     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62673 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62674   fi
62675 
62676     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62677 
62678   path="$POTENTIAL_FREETYPE_LIB_PATH"
62679   has_colon=`$ECHO $path | $GREP ^.:`
62680   new_path="$path"
62681   if test "x$has_colon" = x; then
62682     # Not in mixed or Windows style, start by that.
62683     new_path=`cmd //c echo $path`
62684   fi
62685 
62686 
62687   input_path="$new_path"
62688   # Check if we need to convert this using DOS-style short mode. If the path
62689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62690   # take no chances and rewrite it.
62691   # Note: m4 eats our [], so we need to use [ and ] instead.
62692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62693   if test "x$has_forbidden_chars" != x; then
62694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62696   fi
62697 
62698 
62699   windows_path="$new_path"
62700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62701     unix_path=`$CYGPATH -u "$windows_path"`
62702     new_path="$unix_path"
62703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62705     new_path="$unix_path"
62706   fi
62707 
62708   if test "x$path" != "x$new_path"; then
62709     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62711 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62712   fi
62713 
62714   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62715   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62716 
62717     else
62718       # We're on a unix platform. Hooray! :)
62719       path="$POTENTIAL_FREETYPE_LIB_PATH"
62720       has_space=`$ECHO "$path" | $GREP " "`
62721       if test "x$has_space" != x; then
62722         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62723 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62724         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62725       fi
62726 
62727       # Use eval to expand a potential ~
62728       eval path="$path"
62729       if test ! -f "$path" && test ! -d "$path"; then
62730         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62731       fi
62732 
62733       if test -d "$path"; then
62734         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62735       else
62736         dir="`$DIRNAME "$path"`"
62737         base="`$BASENAME "$path"`"
62738         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62739       fi
62740     fi
62741   fi
62742 
62743 
62744     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62745     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62746 $as_echo_n "checking for freetype includes... " >&6; }
62747     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62748 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62749     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62751 $as_echo_n "checking for freetype libraries... " >&6; }
62752     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62753 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62754   fi
62755 
62756             fi
62757           fi
62758 
62759           if test "x$FOUND_FREETYPE" != xyes; then
62760             FREETYPE_BASE_DIR="$SYSROOT/usr"
62761             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62762 
62763   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62764   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
62765   METHOD="well-known location"
62766 
62767   # Let's start with an optimistic view of the world :-)
62768   FOUND_FREETYPE=yes
62769 
62770   # First look for the canonical freetype main include file ft2build.h.
62771   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62772     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62773     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62774     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62775       # Fail.
62776       FOUND_FREETYPE=no
62777     fi
62778   fi
62779 
62780   if test "x$FOUND_FREETYPE" = xyes; then
62781     # Include file found, let's continue the sanity check.
62782     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62783 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62784 
62785     # Reset to default value
62786     FREETYPE_BASE_NAME=freetype
62787     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62788     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62789       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62790           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62791         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62792         # for the .6 version explicitly.
62793         FREETYPE_BASE_NAME=freetype.6
62794         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62795         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62796 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62797       else
62798         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62799 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62800         FOUND_FREETYPE=no
62801       fi
62802     else
62803       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62804         # On Windows, we will need both .lib and .dll file.
62805         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62806           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62807 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62808           FOUND_FREETYPE=no
62809         fi
62810       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62811           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62812         # Found lib in isa dir, use that instead.
62813         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62814         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62815 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62816       fi
62817     fi
62818   fi
62819 
62820   if test "x$FOUND_FREETYPE" = xyes; then
62821 
62822   # Only process if variable expands to non-empty
62823 
62824   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62825     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62826 
62827   # Input might be given as Windows format, start by converting to
62828   # unix format.
62829   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62830   new_path=`$CYGPATH -u "$path"`
62831 
62832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62835   # "foo.exe" is OK but "foo" is an error.
62836   #
62837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62838   # It is also a way to make sure we got the proper file name for the real test later on.
62839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62840   if test "x$test_shortpath" = x; then
62841     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62842 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62843     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62844   fi
62845 
62846   # Call helper function which possibly converts this using DOS-style short mode.
62847   # If so, the updated path is stored in $new_path.
62848 
62849   input_path="$new_path"
62850   # Check if we need to convert this using DOS-style short mode. If the path
62851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62852   # take no chances and rewrite it.
62853   # Note: m4 eats our [], so we need to use [ and ] instead.
62854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62855   if test "x$has_forbidden_chars" != x; then
62856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62860       # Going to short mode and back again did indeed matter. Since short mode is
62861       # case insensitive, let's make it lowercase to improve readability.
62862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62863       # Now convert it back to Unix-style (cygpath)
62864       input_path=`$CYGPATH -u "$shortmode_path"`
62865       new_path="$input_path"
62866     fi
62867   fi
62868 
62869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62870   if test "x$test_cygdrive_prefix" = x; then
62871     # As a simple fix, exclude /usr/bin since it's not a real path.
62872     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62874       # a path prefixed by /cygdrive for fixpath to work.
62875       new_path="$CYGWIN_ROOT_PATH$input_path"
62876     fi
62877   fi
62878 
62879 
62880   if test "x$path" != "x$new_path"; then
62881     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62883 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62884   fi
62885 
62886     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62887 
62888   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62889   has_colon=`$ECHO $path | $GREP ^.:`
62890   new_path="$path"
62891   if test "x$has_colon" = x; then
62892     # Not in mixed or Windows style, start by that.
62893     new_path=`cmd //c echo $path`
62894   fi
62895 
62896 
62897   input_path="$new_path"
62898   # Check if we need to convert this using DOS-style short mode. If the path
62899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62900   # take no chances and rewrite it.
62901   # Note: m4 eats our [], so we need to use [ and ] instead.
62902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62903   if test "x$has_forbidden_chars" != x; then
62904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62906   fi
62907 
62908 
62909   windows_path="$new_path"
62910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62911     unix_path=`$CYGPATH -u "$windows_path"`
62912     new_path="$unix_path"
62913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62915     new_path="$unix_path"
62916   fi
62917 
62918   if test "x$path" != "x$new_path"; then
62919     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62920     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62921 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62922   fi
62923 
62924   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62925   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62926 
62927     else
62928       # We're on a unix platform. Hooray! :)
62929       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62930       has_space=`$ECHO "$path" | $GREP " "`
62931       if test "x$has_space" != x; then
62932         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62933 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62934         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62935       fi
62936 
62937       # Use eval to expand a potential ~
62938       eval path="$path"
62939       if test ! -f "$path" && test ! -d "$path"; then
62940         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62941       fi
62942 
62943       if test -d "$path"; then
62944         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62945       else
62946         dir="`$DIRNAME "$path"`"
62947         base="`$BASENAME "$path"`"
62948         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62949       fi
62950     fi
62951   fi
62952 
62953 
62954   # Only process if variable expands to non-empty
62955 
62956   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62957     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62958 
62959   # Input might be given as Windows format, start by converting to
62960   # unix format.
62961   path="$POTENTIAL_FREETYPE_LIB_PATH"
62962   new_path=`$CYGPATH -u "$path"`
62963 
62964   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62965   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62966   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62967   # "foo.exe" is OK but "foo" is an error.
62968   #
62969   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62970   # It is also a way to make sure we got the proper file name for the real test later on.
62971   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62972   if test "x$test_shortpath" = x; then
62973     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62974 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62975     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62976   fi
62977 
62978   # Call helper function which possibly converts this using DOS-style short mode.
62979   # If so, the updated path is stored in $new_path.
62980 
62981   input_path="$new_path"
62982   # Check if we need to convert this using DOS-style short mode. If the path
62983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62984   # take no chances and rewrite it.
62985   # Note: m4 eats our [], so we need to use [ and ] instead.
62986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62987   if test "x$has_forbidden_chars" != x; then
62988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62992       # Going to short mode and back again did indeed matter. Since short mode is
62993       # case insensitive, let's make it lowercase to improve readability.
62994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62995       # Now convert it back to Unix-style (cygpath)
62996       input_path=`$CYGPATH -u "$shortmode_path"`
62997       new_path="$input_path"
62998     fi
62999   fi
63000 
63001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63002   if test "x$test_cygdrive_prefix" = x; then
63003     # As a simple fix, exclude /usr/bin since it's not a real path.
63004     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63006       # a path prefixed by /cygdrive for fixpath to work.
63007       new_path="$CYGWIN_ROOT_PATH$input_path"
63008     fi
63009   fi
63010 
63011 
63012   if test "x$path" != "x$new_path"; then
63013     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63014     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63015 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63016   fi
63017 
63018     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63019 
63020   path="$POTENTIAL_FREETYPE_LIB_PATH"
63021   has_colon=`$ECHO $path | $GREP ^.:`
63022   new_path="$path"
63023   if test "x$has_colon" = x; then
63024     # Not in mixed or Windows style, start by that.
63025     new_path=`cmd //c echo $path`
63026   fi
63027 
63028 
63029   input_path="$new_path"
63030   # Check if we need to convert this using DOS-style short mode. If the path
63031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63032   # take no chances and rewrite it.
63033   # Note: m4 eats our [], so we need to use [ and ] instead.
63034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63035   if test "x$has_forbidden_chars" != x; then
63036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63037     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63038   fi
63039 
63040 
63041   windows_path="$new_path"
63042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63043     unix_path=`$CYGPATH -u "$windows_path"`
63044     new_path="$unix_path"
63045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63047     new_path="$unix_path"
63048   fi
63049 
63050   if test "x$path" != "x$new_path"; then
63051     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63053 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63054   fi
63055 
63056   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63057   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63058 
63059     else
63060       # We're on a unix platform. Hooray! :)
63061       path="$POTENTIAL_FREETYPE_LIB_PATH"
63062       has_space=`$ECHO "$path" | $GREP " "`
63063       if test "x$has_space" != x; then
63064         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63065 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63066         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63067       fi
63068 
63069       # Use eval to expand a potential ~
63070       eval path="$path"
63071       if test ! -f "$path" && test ! -d "$path"; then
63072         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63073       fi
63074 
63075       if test -d "$path"; then
63076         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63077       else
63078         dir="`$DIRNAME "$path"`"
63079         base="`$BASENAME "$path"`"
63080         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63081       fi
63082     fi
63083   fi
63084 
63085 
63086     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63087     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63088 $as_echo_n "checking for freetype includes... " >&6; }
63089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63090 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63091     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63093 $as_echo_n "checking for freetype libraries... " >&6; }
63094     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63095 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63096   fi
63097 
63098             else
63099 
63100   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63101   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
63102   METHOD="well-known location"
63103 
63104   # Let's start with an optimistic view of the world :-)
63105   FOUND_FREETYPE=yes
63106 
63107   # First look for the canonical freetype main include file ft2build.h.
63108   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63109     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63110     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63111     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63112       # Fail.
63113       FOUND_FREETYPE=no
63114     fi
63115   fi
63116 
63117   if test "x$FOUND_FREETYPE" = xyes; then
63118     # Include file found, let's continue the sanity check.
63119     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63120 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63121 
63122     # Reset to default value
63123     FREETYPE_BASE_NAME=freetype
63124     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63125     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63126       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63127           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63128         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63129         # for the .6 version explicitly.
63130         FREETYPE_BASE_NAME=freetype.6
63131         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63132         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63133 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63134       else
63135         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63136 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63137         FOUND_FREETYPE=no
63138       fi
63139     else
63140       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63141         # On Windows, we will need both .lib and .dll file.
63142         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63143           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63144 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63145           FOUND_FREETYPE=no
63146         fi
63147       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63148           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63149         # Found lib in isa dir, use that instead.
63150         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63151         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63152 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63153       fi
63154     fi
63155   fi
63156 
63157   if test "x$FOUND_FREETYPE" = xyes; then
63158 
63159   # Only process if variable expands to non-empty
63160 
63161   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63162     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63163 
63164   # Input might be given as Windows format, start by converting to
63165   # unix format.
63166   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63167   new_path=`$CYGPATH -u "$path"`
63168 
63169   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63170   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63171   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63172   # "foo.exe" is OK but "foo" is an error.
63173   #
63174   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63175   # It is also a way to make sure we got the proper file name for the real test later on.
63176   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63177   if test "x$test_shortpath" = x; then
63178     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63179 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63180     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63181   fi
63182 
63183   # Call helper function which possibly converts this using DOS-style short mode.
63184   # If so, the updated path is stored in $new_path.
63185 
63186   input_path="$new_path"
63187   # Check if we need to convert this using DOS-style short mode. If the path
63188   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63189   # take no chances and rewrite it.
63190   # Note: m4 eats our [], so we need to use [ and ] instead.
63191   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63192   if test "x$has_forbidden_chars" != x; then
63193     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63194     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63195     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63196     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63197       # Going to short mode and back again did indeed matter. Since short mode is
63198       # case insensitive, let's make it lowercase to improve readability.
63199       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63200       # Now convert it back to Unix-style (cygpath)
63201       input_path=`$CYGPATH -u "$shortmode_path"`
63202       new_path="$input_path"
63203     fi
63204   fi
63205 
63206   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63207   if test "x$test_cygdrive_prefix" = x; then
63208     # As a simple fix, exclude /usr/bin since it's not a real path.
63209     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63210       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63211       # a path prefixed by /cygdrive for fixpath to work.
63212       new_path="$CYGWIN_ROOT_PATH$input_path"
63213     fi
63214   fi
63215 
63216 
63217   if test "x$path" != "x$new_path"; then
63218     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63220 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63221   fi
63222 
63223     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63224 
63225   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63226   has_colon=`$ECHO $path | $GREP ^.:`
63227   new_path="$path"
63228   if test "x$has_colon" = x; then
63229     # Not in mixed or Windows style, start by that.
63230     new_path=`cmd //c echo $path`
63231   fi
63232 
63233 
63234   input_path="$new_path"
63235   # Check if we need to convert this using DOS-style short mode. If the path
63236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63237   # take no chances and rewrite it.
63238   # Note: m4 eats our [], so we need to use [ and ] instead.
63239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63240   if test "x$has_forbidden_chars" != x; then
63241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63242     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63243   fi
63244 
63245 
63246   windows_path="$new_path"
63247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63248     unix_path=`$CYGPATH -u "$windows_path"`
63249     new_path="$unix_path"
63250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63252     new_path="$unix_path"
63253   fi
63254 
63255   if test "x$path" != "x$new_path"; then
63256     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63258 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63259   fi
63260 
63261   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63262   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63263 
63264     else
63265       # We're on a unix platform. Hooray! :)
63266       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63267       has_space=`$ECHO "$path" | $GREP " "`
63268       if test "x$has_space" != x; then
63269         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63270 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63271         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63272       fi
63273 
63274       # Use eval to expand a potential ~
63275       eval path="$path"
63276       if test ! -f "$path" && test ! -d "$path"; then
63277         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63278       fi
63279 
63280       if test -d "$path"; then
63281         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63282       else
63283         dir="`$DIRNAME "$path"`"
63284         base="`$BASENAME "$path"`"
63285         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63286       fi
63287     fi
63288   fi
63289 
63290 
63291   # Only process if variable expands to non-empty
63292 
63293   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63294     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63295 
63296   # Input might be given as Windows format, start by converting to
63297   # unix format.
63298   path="$POTENTIAL_FREETYPE_LIB_PATH"
63299   new_path=`$CYGPATH -u "$path"`
63300 
63301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63304   # "foo.exe" is OK but "foo" is an error.
63305   #
63306   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63307   # It is also a way to make sure we got the proper file name for the real test later on.
63308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63309   if test "x$test_shortpath" = x; then
63310     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63311 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63312     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63313   fi
63314 
63315   # Call helper function which possibly converts this using DOS-style short mode.
63316   # If so, the updated path is stored in $new_path.
63317 
63318   input_path="$new_path"
63319   # Check if we need to convert this using DOS-style short mode. If the path
63320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63321   # take no chances and rewrite it.
63322   # Note: m4 eats our [], so we need to use [ and ] instead.
63323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63324   if test "x$has_forbidden_chars" != x; then
63325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63326     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63327     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63328     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63329       # Going to short mode and back again did indeed matter. Since short mode is
63330       # case insensitive, let's make it lowercase to improve readability.
63331       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63332       # Now convert it back to Unix-style (cygpath)
63333       input_path=`$CYGPATH -u "$shortmode_path"`
63334       new_path="$input_path"
63335     fi
63336   fi
63337 
63338   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63339   if test "x$test_cygdrive_prefix" = x; then
63340     # As a simple fix, exclude /usr/bin since it's not a real path.
63341     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63342       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63343       # a path prefixed by /cygdrive for fixpath to work.
63344       new_path="$CYGWIN_ROOT_PATH$input_path"
63345     fi
63346   fi
63347 
63348 
63349   if test "x$path" != "x$new_path"; then
63350     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63351     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63352 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63353   fi
63354 
63355     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63356 
63357   path="$POTENTIAL_FREETYPE_LIB_PATH"
63358   has_colon=`$ECHO $path | $GREP ^.:`
63359   new_path="$path"
63360   if test "x$has_colon" = x; then
63361     # Not in mixed or Windows style, start by that.
63362     new_path=`cmd //c echo $path`
63363   fi
63364 
63365 
63366   input_path="$new_path"
63367   # Check if we need to convert this using DOS-style short mode. If the path
63368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63369   # take no chances and rewrite it.
63370   # Note: m4 eats our [], so we need to use [ and ] instead.
63371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63372   if test "x$has_forbidden_chars" != x; then
63373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63374     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63375   fi
63376 
63377 
63378   windows_path="$new_path"
63379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63380     unix_path=`$CYGPATH -u "$windows_path"`
63381     new_path="$unix_path"
63382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63384     new_path="$unix_path"
63385   fi
63386 
63387   if test "x$path" != "x$new_path"; then
63388     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63390 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63391   fi
63392 
63393   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63394   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63395 
63396     else
63397       # We're on a unix platform. Hooray! :)
63398       path="$POTENTIAL_FREETYPE_LIB_PATH"
63399       has_space=`$ECHO "$path" | $GREP " "`
63400       if test "x$has_space" != x; then
63401         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63402 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63403         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63404       fi
63405 
63406       # Use eval to expand a potential ~
63407       eval path="$path"
63408       if test ! -f "$path" && test ! -d "$path"; then
63409         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63410       fi
63411 
63412       if test -d "$path"; then
63413         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63414       else
63415         dir="`$DIRNAME "$path"`"
63416         base="`$BASENAME "$path"`"
63417         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63418       fi
63419     fi
63420   fi
63421 
63422 
63423     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63425 $as_echo_n "checking for freetype includes... " >&6; }
63426     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63427 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63428     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63429     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63430 $as_echo_n "checking for freetype libraries... " >&6; }
63431     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63432 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63433   fi
63434 
63435               if test "x$FOUND_FREETYPE" != xyes; then
63436 
63437   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63438   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63439   METHOD="well-known location"
63440 
63441   # Let's start with an optimistic view of the world :-)
63442   FOUND_FREETYPE=yes
63443 
63444   # First look for the canonical freetype main include file ft2build.h.
63445   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63446     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63447     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63448     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63449       # Fail.
63450       FOUND_FREETYPE=no
63451     fi
63452   fi
63453 
63454   if test "x$FOUND_FREETYPE" = xyes; then
63455     # Include file found, let's continue the sanity check.
63456     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63457 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63458 
63459     # Reset to default value
63460     FREETYPE_BASE_NAME=freetype
63461     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63462     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63463       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63464           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63465         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63466         # for the .6 version explicitly.
63467         FREETYPE_BASE_NAME=freetype.6
63468         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63469         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63470 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63471       else
63472         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63473 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63474         FOUND_FREETYPE=no
63475       fi
63476     else
63477       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63478         # On Windows, we will need both .lib and .dll file.
63479         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63480           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63481 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63482           FOUND_FREETYPE=no
63483         fi
63484       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63485           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63486         # Found lib in isa dir, use that instead.
63487         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63488         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63489 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63490       fi
63491     fi
63492   fi
63493 
63494   if test "x$FOUND_FREETYPE" = xyes; then
63495 
63496   # Only process if variable expands to non-empty
63497 
63498   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63499     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63500 
63501   # Input might be given as Windows format, start by converting to
63502   # unix format.
63503   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63504   new_path=`$CYGPATH -u "$path"`
63505 
63506   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63507   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63508   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63509   # "foo.exe" is OK but "foo" is an error.
63510   #
63511   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63512   # It is also a way to make sure we got the proper file name for the real test later on.
63513   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63514   if test "x$test_shortpath" = x; then
63515     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63516 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63517     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63518   fi
63519 
63520   # Call helper function which possibly converts this using DOS-style short mode.
63521   # If so, the updated path is stored in $new_path.
63522 
63523   input_path="$new_path"
63524   # Check if we need to convert this using DOS-style short mode. If the path
63525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63526   # take no chances and rewrite it.
63527   # Note: m4 eats our [], so we need to use [ and ] instead.
63528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63529   if test "x$has_forbidden_chars" != x; then
63530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63531     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63532     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63533     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63534       # Going to short mode and back again did indeed matter. Since short mode is
63535       # case insensitive, let's make it lowercase to improve readability.
63536       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63537       # Now convert it back to Unix-style (cygpath)
63538       input_path=`$CYGPATH -u "$shortmode_path"`
63539       new_path="$input_path"
63540     fi
63541   fi
63542 
63543   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63544   if test "x$test_cygdrive_prefix" = x; then
63545     # As a simple fix, exclude /usr/bin since it's not a real path.
63546     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63547       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63548       # a path prefixed by /cygdrive for fixpath to work.
63549       new_path="$CYGWIN_ROOT_PATH$input_path"
63550     fi
63551   fi
63552 
63553 
63554   if test "x$path" != "x$new_path"; then
63555     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63556     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63557 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63558   fi
63559 
63560     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63561 
63562   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63563   has_colon=`$ECHO $path | $GREP ^.:`
63564   new_path="$path"
63565   if test "x$has_colon" = x; then
63566     # Not in mixed or Windows style, start by that.
63567     new_path=`cmd //c echo $path`
63568   fi
63569 
63570 
63571   input_path="$new_path"
63572   # Check if we need to convert this using DOS-style short mode. If the path
63573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63574   # take no chances and rewrite it.
63575   # Note: m4 eats our [], so we need to use [ and ] instead.
63576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63577   if test "x$has_forbidden_chars" != x; then
63578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63580   fi
63581 
63582 
63583   windows_path="$new_path"
63584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63585     unix_path=`$CYGPATH -u "$windows_path"`
63586     new_path="$unix_path"
63587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63589     new_path="$unix_path"
63590   fi
63591 
63592   if test "x$path" != "x$new_path"; then
63593     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63594     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63595 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63596   fi
63597 
63598   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63599   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63600 
63601     else
63602       # We're on a unix platform. Hooray! :)
63603       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63604       has_space=`$ECHO "$path" | $GREP " "`
63605       if test "x$has_space" != x; then
63606         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63607 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63608         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63609       fi
63610 
63611       # Use eval to expand a potential ~
63612       eval path="$path"
63613       if test ! -f "$path" && test ! -d "$path"; then
63614         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63615       fi
63616 
63617       if test -d "$path"; then
63618         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63619       else
63620         dir="`$DIRNAME "$path"`"
63621         base="`$BASENAME "$path"`"
63622         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63623       fi
63624     fi
63625   fi
63626 
63627 
63628   # Only process if variable expands to non-empty
63629 
63630   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63631     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63632 
63633   # Input might be given as Windows format, start by converting to
63634   # unix format.
63635   path="$POTENTIAL_FREETYPE_LIB_PATH"
63636   new_path=`$CYGPATH -u "$path"`
63637 
63638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63641   # "foo.exe" is OK but "foo" is an error.
63642   #
63643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63644   # It is also a way to make sure we got the proper file name for the real test later on.
63645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63646   if test "x$test_shortpath" = x; then
63647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63648 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63649     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63650   fi
63651 
63652   # Call helper function which possibly converts this using DOS-style short mode.
63653   # If so, the updated path is stored in $new_path.
63654 
63655   input_path="$new_path"
63656   # Check if we need to convert this using DOS-style short mode. If the path
63657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63658   # take no chances and rewrite it.
63659   # Note: m4 eats our [], so we need to use [ and ] instead.
63660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63661   if test "x$has_forbidden_chars" != x; then
63662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63666       # Going to short mode and back again did indeed matter. Since short mode is
63667       # case insensitive, let's make it lowercase to improve readability.
63668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63669       # Now convert it back to Unix-style (cygpath)
63670       input_path=`$CYGPATH -u "$shortmode_path"`
63671       new_path="$input_path"
63672     fi
63673   fi
63674 
63675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63676   if test "x$test_cygdrive_prefix" = x; then
63677     # As a simple fix, exclude /usr/bin since it's not a real path.
63678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63680       # a path prefixed by /cygdrive for fixpath to work.
63681       new_path="$CYGWIN_ROOT_PATH$input_path"
63682     fi
63683   fi
63684 
63685 
63686   if test "x$path" != "x$new_path"; then
63687     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63689 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63690   fi
63691 
63692     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63693 
63694   path="$POTENTIAL_FREETYPE_LIB_PATH"
63695   has_colon=`$ECHO $path | $GREP ^.:`
63696   new_path="$path"
63697   if test "x$has_colon" = x; then
63698     # Not in mixed or Windows style, start by that.
63699     new_path=`cmd //c echo $path`
63700   fi
63701 
63702 
63703   input_path="$new_path"
63704   # Check if we need to convert this using DOS-style short mode. If the path
63705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63706   # take no chances and rewrite it.
63707   # Note: m4 eats our [], so we need to use [ and ] instead.
63708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63709   if test "x$has_forbidden_chars" != x; then
63710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63712   fi
63713 
63714 
63715   windows_path="$new_path"
63716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63717     unix_path=`$CYGPATH -u "$windows_path"`
63718     new_path="$unix_path"
63719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63721     new_path="$unix_path"
63722   fi
63723 
63724   if test "x$path" != "x$new_path"; then
63725     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63727 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63728   fi
63729 
63730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63732 
63733     else
63734       # We're on a unix platform. Hooray! :)
63735       path="$POTENTIAL_FREETYPE_LIB_PATH"
63736       has_space=`$ECHO "$path" | $GREP " "`
63737       if test "x$has_space" != x; then
63738         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63739 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63740         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63741       fi
63742 
63743       # Use eval to expand a potential ~
63744       eval path="$path"
63745       if test ! -f "$path" && test ! -d "$path"; then
63746         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63747       fi
63748 
63749       if test -d "$path"; then
63750         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63751       else
63752         dir="`$DIRNAME "$path"`"
63753         base="`$BASENAME "$path"`"
63754         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63755       fi
63756     fi
63757   fi
63758 
63759 
63760     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63762 $as_echo_n "checking for freetype includes... " >&6; }
63763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63764 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63765     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63766     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63767 $as_echo_n "checking for freetype libraries... " >&6; }
63768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63769 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63770   fi
63771 
63772               fi
63773             fi
63774           fi
63775         fi
63776       fi # end check in well-known locations
63777 
63778       if test "x$FOUND_FREETYPE" != xyes; then
63779 
63780   # Print a helpful message on how to acquire the necessary build dependency.
63781   # freetype is the help tag: freetype, cups, alsa etc
63782   MISSING_DEPENDENCY=freetype
63783 
63784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63785     cygwin_help $MISSING_DEPENDENCY
63786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63787     msys_help $MISSING_DEPENDENCY
63788   else
63789     PKGHANDLER_COMMAND=
63790 
63791     case $PKGHANDLER in
63792       apt-get)
63793         apt_help     $MISSING_DEPENDENCY ;;
63794       yum)
63795         yum_help     $MISSING_DEPENDENCY ;;
63796       brew)
63797         brew_help    $MISSING_DEPENDENCY ;;
63798       port)
63799         port_help    $MISSING_DEPENDENCY ;;
63800       pkgutil)
63801         pkgutil_help $MISSING_DEPENDENCY ;;
63802       pkgadd)
63803         pkgadd_help  $MISSING_DEPENDENCY ;;
63804     esac
63805 
63806     if test "x$PKGHANDLER_COMMAND" != x; then
63807       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63808     fi
63809   fi
63810 
63811         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63812       fi
63813     fi # end user specified settings
63814 
63815     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63816     if test "x$FREETYPE_CFLAGS" = x; then
63817 
63818   # Only process if variable expands to non-empty
63819 
63820   if test "x$FREETYPE_INCLUDE_PATH" != x; then
63821     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63822 
63823   # Input might be given as Windows format, start by converting to
63824   # unix format.
63825   path="$FREETYPE_INCLUDE_PATH"
63826   new_path=`$CYGPATH -u "$path"`
63827 
63828   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63829   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63830   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63831   # "foo.exe" is OK but "foo" is an error.
63832   #
63833   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63834   # It is also a way to make sure we got the proper file name for the real test later on.
63835   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63836   if test "x$test_shortpath" = x; then
63837     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63838 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63839     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63840   fi
63841 
63842   # Call helper function which possibly converts this using DOS-style short mode.
63843   # If so, the updated path is stored in $new_path.
63844 
63845   input_path="$new_path"
63846   # Check if we need to convert this using DOS-style short mode. If the path
63847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63848   # take no chances and rewrite it.
63849   # Note: m4 eats our [], so we need to use [ and ] instead.
63850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63851   if test "x$has_forbidden_chars" != x; then
63852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63853     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63854     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63855     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63856       # Going to short mode and back again did indeed matter. Since short mode is
63857       # case insensitive, let's make it lowercase to improve readability.
63858       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63859       # Now convert it back to Unix-style (cygpath)
63860       input_path=`$CYGPATH -u "$shortmode_path"`
63861       new_path="$input_path"
63862     fi
63863   fi
63864 
63865   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63866   if test "x$test_cygdrive_prefix" = x; then
63867     # As a simple fix, exclude /usr/bin since it's not a real path.
63868     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63869       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63870       # a path prefixed by /cygdrive for fixpath to work.
63871       new_path="$CYGWIN_ROOT_PATH$input_path"
63872     fi
63873   fi
63874 
63875 
63876   if test "x$path" != "x$new_path"; then
63877     FREETYPE_INCLUDE_PATH="$new_path"
63878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63879 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63880   fi
63881 
63882     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63883 
63884   path="$FREETYPE_INCLUDE_PATH"
63885   has_colon=`$ECHO $path | $GREP ^.:`
63886   new_path="$path"
63887   if test "x$has_colon" = x; then
63888     # Not in mixed or Windows style, start by that.
63889     new_path=`cmd //c echo $path`
63890   fi
63891 
63892 
63893   input_path="$new_path"
63894   # Check if we need to convert this using DOS-style short mode. If the path
63895   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63896   # take no chances and rewrite it.
63897   # Note: m4 eats our [], so we need to use [ and ] instead.
63898   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63899   if test "x$has_forbidden_chars" != x; then
63900     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63901     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63902   fi
63903 
63904 
63905   windows_path="$new_path"
63906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63907     unix_path=`$CYGPATH -u "$windows_path"`
63908     new_path="$unix_path"
63909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63910     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63911     new_path="$unix_path"
63912   fi
63913 
63914   if test "x$path" != "x$new_path"; then
63915     FREETYPE_INCLUDE_PATH="$new_path"
63916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63917 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63918   fi
63919 
63920   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63921   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63922 
63923     else
63924       # We're on a unix platform. Hooray! :)
63925       path="$FREETYPE_INCLUDE_PATH"
63926       has_space=`$ECHO "$path" | $GREP " "`
63927       if test "x$has_space" != x; then
63928         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63929 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63930         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63931       fi
63932 
63933       # Use eval to expand a potential ~
63934       eval path="$path"
63935       if test ! -f "$path" && test ! -d "$path"; then
63936         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63937       fi
63938 
63939       if test -d "$path"; then
63940         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63941       else
63942         dir="`$DIRNAME "$path"`"
63943         base="`$BASENAME "$path"`"
63944         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63945       fi
63946     fi
63947   fi
63948 
63949       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63950         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63951       else
63952         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63953       fi
63954     fi
63955 
63956     if test "x$FREETYPE_LIBS" = x; then
63957 
63958   # Only process if variable expands to non-empty
63959 
63960   if test "x$FREETYPE_LIB_PATH" != x; then
63961     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63962 
63963   # Input might be given as Windows format, start by converting to
63964   # unix format.
63965   path="$FREETYPE_LIB_PATH"
63966   new_path=`$CYGPATH -u "$path"`
63967 
63968   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63969   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63970   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63971   # "foo.exe" is OK but "foo" is an error.
63972   #
63973   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63974   # It is also a way to make sure we got the proper file name for the real test later on.
63975   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63976   if test "x$test_shortpath" = x; then
63977     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63978 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63979     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63980   fi
63981 
63982   # Call helper function which possibly converts this using DOS-style short mode.
63983   # If so, the updated path is stored in $new_path.
63984 
63985   input_path="$new_path"
63986   # Check if we need to convert this using DOS-style short mode. If the path
63987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63988   # take no chances and rewrite it.
63989   # Note: m4 eats our [], so we need to use [ and ] instead.
63990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63991   if test "x$has_forbidden_chars" != x; then
63992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63993     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63994     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63995     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63996       # Going to short mode and back again did indeed matter. Since short mode is
63997       # case insensitive, let's make it lowercase to improve readability.
63998       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63999       # Now convert it back to Unix-style (cygpath)
64000       input_path=`$CYGPATH -u "$shortmode_path"`
64001       new_path="$input_path"
64002     fi
64003   fi
64004 
64005   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64006   if test "x$test_cygdrive_prefix" = x; then
64007     # As a simple fix, exclude /usr/bin since it's not a real path.
64008     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64009       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64010       # a path prefixed by /cygdrive for fixpath to work.
64011       new_path="$CYGWIN_ROOT_PATH$input_path"
64012     fi
64013   fi
64014 
64015 
64016   if test "x$path" != "x$new_path"; then
64017     FREETYPE_LIB_PATH="$new_path"
64018     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64019 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64020   fi
64021 
64022     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64023 
64024   path="$FREETYPE_LIB_PATH"
64025   has_colon=`$ECHO $path | $GREP ^.:`
64026   new_path="$path"
64027   if test "x$has_colon" = x; then
64028     # Not in mixed or Windows style, start by that.
64029     new_path=`cmd //c echo $path`
64030   fi
64031 
64032 
64033   input_path="$new_path"
64034   # Check if we need to convert this using DOS-style short mode. If the path
64035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64036   # take no chances and rewrite it.
64037   # Note: m4 eats our [], so we need to use [ and ] instead.
64038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64039   if test "x$has_forbidden_chars" != x; then
64040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64041     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64042   fi
64043 
64044 
64045   windows_path="$new_path"
64046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64047     unix_path=`$CYGPATH -u "$windows_path"`
64048     new_path="$unix_path"
64049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64051     new_path="$unix_path"
64052   fi
64053 
64054   if test "x$path" != "x$new_path"; then
64055     FREETYPE_LIB_PATH="$new_path"
64056     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
64057 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64058   fi
64059 
64060   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64061   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64062 
64063     else
64064       # We're on a unix platform. Hooray! :)
64065       path="$FREETYPE_LIB_PATH"
64066       has_space=`$ECHO "$path" | $GREP " "`
64067       if test "x$has_space" != x; then
64068         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64069 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64070         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64071       fi
64072 
64073       # Use eval to expand a potential ~
64074       eval path="$path"
64075       if test ! -f "$path" && test ! -d "$path"; then
64076         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64077       fi
64078 
64079       if test -d "$path"; then
64080         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64081       else
64082         dir="`$DIRNAME "$path"`"
64083         base="`$BASENAME "$path"`"
64084         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64085       fi
64086     fi
64087   fi
64088 
64089       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64090         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
64091       else
64092         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
64093       fi
64094     fi
64095 
64096     # Try to compile it
64097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
64098 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
64099     ac_ext=cpp
64100 ac_cpp='$CXXCPP $CPPFLAGS'
64101 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64102 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64103 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64104 
64105     PREV_CXXCFLAGS="$CXXFLAGS"
64106     PREV_LIBS="$LIBS"
64107     PREV_CXX="$CXX"
64108     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
64109     LIBS="$LIBS $FREETYPE_LIBS"
64110     CXX="$FIXPATH $CXX"
64111     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64112 /* end confdefs.h.  */
64113 
64114           #include<ft2build.h>
64115           #include FT_FREETYPE_H
64116           int main () {
64117             FT_Init_FreeType(NULL);
64118             return 0;
64119           }
64120 
64121 _ACEOF
64122 if ac_fn_cxx_try_link "$LINENO"; then :
64123 
64124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64125 $as_echo "yes" >&6; }
64126 
64127 else
64128 
64129           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64130 $as_echo "no" >&6; }
64131           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
64132 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
64133           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
64134 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
64135 
64136 
64137   # Print a helpful message on how to acquire the necessary build dependency.
64138   # freetype is the help tag: freetype, cups, alsa etc
64139   MISSING_DEPENDENCY=freetype
64140 
64141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64142     cygwin_help $MISSING_DEPENDENCY
64143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64144     msys_help $MISSING_DEPENDENCY
64145   else
64146     PKGHANDLER_COMMAND=
64147 
64148     case $PKGHANDLER in
64149       apt-get)
64150         apt_help     $MISSING_DEPENDENCY ;;
64151       yum)
64152         yum_help     $MISSING_DEPENDENCY ;;
64153       brew)
64154         brew_help    $MISSING_DEPENDENCY ;;
64155       port)
64156         port_help    $MISSING_DEPENDENCY ;;
64157       pkgutil)
64158         pkgutil_help $MISSING_DEPENDENCY ;;
64159       pkgadd)
64160         pkgadd_help  $MISSING_DEPENDENCY ;;
64161     esac
64162 
64163     if test "x$PKGHANDLER_COMMAND" != x; then
64164       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64165     fi
64166   fi
64167 
64168 
64169           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64170 
64171 
64172 fi
64173 rm -f core conftest.err conftest.$ac_objext \
64174     conftest$ac_exeext conftest.$ac_ext
64175     CXXCFLAGS="$PREV_CXXFLAGS"
64176     LIBS="$PREV_LIBS"
64177     CXX="$PREV_CXX"
64178     ac_ext=cpp
64179 ac_cpp='$CXXCPP $CPPFLAGS'
64180 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64181 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64182 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64183 
64184 
64185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64186 $as_echo_n "checking if we should bundle freetype... " >&6; }
64187     if test "x$BUNDLE_FREETYPE" = xyes; then
64188       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64189     fi
64190     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64191 $as_echo "$BUNDLE_FREETYPE" >&6; }
64192 
64193   fi # end freetype needed
64194 
64195   FREETYPE_LICENSE=""
64196   if test "x$with_freetype_license" = "xyes"; then
64197     as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64198   elif test "x$with_freetype_license" != "x"; then
64199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64200 $as_echo_n "checking for freetype license... " >&6; }
64201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64202 $as_echo "$with_freetype_license" >&6; }
64203     FREETYPE_LICENSE="$with_freetype_license"
64204 
64205   # Only process if variable expands to non-empty
64206 
64207   if test "x$FREETYPE_LICENSE" != x; then
64208     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64209 
64210   # Input might be given as Windows format, start by converting to
64211   # unix format.
64212   path="$FREETYPE_LICENSE"
64213   new_path=`$CYGPATH -u "$path"`
64214 
64215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64218   # "foo.exe" is OK but "foo" is an error.
64219   #
64220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64221   # It is also a way to make sure we got the proper file name for the real test later on.
64222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64223   if test "x$test_shortpath" = x; then
64224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64225 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64226     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64227   fi
64228 
64229   # Call helper function which possibly converts this using DOS-style short mode.
64230   # If so, the updated path is stored in $new_path.
64231 
64232   input_path="$new_path"
64233   # Check if we need to convert this using DOS-style short mode. If the path
64234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64235   # take no chances and rewrite it.
64236   # Note: m4 eats our [], so we need to use [ and ] instead.
64237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64238   if test "x$has_forbidden_chars" != x; then
64239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64243       # Going to short mode and back again did indeed matter. Since short mode is
64244       # case insensitive, let's make it lowercase to improve readability.
64245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64246       # Now convert it back to Unix-style (cygpath)
64247       input_path=`$CYGPATH -u "$shortmode_path"`
64248       new_path="$input_path"
64249     fi
64250   fi
64251 
64252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64253   if test "x$test_cygdrive_prefix" = x; then
64254     # As a simple fix, exclude /usr/bin since it's not a real path.
64255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64257       # a path prefixed by /cygdrive for fixpath to work.
64258       new_path="$CYGWIN_ROOT_PATH$input_path"
64259     fi
64260   fi
64261 
64262 
64263   if test "x$path" != "x$new_path"; then
64264     FREETYPE_LICENSE="$new_path"
64265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64266 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64267   fi
64268 
64269     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64270 
64271   path="$FREETYPE_LICENSE"
64272   has_colon=`$ECHO $path | $GREP ^.:`
64273   new_path="$path"
64274   if test "x$has_colon" = x; then
64275     # Not in mixed or Windows style, start by that.
64276     new_path=`cmd //c echo $path`
64277   fi
64278 
64279 
64280   input_path="$new_path"
64281   # Check if we need to convert this using DOS-style short mode. If the path
64282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64283   # take no chances and rewrite it.
64284   # Note: m4 eats our [], so we need to use [ and ] instead.
64285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64286   if test "x$has_forbidden_chars" != x; then
64287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64289   fi
64290 
64291 
64292   windows_path="$new_path"
64293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64294     unix_path=`$CYGPATH -u "$windows_path"`
64295     new_path="$unix_path"
64296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64298     new_path="$unix_path"
64299   fi
64300 
64301   if test "x$path" != "x$new_path"; then
64302     FREETYPE_LICENSE="$new_path"
64303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64304 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64305   fi
64306 
64307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64309 
64310     else
64311       # We're on a unix platform. Hooray! :)
64312       path="$FREETYPE_LICENSE"
64313       has_space=`$ECHO "$path" | $GREP " "`
64314       if test "x$has_space" != x; then
64315         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64316 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64317         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64318       fi
64319 
64320       # Use eval to expand a potential ~
64321       eval path="$path"
64322       if test ! -f "$path" && test ! -d "$path"; then
64323         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64324       fi
64325 
64326       if test -d "$path"; then
64327         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64328       else
64329         dir="`$DIRNAME "$path"`"
64330         base="`$BASENAME "$path"`"
64331         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64332       fi
64333     fi
64334   fi
64335 
64336     if test ! -f "$FREETYPE_LICENSE"; then
64337       as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64338     fi
64339   fi
64340 
64341 
64342 
64343 
64344 
64345 
64346 
64347 
64348 # Check whether --with-alsa was given.
64349 if test "${with_alsa+set}" = set; then :
64350   withval=$with_alsa;
64351 fi
64352 
64353 
64354 # Check whether --with-alsa-include was given.
64355 if test "${with_alsa_include+set}" = set; then :
64356   withval=$with_alsa_include;
64357 fi
64358 
64359 
64360 # Check whether --with-alsa-lib was given.
64361 if test "${with_alsa_lib+set}" = set; then :
64362   withval=$with_alsa_lib;
64363 fi
64364 
64365 
64366   if test "x$NEEDS_LIB_ALSA" = xfalse; then
64367     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64368         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64369         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64370       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64371 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64372     fi
64373     ALSA_CFLAGS=
64374     ALSA_LIBS=
64375   else
64376     ALSA_FOUND=no
64377 
64378     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64379       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64380     fi
64381 
64382     if test "x${with_alsa}" != x; then
64383       ALSA_LIBS="-L${with_alsa}/lib -lasound"
64384       ALSA_CFLAGS="-I${with_alsa}/include"
64385       ALSA_FOUND=yes
64386     fi
64387     if test "x${with_alsa_include}" != x; then
64388       ALSA_CFLAGS="-I${with_alsa_include}"
64389       ALSA_FOUND=yes
64390     fi
64391     if test "x${with_alsa_lib}" != x; then
64392       ALSA_LIBS="-L${with_alsa_lib} -lasound"
64393       ALSA_FOUND=yes
64394     fi
64395     # Do not try pkg-config if we have a sysroot set.
64396     if test "x$SYSROOT" = x; then
64397       if test "x$ALSA_FOUND" = xno; then
64398 
64399 pkg_failed=no
64400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64401 $as_echo_n "checking for ALSA... " >&6; }
64402 
64403 if test -n "$ALSA_CFLAGS"; then
64404     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64405  elif test -n "$PKG_CONFIG"; then
64406     if test -n "$PKG_CONFIG" && \
64407     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64408   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64409   ac_status=$?
64410   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64411   test $ac_status = 0; }; then
64412   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64413 else
64414   pkg_failed=yes
64415 fi
64416  else
64417     pkg_failed=untried
64418 fi
64419 if test -n "$ALSA_LIBS"; then
64420     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64421  elif test -n "$PKG_CONFIG"; then
64422     if test -n "$PKG_CONFIG" && \
64423     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64424   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64425   ac_status=$?
64426   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64427   test $ac_status = 0; }; then
64428   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64429 else
64430   pkg_failed=yes
64431 fi
64432  else
64433     pkg_failed=untried
64434 fi
64435 
64436 
64437 
64438 if test $pkg_failed = yes; then
64439 
64440 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64441         _pkg_short_errors_supported=yes
64442 else
64443         _pkg_short_errors_supported=no
64444 fi
64445         if test $_pkg_short_errors_supported = yes; then
64446                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64447         else
64448                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64449         fi
64450         # Put the nasty error message in config.log where it belongs
64451         echo "$ALSA_PKG_ERRORS" >&5
64452 
64453         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64454 $as_echo "no" >&6; }
64455                 ALSA_FOUND=no
64456 elif test $pkg_failed = untried; then
64457         ALSA_FOUND=no
64458 else
64459         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64460         ALSA_LIBS=$pkg_cv_ALSA_LIBS
64461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64462 $as_echo "yes" >&6; }
64463         ALSA_FOUND=yes
64464 fi
64465       fi
64466     fi
64467     if test "x$ALSA_FOUND" = xno; then
64468       for ac_header in alsa/asoundlib.h
64469 do :
64470   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64471 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64472   cat >>confdefs.h <<_ACEOF
64473 #define HAVE_ALSA_ASOUNDLIB_H 1
64474 _ACEOF
64475 
64476             ALSA_FOUND=yes
64477             ALSA_CFLAGS=-Iignoreme
64478             ALSA_LIBS=-lasound
64479             DEFAULT_ALSA=yes
64480 
64481 else
64482   ALSA_FOUND=no
64483 
64484 fi
64485 
64486 done
64487 
64488     fi
64489     if test "x$ALSA_FOUND" = xno; then
64490 
64491   # Print a helpful message on how to acquire the necessary build dependency.
64492   # alsa is the help tag: freetype, cups, alsa etc
64493   MISSING_DEPENDENCY=alsa
64494 
64495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64496     cygwin_help $MISSING_DEPENDENCY
64497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64498     msys_help $MISSING_DEPENDENCY
64499   else
64500     PKGHANDLER_COMMAND=
64501 
64502     case $PKGHANDLER in
64503       apt-get)
64504         apt_help     $MISSING_DEPENDENCY ;;
64505       yum)
64506         yum_help     $MISSING_DEPENDENCY ;;
64507       brew)
64508         brew_help    $MISSING_DEPENDENCY ;;
64509       port)
64510         port_help    $MISSING_DEPENDENCY ;;
64511       pkgutil)
64512         pkgutil_help $MISSING_DEPENDENCY ;;
64513       pkgadd)
64514         pkgadd_help  $MISSING_DEPENDENCY ;;
64515     esac
64516 
64517     if test "x$PKGHANDLER_COMMAND" != x; then
64518       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64519     fi
64520   fi
64521 
64522       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64523     fi
64524   fi
64525 
64526 
64527 
64528 
64529 
64530 
64531 # Check whether --with-libffi was given.
64532 if test "${with_libffi+set}" = set; then :
64533   withval=$with_libffi;
64534 fi
64535 
64536 
64537 # Check whether --with-libffi-include was given.
64538 if test "${with_libffi_include+set}" = set; then :
64539   withval=$with_libffi_include;
64540 fi
64541 
64542 
64543 # Check whether --with-libffi-lib was given.
64544 if test "${with_libffi_lib+set}" = set; then :
64545   withval=$with_libffi_lib;
64546 fi
64547 
64548   # Check whether --enable-libffi-bundling was given.
64549 if test "${enable_libffi_bundling+set}" = set; then :
64550   enableval=$enable_libffi_bundling;
64551 fi
64552 
64553 
64554   if test "x$NEEDS_LIB_FFI" = xfalse; then
64555     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64556         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64557         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64558       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64559 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64560     fi
64561     LIBFFI_CFLAGS=
64562     LIBFFI_LIBS=
64563   else
64564     LIBFFI_FOUND=no
64565 
64566     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64567       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64568     fi
64569 
64570     if test "x${with_libffi}" != x; then
64571       LIBFFI_LIB_PATH="${with_libffi}/lib"
64572       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64573       LIBFFI_CFLAGS="-I${with_libffi}/include"
64574       LIBFFI_FOUND=yes
64575     fi
64576     if test "x${with_libffi_include}" != x; then
64577       LIBFFI_CFLAGS="-I${with_libffi_include}"
64578       LIBFFI_FOUND=yes
64579     fi
64580     if test "x${with_libffi_lib}" != x; then
64581       LIBFFI_LIB_PATH="${with_libffi_lib}"
64582       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64583       LIBFFI_FOUND=yes
64584     fi
64585     # Do not try pkg-config if we have a sysroot set.
64586     if test "x$SYSROOT" = x; then
64587       if test "x$LIBFFI_FOUND" = xno; then
64588         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64589 
64590 pkg_failed=no
64591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64592 $as_echo_n "checking for LIBFFI... " >&6; }
64593 
64594 if test -n "$LIBFFI_CFLAGS"; then
64595     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64596  elif test -n "$PKG_CONFIG"; then
64597     if test -n "$PKG_CONFIG" && \
64598     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64599   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64600   ac_status=$?
64601   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64602   test $ac_status = 0; }; then
64603   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64604 else
64605   pkg_failed=yes
64606 fi
64607  else
64608     pkg_failed=untried
64609 fi
64610 if test -n "$LIBFFI_LIBS"; then
64611     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64612  elif test -n "$PKG_CONFIG"; then
64613     if test -n "$PKG_CONFIG" && \
64614     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64615   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64616   ac_status=$?
64617   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64618   test $ac_status = 0; }; then
64619   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64620 else
64621   pkg_failed=yes
64622 fi
64623  else
64624     pkg_failed=untried
64625 fi
64626 
64627 
64628 
64629 if test $pkg_failed = yes; then
64630 
64631 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64632         _pkg_short_errors_supported=yes
64633 else
64634         _pkg_short_errors_supported=no
64635 fi
64636         if test $_pkg_short_errors_supported = yes; then
64637                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64638         else
64639                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64640         fi
64641         # Put the nasty error message in config.log where it belongs
64642         echo "$LIBFFI_PKG_ERRORS" >&5
64643 
64644         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64645 $as_echo "no" >&6; }
64646                 LIBFFI_FOUND=no
64647 elif test $pkg_failed = untried; then
64648         LIBFFI_FOUND=no
64649 else
64650         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64651         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64652         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64653 $as_echo "yes" >&6; }
64654         LIBFFI_FOUND=yes
64655 fi
64656       fi
64657     fi
64658     if test "x$LIBFFI_FOUND" = xno; then
64659       for ac_header in ffi.h
64660 do :
64661   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64662 if test "x$ac_cv_header_ffi_h" = xyes; then :
64663   cat >>confdefs.h <<_ACEOF
64664 #define HAVE_FFI_H 1
64665 _ACEOF
64666 
64667             LIBFFI_FOUND=yes
64668             LIBFFI_CFLAGS=
64669             LIBFFI_LIBS=-lffi
64670 
64671 else
64672   LIBFFI_FOUND=no
64673 
64674 fi
64675 
64676 done
64677 
64678     fi
64679     if test "x$LIBFFI_FOUND" = xno; then
64680 
64681   # Print a helpful message on how to acquire the necessary build dependency.
64682   # ffi is the help tag: freetype, cups, alsa etc
64683   MISSING_DEPENDENCY=ffi
64684 
64685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64686     cygwin_help $MISSING_DEPENDENCY
64687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64688     msys_help $MISSING_DEPENDENCY
64689   else
64690     PKGHANDLER_COMMAND=
64691 
64692     case $PKGHANDLER in
64693       apt-get)
64694         apt_help     $MISSING_DEPENDENCY ;;
64695       yum)
64696         yum_help     $MISSING_DEPENDENCY ;;
64697       brew)
64698         brew_help    $MISSING_DEPENDENCY ;;
64699       port)
64700         port_help    $MISSING_DEPENDENCY ;;
64701       pkgutil)
64702         pkgutil_help $MISSING_DEPENDENCY ;;
64703       pkgadd)
64704         pkgadd_help  $MISSING_DEPENDENCY ;;
64705     esac
64706 
64707     if test "x$PKGHANDLER_COMMAND" != x; then
64708       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64709     fi
64710   fi
64711 
64712       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64713     fi
64714 
64715     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64716 $as_echo_n "checking if libffi works... " >&6; }
64717     ac_ext=c
64718 ac_cpp='$CPP $CPPFLAGS'
64719 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64720 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64721 ac_compiler_gnu=$ac_cv_c_compiler_gnu
64722 
64723     OLD_CFLAGS="$CFLAGS"
64724     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64725     OLD_LIBS="$LIBS"
64726     LIBS="$LIBS $LIBFFI_LIBS"
64727     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64728 /* end confdefs.h.  */
64729 #include <ffi.h>
64730 int
64731 main ()
64732 {
64733 
64734           ffi_call(NULL, NULL, NULL, NULL);
64735           return 0;
64736 
64737   ;
64738   return 0;
64739 }
64740 _ACEOF
64741 if ac_fn_c_try_link "$LINENO"; then :
64742   LIBFFI_WORKS=yes
64743 else
64744   LIBFFI_WORKS=no
64745 
64746 fi
64747 rm -f core conftest.err conftest.$ac_objext \
64748     conftest$ac_exeext conftest.$ac_ext
64749     CFLAGS="$OLD_CFLAGS"
64750     LIBS="$OLD_LIBS"
64751     ac_ext=cpp
64752 ac_cpp='$CXXCPP $CPPFLAGS'
64753 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64754 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64755 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64756 
64757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64758 $as_echo "$LIBFFI_WORKS" >&6; }
64759 
64760     if test "x$LIBFFI_WORKS" = xno; then
64761 
64762   # Print a helpful message on how to acquire the necessary build dependency.
64763   # ffi is the help tag: freetype, cups, alsa etc
64764   MISSING_DEPENDENCY=ffi
64765 
64766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64767     cygwin_help $MISSING_DEPENDENCY
64768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64769     msys_help $MISSING_DEPENDENCY
64770   else
64771     PKGHANDLER_COMMAND=
64772 
64773     case $PKGHANDLER in
64774       apt-get)
64775         apt_help     $MISSING_DEPENDENCY ;;
64776       yum)
64777         yum_help     $MISSING_DEPENDENCY ;;
64778       brew)
64779         brew_help    $MISSING_DEPENDENCY ;;
64780       port)
64781         port_help    $MISSING_DEPENDENCY ;;
64782       pkgutil)
64783         pkgutil_help $MISSING_DEPENDENCY ;;
64784       pkgadd)
64785         pkgadd_help  $MISSING_DEPENDENCY ;;
64786     esac
64787 
64788     if test "x$PKGHANDLER_COMMAND" != x; then
64789       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64790     fi
64791   fi
64792 
64793       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64794     fi
64795 
64796     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64797 $as_echo_n "checking if libffi should be bundled... " >&6; }
64798     if test "x$enable_libffi_bundling" = "x"; then
64799       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64800 $as_echo "no" >&6; }
64801       ENABLE_LIBFFI_BUNDLING=false
64802     elif  test "x$enable_libffi_bundling" = "xno"; then
64803       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64804 $as_echo "no, forced" >&6; }
64805       ENABLE_LIBFFI_BUNDLING=false
64806     elif  test "x$enable_libffi_bundling" = "xyes"; then
64807       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64808 $as_echo "yes, forced" >&6; }
64809       ENABLE_LIBFFI_BUNDLING=true
64810     else
64811       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64812     fi
64813 
64814     # Find the libffi.so.X to bundle
64815     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64816       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64817 $as_echo_n "checking for libffi lib file location... " >&6; }
64818       if test "x${LIBFFI_LIB_PATH}" != x; then
64819         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64820           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64821         else
64822           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64823         fi
64824       else
64825         # If we don't have an explicit path, look in a few obvious places
64826         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64827           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64828             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64829           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64830             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64831           else
64832             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64833           fi
64834         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64835           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64836             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64837           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64838             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64839           else
64840             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64841           fi
64842         else
64843           # Fallback on the default /usr/lib dir
64844           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64845             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64846           else
64847             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64848           fi
64849         fi
64850       fi
64851       # Make sure the wildcard is evaluated
64852       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64853       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64854 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
64855     fi
64856   fi
64857 
64858 
64859 
64860 
64861 
64862 
64863 
64864   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64865     # Extract the first word of "llvm-config", so it can be a program name with args.
64866 set dummy llvm-config; ac_word=$2
64867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64868 $as_echo_n "checking for $ac_word... " >&6; }
64869 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64870   $as_echo_n "(cached) " >&6
64871 else
64872   if test -n "$LLVM_CONFIG"; then
64873   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64874 else
64875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64876 for as_dir in $PATH
64877 do
64878   IFS=$as_save_IFS
64879   test -z "$as_dir" && as_dir=.
64880     for ac_exec_ext in '' $ac_executable_extensions; do
64881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64882     ac_cv_prog_LLVM_CONFIG="llvm-config"
64883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64884     break 2
64885   fi
64886 done
64887   done
64888 IFS=$as_save_IFS
64889 
64890 fi
64891 fi
64892 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64893 if test -n "$LLVM_CONFIG"; then
64894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64895 $as_echo "$LLVM_CONFIG" >&6; }
64896 else
64897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64898 $as_echo "no" >&6; }
64899 fi
64900 
64901 
64902 
64903     if test "x$LLVM_CONFIG" != xllvm-config; then
64904       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64905     fi
64906 
64907     llvm_components="jit mcjit engine nativecodegen native"
64908     unset LLVM_CFLAGS
64909     for flag in $("$LLVM_CONFIG" --cxxflags); do
64910       if echo "${flag}" | grep -q '^-[ID]'; then
64911         if test "${flag}" != "-D_DEBUG" ; then
64912           if test "${LLVM_CFLAGS}" != "" ; then
64913             LLVM_CFLAGS="${LLVM_CFLAGS} "
64914           fi
64915           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64916         fi
64917       fi
64918     done
64919     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64920     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64921 
64922     unset LLVM_LDFLAGS
64923     for flag in $("${LLVM_CONFIG}" --ldflags); do
64924       if echo "${flag}" | grep -q '^-L'; then
64925         if test "${LLVM_LDFLAGS}" != ""; then
64926           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64927         fi
64928         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64929       fi
64930     done
64931 
64932     unset LLVM_LIBS
64933     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64934       if echo "${flag}" | grep -q '^-l'; then
64935         if test "${LLVM_LIBS}" != ""; then
64936           LLVM_LIBS="${LLVM_LIBS} "
64937         fi
64938         LLVM_LIBS="${LLVM_LIBS}${flag}"
64939       fi
64940     done
64941 
64942     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64943     # always properly detect -ltinfo
64944     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64945 
64946 
64947 
64948 
64949   fi
64950 
64951 
64952 
64953 # Check whether --with-libjpeg was given.
64954 if test "${with_libjpeg+set}" = set; then :
64955   withval=$with_libjpeg;
64956 fi
64957 
64958 
64959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64960 $as_echo_n "checking for which libjpeg to use... " >&6; }
64961   # default is bundled
64962   DEFAULT_LIBJPEG=bundled
64963   # if user didn't specify, use DEFAULT_LIBJPEG
64964   if test "x${with_libjpeg}" = "x"; then
64965     with_libjpeg=${DEFAULT_LIBJPEG}
64966   fi
64967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64968 $as_echo "${with_libjpeg}" >&6; }
64969 
64970   if test "x${with_libjpeg}" = "xbundled"; then
64971     USE_EXTERNAL_LIBJPEG=false
64972   elif test "x${with_libjpeg}" = "xsystem"; then
64973     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64974 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64975 
64976 else
64977    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64978 fi
64979 
64980 
64981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64982 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64983 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64984   $as_echo_n "(cached) " >&6
64985 else
64986   ac_check_lib_save_LIBS=$LIBS
64987 LIBS="-ljpeg  $LIBS"
64988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64989 /* end confdefs.h.  */
64990 
64991 /* Override any GCC internal prototype to avoid an error.
64992    Use char because int might match the return type of a GCC
64993    builtin and then its argument prototype would still apply.  */
64994 #ifdef __cplusplus
64995 extern "C"
64996 #endif
64997 char jpeg_CreateDecompress ();
64998 int
64999 main ()
65000 {
65001 return jpeg_CreateDecompress ();
65002   ;
65003   return 0;
65004 }
65005 _ACEOF
65006 if ac_fn_cxx_try_link "$LINENO"; then :
65007   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
65008 else
65009   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
65010 fi
65011 rm -f core conftest.err conftest.$ac_objext \
65012     conftest$ac_exeext conftest.$ac_ext
65013 LIBS=$ac_check_lib_save_LIBS
65014 fi
65015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
65016 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
65017 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
65018   cat >>confdefs.h <<_ACEOF
65019 #define HAVE_LIBJPEG 1
65020 _ACEOF
65021 
65022   LIBS="-ljpeg $LIBS"
65023 
65024 else
65025    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
65026 fi
65027 
65028 
65029     USE_EXTERNAL_LIBJPEG=true
65030   else
65031     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
65032   fi
65033 
65034 
65035 
65036 
65037 
65038 # Check whether --with-giflib was given.
65039 if test "${with_giflib+set}" = set; then :
65040   withval=$with_giflib;
65041 fi
65042 
65043 
65044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
65045 $as_echo_n "checking for which giflib to use... " >&6; }
65046   # default is bundled
65047   DEFAULT_GIFLIB=bundled
65048   # if user didn't specify, use DEFAULT_GIFLIB
65049   if test "x${with_giflib}" = "x"; then
65050     with_giflib=${DEFAULT_GIFLIB}
65051   fi
65052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
65053 $as_echo "${with_giflib}" >&6; }
65054 
65055   if test "x${with_giflib}" = "xbundled"; then
65056     USE_EXTERNAL_LIBGIF=false
65057   elif test "x${with_giflib}" = "xsystem"; then
65058     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
65059 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
65060 
65061 else
65062    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
65063 fi
65064 
65065 
65066     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
65067 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
65068 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
65069   $as_echo_n "(cached) " >&6
65070 else
65071   ac_check_lib_save_LIBS=$LIBS
65072 LIBS="-lgif  $LIBS"
65073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65074 /* end confdefs.h.  */
65075 
65076 /* Override any GCC internal prototype to avoid an error.
65077    Use char because int might match the return type of a GCC
65078    builtin and then its argument prototype would still apply.  */
65079 #ifdef __cplusplus
65080 extern "C"
65081 #endif
65082 char DGifGetCode ();
65083 int
65084 main ()
65085 {
65086 return DGifGetCode ();
65087   ;
65088   return 0;
65089 }
65090 _ACEOF
65091 if ac_fn_cxx_try_link "$LINENO"; then :
65092   ac_cv_lib_gif_DGifGetCode=yes
65093 else
65094   ac_cv_lib_gif_DGifGetCode=no
65095 fi
65096 rm -f core conftest.err conftest.$ac_objext \
65097     conftest$ac_exeext conftest.$ac_ext
65098 LIBS=$ac_check_lib_save_LIBS
65099 fi
65100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
65101 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
65102 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
65103   cat >>confdefs.h <<_ACEOF
65104 #define HAVE_LIBGIF 1
65105 _ACEOF
65106 
65107   LIBS="-lgif $LIBS"
65108 
65109 else
65110    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
65111 fi
65112 
65113 
65114     USE_EXTERNAL_LIBGIF=true
65115   else
65116     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
65117   fi
65118 
65119 
65120 
65121 
65122 
65123 # Check whether --with-libpng was given.
65124 if test "${with_libpng+set}" = set; then :
65125   withval=$with_libpng;
65126 fi
65127 
65128 
65129   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
65130 $as_echo_n "checking for which libpng to use... " >&6; }
65131 
65132   # default is bundled
65133   DEFAULT_LIBPNG=bundled
65134   # if user didn't specify, use DEFAULT_LIBPNG
65135   if test "x${with_libpng}" = "x"; then
65136     with_libpng=${DEFAULT_LIBPNG}
65137   fi
65138 
65139   if test "x${with_libpng}" = "xbundled"; then
65140     USE_EXTERNAL_LIBPNG=false
65141     PNG_CFLAGS=""
65142     PNG_LIBS=""
65143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65144 $as_echo "bundled" >&6; }
65145   elif test "x${with_libpng}" = "xsystem"; then
65146 
65147 pkg_failed=no
65148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65149 $as_echo_n "checking for PNG... " >&6; }
65150 
65151 if test -n "$PNG_CFLAGS"; then
65152     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65153  elif test -n "$PKG_CONFIG"; then
65154     if test -n "$PKG_CONFIG" && \
65155     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65156   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65157   ac_status=$?
65158   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65159   test $ac_status = 0; }; then
65160   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65161 else
65162   pkg_failed=yes
65163 fi
65164  else
65165     pkg_failed=untried
65166 fi
65167 if test -n "$PNG_LIBS"; then
65168     pkg_cv_PNG_LIBS="$PNG_LIBS"
65169  elif test -n "$PKG_CONFIG"; then
65170     if test -n "$PKG_CONFIG" && \
65171     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65172   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65173   ac_status=$?
65174   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65175   test $ac_status = 0; }; then
65176   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65177 else
65178   pkg_failed=yes
65179 fi
65180  else
65181     pkg_failed=untried
65182 fi
65183 
65184 
65185 
65186 if test $pkg_failed = yes; then
65187 
65188 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65189         _pkg_short_errors_supported=yes
65190 else
65191         _pkg_short_errors_supported=no
65192 fi
65193         if test $_pkg_short_errors_supported = yes; then
65194                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65195         else
65196                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65197         fi
65198         # Put the nasty error message in config.log where it belongs
65199         echo "$PNG_PKG_ERRORS" >&5
65200 
65201         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65202 $as_echo "no" >&6; }
65203                 LIBPNG_FOUND=no
65204 elif test $pkg_failed = untried; then
65205         LIBPNG_FOUND=no
65206 else
65207         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65208         PNG_LIBS=$pkg_cv_PNG_LIBS
65209         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65210 $as_echo "yes" >&6; }
65211         LIBPNG_FOUND=yes
65212 fi
65213     if test "x${LIBPNG_FOUND}" = "xyes"; then
65214       # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65215       USE_EXTERNAL_LIBPNG=true
65216       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65217 $as_echo "system" >&6; }
65218     else
65219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65220 $as_echo "system not found" >&6; }
65221       as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65222     fi
65223   else
65224     as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65225   fi
65226 
65227 
65228 
65229 
65230 
65231 
65232 
65233 # Check whether --with-zlib was given.
65234 if test "${with_zlib+set}" = set; then :
65235   withval=$with_zlib;
65236 fi
65237 
65238 
65239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65240 $as_echo_n "checking for compress in -lz... " >&6; }
65241 if ${ac_cv_lib_z_compress+:} false; then :
65242   $as_echo_n "(cached) " >&6
65243 else
65244   ac_check_lib_save_LIBS=$LIBS
65245 LIBS="-lz  $LIBS"
65246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65247 /* end confdefs.h.  */
65248 
65249 /* Override any GCC internal prototype to avoid an error.
65250    Use char because int might match the return type of a GCC
65251    builtin and then its argument prototype would still apply.  */
65252 #ifdef __cplusplus
65253 extern "C"
65254 #endif
65255 char compress ();
65256 int
65257 main ()
65258 {
65259 return compress ();
65260   ;
65261   return 0;
65262 }
65263 _ACEOF
65264 if ac_fn_cxx_try_link "$LINENO"; then :
65265   ac_cv_lib_z_compress=yes
65266 else
65267   ac_cv_lib_z_compress=no
65268 fi
65269 rm -f core conftest.err conftest.$ac_objext \
65270     conftest$ac_exeext conftest.$ac_ext
65271 LIBS=$ac_check_lib_save_LIBS
65272 fi
65273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65274 $as_echo "$ac_cv_lib_z_compress" >&6; }
65275 if test "x$ac_cv_lib_z_compress" = xyes; then :
65276    ZLIB_FOUND=yes
65277 else
65278    ZLIB_FOUND=no
65279 fi
65280 
65281 
65282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65283 $as_echo_n "checking for which zlib to use... " >&6; }
65284 
65285   DEFAULT_ZLIB=system
65286   if test "x$OPENJDK_TARGET_OS" = xwindows; then
65287     # On windows default is bundled...on others default is system
65288     DEFAULT_ZLIB=bundled
65289   fi
65290 
65291   if test "x${ZLIB_FOUND}" != "xyes"; then
65292     # If we don't find any system...set default to bundled
65293     DEFAULT_ZLIB=bundled
65294   fi
65295 
65296   # If user didn't specify, use DEFAULT_ZLIB
65297   if test "x${with_zlib}" = "x"; then
65298     with_zlib=${DEFAULT_ZLIB}
65299   fi
65300 
65301   if test "x${with_zlib}" = "xbundled"; then
65302     USE_EXTERNAL_LIBZ=false
65303     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65304 $as_echo "bundled" >&6; }
65305   elif test "x${with_zlib}" = "xsystem"; then
65306     if test "x${ZLIB_FOUND}" = "xyes"; then
65307       USE_EXTERNAL_LIBZ=true
65308       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65309 $as_echo "system" >&6; }
65310     else
65311       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65312 $as_echo "system not found" >&6; }
65313       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65314     fi
65315   else
65316     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65317   fi
65318 
65319 
65320 
65321 
65322 
65323 # Check whether --with-lcms was given.
65324 if test "${with_lcms+set}" = set; then :
65325   withval=$with_lcms;
65326 fi
65327 
65328 
65329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65330 $as_echo_n "checking for which lcms to use... " >&6; }
65331 
65332   DEFAULT_LCMS=bundled
65333   # If user didn't specify, use DEFAULT_LCMS
65334   if test "x${with_lcms}" = "x"; then
65335     with_lcms=${DEFAULT_LCMS}
65336   fi
65337 
65338   if test "x${with_lcms}" = "xbundled"; then
65339     USE_EXTERNAL_LCMS=false
65340     LCMS_CFLAGS=""
65341     LCMS_LIBS=""
65342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65343 $as_echo "bundled" >&6; }
65344   elif test "x${with_lcms}" = "xsystem"; then
65345     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65346 $as_echo "system" >&6; }
65347 
65348 pkg_failed=no
65349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65350 $as_echo_n "checking for LCMS... " >&6; }
65351 
65352 if test -n "$LCMS_CFLAGS"; then
65353     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65354  elif test -n "$PKG_CONFIG"; then
65355     if test -n "$PKG_CONFIG" && \
65356     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65357   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65358   ac_status=$?
65359   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65360   test $ac_status = 0; }; then
65361   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65362 else
65363   pkg_failed=yes
65364 fi
65365  else
65366     pkg_failed=untried
65367 fi
65368 if test -n "$LCMS_LIBS"; then
65369     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65370  elif test -n "$PKG_CONFIG"; then
65371     if test -n "$PKG_CONFIG" && \
65372     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65373   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65374   ac_status=$?
65375   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65376   test $ac_status = 0; }; then
65377   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65378 else
65379   pkg_failed=yes
65380 fi
65381  else
65382     pkg_failed=untried
65383 fi
65384 
65385 
65386 
65387 if test $pkg_failed = yes; then
65388 
65389 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65390         _pkg_short_errors_supported=yes
65391 else
65392         _pkg_short_errors_supported=no
65393 fi
65394         if test $_pkg_short_errors_supported = yes; then
65395                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65396         else
65397                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65398         fi
65399         # Put the nasty error message in config.log where it belongs
65400         echo "$LCMS_PKG_ERRORS" >&5
65401 
65402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65403 $as_echo "no" >&6; }
65404                 LCMS_FOUND=no
65405 elif test $pkg_failed = untried; then
65406         LCMS_FOUND=no
65407 else
65408         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65409         LCMS_LIBS=$pkg_cv_LCMS_LIBS
65410         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65411 $as_echo "yes" >&6; }
65412         LCMS_FOUND=yes
65413 fi
65414     if test "x${LCMS_FOUND}" = "xyes"; then
65415       # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65416       USE_EXTERNAL_LCMS=true
65417     else
65418       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65419     fi
65420   else
65421     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65422   fi
65423 
65424 
65425 
65426 
65427 
65428 
65429 
65430 
65431 
65432 
65433 
65434 
65435 
65436   # Setup libm (the maths library)
65437   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65438     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65439 $as_echo_n "checking for cos in -lm... " >&6; }
65440 if ${ac_cv_lib_m_cos+:} false; then :
65441   $as_echo_n "(cached) " >&6
65442 else
65443   ac_check_lib_save_LIBS=$LIBS
65444 LIBS="-lm  $LIBS"
65445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65446 /* end confdefs.h.  */
65447 
65448 /* Override any GCC internal prototype to avoid an error.
65449    Use char because int might match the return type of a GCC
65450    builtin and then its argument prototype would still apply.  */
65451 #ifdef __cplusplus
65452 extern "C"
65453 #endif
65454 char cos ();
65455 int
65456 main ()
65457 {
65458 return cos ();
65459   ;
65460   return 0;
65461 }
65462 _ACEOF
65463 if ac_fn_cxx_try_link "$LINENO"; then :
65464   ac_cv_lib_m_cos=yes
65465 else
65466   ac_cv_lib_m_cos=no
65467 fi
65468 rm -f core conftest.err conftest.$ac_objext \
65469     conftest$ac_exeext conftest.$ac_ext
65470 LIBS=$ac_check_lib_save_LIBS
65471 fi
65472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65473 $as_echo "$ac_cv_lib_m_cos" >&6; }
65474 if test "x$ac_cv_lib_m_cos" = xyes; then :
65475   cat >>confdefs.h <<_ACEOF
65476 #define HAVE_LIBM 1
65477 _ACEOF
65478 
65479   LIBS="-lm $LIBS"
65480 
65481 else
65482 
65483         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65484 $as_echo "$as_me: Maths library was not found" >&6;}
65485 
65486 fi
65487 
65488     LIBM="-lm"
65489   else
65490     LIBM=""
65491   fi
65492 
65493 
65494   # Setup libdl (for dynamic library loading)
65495   save_LIBS="$LIBS"
65496   LIBS=""
65497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65498 $as_echo_n "checking for dlopen in -ldl... " >&6; }
65499 if ${ac_cv_lib_dl_dlopen+:} false; then :
65500   $as_echo_n "(cached) " >&6
65501 else
65502   ac_check_lib_save_LIBS=$LIBS
65503 LIBS="-ldl  $LIBS"
65504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65505 /* end confdefs.h.  */
65506 
65507 /* Override any GCC internal prototype to avoid an error.
65508    Use char because int might match the return type of a GCC
65509    builtin and then its argument prototype would still apply.  */
65510 #ifdef __cplusplus
65511 extern "C"
65512 #endif
65513 char dlopen ();
65514 int
65515 main ()
65516 {
65517 return dlopen ();
65518   ;
65519   return 0;
65520 }
65521 _ACEOF
65522 if ac_fn_cxx_try_link "$LINENO"; then :
65523   ac_cv_lib_dl_dlopen=yes
65524 else
65525   ac_cv_lib_dl_dlopen=no
65526 fi
65527 rm -f core conftest.err conftest.$ac_objext \
65528     conftest$ac_exeext conftest.$ac_ext
65529 LIBS=$ac_check_lib_save_LIBS
65530 fi
65531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65532 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65533 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65534   cat >>confdefs.h <<_ACEOF
65535 #define HAVE_LIBDL 1
65536 _ACEOF
65537 
65538   LIBS="-ldl $LIBS"
65539 
65540 fi
65541 
65542   LIBDL="$LIBS"
65543 
65544   LIBS="$save_LIBS"
65545 
65546   # Deprecated libraries, keep the flags for backwards compatibility
65547   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65548 
65549 
65550 # Check whether --with-dxsdk was given.
65551 if test "${with_dxsdk+set}" = set; then :
65552   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65553 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65554 fi
65555 
65556 
65557 
65558 
65559 # Check whether --with-dxsdk-lib was given.
65560 if test "${with_dxsdk_lib+set}" = set; then :
65561   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65562 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65563 fi
65564 
65565 
65566 
65567 
65568 # Check whether --with-dxsdk-include was given.
65569 if test "${with_dxsdk_include+set}" = set; then :
65570   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65571 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65572 fi
65573 
65574 
65575   fi
65576 
65577   # Control if libzip can use mmap. Available for purposes of overriding.
65578   LIBZIP_CAN_USE_MMAP=true
65579 
65580 
65581 
65582   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65583     # Find the root of the Solaris Studio installation from the compiler path
65584     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65585     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65586     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65587 $as_echo_n "checking for libstlport.so.1... " >&6; }
65588     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65589       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65590       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65591     fi
65592     if test -f "$STLPORT_LIB"; then
65593       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65594 $as_echo "yes, $STLPORT_LIB" >&6; }
65595 
65596   # Only process if variable expands to non-empty
65597 
65598   if test "x$STLPORT_LIB" != x; then
65599     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65600 
65601   # Input might be given as Windows format, start by converting to
65602   # unix format.
65603   path="$STLPORT_LIB"
65604   new_path=`$CYGPATH -u "$path"`
65605 
65606   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65607   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65608   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65609   # "foo.exe" is OK but "foo" is an error.
65610   #
65611   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65612   # It is also a way to make sure we got the proper file name for the real test later on.
65613   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65614   if test "x$test_shortpath" = x; then
65615     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65616 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65617     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65618   fi
65619 
65620   # Call helper function which possibly converts this using DOS-style short mode.
65621   # If so, the updated path is stored in $new_path.
65622 
65623   input_path="$new_path"
65624   # Check if we need to convert this using DOS-style short mode. If the path
65625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65626   # take no chances and rewrite it.
65627   # Note: m4 eats our [], so we need to use [ and ] instead.
65628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65629   if test "x$has_forbidden_chars" != x; then
65630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65631     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65632     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65633     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65634       # Going to short mode and back again did indeed matter. Since short mode is
65635       # case insensitive, let's make it lowercase to improve readability.
65636       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65637       # Now convert it back to Unix-style (cygpath)
65638       input_path=`$CYGPATH -u "$shortmode_path"`
65639       new_path="$input_path"
65640     fi
65641   fi
65642 
65643   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65644   if test "x$test_cygdrive_prefix" = x; then
65645     # As a simple fix, exclude /usr/bin since it's not a real path.
65646     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65647       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65648       # a path prefixed by /cygdrive for fixpath to work.
65649       new_path="$CYGWIN_ROOT_PATH$input_path"
65650     fi
65651   fi
65652 
65653 
65654   if test "x$path" != "x$new_path"; then
65655     STLPORT_LIB="$new_path"
65656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65657 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65658   fi
65659 
65660     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65661 
65662   path="$STLPORT_LIB"
65663   has_colon=`$ECHO $path | $GREP ^.:`
65664   new_path="$path"
65665   if test "x$has_colon" = x; then
65666     # Not in mixed or Windows style, start by that.
65667     new_path=`cmd //c echo $path`
65668   fi
65669 
65670 
65671   input_path="$new_path"
65672   # Check if we need to convert this using DOS-style short mode. If the path
65673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65674   # take no chances and rewrite it.
65675   # Note: m4 eats our [], so we need to use [ and ] instead.
65676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65677   if test "x$has_forbidden_chars" != x; then
65678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65680   fi
65681 
65682 
65683   windows_path="$new_path"
65684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65685     unix_path=`$CYGPATH -u "$windows_path"`
65686     new_path="$unix_path"
65687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65689     new_path="$unix_path"
65690   fi
65691 
65692   if test "x$path" != "x$new_path"; then
65693     STLPORT_LIB="$new_path"
65694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65695 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65696   fi
65697 
65698   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65699   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65700 
65701     else
65702       # We're on a unix platform. Hooray! :)
65703       path="$STLPORT_LIB"
65704       has_space=`$ECHO "$path" | $GREP " "`
65705       if test "x$has_space" != x; then
65706         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65707 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65708         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65709       fi
65710 
65711       # Use eval to expand a potential ~
65712       eval path="$path"
65713       if test ! -f "$path" && test ! -d "$path"; then
65714         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65715       fi
65716 
65717       if test -d "$path"; then
65718         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65719       else
65720         dir="`$DIRNAME "$path"`"
65721         base="`$BASENAME "$path"`"
65722         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65723       fi
65724     fi
65725   fi
65726 
65727     else
65728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65729 $as_echo "no, not found at $STLPORT_LIB" >&6; }
65730       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65731     fi
65732 
65733   fi
65734 
65735 
65736 
65737 
65738 
65739 
65740 
65741 
65742 
65743 
65744 
65745 
65746 
65747 
65748 # Hotspot setup depends on lib checks.
65749 
65750 
65751   # The user can in some cases supply additional jvm features. For the custom
65752   # variant, this defines the entire variant.
65753 
65754 # Check whether --with-jvm-features was given.
65755 if test "${with_jvm_features+set}" = set; then :
65756   withval=$with_jvm_features;
65757 fi
65758 
65759   if test "x$with_jvm_features" != x; then
65760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65761 $as_echo_n "checking additional JVM features... " >&6; }
65762     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65764 $as_echo "$JVM_FEATURES" >&6; }
65765   fi
65766 
65767   # Override hotspot cpu definitions for ARM platforms
65768   if test "x$OPENJDK_TARGET_CPU" = xarm; then
65769     HOTSPOT_TARGET_CPU=arm_32
65770     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65771     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65772     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65773   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65774     HOTSPOT_TARGET_CPU=arm_64
65775     HOTSPOT_TARGET_CPU_ARCH=arm
65776     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65777     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65778   fi
65779 
65780   # Verify that dependencies are met for explicitly set features.
65781   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65782     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65783   fi
65784 
65785   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65786     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65787   fi
65788 
65789   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65790     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65791   fi
65792 
65793   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65794     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65795   fi
65796 
65797   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65798     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65799   fi
65800 
65801   # Turn on additional features based on other parts of configure
65802   if test "x$INCLUDE_DTRACE" = "xtrue"; then
65803     JVM_FEATURES="$JVM_FEATURES dtrace"
65804   else
65805     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65806       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65807     fi
65808   fi
65809 
65810   if test "x$STATIC_BUILD" = "xtrue"; then
65811     JVM_FEATURES="$JVM_FEATURES static-build"
65812   else
65813     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65814       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65815     fi
65816   fi
65817 
65818   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65819     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65820       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65821     fi
65822   fi
65823 
65824   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65825     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65826       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65827     fi
65828   fi
65829 
65830   # Only enable jvmci on x86_64, sparcv9 and aarch64.
65831   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65832      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65833      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65834     JVM_FEATURES_jvmci="jvmci"
65835   else
65836     JVM_FEATURES_jvmci=""
65837   fi
65838 
65839   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65840 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65841   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65842     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65843 $as_echo "yes, forced" >&6; }
65844     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65845       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65846     fi
65847     INCLUDE_GRAAL="true"
65848   else
65849     # By default enable graal build on linux-x64 or where AOT is available.
65850     # graal build requires jvmci.
65851     if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
65852         (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
65853          test "x$OPENJDK_TARGET_OS" = "xlinux" || \
65854          test "x$ENABLE_AOT" = "xtrue") ; then
65855       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65856 $as_echo "yes" >&6; }
65857       JVM_FEATURES_graal="graal"
65858       INCLUDE_GRAAL="true"
65859     else
65860       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65861 $as_echo "no" >&6; }
65862       JVM_FEATURES_graal=""
65863       INCLUDE_GRAAL="false"
65864     fi
65865   fi
65866 
65867 
65868 
65869   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65870 $as_echo_n "checking if aot should be enabled... " >&6; }
65871   if test "x$ENABLE_AOT" = "xtrue"; then
65872     if test "x$enable_aot" = "xyes"; then
65873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65874 $as_echo "yes, forced" >&6; }
65875     else
65876       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65877 $as_echo "yes" >&6; }
65878     fi
65879     JVM_FEATURES_aot="aot"
65880   else
65881     if test "x$enable_aot" = "xno"; then
65882       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65883 $as_echo "no, forced" >&6; }
65884     else
65885       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65886 $as_echo "no" >&6; }
65887     fi
65888     JVM_FEATURES_aot=""
65889   fi
65890 
65891   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65892     # Default to use link time optimizations on minimal on arm
65893     JVM_FEATURES_link_time_opt="link-time-opt"
65894   else
65895     JVM_FEATURES_link_time_opt=""
65896   fi
65897 
65898   # All variants but minimal (and custom) get these features
65899   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
65900   if test "x$ENABLE_CDS" = "xtrue"; then
65901     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
65902   fi
65903 
65904   # Enable features depending on variant.
65905   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65906   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65907   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65908   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65909   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65910   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65911   JVM_FEATURES_custom="$JVM_FEATURES"
65912 
65913 
65914 
65915 
65916 
65917 
65918 
65919 
65920 
65921   # Used for verification of Makefiles by check-jvm-feature
65922 
65923 
65924   # We don't support --with-jvm-interpreter anymore, use zero instead.
65925 
65926 
65927 # Check whether --with-jvm-interpreter was given.
65928 if test "${with_jvm_interpreter+set}" = set; then :
65929   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65930 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65931 fi
65932 
65933 
65934 
65935 
65936 ###############################################################################
65937 #
65938 # We need to do some final tweaking, when everything else is done.
65939 #
65940 ###############################################################################
65941 
65942 
65943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65944 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65945 
65946   if test -d "${TOPDIR}/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65947     ENABLE_INTREE_EC=true
65948     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65949 $as_echo "yes" >&6; }
65950   else
65951     ENABLE_INTREE_EC=false
65952     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65953 $as_echo "no" >&6; }
65954   fi
65955 
65956 
65957 
65958 
65959   # Check whether --enable-jtreg-failure-handler was given.
65960 if test "${enable_jtreg_failure_handler+set}" = set; then :
65961   enableval=$enable_jtreg_failure_handler;
65962 fi
65963 
65964 
65965   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65966 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65967 
65968   if test "x$enable_jtreg_failure_handler" = "xyes"; then
65969     if test "x$JT_HOME" = "x"; then
65970       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65971     else
65972       BUILD_FAILURE_HANDLER=true
65973       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65974 $as_echo "yes, forced" >&6; }
65975     fi
65976   elif test "x$enable_jtreg_failure_handler" = "xno"; then
65977     BUILD_FAILURE_HANDLER=false
65978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65979 $as_echo "no, forced" >&6; }
65980   elif test "x$enable_jtreg_failure_handler" = "xauto" \
65981       || test "x$enable_jtreg_failure_handler" = "x"; then
65982     if test "x$JT_HOME" = "x"; then
65983       BUILD_FAILURE_HANDLER=false
65984       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65985 $as_echo "no, missing jtreg" >&6; }
65986     else
65987       BUILD_FAILURE_HANDLER=true
65988       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65989 $as_echo "yes, jtreg present" >&6; }
65990     fi
65991   else
65992     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65993   fi
65994 
65995 
65996 
65997 
65998   # Check whether --enable-generate-classlist was given.
65999 if test "${enable_generate_classlist+set}" = set; then :
66000   enableval=$enable_generate_classlist;
66001 fi
66002 
66003 
66004   # Check if it's likely that it's possible to generate the classlist. Depending
66005   # on exact jvm configuration it could be possible anyway.
66006   if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
66007     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
66008   else
66009     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
66010   fi
66011 
66012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
66013 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
66014   if test "x$enable_generate_classlist" = "xyes"; then
66015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
66016 $as_echo "yes, forced" >&6; }
66017     ENABLE_GENERATE_CLASSLIST="true"
66018     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
66019       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&5
66020 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
66021     fi
66022   elif test "x$enable_generate_classlist" = "xno"; then
66023     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66024 $as_echo "no, forced" >&6; }
66025     ENABLE_GENERATE_CLASSLIST="false"
66026   elif test "x$enable_generate_classlist" = "x"; then
66027     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
66028       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66029 $as_echo "yes" >&6; }
66030       ENABLE_GENERATE_CLASSLIST="true"
66031     else
66032       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66033 $as_echo "no" >&6; }
66034       ENABLE_GENERATE_CLASSLIST="false"
66035     fi
66036   else
66037     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
66038   fi
66039 
66040 
66041 
66042 
66043 ###############################################################################
66044 #
66045 # Configure parts of the build that only affect the build performance,
66046 # not the result.
66047 #
66048 ###############################################################################
66049 
66050 
66051   # How many cores do we have on this build system?
66052 
66053 # Check whether --with-num-cores was given.
66054 if test "${with_num_cores+set}" = set; then :
66055   withval=$with_num_cores;
66056 fi
66057 
66058   if test "x$with_num_cores" = x; then
66059     # The number of cores were not specified, try to probe them.
66060 
66061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
66062 $as_echo_n "checking for number of cores... " >&6; }
66063   NUM_CORES=1
66064   FOUND_CORES=no
66065 
66066   if test -f /proc/cpuinfo; then
66067     # Looks like a Linux (or cygwin) system
66068     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
66069     FOUND_CORES=yes
66070   elif test -x /usr/sbin/psrinfo; then
66071     # Looks like a Solaris system
66072     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
66073     FOUND_CORES=yes
66074   elif test -x /usr/sbin/sysctl; then
66075     # Looks like a MacOSX system
66076     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
66077     FOUND_CORES=yes
66078   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
66079     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
66080     FOUND_CORES=yes
66081   elif test -n "$NUMBER_OF_PROCESSORS"; then
66082     # On windows, look in the env
66083     NUM_CORES=$NUMBER_OF_PROCESSORS
66084     FOUND_CORES=yes
66085   fi
66086 
66087   if test "x$FOUND_CORES" = xyes; then
66088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
66089 $as_echo "$NUM_CORES" >&6; }
66090   else
66091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
66092 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
66093     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
66094 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
66095   fi
66096 
66097   else
66098     NUM_CORES=$with_num_cores
66099   fi
66100 
66101 
66102 
66103   # How much memory do we have on this build system?
66104 
66105 # Check whether --with-memory-size was given.
66106 if test "${with_memory_size+set}" = set; then :
66107   withval=$with_memory_size;
66108 fi
66109 
66110   if test "x$with_memory_size" = x; then
66111     # The memory size was not specified, try to probe it.
66112 
66113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
66114 $as_echo_n "checking for memory size... " >&6; }
66115   # Default to 1024 MB
66116   MEMORY_SIZE=1024
66117   FOUND_MEM=no
66118 
66119   if test -f /proc/meminfo; then
66120     # Looks like a Linux (or cygwin) system
66121     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
66122     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
66123     FOUND_MEM=yes
66124   elif test -x /usr/sbin/prtconf; then
66125     # Looks like a Solaris or AIX system
66126     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
66127     FOUND_MEM=yes
66128   elif test -x /usr/sbin/sysctl; then
66129     # Looks like a MacOSX system
66130     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
66131     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66132     FOUND_MEM=yes
66133   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
66134     # Windows, but without cygwin
66135     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
66136     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66137     FOUND_MEM=yes
66138   fi
66139 
66140   if test "x$FOUND_MEM" = xyes; then
66141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
66142 $as_echo "$MEMORY_SIZE MB" >&6; }
66143   else
66144     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
66145 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
66146     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66147 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66148   fi
66149 
66150   else
66151     MEMORY_SIZE=$with_memory_size
66152   fi
66153 
66154 
66155 
66156   # Provide a decent default number of parallel jobs for make depending on
66157   # number of cores, amount of memory and machine architecture.
66158 
66159 # Check whether --with-jobs was given.
66160 if test "${with_jobs+set}" = set; then :
66161   withval=$with_jobs;
66162 fi
66163 
66164   if test "x$with_jobs" = x; then
66165     # Number of jobs was not specified, calculate.
66166     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66167 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66168     # Approximate memory in GB.
66169     memory_gb=`expr $MEMORY_SIZE / 1024`
66170     # Pick the lowest of memory in gb and number of cores.
66171     if test "$memory_gb" -lt "$NUM_CORES"; then
66172       JOBS="$memory_gb"
66173     else
66174       JOBS="$NUM_CORES"
66175     fi
66176     if test "$JOBS" -eq "0"; then
66177       JOBS=1
66178     fi
66179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66180 $as_echo "$JOBS" >&6; }
66181   else
66182     JOBS=$with_jobs
66183   fi
66184 
66185 
66186 
66187   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66188 
66189 # Check whether --with-test-jobs was given.
66190 if test "${with_test_jobs+set}" = set; then :
66191   withval=$with_test_jobs;
66192 fi
66193 
66194   if test "x$with_test_jobs" = x; then
66195       TEST_JOBS=0
66196   else
66197       TEST_JOBS=$with_test_jobs
66198   fi
66199 
66200 
66201 
66202 # Setup arguments for the boot jdk (after cores and memory have been setup)
66203 
66204   ##############################################################################
66205   #
66206   # Specify jvm options for anything that is run with the Boot JDK.
66207   # Not all JVM:s accept the same arguments on the command line.
66208   #
66209 
66210 # Check whether --with-boot-jdk-jvmargs was given.
66211 if test "${with_boot_jdk_jvmargs+set}" = set; then :
66212   withval=$with_boot_jdk_jvmargs;
66213 fi
66214 
66215 
66216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66217 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
66218 
66219   # Disable special log output when a debug build is used as Boot JDK...
66220 
66221   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66222   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66223   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66224   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66225   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66226   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66227     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66228     JVM_ARG_OK=true
66229   else
66230     $ECHO "Arg failed:" >&5
66231     $ECHO "$OUTPUT" >&5
66232     JVM_ARG_OK=false
66233   fi
66234 
66235 
66236   # Force en-US environment
66237 
66238   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66239   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66240   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66241   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66242   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66243   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66244     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66245     JVM_ARG_OK=true
66246   else
66247     $ECHO "Arg failed:" >&5
66248     $ECHO "$OUTPUT" >&5
66249     JVM_ARG_OK=false
66250   fi
66251 
66252 
66253   # Apply user provided options.
66254 
66255   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66256   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66257   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66258   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66259   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66260   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66261     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66262     JVM_ARG_OK=true
66263   else
66264     $ECHO "Arg failed:" >&5
66265     $ECHO "$OUTPUT" >&5
66266     JVM_ARG_OK=false
66267   fi
66268 
66269 
66270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66271 $as_echo "$boot_jdk_jvmargs" >&6; }
66272 
66273   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66274   JAVA_FLAGS=$boot_jdk_jvmargs
66275 
66276 
66277 
66278   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66279 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66280 
66281   # Starting amount of heap memory.
66282 
66283   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66284   $ECHO "Command: $JAVA -Xms64M -version" >&5
66285   OUTPUT=`$JAVA -Xms64M -version 2>&1`
66286   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66287   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66288   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66289     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66290     JVM_ARG_OK=true
66291   else
66292     $ECHO "Arg failed:" >&5
66293     $ECHO "$OUTPUT" >&5
66294     JVM_ARG_OK=false
66295   fi
66296 
66297   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66298 
66299   # Maximum amount of heap memory and stack size.
66300   JVM_HEAP_LIMIT_32="1024"
66301   # Running a 64 bit JVM allows for and requires a bigger heap
66302   JVM_HEAP_LIMIT_64="1600"
66303   STACK_SIZE_32=768
66304   STACK_SIZE_64=1536
66305   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66306   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66307     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66308   fi
66309   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66310     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66311   fi
66312   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66313     JVM_HEAP_LIMIT_32=512
66314     JVM_HEAP_LIMIT_64=512
66315   fi
66316 
66317   if test "x$BOOT_JDK_BITS" = "x32"; then
66318     STACK_SIZE=$STACK_SIZE_32
66319     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66320   else
66321     STACK_SIZE=$STACK_SIZE_64
66322     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66323   fi
66324 
66325   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66326   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66327   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66328   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66329   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66330   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66331     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66332     JVM_ARG_OK=true
66333   else
66334     $ECHO "Arg failed:" >&5
66335     $ECHO "$OUTPUT" >&5
66336     JVM_ARG_OK=false
66337   fi
66338 
66339 
66340   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66341   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66342   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66343   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66344   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66345   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66346     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66347     JVM_ARG_OK=true
66348   else
66349     $ECHO "Arg failed:" >&5
66350     $ECHO "$OUTPUT" >&5
66351     JVM_ARG_OK=false
66352   fi
66353 
66354 
66355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66356 $as_echo "$boot_jdk_jvmargs_big" >&6; }
66357 
66358   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66359 
66360 
66361   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66362     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66363     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66364   else
66365     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66366     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66367   fi
66368   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66369   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66371 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66373 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66374 
66375 
66376   # By default, the main javac compilations use big
66377   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66378 
66379 
66380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66381 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66382 
66383   # Use serial gc for small short lived tools if possible
66384 
66385   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66386   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66387   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66388   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66389   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66390   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66391     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66392     JVM_ARG_OK=true
66393   else
66394     $ECHO "Arg failed:" >&5
66395     $ECHO "$OUTPUT" >&5
66396     JVM_ARG_OK=false
66397   fi
66398 
66399 
66400   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66401   $ECHO "Command: $JAVA -Xms32M -version" >&5
66402   OUTPUT=`$JAVA -Xms32M -version 2>&1`
66403   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66404   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66405   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66406     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66407     JVM_ARG_OK=true
66408   else
66409     $ECHO "Arg failed:" >&5
66410     $ECHO "$OUTPUT" >&5
66411     JVM_ARG_OK=false
66412   fi
66413 
66414 
66415   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66416   $ECHO "Command: $JAVA -Xmx512M -version" >&5
66417   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66418   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66419   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66420   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66421     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66422     JVM_ARG_OK=true
66423   else
66424     $ECHO "Arg failed:" >&5
66425     $ECHO "$OUTPUT" >&5
66426     JVM_ARG_OK=false
66427   fi
66428 
66429 
66430   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66431   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66432   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66433   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66434   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66435   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66436     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66437     JVM_ARG_OK=true
66438   else
66439     $ECHO "Arg failed:" >&5
66440     $ECHO "$OUTPUT" >&5
66441     JVM_ARG_OK=false
66442   fi
66443 
66444 
66445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66446 $as_echo "$boot_jdk_jvmargs_small" >&6; }
66447 
66448   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66449 
66450 
66451   JAVA_TOOL_FLAGS_SMALL=""
66452   for f in $JAVA_FLAGS_SMALL; do
66453     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66454   done
66455 
66456 
66457 
66458 # Setup smart javac (after cores and memory have been setup)
66459 
66460 
66461 # Check whether --with-sjavac-server-java was given.
66462 if test "${with_sjavac_server_java+set}" = set; then :
66463   withval=$with_sjavac_server_java;
66464 fi
66465 
66466 
66467   if test "x$with_sjavac_server_java" != x; then
66468     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66469     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66470     if test "x$FOUND_VERSION" = x; then
66471       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66472     fi
66473   else
66474     SJAVAC_SERVER_JAVA="$JAVA"
66475   fi
66476 
66477 
66478   if test "$MEMORY_SIZE" -gt "3000"; then
66479     if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66480       JVM_64BIT=true
66481     fi
66482   fi
66483 
66484   MX_VALUE=`expr $MEMORY_SIZE / 2`
66485   if test "$JVM_64BIT" = true; then
66486     # Set ms lower than mx since more than one instance of the server might
66487     # get launched at the same time before they figure out which instance won.
66488     MS_VALUE=512
66489     if test "$MX_VALUE" -gt "2048"; then
66490       MX_VALUE=2048
66491     fi
66492   else
66493     MS_VALUE=256
66494     if test "$MX_VALUE" -gt "1500"; then
66495       MX_VALUE=1500
66496     fi
66497   fi
66498   if test "$MX_VALUE" -lt "512"; then
66499     MX_VALUE=512
66500   fi
66501 
66502   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66503   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66504   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66505   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66506   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66507   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66508     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66509     JVM_ARG_OK=true
66510   else
66511     $ECHO "Arg failed:" >&5
66512     $ECHO "$OUTPUT" >&5
66513     JVM_ARG_OK=false
66514   fi
66515 
66516 
66517 
66518   # Check whether --enable-sjavac was given.
66519 if test "${enable_sjavac+set}" = set; then :
66520   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66521 else
66522   ENABLE_SJAVAC="no"
66523 fi
66524 
66525   if test "x$JVM_ARG_OK" = "xfalse"; then
66526     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66527 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66528     ENABLE_SJAVAC="no"
66529   fi
66530   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66531 $as_echo_n "checking whether to use sjavac... " >&6; }
66532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66533 $as_echo "$ENABLE_SJAVAC" >&6; }
66534 
66535 
66536   # Check whether --enable-javac-server was given.
66537 if test "${enable_javac_server+set}" = set; then :
66538   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66539 else
66540   ENABLE_JAVAC_SERVER="yes"
66541 fi
66542 
66543   if test "x$JVM_ARG_OK" = "xfalse"; then
66544     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66545 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66546     ENABLE_JAVAC_SERVER="no"
66547   fi
66548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66549 $as_echo_n "checking whether to use javac server... " >&6; }
66550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66551 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66552 
66553 
66554   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66555     # When using a server javac, the small client instances do not need much
66556     # resources.
66557     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66558   fi
66559 
66560 
66561 # Setup use of icecc if requested
66562 
66563   # Check whether --enable-icecc was given.
66564 if test "${enable_icecc+set}" = set; then :
66565   enableval=$enable_icecc;
66566 fi
66567 
66568 
66569   if test "x${enable_icecc}" = "xyes"; then
66570 
66571 
66572 
66573   # Publish this variable in the help.
66574 
66575 
66576   if [ -z "${ICECC_CMD+x}" ]; then
66577     # The variable is not set by user, try to locate tool using the code snippet
66578     for ac_prog in icecc
66579 do
66580   # Extract the first word of "$ac_prog", so it can be a program name with args.
66581 set dummy $ac_prog; ac_word=$2
66582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66583 $as_echo_n "checking for $ac_word... " >&6; }
66584 if ${ac_cv_path_ICECC_CMD+:} false; then :
66585   $as_echo_n "(cached) " >&6
66586 else
66587   case $ICECC_CMD in
66588   [\\/]* | ?:[\\/]*)
66589   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66590   ;;
66591   *)
66592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66593 for as_dir in $PATH
66594 do
66595   IFS=$as_save_IFS
66596   test -z "$as_dir" && as_dir=.
66597     for ac_exec_ext in '' $ac_executable_extensions; do
66598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66599     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66601     break 2
66602   fi
66603 done
66604   done
66605 IFS=$as_save_IFS
66606 
66607   ;;
66608 esac
66609 fi
66610 ICECC_CMD=$ac_cv_path_ICECC_CMD
66611 if test -n "$ICECC_CMD"; then
66612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66613 $as_echo "$ICECC_CMD" >&6; }
66614 else
66615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66616 $as_echo "no" >&6; }
66617 fi
66618 
66619 
66620   test -n "$ICECC_CMD" && break
66621 done
66622 
66623   else
66624     # The variable is set, but is it from the command line or the environment?
66625 
66626     # Try to remove the string !ICECC_CMD! from our list.
66627     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66628     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66629       # If it failed, the variable was not from the command line. Ignore it,
66630       # but warn the user (except for BASH, which is always set by the calling BASH).
66631       if test "xICECC_CMD" != xBASH; then
66632         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66633 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66634       fi
66635       # Try to locate tool using the code snippet
66636       for ac_prog in icecc
66637 do
66638   # Extract the first word of "$ac_prog", so it can be a program name with args.
66639 set dummy $ac_prog; ac_word=$2
66640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66641 $as_echo_n "checking for $ac_word... " >&6; }
66642 if ${ac_cv_path_ICECC_CMD+:} false; then :
66643   $as_echo_n "(cached) " >&6
66644 else
66645   case $ICECC_CMD in
66646   [\\/]* | ?:[\\/]*)
66647   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66648   ;;
66649   *)
66650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66651 for as_dir in $PATH
66652 do
66653   IFS=$as_save_IFS
66654   test -z "$as_dir" && as_dir=.
66655     for ac_exec_ext in '' $ac_executable_extensions; do
66656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66657     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66659     break 2
66660   fi
66661 done
66662   done
66663 IFS=$as_save_IFS
66664 
66665   ;;
66666 esac
66667 fi
66668 ICECC_CMD=$ac_cv_path_ICECC_CMD
66669 if test -n "$ICECC_CMD"; then
66670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66671 $as_echo "$ICECC_CMD" >&6; }
66672 else
66673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66674 $as_echo "no" >&6; }
66675 fi
66676 
66677 
66678   test -n "$ICECC_CMD" && break
66679 done
66680 
66681     else
66682       # If it succeeded, then it was overridden by the user. We will use it
66683       # for the tool.
66684 
66685       # First remove it from the list of overridden variables, so we can test
66686       # for unknown variables in the end.
66687       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66688 
66689       # Check if we try to supply an empty value
66690       if test "x$ICECC_CMD" = x; then
66691         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66692 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66693         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66694 $as_echo_n "checking for ICECC_CMD... " >&6; }
66695         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66696 $as_echo "disabled" >&6; }
66697       else
66698         # Check if the provided tool contains a complete path.
66699         tool_specified="$ICECC_CMD"
66700         tool_basename="${tool_specified##*/}"
66701         if test "x$tool_basename" = "x$tool_specified"; then
66702           # A command without a complete path is provided, search $PATH.
66703           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66704 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66705           # Extract the first word of "$tool_basename", so it can be a program name with args.
66706 set dummy $tool_basename; ac_word=$2
66707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66708 $as_echo_n "checking for $ac_word... " >&6; }
66709 if ${ac_cv_path_ICECC_CMD+:} false; then :
66710   $as_echo_n "(cached) " >&6
66711 else
66712   case $ICECC_CMD in
66713   [\\/]* | ?:[\\/]*)
66714   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66715   ;;
66716   *)
66717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66718 for as_dir in $PATH
66719 do
66720   IFS=$as_save_IFS
66721   test -z "$as_dir" && as_dir=.
66722     for ac_exec_ext in '' $ac_executable_extensions; do
66723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66724     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66726     break 2
66727   fi
66728 done
66729   done
66730 IFS=$as_save_IFS
66731 
66732   ;;
66733 esac
66734 fi
66735 ICECC_CMD=$ac_cv_path_ICECC_CMD
66736 if test -n "$ICECC_CMD"; then
66737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66738 $as_echo "$ICECC_CMD" >&6; }
66739 else
66740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66741 $as_echo "no" >&6; }
66742 fi
66743 
66744 
66745           if test "x$ICECC_CMD" = x; then
66746             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66747           fi
66748         else
66749           # Otherwise we believe it is a complete path. Use it as it is.
66750           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66751 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66752           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66753 $as_echo_n "checking for ICECC_CMD... " >&6; }
66754           if test ! -x "$tool_specified"; then
66755             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66756 $as_echo "not found" >&6; }
66757             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66758           fi
66759           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66760 $as_echo "$tool_specified" >&6; }
66761         fi
66762       fi
66763     fi
66764 
66765   fi
66766 
66767 
66768 
66769   if test "x$ICECC_CMD" = x; then
66770     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66771   fi
66772 
66773 
66774     old_path="$PATH"
66775 
66776     # Look for icecc-create-env in some known places
66777     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66778 
66779 
66780 
66781   # Publish this variable in the help.
66782 
66783 
66784   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66785     # The variable is not set by user, try to locate tool using the code snippet
66786     for ac_prog in icecc-create-env
66787 do
66788   # Extract the first word of "$ac_prog", so it can be a program name with args.
66789 set dummy $ac_prog; ac_word=$2
66790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66791 $as_echo_n "checking for $ac_word... " >&6; }
66792 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66793   $as_echo_n "(cached) " >&6
66794 else
66795   case $ICECC_CREATE_ENV in
66796   [\\/]* | ?:[\\/]*)
66797   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66798   ;;
66799   *)
66800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66801 for as_dir in $PATH
66802 do
66803   IFS=$as_save_IFS
66804   test -z "$as_dir" && as_dir=.
66805     for ac_exec_ext in '' $ac_executable_extensions; do
66806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66807     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66809     break 2
66810   fi
66811 done
66812   done
66813 IFS=$as_save_IFS
66814 
66815   ;;
66816 esac
66817 fi
66818 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66819 if test -n "$ICECC_CREATE_ENV"; then
66820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66821 $as_echo "$ICECC_CREATE_ENV" >&6; }
66822 else
66823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66824 $as_echo "no" >&6; }
66825 fi
66826 
66827 
66828   test -n "$ICECC_CREATE_ENV" && break
66829 done
66830 
66831   else
66832     # The variable is set, but is it from the command line or the environment?
66833 
66834     # Try to remove the string !ICECC_CREATE_ENV! from our list.
66835     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66836     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66837       # If it failed, the variable was not from the command line. Ignore it,
66838       # but warn the user (except for BASH, which is always set by the calling BASH).
66839       if test "xICECC_CREATE_ENV" != xBASH; then
66840         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66841 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66842       fi
66843       # Try to locate tool using the code snippet
66844       for ac_prog in icecc-create-env
66845 do
66846   # Extract the first word of "$ac_prog", so it can be a program name with args.
66847 set dummy $ac_prog; ac_word=$2
66848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66849 $as_echo_n "checking for $ac_word... " >&6; }
66850 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66851   $as_echo_n "(cached) " >&6
66852 else
66853   case $ICECC_CREATE_ENV in
66854   [\\/]* | ?:[\\/]*)
66855   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66856   ;;
66857   *)
66858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66859 for as_dir in $PATH
66860 do
66861   IFS=$as_save_IFS
66862   test -z "$as_dir" && as_dir=.
66863     for ac_exec_ext in '' $ac_executable_extensions; do
66864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66865     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66867     break 2
66868   fi
66869 done
66870   done
66871 IFS=$as_save_IFS
66872 
66873   ;;
66874 esac
66875 fi
66876 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66877 if test -n "$ICECC_CREATE_ENV"; then
66878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66879 $as_echo "$ICECC_CREATE_ENV" >&6; }
66880 else
66881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66882 $as_echo "no" >&6; }
66883 fi
66884 
66885 
66886   test -n "$ICECC_CREATE_ENV" && break
66887 done
66888 
66889     else
66890       # If it succeeded, then it was overridden by the user. We will use it
66891       # for the tool.
66892 
66893       # First remove it from the list of overridden variables, so we can test
66894       # for unknown variables in the end.
66895       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66896 
66897       # Check if we try to supply an empty value
66898       if test "x$ICECC_CREATE_ENV" = x; then
66899         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66900 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66901         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66902 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66903         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66904 $as_echo "disabled" >&6; }
66905       else
66906         # Check if the provided tool contains a complete path.
66907         tool_specified="$ICECC_CREATE_ENV"
66908         tool_basename="${tool_specified##*/}"
66909         if test "x$tool_basename" = "x$tool_specified"; then
66910           # A command without a complete path is provided, search $PATH.
66911           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66912 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66913           # Extract the first word of "$tool_basename", so it can be a program name with args.
66914 set dummy $tool_basename; ac_word=$2
66915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66916 $as_echo_n "checking for $ac_word... " >&6; }
66917 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66918   $as_echo_n "(cached) " >&6
66919 else
66920   case $ICECC_CREATE_ENV in
66921   [\\/]* | ?:[\\/]*)
66922   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66923   ;;
66924   *)
66925   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66926 for as_dir in $PATH
66927 do
66928   IFS=$as_save_IFS
66929   test -z "$as_dir" && as_dir=.
66930     for ac_exec_ext in '' $ac_executable_extensions; do
66931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66932     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66934     break 2
66935   fi
66936 done
66937   done
66938 IFS=$as_save_IFS
66939 
66940   ;;
66941 esac
66942 fi
66943 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66944 if test -n "$ICECC_CREATE_ENV"; then
66945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66946 $as_echo "$ICECC_CREATE_ENV" >&6; }
66947 else
66948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66949 $as_echo "no" >&6; }
66950 fi
66951 
66952 
66953           if test "x$ICECC_CREATE_ENV" = x; then
66954             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66955           fi
66956         else
66957           # Otherwise we believe it is a complete path. Use it as it is.
66958           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66959 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66960           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66961 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66962           if test ! -x "$tool_specified"; then
66963             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66964 $as_echo "not found" >&6; }
66965             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66966           fi
66967           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66968 $as_echo "$tool_specified" >&6; }
66969         fi
66970       fi
66971     fi
66972 
66973   fi
66974 
66975 
66976 
66977   if test "x$ICECC_CREATE_ENV" = x; then
66978     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66979   fi
66980 
66981 
66982     # Use icecc-create-env to create a minimal compilation environment that can
66983     # be sent to the other hosts in the icecream cluster.
66984     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66985     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66986     # Older versions of icecc does not have the --gcc parameter
66987     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66988       icecc_gcc_arg="--gcc"
66989     fi
66990     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66991 
66992   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66993       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66994           ${icecc_create_env_log} 2>&1 )
66995   if test "$?" != "0"; then
66996     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66997 $as_echo "$as_me: icecc-create-env output:" >&6;}
66998     cat \
66999           ${icecc_create_env_log}
67000     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67001   fi
67002 
67003     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
67004       # For clang, the icecc compilerwrapper is needed. It usually resides next
67005       # to icecc-create-env.
67006 
67007 
67008 
67009   # Publish this variable in the help.
67010 
67011 
67012   if [ -z "${ICECC_WRAPPER+x}" ]; then
67013     # The variable is not set by user, try to locate tool using the code snippet
67014     for ac_prog in compilerwrapper
67015 do
67016   # Extract the first word of "$ac_prog", so it can be a program name with args.
67017 set dummy $ac_prog; ac_word=$2
67018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67019 $as_echo_n "checking for $ac_word... " >&6; }
67020 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67021   $as_echo_n "(cached) " >&6
67022 else
67023   case $ICECC_WRAPPER in
67024   [\\/]* | ?:[\\/]*)
67025   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67026   ;;
67027   *)
67028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67029 for as_dir in $PATH
67030 do
67031   IFS=$as_save_IFS
67032   test -z "$as_dir" && as_dir=.
67033     for ac_exec_ext in '' $ac_executable_extensions; do
67034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67035     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67037     break 2
67038   fi
67039 done
67040   done
67041 IFS=$as_save_IFS
67042 
67043   ;;
67044 esac
67045 fi
67046 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67047 if test -n "$ICECC_WRAPPER"; then
67048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67049 $as_echo "$ICECC_WRAPPER" >&6; }
67050 else
67051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67052 $as_echo "no" >&6; }
67053 fi
67054 
67055 
67056   test -n "$ICECC_WRAPPER" && break
67057 done
67058 
67059   else
67060     # The variable is set, but is it from the command line or the environment?
67061 
67062     # Try to remove the string !ICECC_WRAPPER! from our list.
67063     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
67064     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67065       # If it failed, the variable was not from the command line. Ignore it,
67066       # but warn the user (except for BASH, which is always set by the calling BASH).
67067       if test "xICECC_WRAPPER" != xBASH; then
67068         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
67069 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
67070       fi
67071       # Try to locate tool using the code snippet
67072       for ac_prog in compilerwrapper
67073 do
67074   # Extract the first word of "$ac_prog", so it can be a program name with args.
67075 set dummy $ac_prog; ac_word=$2
67076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67077 $as_echo_n "checking for $ac_word... " >&6; }
67078 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67079   $as_echo_n "(cached) " >&6
67080 else
67081   case $ICECC_WRAPPER in
67082   [\\/]* | ?:[\\/]*)
67083   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67084   ;;
67085   *)
67086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67087 for as_dir in $PATH
67088 do
67089   IFS=$as_save_IFS
67090   test -z "$as_dir" && as_dir=.
67091     for ac_exec_ext in '' $ac_executable_extensions; do
67092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67093     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67095     break 2
67096   fi
67097 done
67098   done
67099 IFS=$as_save_IFS
67100 
67101   ;;
67102 esac
67103 fi
67104 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67105 if test -n "$ICECC_WRAPPER"; then
67106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67107 $as_echo "$ICECC_WRAPPER" >&6; }
67108 else
67109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67110 $as_echo "no" >&6; }
67111 fi
67112 
67113 
67114   test -n "$ICECC_WRAPPER" && break
67115 done
67116 
67117     else
67118       # If it succeeded, then it was overridden by the user. We will use it
67119       # for the tool.
67120 
67121       # First remove it from the list of overridden variables, so we can test
67122       # for unknown variables in the end.
67123       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67124 
67125       # Check if we try to supply an empty value
67126       if test "x$ICECC_WRAPPER" = x; then
67127         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
67128 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
67129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67130 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67131         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67132 $as_echo "disabled" >&6; }
67133       else
67134         # Check if the provided tool contains a complete path.
67135         tool_specified="$ICECC_WRAPPER"
67136         tool_basename="${tool_specified##*/}"
67137         if test "x$tool_basename" = "x$tool_specified"; then
67138           # A command without a complete path is provided, search $PATH.
67139           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
67140 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
67141           # Extract the first word of "$tool_basename", so it can be a program name with args.
67142 set dummy $tool_basename; ac_word=$2
67143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67144 $as_echo_n "checking for $ac_word... " >&6; }
67145 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67146   $as_echo_n "(cached) " >&6
67147 else
67148   case $ICECC_WRAPPER in
67149   [\\/]* | ?:[\\/]*)
67150   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67151   ;;
67152   *)
67153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67154 for as_dir in $PATH
67155 do
67156   IFS=$as_save_IFS
67157   test -z "$as_dir" && as_dir=.
67158     for ac_exec_ext in '' $ac_executable_extensions; do
67159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67160     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67162     break 2
67163   fi
67164 done
67165   done
67166 IFS=$as_save_IFS
67167 
67168   ;;
67169 esac
67170 fi
67171 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67172 if test -n "$ICECC_WRAPPER"; then
67173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67174 $as_echo "$ICECC_WRAPPER" >&6; }
67175 else
67176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67177 $as_echo "no" >&6; }
67178 fi
67179 
67180 
67181           if test "x$ICECC_WRAPPER" = x; then
67182             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67183           fi
67184         else
67185           # Otherwise we believe it is a complete path. Use it as it is.
67186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67187 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67188           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67189 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67190           if test ! -x "$tool_specified"; then
67191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67192 $as_echo "not found" >&6; }
67193             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67194           fi
67195           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67196 $as_echo "$tool_specified" >&6; }
67197         fi
67198       fi
67199     fi
67200 
67201   fi
67202 
67203 
67204 
67205   if test "x$ICECC_WRAPPER" = x; then
67206     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67207   fi
67208 
67209 
67210 
67211   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67212       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67213   if test "$?" != "0"; then
67214     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67215 $as_echo "$as_me: icecc-create-env output:" >&6;}
67216     cat ${icecc_create_env_log}
67217     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67218   fi
67219 
67220     else
67221       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67222     fi
67223     PATH="$old_path"
67224     # The bundle with the compiler gets a name based on checksums. Parse log file
67225     # to find it.
67226     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67227     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67228     if test ! -f ${ICECC_ENV_BUNDLE}; then
67229       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67230     fi
67231     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67232 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67233     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67234 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67235     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67236 
67237     if test "x${COMPILE_TYPE}" = "xcross"; then
67238       # If cross compiling, create a separate env package for the build compiler
67239       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67240       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67241       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67242 
67243   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67244       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67245             ${icecc_create_env_log_build} 2>&1 )
67246   if test "$?" != "0"; then
67247     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67248 $as_echo "$as_me: icecc-create-env output:" >&6;}
67249     cat \
67250             ${icecc_create_env_log_build}
67251     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67252   fi
67253 
67254       elif test "x${BUILD_CC##*/}" = "xclang"; then
67255 
67256   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67257       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67258   if test "$?" != "0"; then
67259     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67260 $as_echo "$as_me: icecc-create-env output:" >&6;}
67261     cat ${icecc_create_env_log_build}
67262     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67263   fi
67264 
67265       else
67266         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67267       fi
67268       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67269       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67270       if test ! -f ${ICECC_ENV_BUNDLE}; then
67271         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67272       fi
67273       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67274 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67275       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67276 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67277       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67278           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67279     else
67280       BUILD_ICECC="${ICECC}"
67281     fi
67282 
67283 
67284   fi
67285 
67286 
67287 # Can the C/C++ compiler use precompiled headers?
67288 
67289 
67290   ###############################################################################
67291   #
67292   # Can the C/C++ compiler use precompiled headers?
67293   #
67294   # Check whether --enable-precompiled-headers was given.
67295 if test "${enable_precompiled_headers+set}" = set; then :
67296   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67297 else
67298   ENABLE_PRECOMPH=yes
67299 fi
67300 
67301 
67302   USE_PRECOMPILED_HEADER=true
67303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67304 $as_echo_n "checking If precompiled header is enabled... " >&6; }
67305   if test "x$ENABLE_PRECOMPH" = xno; then
67306     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67307 $as_echo "no, forced" >&6; }
67308     USE_PRECOMPILED_HEADER=false
67309   elif test "x$ICECC" != "x"; then
67310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67311 $as_echo "no, does not work effectively with icecc" >&6; }
67312     USE_PRECOMPILED_HEADER=false
67313   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67314     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67315 $as_echo "no, does not work with Solaris Studio" >&6; }
67316     USE_PRECOMPILED_HEADER=false
67317   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67318     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67319 $as_echo "no, does not work with xlc" >&6; }
67320     USE_PRECOMPILED_HEADER=false
67321   else
67322     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67323 $as_echo "yes" >&6; }
67324   fi
67325 
67326   if test "x$ENABLE_PRECOMPH" = xyes; then
67327     # Check that the compiler actually supports precomp headers.
67328     if test "x$TOOLCHAIN_TYPE" = xgcc; then
67329       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67330 $as_echo_n "checking that precompiled headers work... " >&6; }
67331       echo "int alfa();" > conftest.h
67332       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67333       if test ! -f conftest.hpp.gch; then
67334         USE_PRECOMPILED_HEADER=false
67335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67336 $as_echo "no" >&6; }
67337       else
67338         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67339 $as_echo "yes" >&6; }
67340       fi
67341       $RM conftest.h conftest.hpp.gch
67342     fi
67343   fi
67344 
67345 
67346 
67347 
67348 # Setup use of ccache, if available
67349 
67350   # Check whether --enable-ccache was given.
67351 if test "${enable_ccache+set}" = set; then :
67352   enableval=$enable_ccache;
67353 fi
67354 
67355 
67356   CCACHE_STATUS=
67357   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67358 $as_echo_n "checking is ccache enabled... " >&6; }
67359   if test "x$enable_ccache" = xyes; then
67360     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67361       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67362 $as_echo "yes" >&6; }
67363       OLD_PATH="$PATH"
67364       if test "x$TOOLCHAIN_PATH" != x; then
67365         PATH=$TOOLCHAIN_PATH:$PATH
67366       fi
67367 
67368 
67369 
67370   # Publish this variable in the help.
67371 
67372 
67373   if [ -z "${CCACHE+x}" ]; then
67374     # The variable is not set by user, try to locate tool using the code snippet
67375     for ac_prog in ccache
67376 do
67377   # Extract the first word of "$ac_prog", so it can be a program name with args.
67378 set dummy $ac_prog; ac_word=$2
67379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67380 $as_echo_n "checking for $ac_word... " >&6; }
67381 if ${ac_cv_path_CCACHE+:} false; then :
67382   $as_echo_n "(cached) " >&6
67383 else
67384   case $CCACHE in
67385   [\\/]* | ?:[\\/]*)
67386   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67387   ;;
67388   *)
67389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67390 for as_dir in $PATH
67391 do
67392   IFS=$as_save_IFS
67393   test -z "$as_dir" && as_dir=.
67394     for ac_exec_ext in '' $ac_executable_extensions; do
67395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67396     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67398     break 2
67399   fi
67400 done
67401   done
67402 IFS=$as_save_IFS
67403 
67404   ;;
67405 esac
67406 fi
67407 CCACHE=$ac_cv_path_CCACHE
67408 if test -n "$CCACHE"; then
67409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67410 $as_echo "$CCACHE" >&6; }
67411 else
67412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67413 $as_echo "no" >&6; }
67414 fi
67415 
67416 
67417   test -n "$CCACHE" && break
67418 done
67419 
67420   else
67421     # The variable is set, but is it from the command line or the environment?
67422 
67423     # Try to remove the string !CCACHE! from our list.
67424     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67425     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67426       # If it failed, the variable was not from the command line. Ignore it,
67427       # but warn the user (except for BASH, which is always set by the calling BASH).
67428       if test "xCCACHE" != xBASH; then
67429         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67430 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67431       fi
67432       # Try to locate tool using the code snippet
67433       for ac_prog in ccache
67434 do
67435   # Extract the first word of "$ac_prog", so it can be a program name with args.
67436 set dummy $ac_prog; ac_word=$2
67437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67438 $as_echo_n "checking for $ac_word... " >&6; }
67439 if ${ac_cv_path_CCACHE+:} false; then :
67440   $as_echo_n "(cached) " >&6
67441 else
67442   case $CCACHE in
67443   [\\/]* | ?:[\\/]*)
67444   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67445   ;;
67446   *)
67447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67448 for as_dir in $PATH
67449 do
67450   IFS=$as_save_IFS
67451   test -z "$as_dir" && as_dir=.
67452     for ac_exec_ext in '' $ac_executable_extensions; do
67453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67454     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67456     break 2
67457   fi
67458 done
67459   done
67460 IFS=$as_save_IFS
67461 
67462   ;;
67463 esac
67464 fi
67465 CCACHE=$ac_cv_path_CCACHE
67466 if test -n "$CCACHE"; then
67467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67468 $as_echo "$CCACHE" >&6; }
67469 else
67470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67471 $as_echo "no" >&6; }
67472 fi
67473 
67474 
67475   test -n "$CCACHE" && break
67476 done
67477 
67478     else
67479       # If it succeeded, then it was overridden by the user. We will use it
67480       # for the tool.
67481 
67482       # First remove it from the list of overridden variables, so we can test
67483       # for unknown variables in the end.
67484       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67485 
67486       # Check if we try to supply an empty value
67487       if test "x$CCACHE" = x; then
67488         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67489 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67490         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67491 $as_echo_n "checking for CCACHE... " >&6; }
67492         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67493 $as_echo "disabled" >&6; }
67494       else
67495         # Check if the provided tool contains a complete path.
67496         tool_specified="$CCACHE"
67497         tool_basename="${tool_specified##*/}"
67498         if test "x$tool_basename" = "x$tool_specified"; then
67499           # A command without a complete path is provided, search $PATH.
67500           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67501 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67502           # Extract the first word of "$tool_basename", so it can be a program name with args.
67503 set dummy $tool_basename; ac_word=$2
67504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67505 $as_echo_n "checking for $ac_word... " >&6; }
67506 if ${ac_cv_path_CCACHE+:} false; then :
67507   $as_echo_n "(cached) " >&6
67508 else
67509   case $CCACHE in
67510   [\\/]* | ?:[\\/]*)
67511   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67512   ;;
67513   *)
67514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67515 for as_dir in $PATH
67516 do
67517   IFS=$as_save_IFS
67518   test -z "$as_dir" && as_dir=.
67519     for ac_exec_ext in '' $ac_executable_extensions; do
67520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67521     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67523     break 2
67524   fi
67525 done
67526   done
67527 IFS=$as_save_IFS
67528 
67529   ;;
67530 esac
67531 fi
67532 CCACHE=$ac_cv_path_CCACHE
67533 if test -n "$CCACHE"; then
67534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67535 $as_echo "$CCACHE" >&6; }
67536 else
67537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67538 $as_echo "no" >&6; }
67539 fi
67540 
67541 
67542           if test "x$CCACHE" = x; then
67543             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67544           fi
67545         else
67546           # Otherwise we believe it is a complete path. Use it as it is.
67547           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67548 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67549           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67550 $as_echo_n "checking for CCACHE... " >&6; }
67551           if test ! -x "$tool_specified"; then
67552             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67553 $as_echo "not found" >&6; }
67554             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67555           fi
67556           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67557 $as_echo "$tool_specified" >&6; }
67558         fi
67559       fi
67560     fi
67561 
67562   fi
67563 
67564 
67565 
67566   if test "x$CCACHE" = x; then
67567     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67568   fi
67569 
67570 
67571       PATH="$OLD_PATH"
67572       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67573       CCACHE_STATUS="Active ($CCACHE_VERSION)"
67574     else
67575       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67576 $as_echo "no" >&6; }
67577       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67578 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67579     fi
67580   elif test "x$enable_ccache" = xno; then
67581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67582 $as_echo "no, explicitly disabled" >&6; }
67583     CCACHE_STATUS="Disabled"
67584   elif test "x$enable_ccache" = x; then
67585     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67586 $as_echo "no" >&6; }
67587   else
67588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67589 $as_echo "unknown" >&6; }
67590     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67591   fi
67592 
67593 
67594 
67595 # Check whether --with-ccache-dir was given.
67596 if test "${with_ccache_dir+set}" = set; then :
67597   withval=$with_ccache_dir;
67598 fi
67599 
67600 
67601   if test "x$with_ccache_dir" != x; then
67602     # When using a non home ccache directory, assume the use is to share ccache files
67603     # with other users. Thus change the umask.
67604     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67605     if test "x$CCACHE" = x; then
67606       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67607 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67608     fi
67609   fi
67610 
67611   if test "x$CCACHE" != x; then
67612 
67613   if test "x$CCACHE" != x; then
67614     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67615       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67616           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67617       if test "x$HAS_BAD_CCACHE" != "x"; then
67618         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67619       fi
67620     fi
67621     if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67622       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67623           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67624       if test "x$HAS_BAD_CCACHE" != "x"; then
67625         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67626       fi
67627       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67628 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67629       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67630       PUSHED_FLAGS="$CXXFLAGS"
67631       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67632       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67633 /* end confdefs.h.  */
67634 
67635 int
67636 main ()
67637 {
67638 
67639   ;
67640   return 0;
67641 }
67642 _ACEOF
67643 if ac_fn_cxx_try_compile "$LINENO"; then :
67644   CC_KNOWS_CCACHE_TRICK=yes
67645 else
67646   CC_KNOWS_CCACHE_TRICK=no
67647 fi
67648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67649       CXXFLAGS="$PUSHED_FLAGS"
67650       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67651         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67652 $as_echo "yes" >&6; }
67653         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67654 
67655         CCACHE_SLOPPINESS=pch_defines,time_macros
67656       else
67657         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67658 $as_echo "no" >&6; }
67659         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67660       fi
67661     fi
67662 
67663     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67664         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67665 
67666     if test "x$SET_CCACHE_DIR" != x; then
67667       mkdir -p $CCACHE_DIR > /dev/null 2>&1
67668       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67669     fi
67670   fi
67671 
67672   fi
67673 
67674 
67675 ###############################################################################
67676 #
67677 # And now the finish...
67678 #
67679 ###############################################################################
67680 
67681 # Check for some common pitfalls
67682 
67683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67684     file_to_test="$SRC_ROOT/LICENSE"
67685     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67686       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
67687     fi
67688   fi
67689 
67690 
67691   # Did user specify any unknown variables?
67692 
67693   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67694     # Replace the separating ! with spaces before presenting for end user.
67695     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67696     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67697 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67698   fi
67699 
67700 
67701   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67702 $as_echo_n "checking if build directory is on local disk... " >&6; }
67703 
67704   # df -l lists only local disks; if the given directory is not found then
67705   # a non-zero exit code is given
67706   if test "x$DF" = x; then
67707     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67708       # msys does not have df; use Windows "net use" instead.
67709       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67710       if test "x$IS_NETWORK_DISK" = x; then
67711         OUTPUT_DIR_IS_LOCAL="yes"
67712       else
67713         OUTPUT_DIR_IS_LOCAL="no"
67714       fi
67715     else
67716       # No df here, say it's local
67717       OUTPUT_DIR_IS_LOCAL="yes"
67718     fi
67719   else
67720     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67721       OUTPUT_DIR_IS_LOCAL="yes"
67722     else
67723       OUTPUT_DIR_IS_LOCAL="no"
67724     fi
67725   fi
67726 
67727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67728 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67729 
67730 
67731 
67732   # Check if the user has any old-style ALT_ variables set.
67733   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67734 
67735   # Before generating output files, test if they exist. If they do, this is a reconfigure.
67736   # Since we can't properly handle the dependencies for this, warn the user about the situation
67737   if test -e $OUTPUT_ROOT/spec.gmk; then
67738     IS_RECONFIGURE=yes
67739   else
67740     IS_RECONFIGURE=no
67741   fi
67742 
67743 
67744 # At the end, call the custom hook. (Dummy macro if no custom sources available)
67745 
67746 
67747 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67748 
67749   # Keep feature lists sorted and free of duplicates
67750   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67751   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67752   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67753   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67754   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67755   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67756   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67757 
67758   # Validate features
67759   for variant in $JVM_VARIANTS; do
67760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67761 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67762     features_var_name=JVM_FEATURES_$variant
67763     JVM_FEATURES_TO_TEST=${!features_var_name}
67764     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67765 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67766     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67767     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67768     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67769     if test "x$INVALID_FEATURES" != x; then
67770       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67771     fi
67772   done
67773 
67774 
67775 # We're messing a bit with internal autoconf variables to put the config.status
67776 # in the output directory instead of the current directory.
67777 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67778 
67779 # Create the actual output files. Now the main work of configure is done.
67780 cat >confcache <<\_ACEOF
67781 # This file is a shell script that caches the results of configure
67782 # tests run on this system so they can be shared between configure
67783 # scripts and configure runs, see configure's option --config-cache.
67784 # It is not useful on other systems.  If it contains results you don't
67785 # want to keep, you may remove or edit it.
67786 #
67787 # config.status only pays attention to the cache file if you give it
67788 # the --recheck option to rerun configure.
67789 #
67790 # `ac_cv_env_foo' variables (set or unset) will be overridden when
67791 # loading this file, other *unset* `ac_cv_foo' will be assigned the
67792 # following values.
67793 
67794 _ACEOF
67795 
67796 # The following way of writing the cache mishandles newlines in values,
67797 # but we know of no workaround that is simple, portable, and efficient.
67798 # So, we kill variables containing newlines.
67799 # Ultrix sh set writes to stderr and can't be redirected directly,
67800 # and sets the high bit in the cache file unless we assign to the vars.
67801 (
67802   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67803     eval ac_val=\$$ac_var
67804     case $ac_val in #(
67805     *${as_nl}*)
67806       case $ac_var in #(
67807       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67808 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67809       esac
67810       case $ac_var in #(
67811       _ | IFS | as_nl) ;; #(
67812       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67813       *) { eval $ac_var=; unset $ac_var;} ;;
67814       esac ;;
67815     esac
67816   done
67817 
67818   (set) 2>&1 |
67819     case $as_nl`(ac_space=' '; set) 2>&1` in #(
67820     *${as_nl}ac_space=\ *)
67821       # `set' does not quote correctly, so add quotes: double-quote
67822       # substitution turns \\\\ into \\, and sed turns \\ into \.
67823       sed -n \
67824         "s/'/'\\\\''/g;
67825           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67826       ;; #(
67827     *)
67828       # `set' quotes correctly as required by POSIX, so do not add quotes.
67829       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67830       ;;
67831     esac |
67832     sort
67833 ) |
67834   sed '
67835      /^ac_cv_env_/b end
67836      t clear
67837      :clear
67838      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67839      t end
67840      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67841      :end' >>confcache
67842 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67843   if test -w "$cache_file"; then
67844     if test "x$cache_file" != "x/dev/null"; then
67845       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67846 $as_echo "$as_me: updating cache $cache_file" >&6;}
67847       if test ! -f "$cache_file" || test -h "$cache_file"; then
67848         cat confcache >"$cache_file"
67849       else
67850         case $cache_file in #(
67851         */* | ?:*)
67852           mv -f confcache "$cache_file"$$ &&
67853           mv -f "$cache_file"$$ "$cache_file" ;; #(
67854         *)
67855           mv -f confcache "$cache_file" ;;
67856         esac
67857       fi
67858     fi
67859   else
67860     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67861 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67862   fi
67863 fi
67864 rm -f confcache
67865 
67866 test "x$prefix" = xNONE && prefix=$ac_default_prefix
67867 # Let make expand exec_prefix.
67868 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67869 
67870 # Transform confdefs.h into DEFS.
67871 # Protect against shell expansion while executing Makefile rules.
67872 # Protect against Makefile macro expansion.
67873 #
67874 # If the first sed substitution is executed (which looks for macros that
67875 # take arguments), then branch to the quote section.  Otherwise,
67876 # look for a macro that doesn't take arguments.
67877 ac_script='
67878 :mline
67879 /\\$/{
67880  N
67881  s,\\\n,,
67882  b mline
67883 }
67884 t clear
67885 :clear
67886 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
67887 t quote
67888 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
67889 t quote
67890 b any
67891 :quote
67892 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67893 s/\[/\\&/g
67894 s/\]/\\&/g
67895 s/\$/$$/g
67896 H
67897 :any
67898 ${
67899         g
67900         s/^\n//
67901         s/\n/ /g
67902         p
67903 }
67904 '
67905 DEFS=`sed -n "$ac_script" confdefs.h`
67906 
67907 
67908 ac_libobjs=
67909 ac_ltlibobjs=
67910 U=
67911 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67912   # 1. Remove the extension, and $U if already installed.
67913   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67914   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67915   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67916   #    will be set to the directory where LIBOBJS objects are built.
67917   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67918   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67919 done
67920 LIBOBJS=$ac_libobjs
67921 
67922 LTLIBOBJS=$ac_ltlibobjs
67923 
67924 
67925 
67926 : "${CONFIG_STATUS=./config.status}"
67927 ac_write_fail=0
67928 ac_clean_files_save=$ac_clean_files
67929 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67930 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67931 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67932 as_write_fail=0
67933 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67934 #! $SHELL
67935 # Generated by $as_me.
67936 # Run this file to recreate the current configuration.
67937 # Compiler output produced by configure, useful for debugging
67938 # configure, is in config.log if it exists.
67939 
67940 debug=false
67941 ac_cs_recheck=false
67942 ac_cs_silent=false
67943 
67944 SHELL=\${CONFIG_SHELL-$SHELL}
67945 export SHELL
67946 _ASEOF
67947 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67948 ## -------------------- ##
67949 ## M4sh Initialization. ##
67950 ## -------------------- ##
67951 
67952 # Be more Bourne compatible
67953 DUALCASE=1; export DUALCASE # for MKS sh
67954 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67955   emulate sh
67956   NULLCMD=:
67957   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67958   # is contrary to our usage.  Disable this feature.
67959   alias -g '${1+"$@"}'='"$@"'
67960   setopt NO_GLOB_SUBST
67961 else
67962   case `(set -o) 2>/dev/null` in #(
67963   *posix*) :
67964     set -o posix ;; #(
67965   *) :
67966      ;;
67967 esac
67968 fi
67969 
67970 
67971 as_nl='
67972 '
67973 export as_nl
67974 # Printing a long string crashes Solaris 7 /usr/bin/printf.
67975 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67976 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67977 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67978 # Prefer a ksh shell builtin over an external printf program on Solaris,
67979 # but without wasting forks for bash or zsh.
67980 if test -z "$BASH_VERSION$ZSH_VERSION" \
67981     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67982   as_echo='print -r --'
67983   as_echo_n='print -rn --'
67984 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67985   as_echo='printf %s\n'
67986   as_echo_n='printf %s'
67987 else
67988   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67989     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67990     as_echo_n='/usr/ucb/echo -n'
67991   else
67992     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67993     as_echo_n_body='eval
67994       arg=$1;
67995       case $arg in #(
67996       *"$as_nl"*)
67997         expr "X$arg" : "X\\(.*\\)$as_nl";
67998         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67999       esac;
68000       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68001     '
68002     export as_echo_n_body
68003     as_echo_n='sh -c $as_echo_n_body as_echo'
68004   fi
68005   export as_echo_body
68006   as_echo='sh -c $as_echo_body as_echo'
68007 fi
68008 
68009 # The user is always right.
68010 if test "${PATH_SEPARATOR+set}" != set; then
68011   PATH_SEPARATOR=:
68012   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
68013     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
68014       PATH_SEPARATOR=';'
68015   }
68016 fi
68017 
68018 
68019 # IFS
68020 # We need space, tab and new line, in precisely that order.  Quoting is
68021 # there to prevent editors from complaining about space-tab.
68022 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
68023 # splitting by setting IFS to empty value.)
68024 IFS=" ""        $as_nl"
68025 
68026 # Find who we are.  Look in the path if we contain no directory separator.
68027 as_myself=
68028 case $0 in #((
68029   *[\\/]* ) as_myself=$0 ;;
68030   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68031 for as_dir in $PATH
68032 do
68033   IFS=$as_save_IFS
68034   test -z "$as_dir" && as_dir=.
68035     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
68036   done
68037 IFS=$as_save_IFS
68038 
68039      ;;
68040 esac
68041 # We did not find ourselves, most probably we were run as `sh COMMAND'
68042 # in which case we are not to be found in the path.
68043 if test "x$as_myself" = x; then
68044   as_myself=$0
68045 fi
68046 if test ! -f "$as_myself"; then
68047   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
68048   exit 1
68049 fi
68050 
68051 # Unset variables that we do not need and which cause bugs (e.g. in
68052 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
68053 # suppresses any "Segmentation fault" message there.  '((' could
68054 # trigger a bug in pdksh 5.2.14.
68055 for as_var in BASH_ENV ENV MAIL MAILPATH
68056 do eval test x\${$as_var+set} = xset \
68057   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68058 done
68059 PS1='$ '
68060 PS2='> '
68061 PS4='+ '
68062 
68063 # NLS nuisances.
68064 LC_ALL=C
68065 export LC_ALL
68066 LANGUAGE=C
68067 export LANGUAGE
68068 
68069 # CDPATH.
68070 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
68071 
68072 
68073 # as_fn_error STATUS ERROR [LINENO LOG_FD]
68074 # ----------------------------------------
68075 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
68076 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
68077 # script with STATUS, using 1 if that was 0.
68078 as_fn_error ()
68079 {
68080   as_status=$1; test $as_status -eq 0 && as_status=1
68081   if test "$4"; then
68082     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
68083     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
68084   fi
68085   $as_echo "$as_me: error: $2" >&2
68086   as_fn_exit $as_status
68087 } # as_fn_error
68088 
68089 
68090 # as_fn_set_status STATUS
68091 # -----------------------
68092 # Set $? to STATUS, without forking.
68093 as_fn_set_status ()
68094 {
68095   return $1
68096 } # as_fn_set_status
68097 
68098 # as_fn_exit STATUS
68099 # -----------------
68100 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
68101 as_fn_exit ()
68102 {
68103   set +e
68104   as_fn_set_status $1
68105   exit $1
68106 } # as_fn_exit
68107 
68108 # as_fn_unset VAR
68109 # ---------------
68110 # Portably unset VAR.
68111 as_fn_unset ()
68112 {
68113   { eval $1=; unset $1;}
68114 }
68115 as_unset=as_fn_unset
68116 # as_fn_append VAR VALUE
68117 # ----------------------
68118 # Append the text in VALUE to the end of the definition contained in VAR. Take
68119 # advantage of any shell optimizations that allow amortized linear growth over
68120 # repeated appends, instead of the typical quadratic growth present in naive
68121 # implementations.
68122 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
68123   eval 'as_fn_append ()
68124   {
68125     eval $1+=\$2
68126   }'
68127 else
68128   as_fn_append ()
68129   {
68130     eval $1=\$$1\$2
68131   }
68132 fi # as_fn_append
68133 
68134 # as_fn_arith ARG...
68135 # ------------------
68136 # Perform arithmetic evaluation on the ARGs, and store the result in the
68137 # global $as_val. Take advantage of shells that can avoid forks. The arguments
68138 # must be portable across $(()) and expr.
68139 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
68140   eval 'as_fn_arith ()
68141   {
68142     as_val=$(( $* ))
68143   }'
68144 else
68145   as_fn_arith ()
68146   {
68147     as_val=`expr "$@" || test $? -eq 1`
68148   }
68149 fi # as_fn_arith
68150 
68151 
68152 if expr a : '\(a\)' >/dev/null 2>&1 &&
68153    test "X`expr 00001 : '.*\(...\)'`" = X001; then
68154   as_expr=expr
68155 else
68156   as_expr=false
68157 fi
68158 
68159 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68160   as_basename=basename
68161 else
68162   as_basename=false
68163 fi
68164 
68165 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68166   as_dirname=dirname
68167 else
68168   as_dirname=false
68169 fi
68170 
68171 as_me=`$as_basename -- "$0" ||
68172 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68173          X"$0" : 'X\(//\)$' \| \
68174          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68175 $as_echo X/"$0" |
68176     sed '/^.*\/\([^/][^/]*\)\/*$/{
68177             s//\1/
68178             q
68179           }
68180           /^X\/\(\/\/\)$/{
68181             s//\1/
68182             q
68183           }
68184           /^X\/\(\/\).*/{
68185             s//\1/
68186             q
68187           }
68188           s/.*/./; q'`
68189 
68190 # Avoid depending upon Character Ranges.
68191 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68192 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68193 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68194 as_cr_digits='0123456789'
68195 as_cr_alnum=$as_cr_Letters$as_cr_digits
68196 
68197 ECHO_C= ECHO_N= ECHO_T=
68198 case `echo -n x` in #(((((
68199 -n*)
68200   case `echo 'xy\c'` in
68201   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
68202   xy)  ECHO_C='\c';;
68203   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68204        ECHO_T=' ';;
68205   esac;;
68206 *)
68207   ECHO_N='-n';;
68208 esac
68209 
68210 rm -f conf$$ conf$$.exe conf$$.file
68211 if test -d conf$$.dir; then
68212   rm -f conf$$.dir/conf$$.file
68213 else
68214   rm -f conf$$.dir
68215   mkdir conf$$.dir 2>/dev/null
68216 fi
68217 if (echo >conf$$.file) 2>/dev/null; then
68218   if ln -s conf$$.file conf$$ 2>/dev/null; then
68219     as_ln_s='ln -s'
68220     # ... but there are two gotchas:
68221     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68222     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68223     # In both cases, we have to default to `cp -pR'.
68224     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68225       as_ln_s='cp -pR'
68226   elif ln conf$$.file conf$$ 2>/dev/null; then
68227     as_ln_s=ln
68228   else
68229     as_ln_s='cp -pR'
68230   fi
68231 else
68232   as_ln_s='cp -pR'
68233 fi
68234 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68235 rmdir conf$$.dir 2>/dev/null
68236 
68237 
68238 # as_fn_mkdir_p
68239 # -------------
68240 # Create "$as_dir" as a directory, including parents if necessary.
68241 as_fn_mkdir_p ()
68242 {
68243 
68244   case $as_dir in #(
68245   -*) as_dir=./$as_dir;;
68246   esac
68247   test -d "$as_dir" || eval $as_mkdir_p || {
68248     as_dirs=
68249     while :; do
68250       case $as_dir in #(
68251       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68252       *) as_qdir=$as_dir;;
68253       esac
68254       as_dirs="'$as_qdir' $as_dirs"
68255       as_dir=`$as_dirname -- "$as_dir" ||
68256 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68257          X"$as_dir" : 'X\(//\)[^/]' \| \
68258          X"$as_dir" : 'X\(//\)$' \| \
68259          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68260 $as_echo X"$as_dir" |
68261     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68262             s//\1/
68263             q
68264           }
68265           /^X\(\/\/\)[^/].*/{
68266             s//\1/
68267             q
68268           }
68269           /^X\(\/\/\)$/{
68270             s//\1/
68271             q
68272           }
68273           /^X\(\/\).*/{
68274             s//\1/
68275             q
68276           }
68277           s/.*/./; q'`
68278       test -d "$as_dir" && break
68279     done
68280     test -z "$as_dirs" || eval "mkdir $as_dirs"
68281   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68282 
68283 
68284 } # as_fn_mkdir_p
68285 if mkdir -p . 2>/dev/null; then
68286   as_mkdir_p='mkdir -p "$as_dir"'
68287 else
68288   test -d ./-p && rmdir ./-p
68289   as_mkdir_p=false
68290 fi
68291 
68292 
68293 # as_fn_executable_p FILE
68294 # -----------------------
68295 # Test if FILE is an executable regular file.
68296 as_fn_executable_p ()
68297 {
68298   test -f "$1" && test -x "$1"
68299 } # as_fn_executable_p
68300 as_test_x='test -x'
68301 as_executable_p=as_fn_executable_p
68302 
68303 # Sed expression to map a string onto a valid CPP name.
68304 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68305 
68306 # Sed expression to map a string onto a valid variable name.
68307 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68308 
68309 
68310 exec 6>&1
68311 ## ----------------------------------- ##
68312 ## Main body of $CONFIG_STATUS script. ##
68313 ## ----------------------------------- ##
68314 _ASEOF
68315 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68316 
68317 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68318 # Save the log message, to keep $0 and so on meaningful, and to
68319 # report actual input values of CONFIG_FILES etc. instead of their
68320 # values after options handling.
68321 ac_log="
68322 This file was extended by OpenJDK $as_me jdk9, which was
68323 generated by GNU Autoconf 2.69.  Invocation command line was
68324 
68325   CONFIG_FILES    = $CONFIG_FILES
68326   CONFIG_HEADERS  = $CONFIG_HEADERS
68327   CONFIG_LINKS    = $CONFIG_LINKS
68328   CONFIG_COMMANDS = $CONFIG_COMMANDS
68329   $ $0 $@
68330 
68331 on `(hostname || uname -n) 2>/dev/null | sed 1q`
68332 "
68333 
68334 _ACEOF
68335 
68336 case $ac_config_files in *"
68337 "*) set x $ac_config_files; shift; ac_config_files=$*;;
68338 esac
68339 
68340 
68341 
68342 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68343 # Files that config.status was made for.
68344 config_files="$ac_config_files"
68345 
68346 _ACEOF
68347 
68348 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68349 ac_cs_usage="\
68350 \`$as_me' instantiates files and other configuration actions
68351 from templates according to the current configuration.  Unless the files
68352 and actions are specified as TAGs, all are instantiated by default.
68353 
68354 Usage: $0 [OPTION]... [TAG]...
68355 
68356   -h, --help       print this help, then exit
68357   -V, --version    print version number and configuration settings, then exit
68358       --config     print configuration, then exit
68359   -q, --quiet, --silent
68360                    do not print progress messages
68361   -d, --debug      don't remove temporary files
68362       --recheck    update $as_me by reconfiguring in the same conditions
68363       --file=FILE[:TEMPLATE]
68364                    instantiate the configuration file FILE
68365 
68366 Configuration files:
68367 $config_files
68368 
68369 Report bugs to <build-dev@openjdk.java.net>.
68370 OpenJDK home page: <http://openjdk.java.net>."
68371 
68372 _ACEOF
68373 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68374 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68375 ac_cs_version="\\
68376 OpenJDK config.status jdk9
68377 configured by $0, generated by GNU Autoconf 2.69,
68378   with options \\"\$ac_cs_config\\"
68379 
68380 Copyright (C) 2012 Free Software Foundation, Inc.
68381 This config.status script is free software; the Free Software Foundation
68382 gives unlimited permission to copy, distribute and modify it."
68383 
68384 ac_pwd='$ac_pwd'
68385 srcdir='$srcdir'
68386 AWK='$AWK'
68387 test -n "\$AWK" || AWK=awk
68388 _ACEOF
68389 
68390 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68391 # The default lists apply if the user does not specify any file.
68392 ac_need_defaults=:
68393 while test $# != 0
68394 do
68395   case $1 in
68396   --*=?*)
68397     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68398     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68399     ac_shift=:
68400     ;;
68401   --*=)
68402     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68403     ac_optarg=
68404     ac_shift=:
68405     ;;
68406   *)
68407     ac_option=$1
68408     ac_optarg=$2
68409     ac_shift=shift
68410     ;;
68411   esac
68412 
68413   case $ac_option in
68414   # Handling of the options.
68415   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68416     ac_cs_recheck=: ;;
68417   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68418     $as_echo "$ac_cs_version"; exit ;;
68419   --config | --confi | --conf | --con | --co | --c )
68420     $as_echo "$ac_cs_config"; exit ;;
68421   --debug | --debu | --deb | --de | --d | -d )
68422     debug=: ;;
68423   --file | --fil | --fi | --f )
68424     $ac_shift
68425     case $ac_optarg in
68426     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68427     '') as_fn_error $? "missing file argument" ;;
68428     esac
68429     as_fn_append CONFIG_FILES " '$ac_optarg'"
68430     ac_need_defaults=false;;
68431   --he | --h |  --help | --hel | -h )
68432     $as_echo "$ac_cs_usage"; exit ;;
68433   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68434   | -silent | --silent | --silen | --sile | --sil | --si | --s)
68435     ac_cs_silent=: ;;
68436 
68437   # This is an error.
68438   -*) as_fn_error $? "unrecognized option: \`$1'
68439 Try \`$0 --help' for more information." ;;
68440 
68441   *) as_fn_append ac_config_targets " $1"
68442      ac_need_defaults=false ;;
68443 
68444   esac
68445   shift
68446 done
68447 
68448 ac_configure_extra_args=
68449 
68450 if $ac_cs_silent; then
68451   exec 6>/dev/null
68452   ac_configure_extra_args="$ac_configure_extra_args --silent"
68453 fi
68454 
68455 _ACEOF
68456 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68457 if \$ac_cs_recheck; then
68458   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68459   shift
68460   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68461   CONFIG_SHELL='$SHELL'
68462   export CONFIG_SHELL
68463   exec "\$@"
68464 fi
68465 
68466 _ACEOF
68467 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68468 exec 5>>config.log
68469 {
68470   echo
68471   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68472 ## Running $as_me. ##
68473 _ASBOX
68474   $as_echo "$ac_log"
68475 } >&5
68476 
68477 _ACEOF
68478 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68479 _ACEOF
68480 
68481 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68482 
68483 # Handling of arguments.
68484 for ac_config_target in $ac_config_targets
68485 do
68486   case $ac_config_target in
68487     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68488     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68489     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68490     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68491     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68492 
68493   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68494   esac
68495 done
68496 
68497 
68498 # If the user did not use the arguments to specify the items to instantiate,
68499 # then the envvar interface is used.  Set only those that are not.
68500 # We use the long form for the default assignment because of an extremely
68501 # bizarre bug on SunOS 4.1.3.
68502 if $ac_need_defaults; then
68503   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68504 fi
68505 
68506 # Have a temporary directory for convenience.  Make it in the build tree
68507 # simply because there is no reason against having it here, and in addition,
68508 # creating and moving files from /tmp can sometimes cause problems.
68509 # Hook for its removal unless debugging.
68510 # Note that there is a small window in which the directory will not be cleaned:
68511 # after its creation but before its name has been assigned to `$tmp'.
68512 $debug ||
68513 {
68514   tmp= ac_tmp=
68515   trap 'exit_status=$?
68516   : "${ac_tmp:=$tmp}"
68517   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68518 ' 0
68519   trap 'as_fn_exit 1' 1 2 13 15
68520 }
68521 # Create a (secure) tmp directory for tmp files.
68522 
68523 {
68524   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68525   test -d "$tmp"
68526 }  ||
68527 {
68528   tmp=./conf$$-$RANDOM
68529   (umask 077 && mkdir "$tmp")
68530 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68531 ac_tmp=$tmp
68532 
68533 # Set up the scripts for CONFIG_FILES section.
68534 # No need to generate them if there are no CONFIG_FILES.
68535 # This happens for instance with `./config.status config.h'.
68536 if test -n "$CONFIG_FILES"; then
68537 
68538 
68539 ac_cr=`echo X | tr X '\015'`
68540 # On cygwin, bash can eat \r inside `` if the user requested igncr.
68541 # But we know of no other shell where ac_cr would be empty at this
68542 # point, so we can use a bashism as a fallback.
68543 if test "x$ac_cr" = x; then
68544   eval ac_cr=\$\'\\r\'
68545 fi
68546 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68547 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68548   ac_cs_awk_cr='\\r'
68549 else
68550   ac_cs_awk_cr=$ac_cr
68551 fi
68552 
68553 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68554 _ACEOF
68555 
68556 
68557 {
68558   echo "cat >conf$$subs.awk <<_ACEOF" &&
68559   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68560   echo "_ACEOF"
68561 } >conf$$subs.sh ||
68562   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68563 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68564 ac_delim='%!_!# '
68565 for ac_last_try in false false false false false :; do
68566   . ./conf$$subs.sh ||
68567     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68568 
68569   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68570   if test $ac_delim_n = $ac_delim_num; then
68571     break
68572   elif $ac_last_try; then
68573     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68574   else
68575     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68576   fi
68577 done
68578 rm -f conf$$subs.sh
68579 
68580 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68581 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68582 _ACEOF
68583 sed -n '
68584 h
68585 s/^/S["/; s/!.*/"]=/
68586 p
68587 g
68588 s/^[^!]*!//
68589 :repl
68590 t repl
68591 s/'"$ac_delim"'$//
68592 t delim
68593 :nl
68594 h
68595 s/\(.\{148\}\)..*/\1/
68596 t more1
68597 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68598 p
68599 n
68600 b repl
68601 :more1
68602 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68603 p
68604 g
68605 s/.\{148\}//
68606 t nl
68607 :delim
68608 h
68609 s/\(.\{148\}\)..*/\1/
68610 t more2
68611 s/["\\]/\\&/g; s/^/"/; s/$/"/
68612 p
68613 b
68614 :more2
68615 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68616 p
68617 g
68618 s/.\{148\}//
68619 t delim
68620 ' <conf$$subs.awk | sed '
68621 /^[^""]/{
68622   N
68623   s/\n//
68624 }
68625 ' >>$CONFIG_STATUS || ac_write_fail=1
68626 rm -f conf$$subs.awk
68627 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68628 _ACAWK
68629 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68630   for (key in S) S_is_set[key] = 1
68631   FS = ""
68632 
68633 }
68634 {
68635   line = $ 0
68636   nfields = split(line, field, "@")
68637   substed = 0
68638   len = length(field[1])
68639   for (i = 2; i < nfields; i++) {
68640     key = field[i]
68641     keylen = length(key)
68642     if (S_is_set[key]) {
68643       value = S[key]
68644       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68645       len += length(value) + length(field[++i])
68646       substed = 1
68647     } else
68648       len += 1 + keylen
68649   }
68650 
68651   print line
68652 }
68653 
68654 _ACAWK
68655 _ACEOF
68656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68657 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68658   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68659 else
68660   cat
68661 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68662   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68663 _ACEOF
68664 
68665 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68666 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68667 # trailing colons and then remove the whole line if VPATH becomes empty
68668 # (actually we leave an empty line to preserve line numbers).
68669 if test "x$srcdir" = x.; then
68670   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
68671 h
68672 s///
68673 s/^/:/
68674 s/[      ]*$/:/
68675 s/:\$(srcdir):/:/g
68676 s/:\${srcdir}:/:/g
68677 s/:@srcdir@:/:/g
68678 s/^:*//
68679 s/:*$//
68680 x
68681 s/\(=[   ]*\).*/\1/
68682 G
68683 s/\n//
68684 s/^[^=]*=[       ]*$//
68685 }'
68686 fi
68687 
68688 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68689 fi # test -n "$CONFIG_FILES"
68690 
68691 
68692 eval set X "  :F $CONFIG_FILES      "
68693 shift
68694 for ac_tag
68695 do
68696   case $ac_tag in
68697   :[FHLC]) ac_mode=$ac_tag; continue;;
68698   esac
68699   case $ac_mode$ac_tag in
68700   :[FHL]*:*);;
68701   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68702   :[FH]-) ac_tag=-:-;;
68703   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68704   esac
68705   ac_save_IFS=$IFS
68706   IFS=:
68707   set x $ac_tag
68708   IFS=$ac_save_IFS
68709   shift
68710   ac_file=$1
68711   shift
68712 
68713   case $ac_mode in
68714   :L) ac_source=$1;;
68715   :[FH])
68716     ac_file_inputs=
68717     for ac_f
68718     do
68719       case $ac_f in
68720       -) ac_f="$ac_tmp/stdin";;
68721       *) # Look for the file first in the build tree, then in the source tree
68722          # (if the path is not absolute).  The absolute path cannot be DOS-style,
68723          # because $ac_f cannot contain `:'.
68724          test -f "$ac_f" ||
68725            case $ac_f in
68726            [\\/$]*) false;;
68727            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68728            esac ||
68729            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68730       esac
68731       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68732       as_fn_append ac_file_inputs " '$ac_f'"
68733     done
68734 
68735     # Let's still pretend it is `configure' which instantiates (i.e., don't
68736     # use $as_me), people would be surprised to read:
68737     #    /* config.h.  Generated by config.status.  */
68738     configure_input='Generated from '`
68739           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68740         `' by configure.'
68741     if test x"$ac_file" != x-; then
68742       configure_input="$ac_file.  $configure_input"
68743       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68744 $as_echo "$as_me: creating $ac_file" >&6;}
68745     fi
68746     # Neutralize special characters interpreted by sed in replacement strings.
68747     case $configure_input in #(
68748     *\&* | *\|* | *\\* )
68749        ac_sed_conf_input=`$as_echo "$configure_input" |
68750        sed 's/[\\\\&|]/\\\\&/g'`;; #(
68751     *) ac_sed_conf_input=$configure_input;;
68752     esac
68753 
68754     case $ac_tag in
68755     *:-:* | *:-) cat >"$ac_tmp/stdin" \
68756       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68757     esac
68758     ;;
68759   esac
68760 
68761   ac_dir=`$as_dirname -- "$ac_file" ||
68762 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68763          X"$ac_file" : 'X\(//\)[^/]' \| \
68764          X"$ac_file" : 'X\(//\)$' \| \
68765          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68766 $as_echo X"$ac_file" |
68767     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68768             s//\1/
68769             q
68770           }
68771           /^X\(\/\/\)[^/].*/{
68772             s//\1/
68773             q
68774           }
68775           /^X\(\/\/\)$/{
68776             s//\1/
68777             q
68778           }
68779           /^X\(\/\).*/{
68780             s//\1/
68781             q
68782           }
68783           s/.*/./; q'`
68784   as_dir="$ac_dir"; as_fn_mkdir_p
68785   ac_builddir=.
68786 
68787 case "$ac_dir" in
68788 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68789 *)
68790   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68791   # A ".." for each directory in $ac_dir_suffix.
68792   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68793   case $ac_top_builddir_sub in
68794   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68795   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68796   esac ;;
68797 esac
68798 ac_abs_top_builddir=$ac_pwd
68799 ac_abs_builddir=$ac_pwd$ac_dir_suffix
68800 # for backward compatibility:
68801 ac_top_builddir=$ac_top_build_prefix
68802 
68803 case $srcdir in
68804   .)  # We are building in place.
68805     ac_srcdir=.
68806     ac_top_srcdir=$ac_top_builddir_sub
68807     ac_abs_top_srcdir=$ac_pwd ;;
68808   [\\/]* | ?:[\\/]* )  # Absolute name.
68809     ac_srcdir=$srcdir$ac_dir_suffix;
68810     ac_top_srcdir=$srcdir
68811     ac_abs_top_srcdir=$srcdir ;;
68812   *) # Relative name.
68813     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68814     ac_top_srcdir=$ac_top_build_prefix$srcdir
68815     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68816 esac
68817 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68818 
68819 
68820   case $ac_mode in
68821   :F)
68822   #
68823   # CONFIG_FILE
68824   #
68825 
68826 _ACEOF
68827 
68828 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68829 # If the template does not know about datarootdir, expand it.
68830 # FIXME: This hack should be removed a few years after 2.60.
68831 ac_datarootdir_hack=; ac_datarootdir_seen=
68832 ac_sed_dataroot='
68833 /datarootdir/ {
68834   p
68835   q
68836 }
68837 /@datadir@/p
68838 /@docdir@/p
68839 /@infodir@/p
68840 /@localedir@/p
68841 /@mandir@/p'
68842 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68843 *datarootdir*) ac_datarootdir_seen=yes;;
68844 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68845   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68846 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68847 _ACEOF
68848 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68849   ac_datarootdir_hack='
68850   s&@datadir@&$datadir&g
68851   s&@docdir@&$docdir&g
68852   s&@infodir@&$infodir&g
68853   s&@localedir@&$localedir&g
68854   s&@mandir@&$mandir&g
68855   s&\\\${datarootdir}&$datarootdir&g' ;;
68856 esac
68857 _ACEOF
68858 
68859 # Neutralize VPATH when `$srcdir' = `.'.
68860 # Shell code in configure.ac might set extrasub.
68861 # FIXME: do we really want to maintain this feature?
68862 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68863 ac_sed_extra="$ac_vpsub
68864 $extrasub
68865 _ACEOF
68866 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68867 :t
68868 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68869 s|@configure_input@|$ac_sed_conf_input|;t t
68870 s&@top_builddir@&$ac_top_builddir_sub&;t t
68871 s&@top_build_prefix@&$ac_top_build_prefix&;t t
68872 s&@srcdir@&$ac_srcdir&;t t
68873 s&@abs_srcdir@&$ac_abs_srcdir&;t t
68874 s&@top_srcdir@&$ac_top_srcdir&;t t
68875 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68876 s&@builddir@&$ac_builddir&;t t
68877 s&@abs_builddir@&$ac_abs_builddir&;t t
68878 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68879 $ac_datarootdir_hack
68880 "
68881 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68882   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68883 
68884 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68885   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68886   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
68887       "$ac_tmp/out"`; test -z "$ac_out"; } &&
68888   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68889 which seems to be undefined.  Please make sure it is defined" >&5
68890 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68891 which seems to be undefined.  Please make sure it is defined" >&2;}
68892 
68893   rm -f "$ac_tmp/stdin"
68894   case $ac_file in
68895   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68896   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68897   esac \
68898   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68899  ;;
68900 
68901 
68902 
68903   esac
68904 
68905 done # for ac_tag
68906 
68907 
68908 as_fn_exit 0
68909 _ACEOF
68910 ac_clean_files=$ac_clean_files_save
68911 
68912 test $ac_write_fail = 0 ||
68913   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68914 
68915 
68916 # configure is writing to config.log, and then calls config.status.
68917 # config.status does its own redirection, appending to config.log.
68918 # Unfortunately, on DOS this fails, as config.log is still kept open
68919 # by configure, so config.status won't be able to write to it; its
68920 # output is simply discarded.  So we exec the FD to /dev/null,
68921 # effectively closing config.log, so it can be properly (re)opened and
68922 # appended to by config.status.  When coming back to configure, we
68923 # need to make the FD available again.
68924 if test "$no_create" != yes; then
68925   ac_cs_success=:
68926   ac_config_status_args=
68927   test "$silent" = yes &&
68928     ac_config_status_args="$ac_config_status_args --quiet"
68929   exec 5>/dev/null
68930   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68931   exec 5>>config.log
68932   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68933   # would make configure fail if this is the last instruction.
68934   $ac_cs_success || as_fn_exit 1
68935 fi
68936 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68937   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68938 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68939 fi
68940 
68941 
68942 # After AC_OUTPUT, we need to do final work
68943 
68944 
68945   # Try to move config.log (generated by autoconf) to the configure-support directory.
68946   if test -e ./config.log; then
68947     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68948   fi
68949 
68950   # Rotate our log file (configure.log)
68951   if test -e "$OUTPUT_ROOT/configure.log.old"; then
68952     $RM -f "$OUTPUT_ROOT/configure.log.old"
68953   fi
68954   if test -e "$OUTPUT_ROOT/configure.log"; then
68955     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68956   fi
68957 
68958   # Move configure.log from current directory to the build output root
68959   if test -e ./configure.log; then
68960     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68961   fi
68962 
68963   # Make the compare script executable
68964   $CHMOD +x $OUTPUT_ROOT/compare.sh
68965 
68966 
68967 # Finally output some useful information to the user
68968 
68969   # Finally output some useful information to the user
68970 
68971   printf "\n"
68972   printf "====================================================\n"
68973   if test "x$no_create" != "xyes"; then
68974     if test "x$IS_RECONFIGURE" != "xyes"; then
68975       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68976     else
68977       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68978     fi
68979   else
68980     if test "x$IS_RECONFIGURE" != "xyes"; then
68981       printf "A configuration has been successfully checked but not created\n"
68982     else
68983       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68984     fi
68985   fi
68986   if test "x$CONFIGURE_COMMAND_LINE" != x; then
68987     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68988   else
68989     printf "using default settings.\n"
68990   fi
68991 
68992   printf "\n"
68993   printf "Configuration summary:\n"
68994   printf "* Debug level:    $DEBUG_LEVEL\n"
68995   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68996   printf "* JDK variant:    $JDK_VARIANT\n"
68997   printf "* JVM variants:   $JVM_VARIANTS\n"
68998   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68999   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
69000 
69001   printf "\n"
69002   printf "Tools summary:\n"
69003   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
69004     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
69005   fi
69006   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
69007   if test "x$TOOLCHAIN_VERSION" != "x"; then
69008     print_version=" $TOOLCHAIN_VERSION"
69009   fi
69010   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
69011   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
69012   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
69013 
69014   printf "\n"
69015   printf "Build performance summary:\n"
69016   printf "* Cores to use:   $JOBS\n"
69017   printf "* Memory limit:   $MEMORY_SIZE MB\n"
69018   if test "x$CCACHE_STATUS" != "x"; then
69019     printf "* ccache status:  $CCACHE_STATUS\n"
69020   fi
69021   printf "\n"
69022 
69023   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
69024     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
69025     printf "will result in longer build times.\n"
69026     printf "\n"
69027   fi
69028 
69029   if test "x$FOUND_ALT_VARIABLES" != "x"; then
69030     printf "WARNING: You have old-style ALT_ environment variables set.\n"
69031     printf "These are not respected, and will be ignored. It is recommended\n"
69032     printf "that you clean your environment. The following variables are set:\n"
69033     printf "$FOUND_ALT_VARIABLES\n"
69034     printf "\n"
69035   fi
69036 
69037   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
69038     printf "WARNING: Your build output directory is not on a local disk.\n"
69039     printf "This will severely degrade build performance!\n"
69040     printf "It is recommended that you create an output directory on a local disk,\n"
69041     printf "and run the configure script again from that directory.\n"
69042     printf "\n"
69043   fi
69044 
69045   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
69046     printf "WARNING: The result of this configuration has overridden an older\n"
69047     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
69048     printf "proper build. Failure to do so might result in strange build problems.\n"
69049     printf "\n"
69050   fi
69051 
69052   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
69053     printf "WARNING: The result of this configuration was not saved.\n"
69054     printf "You should run without '--no-create | -n' to create the configuration.\n"
69055     printf "\n"
69056   fi
69057 
69058 
69059 
69060   # Locate config.log.
69061   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
69062     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
69063   elif test -e "./config.log"; then
69064     CONFIG_LOG_PATH="."
69065   fi
69066 
69067   if test -e "$CONFIG_LOG_PATH/config.log"; then
69068     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
69069     if test $? -eq 0; then
69070       printf "The following warnings were produced. Repeated here for convenience:\n"
69071       # We must quote sed expression (using []) to stop m4 from eating the [].
69072       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
69073       printf "\n"
69074     fi
69075   fi
69076